Back to index

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

#include <smwidgets.h>

List of all members.

Public Member Functions

 SMSpinBox (QWidget *parent, const char *name)
 ~SMSpinBox ()
void setValue (int val)
void setValue (int val, bool isParentVal)
void clear ()
void setParentValue (int 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_
int pValue_

Detailed Description

Definition at line 20 of file smwidgets.h.


Constructor & Destructor Documentation

SMSpinBox::SMSpinBox ( QWidget *  parent,
const char *  name 
)

Definition at line 17 of file smwidgets.cpp.

: QSpinBox(parent, name),
  hasParent_(false),
  useParentValue_(false),
  pValue_(0)
{

}
SMSpinBox::~SMSpinBox ( ) [inline]

Definition at line 25 of file smwidgets.h.

{};

Member Function Documentation

void SMSpinBox::clear ( )

Definition at line 47 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 SMSpinBox::interpretText ( ) [protected]

Definition at line 67 of file smwidgets.cpp.

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

Here is the call graph for this function:

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

Definition at line 79 of file smwidgets.cpp.

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

Here is the caller graph for this function:

Definition at line 54 of file smwidgets.cpp.

{
       hasParent_ = true;
       pValue_ = val;
}

Here is the caller graph for this function:

void SMSpinBox::setValue ( int  val)

Definition at line 26 of file smwidgets.cpp.

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

       QSpinBox::setValue(val);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMSpinBox::setValue ( int  val,
bool  isParentVal 
)

Definition at line 36 of file smwidgets.cpp.

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

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

Here is the call graph for this function:

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

Definition at line 86 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 60 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 40 of file smwidgets.h.

Definition at line 42 of file smwidgets.h.

Definition at line 41 of file smwidgets.h.


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