Back to index

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

#include <smwidgets.h>

Inheritance diagram for SMScComboBox:
Inheritance graph
[legend]
Collaboration diagram for SMScComboBox:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SMScComboBox (QWidget *parent, const char *name)
 SMScComboBox (bool rw, QWidget *parent, const char *name)
 ~SMScComboBox ()
void setCurrentItem (int i)
void setCurrentItem (int i, bool isParentValue)
void setParentItem (int i)
bool useParentValue ()

Private Slots

void currentChanged ()

Private Member Functions

void setFont (bool wantBold)

Private Attributes

bool hasParent_
bool useParentValue_
int pItem_

Detailed Description

Definition at line 80 of file smwidgets.h.


Constructor & Destructor Documentation

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

Definition at line 191 of file smwidgets.cpp.

: ScComboBox(parent, name),
  hasParent_(false),
  useParentValue_(false),
  pItem_(0)
{
       
}
SMScComboBox::SMScComboBox ( bool  rw,
QWidget *  parent,
const char *  name 
)

Definition at line 200 of file smwidgets.cpp.

: ScComboBox(rw, parent, name),
  hasParent_(false),
  useParentValue_(false),
  pItem_(0)
{
       
}

Definition at line 86 of file smwidgets.h.

{};

Member Function Documentation

void SMScComboBox::currentChanged ( ) [private, slot]

Definition at line 266 of file smwidgets.cpp.

{
       if (hasParent_ && !useParentValue_)
       {
              setFont(true);
              insertItem( tr("Use Parent Value"));
              useParentValue_ = true;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 209 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       setFont(false);
       hasParent_ = false;
       pItem_ = 0;
       ScComboBox::setCurrentItem(i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMScComboBox::setCurrentItem ( int  i,
bool  isParentValue 
)

Definition at line 218 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       hasParent_ = true;
       pItem_ = i;
       setFont(!isParentValue);
       if (!isParentValue)
       {
              useParentValue_ = true;
              insertItem( tr("Use Parent Value"));
       }

       ScComboBox::setCurrentItem(i);
       connect(this, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
}

Here is the call graph for this function:

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

Definition at line 259 of file smwidgets.cpp.

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

Here is the caller graph for this function:

Definition at line 234 of file smwidgets.cpp.

{
       hasParent_ = true;
       pItem_ = i;
}

Here is the caller graph for this function:

Definition at line 240 of file smwidgets.cpp.

{
       bool ret = false;

       if (useParentValue_ && hasParent_)
       {
              ret = currentItem() == (count() - 1);
              if (ret)
              {
                     removeItem(count() - 1);
                     setFont(false);
                     setCurrentItem(pItem_, true);
                     useParentValue_ = false;
              }
       }

       return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 96 of file smwidgets.h.

Definition at line 98 of file smwidgets.h.

Definition at line 97 of file smwidgets.h.


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