00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef CanvasSettings_H 00015 #define CanvasSettings_H 00016 00017 #include <qglobal.h> // for version 00018 #if QT_VERSION < 0x040000 00019 #include "CanvasSettingsBase.h" 00020 #else 00021 #include "CanvasSettingsUI.h" 00022 #endif 00023 00024 #include <qprinter.h> 00025 00033 #if QT_VERSION < 0x040000 00034 class CanvasSettings : public CanvasSettingsBase 00035 { 00036 #else 00037 class CanvasSettings : public QDialog, private Ui::CanvasSettingsUI 00038 { 00039 Q_OBJECT 00040 #endif 00041 00042 public: 00043 00046 enum Type { Accepted, 00047 Rejected, 00048 AcceptedAndRetile, 00049 Retile 00050 }; 00051 00052 private: 00053 00056 void orientationChanged (); 00057 00058 00059 #if QT_VERSION < 0x040000 00060 protected: 00061 #else 00062 protected slots: 00063 #endif 00064 00067 virtual void cancel(); 00068 00071 virtual void saveRetile (); 00072 00075 virtual void on_portraitRadioButton_toggled ( bool ); 00076 00079 virtual void on_retile_clicked(); 00080 00081 public: 00082 00085 #if QT_VERSION < 0x040000 00086 CanvasSettings ( QWidget* parent = 0, 00087 const char* name = 0, 00088 bool modal = false, 00089 Qt::WFlags fl = 0 ); 00090 #else 00091 CanvasSettings ( QWidget * parent = 0 ); 00092 #endif 00093 00096 int getWidthNumber () const; 00097 00100 void setWidthNumber ( int number ); 00101 00104 int getHeightNumber () const; 00105 00108 void setHeightNumber ( int number ); 00109 00112 QPrinter::Orientation orientation(); 00113 00116 void setOrientation( QPrinter::Orientation orientation ); 00117 00120 bool printerBounds(); 00121 00124 void setPrinterBounds( bool flag ); 00125 00128 bool getAddSelected () const; 00129 00130 }; 00131 00132 #endif // CanvasSettings_H