Subversion Repositories Scribus

Rev

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