Back to index

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

#include <smwidgets.h>

List of all members.

Public Member Functions

 SMAlignSelect (QWidget *parent)
 ~SMAlignSelect ()
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 105 of file smwidgets.h.


Constructor & Destructor Documentation

SMAlignSelect::SMAlignSelect ( QWidget *  parent)

Definition at line 279 of file smwidgets.cpp.

: AlignSelect(parent),
  hasParent_(false),
  useParentStyle_(false),
  pStyle_(0)
{
       parentButton = new QToolButton(this, "parentButton");
       parentButton->setMaximumSize( QSize( 22, 22 ) );
       parentButton->setToggleButton( true );
       parentButton->setText( tr("P", "P as in Parent"));
       QToolTip::add(parentButton, tr("Use parent style's alignment instead of overriding it"));
       GroupAlignLayout->addWidget( parentButton, 0, 5 );
       resize(minimumSizeHint());
       parentButton->hide();
}

Here is the call graph for this function:

Definition at line 110 of file smwidgets.h.

{}

Member Function Documentation

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

Definition at line 355 of file smwidgets.cpp.

{
       useParentStyle_ = true;
}

Here is the caller graph for this function:

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

Definition at line 339 of file smwidgets.cpp.

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

Here is the caller graph for this function:

Definition at line 323 of file smwidgets.cpp.

{
       hasParent_ = true;
       pStyle_ = i;
}

Here is the caller graph for this function:

Definition at line 295 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(State(int)), this, SLOT(styleChanged()));
       disconnect(parentButton, SIGNAL(pressed()), this, SLOT(pbPressed()));
       setFont(false);
       hasParent_ = false;
       pStyle_ = 0;
       parentButton->hide();
       AlignSelect::setStyle(i);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 306 of file smwidgets.cpp.

{
       disconnect(this, SIGNAL(State(int)), this, SLOT(styleChanged()));
       disconnect(parentButton, SIGNAL(pressed()), this, SLOT(pbPressed()));
       hasParent_ = true;
       pStyle_ = i;
       setFont(!isParentValue);
       if (isParentValue)
              parentButton->hide();
       else
              parentButton->show();

       AlignSelect::setStyle(i);
       connect(this, SIGNAL(State(int)), this, SLOT(styleChanged()));
       connect(parentButton, SIGNAL(pressed()), this, SLOT(pbPressed()));
}

Here is the call graph for this function:

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

Definition at line 346 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 329 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 122 of file smwidgets.h.

Definition at line 119 of file smwidgets.h.

Definition at line 124 of file smwidgets.h.

Definition at line 123 of file smwidgets.h.


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