Subversion Repositories Scribus

Rev

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