kviewshell
pageSizeWidget.h
Go to the documentation of this file.00001 // -*- C++ -*- 00002 // pageSizeWidget.h 00003 // 00004 // Part of KVIEWSHELL - A framework for multipage text/gfx viewers 00005 // 00006 // (C) 2002 Stefan Kebekus 00007 // Distributed under the GPL 00008 00009 // Add header files alphabetically 00010 00011 #ifndef PAGESIZEWIDGET_H 00012 #define PAGESIZEWIDGET_H 00013 00014 #include "pageSize.h" 00015 #include "pageSizeWidget_base.h" 00016 00017 class QDoubleValidator; 00018 00019 class pageSizeWidget : public pageSizeWidget_base 00020 { 00021 Q_OBJECT 00022 00023 public: 00024 pageSizeWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00025 00026 // Sets the page size. If the dialog is already shown, updates all 00027 // the GUI. Accepts the same strings as input as the setPageSize() 00028 // method of the pageSize() class. 00029 void setPageSize(const QString&); 00030 00031 void setOrientation(int ori); 00032 00033 const pageSize &pageSizeData() const {return chosenSize;} 00034 00035 protected slots: 00036 void paperSize(int); 00037 void fillTextFields(); 00038 00039 // Dummy function, for convenience. Ignores the argument and calls 00040 // the fillTextFields() slot. 00041 void unitsChanged(int); 00042 void orientationChanged(int = 0); 00043 void input(const QString &); 00044 00045 private: 00046 pageSize chosenSize; 00047 00048 QDoubleValidator *widthValidator; 00049 QDoubleValidator *heightValidator; 00050 }; 00051 00052 #endif // PAGESIZEWIDGET_H