Scribus
Open source desktop publishing at your fingertips
MSpinBox Class Reference

Enthanced QSpinBox. More...

#include <mspinbox.h>

Inheritance diagram for MSpinBox:
Collaboration diagram for MSpinBox:

Public Slots

void textChanged ()
 
void stepDown ()
 
void setMaxValue (double val)
 Sets the Maximum Value of the Spinbox. More...
 
void setMinValue (double val)
 Sets the Minimum Value of the Spinbox. More...
 
virtual void setValue (double val)
 Sets the Value of the Spinbox. More...
 
void setReadOnly (bool ro)
 
void setValues (double min, double max, int deci, double val)
 
void getValues (double *min, double *max, int *deci, double *val)
 

Public Member Functions

 MSpinBox (QWidget *pa, int s)
 
 MSpinBox (double minValue, double maxValue, QWidget *pa, int s)
 
 MSpinBox (QWidget *parent, const char *name=0)
 A dummy constructor for use in Designer's custom widgets. More...
 
double value ()
 Returns the current Value of the SpinBox. More...
 
double minValue ()
 Gets the Minimum Value of the Spinbox. More...
 
double maxValue ()
 Gets the Maximim Value of the Spinbox. More...
 
virtual QString mapValueToText (int value)
 
virtual int mapTextToValue (bool *ok)
 Maps the Text of the Spinbox to the Value, does scUnit Conversion and Calculations. More...
 
void setNewUnit (double oldUnitRatio, double newUnitRatio, int unitIndex)
 Sets a new unit for the spinbox, doing the value conversions. More...
 
void setTabAdvance (bool enable)
 
void setDecimals (int deci)
 
bool isReadOnly () const
 
void setConstants (const QMap< QString, double > &)
 
void setLineStepM (int val)
 

Public Attributes

int Decimals
 
int Width
 
QLineEdit * ed
 

Protected Member Functions

bool eventFilter (QObject *ob, QEvent *ev)
 
void setParameters (int s)
 
void setFPConstants (FunctionParser &fp)
 

Protected Attributes

bool m_tabAdvance
 
bool readOnly
 
int oldLineStep
 
int currLineStep
 
bool edited
 
QMap< QString, double > functionParserConstants
 

Detailed Description

Enthanced QSpinBox.

Author
Franz Schmid

Constructor & Destructor Documentation

MSpinBox::MSpinBox ( QWidget *  pa,
int  s 
)
Author
Franz Schmid
Parameters
paParent Widget
sNumber of Decimals
MSpinBox::MSpinBox ( double  minValue,
double  maxValue,
QWidget *  pa,
int  s 
)
Author
Franz Schmid
Parameters
minValueminimal bound
maxValuemaximal bound
paParent Widget
sNumber of Decimals
MSpinBox::MSpinBox ( QWidget *  parent,
const char *  name = 0 
)

A dummy constructor for use in Designer's custom widgets.

Warning
You have to setup properties later!
Author
Petr Vanek
Parameters
parenta parent QWidget
nameoptional name of the object

Member Function Documentation

int MSpinBox::mapTextToValue ( bool *  ok)
virtual

Maps the Text of the Spinbox to the Value, does scUnit Conversion and Calculations.

Author
Franz Schmid
Parameters
oknot used
Return values
intThe Value
double MSpinBox::maxValue ( )

Gets the Maximim Value of the Spinbox.

Author
Franz Schmid
Return values
TheValue
double MSpinBox::minValue ( )

Gets the Minimum Value of the Spinbox.

Author
Franz Schmid
Return values
TheValue
void MSpinBox::setMaxValue ( double  val)
slot

Sets the Maximum Value of the Spinbox.

Author
Franz Schmid
Parameters
valnew Value
void MSpinBox::setMinValue ( double  val)
slot

Sets the Minimum Value of the Spinbox.

Author
Franz Schmid
Parameters
valnew Value
void MSpinBox::setNewUnit ( double  oldUnitRatio,
double  newUnitRatio,
int  unitIndex 
)

Sets a new unit for the spinbox, doing the value conversions.

Author
Franz Schmid
Parameters
oldUnitRatioconversion factor for the old unit
newUnitRatioconversion factor for the new unit
unitIndexthe unitIndex for the new unit
void MSpinBox::setValue ( double  val)
virtualslot

Sets the Value of the Spinbox.

Author
Franz Schmid
Parameters
valnew Value
double MSpinBox::value ( )

Returns the current Value of the SpinBox.

Author
Franz Schmid
Return values
doubleThe Value

The documentation for this class was generated from the following files: