Back to index

scribus-ng  1.3.4.dfsg+svn20071115
pageselector.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef PAGESELECTOR_H
00008 #define PAGESELECTOR_H
00009 
00010 
00011 #include "styleoptions.h"
00012 
00013 #include <qvariant.h>
00014 #include <qpixmap.h>
00015 #include <qwidget.h>
00016 #include <qvalidator.h>
00017 #include "scribusapi.h"
00018 
00019 class QVBoxLayout;
00020 class QHBoxLayout;
00021 class QGridLayout;
00022 class QComboBox;
00023 class QLineEdit;
00024 class QPopupMenu;
00025 class QPushButton;
00026 class QToolButton;
00027 
00028 class SCRIBUS_API PageSelector : public QWidget
00029 {
00030        Q_OBJECT
00031 
00032 public:
00033        PageSelector( QWidget* parent, int maxPg );
00034        ~PageSelector() {};
00035        bool hasFocus();
00036        void focusPolicy(QWidget::FocusPolicy policy);
00037 
00038 #if OPTION_USE_QTOOLBUTTON
00039        QToolButton* Start;
00040        QToolButton* Back;
00041        QToolButton* Forward;
00042        QToolButton* Last;
00043 #else
00044        QPushButton* Start;
00045        QPushButton* Back;
00046        QPushButton* Forward;
00047        QPushButton* Last;
00048 #endif
00049        
00050        QComboBox* PageCombo;
00051        QValidator *v;
00052        int LastPG;
00053        int APage;
00054 
00055 public slots:
00056        virtual void GotoPg(int);
00057        virtual void setMaxValue(int);
00058        void languageChange();
00059        void clearFocus();
00060 
00061 private slots:
00062        virtual void GotoPgE(int);
00063        virtual void GotoPage();
00064        virtual void ToStart();
00065        virtual void ToEnd();
00066        virtual void goBk();
00067        virtual void goFw();
00068 
00069 protected:
00070        QHBoxLayout* PageSelectorLayout;
00071 
00072 signals:
00073        void GotoPage(int);
00074 
00075 };
00076 
00077 #endif // PAGESELECTOR_H