Scribus
Open source desktop publishing at your fingertips
smtabruler.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 #ifndef SMTABRULER_H
8 #define SMTABRULER_H
9 
10 #include "tabruler.h"
11 
12 class SMScrSpinBox;
13 
14 
15 class SMTabruler : public Tabruler
16 {
17  Q_OBJECT
18 public:
19  SMTabruler(QWidget* parent,
20  bool haveFirst = true,
21  int dEin = 1,
22  QList<ParagraphStyle::TabRecord> Tabs = QList<ParagraphStyle::TabRecord>(),
23  double wid = -1);
24  ~SMTabruler() {};
25 
26  void unitChange(int unitIndex);
27 
28  void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int unitIndex);
29  void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int unitIndex, bool isParentValue);
30  void setParentTabs(QList<ParagraphStyle::TabRecord> Tabs);
31 
32  void setFirstLineValue(double t);
33  void setFirstLineValue(double t, bool isParentValue);
34  void setParentFirstLine(double t);
35 
36  void setLeftIndentValue(double t);
37  void setLeftIndentValue(double t, bool isParentValue);
38  void setParentLeftIndent(double t);
39 
40  void setRightIndentValue(double t);
41  void setRightIndentValue(double t, bool isParentValue);
42  void setParentRightIndent(double t);
43 
44  bool useParentTabs();
45  bool useParentFirstLine();
46  bool useParentLeftIndent();
47  bool useParentRightIndent();
48 
49  SMScrSpinBox *first_;
50  SMScrSpinBox *left_;
51  SMScrSpinBox *right_;
52 
53 private:
54  QList<ParagraphStyle::TabRecord> m_pTabs;
55  int m_unitIndex;
56  QToolButton *m_parentButton;
57  bool m_hasParent;
58  bool m_tabsChanged;
59  bool m_useParentTabs;
60  bool m_isSetupRight;
61  bool m_isSetupLeft;
62  bool m_isSetupFirst;
63 
64 private slots:
65  void slotTabsChanged();
66  void pbClicked();
67  void firstDataChanged();
68  void leftDataChanged();
69  void rightDataChanged();
70  void firstValueChanged();
71  void leftValueChanged();
72  void rightValueChanged();
73 };
74 
75 #endif
76 
Definition: tabruler.h:83
Definition: smtabruler.h:15
Definition: smscrspinbox.h:13