Back to index

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

#include <smtextstylewidgets.h>

Collaboration diagram for SMCStylePage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SMCStylePage (QWidget *parent=0)
 ~SMCStylePage ()
void show (CharStyle *cstyle, QValueList< CharStyle > &cstyles, const QString &defLang, int unitIndex)
void show (QValueList< CharStyle * > &cstyles, QValueList< CharStyle > &cstylesAll, const QString &defLang, int unitIndex)
void fillLangCombo (QMap< QString, QString > langMap)
void fillColorCombo (ColorList &colors)
void languageChange ()
void clearAll ()

Private Slots

void slotColorChange ()

Private Member Functions

void showSizeAndPosition (const QValueList< CharStyle * > &cstyles)
void showEffects (const QValueList< CharStyle * > &cstyles)
void showColors (const QValueList< CharStyle * > &cstyles)
void showLanguage (const QValueList< CharStyle * > &cstyles, const QString &defLang)
void showParent (const QValueList< CharStyle * > &cstyles)

Private Attributes

QVBoxLayout * basicBoxLayout
QVBoxLayout * advBoxLayout
QVBoxLayout * colorBoxLayout
QHBoxLayout * layout8
QHBoxLayout * layout9a
QHBoxLayout * layout5
QHBoxLayout * layout6
QGridLayout * spinBoxLayout_
QGridLayout * spinBoxLayoutBasic_
SMFontComboHfontFace_
SMStyleSelecteffects_
SMColorCombofillColor_
SMShadeButtonfillShade_
SMColorCombostrokeColor_
SMShadeButtonstrokeShade_
SMScComboBoxlanguage_
SMMSpinBoxfontSize_
SMMSpinBoxfontHScale_
SMMSpinBoxfontVScale_
SMMSpinBoxtracking_
SMMSpinBoxbaselineOffset_
QLabel * fontSizeLabel_
QLabel * hscaleLabel_
QLabel * vscaleLabel_
QLabel * FillIcon
QLabel * pixmapLabel3_20
QLabel * StrokeIcon
QLabel * pixmapLabel3_19
QLabel * trackingLabel_
QLabel * baselineOffsetLabel_
QLabel * languageLabel_
QSpacerItem * spacer1
QSpacerItem * spacer2
QSpacerItem * spacer3
QSpacerItem * spacer4
QMap< QString, QString > langMap_

Friends

class SMParagraphStyle
class SMCharacterStyle

Detailed Description

Definition at line 107 of file smtextstylewidgets.h.


Constructor & Destructor Documentation

SMCStylePage::SMCStylePage ( QWidget *  parent = 0)

Definition at line 644 of file smtextstylewidgets.cpp.

                                          : CStylePBase(parent)
{
       basicGroup->setColumnLayout(0, Qt::Vertical );
       basicGroup->layout()->setSpacing( 0 );
       basicGroup->layout()->setMargin( 0 );
       basicBoxLayout = new QVBoxLayout(basicGroup->layout()); 
       basicBoxLayout->setAlignment( Qt::AlignTop );
       basicBoxLayout->setSpacing( 5 );
       basicBoxLayout->setMargin( 10 );

       fontFace_ = new SMFontComboH(basicGroup);
       basicBoxLayout->addWidget( fontFace_ );
       
       spinBoxLayoutBasic_ = new QGridLayout(1, 9);
       fontSize_ = new SMMSpinBox( 1, 2048, basicGroup, 1 );
       fontSize_->setMinimumSize( QSize( 70, 22 ) );
       fontSize_->setSuffix(unitGetSuffixFromIndex(0));
       fontSizeLabel_ = new QLabel( "" ,basicGroup, "TextF2" );
       fontSizeLabel_->setPixmap(loadIcon("Zeichen.xpm"));
       fontSizeLabel_->setMinimumSize( QSize( 22, 22 ) );
       fontSizeLabel_->setMaximumSize( QSize( 22, 22 ) );
       trackingLabel_ = new QLabel( basicGroup, "pixmapLabel3_3" );
       trackingLabel_->setMinimumSize( QSize( 22, 22 ) );
       trackingLabel_->setMaximumSize( QSize( 22, 22 ) );
       trackingLabel_->setPixmap( loadIcon("textkern.png") );
       tracking_ = new SMMSpinBox( -300, 300, basicGroup, 1 );
       tracking_->setSuffix( tr( " %" ) );
       spinBoxLayoutBasic_->addWidget(fontSizeLabel_, 0, 0);
       spinBoxLayoutBasic_->addMultiCellWidget(fontSize_, 0, 0, 1, 2);
       spinBoxLayoutBasic_->addWidget(trackingLabel_, 0, 3);
       spinBoxLayoutBasic_->addMultiCellWidget(tracking_, 0, 0, 4, 5);
       spacer4 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
       spinBoxLayoutBasic_->addItem( spacer4 );
       basicBoxLayout->addLayout( spinBoxLayoutBasic_ );
       
       layout8 = new QHBoxLayout( 0, 0, 0, "layout8");
       effects_ = new SMStyleSelect(basicGroup);
       layout8->addWidget(effects_);
       spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
       layout8->addItem( spacer2 );

       basicBoxLayout->addLayout( layout8, Qt::AlignLeft );

       advGroup->setColumnLayout(0, Qt::Vertical );
       advGroup->layout()->setSpacing( 0 );
       advGroup->layout()->setMargin( 0 );
       advBoxLayout = new QVBoxLayout(advGroup->layout());     
       advBoxLayout->setAlignment( Qt::AlignTop );
       advBoxLayout->setSpacing( 5 );
       advBoxLayout->setMargin( 10 );
       
       spinBoxLayout_ = new QGridLayout(1, 9);

       baselineOffsetLabel_ = new QLabel( advGroup, "pixmapLabel2" );
       baselineOffsetLabel_->setMinimumSize( QSize( 22, 22 ) );
       baselineOffsetLabel_->setMaximumSize( QSize( 22, 22 ) );
       baselineOffsetLabel_->setPixmap( loadIcon("textbase.png") );

       baselineOffset_ = new SMMSpinBox( -100, 100, advGroup, 1 );
       baselineOffset_->setSuffix( tr( " %" ) );

       spinBoxLayout_->addWidget(baselineOffsetLabel_, 0, 6);
       spinBoxLayout_->addMultiCellWidget(baselineOffset_, 0, 0, 7, 8);

       hscaleLabel_ = new QLabel( "", advGroup, "pixmapLabel3" );
       hscaleLabel_->setMinimumSize( QSize( 22, 22 ) );
       hscaleLabel_->setMaximumSize( QSize( 22, 22 ) );
       hscaleLabel_->setPixmap( loadIcon("textscaleh.png") );

       fontHScale_ = new SMMSpinBox( 10, 400, advGroup, 1 );
       fontHScale_->setSuffix( tr( " %" ) );

       spinBoxLayout_->addWidget(hscaleLabel_, 0, 0);
       spinBoxLayout_->addMultiCellWidget(fontHScale_, 0, 0, 1, 2);

       vscaleLabel_ = new QLabel( "", advGroup, "pixmapLabel3_2" );
       vscaleLabel_->setMinimumSize( QSize( 22, 22 ) );
       vscaleLabel_->setMaximumSize( QSize( 22, 22 ) );
       vscaleLabel_->setPixmap( loadIcon("textscalev.png") );

       fontVScale_ = new SMMSpinBox( 10, 400, advGroup, 1 );
       fontVScale_->setSuffix( tr( " %" ) );

       spinBoxLayout_->addWidget(vscaleLabel_, 0, 3);
       spinBoxLayout_->addMultiCellWidget(fontVScale_, 0, 0, 4, 5);

       spinBoxLayout_->setColStretch(9, 10);

       advBoxLayout->addLayout( spinBoxLayout_, Qt::AlignLeft );
       
       layout9a = new QHBoxLayout( 0, 0, 0, "layout9");
       languageLabel_ = new QLabel( "", advGroup, "languageLabel_" );
       language_ = new SMScComboBox(false, advGroup, "language_");
       layout9a->addWidget(languageLabel_);
       layout9a->addWidget(language_);

       spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
       layout9a->addItem( spacer1 );
       advBoxLayout->addLayout( layout9a, Qt::AlignLeft );
       
       
       
       
       colorGroup->setColumnLayout(0, Qt::Vertical );
       colorGroup->layout()->setSpacing( 0 );
       colorGroup->layout()->setMargin( 0 );
       colorBoxLayout = new QVBoxLayout(colorGroup->layout()); 
       colorBoxLayout->setAlignment( Qt::AlignTop );
       colorBoxLayout->setSpacing( 5 );
       colorBoxLayout->setMargin( 10 );
       
       layout5 = new QHBoxLayout( 0, 0, 5, "layout5");
       FillIcon = new QLabel( "", colorGroup, "FillIcon" );
       FillIcon->setPixmap(loadIcon("16/color-fill.png"));
       layout5->addWidget( FillIcon );

       fillColor_ = new SMColorCombo(colorGroup, "TxFill");
       layout5->addWidget( fillColor_ );

       pixmapLabel3_20 = new QLabel( colorGroup, "pixmapLabel3_20" );
       pixmapLabel3_20->setMinimumSize( QSize( 22, 22 ) );
       pixmapLabel3_20->setMaximumSize( QSize( 22, 22 ) );
       pixmapLabel3_20->setPixmap( loadIcon("shade.png") );
       layout5->addWidget( pixmapLabel3_20 );

       fillShade_ = new SMShadeButton(colorGroup);
       layout5->addWidget( fillShade_ );
       QSpacerItem* spacer3 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
       layout5->addItem( spacer3 );
       colorBoxLayout->addLayout( layout5 );

       layout6 = new QHBoxLayout( 0, 0, 5, "layout6");
       StrokeIcon = new QLabel( "", colorGroup, "StrokeIcon" );
       StrokeIcon->setPixmap(loadIcon("16/color-stroke.png"));
       layout6->addWidget( StrokeIcon );

       strokeColor_ = new SMColorCombo(colorGroup, "TxStroke");
       layout6->addWidget( strokeColor_ );

       pixmapLabel3_19 = new QLabel( "", colorGroup, "pixmapLabel3_19" );
       pixmapLabel3_19->setMinimumSize( QSize( 22, 22 ) );
       pixmapLabel3_19->setMaximumSize( QSize( 22, 22 ) );
       pixmapLabel3_19->setPixmap( loadIcon("shade.png") );
       layout6->addWidget( pixmapLabel3_19 );

       strokeShade_ = new SMShadeButton(colorGroup);
       layout6->addWidget( strokeShade_ );

       spacer3 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
       layout6->addItem( spacer3 );
       colorBoxLayout->addLayout( layout6 );

       fillColor_->clear();
       strokeColor_->clear();
       ColorList::Iterator it;
       QPixmap pm = QPixmap(15, 15);
       fillColor_->insertItem(CommonStrings::tr_NoneColor);
       strokeColor_->insertItem(CommonStrings::tr_NoneColor);
       StrokeIcon->setEnabled(false);
       strokeShade_->setEnabled(false);
       strokeColor_->setEnabled(false);

       connect(effects_, SIGNAL(State(int)), this, SLOT(slotColorChange()));
}

Here is the call graph for this function:

Definition at line 1268 of file smtextstylewidgets.cpp.

{
       
}

Member Function Documentation

Definition at line 1249 of file smtextstylewidgets.cpp.

{
       
}
void SMCStylePage::fillColorCombo ( ColorList &  colors)

Definition at line 859 of file smtextstylewidgets.cpp.

{
       fillColor_->clear();
       strokeColor_->clear();

       fillColor_->insertItem(CommonStrings::tr_NoneColor);
       strokeColor_->insertItem(CommonStrings::tr_NoneColor);
       ColorList::Iterator itend=colors.end();
       ScribusDoc* doc = colors.document();
       for (ColorList::Iterator it = colors.begin(); it != itend; ++it)
       {
              fillColor_->insertSmallItem(it.data(), doc, it.key());
              strokeColor_->insertSmallItem(it.data(), doc, it.key());
       }
       fillColor_->listBox()->setMinimumWidth(fillColor_->listBox()->maxItemWidth()+24);
       strokeColor_->listBox()->setMinimumWidth(strokeColor_->listBox()->maxItemWidth()+24);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::fillLangCombo ( QMap< QString, QString >  langMap)

Definition at line 843 of file smtextstylewidgets.cpp.

{
       QStringList sortList;
       QMap<QString,QString>::Iterator it;

       langMap_ = langMap;

       language_->clear();

       for (it = langMap.begin(); it != langMap.end(); ++it)
              sortList.push_back(it.data());

       language_->insertStringList(sortQStringList(sortList));
       language_->listBox()->setMinimumWidth(language_->listBox()->maxItemWidth() + 24);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 809 of file smtextstylewidgets.cpp.

{
/***********************************/
/*      Begin Tooltips             */
/***********************************/
// These are for the character style page
// as in character styles and in paragraph style's character style

       QToolTip::add(parentCombo,     tr("Parent style"));
       QToolTip::add(fontFace_,       tr("Font face"));
       QToolTip::add(fontSize_,       tr("Font size"));
       QToolTip::add(tracking_,       tr("Tracking"));
       QToolTip::add(baselineOffset_, tr("Baseline offset"));
       QToolTip::add(fontHScale_,     tr("Horizontal scaling"));
       QToolTip::add(fontVScale_,     tr("Vertical scaling"));
       QToolTip::add(language_,       tr("Language"));
       QToolTip::add(fillColor_,      tr("Fill color"));
       QToolTip::add(fillShade_,      tr("Fill shade"));
       QToolTip::add(strokeColor_,    tr("Stroke color"));
       QToolTip::add(strokeShade_,    tr("Stroke shade"));

/***********************************/
/*        End Tooltips             */
/***********************************/

       parentLabel->setText( tr("Based On:"));
       languageLabel_->setText( tr("Language:"));
       fontVScale_->setSuffix( tr(" %"));
       fontHScale_->setSuffix( tr(" %"));
       baselineOffset_->setSuffix( tr(" %"));
       tracking_->setSuffix( tr(" %"));
       fontSize_->setSuffix(unitGetSuffixFromIndex(0));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::show ( CharStyle *  cstyle,
QValueList< CharStyle > &  cstyles,
const QString &  defLang,
int  unitIndex 
)

Definition at line 877 of file smtextstylewidgets.cpp.

{
       disconnect(effects_, SIGNAL(State(int)), this, SLOT(slotColorChange()));
       parentCombo->setEnabled(true);
       const CharStyle *parent = dynamic_cast<const CharStyle*>(cstyle->parentStyle());
       bool hasParent =  cstyle->hasParent() && parent != 0 && parent->hasName() && cstyle->parent() != "";
       if (hasParent)
       {
              fontSize_->setValue(cstyle->fontSize() / 10.0, cstyle->isInhFontSize());
              fontSize_->setParentValue(parent->fontSize() / 10.0);

              fontHScale_->setValue(cstyle->scaleH() / 10.0, cstyle->isInhScaleH());
              fontHScale_->setParentValue(parent->scaleH() / 10.0);

              fontVScale_->setValue(cstyle->scaleV() / 10.0, cstyle->isInhScaleV());
              fontVScale_->setParentValue(parent->scaleV() / 10.0);

              baselineOffset_->setValue(cstyle->baselineOffset() / 10.0, cstyle->isInhBaselineOffset());
              baselineOffset_->setParentValue(parent->baselineOffset() / 10.0);

              tracking_->setValue(cstyle->tracking() / 10.0, cstyle->isInhTracking());
              tracking_->setParentValue(parent->tracking() / 10.0);

              effects_->setStyle(static_cast<int>(cstyle->effects()), cstyle->isInhFeatures());
              effects_->setParentItem(static_cast<int>(parent->effects())); // FIXME

              fillShade_->setValue(cstyle->fillShade(), cstyle->isInhFillShade());
              fillShade_->setParentValue(parent->fillShade());

              strokeShade_->setValue(cstyle->strokeShade(), cstyle->isInhStrokeShade());
              strokeShade_->setParentValue(parent->strokeShade());

              fillColor_->setCurrentText(cstyle->fillColor(), cstyle->isInhFillColor());
              fillColor_->setParentText(parent->fillColor());

              strokeColor_->setCurrentText(cstyle->strokeColor(), cstyle->isInhStrokeColor());
              strokeColor_->setParentText(parent->strokeColor());

              fontFace_->setCurrentFont(cstyle->font().scName(), cstyle->isInhFont());
              fontFace_->setParentFont(parent->font().scName());
       }
       else
       {
              fontSize_->setValue(cstyle->fontSize() / 10.0);
              fontHScale_->setValue(cstyle->scaleH() / 10.0);
              fontVScale_->setValue(cstyle->scaleV() / 10.0);
              baselineOffset_->setValue(cstyle->baselineOffset() / 10.0);
              tracking_->setValue(cstyle->tracking() / 10.0);
              effects_->setStyle(static_cast<int>(cstyle->effects()));
              fillShade_->setValue(cstyle->fillShade());
              strokeShade_->setValue(cstyle->strokeShade());
              fillColor_->setCurrentText(cstyle->fillColor());
              strokeColor_->setCurrentText(cstyle->strokeColor());
              fontFace_->setCurrentFont(cstyle->font().scName());
       }

       effects_->ShadowVal->Xoffset->setValue(cstyle->shadowXOffset() / 10.0);
       effects_->ShadowVal->Yoffset->setValue(cstyle->shadowYOffset() / 10.0);
       effects_->OutlineVal->LWidth->setValue(cstyle->outlineWidth() / 10.0);
       effects_->StrikeVal->LPos->setValue(cstyle->strikethruOffset() / 10.0);
       effects_->StrikeVal->LWidth->setValue(cstyle->strikethruWidth() / 10.0);
       effects_->UnderlineVal->LPos->setValue(cstyle->underlineOffset() / 10.0);
       effects_->UnderlineVal->LWidth->setValue(cstyle->underlineWidth() / 10.0);
       slotColorChange();

       parentCombo->clear();
       parentCombo->insertItem("");
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (cstyles[i].name() != cstyle->name())
                     parentCombo->insertItem(cstyles[i].name());
       }

       if (hasParent)
       {
              int index = 0;
              for (int i = 0; i < parentCombo->count(); ++i)
              {
                     if (parentCombo->text(i) == cstyle->parentStyle()->name())
                     {
                            index = i;
                            break;
                     }
              }
              parentCombo->setCurrentItem(index);
       }
       else
              parentCombo->setCurrentItem(0);

       QString clang = cstyle->language().isNull() || cstyle->language().isEmpty() ?
                                             defLang : cstyle->language();
       QString plang(QString::null);
       if (hasParent)
              plang = parent->language().isNull() || parent->language().isEmpty() ?
                                            defLang : parent->language();

       int ci = -1, pi = -1, di = -1;
       for (int i = 0; i < language_->count(); ++i)
       {
              if (language_->text(i) == langMap_[clang])
                     ci = i;
              
              if (hasParent && language_->text(i) == langMap_[plang])
                     pi = i;

              if (language_->text(i) == defLang || language_->text(i) == langMap_[defLang])
                     di = i;
       }

       Q_ASSERT(di != -1);

       if (hasParent)
       {
              if (ci == -1)
                     language_->setCurrentItem(di, cstyle->isInhLanguage());
              else
                     language_->setCurrentItem(ci, cstyle->isInhLanguage());

              language_->setParentItem(pi);
       }
       else
       {
              if (ci == -1)
                     language_->setCurrentItem(di);
              else
                     language_->setCurrentItem(ci);
       }

       connect(effects_, SIGNAL(State(int)), this, SLOT(slotColorChange()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::show ( QValueList< CharStyle * > &  cstyles,
QValueList< CharStyle > &  cstylesAll,
const QString &  defLang,
int  unitIndex 
)

Definition at line 1008 of file smtextstylewidgets.cpp.

{
//     int decimals = unitGetDecimalsFromIndex(unitIndex);
//     QString suffix = unitGetSuffixFromIndex(unitIndex);

       if (cstyles.count() == 1)
              show(cstyles[0], cstylesAll, defLang, unitIndex);
       else if (cstyles.count() > 1)
       {
              showSizeAndPosition(cstyles);
              showEffects(cstyles);
              showColors(cstyles);
              showLanguage(cstyles, defLang);
              showParent(cstyles);
       }
}

Here is the call graph for this function:

void SMCStylePage::showColors ( const QValueList< CharStyle * > &  cstyles) [private]

Definition at line 1136 of file smtextstylewidgets.cpp.

{
       strokeShade_->setEnabled(true);
       strokeColor_->setEnabled(true);

       int d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->fillShade() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->fillShade();
       }
       if (d == -30000)
              fillShade_->setText( tr("Shade"));
       else
              fillShade_->setValue(d);

       d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->strokeShade() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->strokeShade();
       }
       if (d == -30000)
       {
              strokeShade_->setValue(21);
              strokeShade_->setText( tr("Shade"));
       }
       else
              strokeShade_->setValue(d);

       QString s(QString::null);
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (!s.isNull() && s != cstyles[i]->fillColor())
              {
                     s = QString::null;
                     break;
              }
              else
                     s = cstyles[i]->fillColor();
       }
       if (s.isNull())
       {
              if (fillColor_->text(fillColor_->count() - 1) != "")
                     fillColor_->insertItem("");
              fillColor_->setCurrentItem(fillColor_->count() - 1);
       }
       else
              fillColor_->setCurrentText(s);

       s = QString::null;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (!s.isNull() && s != cstyles[i]->strokeColor())
              {
                     s = QString::null;
                     break;
              }
              else
                     s = cstyles[i]->strokeColor();
       }
       if (s.isNull())
       {
              if (strokeColor_->text(strokeColor_->count() - 1) != "")
                     strokeColor_->insertItem("");
              strokeColor_->setCurrentItem(fillColor_->count() - 1);
       }
       else
              strokeColor_->setCurrentText(s);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::showEffects ( const QValueList< CharStyle * > &  cstyles) [private]

Definition at line 1108 of file smtextstylewidgets.cpp.

{
       int d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && static_cast<int>(cstyles[i]->effects()) != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = static_cast<int>(cstyles[i]->effects());
       }
       if (d == -30000)
              effects_->setStyle(0);
       else
              effects_->setStyle(d);

//     TODO these things still missing:
//            effects_->ShadowVal->Xoffset->setValue(cstyle->shadowXOffset() / 10.0);
//            effects_->ShadowVal->Yoffset->setValue(cstyle->shadowYOffset() / 10.0);
//            effects_->OutlineVal->LWidth->setValue(cstyle->outlineWidth() / 10.0);
//            effects_->StrikeVal->LPos->setValue(cstyle->strikethruOffset() / 10.0);
//            effects_->StrikeVal->LWidth->setValue(cstyle->strikethruWidth() / 10.0);
//            effects_->UnderlineVal->LPos->setValue(cstyle->underlineOffset() / 10.0);
//            effects_->UnderlineVal->LWidth->setValue(cstyle->underlineWidth() / 10.0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::showLanguage ( const QValueList< CharStyle * > &  cstyles,
const QString &  defLang 
) [private]

Definition at line 1217 of file smtextstylewidgets.cpp.

{
       QString s(cstyles[0]->language());
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (s != cstyles[i]->language())
              {
                     s = QString::null;
                     break;
              }
              else
                     s = cstyles[i]->language();
       }

       if (s.isNull())
       {
              if (language_->text(language_->count() - 1) != "")
                     language_->insertItem("");
              language_->setCurrentItem(language_->count() - 1);
       }
       else
       {
              Q_ASSERT(langMap_.contains(s));
              language_->setCurrentText(langMap_[s]);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::showParent ( const QValueList< CharStyle * > &  cstyles) [private]

Definition at line 1244 of file smtextstylewidgets.cpp.

{
       parentCombo->setEnabled(false);
}

Here is the caller graph for this function:

void SMCStylePage::showSizeAndPosition ( const QValueList< CharStyle * > &  cstyles) [private]

Definition at line 1025 of file smtextstylewidgets.cpp.

{
       int d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->fontSize() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->fontSize();
       }
       if (d == -30000)
              fontSize_->clear();
       else
              fontSize_->setValue(d / 10.0);

       d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->scaleH() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->scaleH();
       }
       if (d == -30000)
              fontHScale_->clear();
       else
              fontHScale_->setValue(d / 10.0);

       d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->scaleV() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->scaleV();
       }
       if (d == -30000)
              fontVScale_->clear();
       else
              fontVScale_->setValue(d / 10.0);

       d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->baselineOffset() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->baselineOffset();
       }
       if (d == -30000)
              baselineOffset_->clear();
       else
              baselineOffset_->setValue(d / 10.0);

       d = -30000;
       for (uint i = 0; i < cstyles.count(); ++i)
       {
              if (d != -30000 && cstyles[i]->tracking() != d)
              {
                     d = -30000;
                     break;
              }
              else
                     d = cstyles[i]->tracking();
       }
       if (d == -30000)
              tracking_->clear();
       else
              tracking_->setValue(d / 10.0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMCStylePage::slotColorChange ( ) [private, slot]

Definition at line 1254 of file smtextstylewidgets.cpp.

{
       int s = effects_->getStyle();
       bool enabled;
       if ((s & 4) || (s & 256))
              enabled = true;
       else
              enabled = false;
       StrokeIcon->setEnabled(enabled);
       strokeShade_->setEnabled(enabled);
       strokeColor_->setEnabled(enabled);
}

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class SMCharacterStyle [friend]

Definition at line 171 of file smtextstylewidgets.h.

friend class SMParagraphStyle [friend]

Definition at line 170 of file smtextstylewidgets.h.


Member Data Documentation

QVBoxLayout* SMCStylePage::advBoxLayout [private]

Definition at line 123 of file smtextstylewidgets.h.

Definition at line 144 of file smtextstylewidgets.h.

Definition at line 154 of file smtextstylewidgets.h.

QVBoxLayout* SMCStylePage::basicBoxLayout [private]

Definition at line 122 of file smtextstylewidgets.h.

QVBoxLayout* SMCStylePage::colorBoxLayout [private]

Definition at line 124 of file smtextstylewidgets.h.

Definition at line 133 of file smtextstylewidgets.h.

Definition at line 134 of file smtextstylewidgets.h.

QLabel* SMCStylePage::FillIcon [private]

Definition at line 149 of file smtextstylewidgets.h.

Definition at line 135 of file smtextstylewidgets.h.

Definition at line 132 of file smtextstylewidgets.h.

Definition at line 141 of file smtextstylewidgets.h.

Definition at line 140 of file smtextstylewidgets.h.

QLabel* SMCStylePage::fontSizeLabel_ [private]

Definition at line 146 of file smtextstylewidgets.h.

Definition at line 142 of file smtextstylewidgets.h.

QLabel* SMCStylePage::hscaleLabel_ [private]

Definition at line 147 of file smtextstylewidgets.h.

QMap<QString, QString> SMCStylePage::langMap_ [private]

Definition at line 162 of file smtextstylewidgets.h.

Definition at line 138 of file smtextstylewidgets.h.

QLabel* SMCStylePage::languageLabel_ [private]

Definition at line 155 of file smtextstylewidgets.h.

QHBoxLayout* SMCStylePage::layout5 [private]

Definition at line 127 of file smtextstylewidgets.h.

QHBoxLayout* SMCStylePage::layout6 [private]

Definition at line 128 of file smtextstylewidgets.h.

QHBoxLayout* SMCStylePage::layout8 [private]

Definition at line 125 of file smtextstylewidgets.h.

QHBoxLayout* SMCStylePage::layout9a [private]

Definition at line 126 of file smtextstylewidgets.h.

QLabel* SMCStylePage::pixmapLabel3_19 [private]

Definition at line 152 of file smtextstylewidgets.h.

QLabel* SMCStylePage::pixmapLabel3_20 [private]

Definition at line 150 of file smtextstylewidgets.h.

QSpacerItem* SMCStylePage::spacer1 [private]

Definition at line 157 of file smtextstylewidgets.h.

QSpacerItem* SMCStylePage::spacer2 [private]

Definition at line 158 of file smtextstylewidgets.h.

QSpacerItem* SMCStylePage::spacer3 [private]

Definition at line 159 of file smtextstylewidgets.h.

QSpacerItem* SMCStylePage::spacer4 [private]

Definition at line 160 of file smtextstylewidgets.h.

QGridLayout* SMCStylePage::spinBoxLayout_ [private]

Definition at line 129 of file smtextstylewidgets.h.

QGridLayout* SMCStylePage::spinBoxLayoutBasic_ [private]

Definition at line 130 of file smtextstylewidgets.h.

Definition at line 136 of file smtextstylewidgets.h.

QLabel* SMCStylePage::StrokeIcon [private]

Definition at line 151 of file smtextstylewidgets.h.

Definition at line 137 of file smtextstylewidgets.h.

Definition at line 143 of file smtextstylewidgets.h.

QLabel* SMCStylePage::trackingLabel_ [private]

Definition at line 153 of file smtextstylewidgets.h.

QLabel* SMCStylePage::vscaleLabel_ [private]

Definition at line 148 of file smtextstylewidgets.h.


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