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 #ifndef AXISFORMATPROPERTIES_H
00029 #define AXISFORMATPROPERTIES_H
00030
00031 #include <QGpGuiTools.h>
00032
00033 #include "ui_AxisFormatProperties.h"
00034 #include "Axis.h"
00035
00036 namespace SciFigs {
00037
00038 class AxisFormatProperties : public PropertyWidget, private Ui::AxisFormatProperties
00039 {
00040 Q_OBJECT
00041 public:
00042 AxisFormatProperties(QWidget * parent=0);
00043
00044 enum Properties {Title, Font, Orientation, LineWeight, TickSize,
00045 NumberType, NumberPrecision, Autoprecision, UnitFactor};
00046
00047 static int numberType2item(Number::Type nt);
00048 static Number::Type item2numberType(int index);
00049
00050 static int orientation2item(Axis::Orientation o);
00051 static Axis::Orientation item2orientation(int index);
00052 private:
00053 virtual int determineCustomWidgetType(int pid, QWidget * w, QWidget * label);
00054 virtual bool connectCustomWidget(PropertyValue & );
00055 virtual bool setCustomWidget(PropertyValue & p);
00056 virtual QVariant customWidgetValue(PropertyValue & p);
00057 signals:
00058 void numberFormatChanged();
00059 private slots:
00060 void on_numberTypeEdit_activated(int);
00061 void on_precisionEdit_valueChanged(int);
00062 void on_automaticPrecision_toggled(bool b);
00063 void on_fontEdit_clicked();
00064 };
00065
00066 }
00067
00068 #endif // AXISFORMATPROPERTIES_H