Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

tabtools.cpp

Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #include "tabtools.h"
00008 
00009 #include <QHBoxLayout>
00010 #include <QGridLayout>
00011 #include <QVBoxLayout>
00012 #include <QSpacerItem>
00013 #include <QGroupBox>
00014 #include <QStackedWidget>
00015 #include <QLabel>
00016 #include <QSpinBox>
00017 #include <QToolButton>
00018 #include <QComboBox>
00019 #include <QCheckBox>
00020 #include <QRadioButton>
00021 #include <QToolTip>
00022 
00023 #include "sccombobox.h"
00024 #include "colorcombo.h"
00025 #include "units.h"
00026 #include "scrspinbox.h"
00027 #include "linecombo.h"
00028 #include "fontcombo.h"
00029 #include "polygonwidget.h"
00030 #include "arrowchooser.h"
00031 #include "linkbutton.h"
00032 #include "scribusstructs.h"
00033 #include "scribus.h"
00034 #include "util_icon.h"
00035 #include "prefsmanager.h"
00036 #include "scfonts.h"
00037 #include "sampleitem.h"
00038 #include "commonstrings.h"
00039 #include "colorlistbox.h"
00040 
00041 
00042 TabTools::TabTools( QWidget* parent, struct toolPrefs *prefsData, int unitIndex, ScribusDoc* doc) : QWidget( parent )
00043 {
00044     docu = doc;
00045     fontPreview = false;
00046 
00047     tabToolsLayout = new QHBoxLayout(this);
00048     tabToolsLayout->setMargin(0);
00049     tabToolsLayout->setSpacing(5);
00050     buttonGroupTools = new QGroupBox( this );
00051     buttonGroupToolsLayout = new QVBoxLayout(buttonGroupTools);
00052     buttonGroupToolsLayout->setMargin(5);
00053     buttonGroupToolsLayout->setSpacing(5);
00054     toolText = new QToolButton( buttonGroupTools );
00055     toolText->setCheckable( true );
00056     toolText->setAutoExclusive(true);
00057     toolText->setIconSize(QSize(16, 16));
00058     toolText->setIcon( QIcon( loadIcon("16/insert-text-frame.png") ) );
00059     buttonGroupToolsLayout->addWidget( toolText );
00060     toolImage = new QToolButton( buttonGroupTools );
00061     toolImage->setCheckable( true );
00062     toolImage->setAutoExclusive(true);
00063     toolImage->setIconSize(QSize(16, 16));
00064     toolImage->setIcon( QIcon( loadIcon("16/insert-image.png") ) );
00065     buttonGroupToolsLayout->addWidget( toolImage );
00066     toolShape = new QToolButton( buttonGroupTools );
00067     toolShape->setCheckable( true );
00068     toolShape->setAutoExclusive(true);
00069     toolShape->setIconSize(QSize(16, 16));
00070     toolShape->setIcon( QIcon( loadIcon("16/draw-rectangle.png") ) );
00071     buttonGroupToolsLayout->addWidget( toolShape);
00072     toolPoly = new QToolButton( buttonGroupTools );
00073     toolPoly->setCheckable( true );
00074     toolPoly->setAutoExclusive(true);
00075     toolPoly->setIconSize(QSize(16, 16));
00076     toolPoly->setIcon( QIcon( loadIcon("16/draw-polygon.png") ) );
00077     buttonGroupToolsLayout->addWidget( toolPoly );
00078     toolLine = new QToolButton( buttonGroupTools );
00079     toolLine->setCheckable( true );
00080     toolLine->setAutoExclusive(true);
00081     toolLine->setIconSize(QSize(16, 16));
00082     toolLine->setIcon( QIcon( loadIcon("Stift.xpm") ) );
00083     buttonGroupToolsLayout->addWidget( toolLine );
00084     toolZoom = new QToolButton( buttonGroupTools );
00085     toolZoom->setCheckable( true );
00086     toolZoom->setAutoExclusive(true);
00087     toolZoom->setIconSize(QSize(16, 16));
00088     toolZoom->setIcon( QIcon( loadIcon("16/zoom.png") ) );
00089     buttonGroupToolsLayout->addWidget( toolZoom );
00090     toolMisc = new QToolButton( buttonGroupTools );
00091     toolMisc->setCheckable( true );
00092     toolMisc->setAutoExclusive(true);
00093     toolMisc->setIconSize(QSize(16, 16));
00094     toolMisc->setIcon( QIcon( loadIcon("configure.png") ) );
00095     buttonGroupToolsLayout->addWidget( toolMisc );
00096     QSpacerItem *spacer = new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding );
00097     buttonGroupToolsLayout->addItem( spacer );
00098     tabToolsLayout->addWidget( buttonGroupTools );
00099 
00100     subStackTools = new QStackedWidget( this );
00101     subStackTools->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
00102     subStackTools->setFrameShape( QFrame::StyledPanel );
00103     subStackTools->setFrameShadow( QFrame::Sunken );
00104     QFont f(this->font());
00105     f.setPointSize(f.pointSize()+3);
00106     f.setBold(true);
00107 
00108     subTabText = new QWidget( subStackTools);
00109     subTabTextLayout = new QGridLayout( subTabText );
00110     subTabTextLayout->setMargin(10);
00111     subTabTextLayout->setSpacing(5);
00112     subTabTextLayout->setAlignment( Qt::AlignTop );
00113     textHeadLine = new QLabel( tr( "Text" ), subTabText );
00114     textHeadLine->setFont(f);
00115     subTabTextLayout->addWidget( textHeadLine, 0, 0, 1, 4, Qt::AlignHCenter | Qt::AlignTop );
00116     fontComboText = new FontCombo(subTabText);
00117     subTabTextLayout->addWidget( fontComboText, 1, 1, 1, 2, Qt::AlignLeft );
00118     textLabel1b = new QLabel(tr( "Font:" ), subTabText );
00119     textLabel1b->setBuddy(fontComboText);
00120     subTabTextLayout->addWidget( textLabel1b, 1, 0 );
00121     sizeComboText = new ScComboBox( subTabText );
00122 
00123     subTabTextLayout->addWidget( sizeComboText, 2, 1, 1, 2, Qt::AlignLeft );
00124     textLabel2b = new QLabel(tr( "Size:" ), subTabText );
00125     textLabel2b->setBuddy(sizeComboText);
00126     subTabTextLayout->addWidget( textLabel2b, 2, 0 );
00127 
00128     colorComboText = new ColorCombo( false, subTabText );
00129 
00130     subTabTextLayout->addWidget( colorComboText, 3, 1 );
00131     textLabel3b = new QLabel(tr( "Text Color:" ), subTabText );
00132     textLabel3b->setBuddy(colorComboText);
00133     subTabTextLayout->addWidget( textLabel3b, 3, 0 );
00134     shadingText = new QSpinBox( subTabText );
00135     shadingText->setMaximum( 100 );
00136     shadingText->setSuffix( tr( " %" ) );
00137     shadingText->setMinimum( 0 );
00138     subTabTextLayout->addWidget( shadingText, 3, 3, Qt::AlignLeft );
00139     textLabelTS = new QLabel(tr( "Shading:" ), subTabText );
00140     textLabelTS->setBuddy(shadingText);
00141     subTabTextLayout->addWidget( textLabelTS, 3, 2 );
00142 
00143     colorComboStrokeText = new ColorCombo( false, subTabText );
00144 
00145     subTabTextLayout->addWidget( colorComboStrokeText, 4, 1 );
00146     textLabel3b2 = new QLabel(tr( "Text Stroke:" ), subTabText);
00147     textLabel3b2->setBuddy(colorComboStrokeText);
00148     subTabTextLayout->addWidget( textLabel3b2, 4, 0 );
00149     shadingTextStroke = new QSpinBox( subTabText);
00150     shadingTextStroke->setMaximum( 100 );
00151     shadingTextStroke->setSuffix( tr( " %" ) );
00152     shadingTextStroke->setMinimum( 0 );
00153 
00154     subTabTextLayout->addWidget( shadingTextStroke, 4, 3, Qt::AlignLeft );
00155     textLabelTSS = new QLabel( tr( "Shading:" ), subTabText);
00156     textLabelTSS->setBuddy(shadingTextStroke);
00157     subTabTextLayout->addWidget( textLabelTSS, 4, 2 );
00158 
00159     colorComboTextBackground = new ColorCombo( false, subTabText );
00160 
00161     subTabTextLayout->addWidget( colorComboTextBackground, 5, 1 );
00162     textLabel3bT = new QLabel(tr( "Fill Color:" ), subTabText);
00163     textLabel3bT->setBuddy(colorComboTextBackground);
00164     subTabTextLayout->addWidget( textLabel3bT, 5, 0 );
00165     shadingTextBack = new QSpinBox( subTabText);
00166     shadingTextBack->setMaximum( 100 );
00167     shadingTextBack->setSuffix( tr( " %" ) );
00168     shadingTextBack->setMinimum( 0 );
00169 
00170     subTabTextLayout->addWidget( shadingTextBack, 5, 3, Qt::AlignLeft );
00171     textLabelTSB = new QLabel(tr( "Shading:" ), subTabText);
00172     textLabelTSB->setBuddy(shadingTextBack);
00173     subTabTextLayout->addWidget( textLabelTSB, 5, 2 );
00174 
00175     colorComboTextLine = new ColorCombo( false, subTabText );
00176 
00177     subTabTextLayout->addWidget( colorComboTextLine, 6, 1 );
00178     textLabel3bTL = new QLabel(tr( "Stroke Color:" ), subTabText);
00179     textLabel3bTL->setBuddy(colorComboTextLine);
00180     subTabTextLayout->addWidget( textLabel3bTL, 6, 0 );
00181     shadingTextLine = new QSpinBox( subTabText );
00182     shadingTextLine->setMaximum( 100 );
00183     shadingTextLine->setSuffix( tr( " %" ) );
00184     shadingTextLine->setMinimum( 0 );
00185 
00186     subTabTextLayout->addWidget( shadingTextLine, 6, 3, Qt::AlignLeft );
00187     textLabelTSL = new QLabel(tr( "Shading:" ), subTabText);
00188     textLabelTSL->setBuddy(shadingTextLine);
00189     subTabTextLayout->addWidget( textLabelTSL, 6, 2 );
00190 
00191     tabFillCombo = new ScComboBox( subTabText );
00192 
00193     subTabTextLayout->addWidget( tabFillCombo, 7, 1, Qt::AlignLeft );
00194     textLabel3b2t = new QLabel(tr( "Tab Fill Character:" ), subTabText);
00195     textLabel3b2t->setBuddy(tabFillCombo);
00196     subTabTextLayout->addWidget( textLabel3b2t, 7, 0 );
00197     gapTab = new ScrSpinBox( 1, 200, subTabText, unitIndex );
00198 
00199     subTabTextLayout->addWidget( gapTab, 7, 3, Qt::AlignLeft );
00200     textLabel3b2t2 = new QLabel(tr( "Tab Width:" ), subTabText);
00201     textLabel3b2t2->setBuddy(gapTab);
00202     subTabTextLayout->addWidget( textLabel3b2t2, 7, 2 );
00203     columnsText = new QSpinBox( subTabText );
00204     columnsText->setMinimum( 1 );
00205     columnsText->setMaximum(100);
00206 
00207     subTabTextLayout->addWidget( columnsText, 8, 1, Qt::AlignLeft );
00208     textLabel4b = new QLabel(tr("Colu&mns:"), subTabText);
00209     textLabel4b->setBuddy(columnsText);
00210     subTabTextLayout->addWidget( textLabel4b, 8, 0 );
00211     gapText = new ScrSpinBox( 0, 200, subTabText, unitIndex );
00212 
00213     subTabTextLayout->addWidget( gapText, 8, 3, Qt::AlignLeft );
00214     textLabel5b = new QLabel(tr("&Gap:"), subTabText);
00215     textLabel5b->setBuddy(gapText);
00216     subTabTextLayout->addWidget( textLabel5b, 8, 2 );
00217     previewText = new QLabel( tr( "Woven silk pyjamas exchanged for blue quartz" ), subTabText);
00218     previewText->setMinimumSize(QSize(400, 170));
00219     previewText->setMaximumSize(QSize(400, 170));
00220     previewText->setFrameShape(QFrame::Box);
00221     previewText->setAlignment( Qt::AlignTop | Qt::AlignLeft );
00222     subTabTextLayout->addWidget( previewText, 9, 0, 1, 4 );
00223     subStackTools->addWidget( subTabText );
00224 
00225     subTabShape = new QWidget( subStackTools);
00226     subTabShapeLayout = new QGridLayout( subTabShape );
00227     subTabShapeLayout->setMargin(10);
00228     subTabShapeLayout->setSpacing(5);
00229     subTabShapeLayout->setAlignment( Qt::AlignTop );
00230     shapeHeadLine = new QLabel( tr( "Shapes" ), subTabShape);
00231     shapeHeadLine->setFont(f);
00232     subTabShapeLayout->addWidget( shapeHeadLine, 0, 0, 1, 2, Qt::AlignHCenter | Qt::AlignTop );
00233     colorComboLineShape = new ColorCombo( false, subTabShape );
00234 
00235     subTabShapeLayout->addWidget( colorComboLineShape, 1, 1, Qt::AlignLeft );
00236     textLabel7b = new QLabel(tr( "&Line Color:" ), subTabShape );
00237     textLabel7b->setBuddy(colorComboLineShape);
00238     subTabShapeLayout->addWidget( textLabel7b, 1, 0 );
00239     shadingLineShape = new QSpinBox( subTabShape );
00240     shadingLineShape->setMaximum( 100 );
00241     shadingLineShape->setSuffix( tr( " %" ) );
00242     shadingLineShape->setMinimum( 0 );
00243 
00244     subTabShapeLayout->addWidget( shadingLineShape, 2, 1, Qt::AlignLeft );
00245     textLabel8b = new QLabel(tr( "&Shading:" ), subTabShape );
00246     textLabel8b->setBuddy(shadingLineShape);
00247     subTabShapeLayout->addWidget( textLabel8b, 2, 0 );
00248     comboFillShape = new ColorCombo( false, subTabShape );
00249 
00250     subTabShapeLayout->addWidget( comboFillShape, 3, 1, Qt::AlignLeft );
00251     textLabel9b = new QLabel(tr( "&Fill Color:" ), subTabShape);
00252     textLabel9b->setBuddy(comboFillShape);
00253     subTabShapeLayout->addWidget( textLabel9b, 3, 0 );
00254     shadingFillShape = new QSpinBox( subTabShape );
00255     shadingFillShape->setMaximum( 100 );
00256     shadingFillShape->setSuffix( tr( " %" ) );
00257     shadingFillShape->setMinimum( 0 );
00258 
00259     subTabShapeLayout->addWidget( shadingFillShape, 4, 1, Qt::AlignLeft );
00260     textLabel10b = new QLabel(tr( "S&hading:" ), subTabShape);
00261     textLabel10b->setBuddy(shadingFillShape);
00262     subTabShapeLayout->addWidget( textLabel10b, 4, 0 );
00263     comboStyleShape = new LineCombo(subTabShape);
00264     comboStyleShape->setEditable(false);
00265 
00266     subTabShapeLayout->addWidget( comboStyleShape, 5, 1, Qt::AlignLeft );
00267     textLabel11b = new QLabel(tr( "Line Style:" ), subTabShape);
00268     textLabel11b->setBuddy(comboStyleShape);
00269     subTabShapeLayout->addWidget( textLabel11b, 5, 0 );
00270     lineWidthShape = new ScrSpinBox( 0, 36, subTabShape, 1 );
00271     lineWidthShape->setDecimals(1);
00272     lineWidthShape->setSuffix( tr( " pt" ) );
00273 
00274     subTabShapeLayout->addWidget( lineWidthShape, 6, 1, Qt::AlignLeft );
00275     textLabel12b = new QLabel(tr( "Line &Width:" ), subTabShape);
00276     textLabel12b->setBuddy(lineWidthShape);
00277     subTabShapeLayout->addWidget( textLabel12b, 6, 0 );
00278     subStackTools->addWidget( subTabShape );
00279 
00280     subTabLine = new QWidget( subStackTools );
00281     subTabLineLayout = new QGridLayout( subTabLine );
00282     subTabLineLayout->setMargin(10);
00283     subTabLineLayout->setSpacing(5);
00284     subTabLineLayout->setAlignment( Qt::AlignTop );
00285     lineHeadLine = new QLabel( tr( "Lines" ), subTabLine);
00286     lineHeadLine->setFont(f);
00287     subTabLineLayout->addWidget( lineHeadLine, 0, 0, 1, 3, Qt::AlignHCenter | Qt::AlignTop );
00288     colorComboLine = new ColorCombo( false, subTabLine );
00289 
00290     subTabLineLayout->addWidget( colorComboLine, 1, 1, Qt::AlignLeft );
00291     textLabel13b = new QLabel(tr("&Line Color:"), subTabLine );
00292     textLabel13b->setBuddy(colorComboLine);
00293     subTabLineLayout->addWidget( textLabel13b, 1, 0 );
00294     shadingLine = new QSpinBox( subTabLine );
00295     shadingLine->setMaximum( 100 );
00296 
00297     shadingLine->setSuffix( tr( " %" ) );
00298     subTabLineLayout->addWidget( shadingLine, 2, 1, Qt::AlignLeft );
00299     textLabel14b = new QLabel(tr("&Shading:"), subTabLine);
00300     textLabel14b->setBuddy(shadingLine);
00301     subTabLineLayout->addWidget( textLabel14b, 2, 0 );
00302     comboStyleLine = new LineCombo(subTabLine);
00303     comboStyleLine->setEditable(false);
00304 
00305     subTabLineLayout->addWidget( comboStyleLine, 3, 1, Qt::AlignLeft );
00306     textLabel15b = new QLabel(tr("Line S&tyle:"), subTabLine);
00307     textLabel15b->setBuddy(subTabLine);
00308     subTabLineLayout->addWidget( textLabel15b, 3, 0 );
00309     startArrow = new ArrowChooser(subTabLine, true);
00310     subTabLineLayout->addWidget( startArrow, 5, 1 );
00311     endArrow = new ArrowChooser(subTabLine, false);
00312     subTabLineLayout->addWidget( endArrow, 5, 2 );
00313 
00314     arrowText = new QLabel( tr( "Arrows:" ), subTabLine);
00315     subTabLineLayout->addWidget( arrowText, 4, 0, 2, 1 );
00316     startArrowText = new QLabel(tr( "Start:" ), subTabLine);
00317     startArrowText->setBuddy(startArrow);
00318     subTabLineLayout->addWidget( startArrowText, 4, 1 );
00319     endArrowText = new QLabel(tr( "End:" ), subTabLine);
00320     endArrowText->setBuddy(endArrow);
00321     subTabLineLayout->addWidget( endArrowText, 4, 2 );
00322     lineWidthLine = new ScrSpinBox( 0, 36, subTabLine, 1 );
00323     lineWidthLine->setDecimals(1);
00324     lineWidthLine->setSuffix( tr( " pt" ) );
00325 
00326     subTabLineLayout->addWidget( lineWidthLine, 6, 1, Qt::AlignLeft );
00327     textLabel16b = new QLabel(tr("Line &Width:"), subTabLine);
00328     textLabel16b->setBuddy(lineWidthLine);
00329     subTabLineLayout->addWidget( textLabel16b, 6, 0 );
00330     subStackTools->addWidget( subTabLine );
00331 
00332     subTabImage = new QWidget( subStackTools );
00333     subTabImageLayout = new QGridLayout( subTabImage );
00334     subTabImageLayout->setMargin(10);
00335     subTabImageLayout->setSpacing(5);
00336     subTabImageLayout->setAlignment( Qt::AlignTop );
00337     imageHeadLine = new QLabel( tr( "Images" ), subTabImage);
00338     imageHeadLine->setFont(f);
00339     subTabImageLayout->addWidget( imageHeadLine, 0, 0, 1, 2, Qt::AlignHCenter | Qt::AlignTop );
00340 
00341     buttonGroup3 = new QGroupBox( subTabImage );
00342     buttonGroup3->setCheckable( true );
00343     buttonGroup3->setTitle( tr( "&Free Scaling" ) );
00344     buttonGroup3Layout = new QGridLayout( buttonGroup3 );
00345     buttonGroup3Layout->setMargin(10);
00346     buttonGroup3Layout->setSpacing(5);
00347     buttonGroup3Layout->setAlignment( Qt::AlignTop );
00348     scalingHorizontal = new QSpinBox( buttonGroup3 );
00349     scalingHorizontal->setMaximum( 1000 );
00350     scalingHorizontal->setMinimum( 1 );
00351 
00352     scalingHorizontal->setSuffix( tr( " %" ) );
00353     buttonGroup3Layout->addWidget( scalingHorizontal, 0, 1, Qt::AlignRight );
00354     textLabel17b = new QLabel(tr("&Horizontal Scaling:"), buttonGroup3);
00355     textLabel17b->setBuddy(scalingHorizontal);
00356     buttonGroup3Layout->addWidget( textLabel17b, 0, 0 );
00357     scalingVertical = new QSpinBox(buttonGroup3);
00358     scalingVertical->setMaximum( 1000 );
00359     scalingVertical->setMinimum( 1 );
00360     scalingVertical->setSuffix( tr( " %" ) );
00361 
00362     buttonGroup3Layout->addWidget( scalingVertical, 1, 1, Qt::AlignRight );
00363     textLabel18b = new QLabel(tr( "&Vertical Scaling:" ), buttonGroup3);
00364     textLabel18b->setBuddy(scalingVertical);
00365     buttonGroup3Layout->addWidget( textLabel18b, 1, 0 );
00366     chainButton = new LinkButton( buttonGroup3 );
00367     chainButton->setCheckable( true );
00368     chainButton->setAutoRaise(true);
00369     buttonGroup3Layout->addWidget( chainButton, 0, 2, 2, 1, Qt::AlignLeft );
00370     subTabImageLayout->addWidget( buttonGroup3, 1, 0, 1, 2 );
00371 
00372     buttonGroup5 = new QGroupBox( subTabImage);
00373     buttonGroup5->setCheckable( true );
00374     buttonGroup5->setTitle( tr( "&Scale Image to Frame Size" ) );
00375     buttonGroup5Layout = new QHBoxLayout( buttonGroup5 );
00376     buttonGroup5Layout->setMargin(10);
00377     buttonGroup5Layout->setSpacing(5);
00378     buttonGroup5Layout->setAlignment( Qt::AlignTop );
00379     checkRatioImage = new QCheckBox( buttonGroup5);
00380     checkRatioImage->setText( tr( "Keep Aspect &Ratio" ) );
00381     buttonGroup5Layout->addWidget( checkRatioImage );
00382     subTabImageLayout->addWidget( buttonGroup5, 2, 0, 1, 2 );
00383     
00384     comboFillImage = new ColorCombo( false, subTabImage );
00385     subTabImageLayout->addWidget( comboFillImage, 3, 1, Qt::AlignLeft );
00386     textLabel19b = new QLabel(tr( "F&ill Color:" ), subTabImage);
00387     textLabel19b->setBuddy(comboFillImage);
00388     subTabImageLayout->addWidget( textLabel19b, 3, 0 );
00389     shadingFillImage = new QSpinBox( subTabImage );
00390     shadingFillImage->setMaximum( 100 );
00391 
00392     shadingFillImage->setSuffix( tr( " %" ) );
00393     subTabImageLayout->addWidget( shadingFillImage, 4, 1, Qt::AlignLeft );
00394     textLabel20b = new QLabel(tr( "S&hading:" ), subTabImage);
00395     textLabel20b->setBuddy(shadingFillImage);
00396     subTabImageLayout->addWidget( textLabel20b, 4, 0 );
00397     embeddedPath = new QCheckBox( subTabImage);
00398     embeddedPath->setText( tr( "Use embedded Clipping Path" ) );
00399 
00400     subTabImageLayout->addWidget( embeddedPath, 5, 0, 1, 2 );
00401     buttonGroupRes = new QGroupBox( subTabImage);
00402     buttonGroupRes->setTitle( tr( "On Screen Preview" ) );
00403     buttonGroupResLayout = new QVBoxLayout( buttonGroupRes );
00404     buttonGroupResLayout->setSpacing( 5 );
00405     buttonGroupResLayout->setMargin( 10 );
00406     buttonGroupResLayout->setAlignment( Qt::AlignTop );
00407     checkFullRes = new QRadioButton( buttonGroupRes);
00408     checkFullRes->setText( tr( "Full Resolution Preview" ) );
00409     buttonGroupResLayout->addWidget( checkFullRes );
00410     checkNormalRes = new QRadioButton( buttonGroupRes);
00411     checkNormalRes->setText( tr( "Normal Resolution Preview" ) );
00412     buttonGroupResLayout->addWidget( checkNormalRes );
00413     checkHalfRes = new QRadioButton( buttonGroupRes);
00414     checkHalfRes->setText( tr( "Low Resolution Preview" ) );
00415     buttonGroupResLayout->addWidget( checkHalfRes );
00416 
00417     subTabImageLayout->addWidget( buttonGroupRes, 6, 0, 1, 2 );
00418     subStackTools->addWidget( subTabImage );
00419 
00420     subTabPolygon = new QWidget( subStackTools);
00421     subTabPolygonLayout = new QGridLayout( subTabPolygon );
00422     subTabPolygonLayout->setSpacing( 5 );
00423     subTabPolygonLayout->setMargin( 10 );
00424     subTabPolygonLayout->setAlignment( Qt::AlignTop );
00425     polygonHeadLine = new QLabel( tr( "Regular Polygons" ), subTabPolygon);
00426     polygonHeadLine->setFont(f);
00427     subTabPolygonLayout->addWidget( polygonHeadLine, 0, 0, Qt::AlignHCenter | Qt::AlignTop );
00428     polyWidget = new PolygonWidget(subTabPolygon, prefsData->polyC, prefsData->polyFd, prefsData->polyF, prefsData->polyS, prefsData->polyR);
00429     subTabPolygonLayout->addWidget( polyWidget, 1, 0 );
00430     subStackTools->addWidget( subTabPolygon );
00431 
00432     subTabZoom = new QWidget( subStackTools);
00433     subTabZoomLayout = new QGridLayout( subTabZoom );
00434     subTabZoomLayout->setSpacing( 5 );
00435     subTabZoomLayout->setMargin( 10 );
00436     subTabZoomLayout->setAlignment( Qt::AlignTop );
00437     zoomHeadLine = new QLabel( tr( "Zoom" ), subTabZoom);
00438     zoomHeadLine->setFont(f);
00439     subTabZoomLayout->addWidget( zoomHeadLine, 0, 0, 1, 2, Qt::AlignHCenter | Qt::AlignTop );
00440     minimumZoom = new QSpinBox( subTabZoom);
00441     minimumZoom->setMaximum( 3200 );
00442     minimumZoom->setMinimum( 10 );
00443     minimumZoom->setSuffix( tr( " %" ) );
00444     subTabZoomLayout->addWidget( minimumZoom, 1, 1, Qt::AlignLeft );
00445     textLabel21b = new QLabel( tr( "Mi&nimum:" ), subTabZoom);
00446     textLabel21b->setBuddy(minimumZoom);
00447     subTabZoomLayout->addWidget( textLabel21b, 1, 0);
00448 
00449     maximumZoom = new QSpinBox( subTabZoom);
00450     maximumZoom->setMaximum( 3200 );
00451     maximumZoom->setMinimum( 10 );
00452     maximumZoom->setSuffix( tr( " %" ) );
00453     subTabZoomLayout->addWidget( maximumZoom, 2, 1, Qt::AlignLeft );
00454     textLabel22b = new QLabel( tr( "Ma&ximum:" ), subTabZoom);
00455     textLabel22b->setBuddy(maximumZoom);
00456     subTabZoomLayout->addWidget( textLabel22b, 2, 0 );
00457     
00458     zoomStep = new QSpinBox(subTabZoom);
00459     zoomStep->setMaximum(500);
00460     zoomStep->setMinimum(100);
00461     zoomStep->setSuffix( tr( " %" ) );
00462     subTabZoomLayout->addWidget( zoomStep, 3, 1, Qt::AlignLeft );
00463     textLabel23b = new QLabel(tr( "&Stepping:" ), subTabZoom);
00464     textLabel23b->setBuddy(zoomStep);
00465     subTabZoomLayout->addWidget( textLabel23b, 3, 0 );
00466     subStackTools->addWidget( subTabZoom );
00467 
00468     subTabGeneral = new QWidget( subStackTools);
00469     subTabGeneralLayout = new QGridLayout( subTabGeneral );
00470     subTabGeneralLayout->setSpacing( 5 );
00471     subTabGeneralLayout->setMargin( 10 );
00472     subTabGeneralLayout->setAlignment( Qt::AlignTop );
00473     generalHeadLine = new QLabel( tr( "Miscellaneous Settings" ), subTabGeneral);
00474     generalHeadLine->setFont(f);
00475     subTabGeneralLayout->addWidget( generalHeadLine, 0, 0, 1, 2, Qt::AlignHCenter | Qt::AlignTop );
00476 
00477     genDispBox = new QGroupBox( subTabGeneral);
00478     genDispBox->setTitle( tr( "Item Duplicate" ) );
00479     subTabGeneralLayout2 = new QGridLayout( genDispBox );
00480     subTabGeneralLayout2->setSpacing( 5 );
00481     subTabGeneralLayout2->setMargin( 10 );
00482 
00483     genDispX = new ScrSpinBox( -1000, 1000, genDispBox, unitIndex );
00484 //  genDispX->setSuffix( tr( " pt" ) );
00485     subTabGeneralLayout2->addWidget( genDispX, 0, 1, Qt::AlignLeft );
00486     genText1 = new QLabel( tr( "X Displacement" ), genDispBox );
00487     genText1->setBuddy(genDispX);
00488     subTabGeneralLayout2->addWidget( genText1, 0, 0);
00489 
00490     genDispY = new ScrSpinBox( -1000, 1000, genDispBox, unitIndex );
00491 //  genDispY->setSuffix( tr( " pt" ) );
00492     subTabGeneralLayout2->addWidget( genDispY, 1, 1, Qt::AlignLeft );
00493     genText2 = new QLabel( tr( "Y Displacement" ), genDispBox);
00494     genText2->setBuddy(genDispY);
00495     subTabGeneralLayout2->addWidget( genText2, 1, 0);
00496     subTabGeneralLayout->addWidget( genDispBox, 1, 0);
00497 
00498     genRotBox = new QGroupBox(subTabGeneral);
00499     genRotBox->setTitle( tr( "Rotation Tool" ) );
00500     subTabGeneralLayout3 = new QGridLayout( genRotBox );
00501     subTabGeneralLayout3->setSpacing( 5 );
00502     subTabGeneralLayout3->setMargin( 10 );
00503 
00504     genRot = new ScrSpinBox( 1, 90, genRotBox, 1 );
00505     genRot->setDecimals(1);
00506     genRot->setSuffix("");
00507     subTabGeneralLayout3->addWidget( genRot, 0, 1, Qt::AlignLeft );
00508     genText3 = new QLabel( tr( "Constrain to:" ), genRotBox);
00509     genText3->setBuddy(genRot);
00510     subTabGeneralLayout3->addWidget( genText3, 0, 0);
00511     genText4 = new QLabel( tr( "Degrees" ), genRotBox);
00512     subTabGeneralLayout3->addWidget( genText4, 0, 2);
00513     subTabGeneralLayout->addWidget( genRotBox, 1, 1);
00514 
00515     subStackTools->addWidget( subTabGeneral );
00516 
00517     tabToolsLayout->addWidget( subStackTools );
00518     toolText->setChecked(true);
00519 
00520     // Neccessary for document prefs
00521     //restoreDefaults(prefsData, unitIndex);
00522 
00523     toolText->setToolTip( tr( "Text Frame Properties" ) );
00524     toolImage->setToolTip( tr( "Image Frame Properties" ) );
00525     toolShape->setToolTip( tr( "Shape Drawing Properties" ) );
00526     toolZoom->setToolTip( tr( "Magnification Level Defaults" ) );
00527     toolLine->setToolTip( tr( "Line Drawing Properties" ) );
00528     toolPoly->setToolTip( tr( "Polygon Drawing Properties" ) );
00529     toolMisc->setToolTip( tr( "Other Properties" ) );
00530     fontComboText->setToolTip( tr( "Font for new text frames" ) );
00531     sizeComboText->setToolTip( tr( "Size of font for new text frames" ) );
00532     colorComboText->setToolTip( tr( "Color of font" ) );
00533     columnsText->setToolTip( tr( "Number of columns in a text frame" ) );
00534     gapText->setToolTip( tr( "Gap between text frame columns" ) );
00535     previewText->setToolTip( tr( "Sample of your font" ) );
00536     buttonGroup3->setToolTip( tr( "Image frames allow images to scale to any size" ) );
00537     scalingHorizontal->setToolTip( tr( "Horizontal scaling of images" ) );
00538     scalingVertical->setToolTip( tr( "Vertical scaling of images" ) );
00539     chainButton->setToolTip( tr( "Keep horizontal and vertical scaling the same" ) );
00540     buttonGroup5->setToolTip( tr( "Images in image frames are scaled to the size of the frame" ) );
00541     checkRatioImage->setToolTip( tr( "Automatically scaled images keep their original proportions" ) );
00542     comboFillImage->setToolTip( tr( "Fill color of image frames" ) );
00543     shadingFillImage->setToolTip( tr( "Saturation of color of fill" ) );
00544     colorComboLineShape->setToolTip( tr( "Line color of shapes" ) );
00545     shadingLineShape->setToolTip( tr( "Saturation of color of lines" ) );
00546     comboFillShape->setToolTip( tr( "Fill color of shapes" ) );
00547     shadingFillShape->setToolTip( tr( "Saturation of color of fill" ) );
00548     comboStyleShape->setToolTip( tr( "Line style of shapes" ) );
00549     lineWidthShape->setToolTip( tr( "Line width of shapes" ) );
00550     minimumZoom->setToolTip( tr( "Minimum magnification allowed" ) );
00551     maximumZoom->setToolTip(