ContextStyle Class Reference
Contains all the style information for the formela. More...
#include <contextstyle.h>
Inheritance diagram for ContextStyle:

Public Types | |
enum | Alignment { left, center, right } |
enum | TextStyle { displayStyle = 0, textStyle = 1, scriptStyle = 2, scriptScriptStyle = 3 } |
enum | IndexStyle { normal, cramped } |
Public Member Functions | |
ContextStyle () | |
void | init () |
void | readConfig (KConfig *config) |
bool | edit () const |
void | setEdit (bool e) |
const SymbolTable & | symbolTable () const |
const FontStyle & | fontStyle () const |
void | setZoomAndResolution (int zoom, int dpiX, int dpiY) |
bool | setZoomAndResolution (int zoom, double zoomX, double zoomY, bool updateViews, bool forPrint) |
bool | syntaxHighlighting () const |
void | setSyntaxHighlighting (bool highlight) |
QColor | getDefaultColor () const |
QColor | getNumberColorPlain () const |
QColor | getOperatorColorPlain () const |
QColor | getErrorColorPlain () const |
QColor | getEmptyColorPlain () const |
QColor | getHelpColorPlain () const |
QColor | getNumberColor () const |
QColor | getOperatorColor () const |
QColor | getErrorColor () const |
QColor | getEmptyColor () const |
QColor | getHelpColor () const |
void | setDefaultColor (const QColor &) |
void | setNumberColor (const QColor &) |
void | setOperatorColor (const QColor &) |
void | setErrorColor (const QColor &) |
void | setEmptyColor (const QColor &) |
void | setHelpColor (const QColor &) |
QString | getFontStyle () const |
void | setFontStyle (const QString &fontStyle) |
QFont | getDefaultFont () const |
QFont | getNameFont () const |
QFont | getNumberFont () const |
QFont | getOperatorFont () const |
QFont | getSymbolFont () const |
void | setDefaultFont (QFont f) |
void | setNameFont (QFont f) |
void | setNumberFont (QFont f) |
void | setOperatorFont (QFont f) |
double | getReductionFactor (TextStyle tstyle) const |
luPt | getBaseSize () const |
int | baseSize () const |
void | setBaseSize (int pointSize) |
void | setSizeFactor (double factor) |
TextStyle | getBaseTextStyle () const |
bool | isScript (TextStyle tstyle) const |
luPixel | getSpace (TextStyle tstyle, SpaceWidth space) const |
luPixel | getThinSpace (TextStyle tstyle) const |
luPixel | getMediumSpace (TextStyle tstyle) const |
luPixel | getThickSpace (TextStyle tstyle) const |
luPixel | getQuadSpace (TextStyle tstyle) const |
luPixel | axisHeight (TextStyle tstyle) const |
luPt | getAdjustedSize (TextStyle tstyle) const |
luPixel | getLineWidth () const |
luPixel | getEmptyRectWidth () const |
luPixel | getEmptyRectHeight () const |
Alignment | getMatrixAlignment () const |
bool | getCenterSymbol () const |
TextStyle | convertTextStyleFraction (TextStyle tstyle) const |
TextStyle | convertTextStyleIndex (TextStyle tstyle) const |
IndexStyle | convertIndexStyleUpper (IndexStyle istyle) const |
IndexStyle | convertIndexStyleLower (IndexStyle) const |
Detailed Description
Contains all the style information for the formela.The idea is to change the values here (user configurable) and have the elements paint themselves with this information.
All distances are stored in point. Most methods return pixel values.
Definition at line 53 of file contextstyle.h.
Member Enumeration Documentation
|
Textstyles like in TeX. In the remaining documentation, the styles are abbreviated like this: displayStyle: D textStyle: T scriptStyle: S scriptScriptStyle: SS Definition at line 71 of file contextstyle.h. Referenced by convertTextStyleFraction(), and convertTextStyleIndex(). |
Constructor & Destructor Documentation
|
Build a default context style.
Definition at line 36 of file contextstyle.cc. |
Member Function Documentation
|
Definition at line 101 of file contextstyle.cc. References FontStyle::symbolTable(). Referenced by TextElement::getFont(), and Document::getSymbolTable(). |
|
Change the zoom factor to 150 for 150%) and/or change the resolution, given in DPI. This is done on startup, when zooming, and when printing. The same call combines both so that all the updating done behind the scenes is done only once, even if both zoom and DPI must be changed. Reimplemented from KoZoomHandler. Definition at line 163 of file contextstyle.cc. References KoZoomHandler::setZoomAndResolution(). Referenced by Container::drawImage(), and Document::setZoomAndResolution(). |
|
Sets the zoom by hand.
This is to be used in
Definition at line 168 of file contextstyle.cc. |
|
TeX like spacings.
Definition at line 265 of file contextstyle.cc. |
|
Calculates the font size corresponding to the given TextStyle.
Definition at line 260 of file contextstyle.cc. References KoTextZoomHandler::ptToLayoutUnitPt(). Referenced by EmptyElement::calcSizes(), TextElement::calcSizes(), MultilineElement::calcSizes(), and TextElement::draw(). |
|
All simple lines like the one that makes up a fraction.
Definition at line 323 of file contextstyle.cc. References KoZoomHandler::ptToLayoutUnitPixX(). Referenced by TextElement::draw(), NameSequence::drawCursor(), and SequenceElement::drawCursor(). |
|
Font-conversions a la TeX. For fractions (and also matrices), we have the following conversions: D->T, T->S, S,SS->SS Definition at line 339 of file contextstyle.cc. References TextStyle. |
|
Font-conversions a la TeX. For indices, we have the following conversions: D->S, T->S, S,SS->SS Definition at line 359 of file contextstyle.cc. References TextStyle. |
|
Index-style-conversions a la TeX. The function convertIndexStyleUpper is responsible for everything that ends 'up', like nominators of fractions, or upper indices. We have the following rule: normal->normal, cramped->cramped Definition at line 211 of file contextstyle.h. |
|
Index-style-conversions a la TeX. The function convertIndexStyleLower is responsible for everything that ends 'down', like nominators of fractions, or upper indices. We have the following rule: normal->cramped, cramped->cramped Definition at line 224 of file contextstyle.h. |
The documentation for this class was generated from the following files: