PropertiesPalette_Text::PropertiesPalette_Text( QWidget* parent) : QWidget(parent) { m_ScMW=0; m_doc=0; m_haveDoc = false; m_haveItem = false; m_unitRatio = 1.0; setupUi(this); setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum)); fontSize->setPrefix( "" ); fontSizeLabel->setPixmap(loadIcon("Zeichen.xpm")); lineSpacingLabel->setPixmap(loadIcon("linespacing2.png")); paraStyleLabel->setBuddy(paraStyleCombo); paraStyleClear->setIcon(loadIcon("16/edit-clear.png")); charStyleLabel->setBuddy(charStyleCombo); charStyleClear->setIcon(loadIcon("16/edit-clear.png")); colorWidgets = new PropertyWidget_TextColor(textTree); colorWidgetsItem = textTree->addWidget( tr("Color && Effects"), colorWidgets); flopBox = new PropertyWidget_Flop(textTree); flopItem = textTree->addWidget( tr("First Line Offset"), flopBox); orphanBox = new PropertyWidget_Orphans(textTree); orphanItem = textTree->addWidget( tr("Orphans and Widows"), orphanBox); parEffectWidgets = new PropertyWidget_ParEffect(textTree); parEffectItem = textTree->addWidget( tr("Paragraph Effects"), parEffectWidgets); distanceWidgets = new PropertyWidget_Distance(textTree); distanceItem = textTree->addWidget( tr("Columns && Text Distances"), distanceWidgets); //<< Optical Margins optMargins = new PropertyWidget_OptMargins(textTree); optMarginsItem = textTree->addWidget( tr("Optical Margins"), optMargins); //>> Optical Margins //<<Advanced Settings advancedWidgets = new PropertyWidget_Advanced(textTree); advancedWidgetsItem = textTree->addWidget( tr("Advanced Settings"), advancedWidgets); //>>Advanced Settings pathTextWidgets = new PropertyWidget_PathText(textTree); pathTextItem = textTree->addWidget( tr("Path Text Properties"), pathTextWidgets); languageChange(); connect(lineSpacing , SIGNAL(valueChanged(double)), this, SLOT(handleLineSpacing())); connect(fonts , SIGNAL(fontSelected(QString )), this, SLOT(handleTextFont(QString))); connect(fontSize , SIGNAL(valueChanged(double)), this, SLOT(handleFontSize())); connect(textAlignment , SIGNAL(State(int)) , this, SLOT(handleAlignement(int))); connect(charStyleClear, SIGNAL(clicked()), this, SLOT(doClearCStyle())); connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle())); connect(flopBox->flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int))); connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(handleLineSpacingMode(int))); m_haveItem = false; setEnabled(false); }
PropertiesPalette_Text::PropertiesPalette_Text( QWidget* parent) : QWidget(parent) { m_ScMW=0; m_doc=0; m_item=0; m_haveDoc = false; m_haveItem = false; m_unitIndex = 0; m_unitRatio = 1.0; setupUi(this); fontSize->setPrefix( "" ); fontSizeLabel->setPixmap(IconManager::instance()->loadPixmap("zeichen.png")); lineSpacingLabel->setPixmap(IconManager::instance()->loadPixmap("linespacing2.png")); paraStyleLabel->setBuddy(paraStyleCombo); paraStyleClear->setIcon(IconManager::instance()->loadPixmap("16/edit-clear.png")); charStyleLabel->setBuddy(charStyleCombo); charStyleClear->setIcon(IconManager::instance()->loadPixmap("16/edit-clear.png")); colorWidgets = new PropertyWidget_TextColor(textTree); colorWidgetsItem = textTree->addItem( colorWidgets, tr("Color && Effects") ); flopBox = new PropertyWidget_Flop(textTree); flopItem = textTree->addItem( flopBox, tr("First Line Offset")); orphanBox = new PropertyWidget_Orphans(textTree); orphanItem = textTree->addItem(orphanBox, tr("Orphans and Widows")); parEffectWidgets = new PropertyWidget_ParEffect(textTree); parEffectItem = textTree->addItem(parEffectWidgets, tr("Paragraph Effects")); distanceWidgets = new PropertyWidget_Distance(textTree); distanceItem = textTree->addItem(distanceWidgets, tr("Columns && Text Distances")); //<< Optical Margins optMargins = new PropertyWidget_OptMargins(textTree); optMarginsItem = textTree->addItem(optMargins, tr("Optical Margins")); //>> Optical Margins hyphenationWidget = new PropertyWidget_Hyphenation(textTree); hyphenationWidgetItem = textTree->addItem(hyphenationWidget, tr("Hyphenation")); //<<Advanced Settings advancedWidgets = new PropertyWidget_Advanced(textTree); advancedWidgetsItem = textTree->addItem(advancedWidgets, tr("Advanced Settings")); //>>Advanced Settings fontfeaturesWidget = new PropertyWidget_FontFeatures(textTree); fontfeaturesWidgetItem = textTree->addItem(fontfeaturesWidget, tr("OpenType Font Features")); pathTextWidgets = new PropertyWidget_PathText(textTree); pathTextItem = textTree->addItem(pathTextWidgets, tr("Path Text Properties")); languageChange(); connect(lineSpacing , SIGNAL(valueChanged(double)), this, SLOT(handleLineSpacing())); connect(fonts , SIGNAL(fontSelected(QString )), this, SLOT(handleTextFont(QString))); connect(fontSize , SIGNAL(valueChanged(double)), this, SLOT(handleFontSize())); connect(textAlignment , SIGNAL(State(int)) , this, SLOT(handleAlignment(int))); connect(textDirection , SIGNAL(State(int)) , this, SLOT(handleDirection(int))); connect(charStyleClear, SIGNAL(clicked()), this, SLOT(doClearCStyle())); connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle())); connect(flopBox->flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int))); connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(handleLineSpacingMode(int))); connect(langCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changeLang(int))); m_haveItem = false; setEnabled(false); }