Subversion Repositories Scribus

Rev

Rev 675 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 paul 1
#include "prefs.h"
2
#include "prefs.moc"
3
#include "keymanager.h"
263 Franz 4
#include "scribusdoc.h"
3 paul 5
#include <qfont.h>
6
#include <qcolordialog.h>
663 cbradney 7
#include <qcombobox.h>
3 paul 8
#include <qcolor.h>
9
#include <qstringlist.h>
10
#include <qstylefactory.h>
11
#include <qpointarray.h>
12
#include <qpainter.h>
13
#include <qrect.h>
14
#include <qwmatrix.h>
15
#include <cmath>
663 cbradney 16
#include "langmgr.h"
3 paul 17
 
504 cbradney 18
using namespace std;
19
 
418 Franz 20
extern QPixmap fontSamples(QString da, int s, QString ts, QColor back);
3 paul 21
extern QPixmap loadIcon(QString nam);
80 Franz 22
extern QPointArray RegularPolygon(double w, double h, uint c, bool star, double factor, double rota);
3 paul 23
 
24
extern "C" void* Run(QWidget *d, preV *Vor);
25
 
199 Franz 26
/*!
145 Franz 27
 \fn void* Run(QWidget *d, preV *Vor)
28
 \author Franz Schmid
29
 \date  
30
 \brief Creates Preferences dialog and returns pointer to it
202 Franz 31
 \param d QWidget * to Preferences dialog widget
32
 \param Vor preV * struct
33
 \retval dia * widget pointer
145 Franz 34
 */
3 paul 35
void* Run(QWidget *d, preV *Vor)
36
{
37
        Preferences *dia = new Preferences(d, Vor);
38
        return dia;
39
}
40
 
199 Franz 41
/*!
145 Franz 42
 \fn Preferences::Preferences( QWidget* parent, preV *Vor)
43
 \author Franz Schmid
44
 \date  
45
 \brief Constructor for Preferences dialog box
46
 \param parent QWidget pointer to parent window
202 Franz 47
 \param Vor preV * struct
145 Franz 48
 \retval Preferences dialog
49
 */
3 paul 50
Preferences::Preferences( QWidget* parent, preV *Vor)
199 Franz 51
                : QDialog( parent, "pref", true, 0 )
3 paul 52
{
173 Franz 53
        int decimals;
199 Franz 54
        fon = &Vor->AvailFonts;
188 Franz 55
        ap = (ScribusApp*)parent;
199 Franz 56
        Umrech = 1.0;
705 fschmid 57
        Einheit = Vor->Einheit;
333 Franz 58
        int f[] = {2, 3, 4};
188 Franz 59
        if (Einheit == 3)
60
                decimals = f[0];
61
        else
62
                decimals = f[Einheit];
63
        DisScale = Vor->DisScale;
199 Franz 64
        setCaption( tr( "Preferences" ) );
65
        setIcon(loadIcon("AppIcon.png"));
66
        setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
67
        PrefsLayout = new QVBoxLayout( this );
68
        PrefsLayout->setSpacing( 6 );
69
        PrefsLayout->setMargin( 11 );
45 Franz 70
 
199 Franz 71
        PrefsLayout2 = new QHBoxLayout(0, 0, 6);
45 Franz 72
 
188 Franz 73
        TabListe = new QListBox(this, "StyledL");
222 Franz 74
        QString ar_tab[] = { tr("General"), tr("Document"), tr("Guides"), tr("Typography"), tr("Tools"), tr("Scrapbook"), tr("Display"), tr("External Tools"), tr("Misc.")};
188 Franz 75
        size_t a_tab = sizeof(ar_tab) / sizeof(*ar_tab);
76
        for (uint s = 0; s < a_tab; ++s)
77
                TabListe->insertItem(ar_tab[s]);
248 Franz 78
        TabListe->setFocusPolicy(QWidget::NoFocus);
188 Franz 79
        PrefsLayout2->addWidget(TabListe);
45 Franz 80
 
199 Franz 81
        TabWidget3 = new QWidgetStack( this, "TabWidget3" );
82
        TabWidget3->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
83
        TabWidget3->setFrameShape( QWidgetStack::StyledPanel );
84
        TabWidget3->setFrameShadow( QWidgetStack::Sunken );
85
        tab = new QWidget( TabWidget3, "tab" );
86
        tabLayout = new QGridLayout( tab );
87
        tabLayout->setSpacing( 6 );
88
        tabLayout->setMargin( 10 );
663 cbradney 89
 
90
        // GUI Group
341 Franz 91
        ButtonGroup1 = new QButtonGroup( tr( "GUI" ), tab, "ButtonGroup1" );
199 Franz 92
        ButtonGroup1->setColumnLayout(0, Qt::Vertical );
93
        ButtonGroup1->layout()->setSpacing( 0 );
94
        ButtonGroup1->layout()->setMargin( 0 );
95
        ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
96
        ButtonGroup1Layout->setAlignment( Qt::AlignTop );
97
        ButtonGroup1Layout->setSpacing( 6 );
98
        ButtonGroup1Layout->setMargin( 10 );
663 cbradney 99
 
100
        langMgr.init();
101
        QStringList languageList;
102
        langMgr.fillInstalledStringList(&languageList, true);
675 cbradney 103
        languageList.sort();
663 cbradney 104
        guiLangCombo = new QComboBox( false, ButtonGroup1, "guiLangCombo");
105
        guiLangCombo->insertStringList( languageList );
106
        guiLangCombo->setCurrentText(langMgr.getLangFromAbbrev(Vor->guiLanguage));
107
        selectedGUILang=Vor->guiLanguage;
108
        guiLangLabel = new QLabel(guiLangCombo, tr("&Language:"), ButtonGroup1, "guiLangLabel");
109
        ButtonGroup1Layout->addWidget( guiLangLabel, 0, 0 );
110
        ButtonGroup1Layout->addWidget( guiLangCombo, 0, 1, Qt::AlignRight );
341 Franz 111
 
199 Franz 112
        GUICombo = new QComboBox( true, ButtonGroup1, "GUICombo" );
188 Franz 113
        QStringList STtest;
114
        STtest = QStyleFactory::keys();
115
        for (uint stt = 0; stt < STtest.count(); ++stt)
116
                GUICombo->insertItem(STtest[stt]);
199 Franz 117
        GUICombo->setEditable(false);
118
        GUICombo->setCurrentText(Vor->GUI);
341 Franz 119
        TextGstil = new QLabel(GUICombo, tr("&Theme:"), ButtonGroup1, "dd");
663 cbradney 120
        ButtonGroup1Layout->addWidget( TextGstil, 1, 0 );
121
        ButtonGroup1Layout->addWidget( GUICombo, 1, 1, Qt::AlignRight );
341 Franz 122
 
199 Franz 123
        GFsize = new QSpinBox(ButtonGroup1, "gfs" );
351 Franz 124
        GFsize->setSuffix( tr( " pt" ) );
199 Franz 125
        GFsize->setMaxValue( 22 );
126
        GFsize->setMinValue( 8 );
127
        GFsize->setValue( Vor->AppFontSize );
341 Franz 128
        TextGstil2 = new QLabel(GFsize, tr("&Font Size:"), ButtonGroup1, "dd");
663 cbradney 129
        ButtonGroup1Layout->addWidget( TextGstil2, 2, 0 );
130
        ButtonGroup1Layout->addWidget( GFsize, 2, 1, Qt::AlignRight );
199 Franz 131
        tabLayout->addWidget( ButtonGroup1, 0, 0 );
663 cbradney 132
 
133
 
341 Franz 134
        GroupBox20 = new QGroupBox( tr( "Units" ), tab, "GroupBox20" );
199 Franz 135
        GroupBox20->setColumnLayout(0, Qt::Vertical );
136
        GroupBox20->layout()->setSpacing( 0 );
137
        GroupBox20->layout()->setMargin( 0 );
138
        GroupBox20Layout = new QHBoxLayout( GroupBox20->layout() );
139
        GroupBox20Layout->setAlignment( Qt::AlignTop );
140
        GroupBox20Layout->setSpacing( 0 );
141
        GroupBox20Layout->setMargin( 25 );
142
        UnitCombo = new QComboBox( true, GroupBox20, "UnitCombo" );
143
        UnitCombo->insertItem( tr( "Points (pt)" ) );
144
        UnitCombo->insertItem( tr( "Millimetres (mm)" ) );
145
        UnitCombo->insertItem( tr( "Inches (in)" ) );
146
        UnitCombo->insertItem( tr( "Picas (p)" ) );
147
        UnitCombo->setEditable(false);
705 fschmid 148
        UnitCombo->setCurrentItem(Vor->Einheit);
199 Franz 149
        GroupBox20Layout->addWidget( UnitCombo );
150
        tabLayout->addWidget( GroupBox20, 1, 0 );
341 Franz 151
        Mouse = new QGroupBox( tr( "Mouse Settings" ),tab, "Mouse" );
199 Franz 152
        Mouse->setColumnLayout(0, Qt::Vertical );
153
        Mouse->layout()->setSpacing( 0 );
154
        Mouse->layout()->setMargin( 0 );
155
        MouseLayout = new QHBoxLayout( Mouse->layout() );
156
        MouseLayout->setAlignment( Qt::AlignTop );
157
        MouseLayout->setSpacing( 6 );
158
        MouseLayout->setMargin( 10 );
159
        Layout5 = new QGridLayout;
160
        Layout5->setSpacing( 6 );
161
        Layout5->setMargin( 0 );
341 Franz 162
 
199 Franz 163
        SpinBox3 = new QSpinBox( Mouse, "SpinBox3" );
164
        SpinBox3->setMaxValue( 1000 );
165
        SpinBox3->setMinValue( 0 );
166
        SpinBox3->setLineStep( 10 );
167
        SpinBox3->setValue( Vor->Wheelval );
341 Franz 168
        TextLabel1_2 = new QLabel( SpinBox3, tr( "&Wheel Jump:" ), Mouse, "TextLabel1_2" );
169
        TextLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
170
                                     TextLabel1_2->sizePolicy().hasHeightForWidth() ) );
171
        Layout5->addWidget( TextLabel1_2, 0, 0 );
199 Franz 172
        Layout5->addWidget( SpinBox3, 0, 1 );
341 Franz 173
 
199 Franz 174
        SpinBox3_2 = new QSpinBox( Mouse, "SpinBox3_2" );
175
        SpinBox3_2->setMaxValue( 1000 );
176
        SpinBox3_2->setMinValue( 1 );
177
        SpinBox3_2->setLineStep( 1 );
178
        SpinBox3_2->setValue(ap->HaveDoc ? ap->doc->GrabRad : Vor->GrabRad );
274 Franz 179
        SpinBox3_2->setSuffix( tr( " px" ) );
341 Franz 180
        TextLabel1_2_2 = new QLabel( SpinBox3_2, tr( "&Grab Radius:" ), Mouse, "TextLabel1_2_2" );
181
        TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
182
                                       TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) );
183
        Layout5->addWidget( TextLabel1_2_2, 1, 0 );
199 Franz 184
        Layout5->addWidget( SpinBox3_2, 1, 1 );
185
        MouseLayout->addLayout( Layout5 );
186
        tabLayout->addWidget( Mouse, 0, 1 );
3 paul 187
 
341 Franz 188
        GroupBox20b = new QGroupBox( tr( "Menus" ), tab, "GroupBox20b" );
199 Franz 189
        GroupBox20b->setColumnLayout(0, Qt::Vertical );
190
        GroupBox20b->layout()->setSpacing( 0 );
191
        GroupBox20b->layout()->setMargin( 0 );
192
        GroupBox20bLayout = new QGridLayout( GroupBox20b->layout() );
193
        GroupBox20bLayout->setAlignment( Qt::AlignTop );
194
        GroupBox20bLayout->setSpacing( 5 );
195
        GroupBox20bLayout->setMargin( 10 );
341 Franz 196
 
199 Franz 197
        Recen = new QSpinBox( GroupBox20b, "Recen" );
198
        Recen->setMaxValue( 30 );
199
        Recen->setMinValue( 1 );
200
        Recen->setValue( Vor->RecentDCount );
341 Franz 201
        TextLabel4c = new QLabel( Recen, tr( "&Recent Documents:" ), GroupBox20b, "TextLabel4c" );
202
        TextLabel4c->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
203
                                    TextLabel4c->sizePolicy().hasHeightForWidth() ) );
204
        GroupBox20bLayout->addWidget( TextLabel4c, 0, 0);
199 Franz 205
        GroupBox20bLayout->addWidget( Recen, 0, 1 );
206
        tabLayout->addWidget( GroupBox20b, 1, 1 );
3 paul 207
 
341 Franz 208
        GroupBox200 = new QGroupBox( tr( "Paths" ), tab, "GroupBox200" );
199 Franz 209
        GroupBox200->setColumnLayout(0, Qt::Horizontal );
210
        GroupBox200->layout()->setSpacing( 0 );
211
        GroupBox200->layout()->setMargin( 0 );
212
        GroupBox200Layout = new QGridLayout( GroupBox200->layout() );
213
        GroupBox200Layout->setAlignment( Qt::AlignTop );
214
        GroupBox200Layout->setSpacing( 0 );
215
        GroupBox200Layout->setMargin( 5 );
341 Franz 216
 
199 Franz 217
        Docs = new QLineEdit( GroupBox200, "Datei" );
218
        Docs->setMinimumSize( QSize( 268, 22 ) );
188 Franz 219
        Docs->setText(Vor->DocDir);
341 Franz 220
        PfadText = new QLabel( Docs, tr("&Documents:"), GroupBox200, "Pfadtext" );
199 Franz 221
        FileC = new QToolButton( GroupBox200, "FileC" );
222
        FileC->setMinimumSize( QSize( 88, 24 ) );
341 Franz 223
        FileC->setText( tr( "&Change..." ) );
224
        GroupBox200Layout->addWidget( PfadText, 0, 0 );
225
        GroupBox200Layout->addWidget( Docs, 0, 1 );
199 Franz 226
        GroupBox200Layout->addWidget( FileC, 0, 2 );
341 Franz 227
 
228
 
199 Franz 229
        ProPfad = new QLineEdit( GroupBox200, "Datei1" );
230
        ProPfad->setMinimumSize( QSize( 268, 22 ) );
188 Franz 231
        ProPfad->setText(Vor->ProfileDir);
341 Franz 232
        PfadText2 = new QLabel( ProPfad, tr("&ICC Profiles:"), GroupBox200, "Pfadtext1" );
199 Franz 233
        FileC2 = new QToolButton( GroupBox200, "FileC1" );
234
        FileC2->setMinimumSize( QSize( 88, 24 ) );
341 Franz 235
        FileC2->setText( tr( "C&hange..." ) );
236
        GroupBox200Layout->addWidget( PfadText2, 1, 0 );
237
        GroupBox200Layout->addWidget( ProPfad, 1, 1 );
199 Franz 238
        GroupBox200Layout->addWidget( FileC2, 1, 2 );
91 Franz 239
 
199 Franz 240
        ScriptPfad = new QLineEdit( GroupBox200, "Datei1" );
241
        ScriptPfad->setMinimumSize( QSize( 268, 22 ) );
188 Franz 242
        ScriptPfad->setText(Vor->ScriptDir);
341 Franz 243
        PfadText3 = new QLabel( ScriptPfad, tr("&Scripts:"), GroupBox200, "Pfadtext1" );
199 Franz 244
        FileC3 = new QToolButton( GroupBox200, "FileC3" );
245
        FileC3->setMinimumSize( QSize( 88, 24 ) );
341 Franz 246
        FileC3->setText( tr( "Ch&ange..." ) );
247
        GroupBox200Layout->addWidget( PfadText3, 2, 0 );
248
        GroupBox200Layout->addWidget( ScriptPfad, 2, 1 );
199 Franz 249
        GroupBox200Layout->addWidget( FileC3, 2, 2 );
91 Franz 250
 
410 Franz 251
        TemplateDir = new QLineEdit( GroupBox200, "Datei1" );
252
        TemplateDir->setMinimumSize( QSize( 268, 22 ) );
253
        TemplateDir->setText(Vor->TemplateDir);
254
        PfadText4 = new QLabel( TemplateDir, tr("T&emplates:"), GroupBox200, "Pfadtext1" );
255
        FileC4 = new QToolButton( GroupBox200, "FileC4" );
256
        FileC4->setMinimumSize( QSize( 88, 24 ) );
257
        FileC4->setText( tr( "Cha&nge..." ) );
258
        GroupBox200Layout->addWidget( PfadText4, 3, 0 );
259
        GroupBox200Layout->addWidget( TemplateDir, 3, 1 );
260
        GroupBox200Layout->addWidget( FileC4, 3, 2 );
261
 
199 Franz 262
        tabLayout->addMultiCellWidget( GroupBox200, 2, 2, 0, 1 );
3 paul 263
 
199 Franz 264
        TabWidget3->addWidget( tab, 0 );
3 paul 265
 
199 Franz 266
        tab_7 = new QWidget( TabWidget3, "tab_7" );
267
        tabLayout_7 = new QHBoxLayout( tab_7, 11, 6, "tabLayout_7");
268
        Layout21 = new QVBoxLayout( 0, 0, 6, "Layout21");
341 Franz 269
        GroupSize = new QButtonGroup( tr( "Page Size" ), tab_7, "GroupSize" );
199 Franz 270
        GroupSize->setColumnLayout(0, Qt::Vertical );
271
        GroupSize->layout()->setSpacing( 6 );
272
        GroupSize->layout()->setMargin( 10 );
273
        GroupSizeLayout = new QVBoxLayout( GroupSize->layout() );
274
        GroupSizeLayout->setAlignment( Qt::AlignTop );
275
        Layout6 = new QGridLayout( 0, 1, 1, 0, 6, "Layout6");
341 Franz 276
 
199 Franz 277
        GZComboF = new QComboBox( true, GroupSize, "GZComboF" );
617 cbradney 278
        const QString ar_size[] = {"A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "B0", "B1", "B2", "B3",
199 Franz 279
                           "B4", "B5", "B6", "B7", "B8", "B9", "B10", "C5E", "Comm10E", "DLE", "Executive",
280
                           "Folio", "Ledger", "Legal", "Letter", "Tabloid"};
188 Franz 281
        size_t ar_s = sizeof(ar_size) / sizeof(*ar_size);
282
        for (uint s = 0; s < ar_s; ++s)
199 Franz 283
                GZComboF->insertItem(ar_size[s]);
284
        GZComboF->insertItem( tr( "Custom" ) );
188 Franz 285
        GZComboF->setEditable(false);
286
        GZComboF->setCurrentItem(Vor->PageFormat);
341 Franz 287
        GZText1 = new QLabel( GZComboF, tr( "&Size:" ), GroupSize, "GZText1" );
288
        Layout6->addWidget( GZText1, 0, 0 );
199 Franz 289
        Layout6->addWidget( GZComboF, 0, 1 );
3 paul 290
 
199 Franz 291
        GZComboO = new QComboBox( true, GroupSize, "GZComboO" );
292
        GZComboO->insertItem( tr( "Portrait" ) );
293
        GZComboO->insertItem( tr( "Landscape" ) );
188 Franz 294
        GZComboO->setEditable(false);
295
        GZComboO->setCurrentItem(Vor->Ausrichtung);
341 Franz 296
        GZText2 = new QLabel( GZComboO, tr( "Orie&ntation:" ), GroupSize, "GZText2" );
297
        Layout6->addWidget( GZText2, 1, 0 );
199 Franz 298
        Layout6->addWidget( GZComboO, 1, 1 );
3 paul 299
 
199 Franz 300
        GroupSizeLayout->addLayout( Layout6 );
3 paul 301
 
199 Franz 302
        Layout5_2 = new QHBoxLayout( 0, 0, 6, "Layout5_2");
3 paul 303
 
304
 
333 Franz 305
        Breite = new MSpinBox( 1, 10000, GroupSize, decimals );
199 Franz 306
        Breite->setEnabled( false );
307
        Breite->setMinimumSize( QSize( 70, 20 ) );
341 Franz 308
        Breite->setValue(Vor->PageBreite * Umrech);
309
        GZText3 = new QLabel( Breite, tr( "&Width:" ), GroupSize, "GZText3" );
310
        Layout5_2->addWidget( GZText3 );       
199 Franz 311
        Layout5_2->addWidget( Breite );
3 paul 312
 
333 Franz 313
        Hoehe = new MSpinBox( 1, 10000, GroupSize, decimals );
199 Franz 314
        Hoehe->setEnabled( false );
315
        Hoehe->setMinimumSize( QSize( 70, 20 ) );
341 Franz 316
        Hoehe->setValue(Vor->PageHoehe * Umrech);
317
        GZText4 = new QLabel( Hoehe, tr( "&Height:" ), GroupSize, "GZText4" );
318
        Layout5_2->addWidget( GZText4 );       
199 Franz 319
        Layout5_2->addWidget( Hoehe );
341 Franz 320
 
199 Franz 321
        GroupSizeLayout->addLayout( Layout5_2 );
341 Franz 322
 
199 Franz 323
        Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
3 paul 324
 
341 Franz 325
        Doppelseiten = new QCheckBox( tr( "&Facing Pages" ), GroupSize, "Doppelseiten" );
188 Franz 326
        Doppelseiten->setChecked(Vor->DoppelSeiten);
199 Franz 327
        Layout8->addWidget( Doppelseiten );
3 paul 328
 
341 Franz 329
        Linkszuerst = new QCheckBox( tr( "Left &Page First" ), GroupSize, "Linkszuerst" );
188 Franz 330
        Linkszuerst->setChecked(Vor->ErsteLinks);
331
        if (!Doppelseiten->isChecked())
332
                Linkszuerst->setEnabled(false);
199 Franz 333
        Layout8->addWidget( Linkszuerst );
334
        GroupSizeLayout->addLayout( Layout8 );
335
        Layout21->addWidget( GroupSize );
3 paul 336
 
341 Franz 337
        GroupRand = new QGroupBox( tr( "Margin Guides" ), tab_7, "GroupRand" );
199 Franz 338
        GroupRand->setColumnLayout(0, Qt::Vertical );
339
        GroupRand->layout()->setSpacing( 5 );
340
        GroupRand->layout()->setMargin( 10 );
341
        GroupRandLayout = new QGridLayout( GroupRand->layout() );
342
        GroupRandLayout->setAlignment( Qt::AlignTop );
3 paul 343
 
333 Franz 344
        TopR = new MSpinBox( 0, 1000, GroupRand, decimals );
199 Franz 345
        TopR->setMinimumSize( QSize( 70, 20 ) );
346
        TopR->setValue(Vor->RandOben * Umrech);
188 Franz 347
        RandT = Vor->RandOben;
199 Franz 348
        GroupRandLayout->addWidget( TopR, 0, 1 );
333 Franz 349
        BottomR = new MSpinBox( 0, 1000, GroupRand, decimals );
199 Franz 350
        BottomR->setMinimumSize( QSize( 70, 20 ) );
351
        BottomR->setValue(Vor->RandUnten * Umrech);
188 Franz 352
        RandB = Vor->RandUnten;
199 Franz 353
        GroupRandLayout->addWidget( BottomR, 1, 1 );
333 Franz 354
        RightR = new MSpinBox( 0, 1000, GroupRand, decimals );
199 Franz 355
        RightR->setMinimumSize( QSize( 70, 20 ) );
356
        RightR->setValue(Vor->RandRechts * Umrech);
188 Franz 357
        RandR = Vor->RandRechts;
199 Franz 358
        GroupRandLayout->addWidget( RightR, 1, 3 );
333 Franz 359
        LeftR = new MSpinBox( 0, 1000, GroupRand, decimals );
199 Franz 360
        LeftR->setMinimumSize( QSize( 70, 20 ) );
361
        LeftR->setValue(Vor->RandLinks * Umrech);
188 Franz 362
        RandL = Vor->RandLinks;
199 Franz 363
        GroupRandLayout->addWidget( LeftR, 0, 3 );
3 paul 364
 
341 Franz 365
        GRText2 = new QLabel( BottomR, tr( "&Bottom:" ), GroupRand, "GRText2" );
199 Franz 366
        GroupRandLayout->addWidget( GRText2, 1, 0 );
341 Franz 367
        GRText1 = new QLabel( TopR, tr( "&Top:" ), GroupRand, "GRText1" );
199 Franz 368
        GroupRandLayout->addWidget( GRText1, 0, 0 );
341 Franz 369
        GRText4 = new QLabel( RightR, tr( "&Right:" ), GroupRand, "GRText4" );
199 Franz 370
        GroupRandLayout->addWidget( GRText4, 1, 2 );
341 Franz 371
        GRText3 = new QLabel( LeftR, tr( "&Left:" ), GroupRand, "GRText3" );
199 Franz 372
        GroupRandLayout->addWidget( GRText3, 0, 2 );
3 paul 373
 
199 Franz 374
        Layout21->addWidget( GroupRand );
375
        tabLayout_7->addLayout( Layout21 );
3 paul 376
 
199 Franz 377
        Layout21b = new QVBoxLayout( 0, 0, 6, "Layout21b");
341 Franz 378
        GroupAS = new QGroupBox( tr( "Autosave" ), tab_7, "GroupAS" );
199 Franz 379
        GroupAS->setColumnLayout(0, Qt::Vertical );
380
        GroupAS->layout()->setSpacing( 5 );
381
        GroupAS->layout()->setMargin( 10 );
382
        GroupASLayout = new QGridLayout( GroupAS->layout() );
383
        GroupASLayout->setAlignment( Qt::AlignTop );
341 Franz 384
        ASon = new QCheckBox( tr( "&Enabled" ), GroupAS, "Enable Autosave" );
705 fschmid 385
        ASon->setChecked(Vor->AutoSave);
199 Franz 386
        GroupASLayout->addMultiCellWidget( ASon, 0, 0, 0, 1 );
387
        ASTime = new QSpinBox( GroupAS, "Time" );
388
        ASTime->setMaxValue( 60 );
389
        ASTime->setMinValue( 1 );
390
        ASTime->setSuffix( " " + tr("min") );
188 Franz 391
        ASTime->setValue(Vor->AutoSaveTime / 1000 / 60);
341 Franz 392
        ASText = new QLabel( ASTime, tr( "&Interval:" ), GroupAS, "ASText" );
393
        GroupASLayout->addWidget( ASText, 1, 0 );
199 Franz 394
        GroupASLayout->addWidget( ASTime, 1, 1 );
395
        Layout21b->addWidget( GroupAS );
396
        QSpacerItem* spacerDocb = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
397
        Layout21b->addItem( spacerDocb );
398
        tabLayout_7->addLayout( Layout21b );
399
        TabWidget3->addWidget( tab_7, 1 );
3 paul 400
 
341 Franz 401
 
199 Franz 402
        tab_2 = new QWidget( TabWidget3, "tab_2" );
403
        tabLayout_2 = new QGridLayout( tab_2 );
404
        tabLayout_2->setSpacing( 6 );
405
        tabLayout_2->setMargin( 11 );
263 Franz 406
 
341 Franz 407
        GroupBox1 = new QGroupBox( tr( "Grid Layout" ), tab_2, "GroupBox1" );
199 Franz 408
        GroupBox1->setColumnLayout(0, Qt::Vertical );
409
        GroupBox1->layout()->setSpacing( 0 );
410
        GroupBox1->layout()->setMargin( 0 );
411
        GroupBox1Layout = new QHBoxLayout( GroupBox1->layout() );
412
        GroupBox1Layout->setAlignment( Qt::AlignTop );
413
        GroupBox1Layout->setSpacing( 0 );
414
        GroupBox1Layout->setMargin( 10 );
415
        Layout10 = new QGridLayout;
416
        Layout10->setSpacing( 6 );
417
        Layout10->setMargin( 0 );
341 Franz 418
 
419
        SpinBox1 = new MSpinBox( Umrech, 1000 * Umrech, GroupBox1, decimals );
420
        TextLabel1 = new QLabel( SpinBox1, tr( "M&inor Grid Spacing:" ), GroupBox1, "TextLabel1" );
199 Franz 421
        TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
422
                                                TextLabel1->sizePolicy().hasHeightForWidth() ) );
341 Franz 423
        Layout10->addWidget( TextLabel1, 0, 0 );       
424
        Layout10->addWidget( SpinBox1, 0, 1 );
425
 
426
        SpinBox2 = new MSpinBox( 10 * Umrech, 1000 * Umrech, GroupBox1, decimals );
427
        TextLabel2 = new QLabel( SpinBox2, tr( "Ma&jor Grid Spacing:" ), GroupBox1, "TextLabel2" );
199 Franz 428
        TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
429
                                                TextLabel2->sizePolicy().hasHeightForWidth() ) );
430
        Layout10->addWidget( TextLabel2, 1, 0 );
431
        Layout10->addWidget( SpinBox2, 1, 1 );
341 Franz 432
 
433
        SpinBox2g = new MSpinBox( Umrech, 1000 * Umrech, GroupBox1, decimals );
434
        TextLabel2g = new QLabel( SpinBox2g, tr( "Guide &Snap Distance:" ), GroupBox1, "TextLabel2" );
199 Franz 435
        TextLabel2g->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
436
                                    TextLabel2->sizePolicy().hasHeightForWidth() ) );
437
        Layout10->addWidget( TextLabel2g, 2, 0 );
438
        Layout10->addWidget( SpinBox2g, 2, 1 );
341 Franz 439
 
705 fschmid 440
        SpinBox2->setValue(Vor->DmajGrid * Umrech);
441
        SpinBox1->setValue(Vor->DminGrid * Umrech);
442
        SpinBox2g->setValue(Vor->GuideRad * Umrech);
199 Franz 443
        GroupBox1Layout->addLayout( Layout10 );
444
        tabLayout_2->addWidget( GroupBox1, 0, 0 );
263 Franz 445
 
341 Franz 446
        GroupBox2 = new QGroupBox( tr( "Grid Colors" ), tab_2, "GroupBox2" );
199 Franz 447
        GroupBox2->setColumnLayout(0, Qt::Vertical );
448
        GroupBox2->layout()->setSpacing( 0 );
449
        GroupBox2->layout()->setMargin( 0 );
450
        GroupBox2Layout = new QHBoxLayout( GroupBox2->layout() );
451
        GroupBox2Layout->setAlignment( Qt::AlignTop );
452
        GroupBox2Layout->setSpacing( 6 );
453
        GroupBox2Layout->setMargin( 11 );
454
        Layout11 = new QGridLayout;
455
        Layout11->setSpacing( 6 );
456
        Layout11->setMargin( 0 );
341 Franz 457
 
458
        minColor = new QPushButton( "", GroupBox2, "minColor" );
199 Franz 459
        minColor->setAutoDefault( false );
460
        QPixmap pm = QPixmap(40, 20);
705 fschmid 461
        pm.fill(Vor->DminColor);
462
        Cmin = Vor->DminColor;
199 Franz 463
        minColor->setPixmap(pm);
341 Franz 464
        TextLabel3 = new QLabel( minColor, tr( "Min&or Grid Color:" ), GroupBox2, "TextLabel3" );
465
        TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
466
                                                TextLabel3->sizePolicy().hasHeightForWidth() ) );
467
        Layout11->addWidget( TextLabel3, 0, 0 );       
199 Franz 468
        Layout11->addWidget( minColor, 0, 1 );
341 Franz 469
        MaxColor = new QPushButton( "", GroupBox2, "MaxColor" );
199 Franz 470
        MaxColor->setAutoDefault( false );
471
        QPixmap pm1 = QPixmap(40, 20);
705 fschmid 472
        pm1.fill(Vor->DmajColor);
473
        Cmax = Vor->DmajColor;
199 Franz 474
        MaxColor->setPixmap(pm1);
341 Franz 475
        TextLabel4 = new QLabel( MaxColor, tr( "Majo&r Grid Color:" ), GroupBox2, "TextLabel4" );
476
        TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
477
                                                TextLabel4->sizePolicy().hasHeightForWidth() ) );
478
        Layout11->addWidget( TextLabel4, 1, 0 );
479
 
199 Franz 480
        Layout11->addWidget( MaxColor, 1, 1 );
341 Franz 481
        GuideColor = new QPushButton( "", GroupBox2, "GuideColor" );
199 Franz 482
        GuideColor->setAutoDefault( false );
483
        QPixmap pm12 = QPixmap(40, 20);
705 fschmid 484
        pm12.fill(Vor->guideColor);
485
        Cgui = Vor->guideColor;
199 Franz 486
        GuideColor->setPixmap(pm12);
341 Franz 487
        TextLabel4g = new QLabel( GuideColor, tr( "&User Guides Color:" ), GroupBox2, "TextLabel4g" );
488
        TextLabel4g->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
489
                                    TextLabel4g->sizePolicy().hasHeightForWidth() ) );
490
        Layout11->addWidget( TextLabel4g, 2, 0 );
199 Franz 491
        Layout11->addWidget( GuideColor, 2, 1 );
338 Franz 492
 
341 Franz 493
        BaseColor = new QPushButton( "", GroupBox2, "BaseColor" );
338 Franz 494
        BaseColor->setAutoDefault( false );
495
        QPixmap pm13 = QPixmap(40, 20);
705 fschmid 496
        pm13.fill(Vor->baseColor);
497
        Cbase = Vor->baseColor;
338 Franz 498
        BaseColor->setPixmap(pm13);
341 Franz 499
        TextLabel4ba = new QLabel( BaseColor, tr( "Base&line Grid Color:" ), GroupBox2, "TextLabel4ba" );
500
        TextLabel4ba->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
501
                                    TextLabel4ba->sizePolicy().hasHeightForWidth() ) );
502
        Layout11->addWidget( TextLabel4ba, 3, 0 );     
338 Franz 503
        Layout11->addWidget( BaseColor, 3, 1 );
199 Franz 504
        GroupBox2Layout->addLayout( Layout11 );
505
        tabLayout_2->addWidget( GroupBox2, 1, 0 );
263 Franz 506
 
341 Franz 507
        ButtonGroup5 = new QButtonGroup( tr( "Placing" ), tab_2, "ButtonGroup5" );
199 Franz 508
        ButtonGroup5->setExclusive( true );
509
        ButtonGroup5->setColumnLayout(0, Qt::Vertical );
510
        ButtonGroup5->layout()->setSpacing( 0 );
188 Franz 511
        ButtonGroup5->layout()->setMargin( 0 );
512
        ButtonGroup5Layout = new QHBoxLayout( ButtonGroup5->layout() );
199 Franz 513
        ButtonGroup5Layout->setAlignment( Qt::AlignTop );
514
        ButtonGroup5Layout->setSpacing( 6 );
188 Franz 515
        ButtonGroup5Layout->setMargin( 11 );
516
        Layout7 = new QVBoxLayout;
517
        Layout7->setSpacing( 6 );
518
        Layout7->setMargin( 0 );
341 Franz 519
        RadioButton6 = new QRadioButton( tr( "In the &Background" ), ButtonGroup5, "RadioButton6" );
705 fschmid 520
        RadioButton6->setChecked(Vor->Before );
188 Franz 521
        Layout7->addWidget( RadioButton6 );
341 Franz 522
        RadioButton7 = new QRadioButton( tr( "In the Fore&ground" ), ButtonGroup5, "RadioButton6_2" );
705 fschmid 523
        RadioButton7->setChecked(!Vor->Before );
188 Franz 524
        Layout7->addWidget( RadioButton7 );
525
        ButtonGroup5Layout->addLayout( Layout7 );
526
        tabLayout_2->addWidget( ButtonGroup5, 0, 1 );
263 Franz 527
        //TabWidget3->addWidget( tab_2, 2 );
528
 
341 Franz 529
        ButtonGroup6 = new QButtonGroup( tr( "Baseline Grid" ), tab_2, "ButtonGroup6" );
263 Franz 530
        ButtonGroup6->setExclusive( true );
531
        ButtonGroup6->setColumnLayout(0, Qt::Vertical );
532
        ButtonGroup6->layout()->setSpacing( 0 );
533
        ButtonGroup6->layout()->setMargin( 0 );
534
        ButtonGroup6Layout = new QHBoxLayout( ButtonGroup6->layout() );
535
        ButtonGroup6Layout->setAlignment( Qt::AlignTop );
536
        ButtonGroup6Layout->setSpacing( 6 );
537
        ButtonGroup6Layout->setMargin( 11 );
538
        Layout18 = new QVBoxLayout;
539
        Layout18->setSpacing( 6 );
540
        Layout18->setMargin( 0 );
341 Franz 541
        RadioButton8 = new QRadioButton( tr( "O&n" ), ButtonGroup6, "RadioButton8" );
263 Franz 542
        Layout18->addWidget( RadioButton8 );
341 Franz 543
        RadioButton9 = new QRadioButton( tr( "O&ff" ), ButtonGroup6, "RadioButton8_2" );
263 Franz 544
        Layout18->addWidget( RadioButton9 );
545
        RadioButton8->setChecked(Vor->BaseShown );
264 Franz 546
        RadioButton9->setChecked(!Vor->BaseShown );
263 Franz 547
        ButtonGroup6Layout->addLayout( Layout18 );
548
        tabLayout_2->addWidget( ButtonGroup6, 1, 1 );
188 Franz 549
        TabWidget3->addWidget( tab_2, 2 );
263 Franz 550
 
188 Franz 551
        tab_4 = new QWidget( TabWidget3, "tab_4" );
552
        tabLayout_3 = new QGridLayout( tab_4 );
553
        tabLayout_3->setSpacing( 6 );
554
        tabLayout_3->setMargin( 11 );
341 Franz 555
        GroupBox4_2 = new QGroupBox( tr( "Subscript" ), tab_4, "GroupBox4_2" );
188 Franz 556
        GroupBox4_2->setColumnLayout(0, Qt::Vertical );
557
        GroupBox4_2->layout()->setSpacing( 0 );
558
        GroupBox4_2->layout()->setMargin( 0 );
559
        GroupBox4_2Layout = new QHBoxLayout( GroupBox4_2->layout() );
560
        GroupBox4_2Layout->setAlignment( Qt::AlignTop );
561
        GroupBox4_2Layout->setSpacing( 6 );
562
        GroupBox4_2Layout->setMargin( 11 );
3 paul 563
 
188 Franz 564
        Layout12 = new QGridLayout;
565
        Layout12->setSpacing( 6 );
566
        Layout12->setMargin( 0 );
341 Franz 567
 
188 Franz 568
        VTiefW = new QSpinBox( GroupBox4_2, "VTiefW" );
569
        VTiefW->setSuffix( tr( " %" ) );
570
        VTiefW->setMaxValue( 100 );
571
        VTiefW->setMinValue( 1 );
572
        VTiefW->setValue(ap->HaveDoc ? ap->doc->VTief : Vor->DVTief );
341 Franz 573
        TextLabel1_5_2 = new QLabel( VTiefW, tr( "&Displacement:" ), GroupBox4_2, "TextLabel1_5_2" );
574
        TextLabel1_5_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
575
                                       TextLabel1_5_2->sizePolicy().hasHeightForWidth() ) );
576
        Layout12->addWidget( TextLabel1_5_2, 0, 0 );
188 Franz 577
        Layout12->addWidget( VTiefW, 0, 1 );
341 Franz 578
 
188 Franz 579
        VTiefWSc = new QSpinBox( GroupBox4_2, "VTiefWSc" );
580
        VTiefWSc->setSuffix( tr( " %" ) );
581
        VTiefWSc->setMaxValue( 100 );
582
        VTiefWSc->setMinValue( 1 );
583
        VTiefWSc->setValue(ap->HaveDoc ? ap->doc->VTiefSc : Vor->DVTiefSc );
341 Franz 584
        TextLabel2_3_2 = new QLabel( VTiefWSc, tr( "&Scaling:" ), GroupBox4_2, "TextLabel2_3_2" );
585
        TextLabel2_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
586
                                       TextLabel2_3_2->sizePolicy().hasHeightForWidth() ) );
587
        Layout12->addWidget( TextLabel2_3_2, 1, 0 );   
188 Franz 588
        Layout12->addWidget( VTiefWSc, 1, 1 );
589
        GroupBox4_2Layout->addLayout( Layout12 );
341 Franz 590
 
245 Franz 591
        tabLayout_3->addWidget( GroupBox4_2, 0, 0 );
341 Franz 592
        GroupBox4 = new QGroupBox( tr( "Superscript" ), tab_4, "GroupBox4" );
188 Franz 593
        GroupBox4->setColumnLayout(0, Qt::Vertical );
594
        GroupBox4->layout()->setSpacing( 0 );
595
        GroupBox4->layout()->setMargin( 0 );
596
        GroupBox4Layout = new QHBoxLayout( GroupBox4->layout() );
597
        GroupBox4Layout->setAlignment( Qt::AlignTop );
598
        GroupBox4Layout->setSpacing( 6 );
599
        GroupBox4Layout->setMargin( 11 );
600
        Layout13 = new QGridLayout;
601
        Layout13->setSpacing( 6 );
602
        Layout13->setMargin( 0 );
341 Franz 603
 
188 Franz 604
        VHochW = new QSpinBox( GroupBox4, "VHochW" );
605
        VHochW->setSuffix( tr( " %" ) );
606
        VHochW->setMaxValue( 100 );
607
        VHochW->setMinValue( 1 );
608
        VHochW->setValue(ap->HaveDoc ? ap->doc->VHoch : Vor->DVHoch );
341 Franz 609
        TextLabel1_5 = new QLabel( VHochW, tr( "D&isplacement:" ), GroupBox4, "TextLabel1_5" );
610
        TextLabel1_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
611
                                     TextLabel1_5->sizePolicy().hasHeightForWidth() ) );
612
        Layout13->addWidget( TextLabel1_5, 0, 0 );     
188 Franz 613
        Layout13->addWidget( VHochW, 0, 1 );
614
        VHochWSc = new QSpinBox( GroupBox4, "VHochWSc" );
615
        VHochWSc->setSuffix( tr( " %" ) );
616
        VHochWSc->setMaxValue( 100 );
617
        VHochWSc->setMinValue( 1 );
618
        VHochWSc->setValue(ap->HaveDoc ? ap->doc->VHochSc : Vor->DVHochSc );
341 Franz 619
        TextLabel2_3 = new QLabel( VHochWSc, tr( "S&caling:" ), GroupBox4, "TextLabel2_3" );
620
        TextLabel2_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
621
                                     TextLabel2_3->sizePolicy().hasHeightForWidth() ) );
622
        Layout13->addWidget( TextLabel2_3, 1, 0 );     
188 Franz 623
        Layout13->addWidget( VHochWSc, 1, 1 );
624
        GroupBox4Layout->addLayout( Layout13 );
341 Franz 625
 
245 Franz 626
        tabLayout_3->addWidget( GroupBox4, 1, 0 );
341 Franz 627
        GroupBox4_3 = new QGroupBox( tr( "Small Caps" ), tab_4, "GroupBox4_3" );
188 Franz 628
        GroupBox4_3->setColumnLayout(0, Qt::Vertical );
629
        GroupBox4_3->layout()->setSpacing( 0 );
630
        GroupBox4_3->layout()->setMargin( 0 );
631
        GroupBox4_3Layout = new QHBoxLayout( GroupBox4_3->layout() );
632
        GroupBox4_3Layout->setAlignment( Qt::AlignTop );
633
        GroupBox4_3Layout->setSpacing( 6 );
634
        GroupBox4_3Layout->setMargin( 11 );
635
        Layout14 = new QHBoxLayout;
636
        Layout14->setSpacing( 6 );
637
        Layout14->setMargin( 0 );
638
        SmallCaps = new QSpinBox( GroupBox4_3, "SmallCaps" );
639
        SmallCaps->setSuffix( tr( " %" ) );
640
        SmallCaps->setMaxValue( 100 );
641
        SmallCaps->setMinValue( 1 );
642
        SmallCaps->setValue(ap->HaveDoc ? ap->doc->VKapit : Vor->DVKapit );
341 Franz 643
        TextLabel2_3_3 = new QLabel( SmallCaps, tr( "Sc&aling:" ), GroupBox4_3, "TextLabel2_3_3" );
644
        TextLabel2_3_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
645
                                       TextLabel2_3_3->sizePolicy().hasHeightForWidth() ) );
646
        Layout14->addWidget( TextLabel2_3_3 );
647
 
188 Franz 648
        Layout14->addWidget( SmallCaps );
649
        GroupBox4_3Layout->addLayout( Layout14 );
341 Franz 650
 
188 Franz 651
        tabLayout_3->addWidget( GroupBox4_3, 0, 1 );
3 paul 652
 
341 Franz 653
        GroupBox4_3a = new QGroupBox( tr( "Other" ), tab_4, "GroupBox4_3a" );
188 Franz 654
        GroupBox4_3a->setColumnLayout(0, Qt::Vertical );
655
        GroupBox4_3a->layout()->setSpacing( 0 );
656
        GroupBox4_3a->layout()->setMargin( 0 );
241 Franz 657
        GroupBox4_3aLayout = new QGridLayout( GroupBox4_3a->layout() );
188 Franz 658
        GroupBox4_3aLayout->setAlignment( Qt::AlignTop );
659
        GroupBox4_3aLayout->setSpacing( 6 );
660
        GroupBox4_3aLayout->setMargin( 11 );
341 Franz 661
 
333 Franz 662
        BaseGrid = new MSpinBox( 1, 100, GroupBox4_3a, 1 );
351 Franz 663
        BaseGrid->setSuffix( tr( " pt" ) );
241 Franz 664
        BaseGrid->setValue(ap->HaveDoc ? ap->doc->BaseGrid : Vor->BaseGrid );
341 Franz 665
        TextLabel2_3_3b = new QLabel( BaseGrid, tr( "Baseline &Grid:" ), GroupBox4_3a, "TextLabel2_3_3" );
666
        GroupBox4_3aLayout->addWidget( TextLabel2_3_3b, 0, 0 );
667
 
241 Franz 668
        GroupBox4_3aLayout->addWidget( BaseGrid, 0, 1 );
341 Franz 669
 
333 Franz 670
        BaseOffs = new MSpinBox( 0, 1000, GroupBox4_3a, 1 );
351 Franz 671
        BaseOffs->setSuffix( tr( " pt" ) );
241 Franz 672
        BaseOffs->setValue(ap->HaveDoc ? ap->doc->BaseOffs : Vor->BaseOffs );
341 Franz 673
        TextLabel2_3_3c = new QLabel( BaseOffs, tr( "Baseline &Offset:" ), GroupBox4_3a, "TextLabel2_3_3" );
674
        GroupBox4_3aLayout->addWidget( TextLabel2_3_3c, 1, 0 );
241 Franz 675
        GroupBox4_3aLayout->addWidget( BaseOffs, 1, 1 );
341 Franz 676
 
188 Franz 677
        AutoLineV = new QSpinBox( GroupBox4_3a, "LineS" );
678
        AutoLineV->setSuffix( tr( " %" ) );
679
        AutoLineV->setMaxValue( 100 );
680
        AutoLineV->setMinValue( 1 );
681
        AutoLineV->setValue(ap->HaveDoc ? ap->doc->AutoLine : Vor->AutoLine );
341 Franz 682
        TextLabel2_3_3a = new QLabel( AutoLineV, tr( "Automatic &Line Spacing:" ), GroupBox4_3a, "TextLabel2_3_3" );
683
        GroupBox4_3aLayout->addWidget( TextLabel2_3_3a, 2, 0 );
241 Franz 684
        GroupBox4_3aLayout->addWidget( AutoLineV, 2, 1 );
188 Franz 685
        tabLayout_3->addWidget( GroupBox4_3a, 1, 1 );
199 Franz 686
 
188 Franz 687
        TabWidget3->addWidget( tab_4, 3 );
199 Franz 688
 
188 Franz 689
        tab_3 = new QWidget( TabWidget3, "tab_3" );
690
        tabLayout_4 = new QHBoxLayout( tab_3 );
691
        tabLayout_4->setSpacing( 0 );
692
        tabLayout_4->setMargin( 10 );
341 Franz 693
        ButtonGroup2 = new QButtonGroup( "", tab_3, "ButtonGroup2" );
188 Franz 694
        ButtonGroup2->setExclusive( true );
695
        ButtonGroup2->setColumnLayout(0, Qt::Vertical );
696
        ButtonGroup2->layout()->setSpacing( 0 );
697
        ButtonGroup2->layout()->setMargin( 0 );
698
        ButtonGroup2Layout = new QHBoxLayout( ButtonGroup2->layout() );
699
        ButtonGroup2Layout->setAlignment( Qt::AlignTop );
700
        ButtonGroup2Layout->setSpacing( 6 );
701
        ButtonGroup2Layout->setMargin( 5 );
702
        Layout16 = new QGridLayout;
703
        Layout16->setSpacing( 6 );
704
        Layout16->setMargin( 0 );
705
        TextButton = new QToolButton( ButtonGroup2, "TextButton" );
341 Franz 706
        TextButton->setText("");
188 Franz 707
        TextButton->setPixmap(loadIcon("Text.xpm"));
708
        TextButton->setToggleButton( true );
709
        TextButton->setOn( true );
710
        ButtonGroup2->insert( TextButton, -1 );
711
        Layout16->addWidget( TextButton, 0, 0 );
712
        BildButton = new QToolButton( ButtonGroup2, "BildButton" );
341 Franz 713
        BildButton->setText("");
188 Franz 714
        BildButton->setPixmap(loadIcon("Bild.xpm"));
715
        BildButton->setToggleButton( true );
716
        ButtonGroup2->insert( BildButton, -1 );
717
        Layout16->addWidget( BildButton, 0, 1 );
718
        RectButton = new QToolButton( ButtonGroup2, "RectButton" );
341 Franz 719
        RectButton->setText("");
188 Franz 720
        RectButton->setPixmap(loadIcon("Rechtecke.xpm") );
721
        RectButton->setToggleButton( true );
722
        ButtonGroup2->insert( RectButton, -1 );
723
        Layout16->addWidget( RectButton, 1, 0 );
724
        OvalButton = new QToolButton( ButtonGroup2, "OvalButton" );
341 Franz 725
        OvalButton->setText("");
188 Franz 726
        OvalButton->setPixmap(loadIcon("Kreise.xpm"));
727
        OvalButton->setToggleButton( true );
728
        ButtonGroup2->insert( OvalButton, -1 );
729
        Layout16->addWidget( OvalButton, 1, 1 );
730
        ZoomButton = new QToolButton( ButtonGroup2, "ZoomButton" );
341 Franz 731
        ZoomButton->setText("");
188 Franz 732
        ZoomButton->setPixmap(loadIcon("Lupe.xpm"));
733
        ZoomButton->setToggleButton( true );
734
        ButtonGroup2->insert( ZoomButton, -1 );
735
        Layout16->addWidget( ZoomButton, 2, 0 );
736
        LineButton = new QToolButton( ButtonGroup2, "LineButton" );
341 Franz 737
        LineButton->setText("");
188 Franz 738
        LineButton->setPixmap(loadIcon("Stift.xpm"));
739
        LineButton->setToggleButton( true );
740
        ButtonGroup2->insert( LineButton, -1 );
741
        Layout16->addWidget( LineButton, 2, 1 );
742
        PolyButton = new QToolButton( ButtonGroup2, "PolyButton" );
341 Franz 743
        PolyButton->setText("");
188 Franz 744
        PolyButton->setPixmap(loadIcon("spline.png"));
745
        PolyButton->setToggleButton( true );
746
        ButtonGroup2->insert( PolyButton, -1 );
747
        Layout16->addWidget( PolyButton, 3, 0 );
748
        ButtonGroup2Layout->addLayout( Layout16 );
749
        tabLayout_4->addWidget( ButtonGroup2 );
199 Franz 750
 
188 Franz 751
        Fram = new QWidgetStack(tab_3);
752
        tabLayout_4->addWidget( Fram );
199 Franz 753
 
188 Franz 754
        ToolFrame = new QFrame( this, "ToolFrame" );
755
        ToolFrame->setFrameShape( QFrame::Box );
756
        ToolFrame->setFrameShadow( QFrame::Sunken );
757
        ToolFrameLayout = new QHBoxLayout( ToolFrame );
758
        ToolFrameLayout->setSpacing( 0 );
759
        ToolFrameLayout->setMargin( 10 );
760
        Layout15a = new QGridLayout;
761
        Layout15a->setSpacing( 6 );
762
        Layout15a->setMargin( 0 );
341 Franz 763
 
188 Franz 764
        FontComb = new FontCombo(ToolFrame, Vor);
765
        if (ap->HaveDoc)
766
        {
199 Franz 767
                for (int fc=0; fc<FontComb->count(); ++fc)
768
                {
769
                        if (FontComb->text(fc) == ap->doc->Dfont)
770
                        {
771
                                FontComb->setCurrentItem(fc);
772
                                break;
773
                        }
774
                }
188 Franz 775
        }
776
        else
777
        {
199 Franz 778
                for (int fc=0; fc<FontComb->count(); ++fc)
779
                {
780
                        if (FontComb->text(fc) == Vor->DefFont)
781
                        {
782
                                FontComb->setCurrentItem(fc);
783
                                break;
784
                        }
785
                }
188 Franz 786
        }
341 Franz 787
        TextLabel1_3 = new QLabel( FontComb, tr( "Default &Font:" ), ToolFrame, "TextLabel1_3" );
788
        TextLabel1_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
789
                                     TextLabel1_3->sizePolicy().hasHeightForWidth() ) );
790
        Layout15a->addWidget( TextLabel1_3, 0, 0 );    
188 Franz 791
        Layout15a->addWidget( FontComb, 0, 1 );
792
        SizeCombo = new QComboBox( true, ToolFrame, "SizeCombo" );
793
        SizeCombo->setEditable(false);
456 fschmid 794
        QString ar_sizes[] = {" 7", " 9", "10", "11", "12", "14", "18", "24", "36", "48", "60", "72"};
188 Franz 795
        size_t f_size = sizeof(ar_sizes) / sizeof(*ar_sizes);
796
        for (uint s = 0; s < f_size; ++s)
274 Franz 797
                SizeCombo->insertItem(ar_sizes[s] + tr(" pt"));
188 Franz 798
        int a;
799
        if (ap->HaveDoc)
800
        {
801
                for (a = 0; a < SizeCombo->count(); ++a)
802
                {
803
                        if (SizeCombo->text(a).left(2).toInt() == ap->doc->Dsize / 10)
199 Franz 804
                                SizeCombo->setCurrentItem(a);
188 Franz 805
                }
806
        }
807
        else
808
        {
809
                for (a = 0; a < SizeCombo->count(); ++a)
810
                {
811
                        if (SizeCombo->text(a).left(2).toInt() == Vor->DefSize / 10)
812
                                SizeCombo->setCurrentItem(a);
813
                }
814
        }
341 Franz 815
        TextLabel2_2 = new QLabel( SizeCombo, tr( "Default &Size:" ), ToolFrame, "TextLabel2_2" );
816
        TextLabel2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
817
                                     TextLabel2_2->sizePolicy().hasHeightForWidth() ) );
818
        Layout15a->addWidget( TextLabel2_2, 1, 0 );
188 Franz 819
        Layout15a->addWidget( SizeCombo, 1, 1 );
341 Franz 820
 
188 Franz 821
        ForegroundT = new QComboBox( true, ToolFrame, "Foreground" );
822
        ForegroundT->setEditable(false);
823
        QPixmap pm2;
824
        pm2 = QPixmap(15, 15);
825
        CListe::Iterator itc;
826
        for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
827
        {
828
                pm2.fill(Vor->DColors[itc.key()].getRGBColor());
829
                ForegroundT->insertItem(pm2, itc.key());
199 Franz 830
                if (itc.key() == Vor->DpenText)
831
                        ForegroundT->setCurrentItem(ForegroundT->count()-1);
188 Franz 832
        }
341 Franz 833
        TextLabelT1 = new QLabel( ForegroundT, tr( "&Text Color:" ), ToolFrame, "TextLabel1_3_2" );
834
        TextLabelT1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
835
                                    TextLabelT1->sizePolicy().hasHeightForWidth() ) );
836
        Layout15a->addWidget( TextLabelT1, 2, 0 );     
199 Franz 837
        Layout15a->addWidget( ForegroundT, 2, 1 );
341 Franz 838
 
188 Franz 839
        TextColVal = new QSpinBox( ToolFrame, "TextColVal" );
840
        TextColVal->setMaxValue( 100 );
841
        TextColVal->setMinValue( 1 );
842
        TextColVal->setValue(ap->HaveDoc ? ap->doc->DCols : Vor->DCols );
341 Franz 843
        TextCol = new QLabel(TextColVal, tr("Colu&mns:"), ToolFrame, "TextCol");
844
        Layout15a->addWidget( TextCol, 3, 0 );
188 Franz 845
        Layout15a->addWidget( TextColVal, 3, 1 );
341 Franz 846
 
333 Franz 847
        TextGapVal = new MSpinBox( 0, 200, ToolFrame, decimals );
188 Franz 848
        TextGapVal->setSuffix( tr( " pt" ) );
849
        TextGapVal->setValue(ap->HaveDoc ? ap->doc->DGap : Vor->DGap);
341 Franz 850
        TextGap = new QLabel(TextGapVal, tr("&Gap:"), ToolFrame, "TextCol");
851
        Layout15a->addWidget( TextGap, 4, 0 );
188 Franz 852
        Layout15a->addWidget( TextGapVal, 4, 1 );
341 Franz 853
 
854
        TextLabel1_4 = new QLabel( tr( "Woven silk pyjamas exchanged for blue quartz" ), ToolFrame, "TextLabel1_4" );
188 Franz 855
        TextLabel1_4->setMinimumSize(QSize(260, 70));
856
        TextLabel1_4->setMaximumSize(QSize(260, 70));
857
        TextLabel1_4->setAlignment( static_cast<int>( QLabel::AlignVCenter | QLabel::AlignLeft ) );
858
        SetSample();
859
        Layout15a->addMultiCellWidget( TextLabel1_4, 5, 5, 0, 1 );
860
        QSpacerItem* sp09 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
861
        ToolFrameLayout->addItem( sp09 );
862
        ToolFrameLayout->addLayout( Layout15a );
863
        QSpacerItem* sp10 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
864
        ToolFrameLayout->addItem( sp10 );
865
        Fram->addWidget(ToolFrame, 1);
3 paul 866
 
188 Franz 867
        ToolFrame2 = new QFrame( this, "ToolFrame" );
868
        ToolFrame2->setFrameShape( QFrame::Box );
869
        ToolFrame2->setFrameShadow( QFrame::Sunken );
870
        ToolFrame2Layout = new QHBoxLayout( ToolFrame2 );
871
        ToolFrame2Layout->setSpacing( 0 );
872
        ToolFrame2Layout->setMargin( 10 );
873
        Layout15b = new QGridLayout;
874
        Layout15b->setSpacing( 6 );
875
        Layout15b->setMargin( 0 );
341 Franz 876
 
188 Franz 877
        Foreground = new QComboBox( true, ToolFrame2, "Foreground" );
878
        Foreground->setEditable(false);
199 Franz 879
        Foreground->insertItem( tr("None"));
880
        if (Vor->Dpen == "None")
881
                Foreground->setCurrentItem(Foreground->count()-1);
882
        pm2 = QPixmap(15, 15);
188 Franz 883
        for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
884
        {
885
                pm2.fill(Vor->DColors[itc.key()].getRGBColor());
886
                Foreground->insertItem(pm2, itc.key());
199 Franz 887
                if (itc.key() == Vor->Dpen)
188 Franz 888
                        Foreground->setCurrentItem(Foreground->count()-1);
889
        }
341 Franz 890
        TextLabelT21 = new QLabel( Foreground, tr( "&Line Color:" ), ToolFrame2, "TextLabel1_3_2" );
891
        TextLabelT21->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
892
                                                TextLabelT21->sizePolicy().hasHeightForWidth() ) );
893
        Layout15b->addWidget(TextLabelT21, 0, 0);
188 Franz 894
        Layout15b->addWidget(Foreground, 0, 1);
341 Franz 895
 
188 Franz 896
        Shade2 = new QSpinBox( ToolFrame2, "Shade2" );
897
        Shade2->setSuffix( tr( " %" ) );
898
        Shade2->setMaxValue( 100 );
899
        Shade2->setMinValue( 0 );
900
        Shade2->setValue(ap->HaveDoc ? ap->doc->Dshade2 : Vor->Dshade2 );
341 Franz 901
        TextLabelT22 = new QLabel( Shade2, tr( "&Shading:" ), ToolFrame2, "TextLabel2_2" );
902
        TextLabelT22->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
903
                                                TextLabelT22->sizePolicy().hasHeightForWidth() ) );
904
        Layout15b->addWidget(TextLabelT22, 1, 0);
188 Franz 905
        Layout15b->addWidget(Shade2, 1, 1);
341 Franz 906
 
188 Franz 907
        Background = new QComboBox( true, ToolFrame2, "Background" );
908
        Background->setEditable(false);
199 Franz 909
        Background->insertItem( tr("None"));
910
        if (Vor->Dbrush == "None")
911
                Background->setCurrentItem(Background->count()-1);
188 Franz 912
        for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
913
        {
914
                pm2.fill(Vor->DColors[itc.key()].getRGBColor());
915
                Background->insertItem(pm2, itc.key());
199 Franz 916
                if (itc.key() == Vor->Dbrush)
917
                        Background->setCurrentItem(Background->count()-1);
188 Franz 918
        }
341 Franz 919
        TextLabelT23 = new QLabel( Background, tr( "&Fill Color:" ), ToolFrame2, "TextLabel1_3" );
920
        TextLabelT23->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
921
                                                TextLabelT23->sizePolicy().hasHeightForWidth() ) );
922
        Layout15b->addWidget(TextLabelT23, 2, 0);
188 Franz 923
        Layout15b->addWidget(Background, 2, 1);
341 Franz 924
 
188 Franz 925
        Shade = new QSpinBox( ToolFrame2, "Shade" );
926
        Shade->setSuffix( tr( " %" ) );
927
        Shade->setMaxValue( 100 );
928
        Shade->setMinValue( 0 );
929
        Shade->setValue(ap->HaveDoc ? ap->doc->Dshade : Vor->Dshade );
341 Franz 930
        TextLabelT24 = new QLabel( Shade, tr( "S&hading:" ), ToolFrame2, "TextLabel2_2_2" );
931
        TextLabelT24->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
932
                                                TextLabelT24->sizePolicy().hasHeightForWidth() ) );
933
        Layout15b->addWidget(TextLabelT24, 3, 0);
188 Franz 934
        Layout15b->addWidget(Shade, 3, 1);
341 Franz 935
 
188 Franz 936
        Linestyle = new LineCombo(ToolFrame2);
937
        Linestyle->setEditable(false);
938
        int dla = ap->HaveDoc ? ap->doc->DLineArt : Vor->DLineArt;
939
        switch (dla)
940
        {
199 Franz 941
        case SolidLine:
942
                Linestyle->setCurrentItem(0);
943
                break;
944
        case DashLine:
945
                Linestyle->setCurrentItem(1);
946
                break;
947
        case DotLine:
948
                Linestyle->setCurrentItem(2);
949
                break;
950
        case DashDotLine:
951
                Linestyle->setCurrentItem(3);
952
                break;
953
        case DashDotDotLine:
954
                Linestyle->setCurrentItem(4);
955
                break;
956
        default:
957
                Linestyle->setCurrentItem(0);
958
                break;
188 Franz 959
        }
341 Franz 960
        TextLabelT25 = new QLabel( Linestyle, tr( "&Type of Line:" ), ToolFrame2, "TextLabel1_3_3" );
961
        TextLabelT25->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
962
                                                TextLabelT25->sizePolicy().hasHeightForWidth() ) );
963
        Layout15b->addWidget(TextLabelT25, 4, 0);
188 Franz 964
        Layout15b->addWidget(Linestyle, 4, 1);
341 Franz 965
 
333 Franz 966
        LineW = new MSpinBox( 0, 36, ToolFrame2, 1 );
188 Franz 967
        LineW->setSuffix( tr( " pt" ) );
968
        LineW->setValue(ap->HaveDoc ? ap->doc->Dwidth : Vor->Dwidth);
341 Franz 969
        TextLabelT26 = new QLabel( LineW, tr( "Line &Width:" ), ToolFrame2, "TextLabel2_3_4" );
970
        TextLabelT26->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
971
                                                TextLabelT26->sizePolicy().hasHeightForWidth() ) );
972
        Layout15b->addWidget(TextLabelT26, 5, 0);
973
 
188 Franz 974
        Layout15b->addWidget(LineW, 5, 1);
341 Franz 975
 
188 Franz 976
        QSpacerItem* sp07 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
977
        ToolFrame2Layout->addItem( sp07 );
978
        ToolFrame2Layout->addLayout( Layout15b );
979
        QSpacerItem* sp08 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
980
        ToolFrame2Layout->addItem( sp08 );
981
        Fram->addWidget(ToolFrame2, 2);
80 Franz 982
 
188 Franz 983
        ToolFrame3 = new QFrame( this, "ToolFrame" );
984
        ToolFrame3->setFrameShape( QFrame::Box );
985
        ToolFrame3->setFrameShadow( QFrame::Sunken );
986
        ToolFrame3Layout = new QHBoxLayout( ToolFrame3 );
987
        ToolFrame3Layout->setSpacing( 0 );
988
        ToolFrame3Layout->setMargin( 10 );
989
        Layout15c = new QGridLayout;
990
        Layout15c->setSpacing( 6 );
991
        Layout15c->setMargin( 0 );
341 Franz 992
 
188 Franz 993
        Foreground2 = new QComboBox( true, ToolFrame3, "Foreground" );
994
        Foreground2->setEditable(false);
995
        QPixmap pm3;
996
        pm3 = QPixmap(15, 15);
997
        CListe::Iterator itc2;
998
        for (itc2 = Vor->DColors.begin(); itc2 != Vor->DColors.end(); ++itc2)
999
        {
1000
                pm3.fill(Vor->DColors[itc2.key()].getRGBColor());
1001
                Foreground2->insertItem(pm3, itc2.key());
199 Franz 1002
                if (itc2.key() == Vor->DpenLine)
1003
                        Foreground2->setCurrentItem(Foreground2->count()-1);
188 Franz 1004
        }
341 Franz 1005
        TextLabelT31 = new QLabel( Foreground2, tr( "&Line Color:" ), ToolFrame3, "TextLabel1_3_2" );
1006
        TextLabelT31->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1007
                                                TextLabelT31->sizePolicy().hasHeightForWidth() ) );
1008
        Layout15c->addWidget(TextLabelT31, 0, 0);      
188 Franz 1009
        Layout15c->addWidget(Foreground2, 0, 1);
1010
        Shade22 = new QSpinBox( ToolFrame3, "Shade2" );
1011
        Shade22->setSuffix( tr( " %" ) );
1012
        Shade22->setMaxValue( 100 );
1013
        Shade22->setMinValue( 0 );
1014
        Shade22->setValue(ap->HaveDoc ? ap->doc->DshadeLine : Vor->DshadeLine );
341 Franz 1015
        TextLabelT32 = new QLabel( Shade22, tr( "&Shading:" ), ToolFrame3, "TextLabel2_2" );
1016
        TextLabelT32->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1017
                                                TextLabelT32->sizePolicy().hasHeightForWidth() ) );
1018
        Layout15c->addWidget(TextLabelT32, 1, 0);      
188 Franz 1019
        Layout15c->addWidget(Shade22, 1, 1);
1020
        Linestyle2 = new LineCombo(ToolFrame3);
1021
        Linestyle2->setEditable(false);
1022
        dla = ap->HaveDoc ? ap->doc->DLstyleLine : Vor->DLstyleLine;
1023
        switch (dla)
1024
        {
199 Franz 1025
        case SolidLine:
1026
                Linestyle2->setCurrentItem(0);
1027
                break;
1028
        case DashLine:
1029
                Linestyle2->setCurrentItem(1);
1030
                break;
1031
        case DotLine:
1032
                Linestyle2->setCurrentItem(2);
1033
                break;
1034
        case DashDotLine:
1035
                Linestyle2->setCurrentItem(3);
1036
                break;
1037
        case DashDotDotLine:
1038
                Linestyle2->setCurrentItem(4);
1039
                break;
1040
        default:
1041
                Linestyle2->setCurrentItem(0);
1042
                break;
188 Franz 1043
        }
341 Franz 1044
        TextLabelT35 = new QLabel( Linestyle2, tr( "&Type of Line:" ), ToolFrame3, "TextLabel1_3_3" );
1045
        TextLabelT35->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1046
                                                TextLabelT35->sizePolicy().hasHeightForWidth() ) );
1047
        Layout15c->addWidget(TextLabelT35, 2, 0);
188 Franz 1048
        Layout15c->addWidget(Linestyle2, 2, 1);
341 Franz 1049
 
333 Franz 1050
        LineW2 = new MSpinBox( 1, 36, ToolFrame3, 1 );
351 Franz 1051
        LineW2->setSuffix( tr( " pt" ) );
188 Franz 1052
        LineW2->setValue(ap->HaveDoc ? ap->doc->DwidthLine : Vor->DwidthLine);
341 Franz 1053
        TextLabelT36 = new QLabel( LineW2, tr( "Line &Width:" ), ToolFrame3, "TextLabel2_3_4" );
1054
        TextLabelT36->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1055
                                                TextLabelT36->sizePolicy().hasHeightForWidth() ) );
1056
        Layout15c->addWidget(TextLabelT36, 3, 0);      
188 Franz 1057
        Layout15c->addWidget(LineW2, 3, 1);
1058
        QSpacerItem* sp05 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1059
        ToolFrame3Layout->addItem( sp05 );
1060
        ToolFrame3Layout->addLayout( Layout15c );
1061
        QSpacerItem* sp06 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1062
        ToolFrame3Layout->addItem( sp06 );
1063
        Fram->addWidget(ToolFrame3, 3);
199 Franz 1064
 
188 Franz 1065
        ToolFrame4 = new QFrame( this, "ToolFrame" );
1066
        ToolFrame4->setFrameShape( QFrame::Box );
1067
        ToolFrame4->setFrameShadow( QFrame::Sunken );
1068
        ToolFrame4Layout = new QHBoxLayout( ToolFrame4 );
1069
        ToolFrame4Layout->setSpacing( 0 );
1070
        ToolFrame4Layout->setMargin( 10 );
1071
        Layout15d = new QGridLayout;
1072
        Layout15d->setSpacing( 6 );
1073
        Layout15d->setMargin( 0 );
341 Franz 1074
 
188 Franz 1075
        MinMag = new QSpinBox( ToolFrame4, "Shade2" );
1076
        MinMag->setSuffix( tr( " %" ) );
1077
        MinMag->setMaxValue( 800 );
1078
        MinMag->setMinValue( 10 );
1079
        MinMag->setLineStep( 10 );
1080
        MinMag->setValue(ap->HaveDoc ? ap->doc->MagMin : Vor->MagMin );
341 Franz 1081
        TextLabelT42 = new QLabel( MinMag, tr( "Mi&nimum:" ), ToolFrame4, "TextLabel2_2" );
1082
        TextLabelT42->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1083
                                                TextLabelT42->sizePolicy().hasHeightForWidth() ) );
1084
        Layout15d->addWidget(TextLabelT42, 0, 0);
188 Franz 1085
        Layout15d->addWidget(MinMag, 0, 1);
341 Franz 1086
 
188 Franz 1087
        MaxMag = new QSpinBox( ToolFrame4, "Shade" );
1088
        MaxMag->setSuffix( tr( " %" ) );
1089
        MaxMag->setMaxValue( 800 );
1090
        MaxMag->setMinValue( 10 );
1091
        MaxMag->setLineStep( 10 );
1092
        MaxMag->setValue(ap->HaveDoc ? ap->doc->MagMax : Vor->MagMax );
341 Franz 1093
        TextLabelT43 = new QLabel( MaxMag, tr( "Ma&ximum:" ), ToolFrame4, "TextLabel2_2_3" );
1094
        TextLabelT43->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1095
                                                TextLabelT43->sizePolicy().hasHeightForWidth() ) );
1096
        Layout15d->addWidget(TextLabelT43, 1, 0);
188 Franz 1097
        Layout15d->addWidget(MaxMag, 1, 1);
341 Franz 1098
 
188 Franz 1099
        StepMag = new QSpinBox( ToolFrame4, "LineW" );
1100
        StepMag->setSuffix( tr( " %" ) );
1101
        StepMag->setMaxValue( 200 );
1102
        StepMag->setMinValue( 1 );
1103
        StepMag->setLineStep( 25 );
1104
        StepMag->setValue(ap->HaveDoc ? ap->doc->MagStep : Vor->MagStep );
341 Franz 1105
        TextLabelT44 = new QLabel( StepMag, tr( "&Stepping:" ), ToolFrame4, "TextLabel2_3_4" );
1106
        TextLabelT44->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1107
                                                TextLabelT44->sizePolicy().hasHeightForWidth() ) );
1108
        Layout15d->addWidget(TextLabelT44, 2, 0);      
188 Franz 1109
        Layout15d->addWidget(StepMag, 2, 1);
341 Franz 1110
 
188 Franz 1111
        QSpacerItem* sp03 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1112
        ToolFrame4Layout->addItem( sp03 );
1113
        ToolFrame4Layout->addLayout( Layout15d );
1114
        QSpacerItem* sp04 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1115
        ToolFrame4Layout->addItem( sp04 );
1116
        Fram->addWidget(ToolFrame4, 4);
199 Franz 1117
 
188 Franz 1118
        ToolFrame5 = new QButtonGroup( this, "ToolFrame5" );
1119
        ToolFrame5->setFrameShape( QFrame::Box );
1120
        ToolFrame5->setFrameShadow( QFrame::Sunken );
1121
        ToolFrame5->setExclusive( false );
1122
        ToolFrame5->setRadioButtonExclusive(true);
1123
        ToolFrame5Layout = new QHBoxLayout( ToolFrame5 );
1124
        ToolFrame5Layout->setSpacing( 0 );
1125
        ToolFrame5Layout->setMargin( 20 );
1126
        Layout15 = new QGridLayout;
1127
        Layout15->setSpacing( 6 );
1128
        Layout15->setMargin( 0 );
341 Franz 1129
        FreeScale = new QRadioButton( tr( "&Free Scaling" ), ToolFrame5, "FreeScale" );
188 Franz 1130
        Layout15->addMultiCellWidget( FreeScale, 0, 0, 0, 3 );
341 Franz 1131
 
188 Franz 1132
        XScale = new QSpinBox( ToolFrame5, "XScale" );
1133
        XScale->setSuffix( tr( " %" ) );
1134
        XScale->setMaxValue( 1000 );
1135
        XScale->setMinValue( 1 );
1136
        XScale->setValue(ap->HaveDoc ? qRound(ap->doc->ScaleX * 100) : qRound(Vor->ScaleX * 100) );
341 Franz 1137
        TextLabelT51 = new QLabel( XScale, tr( "&Horizontal Scaling:" ), ToolFrame5, "TextLabelT51" );
1138
        TextLabelT51->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1139
                                     TextLabelT51->sizePolicy().hasHeightForWidth() ) );
1140
        Layout15->addWidget( TextLabelT51, 1, 1 );     
188 Franz 1141
        Layout15->addWidget( XScale, 1, 2 );
1142
        YScale = new QSpinBox( ToolFrame5, "YScale" );
1143
        YScale->setSuffix( tr( " %" ) );
1144
        YScale->setMaxValue( 1000 );
1145
        YScale->setMinValue( 1 );
1146
        YScale->setValue(ap->HaveDoc ? qRound(ap->doc->ScaleY * 100) : qRound(Vor->ScaleY * 100) );
341 Franz 1147
        TextLabelT52 = new QLabel( YScale, tr( "&Vertical Scaling:" ), ToolFrame5, "TextLabelT52" );
1148
        TextLabelT52->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1149
                                     TextLabelT52->sizePolicy().hasHeightForWidth() ) );
1150
        Layout15->addWidget( TextLabelT52, 2, 1 );     
188 Franz 1151
        Layout15->addWidget( YScale, 2, 2 );
1152
        Kette = new LinkButton( ToolFrame5 );
1153
        Kette->setToggleButton( true );
1154
        Kette->setAutoRaise(true);
1155
        Layout15->addMultiCellWidget( Kette, 1, 2, 3, 3 );
341 Franz 1156
        FrameScale = new QRadioButton(tr( "&Scale Picture to Frame Size" ), ToolFrame5, "FrameScale" );
188 Franz 1157
        Layout15->addMultiCellWidget( FrameScale, 3, 3, 0, 3 );
341 Franz 1158
        Aspect = new QCheckBox( tr( "Keep Aspect &Ratio" ), ToolFrame5, "Aspect" );
188 Franz 1159
        Layout15->addMultiCellWidget( Aspect, 4, 4, 1, 3 );
1160
        ShadeP = new QSpinBox( ToolFrame5, "ShadeP" );
1161
        ShadeP->setSuffix( tr( " %" ) );
1162
        ShadeP->setMaxValue( 100 );
1163
        ShadeP->setMinValue( 0 );
1164
        ShadeP->setValue(ap->HaveDoc ? ap->doc->ShadePict : Vor->ShadePict );
341 Franz 1165
        TextLabelT54 = new QLabel( ShadeP, tr( "S&hading:" ), ToolFrame5, "TextLabelT54" );
1166
        TextLabelT54->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1167
                                                TextLabelT54->sizePolicy().hasHeightForWidth() ) );
1168
        Layout15->addWidget( TextLabelT54, 6, 0 );     
188 Franz 1169
        Layout15->addWidget( ShadeP, 6, 1 );
1170
        BackgroundP = new QComboBox( true, ToolFrame5, "BackgroundP" );
1171
        BackgroundP->setEditable(false);
1172
        BackgroundP->insertItem( tr("None"));
199 Franz 1173
        if (Vor->DbrushPict == "None")
1174
                BackgroundP->setCurrentItem(BackgroundP->count()-1);
188 Franz 1175
        for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
1176
        {
1177
                pm2.fill(Vor->DColors[itc.key()].getRGBColor());
1178
                BackgroundP->insertItem(pm2, itc.key());
199 Franz 1179
                if (itc.key() == Vor->DbrushPict)
1180
                        BackgroundP->setCurrentItem(BackgroundP->count()-1);
188 Franz 1181
        }
341 Franz 1182
        TextLabelT53 = new QLabel( BackgroundP, tr( "F&ill Color:" ), ToolFrame5, "TextLabelT53" );
1183
        TextLabelT53->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1184
                                     TextLabelT53->sizePolicy().hasHeightForWidth() ) );
1185
        Layout15->addWidget( TextLabelT53, 5, 0 );
188 Franz 1186
        Layout15->addMultiCellWidget( BackgroundP, 5, 5, 1, 3 );
1187
        QSpacerItem* sp01 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1188
        ToolFrame5Layout->addItem( sp01 );
1189
        ToolFrame5Layout->addLayout( Layout15 );
1190
        QSpacerItem* sp02 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1191
        ToolFrame5Layout->addItem( sp02 );
1192
        Aspect->setChecked(ap->HaveDoc ? ap->doc->AspectRatio : Vor->AspectRatio);
1193
        bool sct = ap->HaveDoc ? ap->doc->ScaleType : Vor->ScaleType;
1194
        FreeScale->setChecked(sct ? true : false);
1195
        FrameScale->setChecked(sct ? false : true);
1196
        ChangeScaling();
1197
        Fram->addWidget(ToolFrame5, 5);
199 Franz 1198
 
188 Franz 1199
        ToolFrame6 = new QFrame( this, "ToolFrame6" );
1200
        ToolFrame6->setFrameShape( QFrame::Box );
1201
        ToolFrame6->setFrameShadow( QFrame::Sunken );
1202
        Pre = new QPixmap(101, 101);
1203
        Pre->fill(white);
1204
        PolygonPropsLayout = new QHBoxLayout( ToolFrame6, 10, 5, "PolygonPropsLayout");
1205
        T6_Layout11 = new QHBoxLayout( 0, 0, 5, "Layout11");
1206
        T6_Layout10 = new QVBoxLayout( 0, 0, 5, "Layout10");
1207
        T6_Layout2 = new QHBoxLayout( 0, 0, 5, "Layout2");
341 Franz 1208
 
188 Franz 1209
        T6_Ecken = new QSpinBox( ToolFrame6, "Ecken" );
1210
        T6_Ecken->setMaxValue( 999 );
1211
        T6_Ecken->setMinValue( 3 );
1212
        T6_Ecken->setValue(Vor->PolyC);
341 Franz 1213
        T6_Text1 = new QLabel( T6_Ecken, tr( "Corn&ers:" ), ToolFrame6, "Text1" );
1214
        T6_Layout2->addWidget( T6_Text1 );     
188 Franz 1215
        T6_Layout2->addWidget( T6_Ecken );
1216
        T6_Layout10->addLayout( T6_Layout2 );
1217
        T6_Layout9_2 = new QHBoxLayout( 0, 0, 5, "Layout9_2");
1218
        T6_Layout8_2 = new QVBoxLayout( 0, 0, 5, "Layout8_2");
1219
        T6_Layout7_2 = new QHBoxLayout( 0, 0, 5, "Layout7_2");
341 Franz 1220
 
188 Franz 1221
        T6_Faktor2 = new QSpinBox( ToolFrame6, "Faktor_2" );
199 Franz 1222
        T6_Faktor2->setSuffix(" ");
188 Franz 1223
        T6_Faktor2->setMaxValue( 180 );
1224
        T6_Faktor2->setMinValue( -180 );
1225
        T6_Faktor2->setValue(static_cast<int>(Vor->PolyR));
341 Franz 1226
        T6_Text2_2 = new QLabel( T6_Faktor2, tr( "&Rotation:" ), ToolFrame6, "Text2_2" );
1227
        T6_Layout7_2->addWidget( T6_Text2_2 ); 
188 Franz 1228
        T6_Layout7_2->addWidget( T6_Faktor2 );
1229
        T6_Layout8_2->addLayout( T6_Layout7_2 );
1230
        T6_Slider2 = new QSlider( ToolFrame6, "Slider1_2" );
1231
        T6_Slider2->setMinValue( -180 );
1232
        T6_Slider2->setMaxValue( 180 );
1233
        T6_Slider2->setValue(static_cast<int>(Vor->PolyR));
1234
        T6_Slider2->setOrientation( QSlider::Horizontal );
1235
        T6_Slider2->setTickmarks( QSlider::Right );
1236
        T6_Layout8_2->addWidget( T6_Slider2 );
1237
        T6_Layout9_2->addLayout( T6_Layout8_2 );
1238
        T6_Layout10->addLayout( T6_Layout9_2 );
415 Franz 1239
        T6_Konvex = new QCheckBox( tr( "Apply &Factor" ), ToolFrame6, "Konvex" );
188 Franz 1240
        T6_Konvex->setChecked(Vor->PolyS);
1241
        T6_Layout10->addWidget( T6_Konvex );
1242
        T6_Layout9 = new QHBoxLayout( 0, 0, 5, "Layout9");
1243
        QSpacerItem* T6_spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1244
        T6_Layout9->addItem( T6_spacer );
1245
        T6_Layout8 = new QVBoxLayout( 0, 0, 5, "Layout8");
1246
        T6_Layout7 = new QHBoxLayout( 0, 0, 5, "Layout7");
341 Franz 1247
        T6_Faktor = new QSpinBox( ToolFrame6, "&Faktor" );
188 Franz 1248
        T6_Faktor->setSuffix( tr( " %" ) );
1249
        T6_Faktor->setMaxValue( 100 );
1250
        T6_Faktor->setMinValue( -100 );
1251
        T6_Faktor->setValue(Vor->PolyFd);
341 Franz 1252
        T6_Text2 = new QLabel( T6_Faktor, tr( "&Factor:" ), ToolFrame6, "Text2" );
1253
        T6_Layout7->addWidget( T6_Text2 );     
188 Franz 1254
        T6_Layout7->addWidget( T6_Faktor );
1255
        T6_Layout8->addLayout( T6_Layout7 );
1256
        T6_Slider1 = new QSlider( ToolFrame6, "Slider1" );
1257
        T6_Slider1->setMinValue( -100 );
1258
        T6_Slider1->setMaxValue( 100 );
1259
        T6_Slider1->setOrientation( QSlider::Horizontal );
1260
        T6_Slider1->setTickmarks( QSlider::Right );
1261
        T6_Slider1->setValue(Vor->PolyFd);
449 fschmid 1262
        if (Vor->PolyFd == 0)
1263
                T6_Konvex->setChecked(false);
188 Franz 1264
        T6_Layout8->addWidget( T6_Slider1 );
1265
        T6_Layout9->addLayout( T6_Layout8 );
1266
        T6_Layout10->addLayout( T6_Layout9 );
1267
        T6_Layout11->addLayout( T6_Layout10 );
1268
        T6_Preview = new QLabel( ToolFrame6, "Preview" );
1269
        T6_Preview->setMinimumSize( QSize( 106, 106 ) );
1270
        T6_Preview->setMaximumSize( QSize( 106, 106 ) );
1271
        T6_Preview->setFrameShape( QLabel::Panel );
1272
        T6_Preview->setFrameShadow( QLabel::Sunken );
1273
        T6_Preview->setLineWidth(2);
1274
        T6_Preview->setAlignment(AlignCenter);
1275
        T6_Preview->setPixmap(*Pre);
1276
        T6_Layout11->addWidget( T6_Preview );
1277
        QSpacerItem* T6_spacer3 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1278
        PolygonPropsLayout->addItem( T6_spacer3 );
1279
        PolygonPropsLayout->addLayout( T6_Layout11 );
1280
        QSpacerItem* T6_spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1281
        PolygonPropsLayout->addItem( T6_spacer2 );
1282
        UpdatePreView();
1283
        Fram->addWidget(ToolFrame6, 6);
3 paul 1284
 
188 Franz 1285
        TabWidget3->addWidget( tab_3, 4 );
199 Franz 1286
 
188 Franz 1287
        tab_5 = new QWidget( TabWidget3, "tab_5" );
1288
        tabLayout_5 = new QGridLayout( tab_5 );
1289
        tabLayout_5->setSpacing( 6 );
1290
        tabLayout_5->setMargin( 11 );
199 Franz 1291
 
341 Franz 1292
        Saving = new QGroupBox( tr( "Other Options" ), tab_5, "Saving" );
188 Franz 1293
        Saving->setColumnLayout(0, Qt::Vertical );
1294
        Saving->layout()->setSpacing( 0 );
1295
        Saving->layout()->setMargin( 0 );
1296
        SavingLayout = new QHBoxLayout( Saving->layout() );
1297
        SavingLayout->setAlignment( Qt::AlignTop );
1298
        SavingLayout->setSpacing( 6 );
1299
        SavingLayout->setMargin( 25 );
199 Franz 1300
 
341 Franz 1301
        SaveAtQuit = new QCheckBox( tr( "Sa&ve Contents on Changes" ), Saving, "SaveAtQuit" );
188 Franz 1302
        SaveAtQuit->setChecked(Vor->SaveAtQ);
1303
        SavingLayout->addWidget( SaveAtQuit );
199 Franz 1304
 
188 Franz 1305
        tabLayout_5->addWidget( Saving, 1, 0 );
199 Franz 1306
 
341 Franz 1307
        Preview = new QGroupBox( tr( "Preview" ), tab_5, "Preview" );
188 Franz 1308
        Preview->setColumnLayout(0, Qt::Vertical );
1309
        Preview->layout()->setSpacing( 0 );
1310
        Preview->layout()->setMargin( 0 );
1311
        PreviewLayout = new QHBoxLayout( Preview->layout() );
1312
        PreviewLayout->setAlignment( Qt::AlignTop );
1313
        PreviewLayout->setSpacing( 10 );
1314
        PreviewLayout->setMargin( 24 );
199 Franz 1315
 
188 Franz 1316
        PreviewSize = new QComboBox( true, Preview, "PreviewSize" );
1317
        PreviewSize->insertItem( tr( "Small" ) );
1318
        PreviewSize->insertItem( tr( "Medium" ) );
341 Franz 1319
        PreviewSize->insertItem( tr( "Large" ) );
188 Franz 1320
        PreviewSize->setEditable(false);
1321
        int sci = Vor->PSize == 40 ? 0 : Vor->PSize == 60 ? 1 : 2;
1322
        PreviewSize->setCurrentItem(sci);
341 Franz 1323
        TextLabelP = new QLabel( PreviewSize, tr( "&Size:" ), Preview, "TextLabel1_3" );
1324
        PreviewLayout->addWidget( TextLabelP );
188 Franz 1325
        PreviewLayout->addWidget( PreviewSize );
199 Franz 1326
 
188 Franz 1327
        tabLayout_5->addWidget( Preview, 0, 0 );
199 Franz 1328
 
188 Franz 1329
        Frame6 = new QFrame( tab_5, "Frame6" );
1330
        Frame6->setFrameShape( QFrame::NoFrame );
1331
        Frame6->setFrameShadow( QFrame::Plain );
1332
        Frame6->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
199 Franz 1333
 
188 Franz 1334
        tabLayout_5->addMultiCellWidget( Frame6, 0, 1, 1, 1 );
1335
        TabWidget3->addWidget( tab_5, 5 );
199 Franz 1336
 
188 Franz 1337
        tab_6 = new QWidget( TabWidget3, "tab_6" );
1338
        tabLayout_6 = new QHBoxLayout( tab_6 );
1339
        tabLayout_6->setSpacing( 6 );
1340
        tabLayout_6->setMargin( 11 );
341 Franz 1341
        GroupBox10 = new QGroupBox( "", tab_6, "GroupBox10" );
188 Franz 1342
        GroupBox10->setColumnLayout(0, Qt::Vertical );
1343
        GroupBox10->layout()->setSpacing( 0 );
1344
        GroupBox10->layout()->setMargin( 0 );
1345
        GroupBox10Layout = new QVBoxLayout( GroupBox10->layout() );
1346
        GroupBox10Layout->setAlignment( Qt::AlignTop );
1347
        GroupBox10Layout->setSpacing( 6 );
1348
        GroupBox10Layout->setMargin( 11 );
341 Franz 1349
        SidebySide = new QCheckBox( tr( "Display Pages &Side by Side" ), GroupBox10, "SidebySide" );
188 Franz 1350
        SidebySide->setChecked(ap->HaveDoc ? ap->doc->PagesSbS : Vor->PagesSbS);
1351
        GroupBox10Layout->addWidget( SidebySide );
3 paul 1352
 
188 Franz 1353
        Layout_6b = new QHBoxLayout();
1354
        Layout_6b->setSpacing( 0 );
1355
        Layout_6b->setMargin( 0 );
341 Franz 1356
        GroupBox20a = new QGroupBox( tr( "Page Colors" ), GroupBox10, "GroupBox20" );
188 Franz 1357
        GroupBox20a->setColumnLayout(0, Qt::Vertical );
1358
        GroupBox20a->layout()->setSpacing( 0 );
1359
        GroupBox20a->layout()->setMargin( 0 );
1360
        GroupBox20aLayout = new QHBoxLayout( GroupBox20a->layout() );
1361
        GroupBox20aLayout->setAlignment( Qt::AlignTop );
1362
        GroupBox20aLayout->setSpacing( 10 );
1363
        GroupBox20aLayout->setMargin( 5 );
341 Franz 1364
        PapColor = new QPushButton( "", GroupBox20a, "PapColor" );
188 Franz 1365
        PapColor->setAutoDefault( false );
1366
        QPixmap pm1a = QPixmap(40, 20);
705 fschmid 1367
        pm1a.fill(Vor->DpapColor);
1368
        Cpaper = Vor->DpapColor;
188 Franz 1369
        PapColor->setPixmap(pm1a);
341 Franz 1370
        TextLabel4a = new QLabel( PapColor, tr( "&Background:" ), GroupBox20a, "TextLabel4" );
1371
        TextLabel4a->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1372
                                    TextLabel4a->sizePolicy().hasHeightForWidth() ) );
1373
        GroupBox20aLayout->addWidget( TextLabel4a);
188 Franz 1374
        GroupBox20aLayout->addWidget( PapColor );
341 Franz 1375
 
1376
        RandColor = new QPushButton( "", GroupBox20a, "RColor" );
188 Franz 1377
        RandColor->setAutoDefault( false );
705 fschmid 1378
        pm1a.fill(Vor->DmargColor);
1379
        Crand = Vor->DmargColor;
188 Franz 1380
        RandColor->setPixmap(pm1a);
341 Franz 1381
        TextLabel4b = new QLabel( RandColor, tr( "&Margins:" ), GroupBox20a, "TextLabel4" );
1382
        TextLabel4b->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
1383
                                    TextLabel4b->sizePolicy().hasHeightForWidth() ) );
1384
        GroupBox20aLayout->addWidget( TextLabel4b);
188 Franz 1385
        GroupBox20aLayout->addWidget( RandColor );
1386
        Layout_6b->addWidget(GroupBox20a);
341 Franz 1387
 
188 Franz 1388
        QSpacerItem* spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
1389
        Layout_6b->addItem( spacer2 );
1390
        GroupBox10Layout->addLayout(Layout_6b);
341 Franz 1391
        RandFarb = new QCheckBox( tr( "Display &Unprintable Area in Margin Color" ), GroupBox10, "Ran" );
705 fschmid 1392
        RandFarb->setChecked(Vor->RandFarbig);
188 Franz 1393
        GroupBox10Layout->addWidget( RandFarb );
341 Franz 1394
        UsePDFTrans = new QCheckBox( tr( "Use PDF 1.4 &Transparency Features" ), GroupBox10, "Ran2" );
188 Franz 1395
        UsePDFTrans->setChecked(Vor->PDFTransparency);
1396
        GroupBox10Layout->addWidget( UsePDFTrans );
3 paul 1397
 
341 Franz 1398
        CaliGroup = new QGroupBox( tr( "&Adjust Display Size" ), GroupBox10, "CaliGroup" );
188 Franz 1399
        CaliGroup->setColumnLayout(0, Qt::Vertical );
1400
        CaliGroup->layout()->setSpacing( 6 );
1401
        CaliGroup->layout()->setMargin( 11 );
1402
        CaliGroupLayout = new QVBoxLayout( CaliGroup->layout() );
1403
        CaliGroupLayout->setAlignment( Qt::AlignTop );
341 Franz 1404
        CaliText = new QLabel( tr( "To adjust the display drag the ruler below with the Slider." ), CaliGroup, "CaliText" );
188 Franz 1405
        CaliGroupLayout->addWidget( CaliText );
1406
        CaliRuler = new QLabel( CaliGroup, "CaliRuler" );
1407
        CaliRuler->setMinimumSize( QSize( 20, 20 ) );
1408
        DrawRuler();
1409
        CaliRuler->setFrameShape( QLabel::Box );
1410
        CaliRuler->setFrameShadow( QLabel::Sunken );
1411
        CaliRuler->setScaledContents( FALSE );
1412
        CaliGroupLayout->addWidget( CaliRuler );
1413
        layout15ca = new QHBoxLayout( 0, 0, 6, "layout15");
1414
        CaliSlider = new QSlider( CaliGroup, "CaliSlider" );
1415
        CaliSlider->setMinValue( -100 );
1416
        CaliSlider->setMaxValue( 100 );
1417
        CaliSlider->setValue(static_cast<int>(100 * DisScale)-100);
1418
        CaliSlider->setOrientation( QSlider::Horizontal );
1419
        CaliSlider->setTickmarks( QSlider::Right );
1420
        CaliSlider->setTickInterval( 10 );
341 Franz 1421
        CaliText->setBuddy(CaliGroup);
188 Franz 1422
        layout15ca->addWidget( CaliSlider );
1423
        CaliAnz = new QLabel( CaliGroup, "CaliAnz" );
1424
        CaliAnz->setText(QString::number(DisScale*100, 'f', 2)+" %");
1425
        layout15ca->addWidget( CaliAnz );
1426
        CaliGroupLayout->addLayout( layout15ca );
199 Franz 1427
 
188 Franz 1428
        GroupBox10Layout->addWidget( CaliGroup );
199 Franz 1429
 
188 Franz 1430
        tabLayout_6->addWidget( GroupBox10 );
1431
        TabWidget3->addWidget( tab_6, 6 );
220 Franz 1432
 
1433
        ExtTool = new QWidget( TabWidget3, "ExtTool" );
1434
        ExtToolLayout = new QVBoxLayout( ExtTool, 11, 6, "ExtToolLayout");
341 Franz 1435
        groupGS = new QGroupBox( tr( "Postscript Interpreter" ), ExtTool, "groupGS" );
220 Franz 1436
        groupGS->setColumnLayout(0, Qt::Vertical );
1437
        groupGS->layout()->setSpacing( 6 );
1438
        groupGS->layout()->setMargin( 10 );
1439
        groupGSLayout = new QVBoxLayout( groupGS->layout() );
1440
        groupGSLayout->setAlignment( Qt::AlignTop );
1441
        GSlayout = new QHBoxLayout( 0, 0, 6, "GSlayout");
1442
        GSName = new QLineEdit( groupGS, "GSName" );
1443
        GSName->setText(Vor->gs_exe);
341 Franz 1444
        GSText = new QLabel( GSName, tr( "&Name of Executable:" ), groupGS, "GSText" );
1445
        GSlayout->addWidget( GSText );
220 Franz 1446
        GSlayout->addWidget( GSName );
1447
        groupGSLayout->addLayout( GSlayout );
341 Franz 1448
        GSantiText = new QCheckBox( tr( "Antialias &Text" ), groupGS, "GSantiText" );
220 Franz 1449
        GSantiText->setChecked(Vor->gs_antiText);
1450
        groupGSLayout->addWidget( GSantiText );
341 Franz 1451
        GSantiGraph = new QCheckBox( tr( "Antialias &Graphics" ), groupGS, "GSantiGraph" );
220 Franz 1452
        GSantiGraph->setChecked(Vor->gs_antiGraph);
1453
        groupGSLayout->addWidget( GSantiGraph );
1454
        ExtToolLayout->addWidget( groupGS );
341 Franz 1455
        groupGimp = new QGroupBox( tr( "Image Processing Tool" ), ExtTool, "groupGimp" );
220 Franz 1456
        groupGimp->setColumnLayout(0, Qt::Vertical );
1457
        groupGimp->layout()->setSpacing( 6 );
1458
        groupGimp->layout()->setMargin( 10 );
1459
        groupGimpLayout = new QHBoxLayout( groupGimp->layout() );
1460
        groupGimpLayout->setAlignment( Qt::AlignTop );
1461
        GimpName = new QLineEdit( groupGimp, "GimpName" );
1462
        GimpName->setText(Vor->gimp_exe);
341 Franz 1463
        GimpText = new QLabel( GimpName, tr( "Name of &Executable:" ), groupGimp, "GimpText" );
1464
        groupGimpLayout->addWidget( GimpText );
220 Franz 1465
        groupGimpLayout->addWidget( GimpName );
1466
        ExtToolLayout->addWidget( groupGimp );
1467
        QSpacerItem* spacer_gs = new QSpacerItem( 0, 1, QSizePolicy::Minimum, QSizePolicy::Expanding );
1468
        ExtToolLayout->addItem( spacer_gs );
1469
        TabWidget3->addWidget( ExtTool, 7 );
222 Franz 1470
 
1471
        Misc = new QWidget( TabWidget3, "Misc" );
1472
        MiscLayout = new QVBoxLayout( Misc, 11, 6, "MiscLayout");
341 Franz 1473
        groupPrint = new QGroupBox( tr( "Printing" ), Misc, "groupPrint" );
222 Franz 1474
        groupPrint->setColumnLayout(0, Qt::Vertical );
1475
        groupPrint->layout()->setSpacing( 10 );
1476
        groupPrint->layout()->setMargin( 10 );
1477
        groupPrintLayout = new QVBoxLayout( groupPrint->layout() );
1478
        groupPrintLayout->setAlignment( Qt::AlignTop );
341 Franz 1479
        ClipMarg = new QCheckBox( tr( "Clip to Page &Margins" ), groupPrint, "ClipMarg" );
222 Franz 1480
        ClipMarg->setChecked(Vor->ClipMargin);
1481
        groupPrintLayout->addWidget( ClipMarg );
344 Franz 1482
        DoGCR = new QCheckBox( tr( "Apply &Under Color Removal" ), groupPrint, "ClipMarg" );
1483
        DoGCR->setChecked(Vor->GCRMode);
1484
        groupPrintLayout->addWidget( DoGCR );
222 Franz 1485
        MiscLayout->addWidget( groupPrint );
1486
        QSpacerItem* spacer_3m = new QSpacerItem( 0, 1, QSizePolicy::Minimum, QSizePolicy::Expanding );
1487
        MiscLayout->addItem( spacer_3m );
1488
        TabWidget3->addWidget( Misc, 8 );
1489
 
366 Franz 1490
        TabListe->setCurrentItem(0);
1491
        TabListe->setSelected(0, true);
188 Franz 1492
        Fram->raiseWidget(1);
3 paul 1493
 
188 Franz 1494
        PrefsLayout2->addWidget( TabWidget3 );
1495
        PrefsLayout->addLayout(PrefsLayout2);
3 paul 1496
 
188 Franz 1497
        Layout3 = new QHBoxLayout;
1498
        Layout3->setSpacing( 6 );
1499
        Layout3->setMargin( 0 );
1500
        QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
1501
        Layout3->addItem( spacer );
341 Franz 1502
        buttonOK = new QPushButton( tr( "&OK" ), this, "buttonOK" );
188 Franz 1503
        buttonOK->setDefault( true );
248 Franz 1504
        buttonOK->setFocus();
188 Franz 1505
        Layout3->addWidget( buttonOK );
341 Franz 1506
        buttonCancel = new QPushButton( tr( "&Cancel" ), this, "buttonCancel" );
188 Franz 1507
        buttonCancel->setDefault( false );
1508
        Layout3->addWidget( buttonCancel );
1509
        PrefsLayout->addLayout( Layout3 );
1510
        setDS();
245 Franz 1511
        //tab order
1512
        QWidget::setTabOrder( GFsize, SpinBox3 );
1513
        QWidget::setTabOrder( SpinBox3, SpinBox3_2 );
1514
        QWidget::setTabOrder( SpinBox3_2, UnitCombo );
1515
        QWidget::setTabOrder( UnitCombo, Recen );
284 Franz 1516
        QWidget::setTabOrder( Recen, Docs );
245 Franz 1517
        QWidget::setTabOrder( Docs, FileC );
1518
        QWidget::setTabOrder( FileC, ProPfad );
1519
        QWidget::setTabOrder( ProPfad, FileC2  );
1520
        QWidget::setTabOrder( FileC2, ScriptPfad );
1521
        QWidget::setTabOrder( ScriptPfad, FileC3 );
410 Franz 1522
        QWidget::setTabOrder( FileC3, TemplateDir );
1523
        QWidget::setTabOrder( TemplateDir, FileC4 );
228 Franz 1524
 
245 Franz 1525
 
1526
        QWidget::setTabOrder( TopR, BottomR );
1527
        QWidget::setTabOrder( BottomR, LeftR );
1528
        QWidget::setTabOrder( LeftR, RightR );
1529
 
1530
        QWidget::setTabOrder( PreviewSize, SaveAtQuit );
1531
 
675 cbradney 1532
        QToolTip::add( guiLangCombo, tr( "Select your default language for Scribus to run with.\nLeave this blank to choose based on environment variables.\nYou can still override this by passing a command line option when starting Scribus" ) );
228 Franz 1533
        QToolTip::add( GUICombo, tr( "Choose the default window decoration and looks.\nScribus inherits any available KDE or Qt themes" ) );
1534
        QToolTip::add( GFsize, tr( "Default font size for the menus and windows" ) );
1535
        QToolTip::add( UnitCombo, tr( "Default unit of measurement for document editing" ) );
1536
        QToolTip::add( SpinBox3, tr( "Number of lines Scribus will scroll for each move of the mouse wheel" ) );
1537
        QToolTip::add( SpinBox3_2, tr( "Radius of the area where Scribus will allow you to grab an objects handles" ) );
1538
        QToolTip::add( Recen, tr( "Number of recently edited documents to show in the File menu" ) );
1539
        QToolTip::add( Docs, tr( "Default documents directory" ) );
1540
        QToolTip::add( ProPfad, tr( "Default ICC profiles directory" ) );
1541
        QToolTip::add( ScriptPfad, tr( "Default Scripter scripts directory" ) );
410 Franz 1542
        QToolTip::add( TemplateDir, tr( "Additional Directory for Document Templates" ) );
228 Franz 1543
 
1544
        QToolTip::add( GZComboF, tr( "Default page size, either a standard size or a custom size" ) );
1545
        QToolTip::add( GZComboO, tr( "Default orientation of document pages" ) );
1546
        QToolTip::add( Breite, tr( "Width of document pages, editable if you have chosen a custom page size" ) );
1547
        QToolTip::add( Hoehe, tr( "Height of document pages, editable if you have chosen a custom page size" ) );
1548
        QToolTip::add( Doppelseiten, tr( "Enable single or spread based layout" ) );
1549
        QToolTip::add( Linkszuerst, tr( "Make the first page the left page of a document" ) );
1550
        QToolTip::add( TopR, tr( "Distance between the top margin guide and the edge of the page" ) );
1551
        QToolTip::add( BottomR, tr( "Distance between the bottom margin guide and the edge of the page" ) );
1552
        QToolTip::add( LeftR, tr( "Distance between the left margin guide and the edge of the page.\nIf Facing Pages is selected, this margin space can be used to achieve the correct margins for binding" ) );
236 Franz 1553
        QToolTip::add( RightR, tr( "Distance between the right margin guide and the edge of the page.\nIf Facing Pages is selected, this margin space can be used to achieve the correct margins for binding" ) );
228 Franz 1554
        QToolTip::add( ASon, tr( "When enabled, Scribus saves a backup copy of your file with the .bak extension\neach time the time period elapses" ) );
1555
        QToolTip::add( ASTime, tr( "Time period between saving automatically" ) );
1556
 
1557
        QToolTip::add( SpinBox1, tr( "Distance between the minor grid lines" ) );
1558
        QToolTip::add( SpinBox2, tr( "Distance between the major grid lines" ) );
1559
        QToolTip::add( SpinBox2g, tr( "Distance within which an object will snap to your placed guides" ) );
1560
        QToolTip::add( minColor, tr( "Color of the minor grid lines" ) );
1561
        QToolTip::add( MaxColor, tr( "Color of the major grid lines" ) );
1562
        QToolTip::add( GuideColor, tr( "Color of the guide lines you insert" ) );
1563
        QToolTip::add( RadioButton6, tr( "Place the grid behind your page objects" ) );
1564
        QToolTip::add( RadioButton7, tr( "Place the grid in front of your page objects" ) );
263 Franz 1565
        QToolTip::add( RadioButton8, tr("Turns on the basegrid"));
1566
        QToolTip::add( RadioButton9, tr("Turns off the basegrid"));
228 Franz 1567
 
1568
        QToolTip::add( VHochW, tr( "Displacement above the baseline of the font on a line" ) );
1569
        QToolTip::add( VHochWSc, tr( "Relative size of the superscript compared to the normal font" ) );
1570
        QToolTip::add( VTiefW, tr( "Displacement below the baseline of the normal font on a line" ) );
1571
        QToolTip::add( VTiefWSc, tr( "Relative size of the subscript compared to the normal font" ) );
1572
        QToolTip::add( SmallCaps, tr( "Relative size of the small caps font compared to the normal font" ) );
1573
        QToolTip::add( AutoLineV, tr( "Percentage increase over the font size for the line spacing" ) );
1574
 
1575
        QToolTip::add( TextButton, tr( "Text Frame Properties" ) );
1576
        QToolTip::add( BildButton, tr( "Picture Frame Properties" ) );
1577
        QToolTip::add( RectButton, tr( "Shape Drawing Properties" ) );
1578
        QToolTip::add( OvalButton, tr( "Shape Drawing Properties" ) );
1579
        QToolTip::add( ZoomButton, tr( "Magnification Level Defaults" ) );
1580
        QToolTip::add( LineButton, tr( "Line Drawing Properties" ) );
1581
        QToolTip::add( PolyButton, tr( "Polygon Drawing Properties" ) );
1582
 
1583
        QToolTip::add( FontComb, tr( "Font for new text frames" ) );
1584
        QToolTip::add( SizeCombo, tr( "Size of font for new text frames" ) );
1585
        QToolTip::add( ForegroundT, tr( "Color of font" ) );
1586
        QToolTip::add( TextColVal, tr( "Number of columns in a text frame" ) );
1587
        QToolTip::add( TextGapVal, tr( "Gap between text frame columns" ) );
1588
        QToolTip::add( TextLabel1_4, tr( "Sample of your font" ) );
1589
 
1590
 
1591
        QToolTip::add( FreeScale, tr( "Picture frames allow pictures to scale to any size" ) );
1592
        QToolTip::add( XScale, tr( "Horizontal scaling of images" ) );
1593
        QToolTip::add( YScale, tr( "Vertical scaling of images" ) );
1594
        QToolTip::add( Kette, tr( "Keep horizontal and vertical scaling the same" ) );
1595
        QToolTip::add( FrameScale, tr( "Pictures in picture frames are scaled to the size of the frame" ) );
1596
        QToolTip::add( Aspect, tr( "Automatically scaled pictures keep their original proportions" ) );
1597
        QToolTip::add( BackgroundP, tr( "Fill color of picture frames" ) );
1598
        QToolTip::add( ShadeP, tr( "Saturation of color of fill" ) );
1599
 
1600
        QToolTip::add( Foreground, tr( "Line color of shapes" ) );
1601
        QToolTip::add( Shade2, tr( "Saturation of color of lines" ) );
1602
        QToolTip::add( Background, tr( "Fill color of shapes" ) );
1603
        QToolTip::add( Shade, tr( "Saturation of color of fill" ) );
1604
        QToolTip::add( Linestyle, tr( "Line style of shapes" ) );
1605
        QToolTip::add( LineW, tr( "Line width of shapes" ) );
1606
 
1607
        QToolTip::add( MinMag, tr( "Minimum magnification allowed" ) );
1608
        QToolTip::add( MaxMag, tr( "Maximum magnification allowed" ) );
1609
        QToolTip::add( StepMag, tr( "Change in magnification for each zoom operation" ) );
1610
 
1611
        QToolTip::add( Foreground2, tr( "Color of lines" ) );
1612
        QToolTip::add( Shade22, tr( "Saturation of color" ) );
1613
        QToolTip::add( Linestyle2, tr( "Style of lines" ) );
1614
        QToolTip::add( LineW2, tr( "Width of lines" ) );
1615
 
1616
        QToolTip::add( T6_Ecken, tr( "Number of corners for polygons" ) );
1617
        QToolTip::add( T6_Faktor2, tr( "Degrees of rotation for polygons" ) );
1618
        QToolTip::add( T6_Slider2, tr( "Degrees of rotation for polygons" ) );
415 Franz 1619
        QToolTip::add( T6_Konvex, tr( "Apply Convex/Concave Factor to change shape of Polygons" ) );
228 Franz 1620
        QToolTip::add( T6_Preview, tr( "Sample Polygon" ) );
415 Franz 1621
        QToolTip::add( T6_Faktor, tr( "A negative value will make the polygon concave (or star shaped),\n a positive value will make it convex" ) );
1622
        QToolTip::add( T6_Slider1, tr( "A negative value will make the polygon concave (or star shaped),\n a positive value will make it convex" ) );
228 Franz 1623
 
1624
        QToolTip::add( PreviewSize, tr( "Choose the size of the preview in the scrapbook palette" ) );
243 Franz 1625
        QToolTip::add( SaveAtQuit, tr( "Save the scrapbook contents everytime after a change" ) );
228 Franz 1626
 
1627
        QToolTip::add( SidebySide, tr( "When using facing pages, show the two pages side by side" ) );
1628
        QToolTip::add( PapColor, tr( "Color for paper" ) );
1629
        QToolTip::add( RandColor, tr( "Color for the margin lines" ) );
1630
        QToolTip::add( RandFarb, tr( "Mask the area outside the margins in the margin color" ) );
1631
        QToolTip::add( UsePDFTrans, tr( "Enable transparency features within PDF 1.4 export" ) );
1632
        QToolTip::add( CaliSlider, tr( "Set the default zoom level" ) );
1633
 
1634
        QToolTip::add( GSName, tr( "Filesystem location for the Ghostscript interpreter" ) );
1635
        QToolTip::add( GSantiText, tr( "Antialias text for EPS and PDF onscreen rendering" ) );
1636
        QToolTip::add( GSantiGraph, tr( "Antialias graphics for EPS and PDF onscreen rendering" ) );
249 Franz 1637
        QToolTip::add( GimpName, tr( "Filesystem location for graphics editor" ) );
228 Franz 1638
 
1639
        QToolTip::add( ClipMarg, tr( "Do not show objects outside the margins on the printed page or exported file" ) );
415 Franz 1640
        QToolTip::add( DoGCR, tr( "A way of switching off some of the gray shades which are composed\n"
1641
                                                        "of cyan, yellow and magenta and using black instead.\n"
1642
                                                        "UCR most affects parts of images which are neutral and/or dark tones\n"
1643
                                                        "which are close to the gray. Use of this may improve printing some images\n"
1644
                                                        "and some experimentation and testing is need on a case by case basis.\n"
1645
                                                        "UCR reduces the possibility of over saturation with CMY inks." ) );
228 Franz 1646
 
188 Franz 1647
        // signals and slots connections
663 cbradney 1648
        connect( guiLangCombo, SIGNAL( activated( const QString & ) ), this, SLOT( setSelectedGUILang( const QString & ) ) );
1649
 
188 Franz 1650
        connect( minColor, SIGNAL( clicked() ), this, SLOT( changeMicolor() ) );
1651
        connect( MaxColor, SIGNAL( clicked() ), this, SLOT( changeMaColor() ) );
1652
        connect( PapColor, SIGNAL( clicked() ), this, SLOT( changePapColor() ) );
1653
        connect( RandColor, SIGNAL( clicked() ), this, SLOT( changeRandColor() ) );
1654
        connect( GuideColor, SIGNAL( clicked() ), this, SLOT( changeGuideColor() ) );
338 Franz 1655
        connect( BaseColor, SIGNAL( clicked() ), this, SLOT( changeBaseColor() ) );
188 Franz 1656
        connect( buttonOK, SIGNAL( clicked() ), this, SLOT( accept() ) );
1657
        connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
1658
        connect(FontComb, SIGNAL(activated(int)), this, SLOT(SetSample()));
1659
        connect(SizeCombo, SIGNAL(activated(int)), this, SLOT(SetSample()));
1660
        connect(TextButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1661
        connect(RectButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1662
        connect(OvalButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1663
        connect(LineButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1664
        connect(ZoomButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1665
        connect(BildButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1666
        connect(PolyButton, SIGNAL(clicked()), this, SLOT(SetTool()));
1667
        connect(Kette, SIGNAL(clicked()), this, SLOT(ToggleKette()));
1668
        connect(XScale, SIGNAL(valueChanged(int)), this, SLOT(HChange()));
1669
        connect(YScale, SIGNAL(valueChanged(int)), this, SLOT(VChange()));
1670
        connect(UnitCombo, SIGNAL(activated(int)), this, SLOT(UnitChange()));
1671
        connect(T6_Faktor, SIGNAL(valueChanged(int)), this, SLOT(ValFromSpin(int)));
1672
        connect(T6_Slider1, SIGNAL(valueChanged(int)), T6_Faktor, SLOT(setValue(int)));
1673
        connect(T6_Slider1, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
1674
        connect(T6_Faktor2, SIGNAL(valueChanged(int)), this, SLOT(ValFromSpin2(int)));
1675
        connect(T6_Slider2, SIGNAL(valueChanged(int)), T6_Faktor2, SLOT(setValue(int)));
1676
        connect(T6_Slider2, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
1677
        connect(T6_Ecken, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
1678
        connect(T6_Konvex, SIGNAL(clicked()), this, SLOT(UpdatePreView()));
1679
        connect(Breite, SIGNAL(valueChanged(int)), this, SLOT(setBreite(int)));
1680
        connect(Hoehe, SIGNAL(valueChanged(int)), this, SLOT(setHoehe(int)));
1681
        connect(TopR, SIGNAL(valueChanged(int)), this, SLOT(setTop(int)));
1682
        connect(BottomR, SIGNAL(valueChanged(int)), this, SLOT(setBottom(int)));
1683
        connect(LeftR, SIGNAL(valueChanged(int)), this, SLOT(setLeft(int)));
1684
        connect(RightR, SIGNAL(valueChanged(int)), this, SLOT(setRight(int)));
1685
        connect(GZComboO, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
1686
        connect(GZComboF, SIGNAL(activated(int)), this, SLOT(setSize(int)));
1687
        connect(Doppelseiten, SIGNAL(clicked()), this, SLOT(setDS()));
1688
        connect(FreeScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
1689
        connect(FrameScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
1690
        connect(FileC, SIGNAL(clicked()), this, SLOT(ChangeDocs()));
1691
        connect(FileC2, SIGNAL(clicked()), this, SLOT(ChangeProfs()));
1692
        connect(FileC3, SIGNAL(clicked()), this, SLOT(ChangeScripts()));
410 Franz 1693
        connect(FileC4, SIGNAL(clicked()), this, SLOT(ChangeTemplates()));
199 Franz 1694
        connect(CaliSlider, SIGNAL(valueChanged(int)), this, SLOT(SetDisScale()));
188 Franz 1695
        connect(TabListe, SIGNAL(highlighted(int)), TabWidget3, SLOT(raiseWidget(int)));
1696
        setSize(Vor->PageFormat);
1697
        setOrien(Vor->Ausrichtung);
308 Franz 1698
        Breite->setValue(Vor->PageBreite * Umrech);
1699
        Hoehe->setValue(Vor->PageHoehe * Umrech);
199 Franz 1700
        UnitChange();
3 paul 1701
}
1702
 
199 Franz 1703
/*!
145 Franz 1704
 \fn Preferences::~Preferences
1705
 \author Franz Schmid
1706
 \date  
1707
 \brief Destructor for Preferences dialog box
1708
 \param None
1709
 \retval None
3 paul 1710
 */
1711
Preferences::~Preferences()
1712
{
199 Franz 1713
        // no need to delete child widgets, Qt does it all for us
3 paul 1714
}
1715
 
263 Franz 1716
 
199 Franz 1717
/*!
145 Franz 1718
 \fn void Preferences::ChangeDocs()
1719
 \author Franz Schmid
1720
 \date  
1721
 \brief Runs QFileDialog to get Preferences (General) Path to Documents directory
1722
 \param None
1723
 \retval None
1724
 */
3 paul 1725
void Preferences::ChangeDocs()
1726
{
1727
        QString s = QFileDialog::getExistingDirectory(Docs->text(), this, "d", tr("Choose a Directory"), true);
1728
        if (s != "")
1729
                Docs->setText(s);
1730
}
1731
 
199 Franz 1732
/*!
145 Franz 1733
 \fn void Preferences::ChangeProfs()
1734
 \author Franz Schmid
1735
 \date  
1736
 \brief Runs QFileDialog to get Preferences (General) Path to Colour Profiles directory
1737
 \param None
1738
 \retval None
1739
 */
68 Franz 1740
void Preferences::ChangeProfs()
1741
{
1742
        QString s = QFileDialog::getExistingDirectory(Docs->text(), this, "d", tr("Choose a Directory"), true);
1743
        if (s != "")
1744
                ProPfad->setText(s);
1745
}
1746
 
199 Franz 1747
/*!
145 Franz 1748
 \fn void Preferences::ChangeScripts()
1749
 \author Franz Schmid
1750
 \date  
1751
 \brief Runs QFileDialog to get Preferences (General) Path to Scripts directory
1752
 \param None
1753
 \retval None
1754
 */
91 Franz 1755
void Preferences::ChangeScripts()
1756
{
1757
        QString s = QFileDialog::getExistingDirectory(Docs->text(), this, "d", tr("Choose a Directory"), true);
1758
        if (s != "")
1759
                ScriptPfad->setText(s);
1760
}
1761
 
199 Franz 1762
/*!
410 Franz 1763
 \fn void Preferences::ChangeTemplates()
1764
 \author Riku Leino
1765
 \date  
1766
 \brief Runs QFileDialog to get Preferences (General) Path to Templates directory
1767
 \param None
1768
 \retval None
1769
 */
1770
void Preferences::ChangeTemplates()
1771
{
1772
        QString s = QFileDialog::getExistingDirectory(Docs->text(), this, "d", tr("Choose a Directory"), true);
1773
        if (s != "")
1774
                TemplateDir->setText(s);
1775
}
1776
 
1777
/*!
145 Franz 1778
 \fn void Preferences::ChangeScaling()
1779
 \author Franz Schmid
1780
 \date  
1781
 \brief Preferences (Tools / Image Frame), switches default between free or set scaling and their settings
1782
 \param None
1783
 \retval None
1784
 */
3 paul 1785
void Preferences::ChangeScaling()
1786
{
188 Franz 1787
        bool setter = FreeScale->isChecked() ? true : false;
80 Franz 1788
        TextLabelT51->setEnabled(setter);
1789
        TextLabelT52->setEnabled(setter);
1790
        XScale->setEnabled(setter);
1791
        YScale->setEnabled(setter);
1792
        Kette->setEnabled(setter);
1793
        Aspect->setEnabled(!setter);
3 paul 1794
}
1795
 
199 Franz 1796
/*!
145 Franz 1797
 \fn void Preferences::setDS()
1798
 \author Franz Schmid
1799
 \date  
1800
 \brief Preferences (Document / Page Size), switches default between Facing Pages and swaps text labels for margin guides
1801
 \param None
1802
 \retval None
1803
 */
3 paul 1804
void Preferences::setDS()
1805
{
188 Franz 1806
        bool m = Doppelseiten->isChecked() ? true : false;
341 Franz 1807
        GRText3->setText(m == true ? tr( "&Inside:" ) : tr( "&Left:" ));
1808
        GRText4->setText(m == true ? tr( "O&utside:" ) : tr( "&Right:" ));
188 Franz 1809
        Linkszuerst->setEnabled(m);
1810
        if (m == false)
1811
                Linkszuerst->setChecked(false);
3 paul 1812
}
1813
 
199 Franz 1814
/*!
145 Franz 1815
 \fn void Preferences::setBreite(int v)
1816
 \author Franz Schmid
1817
 \date  
1818
 \brief Preferences (Document / Page Size), sets Page width values
1819
 \param v Width value
1820
 \retval None
1821
 */
146 Franz 1822
void Preferences::setBreite(int)
3 paul 1823
{
146 Franz 1824
        Pagebr = Breite->value() / Umrech;
36 Franz 1825
        RightR->setMaxValue(Breite->value() - LeftR->value());
1826
        LeftR->setMaxValue(Breite->value() - RightR->value());
1827
        TopR->setMaxValue(Hoehe->value() - BottomR->value());
1828
        BottomR->setMaxValue(Hoehe->value() - TopR->value());
3 paul 1829
}
1830
 
199 Franz 1831
/*!
145 Franz 1832
 \fn void Preferences::setHoehe(int v)
1833
 \author Franz Schmid
1834
 \date  
1835
 \brief Preferences (Document / Page Size), sets Page height values
1836
 \param v Height value
1837
 \retval None
1838