Changeset View
Changeset View
Standalone View
Standalone View
libs/pageapp/widgets/KoPageNavigator.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | #ifndef KOPAGENAVIGATOR_H | 21 | #ifndef KOPAGENAVIGATOR_H | ||
22 | #define KOPAGENAVIGATOR_H | 22 | #define KOPAGENAVIGATOR_H | ||
23 | 23 | | |||
24 | // Qt | 24 | // Qt | ||
25 | #include <QStackedWidget> | 25 | #include <QStackedWidget> | ||
26 | 26 | | |||
27 | class KoPAView; | 27 | class KoPAView; | ||
28 | class KoPAPageBase; | ||||
28 | 29 | | |||
29 | 30 | | |||
30 | class KoPageNavigator : public QStackedWidget | 31 | class KoPageNavigator : public QStackedWidget | ||
31 | { | 32 | { | ||
32 | Q_OBJECT | 33 | Q_OBJECT | ||
33 | 34 | | |||
34 | enum State {Display = 0, Edit = 1}; | 35 | enum State {Display = 0, Edit = 1}; | ||
35 | 36 | | |||
36 | public: | 37 | public: | ||
37 | explicit KoPageNavigator(KoPAView *view); | 38 | explicit KoPageNavigator(KoPAView *view); | ||
38 | virtual ~KoPageNavigator(); | 39 | virtual ~KoPageNavigator(); | ||
39 | 40 | | |||
40 | void initActions(); | 41 | void initActions(); | ||
41 | 42 | | |||
42 | protected: | 43 | protected: | ||
43 | virtual void enterEvent(QEvent *event); | 44 | virtual void enterEvent(QEvent *event); | ||
44 | virtual void leaveEvent(QEvent *event); | 45 | virtual void leaveEvent(QEvent *event); | ||
45 | virtual bool eventFilter(QObject *watched, QEvent *event); | 46 | virtual bool eventFilter(QObject *watched, QEvent *event); | ||
46 | 47 | | |||
47 | private Q_SLOTS: | 48 | private Q_SLOTS: | ||
48 | void updateDisplayLabel(); | 49 | void updateDisplayLabel(); | ||
49 | void onPageNumberEntered(); | 50 | void onPageNumberEntered(); | ||
51 | void slotPageRemoved(KoPAPageBase *page, int index); | ||||
50 | 52 | | |||
51 | private: | 53 | private: | ||
52 | class Private; | 54 | class Private; | ||
53 | Private *const d; | 55 | Private *const d; | ||
54 | }; | 56 | }; | ||
55 | 57 | | |||
56 | #endif //KOPAGENAVIGATOR_H | 58 | #endif //KOPAGENAVIGATOR_H |