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 #ifndef LAYERDIALOG_H
00030 #define LAYERDIALOG_H
00031
00032 #include <MultiLayer.h>
00033
00034 #include <QDialog>
00035
00036 class DoubleSpinBox;
00037 class QGroupBox;
00038 class QPushButton;
00039 class QSpinBox;
00040 class QCheckBox;
00041 class QComboBox;
00042
00044 class LayerDialog : public QDialog
00045 {
00046 Q_OBJECT
00047
00048 public:
00049 LayerDialog(QWidget* parent, bool okMode = false, Qt::WFlags fl = 0);
00050 void setMultiLayer(MultiLayer *g);
00051 void setLayers(int layers);
00052 void setLayerCanvasSize(int w, int h, int unit);
00053 void setMargins(int, int, int, int);
00054 void setRows(int);
00055 void setColumns(int);
00056 void setSharedAxes(bool = true);
00057
00058 protected slots:
00059 void accept();
00060 void update();
00061 void enableLayoutOptions(bool ok);
00062 void swapLayers();
00063 void updateSizes(int unit);
00064 void adjustCanvasHeight(double width);
00065 void adjustCanvasWidth(double height);
00066 void showCommonAxesBox();
00067
00068 private:
00069 void closeEvent(QCloseEvent*);
00070 int convertToPixels(double w, FrameWidget::Unit unit, int dimension);
00071 double convertFromPixels(int w, FrameWidget::Unit unit, int dimension);
00072
00073 MultiLayer *multi_layer;
00074
00075 QPushButton* buttonOk;
00076 QPushButton* buttonCancel;
00077 QPushButton* buttonApply;
00078 QPushButton* buttonSwapLayers;
00079 QGroupBox *GroupCanvasSize, *GroupGrid;
00080 QSpinBox *boxX, *boxY, *boxColsGap, *boxRowsGap;
00081 QSpinBox *boxRightSpace, *boxLeftSpace, *boxTopSpace, *boxBottomSpace;
00082 DoubleSpinBox *boxCanvasWidth, *boxCanvasHeight;
00083 QSpinBox *layersBox;
00084 QSpinBox *boxLayerDest, *boxLayerSrc;
00085 QCheckBox *fitBox;
00086 QComboBox *alignHorBox, *alignVertBox;
00087 QComboBox *unitBox;
00088 QCheckBox *keepRatioBox;
00089 QComboBox *alignPolicyBox;
00090 QCheckBox *commonAxesBox;
00091 QCheckBox *fixedSizeBox;
00092 QCheckBox *linkXAxesBox;
00093
00094 double aspect_ratio;
00095 };
00096
00097 #endif