TextDialog.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     File                 : TextDialog.h
00003     Project              : QtiPlot
00004     --------------------------------------------------------------------
00005     Copyright            : (C) 2004 - 2008 by Ion Vasilief
00006     Email (use @ for *)  : ion_vasilief*yahoo.fr
00007     Description          : Title/axis label options dialog
00008 
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *  This program is free software; you can redistribute it and/or modify   *
00014  *  it under the terms of the GNU General Public License as published by   *
00015  *  the Free Software Foundation; either version 2 of the License, or      *
00016  *  (at your option) any later version.                                    *
00017  *                                                                         *
00018  *  This program is distributed in the hope that it will be useful,        *
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00021  *  GNU General Public License for more details.                           *
00022  *                                                                         *
00023  *   You should have received a copy of the GNU General Public License     *
00024  *   along with this program; if not, write to the Free Software           *
00025  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
00026  *   Boston, MA  02110-1301  USA                                           *
00027  *                                                                         *
00028  ***************************************************************************/
00029 
00030 #ifndef TEXTDLG_H
00031 #define TEXTDLG_H
00032 
00033 #include <QDialog>
00034 class QGroupBox;
00035 class QTextEdit;
00036 class QTextCursor;
00037 class QComboBox;
00038 class QLabel;
00039 class QSpinBox;
00040 class Graph;
00041 class QwtScaleWidget;
00042 class ColorButton;
00043 class TextFormatButtons;
00044 
00046 class TextDialog : public QDialog
00047 {
00048     Q_OBJECT
00049 
00050 public:
00052     enum TextType{
00053         AxisTitle,   
00054         LayerTitle
00055     };
00056 
00058 
00063     TextDialog(TextType type, QWidget* parent = 0, Qt::WFlags fl = 0 );
00064 
00066 
00069     int alignment();
00070 
00071 public slots:
00073     void setText(const QString & t);
00075 
00079     void setAlignment(int align);
00080     void setGraph(Graph *g);
00081 
00082 private slots:
00084     void customFont();
00086     void apply();
00087 
00088 private:
00089     void formatLayerLabels(Graph *g);
00090 
00092     QFont selectedFont;
00093     TextType textType;
00094 
00095     ColorButton *colorBtn, *backgroundBtn;
00096     QPushButton *buttonFont;
00097     QComboBox *backgroundBox;
00098     QPushButton *buttonCancel;
00099     QPushButton *buttonApply;
00100     QTextEdit *textEditBox;
00101     QGroupBox *groupBox1, *groupBox2;
00102     QComboBox *alignmentBox;
00103     TextFormatButtons *formatButtons;
00104     QComboBox *formatApplyToBox;
00105 
00106     Graph *d_graph;
00107     QwtScaleWidget *d_scale;
00108 };
00109 
00110 #endif // TEXTDLG_H

Generated on Tue Nov 3 10:48:51 2009 for QtiPlot by  doxygen 1.6.1