Subversion Repositories Scribus

Rev

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