Scribus
Open source desktop publishing at your fingertips
smpstylewidget.h
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 SMPSTYLEWIDGET_H
9 #define SMPSTYLEWIDGET_H
10 
11 class QEvent;
12 class CharStyle;
13 #include "ui_smpstylewidget.h"
14 
15 #include "styles/styleset.h"
16 #include "ui/charselectenhanced.h"
17 
18 class SMPStyleWidget : public QWidget, Ui::SMPStyleWidget
19 {
20  Q_OBJECT
21 public:
22  SMPStyleWidget(ScribusDoc *doc, StyleSet<CharStyle> *cstyles);
23  ~SMPStyleWidget();
24 
25  virtual void changeEvent(QEvent *e);
26 
27  void show(ParagraphStyle *pstyle, QList<ParagraphStyle> &pstyles, QList<CharStyle> &cstyles, int unitIndex, const QString &defLang);
28  void show(QList<ParagraphStyle*> &pstyles, QList<ParagraphStyle> &pstylesAll, QList<CharStyle> &cstyles, int unitIndex, const QString &defLang);
29 
30  void clearAll();
31  void languageChange();
32  void unitChange(double oldRatio, double newRatio, int unitIndex);
33  void setDoc(ScribusDoc* doc);
34 
35 private:
36  bool hasParent_;
37  //bool parentParEffects_;
38  bool m_parentDC, m_parentBul, m_parentNum;
39  CharSelectEnhanced * m_enhanced;
40  ScribusDoc * m_Doc;
41  QString m_currFontName;
42  ParagraphStyle* m_currPStyle;
43  StyleSet<CharStyle> *m_cstyles;
44 
45  void fillBulletStrEditCombo();
46  void fillNumFormatCombo();
47  void fillNumerationsCombo();
48  void fillNumRestartCombo();
49  void checkParEffectState();
50  void showLineSpacing(QList<ParagraphStyle*> &pstyles);
51  void showSpaceAB(QList<ParagraphStyle*> &pstyles, int unitIndex);
52  void showDropCap(QList<ParagraphStyle*> &pstyles, QList<CharStyle> &cstyles, int unitIndex);
53  void showBullet(QList<ParagraphStyle*> &pstyles, QList<CharStyle> &cstyles, int unitIndex);
54  void showNumeration(QList<ParagraphStyle*> &pstyles, QList<CharStyle> &cstyles, int unitIndex);
55  void showAlignment(QList<ParagraphStyle*> &pstyles);
56  void showOpticalMargin(QList<ParagraphStyle*> &pstyles);
57  void showMinSpace(QList<ParagraphStyle*> &pstyles);
58  void showMinGlyphExt(QList<ParagraphStyle*> &pstyles);
59  void showMaxGlyphExt(QList<ParagraphStyle*> &pstyles);
60  void showTabs(QList<ParagraphStyle*> &pstyles, int unitIndex);
61  void showCStyle(QList<ParagraphStyle*> &pstyles, QList<CharStyle> &cstyles, const QString &defLang, int unitIndex);
62  void showParent(QList<ParagraphStyle*> &pstyles);
63  void setOpticalMargins(int o, bool inhO=false, const ParagraphStyle *parent=NULL);
64 
65  void openEnhanced();
66  void closeEnhanced(bool show = false);
67  void connectPESignals();
68  void disconnectPESignals();
69 
70  friend class SMParagraphStyle;
71 
72 private slots:
73  void slotLineSpacingModeChanged(int);
74  void slotDropCap(bool isOn);
75  void slotBullets(bool isOn);
76  void insertSpecialChars(const QString &);
77  void slotNumbering(bool isOn);
78  void slotParentParEffects();
79  void slotDefaultOpticalMargins();
80  void slotParentOpticalMargins();
81 // void slotUpdateOpticalMarginsFromCheckBoxes(int);
82  void on_bulletCharTableButton_toggled(bool checked);
83  void handleUpdateRequest(int);
84 
85 signals:
86  void useParentParaEffects();
87  void useParentOptMargins();
88 };
89 
90 #endif
Definition: charstyle.h:78
Character Palette for batch glyphs inserting. Enhanced instance is created/destroyed on every call fr...
Definition: charselectenhanced.h:20
Definition: smtextstyles.h:20
Definition: paragraphstyle.h:27
the Document Class
Definition: scribusdoc.h:90