smtabruler.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef SMTABRULER_H
00008 #define SMTABRULER_H
00009
00010 #include "tabruler.h"
00011
00012 class SMScrSpinBox;
00013
00014
00015 class SMTabruler : public Tabruler
00016 {
00017 Q_OBJECT
00018 public:
00019 SMTabruler(QWidget* parent,
00020 bool haveFirst = true,
00021 int dEin = 1,
00022 QList<ParagraphStyle::TabRecord> Tabs = QList<ParagraphStyle::TabRecord>(),
00023 double wid = -1);
00024 ~SMTabruler() {};
00025
00026 void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin);
00027 void setTabs(QList<ParagraphStyle::TabRecord> Tabs, int dEin, bool isParentValue);
00028 void setParentTabs(QList<ParagraphStyle::TabRecord> Tabs);
00029
00030 void setFirstLineValue(double t);
00031 void setFirstLineValue(double t, bool isParentValue);
00032 void setParentFirstLine(double t);
00033
00034 void setLeftIndentValue(double t);
00035 void setLeftIndentValue(double t, bool isParentValue);
00036 void setParentLeftIndent(double t);
00037
00038 void setRightIndentValue(double t);
00039 void setRightIndentValue(double t, bool isParentValue);
00040 void setParentRightIndent(double t);
00041
00042 bool useParentTabs();
00043 bool useParentFirstLine();
00044 bool useParentLeftIndent();
00045 bool useParentRightIndent();
00046
00047 SMScrSpinBox *first_;
00048 SMScrSpinBox *left_;
00049 SMScrSpinBox *right_;
00050
00051 private:
00052 QList<ParagraphStyle::TabRecord> pTabs_;
00053 int pDein_;
00054 QToolButton *parentButton_;
00055 bool hasParent_;
00056 bool tabsChanged_;
00057 bool useParentTabs_;
00058 bool isSetupRight_;
00059 bool isSetupLeft_;
00060 bool isSetupFirst_;
00061
00062 private slots:
00063 void slotTabsChanged();
00064 void pbClicked();
00065 void firstDataChanged();
00066 void leftDataChanged();
00067 void rightDataChanged();
00068 void firstValueChanged();
00069 void leftValueChanged();
00070 void rightValueChanged();
00071 };
00072
00073 #endif
00074