Subversion Repositories Scribus

Rev

Rev 6618 | 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
*/
1195 fschmid 7
#ifndef TABTOOLS_H
8
#define TABTOOLS_H
9
 
10
#include <qvariant.h>
11
#include <qwidget.h>
12
#include <qlayout.h>
13
#include <qlabel.h>
14
#include <qtoolbutton.h>
15
#include <qbuttongroup.h>
16
#include <qcombobox.h>
17
#include <qcheckbox.h>
2025 fschmid 18
#include <qradiobutton.h>
1195 fschmid 19
#include <qwidgetstack.h>
2969 craig 20
 
21
#include "scribusapi.h"
5512 subik 22
 
6606 fschmid 23
class QGroupBox;
1195 fschmid 24
class LinkButton;
25
class QSpinBox;
26
class FontCombo;
27
class PolygonWidget;
28
class ArrowChooser;
29
class MSpinBox;
30
class LineCombo;
31
class ScribusDoc;
4689 mrdocs 32
class ColorCombo;
1195 fschmid 33
 
5851 subik 34
 
35
/*! \brief Tools panel for preferences dialog.
36
This class is inherited from UI base class.
37
\author Petr Vanek <petr@scribus.info>
38
*/
2969 craig 39
class SCRIBUS_API TabTools : public QWidget
1195 fschmid 40
{
41
        Q_OBJECT
42
 
43
public:
1790 cbradney 44
        TabTools( QWidget* parent, struct toolPrefs *prefsData, int unitIndex, ScribusDoc* doc);
1195 fschmid 45
        ~TabTools() {};
46
 
5851 subik 47
        void restoreDefaults(struct toolPrefs *prefsData, int unitIndex);
48
 
49
        /*! \brief Enable sample rendering.
50
        It's called when user selects this panel in preferences. First painting is very slow
51
        so it's called on user demand - not in the prefs GUI initialization.
52
        \param state allow drawing the sample when TRUE
53
        \author Petr Vanek <petr@scribus.info> */
54
        void enableFontPreview(bool state);
55
 
56
        void unitChange(QString unit, int docUnitIndex, int decimals, double invUnitConversion);
57
 
1195 fschmid 58
        QButtonGroup* buttonGroupTools;
59
        QToolButton* toolShape;
60
        QToolButton* toolPoly;
61
        QToolButton* toolImage;
62
        QToolButton* toolText;
63
        QToolButton* toolLine;
64
        QToolButton* toolZoom;
6606 fschmid 65
        QToolButton* toolMisc;
1195 fschmid 66
        QWidgetStack* subStackTools;
67
        QWidget* subTabText;
6358 fschmid 68
        QLabel* textHeadLine;
1195 fschmid 69
        QLabel* textLabel3b;
70
        QLabel* textLabel3b2;
2219 fschmid 71
        QLabel* textLabel3b2t;
2285 fschmid 72
        QLabel* textLabel3b2t2;
3093 fschmid 73
        QLabel* textLabel3bT;
74
        QLabel* textLabel3bTL;
1195 fschmid 75
        QLabel* textLabel1b;
76
        QLabel* textLabel2b;
77
        QLabel* textLabel4b;
78
        QSpinBox* columnsText;
79
        QLabel* previewText;
80
        FontCombo* fontComboText;
81
        QComboBox* sizeComboText;
4689 mrdocs 82
        ColorCombo* colorComboText;
83
        ColorCombo* colorComboStrokeText;
84
        ColorCombo* colorComboTextBackground;
85
        ColorCombo* colorComboTextLine;
3093 fschmid 86
        QSpinBox* shadingText;
87
        QSpinBox* shadingTextStroke;
88
        QSpinBox* shadingTextBack;
89
        QSpinBox* shadingTextLine;
90
        QLabel* textLabelTS;
91
        QLabel* textLabelTSS;
92
        QLabel* textLabelTSB;
93
        QLabel* textLabelTSL;
2219 fschmid 94
        QComboBox* tabFillCombo;
1195 fschmid 95
        QLabel* textLabel5b;
96
        MSpinBox* gapText;
2285 fschmid 97
        MSpinBox* gapTab;
1195 fschmid 98
        QWidget* subTabShape;
6358 fschmid 99
        QLabel* shapeHeadLine;
1195 fschmid 100
        QLabel* textLabel9b;
101
        QLabel* textLabel10b;
102
        MSpinBox* lineWidthShape;
103
        QLabel* textLabel12b;
104
        QLabel* textLabel11b;
105
        LineCombo* comboStyleShape;
106
        QSpinBox* shadingFillShape;
4689 mrdocs 107
        ColorCombo* comboFillShape;
1195 fschmid 108
        QSpinBox* shadingLineShape;
109
        QLabel* textLabel7b;
4689 mrdocs 110
        ColorCombo* colorComboLineShape;
1195 fschmid 111
        QLabel* textLabel8b;
112
        QWidget* subTabLine;
6358 fschmid 113
        QLabel* lineHeadLine;
1195 fschmid 114
        MSpinBox* lineWidthLine;
115
        QSpinBox* shadingLine;
4689 mrdocs 116
        ColorCombo* colorComboLine;
1195 fschmid 117
        QLabel* textLabel13b;
118
        QLabel* textLabel14b;
119
        QLabel* textLabel15b;
120
        QLabel* textLabel16b;
121
        LineCombo* comboStyleLine;
122
        QWidget* subTabImage;
6358 fschmid 123
        QLabel* imageHeadLine;
4689 mrdocs 124
        ColorCombo* comboFillImage;
1195 fschmid 125
        QLabel* textLabel19b;
126
        QSpinBox* shadingFillImage;
127
        QLabel* textLabel20b;
128
        QButtonGroup* buttonGroup3;
129
        QLabel* textLabel17b;
130
        QLabel* textLabel18b;
131
        QSpinBox* scalingHorizontal;
132
        QSpinBox* scalingVertical;
133
        LinkButton* chainButton;
134
        QButtonGroup* buttonGroup5;
135
        QCheckBox* checkRatioImage;
2040 fschmid 136
        QCheckBox* embeddedPath;
2025 fschmid 137
        QButtonGroup* buttonGroupRes;
138
        QRadioButton* checkFullRes;
139
        QRadioButton* checkNormalRes;
140
        QRadioButton* checkHalfRes;
1195 fschmid 141
        QWidget* subTabPolygon;
6358 fschmid 142
        QLabel* polygonHeadLine;
1195 fschmid 143
        PolygonWidget* polyWidget;
144
        QWidget* subTabZoom;
6358 fschmid 145
        QLabel* zoomHeadLine;
1195 fschmid 146
        QLabel* textLabel21b;
147
        QSpinBox* minimumZoom;
148
        QLabel* textLabel22b;
149
        QLabel* textLabel23b;
150
        QSpinBox* maximumZoom;
151
        QSpinBox* zoomStep;
152
        ArrowChooser* startArrow;
153
        ArrowChooser* endArrow;
154
        QLabel* startArrowText;
155
        QLabel* endArrowText;
156
        QLabel* arrowText;
6606 fschmid 157
        QWidget* subTabGeneral;
158
        QLabel* generalHeadLine;
159
        QGroupBox* genDispBox;
160
        QLabel* genText1;
161
        QLabel* genText2;
162
        MSpinBox* genDispX;
163
        MSpinBox* genDispY;
6618 fschmid 164
        QGroupBox* genRotBox;
165
        QLabel* genText3;
166
        QLabel* genText4;
167
        MSpinBox* genRot;
1195 fschmid 168
 
169
protected slots:
4650 subik 170
        /*!
171
        \author Franz Schmid
172
        \brief TabTools (Tools, Image Frame), Sets Y Scale value from X Scale value when chain is toggled
173
        */
1195 fschmid 174
        virtual void toggleChain();
4650 subik 175
        /*!
176
        \author Franz Schmid
177
        \brief TabTools (Tools, Image Frame), Sets Y Scale value from X Scale value when X Scale value is changed
178
        */
1195 fschmid 179
        virtual void hChange();
4650 subik 180
        /*!
181
        \author Franz Schmid
182
        \brief TabTools (Tools, Image Frame). Sets X Scale value from Y Scale value when Y Scale value is changed
183
        */
1195 fschmid 184
        virtual void vChange();
8709 jghali 185
        virtual void changeImageScalingFree(bool);
186
        virtual void changeImageScalingRatio(bool);
4650 subik 187
        /*!
188
        \author Franz Schmid
189
        \brief TabTools (Tools, Text frame), Sets the sample text in selected font in text frame preferences
190
        */
1195 fschmid 191
        virtual void setSample();
4650 subik 192
        /*!
193
        \author Franz Schmid
194
        \brief TabTools (Tools), Raises widget for selected Tool properties
195
        */
1195 fschmid 196
        virtual void setTool();
3629 fschmid 197
        virtual void setFillChar(int act);
2282 fschmid 198
        virtual void setCustomFillChar(const QString &txt);
1195 fschmid 199
 
200
protected:
201
        QHBoxLayout* tabToolsLayout;
202
        QVBoxLayout* buttonGroupToolsLayout;
203
        QGridLayout* subTabTextLayout;
204
        QGridLayout* subTabShapeLayout;
205
        QGridLayout* subTabLineLayout;
206
        QGridLayout* subTabImageLayout;
207
        QGridLayout* buttonGroup3Layout;
208
        QHBoxLayout* buttonGroup5Layout;
2025 fschmid 209
        QVBoxLayout* buttonGroupResLayout;
6358 fschmid 210
        QGridLayout* subTabPolygonLayout;
1195 fschmid 211
        QGridLayout* subTabZoomLayout;
6606 fschmid 212
        QGridLayout* subTabGeneralLayout;
213
        QGridLayout* subTabGeneralLayout2;
6618 fschmid 214
        QGridLayout* subTabGeneralLayout3;
4614 fschmid 215
        ScribusDoc* docu;
1790 cbradney 216
        double unitRatio;
217
        QString unit;
218
        int precision;
5763 subik 219
 
5851 subik 220
        /*! \brief True when is font sample allowed.
221
        See enableFontPreview() */
222
        bool fontPreview;
223
 
5763 subik 224
        void enableSignals(bool);
1195 fschmid 225
};
226
#endif