QtPlotWidget.qo.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 #ifndef QTPLOTWIDGET_QO_H_
00028 #define QTPLOTWIDGET_QO_H_
00029
00030 #include <casaqt/QtUtilities/PlotColorWidget.ui.h>
00031 #include <casaqt/QtUtilities/PlotFillWidget.ui.h>
00032 #include <casaqt/QtUtilities/PlotLineWidget.ui.h>
00033 #include <casaqt/QtUtilities/PlotSymbolWidget.ui.h>
00034 #include <casaqt/QtUtilities/PlotFontWidget.ui.h>
00035
00036 #include <casaqt/QtUtilities/QtEditingWidget.qo.h>
00037 #include <graphics/GenericPlotter/PlotFactory.h>
00038
00039 namespace casa {
00040
00041
00042 class QtPlotWidget : public QtEditingWidget {
00043 Q_OBJECT
00044
00045 public:
00046
00047 QtPlotWidget(PlotFactoryPtr factory, QWidget* parent = NULL);
00048
00049
00050 virtual ~QtPlotWidget();
00051
00052 protected:
00053
00054 PlotFactoryPtr itsFactory_;
00055 };
00056
00057
00058
00059 class PlotColorWidget : public QtPlotWidget, Ui::ColorWidget {
00060 Q_OBJECT
00061
00062 public:
00063
00064
00065 PlotColorWidget(PlotFactoryPtr factory, bool showAlpha = false,
00066 QWidget* parent = NULL);
00067
00068
00069 ~PlotColorWidget();
00070
00071
00072
00073 PlotColorPtr getColor() const;
00074 void setColor(PlotColorPtr color);
00075
00076
00077
00078
00079 String getColorString() const;
00080 void setColor(const String& color);
00081
00082
00083 private:
00084
00085 PlotColorPtr itsColor_;
00086
00087 private slots:
00088
00089 void colorChoose();
00090
00091
00092 void colorChanged();
00093 };
00094
00095
00096
00097 class PlotFillWidget : public QtPlotWidget, Ui::FillWidget {
00098 Q_OBJECT
00099
00100 public:
00101
00102
00103 PlotFillWidget(PlotFactoryPtr factory, bool showAlpha = false, String fillColor="blue",
00104 QWidget* parent = NULL);
00105
00106
00107 ~PlotFillWidget();
00108
00109
00110
00111 PlotAreaFillPtr getFill() const;
00112 void setFill(PlotAreaFillPtr fill);
00113
00114
00115 private:
00116
00117 PlotColorWidget* itsColorWidget_;
00118
00119
00120 PlotAreaFillPtr itsFill_;
00121
00122 private slots:
00123
00124 void fillChanged();
00125 };
00126
00127
00128
00129
00130 class PlotLineWidget : public QtPlotWidget, Ui::LineWidget {
00131 Q_OBJECT
00132
00133 public:
00134
00135
00136
00137 PlotLineWidget(PlotFactoryPtr factory, bool useCompact = true,
00138 bool showAlpha = false, QWidget* parent = NULL);
00139
00140
00141 ~PlotLineWidget();
00142
00143
00144
00145 PlotLinePtr getLine() const;
00146 void setLine(PlotLinePtr line);
00147
00148
00149 private:
00150
00151 PlotColorWidget* itsColorWidget_;
00152
00153
00154 PlotLinePtr itsLine_;
00155
00156
00157
00158
00159 PlotLine::Style lineStyle() const;
00160 void setLineStyle(PlotLine::Style style);
00161
00162
00163 private slots:
00164
00165 void lineChanged();
00166 };
00167
00168
00169
00170
00171
00172
00173 class PlotSymbolWidget : public QtPlotWidget, Ui::SymbolWidget {
00174 Q_OBJECT
00175
00176 public:
00177
00178
00179
00180
00181
00182 PlotSymbolWidget(PlotFactoryPtr factory, PlotSymbolPtr defaultSymbol,
00183 bool showAlphaFill = false, bool showCustom = true,
00184 bool showAlphaLine = false, bool showCharacter = true,
00185 QWidget* parent = NULL);
00186
00187
00188 ~PlotSymbolWidget();
00189
00190
00191
00192 PlotSymbolPtr getSymbol() const;
00193 void setSymbol(PlotSymbolPtr symbol);
00194
00195
00196
00197 void addRadioButtonsToGroup(QButtonGroup* group) const;
00198
00199
00200 void setMinimumSizes(const std::map<PlotSymbol::Symbol, int>& minimumSizes);
00201
00202 private:
00203
00204 PlotFillWidget* itsFillWidget_;
00205
00206
00207 PlotLineWidget* itsLineWidget_;
00208
00209
00210 PlotSymbolPtr itsDefault_;
00211
00212
00213 PlotSymbolPtr itsSymbol_;
00214
00215
00216 std::map<PlotSymbol::Symbol, int> itsMinSizes_;
00217
00218 private slots:
00219
00220
00221
00222 void symbolChanged(bool check = true);
00223 };
00224
00225
00226
00227 class PlotFontWidget : public QtPlotWidget, Ui::FontWidget {
00228 Q_OBJECT
00229
00230 public:
00231
00232
00233 PlotFontWidget(PlotFactoryPtr factory, bool showAlpha = false,
00234 QWidget* parent = NULL);
00235
00236
00237 ~PlotFontWidget();
00238
00239
00240
00241 PlotFontPtr getFont() const;
00242 void setFont(PlotFontPtr font);
00243
00244
00245 private:
00246
00247 PlotColorWidget* itsColorWidget_;
00248
00249
00250 PlotFontPtr itsFont_;
00251
00252 private slots:
00253
00254 void fontChanged();
00255 };
00256
00257 }
00258
00259 #endif