Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

ScrSpinBox Class Reference

ScrSpinBox is a Qt4 replacement for our old ScrSpinBox using Qt3. More...

#include <scrspinbox.h>

Inheritance diagram for ScrSpinBox:

Inheritance graph
[legend]

List of all members.

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 
)

Definition at line 22 of file scrspinbox.cpp.

References init().

ScrSpinBox::ScrSpinBox ( double  minValue,
double  maxValue,
QWidget *  pa,
int  unitIndex = 0 
)

Definition at line 27 of file scrspinbox.cpp.

References init().

ScrSpinBox::~ScrSpinBox (  ) 

Definition at line 47 of file scrspinbox.cpp.


Member Function Documentation

double ScrSpinBox::valueFromText ( const QString &  text  )  const

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

Definition at line 236 of file scrspinbox.cpp.

References FinishTag().

void ScrSpinBox::fixup ( QString &  input  )  const

Definition at line 250 of file scrspinbox.cpp.

References FinishTag().

void ScrSpinBox::init ( int  unitIndex  ) 

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  ) 

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]

void ScrSpinBox::getValues ( double *  min,
double *  max,
int *  deci,
double *  val 
) [slot]

void ScrSpinBox::setParameters ( int  s  )  [protected]

Definition at line 52 of file scrspinbox.cpp.

References unitGetMaxIndex().

bool ScrSpinBox::eventFilter ( QObject *  watched,
QEvent *  event 
) [protected]

Definition at line 262 of file scrspinbox.cpp.

void ScrSpinBox::textChanged (  )  [protected, slot]

Definition at line 257 of file scrspinbox.cpp.

Referenced by init().


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]

Definition at line 51 of file scrspinbox.h.

Referenced by init(), and setTabAdvance().

const QMap<QString, double>* ScrSpinBox::m_constants [protected]

Definition at line 52 of file scrspinbox.h.

Referenced by setConstants(), and valueFromText().


The documentation for this class was generated from the following files:
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.