Diffstat (limited to 'core/pim/addressbook/addressbook.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 7cc61bf..b04e2cc 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h | |||
@@ -14,44 +14,46 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef Addressbook_H | 20 | #ifndef Addressbook_H |
21 | #define Addressbook_H | 21 | #define Addressbook_H |
22 | 22 | ||
23 | // Remove this for OPIE releae 1.0 ! | 23 | // Remove this for OPIE releae 1.0 ! |
24 | // #define __DEBUG_RELEASE | 24 | // #define __DEBUG_RELEASE |
25 | 25 | ||
26 | #include <qmainwindow.h> | 26 | #include <opie2/opimmainwindow.h> |
27 | |||
27 | #include <qvaluelist.h> | 28 | #include <qvaluelist.h> |
28 | #include <qstringlist.h> | 29 | #include <qstringlist.h> |
29 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
30 | #include "ofloatbar.h" | 31 | #include "ofloatbar.h" |
31 | #include "abview.h" | 32 | #include "abview.h" |
32 | #include "abconfig.h" | 33 | #include "abconfig.h" |
33 | 34 | ||
34 | class ContactEditor; | 35 | class ContactEditor; |
35 | class AbLabel; | 36 | class AbLabel; |
36 | class AbTable; | 37 | class AbTable; |
37 | class QToolBar; | 38 | class QToolBar; |
38 | class QPopupMenu; | 39 | class QPopupMenu; |
39 | class QToolButton; | 40 | class QToolButton; |
40 | class QDialog; | 41 | class QDialog; |
41 | class Ir; | 42 | class Ir; |
42 | class QAction; | 43 | class QAction; |
43 | class LetterPicker; | 44 | class LetterPicker; |
45 | class Opie::OPimRecord; | ||
44 | 46 | ||
45 | class AddressbookWindow: public QMainWindow | 47 | class AddressbookWindow: public Opie::OPimMainWindow |
46 | { | 48 | { |
47 | Q_OBJECT | 49 | Q_OBJECT |
48 | public: | 50 | public: |
49 | enum EntryMode { NewEntry=0, EditEntry }; | 51 | enum EntryMode { NewEntry=0, EditEntry }; |
50 | 52 | ||
51 | static QString appName() { return QString::fromLatin1("addressbook"); } | 53 | static QString appName() { return QString::fromLatin1("addressbook"); } |
52 | AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 54 | AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
53 | ~AddressbookWindow(); | 55 | ~AddressbookWindow(); |
54 | 56 | ||
55 | protected: | 57 | protected: |
56 | void resizeEvent( QResizeEvent * e ); | 58 | void resizeEvent( QResizeEvent * e ); |
57 | 59 | ||
@@ -60,78 +62,76 @@ protected: | |||
60 | void closeEvent( QCloseEvent *e ); | 62 | void closeEvent( QCloseEvent *e ); |
61 | bool save(); | 63 | bool save(); |
62 | 64 | ||
63 | public slots: | 65 | public slots: |
64 | void flush(); | 66 | void flush(); |
65 | void reload(); | 67 | void reload(); |
66 | void appMessage(const QCString &, const QByteArray &); | 68 | void appMessage(const QCString &, const QByteArray &); |
67 | void setDocument( const QString & ); // Called by obex receiver and internally! | 69 | void setDocument( const QString & ); // Called by obex receiver and internally! |
68 | #ifdef __DEBUG_RELEASE | 70 | #ifdef __DEBUG_RELEASE |
69 | // void slotSave(); | 71 | // void slotSave(); |
70 | #endif | 72 | #endif |
71 | 73 | ||
74 | protected slots: | ||
75 | int create(); | ||
76 | bool remove( int uid ); | ||
77 | void beam( int uid ); | ||
78 | void show( int uid ); | ||
79 | void edit( int uid ); | ||
80 | void add( const Opie::OPimRecord& ); | ||
81 | |||
72 | private slots: | 82 | private slots: |
83 | void slotItemNew(); | ||
84 | void slotItemEdit(); | ||
85 | void slotItemDuplicate(); | ||
86 | void slotItemDelete(); | ||
87 | void slotItemBeam(); | ||
88 | void slotItemFind(); | ||
89 | void slotConfigure(); | ||
90 | |||
73 | void importvCard(); | 91 | void importvCard(); |
74 | void exportvCard(); | 92 | void exportvCard(); |
75 | void slotListNew(); | ||
76 | /* void slotListView(); */ | ||
77 | void slotListDelete(); | ||
78 | void slotViewBack(); | 93 | void slotViewBack(); |
79 | void slotViewEdit(); | ||
80 | void slotPersonalView(); | 94 | void slotPersonalView(); |
81 | void listIsEmpty( bool ); | ||
82 | /* void slotSettings(); */ | ||
83 | void writeMail(); | 95 | void writeMail(); |
84 | void slotBeam(); | ||
85 | void beamDone( Ir * ); | 96 | void beamDone( Ir * ); |
86 | void slotSetCategory( int ); | 97 | void slotSetCategory( const QString &category ); |
87 | void slotSetLetter( char ); | 98 | void slotSetLetter( char ); |
88 | void slotUpdateToolbar(); | ||
89 | void slotSetFont(int); | 99 | void slotSetFont(int); |
90 | 100 | ||
91 | void slotFindOpen(); | 101 | void slotShowFind( bool show ); |
92 | void slotFindClose(); | ||
93 | void slotFind(); | 102 | void slotFind(); |
94 | void slotNotFound(); | 103 | void slotNotFound(); |
95 | void slotWrapAround(); | 104 | void slotWrapAround(); |
96 | 105 | ||
97 | void slotViewSwitched( int ); | 106 | void slotViewSwitched( int ); |
98 | void slotListView(); | 107 | void slotListView(); |
99 | void slotCardView(); | 108 | void slotCardView(); |
100 | 109 | ||
101 | void slotConfig(); | ||
102 | |||
103 | private: | 110 | private: |
104 | void populateCategories(); | ||
105 | |||
106 | QPopupMenu *catMenu; | ||
107 | QToolBar *listTools; | 111 | QToolBar *listTools; |
108 | QToolButton *deleteButton; | ||
109 | enum Panes { paneList=0, paneView, paneEdit }; | 112 | enum Panes { paneList=0, paneView, paneEdit }; |
110 | ContactEditor *abEditor; | 113 | ContactEditor *abEditor; |
111 | LetterPicker *pLabel; | 114 | LetterPicker *pLabel; |
112 | AbView* m_abView; | 115 | AbView* m_abView; |
113 | QWidget *listContainer; | 116 | QWidget *m_listContainer; |
114 | 117 | ||
115 | // Searching stuff | 118 | // Searching stuff |
116 | OFloatBar* searchBar; | 119 | OFloatBar* m_searchBar; |
117 | QLineEdit* searchEdit; | 120 | QLineEdit* m_searchEdit; |
118 | 121 | ||
119 | QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; | 122 | QAction *m_actionPersonal, *m_actionMail; |
120 | 123 | ||
121 | int viewMargin; | 124 | int viewMargin; |
122 | 125 | ||
123 | bool syncing; | 126 | bool syncing; |
124 | QFont *defaultFont; | 127 | QFont *defaultFont; |
125 | int m_curFontSize; | 128 | int m_curFontSize; |
126 | 129 | ||
127 | bool isLoading; | 130 | bool isLoading; |
128 | 131 | ||
129 | AbConfig m_config; | 132 | AbConfig m_config; |
130 | 133 | ||
131 | QAction* m_tableViewButton; | ||
132 | QAction* m_cardViewButton; | ||
133 | |||
134 | int active_view; | 134 | int active_view; |
135 | }; | 135 | }; |
136 | 136 | ||
137 | #endif | 137 | #endif |