Subversion Repositories Scribus

Rev

Rev 15952 | Rev 16194 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
1789 fschmid 7
 
3540 cbradney 8
 
10862 cbradney 9
#include "propertiespalette.h"
3457 avox 10
 
10200 cbradney 11
#include <QButtonGroup>
9931 fschmid 12
#include <QCheckBox>
10200 cbradney 13
#include <QCloseEvent>
9931 fschmid 14
#include <QComboBox>
10200 cbradney 15
#include <QEvent>
16
#include <QFocusEvent>
17
#include <QFrame>
18
#include <QGridLayout>
9931 fschmid 19
#include <QGroupBox>
10200 cbradney 20
#include <QHBoxLayout>
21
#include <QImage>
8501 cbradney 22
#include <QKeyEvent>
10200 cbradney 23
#include <QLabel>
8642 tsoots 24
#include <QListView>
10200 cbradney 25
#include <QMatrix>
26
#include <QMenu>
9931 fschmid 27
#include <QMessageBox>
10200 cbradney 28
#include <QObject>
29
#include <QPixmap>
9931 fschmid 30
#include <QPoint>
10200 cbradney 31
#include <QPushButton>
32
#include <QRadioButton>
9931 fschmid 33
#include <QRegExp>
10200 cbradney 34
#include <QSpacerItem>
35
#include <QSpinBox>
36
#include <QStackedWidget>
9931 fschmid 37
#include <QTimer>
10200 cbradney 38
#include <QToolBox>
39
#include <QToolTip>
40
#include <QVBoxLayout>
41
#include <QValidator>
42
#include <QWidget>
3934 cbradney 43
 
15706 jghali 44
#if defined(_MSC_VER)
45
#define _USE_MATH_DEFINES
46
#endif
9931 fschmid 47
#include <cmath>
3934 cbradney 48
#include "arrowchooser.h"
121 Franz 49
#include "autoform.h"
12092 fschmid 50
#include "basepointwidget.h"
3934 cbradney 51
#include "commonstrings.h"
7747 jghali 52
#include "colorlistbox.h"
9796 fschmid 53
#include "sccolorengine.h"
3934 cbradney 54
#include "cpalette.h"
10601 mrdocs 55
#include "pageitem_textframe.h"
3934 cbradney 56
#include "sccombobox.h"
57
#include "scfonts.h"
173 Franz 58
#include "scribus.h"
5243 cbradney 59
#include "scribuscore.h"
4695 cbradney 60
#include "scraction.h"
3934 cbradney 61
#include "scribusview.h"
62
#include "selection.h"
63
#include "spalette.h"
710 cbradney 64
#include "styleselect.h"
3934 cbradney 65
#include "tabmanager.h"
806 cbradney 66
#include "units.h"
1263 tsoots 67
#include "undomanager.h"
2531 craig 68
#include "util.h"
10200 cbradney 69
#include "util_icon.h"
5184 avox 70
#include "text/nlsconfig.h"
11206 fschmid 71
#include "dasheditor.h"
504 cbradney 72
 
73
using namespace std;
74
 
3 paul 75
 
9874 avox 76
LineFormatValue::LineFormatValue() : m_Line(), m_doc(NULL), m_name() {};
77
 
78
LineFormatValue::LineFormatValue( const multiLine& line, ScribusDoc* doc, const QString name ) : m_Line(line), m_doc(doc), m_name(name) {};
79
 
80
LineFormatValue::LineFormatValue(const LineFormatValue& other)
265 Franz 81
{
9874 avox 82
        m_name = other.m_name;
83
        m_Line = other.m_Line;
84
        m_doc = other.m_doc;
265 Franz 85
}
86
 
9874 avox 87
LineFormatValue& LineFormatValue::operator= (const LineFormatValue& other)
265 Franz 88
{
9874 avox 89
        m_name = other.m_name;
90
        m_Line = other.m_Line;
91
        m_doc = other.m_doc;
92
        return *this;
93
}
94
 
95
 
96
void LineFormatItemDelegate::redraw(const QVariant& data) const  
97
{
98
        const LineFormatValue& item(data.value<LineFormatValue>());
9796 fschmid 99
        QColor tmpf;
100
        pmap->fill(Qt::white);
101
        QPainter p;
102
        p.begin(pmap.get());
9874 avox 103
        for (int its = item.m_Line.size()-1; its > -1; its--)
9796 fschmid 104
        {
9874 avox 105
                const ScColor& col = item.m_doc->PageColors[item.m_Line[its].Color];
106
                tmpf = ScColorEngine::getDisplayColor(col, item.m_doc, item.m_Line[its].Shade);
10988 fschmid 107
                QPen pen;
12055 jghali 108
                QVector<double> m_array;
10988 fschmid 109
                if (item.m_Line[its].Dash == 1)
110
                        pen.setStyle(Qt::SolidLine);
111
                else
112
                {
113
                        getDashArray(item.m_Line[its].Dash, 1, m_array);
12055 jghali 114
                        pen.setDashPattern(m_array);
10988 fschmid 115
                }
116
                pen.setColor(tmpf);
117
                pen.setWidth(qMax(static_cast<int>(item.m_Line[its].Width), 1));
118
                pen.setCapStyle(static_cast<Qt::PenCapStyle>(item.m_Line[its].LineEnd));
119
                pen.setJoinStyle(static_cast<Qt::PenJoinStyle>(item.m_Line[its].LineJoin));
120
                p.setPen(pen);
9796 fschmid 121
                p.drawLine(0, 18, 37, 18);
122
        }
123
        p.end();
265 Franz 124
}
125
 
10898 fschmid 126
QString LineFormatItemDelegate::text(const QVariant& data) const
127
{
128
        return data.toString();
129
}
130
 
68 Franz 131
NameWidget::NameWidget(QWidget* parent) : QLineEdit(parent)
6870 fschmid 132
{
11158 avox 133
        setObjectName("namewidget");
6870 fschmid 134
        QRegExp rx( "\\w+" );
135
        QValidator* validator = new QRegExpValidator( rx, this );
136
        setValidator( validator );
137
}
68 Franz 138
 
332 Franz 139
void NameWidget::focusOutEvent(QFocusEvent *e)
68 Franz 140
{
141
        emit Leaved();
332 Franz 142
        QLineEdit::focusOutEvent(e);
68 Franz 143
}
144
 
10862 cbradney 145
PropertiesPalette::PropertiesPalette( QWidget* parent) : ScrPaletteBase( parent, "PropertiesPalette", false, 0)
3 paul 146
{
5781 cbradney 147
        m_ScMW=0;
5257 cbradney 148
        doc=0;
217 Franz 149
        HaveDoc = false;
150
        HaveItem = false;
215 Franz 151
        RoVal = 0;
8605 cbradney 152
        m_unitRatio = 1.0;
11852 fschmid 153
        tmpSelection = new Selection(this, false);
154
        tmpSelection->clear();
10529 fschmid 155
        setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
3 paul 156
 
1502 tsoots 157
        _userActionOn = false;
10774 craig 158
        userActionSniffer = new UserActionSniffer(this);
8605 cbradney 159
        connect(userActionSniffer, SIGNAL(actionStart()), this, SLOT(spinboxStartUserAction()));
160
        connect(userActionSniffer, SIGNAL(actionEnd()), this, SLOT(spinboxFinishUserAction()));
1502 tsoots 161
 
9931 fschmid 162
        MpalLayout = new QVBoxLayout( this );
163
        MpalLayout->setMargin(5);
164
        MpalLayout->setSpacing(1);
1448 cbradney 165
        setOrientation(Qt::Vertical);
166
        QFont f(font());
217 Franz 167
        f.setPointSize(f.pointSize()-1);
168
        setFont(f);
332 Franz 169
 
10529 fschmid 170
        TabStack = new QToolBox( this );
332 Franz 171
 
10529 fschmid 172
        page = new QWidget( TabStack );
9931 fschmid 173
        pageLayout = new QVBoxLayout( page );
174
        pageLayout->setMargin(0);
175
        pageLayout->setSpacing(5);
3 paul 176
 
9931 fschmid 177
        NameGroup = new QGroupBox( page );
178
        NameGroupLayout = new QHBoxLayout( NameGroup );
179
        NameGroupLayout->setMargin(5);
180
        NameGroupLayout->setSpacing(4);
217 Franz 181
        NameGroupLayout->setAlignment( Qt::AlignTop );
215 Franz 182
        NameEdit = new NameWidget(NameGroup);
8556 subik 183
        NameEdit->setFocusPolicy(Qt::ClickFocus);
217 Franz 184
        NameGroupLayout->addWidget( NameEdit );
185
        pageLayout->addWidget( NameGroup );
68 Franz 186
 
9931 fschmid 187
        GeoGroup = new QGroupBox(page);
188
        GeoGroupLayout = new QGridLayout( GeoGroup );
189
        GeoGroupLayout->setMargin(5);
190
        GeoGroupLayout->setSpacing(4);
217 Franz 191
        GeoGroupLayout->setAlignment( Qt::AlignTop );
332 Franz 192
 
8605 cbradney 193
        Xpos = new ScrSpinBox( -3000, 3000, GeoGroup, 0 );
1502 tsoots 194
        installSniffer(Xpos);
217 Franz 195
        GeoGroupLayout->addWidget( Xpos, 0, 1 );
8605 cbradney 196
        Ypos = new ScrSpinBox( -3000, 3000, GeoGroup, 0 );
1502 tsoots 197
        installSniffer(Ypos);
217 Franz 198
        GeoGroupLayout->addWidget( Ypos, 1, 1 );
8605 cbradney 199
        Width = new ScrSpinBox( GeoGroup, 0 );
1502 tsoots 200
        installSniffer(Width);
217 Franz 201
        GeoGroupLayout->addWidget( Width, 2, 1 );
8605 cbradney 202
        Height = new ScrSpinBox( GeoGroup, 0 );
1502 tsoots 203
        installSniffer(Height);
217 Franz 204
        GeoGroupLayout->addWidget( Height, 3, 1 );
348 Franz 205
 
10529 fschmid 206
        xposLabel = new QLabel( "&X-Pos:", GeoGroup );
207
        xposLabel->setBuddy(Xpos);
348 Franz 208
        GeoGroupLayout->addWidget( xposLabel, 0, 0 );
10529 fschmid 209
        yposLabel = new QLabel( "&Y-Pos:", GeoGroup );
210
        yposLabel->setBuddy(Ypos);
348 Franz 211
        GeoGroupLayout->addWidget( yposLabel, 1, 0 );
10529 fschmid 212
        widthLabel = new QLabel( "&Width:", GeoGroup );
213
        widthLabel->setBuddy(Width);
348 Franz 214
        GeoGroupLayout->addWidget( widthLabel, 2, 0 );
10529 fschmid 215
        heightLabel = new QLabel( "&Height:", GeoGroup );
216
        heightLabel->setBuddy(Height);
348 Franz 217
        GeoGroupLayout->addWidget( heightLabel, 3, 0 );
218
 
2606 cbradney 219
        keepFrameWHRatioButton = new LinkButton( GeoGroup );
10508 cbradney 220
        keepFrameWHRatioButton->setCheckable( true );
2606 cbradney 221
        keepFrameWHRatioButton->setAutoRaise( true );
222
        keepFrameWHRatioButton->setMaximumSize( QSize( 15, 32767 ) );
14686 jghali 223
        keepFrameWHRatioButton->setChecked(false);
9931 fschmid 224
        GeoGroupLayout->addWidget( keepFrameWHRatioButton, 2, 2, 2, 1 );
12471 cbradney 225
        Rotation = new ScrSpinBox( GeoGroup, 6);
226
        Rotation->setWrapping( true );
227
        installSniffer(Rotation);
10529 fschmid 228
        rotationLabel = new QLabel( "&Rotation:", GeoGroup );
12471 cbradney 229
        rotationLabel->setBuddy(Rotation);
348 Franz 230
        GeoGroupLayout->addWidget( rotationLabel, 4, 0 );
12471 cbradney 231
        GeoGroupLayout->addWidget( Rotation, 4, 1 );
9931 fschmid 232
        basepointLabel = new QLabel( "Basepoint:", GeoGroup );
332 Franz 233
        GeoGroupLayout->addWidget( basepointLabel, 5, 0 );
12092 fschmid 234
        RotationGroup = new BasePointWidget(GeoGroup, 0);
235
/*      RotationGroup = new QButtonGroup( GeoGroup );
9931 fschmid 236
        Layout12 = new QGridLayout;
237
        Layout12->setMargin(0);
238
        Layout12->setSpacing(0);
239
        TopLeft = new QRadioButton( GeoGroup );
240
        RotationGroup->addButton(TopLeft, 0);
283 Franz 241
        TopLeft->setText( "" );
217 Franz 242
        TopLeft->setChecked( true );
9752 fschmid 243
        TopLeft->setLayoutDirection(Qt::RightToLeft);
244
        TopLeft->setMaximumSize( TopLeft->iconSize() );
217 Franz 245
        Layout12->addWidget( TopLeft, 0, 0, Qt::AlignCenter );
9931 fschmid 246
        Line1 = new QFrame( GeoGroup);
217 Franz 247
        Line1->setMinimumSize( QSize( 20, 4 ) );
248
        Line1->setMaximumSize( QSize( 20, 4 ) );
9901 cbradney 249
        Line1->setFrameShape( QFrame::HLine );
250
        Line1->setFrameShadow( QFrame::Plain );
217 Franz 251
        Line1->setLineWidth( 3 );
9901 cbradney 252
        Line1->setFrameShape( QFrame::HLine );
217 Franz 253
        Layout12->addWidget( Line1, 0, 1, Qt::AlignCenter );
9931 fschmid 254
        TopRight = new QRadioButton( GeoGroup );
255
        RotationGroup->addButton(TopRight, 1);
283 Franz 256
        TopRight->setText( "" );
9752 fschmid 257
        TopRight->setMaximumSize( TopRight->iconSize() );
217 Franz 258
        Layout12->addWidget( TopRight, 0, 2, Qt::AlignCenter );
9931 fschmid 259
        Line2 = new QFrame( GeoGroup );
217 Franz 260
        Line2->setMinimumSize( QSize( 4, 20 ) );
261
        Line2->setMaximumSize( QSize( 4, 20 ) );
9901 cbradney 262
        Line2->setFrameShape( QFrame::VLine );
263
        Line2->setFrameShadow( QFrame::Plain );
217 Franz 264
        Line2->setLineWidth( 3 );
9901 cbradney 265
        Line2->setFrameShape( QFrame::VLine );
217 Franz 266
        Layout12->addWidget( Line2, 1, 0, Qt::AlignCenter );
9931 fschmid 267
        Center = new QRadioButton( GeoGroup );
268
        RotationGroup->addButton(Center, 2);
283 Franz 269
        Center->setText( "" );
9752 fschmid 270
        Center->setMaximumSize( Center->iconSize() );
217 Franz 271
        Layout12->addWidget( Center, 1, 1, Qt::AlignCenter );
9931 fschmid 272
        Line4 = new QFrame( GeoGroup );
217 Franz 273
        Line4->setMinimumSize( QSize( 4, 20 ) );
274
        Line4->setMaximumSize( QSize( 4, 20 ) );
9901 cbradney 275
        Line4->setFrameShadow( QFrame::Plain );
217 Franz 276
        Line4->setLineWidth( 3 );
9901 cbradney 277
        Line4->setFrameShape( QFrame::VLine );
217 Franz 278
        Layout12->addWidget( Line4, 1, 2, Qt::AlignCenter );
9931 fschmid 279
        BottomLeft = new QRadioButton( GeoGroup );
280
        RotationGroup->addButton(BottomLeft, 3);
283 Franz 281
        BottomLeft->setText( "" );
9752 fschmid 282
        BottomLeft->setLayoutDirection(Qt::RightToLeft);
283
        BottomLeft->setMaximumSize( BottomLeft->iconSize() );
217 Franz 284
        Layout12->addWidget( BottomLeft, 2, 0, Qt::AlignCenter );
9931 fschmid 285
        Line5 = new QFrame( GeoGroup );
217 Franz 286
        Line5->setMinimumSize( QSize( 20, 4 ) );
287
        Line5->setMaximumSize( QSize( 20, 4 ) );
9901 cbradney 288
        Line5->setFrameShape( QFrame::HLine );
289
        Line5->setFrameShadow( QFrame::Plain );
217 Franz 290
        Line5->setLineWidth( 3 );
9901 cbradney 291
        Line5->setFrameShape( QFrame::HLine );
217 Franz 292
        Layout12->addWidget( Line5, 2, 1, Qt::AlignCenter );
9931 fschmid 293
        BottomRight = new QRadioButton( GeoGroup );
294
        RotationGroup->addButton(BottomRight, 4);
283 Franz 295
        BottomRight->setText( "" );
9752 fschmid 296
        BottomRight->setMaximumSize( BottomRight->iconSize() );
217 Franz 297
        Layout12->addWidget( BottomRight, 2, 2, Qt::AlignCenter );
12092 fschmid 298
        GeoGroupLayout->addLayout( Layout12, 5, 1, 1, 1, Qt::AlignLeft); */
299
        GeoGroupLayout->addWidget( RotationGroup, 5, 1, 1, 1, Qt::AlignLeft);
217 Franz 300
        pageLayout->addWidget( GeoGroup );
3 paul 301
 
9931 fschmid 302
        layout60 = new QHBoxLayout;
303
        layout60->setMargin(0);
304
        layout60->setSpacing(5);
3 paul 305
 
9931 fschmid 306
        LayerGroup = new QGroupBox( "Level", page );
307
        LayerGroupLayout = new QGridLayout( LayerGroup );
308
        LayerGroupLayout->setSpacing( 4 );
309
        LayerGroupLayout->setMargin( 5 );
217 Franz 310
        LayerGroupLayout->setAlignment( Qt::AlignTop );
9931 fschmid 311
        Zup = new QToolButton( LayerGroup );
217 Franz 312
        Zup->setMaximumSize( QSize( 22, 22 ) );
9931 fschmid 313
        Zup->setIcon(QIcon(loadIcon("16/go-up.png")));
217 Franz 314
        LayerGroupLayout->addWidget( Zup, 0, 0 );
9931 fschmid 315
        ZDown = new QToolButton( LayerGroup );
217 Franz 316
        ZDown->setMaximumSize( QSize( 22, 22 ) );
9931 fschmid 317
        ZDown->setIcon(QIcon(loadIcon("16/go-down.png")));
217 Franz 318
        LayerGroupLayout->addWidget( ZDown, 1, 0 );
9931 fschmid 319
        ZTop = new QToolButton( LayerGroup );
217 Franz 320
        ZTop->setMaximumSize( QSize( 22, 22 ) );
9931 fschmid 321
        ZTop->setIcon(QIcon(loadIcon("16/go-top.png")));
217 Franz 322
        LayerGroupLayout->addWidget( ZTop, 0, 1 );
9931 fschmid 323
        ZBottom = new QToolButton( LayerGroup );
217 Franz 324
        ZBottom->setMaximumSize( QSize( 22, 22 ) );
9931 fschmid 325
        ZBottom->setIcon(QIcon(loadIcon("16/go-bottom.png")));
217 Franz 326
        LayerGroupLayout->addWidget( ZBottom, 1, 1 );
15432 craig 327
        LevelTxt = new QLabel( "  ", LayerGroup );
272 Franz 328
        LevelTxt->setAlignment( Qt::AlignCenter );
9931 fschmid 329
        LayerGroupLayout->addWidget( LevelTxt, 0, 2, 2, 1 );
3 paul 330
 
217 Franz 331
        layout60->addWidget( LayerGroup );
332
        QSpacerItem* spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
333
        layout60->addItem( spacer2 );
3 paul 334
 
9931 fschmid 335
        Layout44 = new QGridLayout;
336
        Layout44->setSpacing( 4 );
337
        Layout44->setMargin( 5 );
6722 fschmid 338
 
9931 fschmid 339
        DoGroup = new QToolButton( page );
340
        DoGroup->setIcon(QIcon(loadIcon("group.png")));
6722 fschmid 341
        Layout44->addWidget( DoGroup, 0, 0 );
9931 fschmid 342
        DoUnGroup = new QToolButton( page );
343
        DoUnGroup->setIcon(QIcon(loadIcon("ungroup.png")));
6722 fschmid 344
        Layout44->addWidget( DoUnGroup, 1, 0 );
345
 
9931 fschmid 346
        FlipH = new QToolButton( page );
347
        FlipH->setIcon(QIcon(loadIcon("16/flip-object-horizontal.png")));
348
        FlipH->setCheckable( true );
6722 fschmid 349
        Layout44->addWidget( FlipH, 0, 1 );
9931 fschmid 350
        FlipV = new QToolButton( page );
351
        FlipV->setIcon(QIcon(loadIcon("16/flip-object-vertical.png")));
352
        FlipV->setCheckable( true );
6722 fschmid 353
        Layout44->addWidget( FlipV, 1, 1 );
9931 fschmid 354
        Locked = new QToolButton( page );
355
        Locked->setCheckable( true );
8501 cbradney 356
        QIcon a = QIcon();
8699 fschmid 357
        a.addPixmap(loadIcon("16/lock.png"), QIcon::Normal, QIcon::On);
358
        a.addPixmap(loadIcon("16/lock-unlocked.png"), QIcon::Normal, QIcon::Off);
359
        Locked->setIcon(a);
6722 fschmid 360
        Layout44->addWidget( Locked, 0, 2 );
9931 fschmid 361
        NoPrint = new QToolButton( page );
362
        NoPrint->setCheckable( true );
8501 cbradney 363
        QIcon a2 = QIcon();
8699 fschmid 364
        a2.addPixmap(loadIcon("NoPrint.png"), QIcon::Normal, QIcon::On);
365
        a2.addPixmap(loadIcon("16/document-print.png"), QIcon::Normal, QIcon::Off);
366
        NoPrint->setIcon(a2);
6722 fschmid 367
        Layout44->addWidget( NoPrint, 1, 2 );
9931 fschmid 368
        NoResize = new QToolButton( page );
369
        NoResize->setCheckable( true );
8501 cbradney 370
        QIcon a3 = QIcon();
8699 fschmid 371
        a3.addPixmap(loadIcon("framenoresize.png"), QIcon::Normal, QIcon::On);
372
        a3.addPixmap(loadIcon("frameresize.png"), QIcon::Normal, QIcon::Off);
373
        NoResize->setIcon(a3);
6722 fschmid 374
        Layout44->addWidget( NoResize, 0, 3 );
217 Franz 375
        layout60->addLayout( Layout44 );
68 Franz 376
 
217 Franz 377
        pageLayout->addLayout( layout60 );
3 paul 378
 
217 Franz 379
        QSpacerItem* spacer13 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
380
        pageLayout->addItem( spacer13 );
9931 fschmid 381
        idXYZItem = TabStack->addItem( page, "X, Y, &Z" );
3 paul 382
 
9931 fschmid 383
        page_2 = new QWidget( TabStack );
384
        pageLayout_2 = new QVBoxLayout( page_2 );
385
        pageLayout_2->setSpacing( 5 );
386
        pageLayout_2->setMargin( 0 );
3 paul 387
 
9931 fschmid 388
        ShapeGroup = new QGroupBox( page_2 );
389
        ShapeGroupLayout = new QHBoxLayout( ShapeGroup );
390
        ShapeGroupLayout->setSpacing( 2 );
391
        ShapeGroupLayout->setMargin( 0 );
217 Franz 392
        ShapeGroupLayout->setAlignment( Qt::AlignTop );
9931 fschmid 393
        SRect = new QLabel( "Shape:", ShapeGroup );
217 Franz 394
        ShapeGroupLayout->addWidget( SRect );
395
        SCustom = new Autoforms( ShapeGroup );
396
        ShapeGroupLayout->addWidget( SCustom );
11125 fschmid 397
 
398
        EditShape = new QToolButton( ShapeGroup );
399
//      EditShape->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5)));
400
        ShapeGroupLayout->addWidget( EditShape );
217 Franz 401
        pageLayout_2->addWidget( ShapeGroup );
3 paul 402
 
9931 fschmid 403
        Layout13 = new QHBoxLayout;
404
        Layout13->setSpacing( 2 );
405
        Layout13->setMargin( 0 );
3 paul 406
 
8605 cbradney 407
        RoundRect = new ScrSpinBox( page_2, 0 );
10529 fschmid 408
        rndcornersLabel = new QLabel( "R&ound\nCorners:", page_2 );
409
        rndcornersLabel->setBuddy(RoundRect);
348 Franz 410
        Layout13->addWidget( rndcornersLabel );
217 Franz 411
        Layout13->addWidget( RoundRect );
412
        pageLayout_2->addLayout( Layout13 );
3 paul 413
 
9931 fschmid 414
        textFlowOptions = new QGroupBox( page_2 );
415
        textFlowOptionsLayout = new QVBoxLayout( textFlowOptions );
416
        textFlowOptionsLayout->setSpacing( 5 );
417
        textFlowOptionsLayout->setMargin( 5 );
418
        textFlowOptionsLayout->setAlignment( Qt::AlignTop );
419
        textFlowDisabled = new QToolButton( textFlowOptions );
420
        textFlowDisabled->setCheckable( true );
421
        textFlowDisabled->setAutoExclusive(true);
422
        textFlowDisabled->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
423
        textFlowDisabled->setText( "Disabled" );
424
        textFlowDisabled->setIcon(QIcon(loadIcon("flow-none.png")));
425
        textFlowOptionsLayout->addWidget( textFlowDisabled );
426
        textFlowUsesFrameShape  = new QToolButton( textFlowOptions );
427
        textFlowUsesFrameShape->setCheckable( true );
428
        textFlowUsesFrameShape->setAutoExclusive(true);
429
        textFlowUsesFrameShape->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
430
        textFlowUsesFrameShape->setText( "Use &Frame Shape" );
431
        textFlowUsesFrameShape->setIcon(QIcon(loadIcon("flow-frame.png")));
432
        textFlowOptionsLayout->addWidget( textFlowUsesFrameShape );
433
        textFlowUsesBoundingBox = new QToolButton( textFlowOptions );
434
        textFlowUsesBoundingBox->setCheckable( true );
435
        textFlowUsesBoundingBox->setAutoExclusive(true);
436
        textFlowUsesBoundingBox->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
437
        textFlowUsesBoundingBox->setText( "Use &Bounding Box" );
438
        textFlowUsesBoundingBox->setIcon(QIcon(loadIcon("flow-bounding.png")));
439
        textFlowOptionsLayout->addWidget( textFlowUsesBoundingBox );
440
        textFlowUsesContourLine = new QToolButton( textFlowOptions );
441
        textFlowUsesContourLine->setCheckable( true );
442
        textFlowUsesContourLine->setAutoExclusive(true);
443
        textFlowUsesContourLine->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
444
        textFlowUsesContourLine->setText( "&Use Contour Line" );
445
        textFlowUsesContourLine->setIcon(QIcon(loadIcon("flow-contour.png")));
446
        textFlowOptionsLayout->addWidget( textFlowUsesContourLine );
447
        textFlowUsesImageClipping = new QToolButton( textFlowOptions );
448
        textFlowUsesImageClipping->setCheckable( true );
449
        textFlowUsesImageClipping->setAutoExclusive(true);
450
        textFlowUsesImageClipping->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
451
        textFlowUsesImageClipping->setText( "Use Image Clip Path" );
452
        textFlowUsesImageClipping->setIcon(QIcon(loadIcon("flow-contour.png")));
453
        textFlowOptionsLayout->addWidget( textFlowUsesImageClipping );
454
        pageLayout_2->addWidget( textFlowOptions  );
10529 fschmid 455
        textFlowDisabled->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
456
        textFlowUsesFrameShape->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
457
        textFlowUsesBoundingBox->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
458
        textFlowUsesContourLine->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
459
        textFlowUsesImageClipping->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
9931 fschmid 460
        textFlowOptionsB = new QButtonGroup( page_2 );
461
        textFlowOptionsB->addButton(textFlowDisabled, 0);
462
        textFlowOptionsB->addButton(textFlowUsesFrameShape, 1);
463
        textFlowOptionsB->addButton(textFlowUsesBoundingBox, 2);
464
        textFlowOptionsB->addButton(textFlowUsesContourLine, 3);
465
        textFlowOptionsB->addButton(textFlowUsesImageClipping, 4);
68 Franz 466
 
9931 fschmid 467
        TabStack2 = new QStackedWidget( page_2 );
468
 
469
        page_2a = new QWidget( TabStack2 );
12293 fschmid 470
/*      pageLayout_2a = new QVBoxLayout( page_2a );
9931 fschmid 471
        pageLayout_2a->setSpacing( 5 );
472
        pageLayout_2a->setMargin( 0 );
473
        Distance = new QGroupBox( page_2a );
474
        DistanceLayout = new QGridLayout( Distance );
475
        DistanceLayout->setSpacing( 2 );
476
        DistanceLayout->setMargin( 5 );
217 Franz 477
        DistanceLayout->setAlignment( Qt::AlignTop );
348 Franz 478
 
10529 fschmid 479
        DCol = new QSpinBox(Distance );
480
        DCol->setMaximum( 3000 );
481
        DCol->setMinimum( 1 );
482
        columnsLabel = new QLabel( "Colu&mns:", Distance );
483
        columnsLabel->setBuddy(DCol);
348 Franz 484
        DistanceLayout->addWidget( columnsLabel, 0, 0 );
217 Franz 485
        DistanceLayout->addWidget( DCol, 0, 1 );
333 Franz 486
 
8605 cbradney 487
        dGap = new ScrSpinBox( 0, 300, Distance, 0 );
10508 cbradney 488
        colgapLabel = new ScComboBox( Distance );
11829 fschmid 489
        DistanceLayout->addWidget( colgapLabel, 1, 0); //, Qt::AlignLeft );
1194 fschmid 490
        DistanceLayout->addWidget( dGap, 1, 1 );
333 Franz 491
 
8605 cbradney 492
        DTop = new ScrSpinBox( 0, 300, Distance, 0 );
10529 fschmid 493
        topLabel = new QLabel( "To&p:", Distance );
494
        topLabel->setBuddy(DTop);
348 Franz 495
        DistanceLayout->addWidget( topLabel, 2, 0 );
217 Franz 496
        DistanceLayout->addWidget( DTop, 2, 1 );
333 Franz 497
 
8605 cbradney 498
        DBottom = new ScrSpinBox( 0, 300, Distance, 0 );
10529 fschmid 499
        bottomLabel = new QLabel( "&Bottom:", Distance );
500
        bottomLabel->setBuddy(DBottom);
348 Franz 501
        DistanceLayout->addWidget( bottomLabel, 3, 0 );
217 Franz 502
        DistanceLayout->addWidget( DBottom, 3, 1 );
333 Franz 503
 
8605 cbradney 504
        DLeft = new ScrSpinBox( 0, 300, Distance, 0 );
10529 fschmid 505
        leftLabel = new QLabel( "&Left:", Distance );
506
        leftLabel->setBuddy(DLeft);
348 Franz 507
        DistanceLayout->addWidget( leftLabel, 4, 0 );
217 Franz 508
        DistanceLayout->addWidget( DLeft, 4, 1 );
333 Franz 509
 
8605 cbradney 510
        DRight = new ScrSpinBox( 0, 300, Distance, 0 );
10529 fschmid 511
        rightLabel = new QLabel( "&Right:", Distance );
512
        rightLabel->setBuddy(DRight);
348 Franz 513
        DistanceLayout->addWidget( rightLabel, 5, 0 );
217 Franz 514
        DistanceLayout->addWidget( DRight, 5, 1 );
333 Franz 515
 
10529 fschmid 516
        TabsButton = new QToolButton( Distance );
517
        TabsButton->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
9931 fschmid 518
        DistanceLayout->addWidget( TabsButton, 6, 0, 1, 2 );
215 Franz 519
        pageLayout_2a->addWidget(Distance);
12293 fschmid 520
 
12269 cbradney 521
        flopBox = new QGroupBox(tr("First Line Offset"), page_2a);
522
        flopLayout = new QGridLayout(flopBox);
523
        flopGroup = new QButtonGroup(flopBox);
524
        flopRealHeight = new QRadioButton(tr("Maximum Ascent"), flopBox);
12605 cbradney 525
        flopFontAscent = new QRadioButton(tr("Font Ascent"), flopBox);
12269 cbradney 526
        flopLineSpacing = new QRadioButton(tr("Line Spacing"),flopBox);
527
        flopGroup->addButton(flopRealHeight, 0);
12605 cbradney 528
        flopGroup->addButton(flopFontAscent, 1);
12269 cbradney 529
        flopGroup->addButton(flopLineSpacing, 2);
530
        flopLayout->addWidget(flopRealHeight);
12605 cbradney 531
        flopLayout->addWidget(flopFontAscent);
12269 cbradney 532
        flopLayout->addWidget(flopLineSpacing);
533
        flopRealHeight->setChecked(true);
12293 fschmid 534
        pageLayout_2a->addWidget(flopBox); */
9931 fschmid 535
        TabStack2->addWidget( page_2a );
68 Franz 536
 
12293 fschmid 537
/*      page_2b = new QWidget( TabStack2 );
9931 fschmid 538
        pageLayout_2b = new QVBoxLayout( page_2b );
539
        pageLayout_2b->setSpacing( 5 );
540
        pageLayout_2b->setMargin( 0 );
541
        Distance2 = new QGroupBox( "Path Text Properties", page_2b );
542
        DistanceLayout2 = new QGridLayout( Distance2 );
543
        DistanceLayout2->setSpacing( 2 );
544
        DistanceLayout2->setMargin( 5 );
217 Franz 545
        DistanceLayout2->setAlignment( Qt::AlignTop );
7926 fschmid 546
 
10508 cbradney 547
        pathTextType = new ScComboBox( Distance2 );
7926 fschmid 548
        DistanceLayout2->addWidget( pathTextType, 0, 1);
9931 fschmid 549
        pathTextTypeLabel = new QLabel( "Type:", Distance2 );
7926 fschmid 550
        DistanceLayout2->addWidget( pathTextTypeLabel, 0, 0);
551
 
9931 fschmid 552
        startoffsetLabel = new QLabel( "Start Offset:", Distance2 );
332 Franz 553
        DistanceLayout2->addWidget( startoffsetLabel, 1, 0);
8605 cbradney 554
        Dist = new ScrSpinBox( 0, 30000, Distance2, 0 );
10500 cbradney 555
        Dist->setSingleStep(10);
217 Franz 556
        DistanceLayout2->addWidget( Dist, 1, 1);
333 Franz 557
 
9931 fschmid 558
        distfromcurveLabel = new QLabel( "Distance from Curve:", Distance2 );
332 Franz 559
        DistanceLayout2->addWidget( distfromcurveLabel, 2, 0);
8605 cbradney 560
        LineW = new ScrSpinBox( -300, 300, Distance2, 0 );
10500 cbradney 561
        LineW->setSingleStep(10);
217 Franz 562
        DistanceLayout2->addWidget( LineW, 2, 1);
7926 fschmid 563
 
9931 fschmid 564
        flippedPathText = new QCheckBox( Distance2 );
7926 fschmid 565
        flippedPathText->setText( "Flip Text" );
9931 fschmid 566
        DistanceLayout2->addWidget( flippedPathText, 3, 0, 1, 2 );
7926 fschmid 567
 
9931 fschmid 568
        showcurveCheckBox = new QCheckBox( Distance2 );
7926 fschmid 569
        showcurveCheckBox->setText( "Show Curve" );
9931 fschmid 570
        DistanceLayout2->addWidget( showcurveCheckBox, 4, 0, 1, 2 );
7926 fschmid 571
 
215 Franz 572
        pageLayout_2b->addWidget(Distance2);
9931 fschmid 573
        TabStack2->addWidget( page_2b );
12293 fschmid 574
*/
9931 fschmid 575
        page_2c = new QWidget( TabStack2 );
576
        pageLayout_2c = new QVBoxLayout( page_2c );
577
        pageLayout_2c->setSpacing( 5 );
578
        pageLayout_2c->setMargin( 0 );
579
        Distance3 = new QGroupBox( page_2c );
580
        DistanceLayout3 = new QVBoxLayout( Distance3 );
581
        DistanceLayout3->setSpacing( 2 );
582
        DistanceLayout3->setMargin( 5 );
4477 fschmid 583
        DistanceLayout3->setAlignment( Qt::AlignTop );
9931 fschmid 584
        EvenOdd = new QRadioButton( "Even-Odd", Distance3 );
4477 fschmid 585
        DistanceLayout3->addWidget( EvenOdd );
9931 fschmid 586
        NonZero = new QRadioButton( "Non Zero", Distance3 );
4477 fschmid 587
        DistanceLayout3->addWidget( NonZero );
588
        EvenOdd->setChecked( true );
9931 fschmid 589
        Distance3->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
4477 fschmid 590
        pageLayout_2c->addWidget(Distance3);
9931 fschmid 591
        TabStack2->addWidget( page_2c );
4477 fschmid 592
 
217 Franz 593
        pageLayout_2->addWidget( TabStack2 );
351 Franz 594
 
217 Franz 595
        QSpacerItem* spacer6 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
596
        pageLayout_2->addItem( spacer6 );
9931 fschmid 597
        idShapeItem = TabStack->addItem( page_2, "&Shape" );
3 paul 598
 
9931 fschmid 599
        page_group = new QWidget(TabStack);
600
        page_group_layout = new QVBoxLayout( page_group );
601
        page_group_layout->setSpacing( 5 );
602
        page_group_layout->setMargin( 0 );
6451 fschmid 603
 
9931 fschmid 604
        ShapeGroup2 = new QGroupBox( page_group );
605
        ShapeGroupLayout2 = new QHBoxLayout( ShapeGroup2 );
606
        ShapeGroupLayout2->setSpacing( 2 );
607
        ShapeGroupLayout2->setMargin( 0 );
6451 fschmid 608
        ShapeGroupLayout2->setAlignment( Qt::AlignTop );
9931 fschmid 609
        SRect2 = new QLabel( "Shape:", ShapeGroup2 );
6451 fschmid 610
        ShapeGroupLayout2->addWidget( SRect2 );
611
        SCustom2 = new Autoforms( ShapeGroup2 );
612
        ShapeGroupLayout2->addWidget( SCustom2 );
11125 fschmid 613
        EditShape2 = new QToolButton( ShapeGroup2 );
614
//      EditShape2->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
615
        ShapeGroupLayout2->addWidget( EditShape2 );
6451 fschmid 616
        page_group_layout->addWidget( ShapeGroup2 );
8494 fschmid 617
 
9931 fschmid 618
        textFlowOptions2 = new QGroupBox( page_group );
619
        textFlowOptionsLayout2 = new QVBoxLayout( textFlowOptions2 );
620
        textFlowOptionsLayout2->setSpacing( 5 );
621
        textFlowOptionsLayout2->setMargin( 5 );
8494 fschmid 622
        textFlowOptionsLayout2->setAlignment( Qt::AlignTop );
9931 fschmid 623
        textFlowDisabled2 = new QToolButton( textFlowOptions2 );
624
        textFlowDisabled2->setCheckable( true );
625
        textFlowDisabled2->setAutoExclusive(true);
8712 fschmid 626
        textFlowDisabled2->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
627
        textFlowDisabled2->setText( "Disabled" );
9931 fschmid 628
        textFlowDisabled2->setIcon(QIcon(loadIcon("flow-none.png")));
8494 fschmid 629
        textFlowOptionsLayout2->addWidget( textFlowDisabled2 );
9931 fschmid 630
        textFlowUsesFrameShape2  = new QToolButton( textFlowOptions2 );
631
        textFlowUsesFrameShape2->setCheckable( true );
632
        textFlowUsesFrameShape2->setAutoExclusive(true);
8712 fschmid 633
        textFlowUsesFrameShape2->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
634
        textFlowUsesFrameShape2->setText( "Use &Frame Shape" );
9931 fschmid 635
        textFlowUsesFrameShape2->setIcon(QIcon(loadIcon("flow-frame.png")));
8494 fschmid 636
        textFlowOptionsLayout2->addWidget( textFlowUsesFrameShape2 );
9931 fschmid 637
        textFlowUsesBoundingBox2 = new QToolButton( textFlowOptions2 );
638
        textFlowUsesBoundingBox2->setCheckable( true );
639
        textFlowUsesBoundingBox2->setAutoExclusive(true);
8712 fschmid 640
        textFlowUsesBoundingBox2->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
641
        textFlowUsesBoundingBox2->setText( "Use &Bounding Box" );
9931 fschmid 642
        textFlowUsesBoundingBox2->setIcon(QIcon(loadIcon("flow-bounding.png")));
8494 fschmid 643
        textFlowOptionsLayout2->addWidget( textFlowUsesBoundingBox2 );
9931 fschmid 644
        textFlowUsesContourLine2 = new QToolButton( textFlowOptions2 );
645
        textFlowUsesContourLine2->setCheckable( true );
646
        textFlowUsesContourLine2->setAutoExclusive(true);
8712 fschmid 647
        textFlowUsesContourLine2->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
648
        textFlowUsesContourLine2->setText( "&Use Contour Line" );
9931 fschmid 649
        textFlowUsesContourLine2->setIcon(QIcon(loadIcon("flow-contour.png")));
8494 fschmid 650
        textFlowOptionsLayout2->addWidget( textFlowUsesContourLine2 );
9931 fschmid 651
        textFlowUsesImageClipping2 = new QToolButton( textFlowOptions2 );
652
        textFlowUsesImageClipping2->setCheckable( true );
653
        textFlowUsesImageClipping2->setAutoExclusive(true);
8712 fschmid 654
        textFlowUsesImageClipping2->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
655
        textFlowUsesImageClipping2->setText( "Use Image Clip Path" );
9931 fschmid 656
        textFlowUsesImageClipping2->setIcon(QIcon(loadIcon("flow-contour.png")));
8494 fschmid 657
        textFlowOptionsLayout2->addWidget( textFlowUsesImageClipping2 );
9931 fschmid 658
        page_group_layout->addWidget( textFlowOptions2  );
10529 fschmid 659
        textFlowDisabled2->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
660
        textFlowUsesFrameShape2->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
661
        textFlowUsesBoundingBox2->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
662
        textFlowUsesContourLine2->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
663
        textFlowUsesImageClipping2->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
9931 fschmid 664
        textFlowOptionsB2 = new QButtonGroup( page_group );
665
        textFlowOptionsB2->addButton(textFlowDisabled2, 0);
666
        textFlowOptionsB2->addButton(textFlowUsesFrameShape2, 1);
667
        textFlowOptionsB2->addButton(textFlowUsesBoundingBox2, 2);
668
        textFlowOptionsB2->addButton(textFlowUsesContourLine2, 3);
669
        textFlowOptionsB2->addButton(textFlowUsesImageClipping2, 4);
8494 fschmid 670
 
9931 fschmid 671
        TransGroup = new QGroupBox( tr( "Transparency Settings" ), page_group );
672
        Layout1t = new QGridLayout( TransGroup );
6451 fschmid 673
        Layout1t->setAlignment( Qt::AlignTop );
674
        Layout1t->setSpacing( 5 );
675
        Layout1t->setMargin( 5 );
9931 fschmid 676
        TransTxt = new QLabel( TransGroup );
6451 fschmid 677
        Layout1t->addWidget( TransTxt, 0, 0 );
9931 fschmid 678
        TransSpin = new QSpinBox( TransGroup );
8605 cbradney 679
        TransSpin->setMinimum(0);
680
        TransSpin->setMaximum(100);
10529 fschmid 681
        TransSpin->setSingleStep(10);
6451 fschmid 682
        TransSpin->setValue(100);
683
        Layout1t->addWidget(TransSpin, 0, 1);
9931 fschmid 684
        TransTxt2 = new QLabel( TransGroup );
6451 fschmid 685
        Layout1t->addWidget( TransTxt2, 1, 0 );
10508 cbradney 686
        blendMode = new ScComboBox( TransGroup );
6451 fschmid 687
        Layout1t->addWidget( blendMode, 1, 1 );
688
        page_group_layout->addWidget(TransGroup);
689
        QSpacerItem* spacerTr2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
690
        page_group_layout->addItem( spacerTr2 );
691
        idGroupItem = TabStack->addItem(page_group, "Groups");
692
 
9931 fschmid 693
        page_3 = new QWidget( TabStack );
694
        pageLayout_3 = new QVBoxLayout( page_3 );
695
        pageLayout_3->setSpacing( 5 );
696
        pageLayout_3->setMargin( 0 );
2230 fschmid 697
        pageLayout_3->setAlignment( Qt::AlignLeft );
3 paul 698
 
12293 fschmid 699
        TextTree = new ScTreeWidget(page_3);
700
 
701
        layout41 = new QGridLayout();
702
        layout41->setSpacing( 3 );
703
        layout41->setMargin( 3 );
704
        layout41->setAlignment( Qt::AlignLeft );
705
        Fonts = new FontComboH(page_3);
706
        layout41->addWidget( Fonts, 0, 0, 1, 4 );
707
        Size = new ScrSpinBox( 0.5, 2048, page_3, 0 );
708
        Size->setPrefix( "" );
709
        fontsizeLabel = new QLabel( "", page_3 );
710
        fontsizeLabel->setPixmap(loadIcon("Zeichen.xpm"));
711
        layout41->addWidget( fontsizeLabel, 1, 0 );
712
        layout41->addWidget( Size, 1, 1 );
12593 cbradney 713
//      lineSpacingPop = new QMenu();
714
//      lineSpacingPop->addAction( tr("Fixed Linespacing"))->setCheckable(true);
715
//      lineSpacingPop->addAction( tr("Automatic Linespacing"))->setCheckable(true);
716
//      lineSpacingPop->addAction( tr("Align to Baseline Grid"))->setCheckable(true);
717
        lineSpacingLabel = new QLabel( "", page_3 );
718
//      lineSpacingLabel->setText("");
719
        lineSpacingLabel->setPixmap(loadIcon("linespacing2.png"));
720
        lineSpacingModeCombo = new QComboBox( page_3 );
721
//      linespacingButton->setMenu(lineSpacingPop);
722
//      linespacingButton->setPopupMode(QToolButton::DelayedPopup);
723
//      linespacingButton->setAutoRaise(true);
12293 fschmid 724
        LineSp = new ScrSpinBox( page_3, 0 );
12593 cbradney 725
        layout41->addWidget( LineSp, 2, 2 );
726
        layout41->addWidget( lineSpacingLabel, 2, 0 );
727
        layout41->addWidget( lineSpacingModeCombo, 2, 1 );
12293 fschmid 728
        Layout1AL = new QHBoxLayout;
729
        Layout1AL->setSpacing( 0 );
730
        Layout1AL->setMargin( 0 );
731
        Layout1AL->setAlignment( Qt::AlignLeft );
732
        GroupAlign = new AlignSelect(page_3);
733
        Layout1AL->addWidget(GroupAlign);
734
        QSpacerItem* spacer7AL = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
735
        Layout1AL->addItem( spacer7AL );
12593 cbradney 736
        layout41->addLayout( Layout1AL, 3, 0, 1, 4 );
12293 fschmid 737
        pageLayout_3->addLayout( layout41 );
738
 
739
        colorWidgets = new QFrame();
740
        colorWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
741
        colorWidgets->setLineWidth(1);
742
        layout41c = new QGridLayout(colorWidgets);
743
        layout41c->setSpacing( 3 );
744
        layout41c->setMargin( 3 );
745
        layout41c->setAlignment( Qt::AlignLeft );
746
        layout23 = new QHBoxLayout;
747
        layout23->setSpacing( 3 );
748
        layout23->setMargin( 0 );
749
        layout23->setAlignment( Qt::AlignLeft );
750
        StrokeIcon = new QLabel( "", colorWidgets );
751
        StrokeIcon->setPixmap(loadIcon("16/color-stroke.png"));
752
        StrokeIcon->setScaledContents( false );
753
        layout23->addWidget( StrokeIcon );
754
        TxStroke = new ColorCombo( false, colorWidgets);
755
        layout23->addWidget( TxStroke );
756
        ShadeTxt1 = new QLabel( "", colorWidgets );
757
        ShadeTxt1->setPixmap(loadIcon("shade.png"));
758
        layout23->addWidget( ShadeTxt1 );
759
        PM1 = new ShadeButton(colorWidgets);
760
        layout23->addWidget( PM1 );
761
        QSpacerItem* spacer7s = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
762
        layout23->addItem( spacer7s );
13767 cbradney 763
        layout41c->addLayout( layout23, 1, 0, 1, 4 );
12293 fschmid 764
        layout24 = new QHBoxLayout;
765
        layout24->setSpacing( 3 );
766
        layout24->setMargin( 0 );
767
        layout24->setAlignment( Qt::AlignLeft );
768
        FillIcon = new QLabel( "", colorWidgets );
769
        FillIcon->setPixmap(loadIcon("16/color-fill.png"));
770
        layout24->addWidget( FillIcon );
771
        TxFill = new ColorCombo( false, colorWidgets);
772
        layout24->addWidget( TxFill );
773
        ShadeTxt2 = new QLabel("", colorWidgets );
774
        ShadeTxt2->setPixmap(loadIcon("shade.png"));
775
        layout24->addWidget( ShadeTxt2 );
776
        PM2 = new ShadeButton(colorWidgets);
777
        layout24->addWidget( PM2 );
778
        QSpacerItem* spacer7f = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
779
        layout24->addItem( spacer7f );
13767 cbradney 780
        layout41c->addLayout( layout24, 0, 0, 1, 4 );
12293 fschmid 781
        Layout1 = new QHBoxLayout;
782
        Layout1->setSpacing( 0 );
783
        Layout1->setMargin( 0 );
784
        Layout1->setAlignment( Qt::AlignLeft );
785
        SeStyle = new StyleSelect(colorWidgets);
786
        Layout1->addWidget(SeStyle);
787
        Revert = new QToolButton( colorWidgets );
788
        Revert->setMaximumSize( QSize( 22, 22 ) );
789
        Revert->setText("");
790
        Revert->setIcon(loadIcon("Revers.png"));
791
        Revert->setCheckable( true );
792
        Layout1->addWidget( Revert );
793
        QSpacerItem* spacer7 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
794
        Layout1->addItem( spacer7 );
795
        layout41c->addLayout( Layout1, 2, 0, 1, 4 );
796
        colorWidgetsItem = TextTree->addWidget( tr("Color & Effects"), colorWidgets);
797
 
12307 fschmid 798
 
12293 fschmid 799
        styleWidgets = new QFrame();
800
        styleWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
801
        styleWidgets->setLineWidth(1);
802
        GroupBox3aLayout = new QGridLayout(styleWidgets);
803
        GroupBox3aLayout->setSpacing( 3 );
804
        GroupBox3aLayout->setMargin( 3 );
12307 fschmid 805
//      GroupBox3aLayout->setAlignment( Qt::AlignLeft );
12293 fschmid 806
        paraStyleCombo = new ParaStyleComboBox(styleWidgets);
807
        paraStyleLabel = new QLabel( "Paragraph St&yle:", styleWidgets );
808
        paraStyleLabel->setBuddy(paraStyleCombo);
809
        paraStyleClear = new QToolButton( styleWidgets );
810
        paraStyleClear->setMaximumSize( QSize( 22, 22 ) );
811
        paraStyleClear->setText("");
812
        paraStyleClear->setIcon(loadIcon("16/edit-clear.png"));
12307 fschmid 813
        GroupBox3aLayout->addWidget( paraStyleLabel, 0, 0, 1, 2 );
814
        GroupBox3aLayout->addWidget( paraStyleCombo, 1, 0 );
815
        GroupBox3aLayout->addWidget( paraStyleClear, 1, 1 );
12293 fschmid 816
        charStyleCombo = new CharStyleComboBox(styleWidgets);
817
        charStyleLabel = new QLabel( "Character St&yle:", styleWidgets );
818
        charStyleLabel->setBuddy(charStyleCombo);
819
        charStyleClear = new QToolButton( styleWidgets );
820
        charStyleClear->setMaximumSize( QSize( 22, 22 ) );
821
        charStyleClear->setText("");
822
        charStyleClear->setIcon(loadIcon("16/edit-clear.png"));
12307 fschmid 823
        GroupBox3aLayout->addWidget( charStyleLabel, 2, 0, 1, 2 );
824
        GroupBox3aLayout->addWidget( charStyleCombo, 3, 0 );
825
        GroupBox3aLayout->addWidget( charStyleClear, 3, 1 );
12293 fschmid 826
 
827
        styleWidgetsItem = TextTree->addWidget( tr("Style Settings"), styleWidgets);
828
 
829
        flopBox = new QFrame();
830
        flopBox->setFrameStyle(QFrame::Box | QFrame::Plain);
831
        flopBox->setLineWidth(1);
832
        flopLayout = new QGridLayout(flopBox);
833
        flopGroup = new QButtonGroup(flopBox);
834
        flopRealHeight = new QRadioButton(tr("Maximum Ascent"), flopBox);
12605 cbradney 835
        flopFontAscent = new QRadioButton(tr("Font Ascent"), flopBox);
12293 fschmid 836
        flopLineSpacing = new QRadioButton(tr("Line Spacing"),flopBox);
837
        flopGroup->addButton(flopRealHeight, 0);
12605 cbradney 838
        flopGroup->addButton(flopFontAscent, 1);
12293 fschmid 839
        flopGroup->addButton(flopLineSpacing, 2);
840
        flopLayout->addWidget(flopRealHeight);
12605 cbradney 841
        flopLayout->addWidget(flopFontAscent);
12293 fschmid 842
        flopLayout->addWidget(flopLineSpacing);
843
        flopRealHeight->setChecked(true);
844
        flopItem = TextTree->addWidget( tr("First Line Offset"), flopBox);
845
 
846
        Distance = new QFrame();
847
        Distance->setFrameStyle(QFrame::Box | QFrame::Plain);
848
        Distance->setLineWidth(1);
849
        DistanceLayout = new QGridLayout( Distance );
850
        DistanceLayout->setSpacing( 2 );
851
        DistanceLayout->setMargin( 5 );
852
        DistanceLayout->setAlignment( Qt::AlignTop );
853
 
854
        DCol = new QSpinBox(Distance );
855
        DCol->setMaximum( 3000 );
856
        DCol->setMinimum( 1 );
857
        columnsLabel = new QLabel( "Colu&mns:", Distance );
858
        columnsLabel->setBuddy(DCol);
859
        DistanceLayout->addWidget( columnsLabel, 0, 0 );
860
        DistanceLayout->addWidget( DCol, 0, 1 );
861
 
862
        dGap = new ScrSpinBox( 0, 300, Distance, 0 );
863
        colgapLabel = new ScComboBox( Distance );
864
        DistanceLayout->addWidget( colgapLabel, 1, 0); //, Qt::AlignLeft );
865
        DistanceLayout->addWidget( dGap, 1, 1 );
866
 
867
        DTop = new ScrSpinBox( 0, 300, Distance, 0 );
868
        topLabel = new QLabel( "To&p:", Distance );
869
        topLabel->setBuddy(DTop);
870
        DistanceLayout->addWidget( topLabel, 2, 0 );
871
        DistanceLayout->addWidget( DTop, 2, 1 );
872
 
873
        DBottom = new ScrSpinBox( 0, 300, Distance, 0 );
874
        bottomLabel = new QLabel( "&Bottom:", Distance );
875
        bottomLabel->setBuddy(DBottom);
876
        DistanceLayout->addWidget( bottomLabel, 3, 0 );
877
        DistanceLayout->addWidget( DBottom, 3, 1 );
878
 
879
        DLeft = new ScrSpinBox( 0, 300, Distance, 0 );
880
        leftLabel = new QLabel( "&Left:", Distance );
881
        leftLabel->setBuddy(DLeft);
882
        DistanceLayout->addWidget( leftLabel, 4, 0 );
883
        DistanceLayout->addWidget( DLeft, 4, 1 );
884
 
885
        DRight = new ScrSpinBox( 0, 300, Distance, 0 );
886
        rightLabel = new QLabel( "&Right:", Distance );
887
        rightLabel->setBuddy(DRight);
888
        DistanceLayout->addWidget( rightLabel, 5, 0 );
889
        DistanceLayout->addWidget( DRight, 5, 1 );
890
 
13024 cbradney 891
//      optMarginCombo = new QComboBox(Distance);
892
//      optMarginLabel = new QLabel( "Optical Margins:", Distance );
893
//      optMarginLabel->setBuddy(optMarginCombo);
894
//      DistanceLayout->addWidget( optMarginLabel, 6, 0 );
895
//      DistanceLayout->addWidget( optMarginCombo, 6, 1 );
12307 fschmid 896
 
12293 fschmid 897
        TabsButton = new QToolButton( Distance );
898
        TabsButton->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
12307 fschmid 899
        DistanceLayout->addWidget( TabsButton, 7, 0, 1, 2 );
12972 cbradney 900
    DistanceItem = TextTree->addWidget( tr("Columns & Text Distances"), Distance);
12293 fschmid 901
 
13024 cbradney 902
 
903
        //<< Optical Margins
904
 
905
        OptMargins = new QFrame();
906
        OptMargins->setFrameStyle(QFrame::Box | QFrame::Plain);
907
        OptMargins->setLineWidth(1);
908
        OptMarginsLayout = new QVBoxLayout( OptMargins );
909
        OptMarginsLayout->setSpacing( 2 );
910
        OptMarginsLayout->setMargin( 5 );
911
        OptMarginsLayout->setAlignment( Qt::AlignTop );
912
 
913
//      optMarginCombo = new QComboBox(OptMargins);
914
//      OptMarginsLayout->addWidget( optMarginCombo);
915
 
13104 cbradney 916
//      optMarginCheckLeftProtruding = new QCheckBox(OptMargins);
917
//      optMarginCheckLeftProtruding->setObjectName(QString::fromUtf8("optMarginCheckLeftProtruding"));
13143 pierre 918
        optMarginRadioNone = new QRadioButton(OptMargins);
919
        optMarginRadioNone->setObjectName(QString::fromUtf8("optMarginRadioNone"));
920
 
921
        optMarginRadioBoth = new QRadioButton(OptMargins);
922
        optMarginRadioBoth->setObjectName(QString::fromUtf8("optMarginRadioBoth"));
923
 
924
        optMarginRadioLeft = new QRadioButton(OptMargins);
925
        optMarginRadioLeft->setObjectName(QString::fromUtf8("optMarginRadioLeft"));
926
 
927
        optMarginRadioRight = new QRadioButton(OptMargins);
928
        optMarginRadioRight->setObjectName(QString::fromUtf8("optMarginRadioRight"));
929
 
13024 cbradney 930
        optMarginResetButton = new QPushButton(OptMargins);
931
        optMarginResetButton->setObjectName(QString::fromUtf8("optMarginResetButton"));
932
 
13104 cbradney 933
//      optMarginCheckLeftProtruding->setText( tr("Left Protruding") );
13143 pierre 934
        optMarginRadioNone->setText( tr("None","optical margins") );
935
        optMarginRadioBoth->setText( tr("Both Sides","optical margins") );
936
        optMarginRadioLeft->setText( tr("Left Only","optical margins") );
937
        optMarginRadioRight->setText( tr("Right Only","optical margins") );
13024 cbradney 938
        optMarginResetButton->setText( tr("Reset") );
939
 
13104 cbradney 940
//      OptMarginsLayout->addWidget(optMarginCheckLeftProtruding);
13143 pierre 941
        OptMarginsLayout->addWidget(optMarginRadioNone);
942
        OptMarginsLayout->addWidget(optMarginRadioBoth);
943
        OptMarginsLayout->addWidget(optMarginRadioLeft);
944
        OptMarginsLayout->addWidget(optMarginRadioRight);
13024 cbradney 945
        OptMarginsLayout->addWidget(optMarginResetButton);
946
 
947
        OptMarginsItem = TextTree->addWidget( tr("Optical Margins"), OptMargins);
948
 
949
        //>> Optical Margins
950
 
951
        //<<Advanced Settings
952
        advancedWidgets = new QFrame();
953
        advancedWidgets->setFrameStyle(QFrame::Box | QFrame::Plain);
954
        advancedWidgets->setLineWidth(1);
955
        layout41a = new QGridLayout(advancedWidgets);
956
        layout41a->setSpacing( 3 );
957
        layout41a->setMargin( 3 );
958
        layout41a->setAlignment( Qt::AlignLeft );
959
        ChBase = new ScrSpinBox( -100, 100, advancedWidgets, 0 );
960
        ChBase->setValue( 0 );
961
        ChBaseTxt = new QLabel("", advancedWidgets );
962
        ChBaseTxt->setPixmap(loadIcon("textbase.png"));
963
        layout41a->addWidget( ChBaseTxt, 0, 0 );
964
        layout41a->addWidget( ChBase, 0, 1 );
965
        Extra = new ScrSpinBox( advancedWidgets, 0 );
966
        layout41a->addWidget( Extra, 0, 3 );
967
        trackingLabel = new QLabel( "", advancedWidgets );
968
        trackingLabel->setText("");
969
        trackingLabel->setPixmap(loadIcon("textkern.png"));
970
        layout41a->addWidget( trackingLabel, 0, 2 );
971
        ChScale = new ScrSpinBox( 10, 400, advancedWidgets, 0 );
972
        ChScale->setValue( 100 );
973
        ScaleTxt = new QLabel("", advancedWidgets );
974
        ScaleTxt->setPixmap(loadIcon("textscaleh.png"));
975
        layout41a->addWidget( ScaleTxt, 1, 0 );
976
        layout41a->addWidget( ChScale, 1 , 1 );
977
        ChScaleV = new ScrSpinBox( 10, 400, advancedWidgets, 0 );
978
        ChScaleV->setValue( 100 );
979
        ScaleTxtV = new QLabel("", advancedWidgets );
980
        ScaleTxtV->setPixmap(loadIcon("textscalev.png"));
981
        layout41a->addWidget( ScaleTxtV, 1, 2 );
982
        layout41a->addWidget( ChScaleV, 1, 3 );
983
 
984
        wordTrackingLabel = new QLabel( "Word Spacing", advancedWidgets );
985
        layout41a->addWidget( wordTrackingLabel, 2, 0, 1, 4 );
986
        wordTrackingHLayout = new QHBoxLayout;
987
        wordTrackingHLayout->setSpacing( 3 );
988
        wordTrackingHLayout->setMargin( 0 );
989
        wordTrackingHLayout->setAlignment(Qt::AlignLeft);
990
        minWordTrackingSpinBox = new ScrSpinBox( 1, 200, advancedWidgets, 0 );
991
        minWordTrackingLabel = new QLabel( "Min:", advancedWidgets );
992
        minWordTrackingLabel->setBuddy(minWordTrackingSpinBox);
993
        wordTrackingHLayout->addWidget(minWordTrackingLabel);
994
        wordTrackingHLayout->addWidget(minWordTrackingSpinBox);
995
        normWordTrackingSpinBox = new ScrSpinBox( 1, 200, advancedWidgets, 0 );
996
        normWordTrackingLabel = new QLabel( "Norm:", advancedWidgets );
997
        normWordTrackingLabel->setBuddy(normWordTrackingSpinBox);
998
        wordTrackingHLayout->addWidget(normWordTrackingLabel);
999
        wordTrackingHLayout->addWidget(normWordTrackingSpinBox);
1000
        layout41a->addLayout(wordTrackingHLayout, 3, 0, 1, 4);
1001
 
1002
        glyphExtensionLabel = new QLabel( "Glyph Extension", advancedWidgets );
1003
        layout41a->addWidget( glyphExtensionLabel, 4, 0, 1, 4 );
1004
        glyphExtensionHLayout = new QHBoxLayout;
1005
        glyphExtensionHLayout->setSpacing( 3 );
1006
        glyphExtensionHLayout->setMargin( 0 );
1007
        glyphExtensionHLayout->setAlignment(Qt::AlignLeft);
1008
        minGlyphExtSpinBox = new ScrSpinBox( 90, 110, advancedWidgets, 0 );
1009
        minGlyphExtensionLabel = new QLabel( "Min:", advancedWidgets );
1010
        minGlyphExtensionLabel->setBuddy(minGlyphExtSpinBox);
1011
        glyphExtensionHLayout->addWidget(minGlyphExtensionLabel);
1012
        glyphExtensionHLayout->addWidget(minGlyphExtSpinBox);
1013
        maxGlyphExtSpinBox = new ScrSpinBox( 90, 110, advancedWidgets, 0 );
1014
        maxGlyphExtensionLabel = new QLabel( "Max:", advancedWidgets );
1015
        maxGlyphExtensionLabel->setBuddy(maxGlyphExtSpinBox);
1016
        glyphExtensionHLayout->addWidget(maxGlyphExtensionLabel);
1017
        glyphExtensionHLayout->addWidget(maxGlyphExtSpinBox);
1018
        layout41a->addLayout(glyphExtensionHLayout, 5, 0, 1, 4);
1019
 
1020
        advancedWidgetsItem = TextTree->addWidget( tr("Advanced Settings"), advancedWidgets);
1021
 
1022
        //>>Advanced Settings
1023
 
12293 fschmid 1024
        Distance2 = new QFrame();
1025
        Distance2->setFrameStyle(QFrame::Box | QFrame::Plain);
1026
        Distance2->setLineWidth(1);
1027
        DistanceLayout2 = new QGridLayout( Distance2 );
1028
        DistanceLayout2->setSpacing( 2 );
1029
        DistanceLayout2->setMargin( 5 );
1030
        DistanceLayout2->setAlignment( Qt::AlignTop );
1031
 
1032
        pathTextType = new ScComboBox( Distance2 );
1033
        DistanceLayout2->addWidget( pathTextType, 0, 1);
1034
        pathTextTypeLabel = new QLabel( "Type:", Distance2 );
1035
        DistanceLayout2->addWidget( pathTextTypeLabel, 0, 0);
1036
 
1037
        startoffsetLabel = new QLabel( "Start Offset:", Distance2 );
1038
        DistanceLayout2->addWidget( startoffsetLabel, 1, 0);
1039
        Dist = new ScrSpinBox( 0, 30000, Distance2, 0 );
1040
        Dist->setSingleStep(10);
1041
        DistanceLayout2->addWidget( Dist, 1, 1);
1042
 
1043
        distfromcurveLabel = new QLabel( "Distance from Curve:", Distance2 );
1044
        DistanceLayout2->addWidget( distfromcurveLabel, 2, 0);
1045
        LineW = new ScrSpinBox( -300, 300, Distance2, 0 );
1046
        LineW->setSingleStep(10);
1047
        DistanceLayout2->addWidget( LineW, 2, 1);
1048
 
1049
        flippedPathText = new QCheckBox( Distance2 );
1050
        flippedPathText->setText( "Flip Text" );
1051
        DistanceLayout2->addWidget( flippedPathText, 3, 0, 1, 2 );
1052
 
1053
        showcurveCheckBox = new QCheckBox( Distance2 );
1054
        showcurveCheckBox->setText( "Show Curve" );
1055
        DistanceLayout2->addWidget( showcurveCheckBox, 4, 0, 1, 2 );
1056
        Distance2Item = TextTree->addWidget( tr("Path Text Properties"), Distance2);
1057
 
1058
        pageLayout_3->addWidget(TextTree);
1059
/*
9931 fschmid 1060
        layout47 = new QHBoxLayout;
1061
        layout47->setSpacing( 5 );
1062
        layout47->setMargin( 0 );
3 paul 1063
 
9931 fschmid 1064
        layout46 = new QVBoxLayout;
1065
        layout46->setSpacing( 5 );
1066
        layout46->setMargin( 0 );
3 paul 1067
 
9931 fschmid 1068
        layout41 = new QGridLayout;
1069
        layout41->setSpacing( 5 );
1070
        layout41->setMargin( 0 );
2230 fschmid 1071
        layout41->setAlignment( Qt::AlignLeft );
3 paul 1072
 
2834 cbradney 1073
        Fonts = new FontComboH(page_3);
9931 fschmid 1074
        layout41->addWidget( Fonts, 0, 0, 1, 4 );
3 paul 1075
 
8605 cbradney 1076
        Size = new ScrSpinBox( 0.5, 2048, page_3, 0 );
217 Franz 1077
        Size->setPrefix( "" );
9931 fschmid 1078
        fontsizeLabel = new QLabel( "", page_3 );
2230 fschmid 1079
        fontsizeLabel->setPixmap(loadIcon("Zeichen.xpm"));
348 Franz 1080
        layout41->addWidget( fontsizeLabel, 1, 0 );
217 Franz 1081
        layout41->addWidget( Size, 1, 1 );
8605 cbradney 1082
        ChBase = new ScrSpinBox( -100, 100, page_3, 0 );
2230 fschmid 1083
        ChBase->setValue( 0 );
10529 fschmid 1084
        ChBaseTxt = new QLabel("", page_3 );
2230 fschmid 1085
        ChBaseTxt->setPixmap(loadIcon("textbase.png"));
1086
        layout41->addWidget( ChBaseTxt, 1, 2 );
1087
        layout41->addWidget( ChBase, 1, 3 );
8605 cbradney 1088
        LineSp = new ScrSpinBox( page_3, 0 );
2285 fschmid 1089
        layout41->addWidget( LineSp, 2, 1 );
9901 cbradney 1090
        lineSpacingPop = new QMenu();
10673 fschmid 1091
        lineSpacingPop->addAction( tr("Fixed Linespacing"))->setCheckable(true);
1092
        lineSpacingPop->addAction( tr("Automatic Linespacing"))->setCheckable(true);
1093
        lineSpacingPop->addAction( tr("Align to Baseline Grid"))->setCheckable(true);
10529 fschmid 1094
        linespacingButton = new QToolButton(page_3 );
4963 cbradney 1095
        linespacingButton->setText("");
10529 fschmid 1096
        linespacingButton->setIcon(loadIcon("linespacing.png"));
1097
        linespacingButton->setMenu(lineSpacingPop);
1098
        linespacingButton->setPopupMode(QToolButton::DelayedPopup);
4963 cbradney 1099
        linespacingButton->setAutoRaise(true);
1100
        layout41->addWidget( linespacingButton, 2, 0 );
8605 cbradney 1101
        Extra = new ScrSpinBox( page_3, 0 );
2285 fschmid 1102
        layout41->addWidget( Extra, 2, 3 );
10529 fschmid 1103
        trackingLabel = new QLabel( "", page_3 );
2285 fschmid 1104
        trackingLabel->setText("");
1105
        trackingLabel->setPixmap(loadIcon("textkern.png"));
1106
        layout41->addWidget( trackingLabel, 2, 2 );
8605 cbradney 1107
        ChScale = new ScrSpinBox( 10, 400, page_3, 0 );
217 Franz 1108
        ChScale->setValue( 100 );
10529 fschmid 1109
        ScaleTxt = new QLabel("", page_3 );
2230 fschmid 1110
        ScaleTxt->setPixmap(loadIcon("textscaleh.png"));
2285 fschmid 1111
        layout41->addWidget( ScaleTxt, 3, 0 );
1112
        layout41->addWidget( ChScale, 3 , 1 );
8605 cbradney 1113
        ChScaleV = new ScrSpinBox( 10, 400, page_3, 0 );
2230 fschmid 1114
        ChScaleV->setValue( 100 );
10529 fschmid 1115
        ScaleTxtV = new QLabel("", page_3 );
2230 fschmid 1116
        ScaleTxtV->setPixmap(loadIcon("textscalev.png"));
2285 fschmid 1117
        layout41->addWidget( ScaleTxtV, 3, 2 );
1118
        layout41->addWidget( ChScaleV, 3, 3 );
1119
 
2230 fschmid 1120
        layout46->addLayout( layout41 );
68 Franz 1121
 
9931 fschmid 1122
        layout23 = new QHBoxLayout;
1123
        layout23->setSpacing( 5 );
1124
        layout23->setMargin( 0 );
2370 fschmid 1125
        layout23->setAlignment( Qt::AlignLeft );
10529 fschmid 1126
        StrokeIcon = new QLabel( "", page_3 );
7083 cbradney 1127
        StrokeIcon->setPixmap(loadIcon("16/color-stroke.png"));
217 Franz 1128
        StrokeIcon->setScaledContents( false );
1129
        layout23->addWidget( StrokeIcon );
10469 cbradney 1130
        TxStroke = new ColorCombo( false, page_3);
217 Franz 1131
        layout23->addWidget( TxStroke );
10529 fschmid 1132
        ShadeTxt1 = new QLabel( "", page_3 );
2370 fschmid 1133
        ShadeTxt1->setPixmap(loadIcon("shade.png"));
215 Franz 1134
        layout23->addWidget( ShadeTxt1 );
173 Franz 1135
        PM1 = new ShadeButton(page_3);
217 Franz 1136
        layout23->addWidget( PM1 );
1137
        layout46->addLayout( layout23 );
9931 fschmid 1138
        layout24 = new QHBoxLayout;
1139
        layout24->setSpacing( 5 );
1140
        layout24->setMargin( 0 );
2370 fschmid 1141
        layout24->setAlignment( Qt::AlignLeft );
10529 fschmid 1142
        FillIcon = new QLabel( "", page_3 );
7083 cbradney 1143
        FillIcon->setPixmap(loadIcon("16/color-fill.png"));
217 Franz 1144
        layout24->addWidget( FillIcon );
10469 cbradney 1145
        TxFill = new ColorCombo( false, page_3);
217 Franz 1146
        layout24->addWidget( TxFill );
10529 fschmid 1147
        ShadeTxt2 = new QLabel("", page_3 );
2370 fschmid 1148
        ShadeTxt2->setPixmap(loadIcon("shade.png"));
215 Franz 1149
        layout24->addWidget( ShadeTxt2 );
173 Franz 1150
        PM2 = new ShadeButton(page_3);
217 Franz 1151
        layout24->addWidget( PM2 );
1152
        layout46->addLayout( layout24 );
68 Franz 1153
 
9931 fschmid 1154
        Layout1 = new QHBoxLayout;
1155
        Layout1->setSpacing( 0 );
1156
        Layout1->setMargin( 0 );
2230 fschmid 1157
        Layout1->setAlignment( Qt::AlignLeft );
167 Franz 1158
        SeStyle = new StyleSelect(page_3);
1159
        Layout1->addWidget(SeStyle);
10529 fschmid 1160
        Revert = new QToolButton( page_3 );
217 Franz 1161
        Revert->setMaximumSize( QSize( 22, 22 ) );
1162
        Revert->setText("");
10529 fschmid 1163
        Revert->setIcon(loadIcon("Revers.png"));
10508 cbradney 1164
        Revert->setCheckable( true );
217 Franz 1165
        Layout1->addWidget( Revert );
1166
        QSpacerItem* spacer7 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1167
        Layout1->addItem( spacer7 );
1168
        layout46->addLayout( Layout1 );
1169
        layout47->addLayout( layout46 );
1170
        pageLayout_3->addLayout( layout47 );
3 paul 1171
 
9931 fschmid 1172
        Layout1AL = new QHBoxLayout;
1173
        Layout1AL->setSpacing( 0 );
1174
        Layout1AL->setMargin( 0 );
9089 fschmid 1175
        Layout1AL->setAlignment( Qt::AlignLeft );
217 Franz 1176
        GroupAlign = new AlignSelect(page_3);
9089 fschmid 1177
        Layout1AL->addWidget(GroupAlign);
1178
        QSpacerItem* spacer7AL = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
1179
        Layout1AL->addItem( spacer7AL );
1180
        pageLayout_3->addLayout( Layout1AL );
3 paul 1181
 
9931 fschmid 1182
        GroupBox3aLayout->setSpacing( 5 );
1183
        GroupBox3aLayout->setMargin( 0 );
2230 fschmid 1184
        GroupBox3aLayout->setAlignment( Qt::AlignLeft );
7990 cbradney 1185
        paraStyleCombo = new ParaStyleComboBox(page_3);
10529 fschmid 1186
        paraStyleLabel = new QLabel( "Paragraph St&yle:", page_3 );
1187
        paraStyleLabel->setBuddy(paraStyleCombo);
1188
        paraStyleClear = new QToolButton( page_3 );
9119 avox 1189
        paraStyleClear->setMaximumSize( QSize( 22, 22 ) );
1190
        paraStyleClear->setText("");
10529 fschmid 1191
        paraStyleClear->setIcon(loadIcon("16/edit-clear.png"));
7992 cbradney 1192
        GroupBox3aLayout->addWidget( paraStyleLabel, 0, 0 );
7990 cbradney 1193
        GroupBox3aLayout->addWidget( paraStyleCombo, 0, 1 );
9119 avox 1194
        GroupBox3aLayout->addWidget( paraStyleClear, 0, 2 );
7992 cbradney 1195
        charStyleCombo = new CharStyleComboBox(page_3);
10529 fschmid 1196
        charStyleLabel = new QLabel( "Character St&yle:", page_3 );
1197
        charStyleLabel->setBuddy(charStyleCombo);
1198
        charStyleClear = new QToolButton( page_3 );
9119 avox 1199
        charStyleClear->setMaximumSize( QSize( 22, 22 ) );
1200
        charStyleClear->setText("");
10529 fschmid 1201
        charStyleClear->setIcon(loadIcon("16/edit-clear.png"));
7992 cbradney 1202
        GroupBox3aLayout->addWidget( charStyleLabel, 1, 0 );
1203
        GroupBox3aLayout->addWidget( charStyleCombo, 1, 1 );
9119 avox 1204
        GroupBox3aLayout->addWidget( charStyleClear, 1, 2 );
8054 cbradney 1205
        optMarginCombo = new QComboBox(page_3);
10529 fschmid 1206
        optMarginLabel = new QLabel( "Optical Margins:", page_3 );
1207
        optMarginLabel->setBuddy(optMarginCombo);
8054 cbradney 1208
        GroupBox3aLayout->addWidget( optMarginLabel, 2, 0 );
1209
        GroupBox3aLayout->addWidget( optMarginCombo, 2, 1 );
1210
 
10529 fschmid 1211
        wordTrackingLabel = new QLabel( "Word Spacing", page_3 );
8054 cbradney 1212
        GroupBox3aLayout->addWidget( wordTrackingLabel, 3, 0 );
9931 fschmid 1213
        wordTrackingHLayout = new QHBoxLayout;
1214
        wordTrackingHLayout->setSpacing( 5 );
1215
        wordTrackingHLayout->setMargin( 0 );
8055 cbradney 1216
        wordTrackingHLayout->setAlignment(Qt::AlignLeft);
9052 avox 1217
        minWordTrackingSpinBox = new ScrSpinBox( 1, 200, page_3, 0 );
10529 fschmid 1218
        minWordTrackingLabel = new QLabel( "Min:", page_3 );
1219
        minWordTrackingLabel->setBuddy(minWordTrackingSpinBox);
1220
        wordTrackingHLayout->addWidget(minWordTrackingLabel);
1221
        wordTrackingHLayout->addWidget(minWordTrackingSpinBox);
9052 avox 1222
        normWordTrackingSpinBox = new ScrSpinBox( 1, 200, page_3, 0 );
10529 fschmid 1223
        normWordTrackingLabel = new QLabel( "Norm:", page_3 );
1224
        normWordTrackingLabel->setBuddy(normWordTrackingSpinBox);
1225
        wordTrackingHLayout->addWidget(normWordTrackingLabel);
1226
        wordTrackingHLayout->addWidget(normWordTrackingSpinBox);
9931 fschmid 1227
        GroupBox3aLayout->addLayout(wordTrackingHLayout, 4, 0, 1, 2);
8054 cbradney 1228
 
10529 fschmid 1229
        glyphExtensionLabel = new QLabel( "Glyph Extension", page_3 );
8054 cbradney 1230
        GroupBox3aLayout->addWidget( glyphExtensionLabel, 5, 0 );
9931 fschmid 1231
        glyphExtensionHLayout = new QHBoxLayout;
1232
        glyphExtensionHLayout->setSpacing( 5 );
1233
        glyphExtensionHLayout->setMargin( 0 );
8055 cbradney 1234
        glyphExtensionHLayout->setAlignment(Qt::AlignLeft);
9052 avox 1235
        minGlyphExtSpinBox = new ScrSpinBox( 90, 110, page_3, 0 );
10529 fschmid 1236
        minGlyphExtensionLabel = new QLabel( "Min:", page_3 );
1237
        minGlyphExtensionLabel->setBuddy(minGlyphExtSpinBox);
1238
        glyphExtensionHLayout->addWidget(minGlyphExtensionLabel);
1239
        glyphExtensionHLayout->addWidget(minGlyphExtSpinBox);
9052 avox 1240
        maxGlyphExtSpinBox = new ScrSpinBox( 90, 110, page_3, 0 );
10529 fschmid 1241
        maxGlyphExtensionLabel = new QLabel( "Max:", page_3 );
1242
        maxGlyphExtensionLabel->setBuddy(maxGlyphExtSpinBox);
1243
        glyphExtensionHLayout->addWidget(maxGlyphExtensionLabel);
1244
        glyphExtensionHLayout->addWidget(maxGlyphExtSpinBox);
9931 fschmid 1245
        GroupBox3aLayout->addLayout(glyphExtensionHLayout, 6, 0, 1, 2);
12293 fschmid 1246
        */
10508 cbradney 1247
/*      langCombo = new ScComboBox( page_3 );
2208 cbradney 1248
        langLabel = new QLabel( langCombo, "Lan&guage:", page_3, "langLabel" );
348 Franz 1249
        GroupBox3aLayout->addWidget( langLabel, 1, 0 );
6283 fschmid 1250
        GroupBox3aLayout->addWidget( langCombo, 1, 1 ); */
12293 fschmid 1251
//      pageLayout_3->addLayout(GroupBox3aLayout);
68 Franz 1252
 
12293 fschmid 1253
//      QSpacerItem* spacer8 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
1254
//      pageLayout_3->addItem( spacer8 );
2207 cbradney 1255
        idTextItem=TabStack->addItem( page_3, "&Text" );
3 paul 1256
 
10529 fschmid 1257
        page_4 = new QWidget( TabStack );
9931 fschmid 1258
        pageLayout_4 = new QVBoxLayout( page_4 );
1259
        pageLayout_4->setSpacing( 5 );
1260
        pageLayout_4->setMargin( 0 );
3 paul 1261
 
12080 avox 1262
        imagePageNumberSelector = new QGridLayout();
1263
        imagePageNumberSelector->setSpacing( 5 );
1264
        imagePageNumberSelector->setMargin( 0 );
1265
        imagePageNumber = new QSpinBox( page_4 );
1266
        imagePageNumber->setMinimum(0);
1267
        imagePageNumber->setSpecialValueText(tr( "Auto" ));
12516 cbradney 1268
        imagePageNumberLabel = new QLabel( "&Page Number:", page_4 );
12080 avox 1269
        imagePageNumberLabel->setBuddy(imagePageNumber);
1270
        imagePageNumberSelector->addWidget( imagePageNumberLabel, 0, 0 );
1271
        imagePageNumberSelector->addWidget( imagePageNumber, 0, 1);
1272
        pageLayout_4->addLayout( imagePageNumberSelector );
1273
 
10529 fschmid 1274
        FreeScale = new QRadioButton( "&Free Scaling", page_4 );
217 Franz 1275
        FreeScale->setChecked( true );
1276
        pageLayout_4->addWidget( FreeScale );
3 paul 1277
 
9931 fschmid 1278
        layout43 = new QGridLayout;
1279
        layout43->setSpacing( 5 );
1280
        layout43->setMargin( 0 );
8605 cbradney 1281
        imageXOffsetSpinBox = new ScrSpinBox( page_4, 0 );
4821 cbradney 1282
        installSniffer(imageXOffsetSpinBox);
10529 fschmid 1283
        xposImgLabel = new QLabel( "&X-Pos:", page_4 );
1284
        xposImgLabel->setBuddy(imageXOffsetSpinBox);
348 Franz 1285
        layout43->addWidget( xposImgLabel, 0, 0 );
4821 cbradney 1286
        layout43->addWidget( imageXOffsetSpinBox, 0, 1 );
8605 cbradney 1287
        imageYOffsetSpinBox = new ScrSpinBox( page_4, 0 );
4821 cbradney 1288
        installSniffer(imageYOffsetSpinBox);
10529 fschmid 1289
        yposImgLabel = new QLabel( "&Y-Pos:", page_4 );
1290
        yposImgLabel->setBuddy(imageYOffsetSpinBox);
348 Franz 1291
        layout43->addWidget( yposImgLabel, 1, 0 );
4821 cbradney 1292
        layout43->addWidget( imageYOffsetSpinBox, 1, 1 );
8605 cbradney 1293
        imageXScaleSpinBox = new ScrSpinBox( page_4, 0 );
4821 cbradney 1294
        installSniffer(imageXScaleSpinBox);
10529 fschmid 1295
        xscaleLabel = new QLabel( "X-Sc&ale:", page_4 );
1296
        xscaleLabel->setBuddy(imageXScaleSpinBox);
348 Franz 1297
        layout43->addWidget( xscaleLabel, 2, 0 );
4821 cbradney 1298
        layout43->addWidget( imageXScaleSpinBox, 2, 1 );
8605 cbradney 1299
        imageYScaleSpinBox = new ScrSpinBox( page_4, 0 );
4821 cbradney 1300
        installSniffer(imageYScaleSpinBox);
10529 fschmid 1301
        yscaleLabel = new QLabel( "Y-Scal&e:", page_4 );
1302
        yscaleLabel->setBuddy(imageYScaleSpinBox);
348 Franz 1303
        layout43->addWidget( yscaleLabel, 3, 0 );
4821 cbradney 1304
        layout43->addWidget( imageYScaleSpinBox, 3, 1 );
2606 cbradney 1305
        keepImageWHRatioButton = new LinkButton( page_4 );
10508 cbradney 1306
        keepImageWHRatioButton->setCheckable( true );
2606 cbradney 1307
        keepImageWHRatioButton->setAutoRaise( true );
1308
        keepImageWHRatioButton->setMaximumSize( QSize( 15, 32767 ) );
9931 fschmid 1309
        layout43->addWidget( keepImageWHRatioButton, 2, 2, 2, 1 );
8605 cbradney 1310
        imgDpiX = new ScrSpinBox( page_4, 0 );
4828 cbradney 1311
        installSniffer(imgDpiX);
10529 fschmid 1312
        imgDPIXLabel = new QLabel( "Actual X-DPI:", page_4 );
1313
        imgDPIXLabel->setBuddy(imgDpiX);
2389 fschmid 1314
        layout43->addWidget( imgDPIXLabel, 4, 0 );
1315
        layout43->addWidget( imgDpiX, 4, 1 );
8605 cbradney 1316
        imgDpiY = new ScrSpinBox( page_4, 0 );
4828 cbradney 1317
        installSniffer(imgDpiY);
10529 fschmid 1318
        imgDPIYLabel = new QLabel( "Actual Y-DPI:", page_4 );
1319
        imgDPIYLabel->setBuddy(imgDpiY);
2389 fschmid 1320
        layout43->addWidget( imgDPIYLabel, 5, 0 );
1321
        layout43->addWidget( imgDpiY, 5, 1 );
2606 cbradney 1322
        keepImageDPIRatioButton = new LinkButton( page_4 );
10508 cbradney 1323
        keepImageDPIRatioButton->setCheckable( true );
2606 cbradney 1324
        keepImageDPIRatioButton->setAutoRaise( true );
1325
        keepImageDPIRatioButton->setMaximumSize( QSize( 15, 32767 ) );
9931 fschmid 1326
        layout43->addWidget( keepImageDPIRatioButton, 4, 2, 2, 1 );
217 Franz 1327
        pageLayout_4->addLayout( layout43 );
3 paul 1328
 
9931 fschmid 1329
        Layout24 = new QVBoxLayout;
1330
        Layout24->setSpacing( 3 );
1331
        Layout24->setMargin( 0 );
3 paul 1332
 
10529 fschmid 1333
        FrameScale = new QRadioButton( page_4 );
2208 cbradney 1334
        FrameScale->setText( "Scale &To Frame Size" );
217 Franz 1335
        Layout24->addWidget( FrameScale );
3 paul 1336
 
9931 fschmid 1337
        Layout18 = new QHBoxLayout;
1338
        Layout18->setSpacing( 5 );
1339
        Layout18->setMargin( 0 );
3 paul 1340
 
10529 fschmid 1341
        Frame4 = new QFrame( page_4 );
217 Franz 1342
        Frame4->setMinimumSize( QSize( 15, 2 ) );
1343
        Frame4->setMaximumSize( QSize( 15, 10 ) );
9901 cbradney 1344
        Frame4->setFrameShape( QFrame::NoFrame );
1345
        Frame4->setFrameShadow( QFrame::Plain );
217 Franz 1346
        Layout18->addWidget( Frame4 );
3 paul 1347
 
10529 fschmid 1348
        Aspect = new QCheckBox( page_4 );
217 Franz 1349
        Aspect->setEnabled( false );
2208 cbradney 1350
        Aspect->setText( "P&roportional" );
217 Franz 1351
        Aspect->setChecked( true );
215 Franz 1352
 
217 Franz 1353
        Layout18->addWidget( Aspect );
1354
        Layout24->addLayout( Layout18 );
1355
        pageLayout_4->addLayout( Layout24 );
129 Franz 1356
 
10529 fschmid 1357
        EditEffects = new QToolButton( page_4);
6057 fschmid 1358
        pageLayout_4->addWidget( EditEffects );
1359
 
10529 fschmid 1360
        EditPSDProps = new QToolButton( page_4);
6057 fschmid 1361
        pageLayout_4->addWidget( EditPSDProps );
1362
 
9931 fschmid 1363
        GroupBoxCM = new QFrame( page_4 );
1364
        GroupBoxCM->setFrameShape( QFrame::NoFrame );
1365
        GroupBoxCM->setFrameShadow( QFrame::Plain );
1366
        GroupBoxCMLayout = new QVBoxLayout( GroupBoxCM );
1367
        GroupBoxCMLayout->setSpacing( 2 );
1368
        GroupBoxCMLayout->setMargin( 5 );
217 Franz 1369
        GroupBoxCMLayout->setAlignment( Qt::AlignTop );
10529 fschmid 1370
        TextCms1 = new QLabel( GroupBoxCM );
215 Franz 1371
        GroupBoxCMLayout->addWidget( TextCms1 );
10508 cbradney 1372
        InputP = new ScComboBox( GroupBoxCM );
217 Franz 1373
        GroupBoxCMLayout->addWidget(InputP);
10529 fschmid 1374
        TextCms2 = new QLabel( GroupBoxCM );
215 Franz 1375
        GroupBoxCMLayout->addWidget(TextCms2);
10508 cbradney 1376
        MonitorI = new ScComboBox( GroupBoxCM );
217 Franz 1377
        GroupBoxCMLayout->addWidget(MonitorI);
1378
        pageLayout_4->addWidget(GroupBoxCM);
68 Franz 1379
 
217 Franz 1380
        QSpacerItem* spacer9 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
1381
        pageLayout_4->addItem( spacer9 );
2207 cbradney 1382
        idImageItem=TabStack->addItem( page_4, "&Image" );
3 paul 1383
 
9931 fschmid 1384
        page_5 = new QWidget( TabStack );
1385
        pageLayout_5 = new QVBoxLayout( page_5 );
1386
        pageLayout_5->setSpacing( 5 );
1387
        pageLayout_5->setMargin( 0 );
3 paul 1388
 
215 Franz 1389
        LMode = false;
3 paul 1390
 
9931 fschmid 1391
        Layout12_2 = new QGridLayout;
1392
        Layout12_2->setSpacing( 3 );
1393
        Layout12_2->setMargin( 0 );
348 Franz 1394
        LStyle = new LineCombo(page_5);
11206 fschmid 1395
        LStyle->addItem( tr("Custom"));
10508 cbradney 1396
        LineMode = new ScComboBox( page_5 );
10529 fschmid 1397
        LineModeT = new QLabel( "&Basepoint:", page_5 );
1398
        LineModeT->setBuddy(LineMode);
9931 fschmid 1399
        Layout12_2->addWidget( LineModeT, 0, 0 );
1400
        Layout12_2->addWidget( LineMode, 0, 1 );
10529 fschmid 1401
        linetypeLabel = new QLabel( "T&ype of Line:", page_5 );
1402
        linetypeLabel->setBuddy(LStyle);
9931 fschmid 1403
        Layout12_2->addWidget( linetypeLabel, 1, 0 );
1404
        Layout12_2->addWidget( LStyle, 1, 1 );
11206 fschmid 1405
 
1406
        dashEditor = new DashEditor(page_5);
1407
        Layout12_2->addWidget(dashEditor, 2, 0, 1, 2);
1408
 
740 fschmid 1409
        startArrow = new ArrowChooser(page_5, true);
11206 fschmid 1410
        Layout12_2->addWidget( startArrow, 4, 0 );
740 fschmid 1411
        endArrow = new ArrowChooser(page_5, false);
11206 fschmid 1412
        Layout12_2->addWidget( endArrow, 4, 1 );
10529 fschmid 1413
        startArrowText = new QLabel( "Start Arrow:", page_5 );
1414
        startArrowText->setBuddy(startArrow);
11206 fschmid 1415
        Layout12_2->addWidget( startArrowText, 3, 0 );
10529 fschmid 1416
        endArrowText = new QLabel( "End Arrow:", page_5 );
1417
        endArrowText->setBuddy(endArrow);
11206 fschmid 1418
        Layout12_2->addWidget( endArrowText, 3, 1 );
8605 cbradney 1419
        LSize = new ScrSpinBox( page_5, 0 );
10529 fschmid 1420
        linewidthLabel = new QLabel( "Line &Width:", page_5 );
1421
        linewidthLabel->setBuddy(LSize);
11206 fschmid 1422
        Layout12_2->addWidget( linewidthLabel, 5, 0 );
1423
        Layout12_2->addWidget( LSize, 5, 1 );
10508 cbradney 1424
        LJoinStyle = new ScComboBox( page_5 );
10529 fschmid 1425
        edgesLabel = new QLabel( "Ed&ges:", page_5 );
1426
        edgesLabel->setBuddy(LJoinStyle);
11206 fschmid 1427
        Layout12_2->addWidget( edgesLabel, 6, 0 );
1428
        Layout12_2->addWidget( LJoinStyle, 6, 1 );
10508 cbradney 1429
        LEndStyle = new ScComboBox( page_5 );
10529 fschmid 1430
        endingsLabel = new QLabel( "&Endings:", page_5 );
1431
        endingsLabel->setBuddy(LEndStyle);
11206 fschmid 1432
        Layout12_2->addWidget( endingsLabel, 7, 0 );
1433
        Layout12_2->addWidget( LEndStyle, 7, 1 );
217 Franz 1434
        pageLayout_5->addLayout( Layout12_2 );
3 paul 1435
 
9931 fschmid 1436
        TabStack3 = new QStackedWidget( page_5 );
9746 fschmid 1437
        TabStack3->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
232 Franz 1438
 
9931 fschmid 1439
        page_5a = new QWidget( TabStack3 );
1440
        pageLayout_5a = new QVBoxLayout( page_5a );
1441
        pageLayout_5a->setSpacing( 5 );
1442
        pageLayout_5a->setMargin( 0 );
9874 avox 1443
        StyledLine = new QListWidget(page_5a);
10898 fschmid 1444
        StyledLine->setItemDelegate(new LineFormatItemDelegate);
9874 avox 1445
        StyledLine->addItem( "No Style" );
232 Franz 1446
        pageLayout_5a->addWidget(StyledLine);
9931 fschmid 1447
        TabStack3->addWidget( page_5a );
27 Franz 1448
 
10529 fschmid 1449
        page_5b = new QWidget( TabStack3 );
9931 fschmid 1450
        pageLayout_5b = new QVBoxLayout( page_5b );
1451
        pageLayout_5b->setSpacing( 5 );
1452
        pageLayout_5b->setMargin( 0 );
1453
        TLines = new QGroupBox( "Cell Lines", page_5b );
1454
        TLineLayout = new QVBoxLayout( TLines );
1455
        TLineLayout->setSpacing( 2 );
1456
        TLineLayout->setMargin( 5 );
232 Franz 1457
        TLineLayout->setAlignment( Qt::AlignTop );
10529 fschmid 1458
        TopLine = new QCheckBox( TLines );
2208 cbradney 1459
        TopLine->setText( "Line at Top" );
232 Franz 1460
        TLineLayout->addWidget(TopLine);
10529 fschmid 1461
        LeftLine = new QCheckBox( TLines );
2208 cbradney 1462
        LeftLine->setText( "Line at the Left" );
232 Franz 1463
        TLineLayout->addWidget(LeftLine);
10529 fschmid 1464
        RightLine = new QCheckBox( TLines );
2208 cbradney 1465
        RightLine->setText( "Line at the Right " );
232 Franz 1466
        TLineLayout->addWidget(RightLine);
10529 fschmid 1467
        BottomLine = new QCheckBox( TLines );
2208 cbradney 1468
        BottomLine->setText( "Line at Bottom" );
232 Franz 1469
        TLineLayout->addWidget(BottomLine);
1470
        pageLayout_5b->addWidget(TLines);
9931 fschmid 1471
        TabStack3->addWidget( page_5b );
232 Franz 1472
        pageLayout_5->addWidget( TabStack3 );
2207 cbradney 1473
        idLineItem=TabStack->addItem( page_5, "&Line" );
5320 fschmid 1474
 
9931 fschmid 1475
        page_6 = new QWidget( TabStack );
1476
        pageLayout_6 = new QVBoxLayout( page_6 );
1477
        pageLayout_6->setSpacing( 5 );
1478
        pageLayout_6->setMargin( 0 );
5320 fschmid 1479
 
1480
        Cpal = new Cpalette(page_6);
1481
        pageLayout_6->addWidget( Cpal );
1482
 
9931 fschmid 1483
        OverP = new QGroupBox( "Overprinting", page_6 );
1484
        OverPLayout = new QVBoxLayout( OverP );
1485
        OverPLayout->setSpacing( 2 );
1486
        OverPLayout->setMargin( 5 );
5320 fschmid 1487
        OverPLayout->setAlignment( Qt::AlignTop );
10529 fschmid 1488
        KnockOut = new QRadioButton( "Knockout", OverP );
5320 fschmid 1489
        OverPLayout->addWidget( KnockOut );
10529 fschmid 1490
        Overprint = new QRadioButton( "Overprint", OverP );
5320 fschmid 1491
        OverPLayout->addWidget( Overprint );
1492
        KnockOut->setChecked( true );
1493
        pageLayout_6->addWidget(OverP);
1494
 
9931 fschmid 1495
        idColorsItem = TabStack->addItem(page_6, "&Colors" );
217 Franz 1496
        MpalLayout->addWidget( TabStack );
332 Franz 1497
 
2199 cbradney 1498
        languageChange();
216 Franz 1499
 
8687 cbradney 1500
        connect(Xpos, SIGNAL(valueChanged(double)), this, SLOT(NewX()));
1501
        connect(Ypos, SIGNAL(valueChanged(double)), this, SLOT(NewY()));
1502
        connect(Width, SIGNAL(valueChanged(double)), this, SLOT(NewW()));
1503
        connect(Height, SIGNAL(valueChanged(double)), this, SLOT(NewH()));
12471 cbradney 1504
        connect(Rotation, SIGNAL(valueChanged(double)), this, SLOT(setRotation()));
11741 jghali 1505
        connect(RoundRect, SIGNAL(valueChanged(double)), this, SLOT(NewCornerRadius()));
1506
        connect(LineSp, SIGNAL(valueChanged(double)), this, SLOT(NewLineSpacing()));
8687 cbradney 1507
        connect(Size, SIGNAL(valueChanged(double)), this, SLOT(NewSize()));
11741 jghali 1508
        connect(Extra, SIGNAL(valueChanged(double)), this, SLOT(NewTracking()));
12080 avox 1509
        connect(imagePageNumber, SIGNAL(valueChanged(int)), this, SLOT(NewPage()));
8687 cbradney 1510
        connect(imageXScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(HChange()));
1511
        connect(imageYScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(VChange()));
1512
        connect(imageXOffsetSpinBox, SIGNAL(valueChanged(double)), this, SLOT(NewLocalXY()));
1513
        connect(imageYOffsetSpinBox, SIGNAL(valueChanged(double)), this, SLOT(NewLocalXY()));
1514
        connect(imgDpiX, SIGNAL(valueChanged(double)), this, SLOT(HChangeD()));
1515
        connect(imgDpiY, SIGNAL(valueChanged(double)), this, SLOT(VChangeD()));
11741 jghali 1516
        connect(LSize, SIGNAL(valueChanged(double)), this, SLOT(NewLineWidth()));
1517
        connect(LStyle, SIGNAL(activated(int)), this, SLOT(NewLineStyle()));
1518
        connect(LJoinStyle, SIGNAL(activated(int)), this, SLOT(NewLineJoin()));
1519
        connect(LEndStyle, SIGNAL(activated(int)), this, SLOT(NewLineEnd()));
1520
        connect(LineMode, SIGNAL(activated(int)), this, SLOT(NewLineMode()));
11206 fschmid 1521
        connect(dashEditor, SIGNAL(dashChanged()), this, SLOT(dashChange()));
2606 cbradney 1522
        connect(keepImageWHRatioButton, SIGNAL(clicked()), this, SLOT(ToggleKette()));
1523
        connect(keepImageDPIRatioButton, SIGNAL(clicked()), this, SLOT(ToggleKetteD()));
4699 cbradney 1524
        connect(FlipH, SIGNAL(clicked()), this, SLOT(handleFlipH()));
1525
        connect(FlipV, SIGNAL(clicked()), this, SLOT(handleFlipV()));
11741 jghali 1526
        connect(GroupAlign, SIGNAL(State(int)), this, SLOT(NewAlignement(int)));
217 Franz 1527
        connect(Revert, SIGNAL(clicked()), this, SLOT(DoRevert()));
9119 avox 1528
        connect(charStyleClear, SIGNAL(clicked()), this, SLOT(doClearCStyle()));
1529
        connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle()));
217 Franz 1530
        connect(SeStyle, SIGNAL(State(int)), this, SLOT(setTypeStyle(int)));
8687 cbradney 1531
        connect(SeStyle->ShadowVal->Xoffset, SIGNAL(valueChanged(double)), this, SLOT(newShadowOffs()));
1532
        connect(SeStyle->ShadowVal->Yoffset, SIGNAL(valueChanged(double)), this, SLOT(newShadowOffs()));
1533
        connect(SeStyle->OutlineVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(newOutlineW()));
1534
        connect(SeStyle->UnderlineVal->LPos, SIGNAL(valueChanged(double)), this, SLOT(newUnderline()));
1535
        connect(SeStyle->UnderlineVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(newUnderline()));
1536
        connect(SeStyle->StrikeVal->LPos, SIGNAL(valueChanged(double)), this, SLOT(newStrike()));
1537
        connect(SeStyle->StrikeVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(newStrike()));
217 Franz 1538
        connect(FreeScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
1539
        connect(FrameScale, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
1540
        connect(Aspect, SIGNAL(clicked()), this, SLOT(ChangeScaling()));
11741 jghali 1541
        connect(EditEffects, SIGNAL(clicked()), this, SLOT(handleImageEffects()));
1542
        connect(EditPSDProps, SIGNAL(clicked()), this, SLOT(handleExtImgProperties()));
217 Franz 1543
        connect(Zup, SIGNAL(clicked()), this, SLOT(DoRaise()));
1544
        connect(ZDown, SIGNAL(clicked()), this, SLOT(DoLower()));
1545
        connect(ZTop, SIGNAL(clicked()), this, SLOT(DoFront()));
1546
        connect(ZBottom, SIGNAL(clicked()), this, SLOT(DoBack()));
9931 fschmid 1547
        connect(RotationGroup, SIGNAL(buttonClicked(int)), this, SLOT(NewRotMode(int)));
9974 jghali 1548
        connect(textFlowOptionsB , SIGNAL(buttonClicked(int)), this, SLOT(DoFlow()));
1549
        connect(textFlowOptionsB2, SIGNAL(buttonClicked(int)), this, SLOT(DoFlow()));
5564 mrdocs 1550
 
13165 fschmid 1551
        connect(SCustom, SIGNAL(FormSel(int, int, qreal *)), this, SLOT(MakeIrre(int, int, qreal *)));
11741 jghali 1552
        connect(EditShape, SIGNAL(clicked()), this, SLOT(handleShapeEdit()));
13165 fschmid 1553
        connect(SCustom2, SIGNAL(FormSel(int, int, qreal *)), this, SLOT(MakeIrre(int, int, qreal *)));
11741 jghali 1554
        connect(EditShape2, SIGNAL(clicked()), this, SLOT(handleShapeEdit2()));
8687 cbradney 1555
        connect(dGap, SIGNAL(valueChanged(double)), this, SLOT(NewGap()));
217 Franz 1556
        connect(DCol, SIGNAL(valueChanged(int)), this, SLOT(NewCols()));
8687 cbradney 1557
        connect(DTop, SIGNAL(valueChanged(double)), this, SLOT(NewTDist()));
1558
        connect(DLeft, SIGNAL(valueChanged(double)), this, SLOT(NewTDist()));
1559
        connect(DRight, SIGNAL(valueChanged(double)), this, SLOT(NewTDist()));
1560
        connect(DBottom, SIGNAL(valueChanged(double)), this, SLOT(NewTDist()));
12269 cbradney 1561
        connect(flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(flop(int)));
2148 fschmid 1562
        connect(TabStack, SIGNAL(currentChanged(int)), this, SLOT(SelTab(int)));
13341 fschmid 1563
        connect(StyledLine, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SetSTline(QListWidgetItem*)));
2508 fschmid 1564
        connect(Fonts, SIGNAL(fontSelected(QString )), this, SLOT(NewTFont(QString)));
217 Franz 1565
        connect(TxFill, SIGNAL(activated(int)), this, SLOT(newTxtFill()));
1566
        connect(TxStroke, SIGNAL(activated(int)), this, SLOT(newTxtStroke()));
1567
        connect(PM1, SIGNAL(clicked()), this, SLOT(setActShade()));
1568
        connect(PM2, SIGNAL(clicked()), this, SLOT(setActShade()));
8687 cbradney 1569
        connect(ChScale, SIGNAL(valueChanged(double)), this, SLOT(NewTScale()));
1570
        connect(ChScaleV, SIGNAL(valueChanged(double)), this, SLOT(NewTScaleV()));
1571
        connect(ChBase, SIGNAL(valueChanged(double)), this, SLOT(NewTBase()));
217 Franz 1572
        connect(Locked, SIGNAL(clicked()), this, SLOT(handleLock()));
1573
        connect(NoPrint, SIGNAL(clicked()), this, SLOT(handlePrint()));
4695 cbradney 1574
        connect(NoResize, SIGNAL(clicked()), this, SLOT(handleLockSize()));
332 Franz 1575
        connect(showcurveCheckBox, SIGNAL(clicked()), this, SLOT(handlePathLine()));
7926 fschmid 1576
        connect(pathTextType, SIGNAL(activated(int)), this, SLOT(handlePathType()));
1577
        connect(flippedPathText, SIGNAL(clicked()), this, SLOT(handlePathFlip()));
8687 cbradney 1578
        connect(Dist, SIGNAL(valueChanged(double)), this, SLOT(handlePathDist()));
1579
        connect(LineW, SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
11741 jghali 1580
        connect(InputP, SIGNAL(activated(const QString&)), this, SLOT(ChangeProfile(const QString&)));
1581
        connect(MonitorI, SIGNAL(activated(int)), this, SLOT(ChangeIntent()));
215 Franz 1582
        connect(NameEdit, SIGNAL(Leaved()), this, SLOT(NewName()));
6283 fschmid 1583
//      connect(langCombo, SIGNAL(activated(int)), this, SLOT(NewLanguage()));
217 Franz 1584
        connect( TabsButton, SIGNAL( clicked() ), this, SLOT( ManageTabs() ) );
232 Franz 1585
        connect( TopLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) );
1586
        connect( LeftLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) );
1587
        connect( RightLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) );
1588
        connect( BottomLine, SIGNAL( clicked() ), this, SLOT( HandleTLines() ) );
5832 fschmid 1589
//      connect( colgapLabel, SIGNAL( clicked() ), this, SLOT( HandleGapSwitch() ) );
1590
        connect(colgapLabel, SIGNAL(activated(int)), this, SLOT(HandleGapSwitch()));
294 Franz 1591
        connect( Cpal, SIGNAL(NewSpecial(double, double, double, double )), this, SLOT(NewSpGradient(double, double, double, double )));
735 fschmid 1592
        connect( Cpal, SIGNAL(editGradient()), this, SLOT(toggleGradientEdit()));
740 fschmid 1593
        connect(startArrow, SIGNAL(activated(int)), this, SLOT(setStartArrow(int )));
1594
        connect(endArrow, SIGNAL(activated(int)), this, SLOT(setEndArrow(int )));
12593 cbradney 1595
//      connect(lineSpacingPop, SIGNAL(triggered(QAction *)), this, SLOT(setLspMode(QAction *)));
1596
        connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setLineSpacingMode(int)));
4477 fschmid 1597
        connect( EvenOdd, SIGNAL( clicked() ), this, SLOT(handleFillRule() ) );
1598
        connect( NonZero, SIGNAL( clicked() ), this, SLOT( handleFillRule() ) );
5320 fschmid 1599
        connect( KnockOut, SIGNAL( clicked() ), this, SLOT( handleOverprint() ) );
1600
        connect( Overprint, SIGNAL( clicked() ), this, SLOT( handleOverprint() ) );
6451 fschmid 1601
        connect(TransSpin, SIGNAL(valueChanged(int)), this, SLOT(setGroupTransparency(int)));
1602
        connect(blendMode, SIGNAL(activated(int)), this, SLOT(setGroupBlending(int)));
6722 fschmid 1603
        connect(DoGroup, SIGNAL(clicked()), this, SLOT(doGrouping()) );
13024 cbradney 1604
//      connect(optMarginCombo, SIGNAL(activated(int)), this, SLOT(setOpticalMargins(int)) );
13104 cbradney 1605
//      connect(optMarginCheckLeftProtruding, SIGNAL(stateChanged(int)), this, SLOT(setOpticalMargins(int)) );
13143 pierre 1606
        connect(optMarginRadioNone, SIGNAL(clicked()), this, SLOT(setOpticalMargins()) );
1607
        connect(optMarginRadioBoth, SIGNAL(clicked()), this, SLOT(setOpticalMargins()) );
1608
        connect(optMarginRadioLeft, SIGNAL(clicked()), this, SLOT(setOpticalMargins()) );
1609
        connect(optMarginRadioRight, SIGNAL(clicked()), this, SLOT(setOpticalMargins()) );
13298 cbradney 1610
        connect(optMarginResetButton, SIGNAL(clicked()), this, SLOT(resetOpticalMargins()) );
13024 cbradney 1611
 
1612
 
9041 fschmid 1613
        connect(minWordTrackingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setMinWordTracking()) );
1614
        connect(normWordTrackingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setNormWordTracking()) );
1615
        connect(minGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setMinGlyphExtension()) );
1616
        connect(maxGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setMaxGlyphExtension()) );
4546 subik 1617
 
215 Franz 1618
        HaveItem = false;
1619
        Xpos->setValue(0);
1620
        Ypos->setValue(0);
1621
        Width->setValue(0);
1622
        Height->setValue(0);
12471 cbradney 1623
        Rotation->setValue(0);
215 Franz 1624
        RoundRect->setValue(0);
9931 fschmid 1625
        TabStack3->setCurrentIndex(0);
1626
        TabStack2->setCurrentIndex(0);
6451 fschmid 1627
        for (int ws = 1; ws < 7; ++ws)
2148 fschmid 1628
                TabStack->setItemEnabled(ws, false);
1629
        TabStack->setCurrentIndex(0);
10529 fschmid 1630
        TabStack->widget(0)->setEnabled(false);
2148 fschmid 1631
        TabStack->setItemEnabled(0, false);
215 Franz 1632
        StrokeIcon->setEnabled(false);
1633
        TxStroke->setEnabled(false);
1634
        PM1->setEnabled(false);
11829 fschmid 1635
        colgapLabel->setCurrentIndex(0);
3 paul 1636
}
2156 fschmid 1637
 
10862 cbradney 1638
void PropertiesPalette::closeEvent(QCloseEvent *closeEvent)
7526 fschmid 1639
{
14755 jghali 1640
        if (m_ScMW && !m_ScMW->scriptIsRunning())
7526 fschmid 1641
        {
1642
                if ((HaveDoc) && (HaveItem))
1643
                {
10529 fschmid 1644
                        if (Cpal->gradEditButton->isChecked())
7526 fschmid 1645
                        {
12766 jghali 1646
                                m_ScMW->view->requestMode(modeNormal);
7526 fschmid 1647
                                m_ScMW->view->RefreshGradient(CurItem);
1648
                        }
1649
                }
1650
        }
1651
        ScrPaletteBase::closeEvent(closeEvent);
1652
}
1653
 
10862 cbradney 1654
void PropertiesPalette::setMainWindow(ScribusMainWindow* mw)
5257 cbradney 1655
{
5781 cbradney 1656
        m_ScMW=mw;
5622 jghali 1657
        QPoint p1 = mapToGlobal(pos());
5781 cbradney 1658
        QPoint p2 = m_ScMW->mapFromGlobal(p1);
8556 subik 1659
        //Qt4 reparent(m_ScMW, this->getWFlags(), p2);
1660
        setParent(m_ScMW);
1661
        move(p2);
1662
 
5781 cbradney 1663
        connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
9067 avox 1664
//      connect(this, SIGNAL(NewParStyle(int)), m_ScMW, SLOT(setNewParStyle(int)));
5781 cbradney 1665
        connect(this, SIGNAL(NewAlignment(int)), m_ScMW, SLOT(setNewAlignment(int)));
1666
        connect(this, SIGNAL(NewEffects(int)), m_ScMW, SLOT(setItemHoch(int)));
10532 avox 1667
//      connect(this, SIGNAL(ShapeEdit()), m_ScMW, SLOT(ToggleFrameEdit()));
5781 cbradney 1668
        connect(this, SIGNAL(NewFont(const QString&)), m_ScMW, SLOT(SetNewFont(const QString&)));
1669
        connect(this, SIGNAL(UpdtGui(int)), m_ScMW, SLOT(HaveNewSel(int)));
12471 cbradney 1670
//CB unused in 135      connect(this->Cpal, SIGNAL(modeChanged()), m_ScMW, SLOT(setCSMenu()));
5781 cbradney 1671
        connect(this->Cpal->gradEdit->Preview, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
1672
        connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
6722 fschmid 1673
        connect(DoUnGroup, SIGNAL(clicked()), m_ScMW, SLOT(UnGroupObj()) );
5257 cbradney 1674
 
1675
}
1676
 
10862 cbradney 1677
void PropertiesPalette::SelTab(int t)
3 paul 1678
{
14755 jghali 1679
        if (!m_ScMW || m_ScMW->scriptIsRunning())
173 Franz 1680
                return;
13117 subik 1681
        // fix for #5991: Property Palette text input box focus stays even when on another tab
1682
        // Disable widgets in all pages except current one - PV
1683
        bool enable;
1684
        for (int i = 0; i < TabStack->count(); ++i)
1685
        {
1686
                enable = (i == t);
1687
                foreach (QObject * o, TabStack->widget(i)->children())
1688
                {
1689
                        // Layouts, boxes etc aren't widgets at all
1690
                        // so let's skip them silently...
13983 jghali 1691
                        QWidget * w = qobject_cast<QWidget*>(o);
13117 subik 1692
                        if (w)
1693
                                w->setEnabled(enable);
1694
                }
1695
        }
13212 fschmid 1696
        // now restore the dis-/enabled settings of the current tab
1697
        if ((HaveDoc) && (HaveItem))
1698
        {
1699
                bool setter;
1700
                if (t == idXYZItem)
1701
                {
1702
                        if ((CurItem->isTableItem) && (CurItem->isSingleSel))
1703
                        {
1704
                                setter = true;
1705
                                Xpos->setEnabled(false);
1706
                                Ypos->setEnabled(false);
1707
                                Rotation->setEnabled(false);
1708
                        }
1709
                        else
1710
                                setter = false;
1711
                        LayerGroup->setEnabled(!setter);
1712
                        if ((CurItem->itemType() == PageItem::Line) && LMode)
1713
                                Rotation->setEnabled(false);
1714
                        else
1715
                                Rotation->setEnabled(!((CurItem->isTableItem) && (CurItem->isSingleSel)));
1716
                        if (CurItem->asLine())
1717
                        {
1718
                                keepFrameWHRatioButton->setEnabled(false);
1719
                                Height->setEnabled(LMode && !CurItem->locked());
1720
                        }
1721
                        else
1722
                        {
1723
                                Height->setEnabled(true);
1724
                                keepFrameWHRatioButton->setEnabled(true);
1725
                        }
1726
                        DoGroup->setEnabled(false);
1727
                        DoUnGroup->setEnabled(false);
1728
                        if (doc->m_Selection->count() > 1)
1729
                        {
1730
                                bool isGroup = true;
1731
                                int firstElem = -1;
1732
                                if (CurItem->Groups.count() != 0)
1733
                                        firstElem = CurItem->Groups.top();
1734
                                for (int bx = 0; bx < doc->m_Selection->count(); ++bx)
1735
                                {
1736
                                        if (doc->m_Selection->itemAt(bx)->Groups.count() != 0)
1737
                                        {
1738
                                                if (doc->m_Selection->itemAt(bx)->Groups.top() != firstElem)
1739
                                                        isGroup = false;
1740
                                        }
1741
                                        else
1742
                                                isGroup = false;
1743
                                }
1744
                                if (!isGroup)
1745
                                        DoGroup->setEnabled(true);
1746
                                else
1747
                                {
1748
                                        if (CurItem->isGroupControl)
1749
                                                NameEdit->setEnabled(true);
1750
                                }
1751
                                if ((CurItem->Groups.count() != 0) && (isGroup))
1752
                                        DoUnGroup->setEnabled(true);
1753
                        }
1754
                }
1755
                else if (t == idShapeItem)
1756
                {
1757
                        DCol->setMaximum(qMax(qRound(CurItem->width() / qMax(CurItem->ColGap, 10.0)), 1));
1758
                        if (((CurItem->asTextFrame()) || (CurItem->asImageFrame())) &&  (!CurItem->ClipEdited) && ((CurItem->FrameType == 0) || (CurItem->FrameType == 2)))
1759
                                RoundRect->setEnabled(true);
1760
                        else
1761
                                RoundRect->setEnabled ((CurItem->asPolygon()) &&  (!CurItem->ClipEdited)  && ((CurItem->FrameType == 0) || (CurItem->FrameType == 2)));
1762
                }
1763
                else if (t == idImageItem)
1764
                {
1765
                        imagePageNumber->setMaximum(CurItem->pixm.imgInfo.numberOfPages);
1766
                        setter = CurItem->ScaleType;
1767
                        if (CurItem->asLatexFrame())
1768
                        {
1769
                                FreeScale->setEnabled(false);
1770
                                FrameScale->setEnabled(false);
1771
                                Aspect->setEnabled(false);
1772
                                imageXScaleSpinBox->setEnabled(false);
1773
                                imageYScaleSpinBox->setEnabled(false);
1774
                                imgDpiX->setEnabled(false);
1775
                                imgDpiY->setEnabled(false);
1776
                        }
1777
                        else
1778
                        {
1779
                                imageXScaleSpinBox->setEnabled(setter);
1780
                                imageYScaleSpinBox->setEnabled(setter);
1781
                                imgDpiX->setEnabled(setter);
1782
                                imgDpiY->setEnabled(setter);
1783
                                Aspect->setEnabled(!setter);
1784
                                FreeScale->setEnabled(true);
1785
                                FrameScale->setEnabled(true);
1786
                        }
1787
                        imageXOffsetSpinBox->setEnabled(setter);
1788
                        imageYOffsetSpinBox->setEnabled(setter);
1789
                }
1790
                else if (t == idLineItem)
1791
                {
1792
                        if ((CurItem->asLine()) || (CurItem->asPolyLine()))
1793
                        {
1794
                                startArrow->setEnabled(true);
1795
                                endArrow->setEnabled(true);
1796
                        }
1797
                        else
1798
                        {
1799
                                startArrow->setEnabled(false);
1800
                                endArrow->setEnabled(false);
1801
                        }
1802
                        if (CurItem->NamedLStyle.isEmpty())
1803
                                setter = true;
1804
                        else
1805
                                setter = false;
1806
                        LStyle->setEnabled(setter);
1807
                        LSize->setEnabled(setter);
1808
                        LJoinStyle->setEnabled(setter);
1809
                        LEndStyle->setEnabled(setter);
1810
                }
1811
                else if (t == idColorsItem)
1812
                {
1813
                        Cpal->setActGradient(CurItem->GrType);
1814
                        updateColorSpecialGradient();
1815
                        Cpal->gradEdit->Preview->fill_gradient = CurItem->fill_gradient;
1816
                        Cpal->gradEdit->Preview->updateDisplay();
1817
                        KnockOut->setChecked(!CurItem->doOverprint);
1818
                        Overprint->setChecked(CurItem->doOverprint);
1819
                }
1820
        }
3 paul 1821
}
1822
 
10862 cbradney 1823
void PropertiesPalette::setDoc(ScribusDoc *d)
3 paul 1824
{
14755 jghali 1825
        if(doc == d || (m_ScMW && m_ScMW->scriptIsRunning()))
7677 jghali 1826
                return;
1827
 
4713 cbradney 1828
        disconnect(this->Cpal, SIGNAL(NewTrans(double)), 0, 0);
1829
        disconnect(this->Cpal, SIGNAL(NewTransS(double)), 0, 0);
4714 cbradney 1830
        disconnect(this->Cpal, SIGNAL(NewPen(QString)), 0, 0);
1831
        disconnect(this->Cpal, SIGNAL(NewBrush(QString)), 0, 0);
1832
        disconnect(this->Cpal, SIGNAL(NewPenShade(int)), 0, 0);
1833
        disconnect(this->Cpal, SIGNAL(NewBrushShade(int)), 0, 0);
1834
        disconnect(this->Cpal, SIGNAL(NewGradient(int)), 0, 0);
5746 fschmid 1835
        disconnect(this->Cpal, SIGNAL(NewBlend(int)), 0, 0);
1836
        disconnect(this->Cpal, SIGNAL(NewBlendS(int)), 0, 0);
6368 fschmid 1837
        disconnect(this->Cpal, SIGNAL(NewPattern(QString)), 0, 0);
6414 fschmid 1838
        disconnect(this->Cpal, SIGNAL(NewPatternProps(double, double, double, double, double)), 0, 0);
4729 subik 1839
 
3 paul 1840
        doc = d;
9649 avox 1841
        CurItem = NULL;
7900 fschmid 1842
        Cpal->setDocument(doc);
1843
        Cpal->setCurrentItem(NULL);
8605 cbradney 1844
        m_unitRatio=doc->unitRatio();
8613 cbradney 1845
        m_unitIndex=doc->unitIndex();
8699 fschmid 1846
        int precision = unitGetPrecisionFromIndex(m_unitIndex);
8613 cbradney 1847
//qt4 FIXME here
11724 fschmid 1848
        double maxXYWHVal= 16777215 * m_unitRatio;
1849
        double minXYVal= -16777215 * m_unitRatio;
3 paul 1850
        HaveDoc = true;
186 Franz 1851
        HaveItem = false;
335 Franz 1852
 
9817 avox 1853
        QMap<QString, double>* docConstants = doc? &doc->constants()  : NULL;
8699 fschmid 1854
        Xpos->setValues( minXYVal, maxXYWHVal, precision, minXYVal);
9817 avox 1855
        Xpos->setConstants(docConstants);
8699 fschmid 1856
        Ypos->setValues( minXYVal, maxXYWHVal, precision, minXYVal);
9817 avox 1857
        Ypos->setConstants(docConstants);
8699 fschmid 1858
        Width->setValues( m_unitRatio, maxXYWHVal, precision, m_unitRatio);
9817 avox 1859
        Width->setConstants(docConstants);
8699 fschmid 1860
        Height->setValues( m_unitRatio, maxXYWHVal, precision, m_unitRatio);
9817 avox 1861
        Height->setConstants(docConstants);
11724 fschmid 1862
        imageXOffsetSpinBox->setValues( -16777215, maxXYWHVal, precision, 0);
1863
        imageYOffsetSpinBox->setValues( -16777215, maxXYWHVal, precision, 0);
335 Franz 1864
 
12471 cbradney 1865
        Rotation->setValues( 0, 359.99, 1, 0);
8699 fschmid 1866
        RoundRect->setValues( -300, 300, 2, 0);
1867
        Extra->setValues( -300, 300, 2, 0);
1868
        Size->setValues( 0.5, 2048, 2, 1);
1869
        LineSp->setValues( 1, 2048, 2, 1);
9088 cbradney 1870
        minWordTrackingSpinBox->setValues(1, 100, 2, 100);
1871
        normWordTrackingSpinBox->setValues(1, 200, 2, 100);
1872
        minGlyphExtSpinBox->setValues(90, 110, 2, 100);
1873
        maxGlyphExtSpinBox->setValues(90, 110, 2, 100);
8699 fschmid 1874
        imageXScaleSpinBox->setValues( 1, 30000, 2, 1);
1875
        imageYScaleSpinBox->setValues( 1, 30000, 2, 1);
1876
        imgDpiX->setValues( 1, 30000, 2, 1);
1877
        imgDpiY->setValues( 1, 30000, 2, 1);
335 Franz 1878
 
8699 fschmid 1879
        dGap->setDecimals(2);
1880
        DTop->setDecimals(2);
1881
        DLeft->setDecimals(2);
1882
        DBottom->setDecimals(2);
1883
        DRight->setDecimals(2);
8605 cbradney 1884
        LSize->setMaximum( 300 );
1885
        LSize->setMinimum( 0 );
1886
        Dist->setMaximum( 30000 );
1887
        Dist->setMinimum( 0 );
10500 cbradney 1888
        Dist->setSingleStep(10);
8605 cbradney 1889
        LineW->setMaximum( 300 );
1890
        LineW->setMinimum( -300 );
10500 cbradney 1891
        LineW->setSingleStep(10);
335 Franz 1892
 
7677 jghali 1893
        updateColorList();
4546 subik 1894
 
4117 cbradney 1895
        updateSpinBoxConstants();
7996 jghali 1896
        paraStyleCombo->setDoc(doc);
1897
        charStyleCombo->setDoc(doc);
1898
        SetLineFormats(doc);
1899
        startArrow->rebuildList(&doc->arrowStyles);
1900
        endArrow->rebuildList(&doc->arrowStyles);
4729 subik 1901
 
4713 cbradney 1902
        connect(this->Cpal, SIGNAL(NewTrans(double)), doc, SLOT(itemSelection_SetItemFillTransparency(double)));
1903
        connect(this->Cpal, SIGNAL(NewTransS(double)), doc, SLOT(itemSelection_SetItemLineTransparency(double)));
5746 fschmid 1904
        connect(this->Cpal, SIGNAL(NewBlend(int)), doc, SLOT(itemSelection_SetItemFillBlend(int)));
1905
        connect(this->Cpal, SIGNAL(NewBlendS(int)), doc, SLOT(itemSelection_SetItemLineBlend(int)));
12420 cbradney 1906
        connect(this->Cpal, SIGNAL(NewPen(QString)), doc, SLOT(itemSelection_SetItemPen(QString)));
1907
        connect(this->Cpal, SIGNAL(NewBrush(QString)), doc, SLOT(itemSelection_SetItemBrush(QString)));
1908
        connect(this->Cpal, SIGNAL(NewPenShade(int)), doc, SLOT(itemSelection_SetItemPenShade(int)));
1909
        connect(this->Cpal, SIGNAL(NewBrushShade(int)), doc, SLOT(itemSelection_SetItemBrushShade(int)));
1910
        connect(this->Cpal, SIGNAL(NewGradient(int)), doc, SLOT(itemSelection_SetItemGradFill(int)));
1911
        connect(this->Cpal, SIGNAL(NewPattern(QString)), doc, SLOT(itemSelection_SetItemPatternFill(QString)));
1912
        connect(this->Cpal, SIGNAL(NewPatternProps(double, double, double, double, double)), doc, SLOT(itemSelection_SetItemPatternProps(double, double, double, double, double)));
3 paul 1913
}
1914
 
10862 cbradney 1915
void PropertiesPalette::unsetDoc()
3 paul 1916
{
1917
        HaveDoc = false;
4714 cbradney 1918
        HaveItem = false;
1919
        doc=NULL;
9649 avox 1920
        CurItem = NULL;
7900 fschmid 1921
        Cpal->setCurrentItem(NULL);
1922
        Cpal->setDocument(NULL);
9817 avox 1923
        Xpos->setConstants(NULL);
1924
        Ypos->setConstants(NULL);
1925
        Width->setConstants(NULL);
1926
        Height->setConstants(NULL);
7996 jghali 1927
        paraStyleCombo->setDoc(0);
1928
        charStyleCombo->setDoc(0);
1929
        SetLineFormats(0);
11003 fschmid 1930
        DoGroup->setEnabled(false);
1931
        DoUnGroup->setEnabled(false);
1932
        EditShape->setEnabled(false);
11334 fschmid 1933
//      ShapeGroup->setEnabled(false);
11003 fschmid 1934
        FlipH->setEnabled(false);
1935
        FlipV->setEnabled(false);
1936
        xposLabel->setText( tr( "&X-Pos:" ) );
1937
        widthLabel->setText( tr( "&Width:" ) );
1938
        yposLabel->setText( tr( "&Y-Pos:" ) );
1939
        heightLabel->setText( tr( "&Height:" ) );
1940
        RoundRect->setEnabled(false);
1941
        HaveItem = false;
1942
        Xpos->setValue(0);
1943
        Ypos->setValue(0);
1944
        Width->setValue(0);
1945
        Height->setValue(0);
12471 cbradney 1946
        Rotation->setValue(0);
11003 fschmid 1947
        RoundRect->setValue(0);
1948
        for (int ws = 1; ws < 7; ++ws)
1949
                TabStack->setItemEnabled(ws, false);
1950
        TabStack->widget(0)->setEnabled(false);
1951
        TabStack->setItemEnabled(idXYZItem, false);
1952
        Cpal->ChooseGrad(0);
3 paul 1953
}
1954
 
10862 cbradney 1955
void PropertiesPalette::unsetItem()
4738 cbradney 1956
{
1957
        HaveItem=false;
1958
        CurItem = NULL;
7900 fschmid 1959
        Cpal->setCurrentItem(NULL);
11206 fschmid 1960
        dashEditor->hide();
4738 cbradney 1961
        NewSel(-1);
1962
}
4546 subik 1963
 
10862 cbradney 1964
void PropertiesPalette::setTextFlowMode(PageItem::TextFlowMode mode)
5620 jghali 1965
{
14755 jghali 1966
        if (!m_ScMW || m_ScMW->scriptIsRunning() || !HaveItem)
5620 jghali 1967
                return;
8494 fschmid 1968
        if (CurItem->isGroupControl)
1969
        {
1970
                if (mode == PageItem::TextFlowDisabled)
10529 fschmid 1971
              &