PlotMSAxisWidget.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 PLOTMSAXISWIDGET_QO_H_
00028 #define PLOTMSAXISWIDGET_QO_H_
00029
00030 #include <plotms/Gui/PlotMSAxisWidget.ui.h>
00031
00032 #include <casaqt/QtUtilities/QtEditingWidget.qo.h>
00033 #include <plotms/PlotMS/PlotMSConstants.h>
00034 #include <casaqt/QtUtilities/QtUtilities.h>
00035
00036 namespace casa {
00037
00038
00039 class PlotRangeWidget;
00040
00041
00042
00043 class PlotMSAxisWidget : public QtEditingWidget, Ui::AxisWidget {
00044 Q_OBJECT
00045
00046 public:
00047
00048 PlotMSAxisWidget(PMS::Axis defaultAxis, int attachAxes,
00049 QWidget* parent = NULL);
00050
00051
00052 ~PlotMSAxisWidget();
00053
00054
00055
00056 QLabel* dataLabel() { return AxisWidget::dataLabel; }
00057 QLabel* attachLabel() { return AxisWidget::attachLabel; }
00058 QLabel* rangeLabel() { return AxisWidget::rangeLabel; }
00059 QLabel* axisLabel(){
00060 return AxisWidget::axisLabel;
00061 }
00062
00063
00064
00065
00066 PMS::Axis axis() const;
00067 PMS::DataColumn data() const;
00068 PlotAxis attachAxis() const;
00069 bool matchesData(const PlotMSAxisWidget* other ) const;
00070 bool rangeCustom() const;
00071 prange_t range() const;
00072
00073
00074
00075 void setRange(bool isDate, double from, double to);
00076
00077
00078 void setValue(PMS::Axis axis, PMS::DataColumn data, PlotAxis attachAxis,
00079 bool rangeCustom, prange_t range);
00080
00081
00082 void setInCache(bool inCache);
00083 void insertLabelDefaults( QMap<QLabel*,QString>& map );
00084
00085
00086 QString getIdentifier() const;
00087
00088 signals:
00089 void axisIdentifierChanged(PlotMSAxisWidget*);
00090 void axisChanged();
00091
00092 private:
00093 void initPlotAxis(int attachAxis);
00094 void setAttachAxis(PlotAxis attachAxis );
00095
00096
00097 PlotRangeWidget* itsRangeWidget_;
00098
00099
00100 private slots:
00101
00102 void axisChanged(const QString& value);
00103 void axisDataChanged();
00104
00105 };
00106
00107 }
00108
00109 #endif