EnrichmentDialog.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef TEXWIDGETDIALOG_H
00032 #define TEXWIDGETDIALOG_H
00033
00034 #include <QDialog>
00035
00036 class QComboBox;
00037 class QHttp;
00038 class QLabel;
00039 class QPushButton;
00040 class QTextEdit;
00041 class QTabWidget;
00042 class QCheckBox;
00043 class QLineEdit;
00044 class QCheckBox;
00045 class QSpinBox;
00046
00047 class Graph;
00048 class FrameWidget;
00049 class LegendWidget;
00050 class ColorButton;
00051 class DoubleSpinBox;
00052 class PatternBox;
00053 class PenStyleBox;
00054 class RectangleWidget;
00055 class TextFormatButtons;
00056
00057 class EnrichmentDialog : public QDialog
00058 {
00059 Q_OBJECT
00060
00061 public:
00062 enum WidgetType{Frame, Text, Image, Tex, MDIWindow};
00063
00064 EnrichmentDialog(WidgetType wt, Graph *g, QWidget *parent = 0);
00065 ~EnrichmentDialog();
00066
00067 void setWidget(QWidget *w);
00068
00069 private slots:
00070 void clearForm();
00071 void fetchImage();
00072 void updateForm(bool error);
00073 void apply();
00074 void customButtons(QWidget *w);
00075 void chooseImageFile(const QString& fn = QString::null);
00076 void displayCoordinates(int unit);
00077 void adjustHeight(double width);
00078 void adjustWidth(double height);
00079 void saveImagesInternally(bool save);
00080 void setBestSize();
00081 void frameApplyTo();
00082 void patternApplyTo();
00083 void textFormatApplyTo();
00084 void customFont();
00085 void updateTransparency(int alpha);
00086 void setTextDefaultValues();
00087 void setFrameDefaultValues();
00088 void setRectangleDefaultValues();
00089
00090 private:
00091 void initTextPage();
00092 void initEditorPage();
00093 void initImagePage();
00094 void initFramePage();
00095 void initGeometryPage();
00096 void initPatternPage();
00097 void setCoordinates(int unit);
00098 void setFrameTo(FrameWidget *fw);
00099 void setPatternTo(RectangleWidget *r);
00100 void setTextFormatTo(LegendWidget *l);
00101 void setText(const QString & t);
00102
00103 QHttp *http;
00104 QLabel *outputLabel;
00105 QPushButton *clearButton;
00106 QPushButton *updateButton;
00107 QPushButton *cancelButton;
00108 QPushButton *bestSizeButton;
00109 QTextEdit *equationEditor, *textEditBox;
00110 QComboBox *frameBox;
00111 QTabWidget* tabWidget;
00112 QWidget *editPage, *framePage, *geometryPage, *imagePage, *patternPage, *textPage;
00113 ColorButton *frameColorBtn, *backgroundColorBtn, *patternColorBtn;
00114 QCheckBox *boxSaveImagesInternally;
00115 QLineEdit *imagePathBox;
00116 DoubleSpinBox *xBox, *yBox, *widthBox, *heightBox;
00117 QComboBox *unitBox;
00118 PenStyleBox *boxFrameLineStyle;
00119 QCheckBox *keepAspectBox, *useFrameColorBox;
00120 QSpinBox *boxTransparency, *boxFrameWidth, *boxTextAngle;
00121 PatternBox *patternBox;
00122 QPushButton *textApplyToBtn;
00123 QComboBox *frameApplyToBox, *patternApplyToBox, *textApplyToBox;
00124 ColorButton *textColorBtn, *textBackgroundBtn;
00125 QPushButton *textFontBtn;
00126 QSpinBox *boxBackgroundTransparency;
00127 TextFormatButtons *formatButtons;
00128 QPushButton *textDefaultBtn, *frameDefaultBtn, *rectangleDefaultBtn;
00129 QCheckBox *autoUpdateTextBox;
00130 QFont textFont;
00131
00132 Graph *d_plot;
00133 QWidget *d_widget;
00134 WidgetType d_widget_type;
00135 double aspect_ratio;
00136 };
00137
00138 #endif