Back to index

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

#include <smwidgets.h>

List of all members.

Public Member Functions

 SMFontComboH (QWidget *parent)
 ~SMFontComboH ()
void setCurrentFont (const QString &s)
void setCurrentFont (const QString &s, bool isParentValue)
void setParentFont (const QString &s)
bool useParentFont ()

Private Slots

void currentChanged ()
void checkStyle ()

Private Member Functions

void setFont (bool wantBold)

Private Attributes

bool hasParent_
bool useParentValue_
QString pFont_
QString usePFont_

Detailed Description

Definition at line 214 of file smwidgets.h.


Constructor & Destructor Documentation

SMFontComboH::SMFontComboH ( QWidget *  parent)

Definition at line 678 of file smwidgets.cpp.

: FontComboH(parent, true),
  hasParent_(false),
  useParentValue_(false),
  pFont_(QString::null),
  usePFont_( tr("Use Parent Font"))
{
       
}

Definition at line 219 of file smwidgets.h.

{};

Member Function Documentation

void SMFontComboH::checkStyle ( ) [private, slot]

Definition at line 759 of file smwidgets.cpp.

{
       if (hasParent_ && useParentValue_)
       {
              if (fontStyle->text(fontStyle->count() - 1) != usePFont_)
                     fontStyle->insertItem(usePFont_);
       }
}

Here is the caller graph for this function:

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

Definition at line 746 of file smwidgets.cpp.

{
       if (hasParent_ && !useParentValue_)
       {
              setFont(true);
              fontFamily->insertItem(usePFont_);
              fontStyle->insertItem(usePFont_);
              useParentValue_ = true;
       }
       else if (hasParent_)
              checkStyle();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMFontComboH::setCurrentFont ( const QString &  s)

Definition at line 688 of file smwidgets.cpp.

{
       disconnect(fontFamily, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       disconnect(fontStyle, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       setFont(false);
       hasParent_ = false;
       pFont_ = s;
       FontComboH::setCurrentFont(s);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMFontComboH::setCurrentFont ( const QString &  s,
bool  isParentValue 
)

Definition at line 698 of file smwidgets.cpp.

{
       disconnect(fontFamily, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       disconnect(fontStyle, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       hasParent_ = true;
       pFont_ = s;
       FontComboH::setCurrentFont(s);
       setFont(!isParentValue);
       connect(fontFamily, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
       connect(fontStyle, SIGNAL(highlighted(int)), this, SLOT(currentChanged()));
}

Here is the call graph for this function:

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

Definition at line 738 of file smwidgets.cpp.

{
       QFont f(font());
       f.setBold(wantBold);
       fontFamily->setFont(f);
       fontStyle->setFont(f);
}

Here is the caller graph for this function:

void SMFontComboH::setParentFont ( const QString &  s)

Definition at line 710 of file smwidgets.cpp.

{
       hasParent_ = true;
       pFont_ = s;
}

Here is the caller graph for this function:

Definition at line 716 of file smwidgets.cpp.

{
       bool ret = false;

       if (useParentValue_ && hasParent_)
       {
              ret = fontFamily->currentItem() == (fontFamily->count() - 1) ||
                            fontStyle->currentItem() == (fontStyle->count() - 1);

              if (ret)
              {
                     fontFamily->removeItem(fontFamily->count() - 1);
                     fontStyle->removeItem(fontStyle->count() - 1);
                     setFont(false);
                     setCurrentFont(pFont_, 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 229 of file smwidgets.h.

QString SMFontComboH::pFont_ [private]

Definition at line 231 of file smwidgets.h.

Definition at line 230 of file smwidgets.h.

QString SMFontComboH::usePFont_ [private]

Definition at line 232 of file smwidgets.h.


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