r16087 by jghali - text tab uifications : uify text tree widgets
scribus-commit
scribus-commit at lists.scribus.net
Mon Dec 13 03:21:44 CET 2010
Author: jghali
Date: Mon Dec 13 02:21:43 2010
New Revision: 16087
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16087
Log:
text tab uifications : uify text tree widgets
Added:
branches/ScribusOIF/scribus/ui/propertywidget_advanced.cpp
branches/ScribusOIF/scribus/ui/propertywidget_advanced.h
branches/ScribusOIF/scribus/ui/propertywidget_advancedbase.ui
branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp
branches/ScribusOIF/scribus/ui/propertywidget_distance.h
branches/ScribusOIF/scribus/ui/propertywidget_distancebase.ui
branches/ScribusOIF/scribus/ui/propertywidget_flop.cpp
branches/ScribusOIF/scribus/ui/propertywidget_flop.h
branches/ScribusOIF/scribus/ui/propertywidget_flopbase.ui
branches/ScribusOIF/scribus/ui/propertywidget_optmargins.cpp
branches/ScribusOIF/scribus/ui/propertywidget_optmargins.h
branches/ScribusOIF/scribus/ui/propertywidget_optmarginsbase.ui
branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
branches/ScribusOIF/scribus/ui/propertywidget_pathtext.h
branches/ScribusOIF/scribus/ui/propertywidget_pathtextbase.ui
branches/ScribusOIF/scribus/ui/propertywidget_textcolor.cpp
branches/ScribusOIF/scribus/ui/propertywidget_textcolor.h
branches/ScribusOIF/scribus/ui/propertywidget_textcolorbase.ui
Modified:
branches/ScribusOIF/scribus/CMakeLists.txt
branches/ScribusOIF/scribus/scguardedptr.h
branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
branches/ScribusOIF/scribus/ui/propertiespalette_text.h
branches/ScribusOIF/win32/vc8/Scribus.vcproj
Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16087&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Mon Dec 13 02:21:43 2010
@@ -128,6 +128,12 @@
ui/propertiespalette_shapebase.ui
ui/propertiespalette_textbase.ui
ui/propertiespalette_xyzbase.ui
+ ui/propertywidget_advancedbase.ui
+ ui/propertywidget_distancebase.ui
+ ui/propertywidget_flopbase.ui
+ ui/propertywidget_optmarginsbase.ui
+ ui/propertywidget_pathtextbase.ui
+ ui/propertywidget_textcolorbase.ui
ui/replacecolors.ui
ui/replaceonecolor.ui
ui/selectobjects.ui
@@ -358,6 +364,12 @@
ui/propertiespalette_text.h
ui/propertiespalette_utils.h
ui/propertiespalette_xyz.h
+ ui/propertywidget_advanced.h
+ ui/propertywidget_distance.h
+ ui/propertywidget_flop.h
+ ui/propertywidget_optmargins.h
+ ui/propertywidget_pathtext.h
+ ui/propertywidget_textcolor.h
ui/query.h
# ui/reformdoc.h
ui/replacecolors.h
@@ -763,6 +775,12 @@
ui/propertiespalette_text.cpp
ui/propertiespalette_utils.cpp
ui/propertiespalette_xyz.cpp
+ ui/propertywidget_advanced.cpp
+ ui/propertywidget_distance.cpp
+ ui/propertywidget_flop.cpp
+ ui/propertywidget_optmargins.cpp
+ ui/propertywidget_pathtext.cpp
+ ui/propertywidget_textcolor.cpp
ui/query.cpp
# ui/reformdoc.cpp
ui/replacecolors.cpp
Modified: branches/ScribusOIF/scribus/scguardedptr.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16087&path=/branches/ScribusOIF/scribus/scguardedptr.h
==============================================================================
--- branches/ScribusOIF/scribus/scguardedptr.h (original)
+++ branches/ScribusOIF/scribus/scguardedptr.h Mon Dec 13 02:21:43 2010
@@ -40,6 +40,8 @@
ScGuardedPtr& operator=(const ScGuardedPtr& gPtr);
bool operator==( const ScGuardedPtr<T> &p ) const { return (T*)(*this) == (T*) p;}
bool operator!= ( const ScGuardedPtr<T>& p ) const { return !( *this == p ); }
+
+ bool isNull(void);
T* operator->() const { return (T*)(data ? data->pointer : 0); }
T& operator*() const { return *((T*)(data ? data->pointer : 0)); }
@@ -104,6 +106,14 @@
};
template<typename T>
+bool ScGuardedPtr<T>::isNull(void)
+{
+ if (data)
+ return (data->pointer == NULL);
+ return true;
+};
+
+template<typename T>
void ScGuardedPtr<T>::deref(void)
{
if (data && --(data->refs) == 0)
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16087&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp Mon Dec 13 02:21:43 2010
@@ -8,51 +8,21 @@
#include "propertiespalette_text.h"
-#include <QButtonGroup>
-#include <QCheckBox>
-#include <QCloseEvent>
-#include <QComboBox>
-#include <QEvent>
-#include <QFocusEvent>
-#include <QFrame>
-#include <QGridLayout>
-#include <QGroupBox>
-#include <QHBoxLayout>
-#include <QImage>
-#include <QKeyEvent>
-#include <QLabel>
-#include <QListView>
-#include <QTransform>
-#include <QMenu>
-#include <QMessageBox>
-#include <QObject>
-#include <QPixmap>
-#include <QPoint>
-#include <QPushButton>
-#include <QRadioButton>
-#include <QRegExp>
-#include <QSpacerItem>
-#include <QSpinBox>
-#include <QStackedWidget>
-#include <QTimer>
-#include <QToolBox>
-#include <QToolTip>
-#include <QVBoxLayout>
-#include <QValidator>
-#include <QWidget>
-
#if defined(_MSC_VER)
#define _USE_MATH_DEFINES
#endif
#include <cmath>
-#include "arrowchooser.h"
-#include "autoform.h"
-#include "basepointwidget.h"
#include "commonstrings.h"
#include "colorlistbox.h"
-#include "sccolorengine.h"
+#include "pageitem.h"
#include "pageitem_textframe.h"
#include "propertiespalette_utils.h"
+#include "propertywidget_advanced.h"
+#include "propertywidget_distance.h"
+#include "propertywidget_flop.h"
+#include "propertywidget_pathtext.h"
+#include "propertywidget_optmargins.h"
+#include "propertywidget_textcolor.h"
#include "sccombobox.h"
#include "scfonts.h"
#include "scribus.h"
@@ -63,14 +33,12 @@
#include "spalette.h"
#include "styleselect.h"
#include "tabmanager.h"
-#include "transparencypalette.h"
#include "units.h"
#include "undomanager.h"
#include "util.h"
#include "util_icon.h"
#include "util_math.h"
#include "text/nlsconfig.h"
-#include "dasheditor.h"
#include "fontcombo.h"
#include "colorcombo.h"
@@ -97,339 +65,88 @@
charStyleLabel->setBuddy(charStyleCombo);
charStyleClear->setIcon(loadIcon("16/edit-clear.png"));
- colorWidgets = new QFrame();
- colorWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
- colorWidgets->setLineWidth(1);
- layout41c = new QGridLayout(colorWidgets);
- layout41c->setSpacing( 3 );
- layout41c->setMargin( 3 );
- layout41c->setAlignment( Qt::AlignLeft );
- layout23 = new QHBoxLayout;
- layout23->setSpacing( 3 );
- layout23->setMargin( 0 );
- layout23->setAlignment( Qt::AlignLeft );
- StrokeIcon = new QLabel( "", colorWidgets );
- StrokeIcon->setPixmap(loadIcon("16/color-stroke.png"));
- StrokeIcon->setScaledContents( false );
- layout23->addWidget( StrokeIcon );
- TxStroke = new ColorCombo( false, colorWidgets);
- layout23->addWidget( TxStroke );
- ShadeTxt1 = new QLabel( "", colorWidgets );
- ShadeTxt1->setPixmap(loadIcon("shade.png"));
- layout23->addWidget( ShadeTxt1 );
- PM1 = new ShadeButton(colorWidgets);
- layout23->addWidget( PM1 );
- QSpacerItem* spacer7s = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout23->addItem( spacer7s );
- layout41c->addLayout( layout23, 1, 0, 1, 4 );
- layout24 = new QHBoxLayout;
- layout24->setSpacing( 3 );
- layout24->setMargin( 0 );
- layout24->setAlignment( Qt::AlignLeft );
- FillIcon = new QLabel( "", colorWidgets );
- FillIcon->setPixmap(loadIcon("16/color-fill.png"));
- layout24->addWidget( FillIcon );
- TxFill = new ColorCombo( false, colorWidgets);
- layout24->addWidget( TxFill );
- ShadeTxt2 = new QLabel("", colorWidgets );
- ShadeTxt2->setPixmap(loadIcon("shade.png"));
- layout24->addWidget( ShadeTxt2 );
- PM2 = new ShadeButton(colorWidgets);
- layout24->addWidget( PM2 );
- QSpacerItem* spacer7f = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout24->addItem( spacer7f );
- layout41c->addLayout( layout24, 0, 0, 1, 4 );
- Layout1 = new QHBoxLayout;
- Layout1->setSpacing( 0 );
- Layout1->setMargin( 0 );
- Layout1->setAlignment( Qt::AlignLeft );
- SeStyle = new StyleSelect(colorWidgets);
- Layout1->addWidget(SeStyle);
- Revert = new QToolButton( colorWidgets );
- Revert->setMaximumSize( QSize( 22, 22 ) );
- Revert->setText("");
- Revert->setIcon(loadIcon("Revers.png"));
- Revert->setCheckable( true );
- Layout1->addWidget( Revert );
- QSpacerItem* spacer7 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
- Layout1->addItem( spacer7 );
- layout41c->addLayout( Layout1, 2, 0, 1, 4 );
+ colorWidgets = new PropertyWidget_TextColor(textTree);
colorWidgetsItem = textTree->addWidget( tr("Color & Effects"), colorWidgets);
- flopBox = new QFrame();
- flopBox->setFrameStyle(QFrame::Box | QFrame::Plain);
- flopBox->setLineWidth(1);
- flopLayout = new QGridLayout(flopBox);
- flopGroup = new QButtonGroup(flopBox);
- flopRealHeight = new QRadioButton(tr("Maximum Ascent"), flopBox);
- flopFontAscent = new QRadioButton(tr("Font Ascent"), flopBox);
- flopLineSpacing = new QRadioButton(tr("Line Spacing"),flopBox);
- flopGroup->addButton(flopRealHeight, 0);
- flopGroup->addButton(flopFontAscent, 1);
- flopGroup->addButton(flopLineSpacing, 2);
- flopLayout->addWidget(flopRealHeight);
- flopLayout->addWidget(flopFontAscent);
- flopLayout->addWidget(flopLineSpacing);
- flopRealHeight->setChecked(true);
+ flopBox = new PropertyWidget_Flop(textTree);
flopItem = textTree->addWidget( tr("First Line Offset"), flopBox);
- Distance = new QFrame();
- Distance->setFrameStyle(QFrame::Box | QFrame::Plain);
- Distance->setLineWidth(1);
- DistanceLayout = new QGridLayout( Distance );
- DistanceLayout->setSpacing( 2 );
- DistanceLayout->setMargin( 5 );
- DistanceLayout->setAlignment( Qt::AlignTop );
-
- DCol = new QSpinBox(Distance );
- DCol->setMaximum( 3000 );
- DCol->setMinimum( 1 );
- columnsLabel = new QLabel( "Colu&mns:", Distance );
- columnsLabel->setBuddy(DCol);
- DistanceLayout->addWidget( columnsLabel, 0, 0 );
- DistanceLayout->addWidget( DCol, 0, 1 );
-
- dGap = new ScrSpinBox( 0, 300, Distance, 0 );
- colgapLabel = new ScComboBox( Distance );
- DistanceLayout->addWidget( colgapLabel, 1, 0); //, Qt::AlignLeft );
- DistanceLayout->addWidget( dGap, 1, 1 );
-
- DTop = new ScrSpinBox( 0, 300, Distance, 0 );
- topLabel = new QLabel( "To&p:", Distance );
- topLabel->setBuddy(DTop);
- DistanceLayout->addWidget( topLabel, 2, 0 );
- DistanceLayout->addWidget( DTop, 2, 1 );
-
- DBottom = new ScrSpinBox( 0, 300, Distance, 0 );
- bottomLabel = new QLabel( "&Bottom:", Distance );
- bottomLabel->setBuddy(DBottom);
- DistanceLayout->addWidget( bottomLabel, 3, 0 );
- DistanceLayout->addWidget( DBottom, 3, 1 );
-
- DLeft = new ScrSpinBox( 0, 300, Distance, 0 );
- leftLabel = new QLabel( "&Left:", Distance );
- leftLabel->setBuddy(DLeft);
- DistanceLayout->addWidget( leftLabel, 4, 0 );
- DistanceLayout->addWidget( DLeft, 4, 1 );
-
- DRight = new ScrSpinBox( 0, 300, Distance, 0 );
- rightLabel = new QLabel( "&Right:", Distance );
- rightLabel->setBuddy(DRight);
- DistanceLayout->addWidget( rightLabel, 5, 0 );
- DistanceLayout->addWidget( DRight, 5, 1 );
-
- TabsButton = new QToolButton( Distance );
- TabsButton->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
- DistanceLayout->addWidget( TabsButton, 7, 0, 1, 2 );
- DistanceItem = textTree->addWidget( tr("Columns & Text Distances"), Distance);
-
+ distanceWidgets = new PropertyWidget_Distance(textTree);
+ distanceItem = textTree->addWidget( tr("Columns & Text Distances"), distanceWidgets);
//<< Optical Margins
-
- OptMargins = new QFrame();
- OptMargins->setFrameStyle(QFrame::Box | QFrame::Plain);
- OptMargins->setLineWidth(1);
- OptMarginsLayout = new QVBoxLayout( OptMargins );
- OptMarginsLayout->setSpacing( 2 );
- OptMarginsLayout->setMargin( 5 );
- OptMarginsLayout->setAlignment( Qt::AlignTop );
-
- optMarginRadioNone = new QRadioButton(OptMargins);
- optMarginRadioNone->setObjectName(QString::fromUtf8("optMarginRadioNone"));
-
- optMarginRadioBoth = new QRadioButton(OptMargins);
- optMarginRadioBoth->setObjectName(QString::fromUtf8("optMarginRadioBoth"));
-
- optMarginRadioLeft = new QRadioButton(OptMargins);
- optMarginRadioLeft->setObjectName(QString::fromUtf8("optMarginRadioLeft"));
-
- optMarginRadioRight = new QRadioButton(OptMargins);
- optMarginRadioRight->setObjectName(QString::fromUtf8("optMarginRadioRight"));
-
- optMarginResetButton = new QPushButton(OptMargins);
- optMarginResetButton->setObjectName(QString::fromUtf8("optMarginResetButton"));
-
- optMarginRadioNone->setText( tr("None","optical margins") );
- optMarginRadioBoth->setText( tr("Both Sides","optical margins") );
- optMarginRadioLeft->setText( tr("Left Only","optical margins") );
- optMarginRadioRight->setText( tr("Right Only","optical margins") );
- optMarginResetButton->setText( tr("Reset") );
-
- OptMarginsLayout->addWidget(optMarginRadioNone);
- OptMarginsLayout->addWidget(optMarginRadioBoth);
- OptMarginsLayout->addWidget(optMarginRadioLeft);
- OptMarginsLayout->addWidget(optMarginRadioRight);
- OptMarginsLayout->addWidget(optMarginResetButton);
-
- OptMarginsItem = textTree->addWidget( tr("Optical Margins"), OptMargins);
-
+ optMargins = new PropertyWidget_OptMargins(textTree);
+ optMarginsItem = textTree->addWidget( tr("Optical Margins"), optMargins);
//>> Optical Margins
//<<Advanced Settings
- advancedWidgets = new QFrame();
- advancedWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
- advancedWidgets->setLineWidth(1);
- layout41a = new QGridLayout(advancedWidgets);
- layout41a->setSpacing( 3 );
- layout41a->setMargin( 3 );
- layout41a->setAlignment( Qt::AlignLeft );
- ChBase = new ScrSpinBox( -100, 100, advancedWidgets, 0 );
- ChBase->setValue( 0 );
- ChBaseTxt = new QLabel("", advancedWidgets );
- ChBaseTxt->setPixmap(loadIcon("textbase.png"));
- layout41a->addWidget( ChBaseTxt, 0, 0 );
- layout41a->addWidget( ChBase, 0, 1 );
- Extra = new ScrSpinBox( advancedWidgets, 0 );
- layout41a->addWidget( Extra, 0, 3 );
- trackingLabel = new QLabel( "", advancedWidgets );
- trackingLabel->setText("");
- trackingLabel->setPixmap(loadIcon("textkern.png"));
- layout41a->addWidget( trackingLabel, 0, 2 );
- ChScale = new ScrSpinBox( 10, 400, advancedWidgets, 0 );
- ChScale->setValue( 100 );
- ScaleTxt = new QLabel("", advancedWidgets );
- ScaleTxt->setPixmap(loadIcon("textscaleh.png"));
- layout41a->addWidget( ScaleTxt, 1, 0 );
- layout41a->addWidget( ChScale, 1 , 1 );
- ChScaleV = new ScrSpinBox( 10, 400, advancedWidgets, 0 );
- ChScaleV->setValue( 100 );
- ScaleTxtV = new QLabel("", advancedWidgets );
- ScaleTxtV->setPixmap(loadIcon("textscalev.png"));
- layout41a->addWidget( ScaleTxtV, 1, 2 );
- layout41a->addWidget( ChScaleV, 1, 3 );
-
- wordTrackingLabel = new QLabel( "Word Spacing", advancedWidgets );
- layout41a->addWidget( wordTrackingLabel, 2, 0, 1, 4 );
- wordTrackingHLayout = new QHBoxLayout;
- wordTrackingHLayout->setSpacing( 3 );
- wordTrackingHLayout->setMargin( 0 );
- wordTrackingHLayout->setAlignment(Qt::AlignLeft);
- minWordTrackingSpinBox = new ScrSpinBox( 1, 200, advancedWidgets, 0 );
- minWordTrackingLabel = new QLabel( "Min:", advancedWidgets );
- minWordTrackingLabel->setBuddy(minWordTrackingSpinBox);
- wordTrackingHLayout->addWidget(minWordTrackingLabel);
- wordTrackingHLayout->addWidget(minWordTrackingSpinBox);
- normWordTrackingSpinBox = new ScrSpinBox( 1, 200, advancedWidgets, 0 );
- normWordTrackingLabel = new QLabel( "Norm:", advancedWidgets );
- normWordTrackingLabel->setBuddy(normWordTrackingSpinBox);
- wordTrackingHLayout->addWidget(normWordTrackingLabel);
- wordTrackingHLayout->addWidget(normWordTrackingSpinBox);
- layout41a->addLayout(wordTrackingHLayout, 3, 0, 1, 4);
-
- glyphExtensionLabel = new QLabel( "Glyph Extension", advancedWidgets );
- layout41a->addWidget( glyphExtensionLabel, 4, 0, 1, 4 );
- glyphExtensionHLayout = new QHBoxLayout;
- glyphExtensionHLayout->setSpacing( 3 );
- glyphExtensionHLayout->setMargin( 0 );
- glyphExtensionHLayout->setAlignment(Qt::AlignLeft);
- minGlyphExtSpinBox = new ScrSpinBox( 90, 110, advancedWidgets, 0 );
- minGlyphExtensionLabel = new QLabel( "Min:", advancedWidgets );
- minGlyphExtensionLabel->setBuddy(minGlyphExtSpinBox);
- glyphExtensionHLayout->addWidget(minGlyphExtensionLabel);
- glyphExtensionHLayout->addWidget(minGlyphExtSpinBox);
- maxGlyphExtSpinBox = new ScrSpinBox( 90, 110, advancedWidgets, 0 );
- maxGlyphExtensionLabel = new QLabel( "Max:", advancedWidgets );
- maxGlyphExtensionLabel->setBuddy(maxGlyphExtSpinBox);
- glyphExtensionHLayout->addWidget(maxGlyphExtensionLabel);
- glyphExtensionHLayout->addWidget(maxGlyphExtSpinBox);
- layout41a->addLayout(glyphExtensionHLayout, 5, 0, 1, 4);
-
+ advancedWidgets = new PropertyWidget_Advanced(textTree);
advancedWidgetsItem = textTree->addWidget( tr("Advanced Settings"), advancedWidgets);
-
//>>Advanced Settings
- Distance2 = new QFrame();
- Distance2->setFrameStyle(QFrame::Box | QFrame::Plain);
- Distance2->setLineWidth(1);
- DistanceLayout2 = new QGridLayout( Distance2 );
- DistanceLayout2->setSpacing( 2 );
- DistanceLayout2->setMargin( 5 );
- DistanceLayout2->setAlignment( Qt::AlignTop );
-
- pathTextType = new ScComboBox( Distance2 );
- DistanceLayout2->addWidget( pathTextType, 0, 1);
- pathTextTypeLabel = new QLabel( "Type:", Distance2 );
- DistanceLayout2->addWidget( pathTextTypeLabel, 0, 0);
-
- startoffsetLabel = new QLabel( "Start Offset:", Distance2 );
- DistanceLayout2->addWidget( startoffsetLabel, 1, 0);
- Dist = new ScrSpinBox( 0, 30000, Distance2, 0 );
- Dist->setSingleStep(10);
- DistanceLayout2->addWidget( Dist, 1, 1);
-
- distfromcurveLabel = new QLabel( "Distance from Curve:", Distance2 );
- DistanceLayout2->addWidget( distfromcurveLabel, 2, 0);
- LineW = new ScrSpinBox( -300, 300, Distance2, 0 );
- LineW->setSingleStep(10);
- DistanceLayout2->addWidget( LineW, 2, 1);
-
- flippedPathText = new QCheckBox( Distance2 );
- flippedPathText->setText( "Flip Text" );
- DistanceLayout2->addWidget( flippedPathText, 3, 0, 1, 2 );
-
- showcurveCheckBox = new QCheckBox( Distance2 );
- showcurveCheckBox->setText( "Show Curve" );
- DistanceLayout2->addWidget( showcurveCheckBox, 4, 0, 1, 2 );
- Distance2Item = textTree->addWidget( tr("Path Text Properties"), Distance2);
+ pathTextWidgets = new PropertyWidget_PathText(textTree);
+ pathTextItem = textTree->addWidget( tr("Path Text Properties"), pathTextWidgets);
languageChange();
- connect(lineSpacing , SIGNAL(valueChanged(double)), this, SLOT(handleLineSpacing()));
+ 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(Extra , SIGNAL(valueChanged(double)), this, SLOT(handleTracking()));
- connect(textAlignment, SIGNAL(State(int)) , this, SLOT(handleAlignement(int)));
- connect(Revert , SIGNAL(clicked()) , this, SLOT(handleTextDirection()));
+ connect(textAlignment , SIGNAL(State(int)) , this, SLOT(handleAlignement(int)));
connect(charStyleClear, SIGNAL(clicked()), this, SLOT(doClearCStyle()));
connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle()));
- connect(SeStyle, SIGNAL(State(int)) , this, SLOT(handleTypeStyle(int)));
- connect(SeStyle->ShadowVal->Xoffset , SIGNAL(valueChanged(double)), this, SLOT(handleShadowOffs()));
- connect(SeStyle->ShadowVal->Yoffset , SIGNAL(valueChanged(double)), this, SLOT(handleShadowOffs()));
- connect(SeStyle->OutlineVal->LWidth , SIGNAL(valueChanged(double)), this, SLOT(handleOutlineWidth()));
- connect(SeStyle->UnderlineVal->LPos , SIGNAL(valueChanged(double)), this, SLOT(handleUnderline()));
- connect(SeStyle->UnderlineVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(handleUnderline()));
- connect(SeStyle->StrikeVal->LPos , SIGNAL(valueChanged(double)), this, SLOT(handleStrikeThru()));
- connect(SeStyle->StrikeVal->LWidth , SIGNAL(valueChanged(double)), this, SLOT(handleStrikeThru()));
-
- connect(dGap , SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
- connect(DCol , SIGNAL(valueChanged(int)) , this, SLOT(handleColumns()));
- connect(DTop , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
- connect(DLeft , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
- connect(DRight , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
- connect(DBottom , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
- connect(flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int)));
- connect(fonts , SIGNAL(fontSelected(QString )), this, SLOT(handleTextFont(QString)));
- connect(TxFill , SIGNAL(activated(int)) , this, SLOT(handleTextFill()));
- connect(TxStroke , SIGNAL(activated(int)) , this, SLOT(handleTextStroke()));
- connect(PM1 , SIGNAL(clicked()) , this, SLOT(handleTextShade()));
- connect(PM2 , SIGNAL(clicked()) , this, SLOT(handleTextShade()));
- connect(ChScale , SIGNAL(valueChanged(double)), this, SLOT(handleTextScaleH()));
- connect(ChScaleV , SIGNAL(valueChanged(double)), this, SLOT(handleTextScaleV()));
- connect(ChBase , SIGNAL(valueChanged(double)), this, SLOT(handleBaselineOffset()));
- connect(showcurveCheckBox, SIGNAL(clicked()) , this, SLOT(handlePathLine()));
- connect(pathTextType, SIGNAL(activated(int)) , this, SLOT(handlePathType()));
- connect(flippedPathText, SIGNAL(clicked()) , this, SLOT(handlePathFlip()));
- connect(Dist , SIGNAL(valueChanged(double)), this, SLOT(handlePathDist()));
- connect(LineW , SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
- connect(TabsButton , SIGNAL( clicked() ) , this, SLOT( handleTabs() ) );
- connect(colgapLabel, SIGNAL(activated(int)) , this, SLOT(handleGapSwitch()));
+
+ connect(advancedWidgets->textBase, SIGNAL(valueChanged(double)), this, SLOT(handleBaselineOffset()));
+ connect(advancedWidgets->tracking, SIGNAL(valueChanged(double)), this, SLOT(handleTracking()));
+ connect(advancedWidgets->scaleH , SIGNAL(valueChanged(double)), this, SLOT(handleTextScaleH()));
+ connect(advancedWidgets->scaleV , SIGNAL(valueChanged(double)), this, SLOT(handleTextScaleV()));
+ connect(advancedWidgets->minWordTrackingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleMinWordTracking()) );
+ connect(advancedWidgets->normWordTrackingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleNormWordTracking()) );
+ connect(advancedWidgets->minGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleMinGlyphExtension()) );
+ connect(advancedWidgets->maxGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleMaxGlyphExtension()) );
+
+ connect(colorWidgets->revertButton, SIGNAL(clicked()) , this, SLOT(handleTextDirection()));
+ connect(colorWidgets->fillColor , SIGNAL(activated(int)), this, SLOT(handleTextFill()));
+ connect(colorWidgets->strokeColor , SIGNAL(activated(int)), this, SLOT(handleTextStroke()));
+ connect(colorWidgets->fillShade , SIGNAL(clicked()) , this, SLOT(handleTextShade()));
+ connect(colorWidgets->strokeShade , SIGNAL(clicked()) , this, SLOT(handleTextShade()));
+
+ connect(colorWidgets->textEffects, SIGNAL(State(int)) , this, SLOT(handleTypeStyle(int)));
+ connect(colorWidgets->textEffects->ShadowVal->Xoffset , SIGNAL(valueChanged(double)), this, SLOT(handleShadowOffs()));
+ connect(colorWidgets->textEffects->ShadowVal->Yoffset , SIGNAL(valueChanged(double)), this, SLOT(handleShadowOffs()));
+ connect(colorWidgets->textEffects->OutlineVal->LWidth , SIGNAL(valueChanged(double)), this, SLOT(handleOutlineWidth()));
+ connect(colorWidgets->textEffects->UnderlineVal->LPos , SIGNAL(valueChanged(double)), this, SLOT(handleUnderline()));
+ connect(colorWidgets->textEffects->UnderlineVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(handleUnderline()));
+ connect(colorWidgets->textEffects->StrikeVal->LPos , SIGNAL(valueChanged(double)), this, SLOT(handleStrikeThru()));
+ connect(colorWidgets->textEffects->StrikeVal->LWidth , SIGNAL(valueChanged(double)), this, SLOT(handleStrikeThru()));
+
+ connect(distanceWidgets->columns , SIGNAL(valueChanged(int)) , this, SLOT(handleColumns()));
+ connect(distanceWidgets->columnGap , SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
+ connect(distanceWidgets->columnGapLabel, SIGNAL(activated(int)) , this, SLOT(handleGapSwitch()));
+ connect(distanceWidgets->topDistance , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+ connect(distanceWidgets->leftDistance , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+ connect(distanceWidgets->rightDistance , SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+ connect(distanceWidgets->bottomDistance, SIGNAL(valueChanged(double)), this, SLOT(handleTextDistances()));
+ connect(distanceWidgets->tabsButton , SIGNAL( clicked() ) , this, SLOT( handleTabs() ) );
+
+ connect(flopBox->flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int)));
+
+ connect(optMargins->optMarginRadioNone , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+ connect(optMargins->optMarginRadioBoth , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+ connect(optMargins->optMarginRadioLeft , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+ connect(optMargins->optMarginRadioRight , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
+ connect(optMargins->optMarginResetButton, SIGNAL(clicked()), this, SLOT(resetOpticalMargins()) );
+
+ connect(pathTextWidgets->showCurveCheckBox, SIGNAL(clicked()) , this, SLOT(handlePathLine()));
+ connect(pathTextWidgets->pathTextType , SIGNAL(activated(int)), this, SLOT(handlePathType()));
+ connect(pathTextWidgets->flippedPathText , SIGNAL(clicked()) , this, SLOT(handlePathFlip()));
+ connect(pathTextWidgets->startOffset , SIGNAL(valueChanged(double)), this, SLOT(handlePathDist()));
+ connect(pathTextWidgets->distFromCurve , SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
+
connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(handleLineSpacingMode(int)));
- connect(optMarginRadioNone , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
- connect(optMarginRadioBoth , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
- connect(optMarginRadioLeft , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
- connect(optMarginRadioRight , SIGNAL(clicked()), this, SLOT(handleOpticalMargins()) );
- connect(optMarginResetButton, SIGNAL(clicked()), this, SLOT(resetOpticalMargins()) );
-
- connect(minWordTrackingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleMinWordTracking()) );
- connect(normWordTrackingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleNormWordTracking()) );
- connect(minGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleMinGlyphExtension()) );
- connect(maxGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(handleMaxGlyphExtension()) );
m_haveItem = false;
setEnabled(false);
- StrokeIcon->setEnabled(false);
- TxStroke->setEnabled(false);
- PM1->setEnabled(false);
- colgapLabel->setCurrentIndex(0);
}
void PropertiesPalette_Text::setMainWindow(ScribusMainWindow* mw)
@@ -466,30 +183,21 @@
m_haveDoc = true;
m_haveItem = false;
- Extra->setValues( -300, 300, 2, 0);
fontSize->setValues( 0.5, 2048, 2, 1);
lineSpacing->setValues( 1, 2048, 2, 1);
- minWordTrackingSpinBox->setValues(1, 100, 2, 100);
- normWordTrackingSpinBox->setValues(1, 200, 2, 100);
- minGlyphExtSpinBox->setValues(90, 110, 2, 100);
- maxGlyphExtSpinBox->setValues(90, 110, 2, 100);
-
- dGap->setDecimals(2);
- DTop->setDecimals(2);
- DLeft->setDecimals(2);
- DBottom->setDecimals(2);
- DRight->setDecimals(2);
- Dist->setMaximum( 30000 );
- Dist->setMinimum( 0 );
- Dist->setSingleStep(10);
- LineW->setMaximum( 300 );
- LineW->setMinimum( -300 );
- LineW->setSingleStep(10);
+
+
updateColorList();
paraStyleCombo->setDoc(m_doc);
charStyleCombo->setDoc(m_doc);
+
+ advancedWidgets->setDoc(m_doc);
+ distanceWidgets->setDoc(m_doc);
+ flopBox->setDoc(m_doc);
+ optMargins->setDoc(m_doc);
+ pathTextWidgets->setDoc(m_doc);
connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
connect(m_doc , SIGNAL(docChanged()) , this, SLOT(handleSelectionChanged()));
@@ -510,6 +218,12 @@
paraStyleCombo->setDoc(0);
charStyleCombo->setDoc(0);
+
+ advancedWidgets->setDoc(0);
+ distanceWidgets->setDoc(0);
+ flopBox->setDoc(0);
+ optMargins->setDoc(0);
+
m_haveItem = false;
setEnabled(false);
@@ -556,7 +270,7 @@
if (m_doc->m_Selection->count() > 1 )
{
setEnabled(false);
- flopRealHeight->setChecked(true);
+ flopBox->flopRealHeight->setChecked(true);
}
else
{
@@ -615,50 +329,50 @@
PageItem_TextFrame *i2=m_item->asTextFrame();
if (i2!=0)
{
- disconnect(dGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
- disconnect(DCol, SIGNAL(valueChanged(int)), this, SLOT(handleColumns()));
- DCol->setMaximum(qMax(qRound(i2->width() / qMax(i2->ColGap, 10.0)), 1));
- DCol->setMinimum(1);
- DCol->setValue(i2->Cols);
- dGap->setMinimum(0);
- if (colgapLabel->currentIndex() == 0)
+ disconnect(distanceWidgets->columnGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
+ disconnect(distanceWidgets->columns , SIGNAL(valueChanged(int)), this, SLOT(handleColumns()));
+ distanceWidgets->columns->setMaximum(qMax(qRound(i2->width() / qMax(i2->ColGap, 10.0)), 1));
+ distanceWidgets->columns->setMinimum(1);
+ distanceWidgets->columns->setValue(i2->Cols);
+ distanceWidgets->columnGap->setMinimum(0);
+ if (distanceWidgets->columnGapLabel->currentIndex() == 0)
{
- dGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
- dGap->setValue(i2->ColGap*m_unitRatio);
+ distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
+ distanceWidgets->columnGap->setValue(i2->ColGap*m_unitRatio);
}
else
{
- dGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
- dGap->setValue(i2->columnWidth()*m_unitRatio);
+ distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
+ distanceWidgets->columnGap->setValue(i2->columnWidth()*m_unitRatio);
}
- DLeft->setValue(i2->textToFrameDistLeft()*m_unitRatio);
- DTop->setValue(i2->textToFrameDistTop()*m_unitRatio);
- DBottom->setValue(i2->textToFrameDistBottom()*m_unitRatio);
- DRight->setValue(i2->textToFrameDistRight()*m_unitRatio);
- if (DCol->value() == 1)
+ distanceWidgets->leftDistance->setValue(i2->textToFrameDistLeft()*m_unitRatio);
+ distanceWidgets->topDistance->setValue(i2->textToFrameDistTop()*m_unitRatio);
+ distanceWidgets->bottomDistance->setValue(i2->textToFrameDistBottom()*m_unitRatio);
+ distanceWidgets->rightDistance->setValue(i2->textToFrameDistRight()*m_unitRatio);
+ if (distanceWidgets->columns->value() == 1)
{
- dGap->setEnabled(false);
- colgapLabel->setEnabled(false);
+ distanceWidgets->columnGap->setEnabled(false);
+ distanceWidgets->columnGapLabel->setEnabled(false);
}
else
{
- dGap->setEnabled(true);
- colgapLabel->setEnabled(true);
+ distanceWidgets->columnGap->setEnabled(true);
+ distanceWidgets->columnGapLabel->setEnabled(true);
}
// I put it here because itâs visually grouped with these elements
// but itâs a PageItem prop. and as such should be set without considering
// the frame type.
displayFirstLinePolicy(m_item->firstLineOffset());
- connect(dGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
- connect(DCol, SIGNAL(valueChanged(int)) , this, SLOT(handleColumns()));
+ connect(distanceWidgets->columnGap, SIGNAL(valueChanged(double)), this, SLOT(handleColumnGap()));
+ connect(distanceWidgets->columns, SIGNAL(valueChanged(int)) , this, SLOT(handleColumns()));
}
if (m_item->asTextFrame() || m_item->asPathText())
{
fonts->RebuildList(m_doc, m_item->isAnnotation());
}
- Revert->setChecked(m_item->reversed());
+ colorWidgets->revertButton->setChecked(m_item->reversed());
displayTextDistances(i->textToFrameDistLeft(),i->textToFrameDistTop(),i->textToFrameDistBottom(),i->textToFrameDistRight());
@@ -668,26 +382,26 @@
}
if (m_item->asPathText())
{
- pathTextType->setCurrentIndex(m_item->textPathType);
- flippedPathText->setChecked(m_item->textPathFlipped);
- showcurveCheckBox->setChecked(m_item->PoShow);
- LineW->setValue(m_item->BaseOffs * -1);
- Dist->setValue(m_item->textToFrameDistLeft());
flopItem->setHidden(true);
- DistanceItem->setHidden(true);
- Distance2Item->setHidden(false);
+ distanceItem->setHidden(true);
+ pathTextItem->setHidden(false);
+ pathTextWidgets->pathTextType->setCurrentIndex(m_item->textPathType);
+ pathTextWidgets->flippedPathText->setChecked(m_item->textPathFlipped);
+ pathTextWidgets->showCurveCheckBox->setChecked(m_item->PoShow);
+ pathTextWidgets->distFromCurve->setValue(m_item->BaseOffs * -1);
+ pathTextWidgets->startOffset->setValue(m_item->textToFrameDistLeft());
}
else if (m_item->asTextFrame())
{
flopItem->setHidden(false);
- DistanceItem->setHidden(false);
- Distance2Item->setHidden(true);
+ distanceItem->setHidden(false);
+ pathTextItem->setHidden(true);
}
else
{
flopItem->setHidden(false);
- DistanceItem->setHidden(false);
- Distance2Item->setHidden(true);
+ distanceItem->setHidden(false);
+ pathTextItem->setHidden(true);
}
m_haveItem = true;
@@ -712,15 +426,14 @@
return;
bool tmp = m_haveItem;
m_haveItem = false;
- double oldRatio = m_unitRatio;
- m_unitRatio = m_doc->unitRatio();
- m_unitIndex = m_doc->unitIndex();
-
- dGap->setNewUnit( m_unitIndex );
- DLeft->setNewUnit( m_unitIndex );
- DTop->setNewUnit( m_unitIndex );
- DBottom->setNewUnit( m_unitIndex );
- DRight->setNewUnit( m_unitIndex );
+
+ advancedWidgets->unitChange();
+ colorWidgets->unitChange();
+ distanceWidgets->unitChange();
+ flopBox->unitChange();
+ optMargins->unitChange();
+ pathTextWidgets->unitChange();
+
m_haveItem = tmp;
}
@@ -730,37 +443,37 @@
return;
bool tmp = m_haveItem;
m_haveItem = false;
- DCol->setValue(r);
- dGap->setValue(g*m_unitRatio);
+ distanceWidgets->columns->setValue(r);
+ distanceWidgets->columnGap->setValue(g*m_unitRatio);
if (tmp)
{
PageItem_TextFrame *i2=m_item->asTextFrame();
if (i2!=0)
{
- DCol->setMaximum(qMax(qRound(i2->width() / qMax(i2->ColGap, 10.0)), 1));
- if (colgapLabel->currentIndex() == 0)
+ distanceWidgets->columns->setMaximum(qMax(qRound(i2->width() / qMax(i2->ColGap, 10.0)), 1));
+ if (distanceWidgets->columnGapLabel->currentIndex() == 0)
{
- dGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
- dGap->setValue(i2->ColGap*m_unitRatio);
+ distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols - i2->textToFrameDistLeft() - i2->textToFrameDistRight())*m_unitRatio, 0.0));
+ distanceWidgets->columnGap->setValue(i2->ColGap*m_unitRatio);
}
else
{
- dGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
- dGap->setValue(i2->columnWidth()*m_unitRatio);
+ distanceWidgets->columnGap->setMaximum(qMax((i2->width() / i2->Cols)*m_unitRatio, 0.0));
+ distanceWidgets->columnGap->setValue(i2->columnWidth()*m_unitRatio);
}
}
}
- DCol->setMinimum(1);
- dGap->setMinimum(0);
- if (DCol->value() == 1)
- {
- dGap->setEnabled(false);
- colgapLabel->setEnabled(false);
+ distanceWidgets->columns->setMinimum(1);
+ distanceWidgets->columnGap->setMinimum(0);
+ if (distanceWidgets->columns->value() == 1)
+ {
+ distanceWidgets->columnGap->setEnabled(false);
+ distanceWidgets->columnGapLabel->setEnabled(false);
}
else
{
- dGap->setEnabled(true);
- colgapLabel->setEnabled(true);
+ distanceWidgets->columnGap->setEnabled(true);
+ distanceWidgets->columnGapLabel->setEnabled(true);
}
m_haveItem = tmp;
}
@@ -794,10 +507,7 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- DLeft->showValue(left*m_unitRatio);
- DTop->showValue(top*m_unitRatio);
- DBottom->showValue(bottom*m_unitRatio);
- DRight->showValue(right*m_unitRatio);
+ distanceWidgets->displayTextDistances(left, top, bottom, right);
}
void PropertiesPalette_Text::displayFontFace(const QString& newFont)
@@ -819,21 +529,21 @@
fontSize->showValue(s / 10.0);
}
-void PropertiesPalette_Text::displayExtra(double e)
-{
- if (!m_ScMW || m_ScMW->scriptIsRunning())
- return;
- Extra->showValue(e / 10.0);
+void PropertiesPalette_Text::displayTracking(double e)
+{
+ if (!m_ScMW || m_ScMW->scriptIsRunning())
+ return;
+ advancedWidgets->tracking->showValue(e / 10.0);
}
void PropertiesPalette_Text::displayFirstLinePolicy( FirstLineOffsetPolicy f )
{
if(f == FLOPFontAscent)
- flopFontAscent->setChecked(true);
+ flopBox->flopFontAscent->setChecked(true);
else if(f == FLOPLineSpacing)
- flopLineSpacing->setChecked(true);
+ flopBox->flopLineSpacing->setChecked(true);
else
- flopRealHeight->setChecked(true); //Itâs historical behaviour.
+ flopBox->flopRealHeight->setChecked(true); //Itâs historical behaviour.
}
void PropertiesPalette_Text::setupLineSpacingSpinbox(int mode, double value)
@@ -876,7 +586,7 @@
displayUnderline (charStyle.underlineOffset(), charStyle.underlineWidth());
displayBaseLineOffset(charStyle.baselineOffset());
- normWordTrackingSpinBox->showValue(charStyle.wordTracking() * 100.0);
+ advancedWidgets->normWordTrackingSpinBox->showValue(charStyle.wordTracking() * 100.0);
}
void PropertiesPalette_Text::updateStyle(const ParagraphStyle& newCurrent)
@@ -904,10 +614,11 @@
setupLineSpacingSpinbox(newCurrent.lineSpacingMode(), newCurrent.lineSpacing());
lineSpacingModeCombo->setCurrentIndex(newCurrent.lineSpacingMode());
textAlignment->setStyle(newCurrent.alignment());
- minWordTrackingSpinBox->showValue(newCurrent.minWordTracking() * 100.0);
- normWordTrackingSpinBox->showValue(newCurrent.charStyle().wordTracking() * 100.0);
- minGlyphExtSpinBox->showValue(newCurrent.minGlyphExtension() * 100.0);
- maxGlyphExtSpinBox->showValue(newCurrent.maxGlyphExtension() * 100.0);
+
+ advancedWidgets->minWordTrackingSpinBox->showValue(newCurrent.minWordTracking() * 100.0);
+ advancedWidgets->normWordTrackingSpinBox->showValue(newCurrent.charStyle().wordTracking() * 100.0);
+ advancedWidgets->minGlyphExtSpinBox->showValue(newCurrent.minGlyphExtension() * 100.0);
+ advancedWidgets->maxGlyphExtSpinBox->showValue(newCurrent.maxGlyphExtension() * 100.0);
displayOpticalMargins(newCurrent);
@@ -934,15 +645,15 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- StrokeIcon->setEnabled(false);
- TxStroke->setEnabled(false);
- PM1->setEnabled(false);
- SeStyle->setStyle(s);
+ colorWidgets->strokeIcon->setEnabled(false);
+ colorWidgets->strokeColor->setEnabled(false);
+ colorWidgets->strokeShade->setEnabled(false);
+ colorWidgets->textEffects->setStyle(s);
if ((s & 4) || (s & 256))
{
- StrokeIcon->setEnabled(true);
- TxStroke->setEnabled(true);
- PM1->setEnabled(true);
+ colorWidgets->strokeIcon->setEnabled(true);
+ colorWidgets->strokeColor->setEnabled(true);
+ colorWidgets->strokeShade->setEnabled(true);
}
}
@@ -980,11 +691,11 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
int omt(ParagraphStyle::OM_None);
- if (optMarginRadioBoth->isChecked())
- omt =ParagraphStyle::OM_Default;
- else if (optMarginRadioLeft->isChecked())
+ if (optMargins->optMarginRadioBoth->isChecked())
+ omt = ParagraphStyle::OM_Default;
+ else if (optMargins->optMarginRadioLeft->isChecked())
omt = ParagraphStyle::OM_LeftHangingPunct;
- else if (optMarginRadioRight->isChecked())
+ else if (optMargins->optMarginRadioRight->isChecked())
omt = ParagraphStyle::OM_RightHangingPunct;
m_doc->itemSelection_SetOpticalMargins(omt);
@@ -1000,16 +711,16 @@
void PropertiesPalette_Text::displayOpticalMargins(const ParagraphStyle & pStyle)
{
ParagraphStyle::OpticalMarginType omt(static_cast<ParagraphStyle::OpticalMarginType>(pStyle.opticalMargins()));
- bool blocked = optMarginRadioBoth->blockSignals(true);
+ bool blocked = optMargins->optMarginRadioBoth->blockSignals(true);
if (omt == ParagraphStyle::OM_Default)
- optMarginRadioBoth->setChecked(true);
+ optMargins->optMarginRadioBoth->setChecked(true);
else if (omt == ParagraphStyle::OM_LeftHangingPunct)
- optMarginRadioLeft->setChecked(true);
+ optMargins->optMarginRadioLeft->setChecked(true);
else if (omt == ParagraphStyle::OM_RightHangingPunct)
- optMarginRadioRight->setChecked(true);
+ optMargins->optMarginRadioRight->setChecked(true);
else
- optMarginRadioNone->setChecked(true);
- optMarginRadioBoth->blockSignals(blocked);
+ optMargins->optMarginRadioNone->setChecked(true);
+ optMargins->optMarginRadioBoth->blockSignals(blocked);
}
void PropertiesPalette_Text::handleMinWordTracking()
@@ -1017,7 +728,7 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
ParagraphStyle newStyle;
- newStyle.setMinWordTracking(minWordTrackingSpinBox->value() / 100.0);
+ newStyle.setMinWordTracking(advancedWidgets->minWordTrackingSpinBox->value() / 100.0);
m_doc->itemSelection_ApplyParagraphStyle(newStyle);
}
@@ -1027,7 +738,7 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
ParagraphStyle newStyle;
- newStyle.charStyle().setWordTracking(normWordTrackingSpinBox->value() / 100.0);
+ newStyle.charStyle().setWordTracking(advancedWidgets->normWordTrackingSpinBox->value() / 100.0);
m_doc->itemSelection_ApplyParagraphStyle(newStyle);
}
@@ -1036,7 +747,7 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
ParagraphStyle newStyle;
- newStyle.setMinGlyphExtension(minGlyphExtSpinBox->value() / 100.0);
+ newStyle.setMinGlyphExtension(advancedWidgets->minGlyphExtSpinBox->value() / 100.0);
m_doc->itemSelection_ApplyParagraphStyle(newStyle);
}
@@ -1045,7 +756,7 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
ParagraphStyle newStyle;
- newStyle.setMaxGlyphExtension(maxGlyphExtSpinBox->value() / 100.0);
+ newStyle.setMaxGlyphExtension(advancedWidgets->maxGlyphExtSpinBox->value() / 100.0);
m_doc->itemSelection_ApplyParagraphStyle(newStyle);
}
@@ -1054,42 +765,42 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- ChScaleV->showValue(e / 10.0);
+ advancedWidgets->scaleV->showValue(e / 10.0);
}
void PropertiesPalette_Text::handleTextScaleV()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_doc->itemSelection_SetScaleV(qRound(ChScaleV->value() * 10));
+ m_doc->itemSelection_SetScaleV(qRound(advancedWidgets->scaleV->value() * 10));
}
void PropertiesPalette_Text::handleBaselineOffset()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_doc->itemSelection_SetBaselineOffset(qRound(ChBase->value() * 10));
+ m_doc->itemSelection_SetBaselineOffset(qRound(advancedWidgets->textBase->value() * 10));
}
void PropertiesPalette_Text::displayTextScaleH(double e)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- ChScale->showValue(e / 10.0);
+ advancedWidgets->scaleH->showValue(e / 10.0);
}
void PropertiesPalette_Text::displayBaseLineOffset(double e)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- ChBase->showValue(e / 10.0);
+ advancedWidgets->textBase->showValue(e / 10.0);
}
void PropertiesPalette_Text::handleTextScaleH()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_doc->itemSelection_SetScaleH(qRound(ChScale->value() * 10));
+ m_doc->itemSelection_SetScaleH(qRound(advancedWidgets->scaleH->value() * 10));
}
void PropertiesPalette_Text::handleLineSpacing()
@@ -1104,29 +815,29 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
displayColumns(m_item->Cols, m_item->ColGap);
- dGap->setToolTip("");
- if (colgapLabel->currentIndex() == 0)
- dGap->setToolTip( tr( "Distance between columns" ) );
+ distanceWidgets->columnGap->setToolTip("");
+ if (distanceWidgets->columnGapLabel->currentIndex() == 0)
+ distanceWidgets->columnGap->setToolTip( tr( "Distance between columns" ) );
else
- dGap->setToolTip( tr( "Column width" ) );
+ distanceWidgets->columnGap->setToolTip( tr( "Column width" ) );
}
void PropertiesPalette_Text::handleColumns()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_item->Cols = DCol->value();
+ m_item->Cols = distanceWidgets->columns->value();
displayColumns(m_item->Cols, m_item->ColGap);
m_item->update();
- if (DCol->value() == 1)
- {
- dGap->setEnabled(false);
- colgapLabel->setEnabled(false);
+ if (distanceWidgets->columns->value() == 1)
+ {
+ distanceWidgets->columnGap->setEnabled(false);
+ distanceWidgets->columnGapLabel->setEnabled(false);
}
else
{
- dGap->setEnabled(true);
- colgapLabel->setEnabled(true);
+ distanceWidgets->columnGap->setEnabled(true);
+ distanceWidgets->columnGapLabel->setEnabled(true);
}
emit DocChanged();
}
@@ -1135,8 +846,8 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- if (colgapLabel->currentIndex() == 0)
- m_item->ColGap = dGap->value() / m_unitRatio;
+ if (distanceWidgets->columnGapLabel->currentIndex() == 0)
+ m_item->ColGap = distanceWidgets->columnGap->value() / m_unitRatio;
else
{
double lineCorr;
@@ -1144,7 +855,7 @@
lineCorr = m_item->lineWidth();
else
lineCorr = 0;
- double newWidth = dGap->value() / m_unitRatio;
+ double newWidth = distanceWidgets->columnGap->value() / m_unitRatio;
double newGap = qMax(((m_item->width() - m_item->textToFrameDistLeft() - m_item->textToFrameDistRight() - lineCorr) - (newWidth * m_item->Cols)) / (m_item->Cols - 1), 0.0);
m_item->ColGap = newGap;
}
@@ -1163,7 +874,7 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_doc->itemSelection_SetTracking(qRound(Extra->value() * 10.0));
+ m_doc->itemSelection_SetTracking(qRound(advancedWidgets->tracking->value() * 10.0));
}
void PropertiesPalette_Text::handleAlignement(int a)
@@ -1184,8 +895,8 @@
{
if ((m_haveDoc) && (m_haveItem))
{
- int x = qRound(SeStyle->ShadowVal->Xoffset->value() * 10.0);
- int y = qRound(SeStyle->ShadowVal->Yoffset->value() * 10.0);
+ int x = qRound(colorWidgets->textEffects->ShadowVal->Xoffset->value() * 10.0);
+ int y = qRound(colorWidgets->textEffects->ShadowVal->Yoffset->value() * 10.0);
m_doc->itemSelection_SetShadowOffsets(x, y);
}
}
@@ -1194,16 +905,16 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- SeStyle->ShadowVal->Xoffset->showValue(x / 10.0);
- SeStyle->ShadowVal->Yoffset->showValue(y / 10.0);
+ colorWidgets->textEffects->ShadowVal->Xoffset->showValue(x / 10.0);
+ colorWidgets->textEffects->ShadowVal->Yoffset->showValue(y / 10.0);
}
void PropertiesPalette_Text::handleUnderline()
{
if ((m_haveDoc) && (m_haveItem))
{
- int x = qRound(SeStyle->UnderlineVal->LPos->value() * 10.0);
- int y = qRound(SeStyle->UnderlineVal->LWidth->value() * 10.0);
+ int x = qRound(colorWidgets->textEffects->UnderlineVal->LPos->value() * 10.0);
+ int y = qRound(colorWidgets->textEffects->UnderlineVal->LWidth->value() * 10.0);
m_doc->itemSelection_SetUnderline(x, y);
}
}
@@ -1212,16 +923,16 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- SeStyle->UnderlineVal->LPos->showValue(p / 10.0);
- SeStyle->UnderlineVal->LWidth->showValue(w / 10.0);
+ colorWidgets->textEffects->UnderlineVal->LPos->showValue(p / 10.0);
+ colorWidgets->textEffects->UnderlineVal->LWidth->showValue(w / 10.0);
}
void PropertiesPalette_Text::handleStrikeThru()
{
if ((m_haveDoc) && (m_haveItem))
{
- int x = qRound(SeStyle->StrikeVal->LPos->value() * 10.0);
- int y = qRound(SeStyle->StrikeVal->LWidth->value() * 10.0);
+ int x = qRound(colorWidgets->textEffects->StrikeVal->LPos->value() * 10.0);
+ int y = qRound(colorWidgets->textEffects->StrikeVal->LWidth->value() * 10.0);
m_doc->itemSelection_SetStrikethru(x, y);
}
}
@@ -1230,20 +941,20 @@
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- SeStyle->StrikeVal->LPos->showValue(p / 10.0);
- SeStyle->StrikeVal->LWidth->showValue(w / 10.0);
+ colorWidgets->textEffects->StrikeVal->LPos->showValue(p / 10.0);
+ colorWidgets->textEffects->StrikeVal->LWidth->showValue(w / 10.0);
}
void PropertiesPalette_Text::displayOutlineW(double x)
{
if (!m_ScMW || m_ScMW->scriptIsRunning())
return;
- SeStyle->OutlineVal->LWidth->showValue(x / 10.0);
+ colorWidgets->textEffects->OutlineVal->LWidth->showValue(x / 10.0);
}
void PropertiesPalette_Text::handleOutlineWidth()
{
- int x = qRound(SeStyle->OutlineVal->LWidth->value() * 10.0);
+ int x = qRound(colorWidgets->textEffects->OutlineVal->LWidth->value() * 10.0);
if ((m_haveDoc) && (m_haveItem))
m_doc->itemSelection_SetOutlineWidth(x);
}
@@ -1254,7 +965,11 @@
return;
if ((m_haveDoc) && (m_haveItem))
{
- m_item->setTextToFrameDist(DLeft->value() / m_unitRatio, DRight->value() / m_unitRatio, DTop->value() / m_unitRatio, DBottom->value() / m_unitRatio);
+ double left = distanceWidgets->leftDistance->value() / m_unitRatio;
+ double right = distanceWidgets->rightDistance->value() / m_unitRatio;
+ double top = distanceWidgets->topDistance->value() / m_unitRatio;
+ double bottom = distanceWidgets->bottomDistance->value() / m_unitRatio;
+ m_item->setTextToFrameDist(left, right, top, bottom);
displayColumns(m_item->Cols, m_item->ColGap);
m_item->update();
emit DocChanged();
@@ -1272,7 +987,7 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- bool setter=Revert->isChecked();
+ bool setter = colorWidgets->revertButton->isChecked();
m_item->setImageFlippedH(setter);
m_item->setReversed(setter);
m_item->update();
@@ -1308,24 +1023,24 @@
if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- TxFill->updateBox(m_doc->PageColors, ColorCombo::fancyPixmaps, true);
- TxStroke->updateBox(m_doc->PageColors, ColorCombo::fancyPixmaps, false);
- TxFill->view()->setMinimumWidth(TxFill->view()->maximumViewportSize().width() + 24);
- TxStroke->view()->setMinimumWidth(TxStroke->view()->maximumViewportSize().width() + 24);
+ colorWidgets->fillColor->updateBox(m_doc->PageColors, ColorCombo::fancyPixmaps, true);
+ colorWidgets->strokeColor->updateBox(m_doc->PageColors, ColorCombo::fancyPixmaps, false);
+ colorWidgets->fillColor->view()->setMinimumWidth(colorWidgets->fillColor->view()->maximumViewportSize().width() + 24);
+ colorWidgets->strokeColor->view()->setMinimumWidth(colorWidgets->strokeColor->view()->maximumViewportSize().width() + 24);
}
void PropertiesPalette_Text::handleTextFill()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_doc->itemSelection_SetFillColor(TxFill->currentColor());
+ m_doc->itemSelection_SetFillColor(colorWidgets->fillColor->currentColor());
}
void PropertiesPalette_Text::handleTextStroke()
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_doc->itemSelection_SetStrokeColor(TxStroke->currentColor());
+ m_doc->itemSelection_SetStrokeColor(colorWidgets->strokeColor->currentColor());
}
void PropertiesPalette_Text::handleTextShade()
@@ -1333,14 +1048,14 @@
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
int b;
- if (PM1 == sender())
- {
- b = PM1->getValue();
+ if (colorWidgets->strokeShade == sender())
+ {
+ b = colorWidgets->strokeShade->getValue();
m_doc->itemSelection_SetStrokeShade(b);
}
else
{
- b = PM2->getValue();
+ b = colorWidgets->fillShade->getValue();
m_doc->itemSelection_SetFillShade(b);
}
}
@@ -1351,8 +1066,8 @@
return;
ColorList::Iterator it;
int c = 0;
- PM2->setValue(qRound(shb));
- PM1->setValue(qRound(shp));
+ colorWidgets->fillShade->setValue(qRound(shb));
+ colorWidgets->strokeShade->setValue(qRound(shp));
if ((b != CommonStrings::None) && (!b.isEmpty()))
{
c++;
@@ -1363,7 +1078,7 @@
c++;
}
}
- TxFill->setCurrentIndex(c);
+ colorWidgets->fillColor->setCurrentIndex(c);
c = 0;
if ((p != CommonStrings::None) && (!p.isEmpty()))
{
@@ -1374,7 +1089,7 @@
c++;
}
}
- TxStroke->setCurrentIndex(c);
+ colorWidgets->strokeColor->setCurrentIndex(c);
}
void PropertiesPalette_Text::handlePathType()
@@ -1390,7 +1105,7 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_item->textPathFlipped = flippedPathText->isChecked();
+ m_item->textPathFlipped = pathTextWidgets->flippedPathText->isChecked();
m_item->updatePolyClip();
m_item->update();
emit DocChanged();
@@ -1400,7 +1115,7 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_item->PoShow = showcurveCheckBox->isChecked();
+ m_item->PoShow = pathTextWidgets->showCurveCheckBox->isChecked();
m_item->update();
emit DocChanged();
}
@@ -1409,7 +1124,7 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_item->setTextToFrameDistLeft(Dist->value());
+ m_item->setTextToFrameDistLeft(pathTextWidgets->startOffset->value());
m_doc->AdjustItemSize(m_item);
m_item->updatePolyClip();
m_item->update();
@@ -1420,7 +1135,7 @@
{
if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
return;
- m_item->BaseOffs = -LineW->value();
+ m_item->BaseOffs = -pathTextWidgets->distFromCurve->value();
m_doc->AdjustItemSize(m_item);
m_item->updatePolyClip();
m_item->update();
@@ -1494,114 +1209,43 @@
void PropertiesPalette_Text::languageChange()
{
- columnsLabel->setText( tr("Colu&mns:"));
- int oldcolgapLabel = colgapLabel->currentIndex();
- colgapLabel->clear();
- colgapLabel->addItem( tr("Gap:"));
- colgapLabel->addItem( tr("Width:"));
- colgapLabel->setCurrentIndex(oldcolgapLabel);
- topLabel->setText( tr("To&p:"));
- bottomLabel->setText( tr("&Bottom:"));
- leftLabel->setText( tr("&Left:"));
- rightLabel->setText( tr("&Right:"));
- TabsButton->setText( tr("T&abulators..."));
- int oldPathType = pathTextType->currentIndex();
- pathTextType->clear();
- pathTextType->addItem( tr("Default"));
- pathTextType->addItem( tr("Stair Step"));
- pathTextType->addItem( tr("Skew"));
- pathTextType->setCurrentIndex(oldPathType);
- flippedPathText->setText( tr("Flip Text"));
- showcurveCheckBox->setText( tr("Show Curve"));
- pathTextTypeLabel->setText( tr("Type:"));
- startoffsetLabel->setText( tr("Start Offset:"));
- distfromcurveLabel->setText( tr("Distance from Curve:"));
paraStyleLabel->setText( tr("Paragraph St&yle:"));
charStyleLabel->setText( tr("Character St&yle:"));
- optMarginRadioNone->setText( tr("None","optical margins") );
- optMarginRadioBoth->setText( tr("Both Sides","optical margins") );
- optMarginRadioLeft->setText( tr("Left Only","optical margins") );
- optMarginRadioRight->setText( tr("Right Only","optical margins") );
- optMarginResetButton->setText( tr("Reset") );
- wordTrackingLabel->setText( tr("Word Tracking"));
- minWordTrackingLabel->setText( tr("Min:"));
- normWordTrackingLabel->setText( tr("Norm:"));
- glyphExtensionLabel->setText( tr("Glyph Extension"));
- minGlyphExtensionLabel->setText( tr("Min:"));
- maxGlyphExtensionLabel->setText( tr("Max:"));
+
colorWidgetsItem->setText(0, tr("Color & Effects"));
advancedWidgetsItem->setText(0, tr("Advanced Settings"));
flopItem->setText(0, tr("First Line Offset"));
- DistanceItem->setText(0, tr("Columns & Text Distances"));
- Distance2Item->setText(0, tr("Path Text Properties"));
+ distanceItem->setText(0, tr("Columns & Text Distances"));
+ pathTextItem->setText(0, tr("Path Text Properties"));
+
int oldLineSpacingMode = lineSpacingModeCombo->currentIndex();
lineSpacingModeCombo->clear();
lineSpacingModeCombo->addItem( tr("Fixed Linespacing"));
lineSpacingModeCombo->addItem( tr("Automatic Linespacing"));
lineSpacingModeCombo->addItem( tr("Align to Baseline Grid"));
lineSpacingModeCombo->setCurrentIndex(oldLineSpacingMode);
-
- QString pctSuffix=tr(" %");
- ChBase->setSuffix(pctSuffix);
- ChScale->setSuffix(pctSuffix);
- ChScaleV->setSuffix(pctSuffix);
- Extra->setSuffix(pctSuffix);
- minWordTrackingSpinBox->setSuffix(pctSuffix);
- normWordTrackingSpinBox->setSuffix(pctSuffix);
- minGlyphExtSpinBox->setSuffix(pctSuffix);
- maxGlyphExtSpinBox->setSuffix(pctSuffix);
QString ptSuffix = tr(" pt");
- Dist->setSuffix(ptSuffix);
- LineW->setSuffix(ptSuffix);
fontSize->setSuffix(ptSuffix);
lineSpacing->setSuffix(ptSuffix);
- QString ein = (m_haveDoc) ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
-
- dGap->setSuffix(ein);
- DLeft->setSuffix(ein);
- DTop->setSuffix(ein);
- DBottom->setSuffix(ein);
- DRight->setSuffix(ein);
-
- SeStyle->languageChange();
+ advancedWidgets->languageChange();
+ colorWidgets->languageChange();
+ distanceWidgets->languageChange();
+ flopBox->languageChange();
+ optMargins->languageChange();
+ pathTextWidgets->languageChange();
+
textAlignment->languageChange();
fontSize->setToolTip( tr("Font Size"));
- ChBase->setToolTip( tr("Offset to baseline of characters"));
- ChScale->setToolTip( tr("Scaling width of characters"));
- ChScaleV->setToolTip( tr("Scaling height of characters"));
- TxStroke->setToolTip( "<qt>" + tr("Color of text stroke and/or drop shadow, depending which is chosen.If both are chosen, then they share the same color.") + "</qt>" );
- TxFill->setToolTip( "<qt>" + tr("Color of selected text. If Outline text decoration is enabled, this color will be the fill color. If Drop Shadow Text is enabled, then this will be the top most color.") + "</qt>" );
- PM1->setToolTip( tr("Saturation of color of text stroke"));
- PM2->setToolTip( tr("Saturation of color of text fill"));
- Revert->setToolTip( tr("Right to Left Writing"));
- Extra->setToolTip( tr("Manual Tracking"));
+
lineSpacing->setToolTip( tr("Line Spacing"));
lineSpacingModeCombo->setToolTip( tr("Select the line spacing mode.") );
paraStyleCombo->setToolTip( tr("Paragraph style of currently selected text or paragraph"));
charStyleCombo->setToolTip( tr("Character style of currently selected text or paragraph"));
paraStyleClear->setToolTip( tr("Remove Direct Paragraph Formatting"));
charStyleClear->setToolTip( tr("Remove Direct Character Formatting"));
-
- flopRealHeight->setToolTip( "<qt>" + tr("Set the height of the first line of the text frame to use the tallest height of the included characters") + "</qt>" );
- flopFontAscent->setToolTip( "<qt>" + tr("Set the height of the first line of text frame to use the full ascent of the font(s) in use") + "</qt>" );
- flopLineSpacing->setToolTip( "<qt>" + tr("Set the height of the first line of the text frame to the specified line height") + "</qt>" );
-
- minWordTrackingSpinBox->setToolTip( tr("Minimal width of spaces between words"));
- normWordTrackingSpinBox->setToolTip( tr("Normal width of spaces between words"));
- minGlyphExtSpinBox->setToolTip( tr("Minimal shrinkage of glyphs for justification"));
- maxGlyphExtSpinBox->setToolTip( tr("Maximal extension of glyphs for justification"));
-
- DCol->setToolTip( tr("Number of columns in text frame"));
- colgapLabel->setToolTip( tr("Switches between Gap or Column width"));
- dGap->setToolTip( tr("Distance between columns"));
- DTop->setToolTip( tr("Distance of text from top of frame"));
- DBottom->setToolTip( tr("Distance of text from bottom of frame"));
- DLeft->setToolTip( tr("Distance of text from left of frame"));
- DRight->setToolTip( tr("Distance of text from right of frame"));
- TabsButton->setToolTip( tr("Edit tab settings of text frame..."));
}
void PropertiesPalette_Text::handleFirstLinePolicy(int radioFlop)
Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16087&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.h Mon Dec 13 02:21:43 2010
@@ -7,60 +7,32 @@
#ifndef PROPERTIESPALETTE_TEXT_H
#define PROPERTIESPALETTE_TEXT_H
-#include <QListWidgetItem>
-#include <QLineEdit>
-
-class QButtonGroup;
-class QCheckBox;
-class QCloseEvent;
-class QComboBox;
-class QEvent;
-class QEvent;
-class QFocusEvent;
-class QFrame;
-class QGridLayout;
-class QGroupBox;
-class QHBoxLayout;
-class QLabel;
-class QMenu;
-class QPushButton;
-class QRadioButton;
-class QSpinBox;
-class QStackedWidget;
-class QStackedWidget;
-class QToolBox;
-class QVBoxLayout;
-class QWidget;
-
#include "ui_propertiespalette_textbase.h"
#include "scribusapi.h"
#include "scrpalettebase.h"
#include "scrspinbox.h"
-#include "pageitem.h"
-#include "page.h"
-#include "linkbutton.h"
+
#include "linecombo.h"
#include "spalette.h"
#include "alignselect.h"
#include "shadebutton.h"
#include "sclistboxpixmap.h"
#include "scguardedptr.h"
+#include "sctextstruct.h"
#include "sctreewidget.h"
-class ArrowChooser;
-class Autoforms;
-class BasePointWidget;
-class ColorCombo;
-class DashEditor;
-class FontComboH;
+class PageItem;
+class PropertyWidget_Advanced;
+class PropertyWidget_Distance;
+class PropertyWidget_Flop;
+class PropertyWidget_OptMargins;
+class PropertyWidget_PathText;
+class PropertyWidget_TextColor;
class ScComboBox;
class ScribusDoc;
class ScribusMainWindow;
class Selection;
-class StyleSelect;
-class Tpalette;
-class UserActionSniffer;
class SCRIBUS_API PropertiesPalette_Text : public QWidget, public Ui::PropertiesPalette_TextBase
{
@@ -117,7 +89,6 @@
void displayColumns(int r, double g);
void displayFontFace(const QString&);
void displayFontSize(double s);
- void displayExtra(double e);
void displayFirstLinePolicy(FirstLineOffsetPolicy);
void displayLineSpacing(double r);
void displayOpticalMargins(const ParagraphStyle& pStyle);
@@ -130,6 +101,7 @@
void displayTextEffects(int s);
void displayTextScaleH(double e);
void displayTextScaleV(double e);
+ void displayTracking(double e);
void displayUnderline(double p, double w);
void setupLineSpacingSpinbox(int mode, double value);
@@ -187,107 +159,26 @@
protected:
- QGridLayout* layout41a;
- QGridLayout* layout41c;
- QHBoxLayout* Layout1;
- QGridLayout* DistanceLayout;
- QGridLayout* DistanceLayout2;
- QGridLayout* GroupBox3aLayout;
- QVBoxLayout* textFlowOptionsLayout2;
- QHBoxLayout* layout23;
- QHBoxLayout* layout24;
- QVBoxLayout* Layout1t;
- QHBoxLayout* wordTrackingHLayout;
- QHBoxLayout* glyphExtensionHLayout;
- QGridLayout* flopLayout;
- QVBoxLayout* OptMarginsLayout;
-
- QLabel* startoffsetLabel;
- QLabel* distfromcurveLabel;
- QLabel* pathTextTypeLabel;
- QLabel* topLabel;
- QLabel* columnsLabel;
- QLabel* bottomLabel;
- QLabel* leftLabel;
- QLabel* rightLabel;
- QLabel* trackingLabel;
- QLabel* StrokeIcon;
- QLabel* ShadeTxt2;
- QLabel* ShadeTxt1;
- QLabel* FillIcon;
- QLabel* langLabel;
- QLabel* ChBaseTxt;
- QLabel* ScaleTxt;
- QLabel* ScaleTxtV;
- QLabel* TransTxt;
- QLabel* TransTxt2;
- QLabel* wordTrackingLabel;
- QLabel* minWordTrackingLabel;
- QLabel* normWordTrackingLabel;
- QLabel* glyphExtensionLabel;
- QLabel* minGlyphExtensionLabel;
- QLabel* maxGlyphExtensionLabel;
-
- ScComboBox* colgapLabel;
- StyleSelect* SeStyle;
-
- ShadeButton *PM1;
- ShadeButton *PM2;
-
- QToolButton* TabsButton;
-
- QCheckBox* flippedPathText;
- QCheckBox* showcurveCheckBox;
-
ScComboBox* pathTextType;
QComboBox* langCombo;
- ColorCombo* TxStroke;
- ColorCombo* TxFill;
- QRadioButton *optMarginRadioNone;
- QRadioButton *optMarginRadioBoth;
- QRadioButton *optMarginRadioLeft;
- QRadioButton *optMarginRadioRight;
- QPushButton *optMarginResetButton;
- ScrSpinBox* dGap;
- ScrSpinBox* DTop;
- ScrSpinBox* DBottom;
- ScrSpinBox* DLeft;
- ScrSpinBox* DRight;
- ScrSpinBox* Dist;
- ScrSpinBox* LineW;
- ScrSpinBox* Extra;
- ScrSpinBox* ChScale;
- ScrSpinBox* ChScaleV;
- ScrSpinBox* ChBase;
- ScrSpinBox* minWordTrackingSpinBox;
- ScrSpinBox* normWordTrackingSpinBox;
- ScrSpinBox* minGlyphExtSpinBox;
- ScrSpinBox* maxGlyphExtSpinBox;
- QSpinBox* DCol;
- QSpinBox* TransSpin;
+ PropertyWidget_TextColor* colorWidgets;
+ QTreeWidgetItem* colorWidgetsItem;
- QRadioButton* flopRealHeight;
- QRadioButton* flopFontAscent;
- QRadioButton* flopLineSpacing;
+ PropertyWidget_Distance* distanceWidgets;
+ QTreeWidgetItem* distanceItem;
+
+ PropertyWidget_Advanced* advancedWidgets;
+ QTreeWidgetItem* advancedWidgetsItem;
+
+ PropertyWidget_OptMargins* optMargins;
+ QTreeWidgetItem* optMarginsItem;
+
+ PropertyWidget_Flop* flopBox;
+ QTreeWidgetItem* flopItem;
- QButtonGroup* flopGroup;
-
- QToolButton* Revert;
-
- QFrame* colorWidgets;
- QTreeWidgetItem* colorWidgetsItem;
- QFrame* advancedWidgets;
- QTreeWidgetItem* advancedWidgetsItem;
- /*QFrame* styleWidgets;*/
- QFrame* flopBox;
- QTreeWidgetItem* flopItem;
- QFrame* Distance;
- QTreeWidgetItem* DistanceItem;
- QFrame* Distance2;
- QTreeWidgetItem* Distance2Item;
- QFrame* OptMargins;
- QTreeWidgetItem* OptMarginsItem;
+ PropertyWidget_PathText* pathTextWidgets;
+ QTreeWidgetItem* pathTextItem;
signals:
void DocChanged();
Modified: branches/ScribusOIF/win32/vc8/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16087&path=/branches/ScribusOIF/win32/vc8/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.vcproj Mon Dec 13 02:21:43 2010
@@ -1515,6 +1515,30 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertywidget_advanced.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_distance.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_flop.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_optmargins.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_pathtext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_textcolor.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\pslib.cpp"
>
</File>
@@ -8300,6 +8324,198 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertywidget_advanced.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_distance.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_flop.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_optmargins.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_pathtext.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_textcolor.h"
+ >
+ <FileConfiguration
+ Name="Debug-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-cairo|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release-arthur|Win32"
+ >
+ <Tool
+ Name="moc.exe"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\scribus\pslib.h"
>
<FileConfiguration
@@ -11733,6 +11949,30 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_advancedbase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_distancebase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_flopbase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_optmarginsbase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_pathtextbase.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\ui_propertywidget_textcolorbase.h"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\ui_replacecolors.h"
>
</File>
@@ -12486,6 +12726,30 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_advanced.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_distance.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_flop.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_optmargins.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_pathtext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\moc_propertywidget_textcolor.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\moc_pslib.cpp"
>
</File>
@@ -13067,6 +13331,30 @@
>
</File>
<File
+ RelativePath="..\..\scribus\ui\propertywidget_advancedbase.ui"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_distancebase.ui"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_flopbase.ui"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_optmarginsbase.ui"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_pathtextbase.ui"
+ >
+ </File>
+ <File
+ RelativePath="..\..\scribus\ui\propertywidget_textcolorbase.ui"
+ >
+ </File>
+ <File
RelativePath="..\..\scribus\ui\replacecolors.ui"
>
</File>
More information about the scribus-commit
mailing list