Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
5850 tsoots 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
*/
7
 
8
#ifndef SMTEXTSTYLES_H
9
#define SMTEXTSTYLES_H
10
 
11
#include "styleitem.h"
12
#include "smpstylewbase.h"
13
#include "smcstylewbase.h"
5980 avox 14
#include "styles/styleset.h"
5850 tsoots 15
 
16
class QGridLayout;
17
class QPopupMenu;
18
class QToolButton;
19
class MSpinBox;
20
class QLabel;
21
class QTabWidget;
22
class QString;
23
class QComboBox;
24
class AlignSelect;
25
class QSpinBox;
26
class QVBoxLayout;
27
class Tabruler;
28
class FontComboH;
29
class StyleSelect;
30
class QSpacerItem;
31
class ScComboBox;
32
class ShadeButton;
5859 tsoots 33
class CharStyle;
34
class ParagraphStyle;
35
class ScribusDoc;
6019 tsoots 36
class SMCStylePage;
5850 tsoots 37
 
38
class SMPStyleWidget : public PStyleWBase
39
{
40
        Q_OBJECT
41
public:
42
        SMPStyleWidget();
43
        ~SMPStyleWidget();
44
 
6019 tsoots 45
        void show(ParagraphStyle &pstyle);
46
 
5850 tsoots 47
private:
48
        QGridLayout *distancesBoxLayout;
49
        QGridLayout *dropCapsBoxLayout;
50
        QVBoxLayout *tabsBoxLayout;
51
 
6019 tsoots 52
        QComboBox   *lineSpacingMode_;
5850 tsoots 53
 
54
        QLabel      *pixmapLabel0;
55
        QLabel      *pixmapLabel1;
56
        QLabel      *pixmapLabel2;
57
        QLabel      *pixmapLabel3;
58
        QLabel      *pixmapLabel4;
59
        QLabel      *capLabel1;
60
        QLabel      *capLabel2;
61
 
6019 tsoots 62
        MSpinBox    *lineSpacing_;
5850 tsoots 63
        MSpinBox    *fontBase;
64
        MSpinBox    *fontKern;
6019 tsoots 65
        MSpinBox    *spaceAbove_;
66
        MSpinBox    *spaceBelow_;
67
        QSpinBox    *dropCapLines_;
68
        MSpinBox    *dropCapOffset_;
5850 tsoots 69
 
6019 tsoots 70
        AlignSelect  *alignement_;
71
        Tabruler     *tabList_;
72
        SMCStylePage *cpage;
5850 tsoots 73
 
74
        void setupDistances();
75
        void setupDropCaps();
76
        void setupTabs();
6019 tsoots 77
        void setupCharStyle();
5850 tsoots 78
};
79
 
80
class SMParagraphStyle : public StyleItem
81
{
5867 tsoots 82
        Q_OBJECT
5850 tsoots 83
public:
84
        SMParagraphStyle();
85
        ~SMParagraphStyle();
86
 
87
        QTabWidget* widget();
88
        QString typeName();
89
        void currentDoc(ScribusDoc *doc);
90
        QValueList<StyleName> styles();
91
        void selected(const QStringList &styleNames);
5859 tsoots 92
        QString fromSelection() const;
5850 tsoots 93
        void apply();
94
        void deleteStyles(const QValueList<RemoveItem> &removeList);
95
        void nameChanged(const QString &newName);
96
 
97
private:
98
        SMPStyleWidget *pwidget_;
5859 tsoots 99
        ScribusDoc *doc_;
6019 tsoots 100
 
101
        void updateStyleList();
5850 tsoots 102
};
103
 
6019 tsoots 104
class SMCStylePage : public CStylePBase
5850 tsoots 105
{
106
        Q_OBJECT
107
public:
6019 tsoots 108
        SMCStylePage(QWidget *parent = 0);
109
        ~SMCStylePage();
5850 tsoots 110
 
6019 tsoots 111
        void show(CharStyle &cstyle);
112
 
5850 tsoots 113
private:
114
        QVBoxLayout *characterBoxLayout;
115
        QHBoxLayout *layout7;
5870 tsoots 116
        QHBoxLayout *layout8;
5850 tsoots 117
        QHBoxLayout *layout9a;
118
        QHBoxLayout *layout5;
119
        QHBoxLayout *layout6;
120
 
6019 tsoots 121
        FontComboH  *fontFace_;
122
        StyleSelect *effects_;
123
        ScComboBox  *fillColor_;
124
        ShadeButton *fillShade_;
125
        ScComboBox  *strokeColor_;
126
        ShadeButton *strokeShade_;
5850 tsoots 127
 
6019 tsoots 128
        MSpinBox    *fontSize_;
129
        MSpinBox    *fontHScale_;
130
        MSpinBox    *fontVScale_;
131
        MSpinBox    *tracking_;
132
        MSpinBox    *baselineOffset_;
5850 tsoots 133
 
134
        QLabel      *TextF2;
135
        QLabel      *pixmapLabel3;
136
        QLabel      *pixmapLabel3_2;
137
        QLabel      *FillIcon;
138
        QLabel      *pixmapLabel3_20;
139
        QLabel      *StrokeIcon;
140
        QLabel      *pixmapLabel3_19;
5870 tsoots 141
        QLabel      *pixmapLabel3_3;
142
        QLabel      *pixmapLabel2;
5850 tsoots 143
 
144
        QSpacerItem *spacer1;
145
        QSpacerItem *spacer2;
146
        QSpacerItem *spacer4;
147
};
148
 
149
class SMCharacterStyle : public StyleItem
150
{
5867 tsoots 151
        Q_OBJECT
5850 tsoots 152
public:
153
        SMCharacterStyle();
154
        ~SMCharacterStyle();
155
 
156
        QTabWidget* widget();
157
        QString typeName();
158
        void currentDoc(ScribusDoc *doc);
159
        QValueList<StyleName> styles();
160
        void selected(const QStringList &styleNames);
5859 tsoots 161
        QString fromSelection() const;
5850 tsoots 162
        void apply();
163
        void deleteStyles(const QValueList<RemoveItem> &removeList);
164
        void nameChanged(const QString &newName);
165
 
166
private:
6019 tsoots 167
        QTabWidget   *widget_;
168
        SMCStylePage *page_;
169
        ScribusDoc   *doc_;
5850 tsoots 170
};
171
 
172
#endif