lib
ContextStyle Class Reference
#include <contextstyle.h>
Inheritance diagram for ContextStyle:

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 52 of file contextstyle.h.
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 () | |
~ContextStyle () | |
void | init (bool init=true) |
void | readConfig (KConfig *config, bool init=true) |
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, bool init=true) |
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 |
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 70 of file contextstyle.h. |
Constructor & Destructor Documentation
|
Build a default context style.
Definition at line 36 of file contextstyle.cc. |
Member Function Documentation
|
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 232 of file contextstyle.h. |
|
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 219 of file contextstyle.h. |
|
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 348 of file contextstyle.cc. |
|
Font-conversions a la TeX. For indices, we have the following conversions: D->S, T->S, S,SS->SS Definition at line 368 of file contextstyle.cc. |
|
Calculates the font size corresponding to the given TextStyle.
Definition at line 269 of file contextstyle.cc. |
|
All simple lines like the one that makes up a fraction.
Definition at line 332 of file contextstyle.cc. |
|
TeX like spacings.
Definition at line 274 of file contextstyle.cc. |
|
Definition at line 72 of file contextstyle.cc. |
|
Definition at line 107 of file contextstyle.cc. |
|
Sets the zoom by hand.
This is to be used in
Definition at line 177 of file contextstyle.cc. |
|
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 172 of file contextstyle.cc. |
|
Definition at line 101 of file contextstyle.cc. |
The documentation for this class was generated from the following files: