Subversion Repositories Scribus

Rev

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

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