Diffstat (limited to 'core/pim/datebook2/mainwindow.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook2/mainwindow.h | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/core/pim/datebook2/mainwindow.h b/core/pim/datebook2/mainwindow.h index 5ea0c89..60ea4c4 100644 --- a/core/pim/datebook2/mainwindow.h +++ b/core/pim/datebook2/mainwindow.h | |||
@@ -2,40 +2,98 @@ | |||
2 | #define DATE_BOOK_MAIN_WINDOW_H | 2 | #define DATE_BOOK_MAIN_WINDOW_H |
3 | 3 | ||
4 | #include <qlist.h> | 4 | #include <qlist.h> |
5 | 5 | ||
6 | #include <opie/opimmainwindow.h> | 6 | #include <opie/opimmainwindow.h> |
7 | 7 | ||
8 | #include "descriptionmanager.h" | ||
9 | #include "locationmanager.h" | ||
10 | #include "view.h" | ||
11 | |||
12 | class QAction; | ||
13 | class QWidgetStack; | ||
14 | class QPopupMenu; | ||
15 | class QPEToolBar; | ||
8 | namespace Datebook { | 16 | namespace Datebook { |
9 | 17 | ||
18 | class TemplateManager; | ||
19 | class BookManager; | ||
20 | class Show; | ||
10 | class MainWindow : public OPimMainWindow { | 21 | class MainWindow : public OPimMainWindow { |
11 | Q_OBJECT | 22 | Q_OBJECT |
23 | friend class Show; // to avoid QObject | ||
24 | friend class View; // to avoid QObject | ||
12 | public: | 25 | public: |
13 | MainWindow(); | 26 | MainWindow(); |
14 | ~MainWindow(); | 27 | ~MainWindow(); |
15 | 28 | ||
16 | private slots: | 29 | private slots: |
17 | void initUI(); // init the UI | 30 | void initUI(); // init the UI |
18 | void initConfig(); // apply the config | 31 | void initConfig(); // apply the config |
19 | void initView(); // init the Views.. | 32 | void initView(); // init the Views.. |
20 | void initManagers(); // init the Managers including templates, location and description | 33 | void initManagers(); // init the Managers including templates, location and description |
21 | void raiseCurrentView(); // raise the current View | 34 | void raiseCurrentView(); // raise the current View |
35 | void slotGoToNow(); // will switch the currentView to the curren date time | ||
36 | void slotFind(); // find!!! | ||
37 | void slotConfigure(); // configure the app | ||
38 | void slotClockChanged(bool); // clock changed | ||
39 | void slotWeekChanged( bool ); // week changed | ||
40 | void slotAppMessage( const QCString&, const QByteArray& ); // qApp message QPE/Application/datebook | ||
41 | void slotReceive( const QCString&, const QByteArray& ); // QPE/System and QPE/Datebook | ||
42 | void slotAction( QAction* ); // View changed | ||
43 | void slotConfigureLocs(); // Configure the Locations | ||
44 | void slotConfigureDesc(); // Configure the Desc | ||
45 | |||
22 | 46 | ||
23 | protected slots: | 47 | protected slots: |
24 | void populate(); | 48 | void populate(); |
25 | void doSetDocument( const QString& str ); | 49 | void doSetDocument( const QString& str ); |
26 | void flush(); | 50 | void flush(); |
27 | void reload(); | 51 | void reload(); |
28 | int create(); | 52 | int create(); |
29 | bool remove( int uid ); | 53 | bool remove( int uid ); |
30 | void beam( int uid ); | 54 | void beam( int uid ); |
31 | void show( int uid ); | 55 | void show( int uid ); |
32 | void edit( int uid ); | 56 | void edit( int uid ); |
57 | void edit(); | ||
33 | void add( const OPimRecord& ); | 58 | void add( const OPimRecord& ); |
34 | 59 | ||
35 | private: | 60 | private: |
36 | QList<View> m_view; // the Views.. not autoDelete | 61 | QPEToolBar* toolbar(); |
62 | QPopupMenu* viewMenu(); | ||
63 | QPopupMenu* settingsMenu(); | ||
64 | QPopupMenu* templateMenu(); | ||
65 | View* currentView(); | ||
66 | BookManager* manager(); | ||
67 | TemplateManager* templateManager(); | ||
68 | LocationManager* locationManager(); | ||
69 | DescriptionManager* descriptionManager(); | ||
70 | Show* eventShow(); | ||
71 | |||
72 | private: // friend functions for Show | ||
73 | void hideShow(); // to hide the view | ||
74 | // off friend Show | ||
37 | 75 | ||
76 | // friend of the view | ||
77 | private: | ||
78 | void viewPopup( int ); | ||
79 | void viewAdd( const QDate& date ); | ||
80 | void viewAdd( const QDateTime&, const QDateTime& ); | ||
81 | bool viewAP()const; | ||
82 | bool viewStartMonday()const; | ||
83 | // off view show | ||
84 | private: | ||
85 | QList<View> m_view; // the Views.. not autoDelete | ||
86 | QWidgetStack* m_stack; | ||
87 | QPEToolBar *m_toolBar; | ||
88 | QPopupMenu* m_popView; | ||
89 | QPopupMenu* m_popSetting; | ||
90 | QPopupMenu* m_popTemplate; | ||
91 | BookManager* m_manager; | ||
92 | TemplateManager* m_tempMan; | ||
93 | DescriptionManager* m_descMan; | ||
94 | LocationManager* m_locMan; | ||
95 | Show* m_show; | ||
38 | }; | 96 | }; |
39 | } | 97 | } |
40 | 98 | ||
41 | #endif | 99 | #endif |