Subversion Repositories Scribus

Rev

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

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