Subversion Repositories Scribus

Rev

Rev 12055 | Details | Compare with Previous | Last modification | View Log | RSS feed

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