ScrSpinBox Class Reference
ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3. More...
#include <scrspinbox.h>

Public Slots | |
| void | setValues (double min, double max, int deci, double val) |
| void | getValues (double *min, double *max, int *deci, double *val) |
Public Member Functions | |
| ScrSpinBox (QWidget *parent, int unitIndex=0) | |
| ScrSpinBox (double minValue, double maxValue, QWidget *pa, int unitIndex=0) | |
| ~ScrSpinBox () | |
| double | valueFromText (const QString &text) const |
| QString | textFromValue (double value) const |
| QValidator::State | validate (QString &input, int &pos) const |
| void | fixup (QString &input) const |
| void | init (int unitIndex) |
| void | setConstants (const QMap< QString, double > *constants) |
| void | setNewUnit (int unitIndex) |
| double | getValue (int unitIndex=0) |
| void | setTabAdvance (bool enable) |
Protected Slots | |
| void | textChanged () |
Protected Member Functions | |
| void | setParameters (int s) |
| bool | eventFilter (QObject *watched, QEvent *event) |
Protected Attributes | |
| uint | m_unitIndex |
| bool | m_tabAdvance |
| const QMap< QString, double > * | m_constants |
Detailed Description
ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3.Definition at line 21 of file scrspinbox.h.
Constructor & Destructor Documentation
| ScrSpinBox::ScrSpinBox | ( | QWidget * | parent, | |
| int | unitIndex = 0 | |||
| ) |
| ScrSpinBox::ScrSpinBox | ( | double | minValue, | |
| double | maxValue, | |||
| QWidget * | pa, | |||
| int | unitIndex = 0 | |||
| ) |
| ScrSpinBox::~ScrSpinBox | ( | ) |
Definition at line 47 of file scrspinbox.cpp.
Member Function Documentation
| double ScrSpinBox::valueFromText | ( | const QString & | text | ) | const |
Definition at line 109 of file scrspinbox.cpp.
References FunctionParser::AddConstant(), FunctionParser::Eval(), FinishTag(), m_constants, FunctionParser::Parse(), SC_C, SC_CM, SC_IN, SC_MM, SC_P, SC_PICAS, SC_PT, unitGetBaseFromIndex(), unitGetStrFromIndex(), unitGetUntranslatedStrFromIndex(), unitIndexFromString(), value, and value2value().
| QString ScrSpinBox::textFromValue | ( | double | value | ) | const |
Definition at line 229 of file scrspinbox.cpp.
References m_unitIndex, SC_PICAS, and unitGetStrFromIndex().
| QValidator::State ScrSpinBox::validate | ( | QString & | input, | |
| int & | pos | |||
| ) | const |
| void ScrSpinBox::fixup | ( | QString & | input | ) | const |
| void ScrSpinBox::init | ( | int | unitIndex | ) |
Definition at line 34 of file scrspinbox.cpp.
References m_tabAdvance, m_unitIndex, textChanged(), unitGetPrecisionFromIndex(), and unitGetSuffixFromIndex().
Referenced by ScrSpinBox().
| void ScrSpinBox::setConstants | ( | const QMap< QString, double > * | constants | ) |
Definition at line 100 of file scrspinbox.cpp.
References m_constants.
Referenced by PropertiesPalette::setDoc(), and PropertiesPalette::unsetDoc().
| void ScrSpinBox::setNewUnit | ( | int | unitIndex | ) |
Definition at line 60 of file scrspinbox.cpp.
References m_unitIndex, unitGetPrecisionFromIndex(), unitGetRatioFromIndex(), unitGetSuffixFromIndex(), and value.
Referenced by TabTools::restoreDefaults(), NodePalette::setDoc(), MarginWidget::setNewUnit(), NewDoc::setUnit(), TabTools::unitChange(), TabDocument::unitChange(), PropertiesPalette::unitChange(), and Cpalette::unitChange().
| double ScrSpinBox::getValue | ( | int | unitIndex = 0 |
) |
Definition at line 92 of file scrspinbox.cpp.
References m_unitIndex, unitGetRatioFromIndex(), and value.
| void ScrSpinBox::setTabAdvance | ( | bool | enable | ) |
Definition at line 362 of file scrspinbox.cpp.
References m_tabAdvance.
Referenced by ScribusView::ScribusView().
| void ScrSpinBox::setValues | ( | double | min, | |
| double | max, | |||
| int | deci, | |||
| double | val | |||
| ) | [slot] |
Definition at line 76 of file scrspinbox.cpp.
Referenced by ScInputDialog::getDouble(), OneClick::OneClick(), PropertiesPalette::setDoc(), SToolBStyle::SToolBStyle(), TabPDFOptions::unitChange(), TabGuides::unitChange(), and NodePalette::unitChange().
| void ScrSpinBox::getValues | ( | double * | min, | |
| double * | max, | |||
| int * | deci, | |||
| double * | val | |||
| ) | [slot] |
Definition at line 84 of file scrspinbox.cpp.
References value.
Referenced by SMTabruler::firstDataChanged(), SMTabruler::firstValueChanged(), SMTabruler::leftDataChanged(), SMTabruler::leftValueChanged(), SMTabruler::rightDataChanged(), SMTabruler::rightValueChanged(), Tabruler::setFirstLine(), Tabruler::setFirstLineData(), Tabruler::setLeftIndent(), Tabruler::setLeftIndentData(), Tabruler::setRightIndent(), Tabruler::setRightIndentData(), TabPDFOptions::unitChange(), and TabGuides::unitChange().
| void ScrSpinBox::setParameters | ( | int | s | ) | [protected] |
| bool ScrSpinBox::eventFilter | ( | QObject * | watched, | |
| QEvent * | event | |||
| ) | [protected] |
Definition at line 262 of file scrspinbox.cpp.
| void ScrSpinBox::textChanged | ( | ) | [protected, slot] |
Member Data Documentation
uint ScrSpinBox::m_unitIndex [protected] |
Definition at line 50 of file scrspinbox.h.
Referenced by getValue(), init(), setNewUnit(), and textFromValue().
bool ScrSpinBox::m_tabAdvance [protected] |
const QMap<QString, double>* ScrSpinBox::m_constants [protected] |
The documentation for this class was generated from the following files:
