QtiPlot  0.9.8.2
TextDialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : TextDialog.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2004 - 2008 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : Title/axis label options dialog
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 
30 #ifndef TEXTDLG_H
31 #define TEXTDLG_H
32 
33 #include <QDialog>
34 class QGroupBox;
35 class QTextEdit;
36 class QTextCursor;
37 class QComboBox;
38 class QCheckBox;
39 class QLabel;
40 class QSpinBox;
41 class Graph;
42 class QwtScaleWidget;
43 class ColorButton;
44 class TextFormatButtons;
45 
47 class TextDialog : public QDialog
48 {
49  Q_OBJECT
50 
51 public:
53  enum TextType{
56  };
57 
59 
64  TextDialog(TextType type, QWidget* parent = 0, Qt::WFlags fl = 0 );
65 
67 
70  int alignment();
71 
72 public slots:
74  void setText(const QString & t);
76 
80  void setAlignment(int align);
81  void setGraph(Graph *g);
82 
83 private slots:
85  void customFont();
87  void apply();
88 
89 private:
90  void formatLayerLabels(Graph *g);
91 
93  QFont selectedFont;
95 
97  QPushButton *buttonFont;
98  QComboBox *backgroundBox;
99  QPushButton *buttonCancel;
100  QPushButton *buttonApply;
101  QTextEdit *textEditBox;
102  QGroupBox *groupBox1, *groupBox2;
103  QComboBox *alignmentBox;
105  QComboBox *formatApplyToBox;
106  QSpinBox *distanceBox;
107  QCheckBox *invertTitleBox;
108 
110  QwtScaleWidget *d_scale;
111 };
112 
113 #endif // TEXTDLG_H