Subversion Repositories Scribus

Rev

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