Back to index

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

#include <smtextstylewidgets.h>

Collaboration diagram for SMPStyleWidget:
Collaboration graph
[legend]

List of all members.

Signals

void useParentDropCap ()

Public Member Functions

 SMPStyleWidget ()
 ~SMPStyleWidget ()
void show (ParagraphStyle *pstyle, QValueList< ParagraphStyle > &pstyles, QValueList< CharStyle > &cstyles, int unitIndex, const QString &defLang)
void show (QValueList< ParagraphStyle * > &pstyles, QValueList< ParagraphStyle > &pstylesAll, QValueList< CharStyle > &cstyles, int unitIndex, const QString &defLang)
void clearAll ()
void languageChange ()
void unitChange (double oldRatio, double newRatio, int unitIndex)

Private Slots

void slotLineSpacingModeChanged (int)
void slotDropCap (bool isOn)
void slotParentDropCap ()

Private Member Functions

void setupDistances ()
void setupDropCaps ()
void setupTabs ()
void setupCharStyle ()
void showLineSpacing (QValueList< ParagraphStyle * > &pstyles)
void showSpaceAB (QValueList< ParagraphStyle * > &pstyles, int unitIndex)
void showDropCap (QValueList< ParagraphStyle * > &pstyles, int unitIndex)
void showAlignment (QValueList< ParagraphStyle * > &pstyles)
void showTabs (QValueList< ParagraphStyle * > &pstyles, int unitIndex)
void showCStyle (QValueList< ParagraphStyle * > &pstyles, QValueList< CharStyle > &cstyles, const QString &defLang, int unitIndex)
void showParent (QValueList< ParagraphStyle * > &pstyles)

Private Attributes

QGridLayout * distancesBoxLayout
QGridLayout * dropCapsBoxLayout
QVBoxLayout * tabsBoxLayout
SMScComboBoxlineSpacingMode_
QLabel * pixmapLabel0
QLabel * pixmapLabel1
QLabel * pixmapLabel2
QLabel * pixmapLabel3
QLabel * pixmapLabel4
QLabel * capLabel1
QLabel * capLabel2
SMMSpinBoxlineSpacing_
SMMSpinBoxspaceAbove_
SMMSpinBoxspaceBelow_
SMSpinBoxdropCapLines_
SMMSpinBoxdropCapOffset_
SMAlignSelectalignement_
SMTabrulertabList_
SMCStylePagecpage
bool hasParent_
bool parentDropCap_

Friends

class SMParagraphStyle

Detailed Description

Definition at line 39 of file smtextstylewidgets.h.


Constructor & Destructor Documentation

Definition at line 36 of file smtextstylewidgets.cpp.

Here is the call graph for this function:

Definition at line 636 of file smtextstylewidgets.cpp.

{
       
}

Member Function Documentation

Definition at line 602 of file smtextstylewidgets.cpp.

{

}

Definition at line 96 of file smtextstylewidgets.cpp.

{
/***********************************/
/*      Begin Tooltips             */
/***********************************/
// These are for the paragraph style

       QToolTip::add(parentCombo,      tr("Parent Style"));
       QToolTip::add(lineSpacingMode_, tr("Line Spacing Mode"));
       QToolTip::add(lineSpacing_,     tr("Line Spacing"));
       QToolTip::add(spaceAbove_,      tr("Space Above"));
       QToolTip::add(spaceBelow_,      tr("Space Below"));
       //CB Unneeded, gets in the way of single widget tooltips
       //QToolTip::add(dropCapsBox,      tr("Enable or disable drop cap"));
       QToolTip::add(dropCapLines_,    tr("Drop Cap Lines"));
       QToolTip::add(dropCapOffset_,   tr("Drop Cap Offset"));
       QToolTip::add(alignement_,      tr("Alignment"));
       QToolTip::add(tabList_->first_, tr("First Line Indent"));
       QToolTip::add(tabList_->left_,  tr("Left Indent"));
       QToolTip::add(tabList_->right_, tr("Right Indent"));
       //CB Unneeded, gets in the way of single widget tooltips 
       //QToolTip::add(tabList_,         tr("Tabulators"));

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

       lineSpacingMode_->clear();
       lineSpacingMode_->insertItem( tr("Fixed Linespacing"));
       lineSpacingMode_->insertItem( tr("Automatic Linespacing"));
       lineSpacingMode_->insertItem( tr("Align to Baseline Grid"));
       lineSpacing_->setSuffix(unitGetSuffixFromIndex(0));
       spaceAbove_->setSuffix(unitGetSuffixFromIndex(0));
       spaceBelow_->setSuffix(unitGetSuffixFromIndex(0));
       parentLabel->setText( tr("Based On:"));
       distancesBox->setTitle( tr("Distances and Alignment"));
       dropCapsBox->setTitle( tr("Drop Caps"));
       tabsBox->setTitle( tr("Tabulators and Indentation"));
       tabWidget->setTabLabel(tabWidget->page(0), tr("Properties"));
       tabWidget->setTabLabel(tabWidget->page(1), tr("Character Style"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::setupCharStyle ( ) [private]

Definition at line 187 of file smtextstylewidgets.cpp.

{
       QHBoxLayout *la = new QHBoxLayout(characterBox, 0, 0, "la");
       cpage = new SMCStylePage(characterBox);
       la->addWidget(cpage);
       characterBox->setEnabled(true);
}

Here is the caller graph for this function:

void SMPStyleWidget::setupDistances ( ) [private]

Definition at line 44 of file smtextstylewidgets.cpp.

{
       distancesBox->setColumnLayout(0, Qt::Vertical );
       distancesBox->layout()->setSpacing( 0 );
       distancesBox->layout()->setMargin( 0 );
       distancesBoxLayout = new QGridLayout( distancesBox->layout() );
       distancesBoxLayout->setAlignment( Qt::AlignTop );
       distancesBoxLayout->setSpacing( 5 );
       distancesBoxLayout->setMargin( 10 );

       pixmapLabel0 = new QLabel(distancesBox, "pixmapLabel0");
       pixmapLabel0->setMinimumSize(QSize(22,22));
       pixmapLabel0->setMaximumSize(QSize(22,22));
       pixmapLabel0->setPixmap(loadIcon("linespacing2.png"));
       distancesBoxLayout->addWidget(pixmapLabel0, 0, 0);
       
       lineSpacingMode_ = new SMScComboBox(distancesBox, "linespacingCombo");
       lineSpacingMode_->insertItem( tr("Fixed Linespacing"));
       lineSpacingMode_->insertItem( tr("Automatic Linespacing"));
       lineSpacingMode_->insertItem( tr("Align to Baseline Grid"));
       distancesBoxLayout->addMultiCellWidget(lineSpacingMode_, 0, 0, 1, 2);
       connect(lineSpacingMode_, SIGNAL(highlighted(int)), this, SLOT(slotLineSpacingModeChanged(int)));

       lineSpacing_ = new SMMSpinBox(1, 300, distancesBox, 1 );
       lineSpacing_->setSuffix(unitGetSuffixFromIndex(0));
       distancesBoxLayout->addWidget(lineSpacing_, 0, 3);

       pixmapLabel3 = new QLabel( "", distancesBox, "TextLabel1_2_2" );
       pixmapLabel3->setPixmap( loadIcon("above.png") );
       distancesBoxLayout->addWidget( pixmapLabel3, 1, 0 );

       spaceAbove_ = new SMMSpinBox( 0, 300, distancesBox, 1 );
       spaceAbove_->setSuffix(unitGetSuffixFromIndex(0));
       distancesBoxLayout->addWidget( spaceAbove_, 1, 1 );

       pixmapLabel4 = new QLabel( "", distancesBox, "TextLabel1_2_3" );
       pixmapLabel4->setPixmap( loadIcon("below.png") );
       distancesBoxLayout->addWidget( pixmapLabel4, 2, 0 );

       spaceBelow_ = new SMMSpinBox( 0, 300, distancesBox, 1 );
       spaceBelow_->setSuffix(unitGetSuffixFromIndex(0));
       distancesBoxLayout->addWidget( spaceBelow_, 2, 1 );

       alignement_ = new SMAlignSelect(distancesBox);
       distancesBoxLayout->addMultiCellWidget(alignement_, 3,3,0,3);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::setupDropCaps ( ) [private]

Definition at line 148 of file smtextstylewidgets.cpp.

{
       dropCapsBox->setCheckable( true );
       dropCapsBox->setColumnLayout(0, Qt::Vertical );
       dropCapsBox->layout()->setSpacing( 5 );
       dropCapsBox->layout()->setMargin( 10 );

       dropCapsBoxLayout = new QGridLayout(dropCapsBox->layout());
       dropCapsBoxLayout->setAlignment(Qt::AlignTop);

       dropCapLines_ = new SMSpinBox(dropCapsBox, "DropLines");
       dropCapLines_->setMinValue(2);
       dropCapLines_->setMaxValue(20);
       capLabel1 = new QLabel(dropCapLines_, tr("&Lines:"), dropCapsBox, "CapLabel");
       dropCapsBoxLayout->addWidget(capLabel1, 0, 0);
       dropCapsBoxLayout->addWidget(dropCapLines_, 0, 1);

       dropCapOffset_ = new SMMSpinBox(-3000, 3000, dropCapsBox, 1);
       dropCapOffset_->setSuffix(unitGetSuffixFromIndex(0));
       capLabel2 = new QLabel(dropCapLines_, tr("Distance from Text:"), dropCapsBox, "CapLabel2");
       dropCapsBoxLayout->addWidget(capLabel2, 1, 0);
       dropCapsBoxLayout->addWidget(dropCapOffset_, 1, 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::setupTabs ( ) [private]

Definition at line 172 of file smtextstylewidgets.cpp.

{
       tabsBox->setColumnLayout(0, Qt::Vertical );
       tabsBox->layout()->setSpacing( 0 );
       tabsBox->layout()->setMargin( 0 );

       tabsBoxLayout = new QVBoxLayout(tabsBox->layout());
       tabsBoxLayout->setAlignment( Qt::AlignTop );
       tabsBoxLayout->setSpacing( 5 );
       tabsBoxLayout->setMargin( 10 );

       tabList_ = new SMTabruler(tabsBox);
       tabsBoxLayout->addWidget( tabList_ );
}

Here is the caller graph for this function:

void SMPStyleWidget::show ( ParagraphStyle *  pstyle,
QValueList< ParagraphStyle > &  pstyles,
QValueList< CharStyle > &  cstyles,
int  unitIndex,
const QString &  defLang 
)

Definition at line 195 of file smtextstylewidgets.cpp.

{
       double unitRatio = unitGetRatioFromIndex(unitIndex);
       parentCombo->setEnabled(true);
       const ParagraphStyle *parent = dynamic_cast<const ParagraphStyle*>(pstyle->parentStyle());
       hasParent_ = pstyle->hasParent() && parent != NULL && parent->hasName() && pstyle->parent() != "";

       lineSpacingMode_->clear();
       lineSpacingMode_->insertItem( tr("Fixed Linespacing"));
       lineSpacingMode_->insertItem( tr("Automatic Linespacing"));
       lineSpacingMode_->insertItem( tr("Align to Baseline Grid"));

       if (hasParent_)
       {
              lineSpacingMode_->setCurrentItem(pstyle->lineSpacingMode(), pstyle->isInhLineSpacingMode());
              lineSpacingMode_->setParentItem(parent->lineSpacingMode());

              lineSpacing_->setValue(pstyle->lineSpacing(), pstyle->isInhLineSpacing());
              lineSpacing_->setParentValue(parent->lineSpacing());

              spaceAbove_->setValue(pstyle->gapBefore() * unitRatio, pstyle->isInhGapBefore());
              spaceAbove_->setParentValue(parent->gapBefore() * unitRatio);

              spaceBelow_->setValue(pstyle->gapAfter() * unitRatio, pstyle->isInhGapAfter());
              spaceBelow_->setParentValue(parent->gapAfter() * unitRatio);

              dropCapsBox->setChecked(pstyle->hasDropCap());;
              parentDropCap_ = parent->hasDropCap();
              if (pstyle->isInhHasDropCap())
                     parentDropCapButton->hide();
              else
                     parentDropCapButton->show();

              connect(parentDropCapButton, SIGNAL(clicked()), this, SLOT(slotParentDropCap()));

              dropCapLines_->setValue(pstyle->dropCapLines(), pstyle->isInhDropCapLines());
              dropCapLines_->setParentValue(parent->dropCapLines());

              dropCapOffset_->setValue(pstyle->dropCapOffset() * unitRatio, pstyle->isInhDropCapOffset());
              dropCapOffset_->setParentValue(parent->dropCapOffset() * unitRatio);

              alignement_->setStyle(pstyle->alignment(), pstyle->isInhAlignment());
              alignement_->setParentItem(parent->alignment());

              bool hasParentTabs = pstyle->isInhTabValues();
              QValueList<ParagraphStyle::TabRecord> tabs;
              if (hasParentTabs)
                     tabs = QValueList<ParagraphStyle::TabRecord>(parent->tabValues());
              else
                     tabs = pstyle->tabValues();

              tabList_->setTabs(tabs, unitIndex, hasParentTabs);
              tabList_->setParentTabs(parent->tabValues());

              tabList_->setLeftIndentValue(pstyle->leftMargin() * unitRatio,pstyle->isInhLeftMargin());
              tabList_->setParentLeftIndent(parent->leftMargin() * unitRatio);

              tabList_->setFirstLineValue(pstyle->firstIndent() * unitRatio, pstyle->isInhFirstIndent());
              tabList_->setParentFirstLine(parent->firstIndent() * unitRatio);

              tabList_->setRightIndentValue(pstyle->rightMargin() * unitRatio, pstyle->isInhRightMargin());
              tabList_->setParentRightIndent(parent->rightMargin() * unitRatio);
       }
       else
       {
              lineSpacingMode_->setCurrentItem(pstyle->lineSpacingMode());
              lineSpacing_->setValue(pstyle->lineSpacing());
              spaceAbove_->setValue(pstyle->gapBefore() * unitRatio);
              spaceBelow_->setValue(pstyle->gapAfter() * unitRatio);
              dropCapsBox->setChecked(pstyle->hasDropCap());
              parentDropCapButton->hide();
              disconnect(parentDropCapButton, SIGNAL(clicked()), this, SLOT(slotParentDropCap()));
              dropCapLines_->setValue(pstyle->dropCapLines());
              dropCapOffset_->setValue(pstyle->dropCapOffset() * unitRatio);
              parentDropCapButton->hide();
              alignement_->setStyle(pstyle->alignment());
              tabList_->setTabs(pstyle->tabValues(), unitIndex);
              tabList_->setLeftIndentValue(pstyle->leftMargin() * unitRatio);
              tabList_->setFirstLineValue(pstyle->firstIndent() * unitRatio);
              tabList_->setRightIndentValue(pstyle->rightMargin() * unitRatio);
       }

       lineSpacing_->setEnabled(pstyle->lineSpacingMode() == ParagraphStyle::FixedLineSpacing);
       dropCapLines_->setEnabled(pstyle->hasDropCap());
       dropCapOffset_->setEnabled(pstyle->hasDropCap());

       QFont f(font());
       f.setBold(true);
       parentDropCapButton->setFont(f);

       cpage->parentLabel->setText( tr("Based On:"));
       cpage->show(&pstyle->charStyle(), cstyles, defLang, unitIndex);

       parentCombo->clear();
       parentCombo->insertItem("");

       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (pstyles[i].hasName() && pstyles[i].name() != pstyle->name())
                     parentCombo->insertItem(pstyles[i].name());
       }

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

       connect(dropCapsBox, SIGNAL(toggled(bool)), this, SLOT(slotDropCap(bool)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::show ( QValueList< ParagraphStyle * > &  pstyles,
QValueList< ParagraphStyle > &  pstylesAll,
QValueList< CharStyle > &  cstyles,
int  unitIndex,
const QString &  defLang 
)

Definition at line 316 of file smtextstylewidgets.cpp.

{
       if (pstyles.count() == 1)
              show(pstyles[0], pstylesAll, cstyles, unitIndex, defLang);
       else if (pstyles.count() > 1)
       {
              showLineSpacing(pstyles);
              showSpaceAB(pstyles, unitIndex);
              showDropCap(pstyles, unitIndex);
              showAlignment(pstyles);
              showTabs(pstyles, unitIndex);
              showCStyle(pstyles, cstyles, defLang, unitIndex);
              showParent(pstyles);
       }
}

Here is the call graph for this function:

void SMPStyleWidget::showAlignment ( QValueList< ParagraphStyle * > &  pstyles) [private]

Definition at line 470 of file smtextstylewidgets.cpp.

{
       ParagraphStyle::AlignmentType a = pstyles[0]->alignment();
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (a != pstyles[i]->alignment())
              {
                     if (alignement_->selectedId() > -1)
                     {
                            alignement_->setExclusive(false);
                            alignement_->selected()->toggle();
                            alignement_->setExclusive(true);
                     }
                     return;
              }
       }
       alignement_->setStyle(a);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::showCStyle ( QValueList< ParagraphStyle * > &  pstyles,
QValueList< CharStyle > &  cstyles,
const QString &  defLang,
int  unitIndex 
) [private]

Definition at line 562 of file smtextstylewidgets.cpp.

{
       cpage->parentLabel->setText( tr("Based On:"));

       QValueList<CharStyle*> cstyle;
       for (uint i = 0; i < pstyles.count(); ++i)
              cstyle << &pstyles[i]->charStyle();

       cpage->show(cstyle, cstyles, defLang, unitIndex);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::showDropCap ( QValueList< ParagraphStyle * > &  pstyles,
int  unitIndex 
) [private]

Definition at line 414 of file smtextstylewidgets.cpp.

{
       double unitRatio = unitGetRatioFromIndex(unitIndex);
       parentDropCapButton->hide();
       disconnect(parentDropCapButton, SIGNAL(clicked()), this, SLOT(slotParentDropCap()));

       bool dc = pstyles[0]->hasDropCap();
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (dc != pstyles[i]->hasDropCap())
              {
                     dc = false;
                     break;
              }
       }
       dropCapsBox->setChecked(dc);

       int lines = -1;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (lines > -1 && pstyles[i]->dropCapLines() != lines)
              {
                     lines = -1;
                     break;
              }
              else
                     lines = pstyles[i]->dropCapLines();
       }
       if (lines == -1)
              dropCapLines_->clear();
       else
              dropCapLines_->setValue(lines);

       double dco = -4000.0;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (dco > -3980.0 && !isEqual(pstyles[i]->dropCapOffset(), dco))
              {
                     dco = -4000.0;
                     break;
              }
              else
                     dco = pstyles[i]->dropCapOffset();
       }

       if (dco < -3800.0)
              dropCapOffset_->clear();
       else
              dropCapOffset_->setValue(dco * unitRatio);

       connect(dropCapsBox, SIGNAL(toggled(bool)), this, SLOT(slotDropCap(bool)));
       dropCapsBox->setEnabled(true);
       dropCapLines_->setEnabled(true);
       dropCapOffset_->setEnabled(true);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::showLineSpacing ( QValueList< ParagraphStyle * > &  pstyles) [private]

Definition at line 332 of file smtextstylewidgets.cpp.

{
       lineSpacingMode_->clear();
       lineSpacingMode_->insertItem( tr("Fixed Linespacing"));
       lineSpacingMode_->insertItem( tr("Automatic Linespacing"));
       lineSpacingMode_->insertItem( tr("Align to Baseline Grid"));

       int tmpLP = -1;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (tmpLP != -1 && pstyles[i]->lineSpacingMode() != tmpLP)
              {
                     tmpLP = -1;
                     break;
              }
              else
                     tmpLP = pstyles[i]->lineSpacingMode();
       }

       if (tmpLP == -1)
       {
              if (lineSpacingMode_->text(lineSpacingMode_->count() - 1) != "")
                     lineSpacingMode_->insertItem("");
              lineSpacingMode_->setCurrentItem(lineSpacingMode_->count() - 1);
       }
       else
              lineSpacingMode_->setCurrentItem(tmpLP);

       double tmpLS = -1.0;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (tmpLS > 0 && !isEqual(pstyles[i]->lineSpacing(), tmpLS))
              {
                     tmpLS = -1.0;
                     break;
              }
              else
                     tmpLS = pstyles[i]->lineSpacing();
       }
       lineSpacing_->setEnabled(true);
       if (tmpLS < 0)
              lineSpacing_->clear();
       else
              lineSpacing_->setValue(tmpLS);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::showParent ( QValueList< ParagraphStyle * > &  pstyles) [private]

Definition at line 573 of file smtextstylewidgets.cpp.

{
       parentCombo->setEnabled(false);

//     parentCombo->clear();
//     parentCombo->insertItem("");
//     for (uint i = 0; i < pstyles.count(); ++i)
//     {
//            if (pstyles[i].hasName() && pstyles[i].name() != pstyle->name())
//                   parentCombo->insertItem(pstyles[i].name());
//     }
// 
//     if (hasParent_)
//     {
//            int index = 0;
//            for (int i = 0; i < parentCombo->count(); ++i)
//            {
//                   if (parentCombo->text(i) == parent->name())
//                   {
//                          index = i;
//                          break;
//                   }
//            }
//            parentCombo->setCurrentItem(index);
//     }
//     else
//            parentCombo->setCurrentItem(0);
}

Here is the caller graph for this function:

void SMPStyleWidget::showSpaceAB ( QValueList< ParagraphStyle * > &  pstyles,
int  unitIndex 
) [private]

Definition at line 378 of file smtextstylewidgets.cpp.

{
       double unitRatio = unitGetRatioFromIndex(unitIndex);
       double tmpA = -1.2;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (tmpA > -1.0 && !isEqual(pstyles[i]->gapBefore(), tmpA))
              {
                     tmpA = -1.2;
                     break;
              }
              else
                     tmpA = pstyles[i]->gapBefore();
       }

       if (tmpA < 0)
              spaceAbove_->clear();
       else
              spaceAbove_->setValue(tmpA * unitRatio);

       tmpA = -1.2;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (tmpA > -1.0 && !isEqual(pstyles[i]->gapAfter(), tmpA))
              {
                     tmpA = -1.2;
                     break;
              }
       }

       if (tmpA < 0)
              spaceBelow_->clear();
       else
              spaceBelow_->setValue(tmpA * unitRatio);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::showTabs ( QValueList< ParagraphStyle * > &  pstyles,
int  unitIndex 
) [private]

Definition at line 489 of file smtextstylewidgets.cpp.

{
       double unitRatio = unitGetRatioFromIndex(unitIndex);
       QValueList<ParagraphStyle::TabRecord> t = pstyles[0]->tabValues();
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (t != pstyles[i]->tabValues())
              {
                     t = QValueList<ParagraphStyle::TabRecord>();
                     break;
              }
       }
       tabList_->setTabs(t, unitIndex);

       double l = -4000.0;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (l > -3800.0 && !isEqual(pstyles[i]->leftMargin(), l))
              {
                     l = -4000.0;
                     break;
              }
              else
                     l = pstyles[i]->leftMargin();
       }
       if (l < -3800.0)
       {
              tabList_->setLeftIndentValue(0.0);
              tabList_->left_->clear();
       }
       else
              tabList_->setLeftIndentValue(l * unitRatio);

       l = -4000.0;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (l > -3800.0 && !isEqual(pstyles[i]->firstIndent(), l))
              {
                     l = -4000.0;
                     break;
              }
              else
                     l = pstyles[i]->firstIndent();
       }
       if (l < -3800.0)
       {
              tabList_->setFirstLineValue(0.0);
              tabList_->first_->clear();
       }
       else
              tabList_->setFirstLineValue(l * unitRatio);

       l = -4000.0;
       for (uint i = 0; i < pstyles.count(); ++i)
       {
              if (l > -3800.0 && !isEqual(pstyles[i]->rightMargin(), l))
              {
                     l = -4000.0;
                     break;
              }
              else
                     l = pstyles[i]->rightMargin();
       }
       if (l < -3800.0)
       {
              tabList_->setRightIndentData(0.0);
              tabList_->right_->clear();
       }
       else
              tabList_->setRightIndentValue(l * unitRatio);

}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::slotDropCap ( bool  isOn) [private, slot]

Definition at line 607 of file smtextstylewidgets.cpp.

{
       if (isOn)
       {
              dropCapsBox->setEnabled(true);
              dropCapLines_->setEnabled(true);
              dropCapOffset_->setEnabled(true);
       }
       else
       {
              dropCapsBox->setEnabled(true);
              dropCapLines_->setEnabled(false);
              dropCapOffset_->setEnabled(false);
       }
       if (hasParent_)
              parentDropCapButton->show();
}

Here is the caller graph for this function:

void SMPStyleWidget::slotLineSpacingModeChanged ( int  i) [private, slot]

Definition at line 91 of file smtextstylewidgets.cpp.

{
       lineSpacing_->setEnabled(i == 0);
}

Here is the caller graph for this function:

void SMPStyleWidget::slotParentDropCap ( ) [private, slot]

Definition at line 625 of file smtextstylewidgets.cpp.

{
       disconnect(parentDropCapButton, SIGNAL(clicked()), this, SLOT(slotParentDropCap()));
       disconnect(dropCapsBox, SIGNAL(toggled(bool)), this, SLOT(slotDropCap(bool)));
       parentDropCapButton->hide();
       dropCapsBox->setChecked(parentDropCap_);
       emit useParentDropCap();
       connect(parentDropCapButton, SIGNAL(clicked()), this, SLOT(slotParentDropCap()));
       connect(dropCapsBox, SIGNAL(toggled(bool)), this, SLOT(slotDropCap(bool)));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SMPStyleWidget::unitChange ( double  oldRatio,
double  newRatio,
int  unitIndex 
)

Definition at line 138 of file smtextstylewidgets.cpp.

{
    spaceAbove_->setNewUnit(oldRatio, newRatio, unitIndex);
       spaceBelow_->setNewUnit(oldRatio, newRatio, unitIndex);
       dropCapOffset_->setNewUnit(oldRatio, newRatio, unitIndex);
       tabList_->left_->setNewUnit(oldRatio, newRatio, unitIndex);
       tabList_->right_->setNewUnit(oldRatio, newRatio, unitIndex);
       tabList_->first_->setNewUnit(oldRatio, newRatio, unitIndex);
}

Here is the caller graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class SMParagraphStyle [friend]

Definition at line 96 of file smtextstylewidgets.h.


Member Data Documentation

Definition at line 76 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::capLabel1 [private]

Definition at line 67 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::capLabel2 [private]

Definition at line 68 of file smtextstylewidgets.h.

Definition at line 78 of file smtextstylewidgets.h.

QGridLayout* SMPStyleWidget::distancesBoxLayout [private]

Definition at line 56 of file smtextstylewidgets.h.

Definition at line 73 of file smtextstylewidgets.h.

Definition at line 74 of file smtextstylewidgets.h.

QGridLayout* SMPStyleWidget::dropCapsBoxLayout [private]

Definition at line 57 of file smtextstylewidgets.h.

Definition at line 80 of file smtextstylewidgets.h.

Definition at line 70 of file smtextstylewidgets.h.

Definition at line 60 of file smtextstylewidgets.h.

Definition at line 81 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::pixmapLabel0 [private]

Definition at line 62 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::pixmapLabel1 [private]

Definition at line 63 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::pixmapLabel2 [private]

Definition at line 64 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::pixmapLabel3 [private]

Definition at line 65 of file smtextstylewidgets.h.

QLabel* SMPStyleWidget::pixmapLabel4 [private]

Definition at line 66 of file smtextstylewidgets.h.

Definition at line 71 of file smtextstylewidgets.h.

Definition at line 72 of file smtextstylewidgets.h.

Definition at line 77 of file smtextstylewidgets.h.

QVBoxLayout* SMPStyleWidget::tabsBoxLayout [private]

Definition at line 58 of file smtextstylewidgets.h.


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