Back to index

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

#include <smwidgets.h>

List of all members.

Public Member Functions

 SMStyleSelect (QWidget *parent)
 ~SMStyleSelect ()
void setStyle (int i)
void setStyle (int i, bool isParentValue)
void setParentItem (int i)
bool useParentValue ()

Public Attributes

QToolButton * parentButton

Private Slots

void styleChanged ()
void pbPressed ()

Private Member Functions

void setFont (bool wantBold)

Private Attributes

bool hasParent_
bool useParentStyle_
int pStyle_

Detailed Description

Definition at line 132 of file smwidgets.h.


Constructor & Destructor Documentation

SMStyleSelect::SMStyleSelect ( QWidget *  parent)

Definition at line 363 of file smwidgets.cpp.

: StyleSelect(parent),
  hasParent_(false),
  useParentStyle_(false),
  pStyle_(0)
{
       parentButton = new QToolButton(this, "parentButton");
       parentButton->setMaximumSize(QSize(22, 22));
       parentButton->setMinimumSize(QSize(22, 22));
       parentButton->setText( tr("P", "P as in Parent"));
       QToolTip::add(parentButton, tr("Use parent style's effects instead of overriding them"));
       ssLayout->addWidget(parentButton);
       resize(minimumSizeHint());
       parentButton->hide();
}

Here is the call graph for this function:

Definition at line 137 of file smwidgets.h.

{}

Member Function Documentation

void SMStyleSelect::pbPressed ( ) [private, slot]

Definition at line 468 of file smwidgets.cpp.

{
       useParentStyle_ = true;
       emit State(getStyle());
}

Here is the caller graph for this function:

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

Definition at line 444 of file smwidgets.cpp.

{
       QFont f(font());
       f.setBold(wantBold);
       parentButton->setFont(f);
       ShadowVal->Xoffset->setFont(f);
       ShadowVal->Yoffset->setFont(f);
       OutlineVal->LWidth->setFont(f);
       UnderlineVal->LPos->setFont(f);
       UnderlineVal->LWidth->setFont(f);
       StrikeVal->LPos->setFont(f);
       StrikeVal->LWidth->setFont(f);
       StyleSelect::setFont(f);
}

Here is the caller graph for this function:

Definition at line 428 of file smwidgets.cpp.

{
       hasParent_ = true;
       pStyle_ = i;
}

Here is the caller graph for this function:

Definition at line 379 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(State(int)), this, SLOT(styleChanged()));
       disconnect(ShadowVal->Xoffset, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(ShadowVal->Yoffset, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(OutlineVal->LWidth, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(UnderlineVal->LPos, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(UnderlineVal->LWidth, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(StrikeVal->LPos, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
       disconnect(StrikeVal->LWidth, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
       disconnect(parentButton, SIGNAL(pressed()), this, SLOT(pbPressed()));
       setFont(false);
       hasParent_ = false;
       pStyle_ = 0;
       parentButton->hide();
       StyleSelect::setStyle(i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMStyleSelect::setStyle ( int  i,
bool  isParentValue 
)

Definition at line 397 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(State(int)), this, SLOT(styleChanged()));
       disconnect(ShadowVal->Xoffset, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(ShadowVal->Yoffset, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(OutlineVal->LWidth, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(UnderlineVal->LPos, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(UnderlineVal->LWidth, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       disconnect(StrikeVal->LPos, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
       disconnect(StrikeVal->LWidth, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
       disconnect(parentButton, SIGNAL(pressed()), this, SLOT(pbPressed()));
       hasParent_ = true;
       pStyle_ = i;
       setFont(!isParentValue);
       if (isParentValue)
              parentButton->hide();
       else
              parentButton->show();
       parentButton->setOn(true);
       StyleSelect::setStyle(i);
       connect(this, SIGNAL(State(int)), this, SLOT(styleChanged()));
       connect(ShadowVal->Xoffset, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       connect(ShadowVal->Yoffset, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       connect(OutlineVal->LWidth, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       connect(UnderlineVal->LPos, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       connect(UnderlineVal->LWidth, SIGNAL(valueChanged(int)),this, SLOT(styleChanged()));
       connect(StrikeVal->LPos, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
       connect(StrikeVal->LWidth, SIGNAL(valueChanged(int)), this, SLOT(styleChanged()));
       connect(parentButton, SIGNAL(pressed()), this, SLOT(pbPressed()));
}

Here is the call graph for this function:

void SMStyleSelect::styleChanged ( ) [private, slot]

Definition at line 459 of file smwidgets.cpp.

{
       if (hasParent_)
       {
              setFont(true);
              parentButton->show();
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 434 of file smwidgets.cpp.

{
       bool ret = useParentStyle_;
       useParentStyle_ = false;
       if (ret)
              setStyle(pStyle_, true);

       return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 149 of file smwidgets.h.

Definition at line 146 of file smwidgets.h.

Definition at line 151 of file smwidgets.h.

Definition at line 150 of file smwidgets.h.


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