Diffstat (limited to 'core/pim/addressbook/addressbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/addressbook.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 8027ccf..4c1e2f2 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h | |||
@@ -23,114 +23,115 @@ | |||
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 <qmainwindow.h> |
27 | #include <qvaluelist.h> | 27 | #include <qvaluelist.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <qlineedit.h> | 29 | #include <qlineedit.h> |
30 | #include "ofloatbar.h" | 30 | #include "ofloatbar.h" |
31 | #include "abview.h" | ||
32 | #include "abconfig.h" | ||
31 | 33 | ||
32 | class ContactEditor; | 34 | class ContactEditor; |
33 | class AbLabel; | 35 | class AbLabel; |
34 | class AbTable; | 36 | class AbTable; |
35 | class QPEToolBar; | 37 | class QPEToolBar; |
36 | class QPopupMenu; | 38 | class QPopupMenu; |
37 | class QToolButton; | 39 | class QToolButton; |
38 | class QDialog; | 40 | class QDialog; |
39 | class Ir; | 41 | class Ir; |
40 | class QAction; | 42 | class QAction; |
41 | class LetterPicker; | 43 | class LetterPicker; |
42 | 44 | ||
43 | class AddressbookWindow: public QMainWindow | 45 | class AddressbookWindow: public QMainWindow |
44 | { | 46 | { |
45 | Q_OBJECT | 47 | Q_OBJECT |
46 | public: | 48 | public: |
49 | enum EntryMode { NewEntry=0, EditEntry }; | ||
50 | |||
47 | AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 51 | AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
48 | ~AddressbookWindow(); | 52 | ~AddressbookWindow(); |
49 | 53 | ||
50 | protected: | 54 | protected: |
51 | void resizeEvent( QResizeEvent * e ); | 55 | void resizeEvent( QResizeEvent * e ); |
52 | void showList(); | 56 | |
53 | void showView(); | ||
54 | enum EntryMode { NewEntry=0, EditEntry }; | ||
55 | void editPersonal(); | 57 | void editPersonal(); |
56 | void editEntry( EntryMode ); | 58 | void editEntry( EntryMode ); |
57 | void closeEvent( QCloseEvent *e ); | 59 | void closeEvent( QCloseEvent *e ); |
58 | bool save(); | 60 | bool save(); |
59 | 61 | ||
60 | public slots: | 62 | public slots: |
61 | void flush(); | 63 | void flush(); |
62 | void reload(); | 64 | void reload(); |
63 | void appMessage(const QCString &, const QByteArray &); | 65 | void appMessage(const QCString &, const QByteArray &); |
64 | void setDocument( const QString & ); | 66 | void setDocument( const QString & ); |
65 | void slotFindNext(); | ||
66 | void slotFindPrevious(); | ||
67 | #ifdef __DEBUG_RELEASE | 67 | #ifdef __DEBUG_RELEASE |
68 | void slotSave(); | 68 | void slotSave(); |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | private slots: | 71 | private slots: |
72 | void importvCard(); | 72 | void importvCard(); |
73 | void slotListNew(); | 73 | void slotListNew(); |
74 | void slotListView(); | 74 | /* void slotListView(); */ |
75 | void slotListDelete(); | 75 | void slotListDelete(); |
76 | void slotViewBack(); | 76 | void slotViewBack(); |
77 | void slotViewEdit(); | 77 | void slotViewEdit(); |
78 | void slotPersonalView(); | 78 | void slotPersonalView(); |
79 | void listIsEmpty( bool ); | 79 | void listIsEmpty( bool ); |
80 | void slotSettings(); | 80 | /* void slotSettings(); */ |
81 | void writeMail(); | 81 | void writeMail(); |
82 | void slotBeam(); | 82 | void slotBeam(); |
83 | void beamDone( Ir * ); | 83 | void beamDone( Ir * ); |
84 | void slotSetCategory( int ); | 84 | void slotSetCategory( int ); |
85 | void slotSetLetter( char ); | 85 | void slotSetLetter( char ); |
86 | void slotUpdateToolbar(); | 86 | void slotUpdateToolbar(); |
87 | void slotSetFont(int); | 87 | void slotSetFont(int); |
88 | 88 | ||
89 | void slotFindOpen(); | 89 | void slotFindOpen(); |
90 | void slotFindClose(); | 90 | void slotFindClose(); |
91 | void slotFind(); | 91 | void slotFind(); |
92 | void slotNotFound(); | 92 | void slotNotFound(); |
93 | void slotWrapAround(); | 93 | void slotWrapAround(); |
94 | 94 | ||
95 | void slotViewSwitched( int ); | ||
96 | void slotListView(); | ||
97 | void slotCardView(); | ||
98 | |||
95 | void slotConfig(); | 99 | void slotConfig(); |
96 | 100 | ||
97 | private: | 101 | private: |
98 | void initFields(); // inititialize our fields... | 102 | //void initFields(); // inititialize our fields... |
99 | AbLabel *abView(); | 103 | // AbLabel *abView(); |
100 | void populateCategories(); | 104 | void populateCategories(); |
101 | 105 | ||
102 | QPopupMenu *catMenu, *fontMenu; | 106 | QPopupMenu *catMenu; |
103 | QPEToolBar *listTools; | 107 | QPEToolBar *listTools; |
104 | QToolButton *deleteButton; | 108 | QToolButton *deleteButton; |
105 | QValueList<int> allFields, orderedFields; | 109 | //QValueList<int> allFields, orderedFields; |
106 | QStringList slOrderedFields; | 110 | //QStringList slOrderedFields; |
107 | enum Panes { paneList=0, paneView, paneEdit }; | 111 | enum Panes { paneList=0, paneView, paneEdit }; |
108 | ContactEditor *abEditor; | 112 | ContactEditor *abEditor; |
109 | AbLabel *mView; | ||
110 | LetterPicker *pLabel; | 113 | LetterPicker *pLabel; |
111 | AbTable *abList; | 114 | AbView* m_abView; |
112 | QWidget *listContainer; | 115 | QWidget *listContainer; |
113 | 116 | ||
114 | // Searching stuff | 117 | // Searching stuff |
115 | OFloatBar* searchBar; | 118 | OFloatBar* searchBar; |
116 | QLineEdit* searchEdit; | 119 | QLineEdit* searchEdit; |
117 | bool useRegExp; | ||
118 | bool doNotifyWrapAround; | ||
119 | bool caseSensitive; | ||
120 | |||
121 | bool m_useQtMail; | ||
122 | bool m_useOpieMail; | ||
123 | 120 | ||
124 | QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; | 121 | QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; |
125 | 122 | ||
126 | bool bAbEditFirstTime; | ||
127 | int viewMargin; | 123 | int viewMargin; |
128 | 124 | ||
129 | bool syncing; | 125 | bool syncing; |
130 | QFont *defaultFont; | 126 | QFont *defaultFont; |
131 | int startFontSize; | 127 | int m_curFontSize; |
132 | 128 | ||
133 | bool isLoading; | 129 | bool isLoading; |
130 | |||
131 | AbConfig m_config; | ||
132 | |||
133 | QAction* m_tableViewButton; | ||
134 | QAction* m_cardViewButton; | ||
134 | }; | 135 | }; |
135 | 136 | ||
136 | #endif | 137 | #endif |