1 /***************************************************************************
2  *   Copyright (C) 2008 by Alexey Balakin                                  *
3  *   mathgl.abalakin@gmail.com                                             *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20 #ifndef STYLEDIALOG_H
21 #define STYLEDIALOG_H
22 //-----------------------------------------------------------------------------
23 #include <qdialog.h>
24 class QComboBox;
25 class QSlider;
26 class QSpinBox;
27 class QGroupBox;
28 class QTabWidget;
29 class QCheckBox;
30 class QLabel;
31 class QLineEdit;
32 class QRadioButton;
33 class QToolButton;
34 //-----------------------------------------------------------------------------
35 /// Selecting styles of command (like line style, color scheme, font style, axis style)
36 class StyleDialog : public QDialog
37 {
38 Q_OBJECT
39 public:
getStyle()40 	QString getStyle()	{	return result;	};
41 	StyleDialog(QWidget *parent = 0);
42 	~StyleDialog();
43 
44 	void showFontPage();
45 	void showPenPage();
46 	void showSchPage();
47 private slots:
48 	void updatePic();
49 private:
50 	QString result;
51 	QComboBox *cc[8], *cline, *cfont;
52 	QSlider *nn[8], *nline;
53 	QComboBox *axial, *ctext, *a1, *a2, *dash, *mark;
54 	QCheckBox *swire;
55 	QCheckBox *ital, *bold, *wire, *uline, *oline;
56 	QSpinBox *width;
57 	QGroupBox *align;
58 	QTabWidget *tab;
59 	QLabel *pic;
60 	QLineEdit *res;
61 	QRadioButton *rbL, *rbC, *rbR;
62 	uchar *grBuf;
63 	QCheckBox *font_sch;
64 	QComboBox *mask;
65 	QComboBox *angle;
66 	QSlider *msize;
67 
68 	QToolButton *dash_bit[16];	// 8 buttons for dashing
69 	QToolButton *mask_bit[64];	// 8*8 buttons for mask
70 };
71 //-----------------------------------------------------------------------------
72 #endif
73 //-----------------------------------------------------------------------------
74