Scribus
Open source desktop publishing at your fingertips
pageselector.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef PAGESELECTOR_H
8 #define PAGESELECTOR_H
9 
10 #include <QWidget>
11 
12 class QEvent;
13 class QHBoxLayout;
14 class QLabel;
15 class QLineEdit;
16 class QPushButton;
17 class QIntValidator;
18 
19 #include "scribusapi.h"
20 #include "styleoptions.h"
21 
22 class QComboBox;
23 
24 class SCRIBUS_API PageSelector : public QWidget
25 {
26  Q_OBJECT
27 
28 public:
29  PageSelector( QWidget* parent, int maxPg = 0 );
30  ~PageSelector() {};
31 
32  virtual void changeEvent(QEvent *e);
33 
34  bool hasFocus();
35  void focusPolicy(Qt::FocusPolicy policy);
36  void setFont ( const QFont & );
37  int getCurrentPage();
38 
39 public slots:
40  virtual void setGUIForPage(int i);
41  virtual void setMaximum(int i);
42  void languageChange();
43  void clearFocus();
44 
45 private slots:
46  virtual void GotoPgE(int);
47  virtual void GotoPage();
48  virtual void goToStart();
49  virtual void goToEnd();
50  virtual void goBackward();
51  virtual void goForward();
52 
53 protected:
54  QPushButton* startButton;
55  QPushButton* backButton;
56  QPushButton* forwardButton;
57  QPushButton* lastButton;
58  QHBoxLayout *PageSelectorLayout;
59  QLabel *pageCountLabel;
60  QString PageCountString;
61  QComboBox *m_pageCombo;
62  QIntValidator *m_validator;
63  int m_lastPage;
64  int m_currentPage;
65 
66 signals:
67  void GotoPage(int);
68 
69 };
70 
71 #endif // PAGESELECTOR_H
Definition: pageselector.h:24