Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
SMMSpinBox Class Reference

#include <smwidgets.h>

List of all members.

Public Member Functions

 SMMSpinBox (QWidget *pa, int s)
 SMMSpinBox (double minValue, double maxValue, QWidget *pa, int s)
 SMMSpinBox (QWidget *parent, const char *name=0)
 ~SMMSpinBox ()
void setValue (double val)
void setValue (double val, bool isParentVal)
void clear ()
void setParentValue (double val)
bool useParentValue ()

Protected Member Functions

void interpretText ()

Private Slots

void slotValueChanged ()

Private Member Functions

void setFont (bool wantBold)

Private Attributes

bool hasParent_
bool useParentValue_
double pValue_

Detailed Description

Definition at line 49 of file smwidgets.h.


Constructor & Destructor Documentation

SMMSpinBox::SMMSpinBox ( QWidget *  pa,
int  s 
)

Definition at line 95 of file smwidgets.cpp.

: MSpinBox(pa, s),
  hasParent_(false),
  useParentValue_(false),
  pValue_(0.0)
{
       
}
SMMSpinBox::SMMSpinBox ( double  minValue,
double  maxValue,
QWidget *  pa,
int  s 
)

Definition at line 104 of file smwidgets.cpp.

: MSpinBox(minValue, maxValue, pa, s),
  hasParent_(false),
  useParentValue_(false),
  pValue_(0.0)
{
       
}
SMMSpinBox::SMMSpinBox ( QWidget *  parent,
const char *  name = 0 
)

Definition at line 113 of file smwidgets.cpp.

: MSpinBox(parent, name),
  hasParent_(false),
  useParentValue_(false),
  pValue_(0.0)
{
       
}

Definition at line 56 of file smwidgets.h.

{};

Member Function Documentation

Definition at line 143 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
       editor()->clear();
       connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMMSpinBox::interpretText ( ) [protected]

Definition at line 163 of file smwidgets.cpp.

{
//     QString t = text();
//     if (hasParent_ && (t == "" || t.isEmpty() || t == QString::null))
       if (hasParent_ && text().isEmpty())
       {
              useParentValue_ = true;
              setValue(pValue_, true);
       }
       MSpinBox::interpretText();
}

Here is the call graph for this function:

void SMMSpinBox::setFont ( bool  wantBold) [private]

Definition at line 175 of file smwidgets.cpp.

{
       QFont f(font());
       f.setBold(wantBold);
       MSpinBox::setFont(f);
}

Here is the caller graph for this function:

void SMMSpinBox::setParentValue ( double  val)

Definition at line 150 of file smwidgets.cpp.

{
       hasParent_ = true;
       pValue_ = val;
}

Here is the caller graph for this function:

void SMMSpinBox::setValue ( double  val)

Definition at line 122 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
       hasParent_ = false;
       pValue_ = 0.0;
       setFont(false);

       MSpinBox::setValue(val);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMMSpinBox::setValue ( double  val,
bool  isParentVal 
)

Definition at line 132 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
       hasParent_ = true;
       pValue_ = val;
       setFont(!isParentVal);

       MSpinBox::setValue(val);
       connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
}

Here is the call graph for this function:

void SMMSpinBox::slotValueChanged ( ) [private, slot]

Definition at line 182 of file smwidgets.cpp.

{
       if(hasParent_)
              setFont(true);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 156 of file smwidgets.cpp.

{
       bool ret = useParentValue_;
       useParentValue_ = false;
       return ret;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 71 of file smwidgets.h.

double SMMSpinBox::pValue_ [private]

Definition at line 73 of file smwidgets.h.

Definition at line 72 of file smwidgets.h.


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