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 #ifndef LINEDIALOG_H
00030 #define LINEDIALOG_H
00031
00032 #include <qdialog.h>
00033
00034 class QCheckBox;
00035 class QComboBox;
00036 class QPushButton;
00037 class QTabWidget;
00038 class QWidget;
00039 class QSpinBox;
00040 class QLineEdit;
00041 class ColorButton;
00042 class ArrowMarker;
00043
00045 class LineDialog : public QDialog
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 LineDialog(ArrowMarker *line, QWidget* parent = 0, Qt::WFlags fl = 0);
00051
00052 enum Unit{ScaleCoordinates, Pixels};
00053
00054 void initGeometryTab();
00055 void enableHeadTab();
00056 void setCoordinates(int unit);
00057
00058 public slots:
00059 void enableButtonDefault(QWidget *w);
00060 void setDefaultValues();
00061 void displayCoordinates(int unit);
00062 void setLineStyle(Qt::PenStyle style);
00063 void accept();
00064 void apply();
00065
00066 private:
00067 ArrowMarker *lm;
00068
00069 ColorButton* colorBox;
00070 QComboBox* styleBox;
00071 QComboBox* widthBox;
00072 QComboBox* unitBox;
00073 QPushButton* btnOk;
00074 QPushButton* btnApply;
00075 QPushButton* buttonDefault;
00076 QCheckBox* endBox;
00077 QCheckBox* startBox, *filledBox;
00078 QTabWidget* tw;
00079 QWidget *options, *geometry, *head;
00080 QLineEdit *xStartBox, *yStartBox, *xEndBox, *yEndBox;
00081 QSpinBox *boxHeadAngle, *boxHeadLength;
00082 };
00083
00084 #endif // LINEDIALOG_H