-rw-r--r-- | core/pim/addressbook/abconfig.cpp | 14 | ||||
-rw-r--r-- | core/pim/addressbook/abconfig.h | 3 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 32 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 5 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg_base.ui | 61 | ||||
-rw-r--r-- | core/pim/addressbook/version.h | 2 |
6 files changed, 101 insertions, 16 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp index e58fa76..0b61614 100644 --- a/core/pim/addressbook/abconfig.cpp +++ b/core/pim/addressbook/abconfig.cpp | |||
@@ -1,184 +1,198 @@ | |||
1 | #include "abconfig.h" | 1 | #include "abconfig.h" |
2 | #include "version.h" | 2 | #include "version.h" |
3 | 3 | ||
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | #include <qpe/recordfields.h> | 5 | #include <qpe/recordfields.h> |
6 | 6 | ||
7 | AbConfig::AbConfig( ): | 7 | AbConfig::AbConfig( ): |
8 | m_useQtMail( true ), | 8 | m_useQtMail( true ), |
9 | m_useOpieMail( false ), | 9 | m_useOpieMail( false ), |
10 | m_useRegExp( false ), | 10 | m_useRegExp( false ), |
11 | m_beCaseSensitive( false ), | 11 | m_beCaseSensitive( false ), |
12 | m_fontSize( 1 ), | 12 | m_fontSize( 1 ), |
13 | m_barPos( QMainWindow::Top ), | 13 | m_barPos( QMainWindow::Top ), |
14 | m_fixedBars( true ), | ||
14 | m_changed( false ) | 15 | m_changed( false ) |
15 | { | 16 | { |
16 | } | 17 | } |
17 | 18 | ||
18 | AbConfig::~AbConfig() | 19 | AbConfig::~AbConfig() |
19 | { | 20 | { |
20 | } | 21 | } |
21 | 22 | ||
22 | bool AbConfig::useRegExp() const | 23 | bool AbConfig::useRegExp() const |
23 | { | 24 | { |
24 | return m_useRegExp; | 25 | return m_useRegExp; |
25 | } | 26 | } |
26 | bool AbConfig::useWildCards() const | 27 | bool AbConfig::useWildCards() const |
27 | { | 28 | { |
28 | return !m_useRegExp; | 29 | return !m_useRegExp; |
29 | } | 30 | } |
30 | bool AbConfig::useQtMail() const | 31 | bool AbConfig::useQtMail() const |
31 | { | 32 | { |
32 | return m_useQtMail; | 33 | return m_useQtMail; |
33 | } | 34 | } |
34 | bool AbConfig::useOpieMail() const | 35 | bool AbConfig::useOpieMail() const |
35 | { | 36 | { |
36 | return m_useOpieMail; | 37 | return m_useOpieMail; |
37 | } | 38 | } |
38 | bool AbConfig::beCaseSensitive() const | 39 | bool AbConfig::beCaseSensitive() const |
39 | { | 40 | { |
40 | return m_beCaseSensitive; | 41 | return m_beCaseSensitive; |
41 | } | 42 | } |
42 | int AbConfig::fontSize() const | 43 | int AbConfig::fontSize() const |
43 | { | 44 | { |
44 | return m_fontSize; | 45 | return m_fontSize; |
45 | } | 46 | } |
46 | 47 | ||
47 | QValueList<int> AbConfig::orderList() const | 48 | QValueList<int> AbConfig::orderList() const |
48 | { | 49 | { |
49 | return m_ordered; | 50 | return m_ordered; |
50 | } | 51 | } |
51 | 52 | ||
52 | QMainWindow::ToolBarDock AbConfig::getToolBarPos() const | 53 | QMainWindow::ToolBarDock AbConfig::getToolBarPos() const |
53 | { | 54 | { |
54 | return (QMainWindow::ToolBarDock) m_barPos; | 55 | return (QMainWindow::ToolBarDock) m_barPos; |
55 | } | 56 | } |
56 | 57 | ||
58 | bool AbConfig::fixedBars() const | ||
59 | { | ||
60 | return m_fixedBars; | ||
61 | } | ||
57 | 62 | ||
58 | void AbConfig::setUseRegExp( bool v ) | 63 | void AbConfig::setUseRegExp( bool v ) |
59 | { | 64 | { |
60 | m_useRegExp = v ; | 65 | m_useRegExp = v ; |
61 | m_changed = true; | 66 | m_changed = true; |
62 | } | 67 | } |
63 | void AbConfig::setUseWildCards( bool v ) | 68 | void AbConfig::setUseWildCards( bool v ) |
64 | { | 69 | { |
65 | m_useRegExp = !v; | 70 | m_useRegExp = !v; |
66 | m_changed = true; | 71 | m_changed = true; |
67 | } | 72 | } |
68 | void AbConfig::setBeCaseSensitive( bool v ) | 73 | void AbConfig::setBeCaseSensitive( bool v ) |
69 | { | 74 | { |
70 | m_beCaseSensitive = v; | 75 | m_beCaseSensitive = v; |
71 | m_changed = true; | 76 | m_changed = true; |
72 | } | 77 | } |
73 | void AbConfig::setUseQtMail( bool v ) | 78 | void AbConfig::setUseQtMail( bool v ) |
74 | { | 79 | { |
75 | m_useQtMail = v; | 80 | m_useQtMail = v; |
76 | m_changed = true; | 81 | m_changed = true; |
77 | } | 82 | } |
78 | void AbConfig::setUseOpieMail( bool v ) | 83 | void AbConfig::setUseOpieMail( bool v ) |
79 | { | 84 | { |
80 | m_useOpieMail = v; | 85 | m_useOpieMail = v; |
81 | m_changed = true; | 86 | m_changed = true; |
82 | } | 87 | } |
83 | void AbConfig::setFontSize( int v ) | 88 | void AbConfig::setFontSize( int v ) |
84 | { | 89 | { |
85 | m_fontSize = v; | 90 | m_fontSize = v; |
86 | m_changed = true; | 91 | m_changed = true; |
87 | } | 92 | } |
88 | 93 | ||
89 | void AbConfig::setOrderList( const QValueList<int>& list ) | 94 | void AbConfig::setOrderList( const QValueList<int>& list ) |
90 | { | 95 | { |
91 | m_ordered = list; | 96 | m_ordered = list; |
92 | m_changed = true; | 97 | m_changed = true; |
93 | } | 98 | } |
94 | 99 | ||
95 | void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) | 100 | void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) |
96 | { | 101 | { |
97 | m_barPos = v; | 102 | m_barPos = v; |
98 | m_changed = true; | 103 | m_changed = true; |
99 | } | 104 | } |
100 | 105 | ||
106 | void AbConfig::setFixedBars( const bool fixed ) | ||
107 | { | ||
108 | m_fixedBars = fixed; | ||
109 | m_changed = true; | ||
110 | } | ||
111 | |||
101 | void AbConfig::load() | 112 | void AbConfig::load() |
102 | { | 113 | { |
103 | // Read Config settings | 114 | // Read Config settings |
104 | Config cfg("AddressBook"); | 115 | Config cfg("AddressBook"); |
105 | 116 | ||
106 | cfg.setGroup("Font"); | 117 | cfg.setGroup("Font"); |
107 | m_fontSize = cfg.readNumEntry( "fontSize", 1 ); | 118 | m_fontSize = cfg.readNumEntry( "fontSize", 1 ); |
108 | 119 | ||
109 | cfg.setGroup("Search"); | 120 | cfg.setGroup("Search"); |
110 | m_useRegExp = cfg.readBoolEntry( "useRegExp" ); | 121 | m_useRegExp = cfg.readBoolEntry( "useRegExp" ); |
111 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" ); | 122 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" ); |
112 | 123 | ||
113 | cfg.setGroup("Mail"); | 124 | cfg.setGroup("Mail"); |
114 | m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); | 125 | m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); |
115 | m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); | 126 | m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); |
116 | 127 | ||
117 | cfg.setGroup("ContactOrder"); | 128 | cfg.setGroup("ContactOrder"); |
118 | int ID = 0; | 129 | int ID = 0; |
119 | int i = 0; | 130 | int i = 0; |
120 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); | 131 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); |
121 | while ( ID != 0 ){ | 132 | while ( ID != 0 ){ |
122 | m_ordered.append( ID ); | 133 | m_ordered.append( ID ); |
123 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); | 134 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); |
124 | } | 135 | } |
125 | 136 | ||
126 | // If no contact order is defined, we set the default | 137 | // If no contact order is defined, we set the default |
127 | if ( m_ordered.count() == 0 ) { | 138 | if ( m_ordered.count() == 0 ) { |
128 | m_ordered.append( Qtopia::DefaultEmail ); | 139 | m_ordered.append( Qtopia::DefaultEmail ); |
129 | m_ordered.append( Qtopia::HomePhone); | 140 | m_ordered.append( Qtopia::HomePhone); |
130 | m_ordered.append( Qtopia::HomeMobile); | 141 | m_ordered.append( Qtopia::HomeMobile); |
131 | m_ordered.append( Qtopia::BusinessPhone); | 142 | m_ordered.append( Qtopia::BusinessPhone); |
132 | } | 143 | } |
133 | 144 | ||
134 | cfg.setGroup("ToolBar"); | 145 | cfg.setGroup("ToolBar"); |
135 | m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); | 146 | m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); |
147 | m_fixedBars= cfg.readBoolEntry( "fixedBars", true ); | ||
136 | 148 | ||
137 | m_changed = false; | 149 | m_changed = false; |
138 | } | 150 | } |
139 | 151 | ||
140 | void AbConfig::save() | 152 | void AbConfig::save() |
141 | { | 153 | { |
142 | if ( m_changed ){ | 154 | if ( m_changed ){ |
143 | Config cfg("AddressBook"); | 155 | Config cfg("AddressBook"); |
144 | cfg.setGroup("Font"); | 156 | cfg.setGroup("Font"); |
145 | cfg.writeEntry("fontSize", m_fontSize); | 157 | cfg.writeEntry("fontSize", m_fontSize); |
146 | 158 | ||
147 | cfg.setGroup("Search"); | 159 | cfg.setGroup("Search"); |
148 | cfg.writeEntry("useRegExp", m_useRegExp); | 160 | cfg.writeEntry("useRegExp", m_useRegExp); |
149 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); | 161 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); |
150 | 162 | ||
151 | cfg.setGroup("Mail"); | 163 | cfg.setGroup("Mail"); |
152 | cfg.writeEntry( "useQtMail", m_useQtMail ); | 164 | cfg.writeEntry( "useQtMail", m_useQtMail ); |
153 | cfg.writeEntry( "useOpieMail", m_useOpieMail); | 165 | cfg.writeEntry( "useOpieMail", m_useOpieMail); |
154 | 166 | ||
155 | cfg.setGroup("ContactOrder"); | 167 | cfg.setGroup("ContactOrder"); |
156 | cfg.clearGroup(); | 168 | cfg.clearGroup(); |
157 | for ( uint i = 0; i < m_ordered.count(); i++ ){ | 169 | for ( uint i = 0; i < m_ordered.count(); i++ ){ |
158 | cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] ); | 170 | cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] ); |
159 | } | 171 | } |
160 | 172 | ||
161 | cfg.setGroup("ToolBar"); | 173 | cfg.setGroup("ToolBar"); |
162 | cfg.writeEntry( "Position", m_barPos ); | 174 | cfg.writeEntry( "Position", m_barPos ); |
175 | cfg.writeEntry( "fixedBars", m_fixedBars ); | ||
163 | 176 | ||
164 | cfg.setGroup("Version"); | 177 | cfg.setGroup("Version"); |
165 | cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION); | 178 | cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION); |
166 | cfg.writeEntry( "Mainversion", MAINVERSION ); | 179 | cfg.writeEntry( "Mainversion", MAINVERSION ); |
167 | cfg.writeEntry( "SubVersion", SUBVERSION ); | 180 | cfg.writeEntry( "SubVersion", SUBVERSION ); |
168 | cfg.writeEntry( "PatchVersion", PATCHVERSION ); | 181 | cfg.writeEntry( "PatchVersion", PATCHVERSION ); |
169 | 182 | ||
170 | } | 183 | } |
171 | 184 | ||
172 | } | 185 | } |
173 | 186 | ||
174 | void AbConfig::operator= ( const AbConfig& cnf ) | 187 | void AbConfig::operator= ( const AbConfig& cnf ) |
175 | { | 188 | { |
176 | m_useQtMail = cnf.m_useQtMail; | 189 | m_useQtMail = cnf.m_useQtMail; |
177 | m_useOpieMail = cnf.m_useOpieMail; | 190 | m_useOpieMail = cnf.m_useOpieMail; |
178 | m_useRegExp = cnf.m_useRegExp; | 191 | m_useRegExp = cnf.m_useRegExp; |
179 | m_beCaseSensitive = cnf.m_beCaseSensitive; | 192 | m_beCaseSensitive = cnf.m_beCaseSensitive; |
180 | m_fontSize = cnf.m_fontSize; | 193 | m_fontSize = cnf.m_fontSize; |
181 | m_ordered = cnf.m_ordered; | 194 | m_ordered = cnf.m_ordered; |
182 | m_barPos = cnf.m_barPos; | 195 | m_barPos = cnf.m_barPos; |
196 | m_fixedBars = cnf.m_fixedBars; | ||
183 | } | 197 | } |
184 | 198 | ||
diff --git a/core/pim/addressbook/abconfig.h b/core/pim/addressbook/abconfig.h index b8460d7..ce51b4c 100644 --- a/core/pim/addressbook/abconfig.h +++ b/core/pim/addressbook/abconfig.h | |||
@@ -1,55 +1,58 @@ | |||
1 | #ifndef _ABCONFIG_H_ | 1 | #ifndef _ABCONFIG_H_ |
2 | #define _ABCONFIG_H_ | 2 | #define _ABCONFIG_H_ |
3 | 3 | ||
4 | #include <qstringlist.h> | 4 | #include <qstringlist.h> |
5 | #include <qmainwindow.h> | 5 | #include <qmainwindow.h> |
6 | 6 | ||
7 | class AbConfig | 7 | class AbConfig |
8 | { | 8 | { |
9 | public: | 9 | public: |
10 | AbConfig(); | 10 | AbConfig(); |
11 | ~AbConfig(); | 11 | ~AbConfig(); |
12 | 12 | ||
13 | // Search Settings | 13 | // Search Settings |
14 | bool useRegExp() const; | 14 | bool useRegExp() const; |
15 | bool useWildCards() const; | 15 | bool useWildCards() const; |
16 | bool beCaseSensitive() const; | 16 | bool beCaseSensitive() const; |
17 | bool useQtMail() const; | 17 | bool useQtMail() const; |
18 | bool useOpieMail() const; | 18 | bool useOpieMail() const; |
19 | int fontSize() const; | 19 | int fontSize() const; |
20 | QValueList<int> orderList() const; | 20 | QValueList<int> orderList() const; |
21 | QMainWindow::ToolBarDock getToolBarPos() const; | 21 | QMainWindow::ToolBarDock getToolBarPos() const; |
22 | bool fixedBars() const; | ||
22 | 23 | ||
23 | void setUseRegExp( bool v ); | 24 | void setUseRegExp( bool v ); |
24 | void setUseWildCards( bool v ); | 25 | void setUseWildCards( bool v ); |
25 | void setBeCaseSensitive( bool v ); | 26 | void setBeCaseSensitive( bool v ); |
26 | void setUseQtMail( bool v ); | 27 | void setUseQtMail( bool v ); |
27 | void setUseOpieMail( bool v ); | 28 | void setUseOpieMail( bool v ); |
28 | void setFontSize( int v ); | 29 | void setFontSize( int v ); |
29 | void setOrderList( const QValueList<int>& list ); | 30 | void setOrderList( const QValueList<int>& list ); |
30 | void setToolBarDock( const QMainWindow::ToolBarDock v ); | 31 | void setToolBarDock( const QMainWindow::ToolBarDock v ); |
32 | void setFixedBars( const bool fixed ); | ||
31 | 33 | ||
32 | void operator= ( const AbConfig& cnf ); | 34 | void operator= ( const AbConfig& cnf ); |
33 | 35 | ||
34 | void load(); | 36 | void load(); |
35 | void save(); | 37 | void save(); |
36 | 38 | ||
37 | protected: | 39 | protected: |
38 | /* virtual void itemUp(); */ | 40 | /* virtual void itemUp(); */ |
39 | /* virtual void itemDown(); */ | 41 | /* virtual void itemDown(); */ |
40 | 42 | ||
41 | QStringList contFields; | 43 | QStringList contFields; |
42 | 44 | ||
43 | bool m_useQtMail; | 45 | bool m_useQtMail; |
44 | bool m_useOpieMail; | 46 | bool m_useOpieMail; |
45 | bool m_useRegExp; | 47 | bool m_useRegExp; |
46 | bool m_beCaseSensitive; | 48 | bool m_beCaseSensitive; |
47 | int m_fontSize; | 49 | int m_fontSize; |
48 | QValueList<int> m_ordered; | 50 | QValueList<int> m_ordered; |
49 | int m_barPos; | 51 | int m_barPos; |
52 | bool m_fixedBars; | ||
50 | 53 | ||
51 | bool m_changed; | 54 | bool m_changed; |
52 | }; | 55 | }; |
53 | 56 | ||
54 | 57 | ||
55 | #endif | 58 | #endif |
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 14e5b3f..a5bf19b 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -1,1006 +1,1012 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qt Palmtop Environment. | 4 | ** This file is part of Qt Palmtop Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
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 | ** OContact info@trolltech.com if any conditions of this licensing are | 16 | ** OContact 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 | 20 | ||
21 | #define QTOPIA_INTERNAL_FD | 21 | #define QTOPIA_INTERNAL_FD |
22 | 22 | ||
23 | #include "contacteditor.h" | 23 | #include "contacteditor.h" |
24 | #include "ablabel.h" | 24 | #include "ablabel.h" |
25 | #include "abview.h" | 25 | #include "abview.h" |
26 | #include "abtable.h" | 26 | #include "abtable.h" |
27 | // #include "addresssettings.h" | 27 | // #include "addresssettings.h" |
28 | #include "addressbook.h" | 28 | #include "addressbook.h" |
29 | 29 | ||
30 | 30 | ||
31 | #include <opie/ofileselector.h> | 31 | #include <opie/ofileselector.h> |
32 | #include <opie/ofiledialog.h> | 32 | #include <opie/ofiledialog.h> |
33 | #include <opie/ocontact.h> | 33 | #include <opie/ocontact.h> |
34 | #include <opie/ocontactaccessbackend_vcard.h> | 34 | #include <opie/ocontactaccessbackend_vcard.h> |
35 | 35 | ||
36 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
37 | #include <qpe/ir.h> | 37 | #include <qpe/ir.h> |
38 | #include <qpe/qpemessagebox.h> | 38 | #include <qpe/qpemessagebox.h> |
39 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
40 | #include <qpe/qpetoolbar.h> | 40 | #include <qpe/qpetoolbar.h> |
41 | #include <qpe/qpemenubar.h> | 41 | #include <qpe/qpemenubar.h> |
42 | // #include <qtoolbar.h> | 42 | // #include <qtoolbar.h> |
43 | // #include <qmenubar.h> | 43 | // #include <qmenubar.h> |
44 | #include <qpe/qpeapplication.h> | 44 | #include <qpe/qpeapplication.h> |
45 | #include <qpe/config.h> | 45 | #include <qpe/config.h> |
46 | 46 | ||
47 | #include <qaction.h> | 47 | #include <qaction.h> |
48 | #include <qdialog.h> | 48 | #include <qdialog.h> |
49 | #include <qdir.h> | 49 | #include <qdir.h> |
50 | #include <qfile.h> | 50 | #include <qfile.h> |
51 | #include <qimage.h> | 51 | #include <qimage.h> |
52 | #include <qlayout.h> | 52 | #include <qlayout.h> |
53 | #include <qmessagebox.h> | 53 | #include <qmessagebox.h> |
54 | #include <qpixmap.h> | 54 | #include <qpixmap.h> |
55 | #include <qpopupmenu.h> | 55 | #include <qpopupmenu.h> |
56 | #include <qstringlist.h> | 56 | #include <qstringlist.h> |
57 | #include <qtoolbutton.h> | 57 | #include <qtoolbutton.h> |
58 | #include <qwhatsthis.h> | 58 | #include <qwhatsthis.h> |
59 | #include <qdatetime.h> | 59 | #include <qdatetime.h> |
60 | 60 | ||
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | #include <sys/stat.h> | 62 | #include <sys/stat.h> |
63 | #include <sys/types.h> | 63 | #include <sys/types.h> |
64 | #include <fcntl.h> | 64 | #include <fcntl.h> |
65 | #include <unistd.h> | 65 | #include <unistd.h> |
66 | 66 | ||
67 | 67 | ||
68 | #include "picker.h" | 68 | #include "picker.h" |
69 | #include "configdlg.h" | 69 | #include "configdlg.h" |
70 | 70 | ||
71 | extern QString addressbookPersonalVCardName(); | 71 | extern QString addressbookPersonalVCardName(); |
72 | 72 | ||
73 | AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | 73 | AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, |
74 | WFlags f ) | 74 | WFlags f ) |
75 | : QMainWindow( parent, name, f ), | 75 | : QMainWindow( parent, name, f ), |
76 | catMenu (0l), | 76 | catMenu (0l), |
77 | abEditor(0l), | 77 | abEditor(0l), |
78 | syncing(FALSE), | 78 | syncing(FALSE), |
79 | m_tableViewButton(0l), | 79 | m_tableViewButton(0l), |
80 | m_cardViewButton(0l) | 80 | m_cardViewButton(0l) |
81 | { | 81 | { |
82 | isLoading = true; | 82 | isLoading = true; |
83 | 83 | ||
84 | m_config.load(); | 84 | m_config.load(); |
85 | 85 | ||
86 | setCaption( tr("Contacts") ); | 86 | setCaption( tr("Contacts") ); |
87 | setIcon( Resource::loadPixmap( "AddressBook" ) ); | 87 | setIcon( Resource::loadPixmap( "AddressBook" ) ); |
88 | 88 | ||
89 | // Settings for Main Menu | 89 | // Settings for Main Menu |
90 | setToolBarsMovable( true ); | 90 | // setToolBarsMovable( false ); |
91 | setToolBarsMovable( !m_config.fixedBars() ); | ||
91 | setRightJustification( true ); | 92 | setRightJustification( true ); |
92 | 93 | ||
93 | // Create Toolbar | 94 | QPEToolBar *bar = new QPEToolBar( this ); |
94 | listTools = new QPEToolBar( this, "list operations" ); | 95 | bar->setHorizontalStretchable( TRUE ); |
95 | listTools->setHorizontalStretchable( true ); | ||
96 | addToolBar( listTools ); | ||
97 | moveToolBar( listTools, m_config.getToolBarPos() ); | ||
98 | 96 | ||
99 | QPEMenuBar *mbList = new QPEMenuBar( this ); | 97 | QPEMenuBar *mbList = new QPEMenuBar( bar ); |
100 | mbList->setMargin( 0 ); | 98 | mbList->setMargin( 0 ); |
101 | 99 | ||
102 | QPopupMenu *edit = new QPopupMenu( mbList ); | 100 | QPopupMenu *edit = new QPopupMenu( mbList ); |
103 | mbList->insertItem( tr( "Contact" ), edit ); | 101 | mbList->insertItem( tr( "Contact" ), edit ); |
104 | 102 | ||
103 | // Category Menu | ||
104 | catMenu = new QPopupMenu( this ); | ||
105 | catMenu->setCheckable( TRUE ); | ||
106 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); | ||
107 | mbList->insertItem( tr("View"), catMenu ); | ||
108 | |||
109 | // Create Toolbar | ||
110 | listTools = new QPEToolBar( this, "list operations" ); | ||
111 | listTools->setHorizontalStretchable( true ); | ||
112 | addToolBar( listTools ); | ||
113 | moveToolBar( listTools, m_config.getToolBarPos() ); | ||
105 | 114 | ||
106 | // View Icons | 115 | // View Icons |
107 | m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), | 116 | m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), |
108 | QString::null, 0, this, 0 ); | 117 | QString::null, 0, this, 0 ); |
109 | connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); | 118 | connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); |
110 | m_tableViewButton->setToggleAction( true ); | 119 | m_tableViewButton->setToggleAction( true ); |
111 | m_tableViewButton->addTo( listTools ); | 120 | m_tableViewButton->addTo( listTools ); |
112 | m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 ); | 121 | m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 ); |
113 | connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); | 122 | connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); |
114 | m_cardViewButton->setToggleAction( true ); | 123 | m_cardViewButton->setToggleAction( true ); |
115 | m_cardViewButton->addTo( listTools ); | 124 | m_cardViewButton->addTo( listTools ); |
116 | 125 | ||
117 | listTools->addSeparator(); | 126 | listTools->addSeparator(); |
118 | 127 | ||
119 | // Other Buttons | 128 | // Other Buttons |
120 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, | 129 | QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, |
121 | 0, this, 0 ); | 130 | 0, this, 0 ); |
122 | actionNew = a; | 131 | actionNew = a; |
123 | connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); | 132 | connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); |
124 | a->addTo( edit ); | 133 | a->addTo( edit ); |
125 | a->addTo( listTools ); | 134 | a->addTo( listTools ); |
126 | 135 | ||
127 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, | 136 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, |
128 | 0, this, 0 ); | 137 | 0, this, 0 ); |
129 | actionEdit = a; | 138 | actionEdit = a; |
130 | connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); | 139 | connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); |
131 | a->addTo( edit ); | 140 | a->addTo( edit ); |
132 | a->addTo( listTools ); | 141 | a->addTo( listTools ); |
133 | 142 | ||
134 | a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, | 143 | a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, |
135 | 0, this, 0 ); | 144 | 0, this, 0 ); |
136 | actionTrash = a; | 145 | actionTrash = a; |
137 | connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); | 146 | connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); |
138 | a->addTo( edit ); | 147 | a->addTo( edit ); |
139 | a->addTo( listTools ); | 148 | a->addTo( listTools ); |
140 | 149 | ||
141 | 150 | ||
142 | // make it possible to go directly to businesscard via qcop call | 151 | // make it possible to go directly to businesscard via qcop call |
143 | //#if defined(Q_WS_QWS) // Why this ? (se) | 152 | //#if defined(Q_WS_QWS) // Why this ? (se) |
144 | #if !defined(QT_NO_COP) | 153 | #if !defined(QT_NO_COP) |
145 | QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); | 154 | QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); |
146 | connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), | 155 | connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), |
147 | this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); | 156 | this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); |
148 | #endif | 157 | #endif |
149 | // #endif | 158 | // #endif |
150 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), | 159 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), |
151 | QString::null, 0, this, 0 ); | 160 | QString::null, 0, this, 0 ); |
152 | actionFind = a; | 161 | actionFind = a; |
153 | connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); | 162 | connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); |
154 | a->addTo( edit ); | 163 | a->addTo( edit ); |
155 | a->addTo( listTools ); | 164 | a->addTo( listTools ); |
156 | 165 | ||
157 | // Much better search widget, taken from QTReader.. (se) | 166 | // Much better search widget, taken from QTReader.. (se) |
158 | searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); | 167 | searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); |
159 | searchBar->setHorizontalStretchable( TRUE ); | 168 | searchBar->setHorizontalStretchable( TRUE ); |
160 | searchBar->hide(); | 169 | searchBar->hide(); |
161 | searchEdit = new QLineEdit( searchBar, "searchEdit" ); | 170 | searchEdit = new QLineEdit( searchBar, "searchEdit" ); |
162 | 171 | ||
163 | // QFont f("unifont", 16 /*, QFont::Bold*/); | 172 | // QFont f("unifont", 16 /*, QFont::Bold*/); |
164 | // searchEdit->setFont( f ); | 173 | // searchEdit->setFont( f ); |
165 | 174 | ||
166 | searchBar->setStretchableWidget( searchEdit ); | 175 | searchBar->setStretchableWidget( searchEdit ); |
167 | connect( searchEdit, SIGNAL( returnPressed( ) ), | 176 | connect( searchEdit, SIGNAL( returnPressed( ) ), |
168 | this, SLOT( slotFind( ) ) ); | 177 | this, SLOT( slotFind( ) ) ); |
169 | 178 | ||
170 | a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); | 179 | a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); |
171 | connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); | 180 | connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); |
172 | a->addTo( searchBar ); | 181 | a->addTo( searchBar ); |
173 | 182 | ||
174 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 183 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
175 | connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); | 184 | connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); |
176 | a->addTo( searchBar ); | 185 | a->addTo( searchBar ); |
177 | 186 | ||
178 | a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ), | 187 | a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ), |
179 | QString::null, 0, this, 0 ); | 188 | QString::null, 0, this, 0 ); |
180 | //a->setEnabled( FALSE ); we got support for it now :) zecke | 189 | //a->setEnabled( FALSE ); we got support for it now :) zecke |
181 | actionMail = a; | 190 | actionMail = a; |
182 | connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); | 191 | connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); |
183 | a->addTo( edit ); | 192 | a->addTo( edit ); |
184 | a->addTo( listTools ); | 193 | a->addTo( listTools ); |
185 | 194 | ||
186 | if ( Ir::supported() ) { | 195 | if ( Ir::supported() ) { |
187 | a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, | 196 | a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, |
188 | 0, this, 0 ); | 197 | 0, this, 0 ); |
189 | actionBeam = a; | 198 | actionBeam = a; |
190 | connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); | 199 | connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); |
191 | a->addTo( edit ); | 200 | a->addTo( edit ); |
192 | a->addTo( listTools ); | 201 | a->addTo( listTools ); |
193 | } | 202 | } |
194 | 203 | ||
195 | edit->insertSeparator(); | 204 | edit->insertSeparator(); |
196 | 205 | ||
197 | a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null, | 206 | a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null, |
198 | 0, this, 0); | 207 | 0, this, 0); |
199 | actionPersonal = a; | 208 | actionPersonal = a; |
200 | connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); | 209 | connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); |
201 | a->addTo( edit ); | 210 | a->addTo( edit ); |
202 | 211 | ||
203 | edit->insertSeparator(); | 212 | edit->insertSeparator(); |
204 | 213 | ||
205 | a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), | 214 | a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), |
206 | QString::null, 0, this, 0 , TRUE ); | 215 | QString::null, 0, this, 0 , TRUE ); |
207 | actionPersonal = a; | 216 | actionPersonal = a; |
208 | connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); | 217 | connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); |
209 | a->addTo( edit ); | 218 | a->addTo( edit ); |
210 | 219 | ||
211 | 220 | ||
212 | #ifdef __DEBUG_RELEASE | 221 | #ifdef __DEBUG_RELEASE |
213 | // Remove this function for public Release ! This is only | 222 | // Remove this function for public Release ! This is only |
214 | // for debug purposes .. | 223 | // for debug purposes .. |
215 | a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); | 224 | a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); |
216 | connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); | 225 | connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); |
217 | a->addTo( edit ); | 226 | a->addTo( edit ); |
218 | #endif | 227 | #endif |
219 | a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, | 228 | a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, |
220 | 0, this, 0 ); | 229 | 0, this, 0 ); |
221 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); | 230 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); |
222 | a->addTo( edit ); | 231 | a->addTo( edit ); |
223 | 232 | ||
224 | // Create Views | 233 | // Create Views |
225 | listContainer = new QWidget( this ); | 234 | listContainer = new QWidget( this ); |
226 | QVBoxLayout *vb = new QVBoxLayout( listContainer ); | 235 | QVBoxLayout *vb = new QVBoxLayout( listContainer ); |
227 | 236 | ||
228 | m_abView = new AbView( listContainer, m_config.orderList() ); | 237 | m_abView = new AbView( listContainer, m_config.orderList() ); |
229 | vb->addWidget( m_abView ); | 238 | vb->addWidget( m_abView ); |
230 | // abList->setHScrollBarMode( QScrollView::AlwaysOff ); | 239 | // abList->setHScrollBarMode( QScrollView::AlwaysOff ); |
231 | connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), | 240 | connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), |
232 | this, SLOT( slotViewSwitched( int ) ) ); | 241 | this, SLOT( slotViewSwitched( int ) ) ); |
233 | 242 | ||
234 | 243 | ||
235 | QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); | 244 | QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); |
236 | 245 | ||
237 | m_abView->load(); | 246 | m_abView->load(); |
238 | 247 | ||
239 | // Letter Picker | 248 | // Letter Picker |
240 | pLabel = new LetterPicker( listContainer ); | 249 | pLabel = new LetterPicker( listContainer ); |
241 | connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); | 250 | connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); |
242 | connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); | 251 | connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); |
243 | 252 | ||
244 | vb->addWidget( pLabel ); | 253 | vb->addWidget( pLabel ); |
245 | 254 | ||
246 | // Category Menu | 255 | // All Categories into view-menu.. |
247 | catMenu = new QPopupMenu( this ); | ||
248 | catMenu->setCheckable( TRUE ); | ||
249 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); | ||
250 | populateCategories(); | 256 | populateCategories(); |
251 | mbList->insertItem( tr("View"), catMenu ); | ||
252 | 257 | ||
253 | defaultFont = new QFont( m_abView->font() ); | 258 | // Fontsize |
259 | defaultFont = new QFont( m_abView->font() ); | ||
254 | slotSetFont(m_config.fontSize()); | 260 | slotSetFont(m_config.fontSize()); |
255 | m_curFontSize = m_config.fontSize(); | 261 | m_curFontSize = m_config.fontSize(); |
256 | 262 | ||
257 | setCentralWidget(listContainer); | 263 | setCentralWidget(listContainer); |
258 | 264 | ||
259 | // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); | 265 | // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); |
260 | 266 | ||
261 | 267 | ||
262 | isLoading = false; | 268 | isLoading = false; |
263 | } | 269 | } |
264 | 270 | ||
265 | 271 | ||
266 | void AddressbookWindow::slotConfig() | 272 | void AddressbookWindow::slotConfig() |
267 | { | 273 | { |
268 | ConfigDlg* dlg = new ConfigDlg( this, "Config" ); | 274 | ConfigDlg* dlg = new ConfigDlg( this, "Config" ); |
269 | dlg -> setConfig( m_config ); | 275 | dlg -> setConfig( m_config ); |
270 | dlg -> showMaximized(); | 276 | dlg -> showMaximized(); |
271 | if ( dlg -> exec() ) { | 277 | if ( dlg -> exec() ) { |
272 | qWarning ("Config Dialog accepted!"); | 278 | qWarning ("Config Dialog accepted!"); |
273 | m_config = dlg -> getConfig(); | 279 | m_config = dlg -> getConfig(); |
274 | if ( m_curFontSize != m_config.fontSize() ){ | 280 | if ( m_curFontSize != m_config.fontSize() ){ |
275 | qWarning("Font was changed!"); | 281 | qWarning("Font was changed!"); |
276 | m_curFontSize = m_config.fontSize(); | 282 | m_curFontSize = m_config.fontSize(); |
277 | emit slotSetFont( m_curFontSize ); | 283 | emit slotSetFont( m_curFontSize ); |
278 | } | 284 | } |
279 | m_abView -> setListOrder( m_config.orderList() ); | 285 | m_abView -> setListOrder( m_config.orderList() ); |
280 | } | 286 | } |
281 | 287 | ||
282 | delete dlg; | 288 | delete dlg; |
283 | } | 289 | } |
284 | 290 | ||
285 | 291 | ||
286 | void AddressbookWindow::slotSetFont( int size ) | 292 | void AddressbookWindow::slotSetFont( int size ) |
287 | { | 293 | { |
288 | qWarning("void AddressbookWindow::slotSetFont( %d )", size); | 294 | qWarning("void AddressbookWindow::slotSetFont( %d )", size); |
289 | 295 | ||
290 | if (size > 2 || size < 0) | 296 | if (size > 2 || size < 0) |
291 | size = 1; | 297 | size = 1; |
292 | 298 | ||
293 | m_config.setFontSize( size ); | 299 | m_config.setFontSize( size ); |
294 | 300 | ||
295 | QFont *currentFont; | 301 | QFont *currentFont; |
296 | 302 | ||
297 | switch (size) { | 303 | switch (size) { |
298 | case 0: | 304 | case 0: |
299 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); | 305 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); |
300 | currentFont = new QFont (m_abView->font()); | 306 | currentFont = new QFont (m_abView->font()); |
301 | // abList->resizeRows(currentFont->pixelSize() + 7); :SX | 307 | // abList->resizeRows(currentFont->pixelSize() + 7); :SX |
302 | // abList->resizeRows(); | 308 | // abList->resizeRows(); |
303 | break; | 309 | break; |
304 | case 1: | 310 | case 1: |
305 | m_abView->setFont( *defaultFont ); | 311 | m_abView->setFont( *defaultFont ); |
306 | currentFont = new QFont (m_abView->font()); | 312 | currentFont = new QFont (m_abView->font()); |
307 | // // abList->resizeRows(currentFont->pixelSize() + 7); | 313 | // // abList->resizeRows(currentFont->pixelSize() + 7); |
308 | // abList->resizeRows(); | 314 | // abList->resizeRows(); |
309 | break; | 315 | break; |
310 | case 2: | 316 | case 2: |
311 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); | 317 | m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); |
312 | currentFont = new QFont (m_abView->font()); | 318 | currentFont = new QFont (m_abView->font()); |
313 | // //abList->resizeRows(currentFont->pixelSize() + 7); | 319 | // //abList->resizeRows(currentFont->pixelSize() + 7); |
314 | // abList->resizeRows(); | 320 | // abList->resizeRows(); |
315 | break; | 321 | break; |
316 | } | 322 | } |
317 | } | 323 | } |
318 | 324 | ||
319 | 325 | ||
320 | 326 | ||
321 | void AddressbookWindow::importvCard() { | 327 | void AddressbookWindow::importvCard() { |
322 | QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); | 328 | QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); |
323 | if(!str.isEmpty() ){ | 329 | if(!str.isEmpty() ){ |
324 | setDocument((const QString&) str ); | 330 | setDocument((const QString&) str ); |
325 | } | 331 | } |
326 | 332 | ||
327 | } | 333 | } |
328 | 334 | ||
329 | void AddressbookWindow::setDocument( const QString &filename ) | 335 | void AddressbookWindow::setDocument( const QString &filename ) |
330 | { | 336 | { |
331 | qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); | 337 | qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); |
332 | 338 | ||
333 | if ( filename.find(".vcf") != int(filename.length()) - 4 ){ | 339 | if ( filename.find(".vcf") != int(filename.length()) - 4 ){ |
334 | 340 | ||
335 | 341 | ||
336 | 342 | ||
337 | switch( QMessageBox::information( this, tr ( "Right file type ?" ), | 343 | switch( QMessageBox::information( this, tr ( "Right file type ?" ), |
338 | tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ), | 344 | tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ), |
339 | tr( "&Yes" ), tr( "&No" ), QString::null, | 345 | tr( "&Yes" ), tr( "&No" ), QString::null, |
340 | 0, // Enter == button 0 | 346 | 0, // Enter == button 0 |
341 | 2 ) ) { // Escape == button 2 | 347 | 2 ) ) { // Escape == button 2 |
342 | case 0: | 348 | case 0: |
343 | qWarning("YES clicked"); | 349 | qWarning("YES clicked"); |
344 | break; | 350 | break; |
345 | case 1: | 351 | case 1: |
346 | qWarning("NO clicked"); | 352 | qWarning("NO clicked"); |
347 | return; | 353 | return; |
348 | break; | 354 | break; |
349 | } | 355 | } |
350 | } | 356 | } |
351 | 357 | ||
352 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 358 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
353 | filename ); | 359 | filename ); |
354 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 360 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
355 | OContactAccess::List allList = access->allRecords(); | 361 | OContactAccess::List allList = access->allRecords(); |
356 | qWarning( "Found number of contacts in File: %d", allList.count() ); | 362 | qWarning( "Found number of contacts in File: %d", allList.count() ); |
357 | 363 | ||
358 | if ( !allList.count() ) { | 364 | if ( !allList.count() ) { |
359 | QMessageBox::information( this, "Import VCard", | 365 | QMessageBox::information( this, "Import VCard", |
360 | "It was impossible to import\nthe VCard.\n" | 366 | "It was impossible to import\nthe VCard.\n" |
361 | "The VCard may be corrupted!" ); | 367 | "The VCard may be corrupted!" ); |
362 | } | 368 | } |
363 | 369 | ||
364 | bool doAsk = true; | 370 | bool doAsk = true; |
365 | OContactAccess::List::Iterator it; | 371 | OContactAccess::List::Iterator it; |
366 | for ( it = allList.begin(); it != allList.end(); ++it ){ | 372 | for ( it = allList.begin(); it != allList.end(); ++it ){ |
367 | qWarning("Adding Contact from: %s", (*it).fullName().latin1() ); | 373 | qWarning("Adding Contact from: %s", (*it).fullName().latin1() ); |
368 | if ( doAsk ){ | 374 | if ( doAsk ){ |
369 | switch( QMessageBox::information( this, tr ( "Add Contact?" ), | 375 | switch( QMessageBox::information( this, tr ( "Add Contact?" ), |
370 | tr( "Do you really want add contact for \n%1?" ) | 376 | tr( "Do you really want add contact for \n%1?" ) |
371 | .arg( (*it).fullName().latin1() ), | 377 | .arg( (*it).fullName().latin1() ), |
372 | tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"), | 378 | tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"), |
373 | 0, // Enter == button 0 | 379 | 0, // Enter == button 0 |
374 | 2 ) ) { // Escape == button 2 | 380 | 2 ) ) { // Escape == button 2 |
375 | case 0: | 381 | case 0: |
376 | qWarning("YES clicked"); | 382 | qWarning("YES clicked"); |
377 | m_abView->addEntry( *it ); | 383 | m_abView->addEntry( *it ); |
378 | break; | 384 | break; |
379 | case 1: | 385 | case 1: |
380 | qWarning("NO clicked"); | 386 | qWarning("NO clicked"); |
381 | break; | 387 | break; |
382 | case 2: | 388 | case 2: |
383 | qWarning("YesAll clicked"); | 389 | qWarning("YesAll clicked"); |
384 | doAsk = false; | 390 | doAsk = false; |
385 | break; | 391 | break; |
386 | } | 392 | } |
387 | }else | 393 | }else |
388 | m_abView->addEntry( *it ); | 394 | m_abView->addEntry( *it ); |
389 | 395 | ||
390 | } | 396 | } |
391 | 397 | ||
392 | delete access; | 398 | delete access; |
393 | } | 399 | } |
394 | 400 | ||
395 | void AddressbookWindow::resizeEvent( QResizeEvent *e ) | 401 | void AddressbookWindow::resizeEvent( QResizeEvent *e ) |
396 | { | 402 | { |
397 | QMainWindow::resizeEvent( e ); | 403 | QMainWindow::resizeEvent( e ); |
398 | 404 | ||
399 | 405 | ||
400 | } | 406 | } |
401 | 407 | ||
402 | AddressbookWindow::~AddressbookWindow() | 408 | AddressbookWindow::~AddressbookWindow() |
403 | { | 409 | { |
404 | ToolBarDock dock; | 410 | ToolBarDock dock; |
405 | int dummy; | 411 | int dummy; |
406 | bool bDummy; | 412 | bool bDummy; |
407 | getLocation ( listTools, dock, dummy, bDummy, dummy ); | 413 | getLocation ( listTools, dock, dummy, bDummy, dummy ); |
408 | m_config.setToolBarDock( dock ); | 414 | m_config.setToolBarDock( dock ); |
409 | m_config.save(); | 415 | m_config.save(); |
410 | } | 416 | } |
411 | 417 | ||
412 | void AddressbookWindow::slotUpdateToolbar() | 418 | void AddressbookWindow::slotUpdateToolbar() |
413 | { | 419 | { |
414 | OContact ce = m_abView->currentEntry(); | 420 | OContact ce = m_abView->currentEntry(); |
415 | actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); | 421 | actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); |
416 | } | 422 | } |
417 | 423 | ||
418 | void AddressbookWindow::slotListNew() | 424 | void AddressbookWindow::slotListNew() |
419 | { | 425 | { |
420 | OContact cnt; | 426 | OContact cnt; |
421 | if( !syncing ) { | 427 | if( !syncing ) { |
422 | editEntry( NewEntry ); | 428 | editEntry( NewEntry ); |
423 | } else { | 429 | } else { |
424 | QMessageBox::warning(this, tr("Contacts"), | 430 | QMessageBox::warning(this, tr("Contacts"), |
425 | tr("Can not edit data, currently syncing")); | 431 | tr("Can not edit data, currently syncing")); |
426 | } | 432 | } |
427 | } | 433 | } |
428 | 434 | ||
429 | // void AddressbookWindow::slotListView() | 435 | // void AddressbookWindow::slotListView() |
430 | // { | 436 | // { |
431 | // m_abView -> init( abList->currentEntry() ); | 437 | // m_abView -> init( abList->currentEntry() ); |
432 | // // :SX mView->sync(); | 438 | // // :SX mView->sync(); |
433 | // //:SXshowView(); | 439 | // //:SXshowView(); |
434 | // } | 440 | // } |
435 | 441 | ||
436 | void AddressbookWindow::slotListDelete() | 442 | void AddressbookWindow::slotListDelete() |
437 | { | 443 | { |
438 | if(!syncing) { | 444 | if(!syncing) { |
439 | OContact tmpEntry = m_abView ->currentEntry(); | 445 | OContact tmpEntry = m_abView ->currentEntry(); |
440 | 446 | ||
441 | // get a name, do the best we can... | 447 | // get a name, do the best we can... |
442 | QString strName = tmpEntry.fullName(); | 448 | QString strName = tmpEntry.fullName(); |
443 | if ( strName.isEmpty() ) { | 449 | if ( strName.isEmpty() ) { |
444 | strName = tmpEntry.company(); | 450 | strName = tmpEntry.company(); |
445 | if ( strName.isEmpty() ) | 451 | if ( strName.isEmpty() ) |
446 | strName = "No Name"; | 452 | strName = "No Name"; |
447 | } | 453 | } |
448 | 454 | ||
449 | 455 | ||
450 | if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), | 456 | if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), |
451 | strName ) ) { | 457 | strName ) ) { |
452 | m_abView->removeEntry( tmpEntry.uid() ); | 458 | m_abView->removeEntry( tmpEntry.uid() ); |
453 | } | 459 | } |
454 | } else { | 460 | } else { |
455 | QMessageBox::warning( this, tr("Contacts"), | 461 | QMessageBox::warning( this, tr("Contacts"), |
456 | tr("Can not edit data, currently syncing") ); | 462 | tr("Can not edit data, currently syncing") ); |
457 | } | 463 | } |
458 | } | 464 | } |
459 | 465 | ||
460 | void AddressbookWindow::slotFindOpen() | 466 | void AddressbookWindow::slotFindOpen() |
461 | { | 467 | { |
462 | searchBar->show(); | 468 | searchBar->show(); |
463 | m_abView -> inSearch(); | 469 | m_abView -> inSearch(); |
464 | searchEdit->setFocus(); | 470 | searchEdit->setFocus(); |
465 | } | 471 | } |
466 | void AddressbookWindow::slotFindClose() | 472 | void AddressbookWindow::slotFindClose() |
467 | { | 473 | { |
468 | searchBar->hide(); | 474 | searchBar->hide(); |
469 | m_abView -> offSearch(); | 475 | m_abView -> offSearch(); |
470 | // m_abView->setFocus(); | 476 | // m_abView->setFocus(); |
471 | } | 477 | } |
472 | 478 | ||
473 | 479 | ||
474 | void AddressbookWindow::slotFind() | 480 | void AddressbookWindow::slotFind() |
475 | { | 481 | { |
476 | m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false); | 482 | m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false); |
477 | 483 | ||
478 | searchEdit->clearFocus(); | 484 | searchEdit->clearFocus(); |
479 | // m_abView->setFocus(); | 485 | // m_abView->setFocus(); |
480 | 486 | ||
481 | } | 487 | } |
482 | 488 | ||
483 | void AddressbookWindow::slotViewBack() | 489 | void AddressbookWindow::slotViewBack() |
484 | { | 490 | { |
485 | // :SX showList(); | 491 | // :SX showList(); |
486 | } | 492 | } |
487 | 493 | ||
488 | void AddressbookWindow::slotViewEdit() | 494 | void AddressbookWindow::slotViewEdit() |
489 | { | 495 | { |
490 | if(!syncing) { | 496 | if(!syncing) { |
491 | if (actionPersonal->isOn()) { | 497 | if (actionPersonal->isOn()) { |
492 | editPersonal(); | 498 | editPersonal(); |
493 | } else { | 499 | } else { |
494 | editEntry( EditEntry ); | 500 | editEntry( EditEntry ); |
495 | } | 501 | } |
496 | } else { | 502 | } else { |
497 | QMessageBox::warning( this, tr("Contacts"), | 503 | QMessageBox::warning( this, tr("Contacts"), |
498 | tr("Can not edit data, currently syncing") ); | 504 | tr("Can not edit data, currently syncing") ); |
499 | } | 505 | } |
500 | } | 506 | } |
501 | 507 | ||
502 | 508 | ||
503 | 509 | ||
504 | void AddressbookWindow::writeMail() | 510 | void AddressbookWindow::writeMail() |
505 | { | 511 | { |
506 | OContact c = m_abView -> currentEntry(); | 512 | OContact c = m_abView -> currentEntry(); |
507 | QString name = c.fileAs(); | 513 | QString name = c.fileAs(); |
508 | QString email = c.defaultEmail(); | 514 | QString email = c.defaultEmail(); |
509 | 515 | ||
510 | // I prefer the OPIE-Environment variable before the | 516 | // I prefer the OPIE-Environment variable before the |
511 | // QPE-one.. | 517 | // QPE-one.. |
512 | QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); | 518 | QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); |
513 | if ( basepath.isEmpty() ) | 519 | if ( basepath.isEmpty() ) |
514 | basepath = QString::fromLatin1( getenv("QPEDIR") ); | 520 | basepath = QString::fromLatin1( getenv("QPEDIR") ); |
515 | 521 | ||
516 | // Try to access the preferred. If not possible, try to | 522 | // Try to access the preferred. If not possible, try to |
517 | // switch to the other one.. | 523 | // switch to the other one.. |
518 | if ( m_config.useQtMail() ){ | 524 | if ( m_config.useQtMail() ){ |
519 | qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); | 525 | qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); |
520 | if ( QFile::exists( basepath + "/bin/qtmail" ) ){ | 526 | if ( QFile::exists( basepath + "/bin/qtmail" ) ){ |
521 | qWarning ("QCop"); | 527 | qWarning ("QCop"); |
522 | QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); | 528 | QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); |
523 | e << name << email; | 529 | e << name << email; |
524 | return; | 530 | return; |
525 | } else | 531 | } else |
526 | m_config.setUseOpieMail( true ); | 532 | m_config.setUseOpieMail( true ); |
527 | } | 533 | } |
528 | if ( m_config.useOpieMail() ){ | 534 | if ( m_config.useOpieMail() ){ |
529 | qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1()); | 535 | qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1()); |
530 | if ( QFile::exists( basepath + "/bin/mail" ) ){ | 536 | if ( QFile::exists( basepath + "/bin/mail" ) ){ |
531 | qWarning ("QCop"); | 537 | qWarning ("QCop"); |
532 | QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)"); | 538 | QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)"); |
533 | e << name << email; | 539 | e << name << email; |
534 | return; | 540 | return; |
535 | } else | 541 | } else |
536 | m_config.setUseQtMail( true ); | 542 | m_config.setUseQtMail( true ); |
537 | } | 543 | } |
538 | 544 | ||
539 | } | 545 | } |
540 | 546 | ||
541 | static const char * beamfile = "/tmp/obex/contact.vcf"; | 547 | static const char * beamfile = "/tmp/obex/contact.vcf"; |
542 | 548 | ||
543 | void AddressbookWindow::slotBeam() | 549 | void AddressbookWindow::slotBeam() |
544 | { | 550 | { |
545 | QString beamFilename; | 551 | QString beamFilename; |
546 | OContact c; | 552 | OContact c; |
547 | if ( actionPersonal->isOn() ) { | 553 | if ( actionPersonal->isOn() ) { |
548 | beamFilename = addressbookPersonalVCardName(); | 554 | beamFilename = addressbookPersonalVCardName(); |
549 | if ( !QFile::exists( beamFilename ) ) | 555 | if ( !QFile::exists( beamFilename ) ) |
550 | return; // can't beam a non-existent file | 556 | return; // can't beam a non-existent file |
551 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 557 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
552 | beamFilename ); | 558 | beamFilename ); |
553 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 559 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
554 | OContactAccess::List allList = access->allRecords(); | 560 | OContactAccess::List allList = access->allRecords(); |
555 | OContactAccess::List::Iterator it = allList.begin(); // Just take first | 561 | OContactAccess::List::Iterator it = allList.begin(); // Just take first |
556 | c = *it; | 562 | c = *it; |
557 | 563 | ||
558 | delete access; | 564 | delete access; |
559 | } else { | 565 | } else { |
560 | unlink( beamfile ); // delete if exists | 566 | unlink( beamfile ); // delete if exists |
561 | mkdir("/tmp/obex/", 0755); | 567 | mkdir("/tmp/obex/", 0755); |
562 | c = m_abView -> currentEntry(); | 568 | c = m_abView -> currentEntry(); |
563 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 569 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
564 | beamfile ); | 570 | beamfile ); |
565 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 571 | OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
566 | access->add( c ); | 572 | access->add( c ); |
567 | access->save(); | 573 | access->save(); |
568 | delete access; | 574 | delete access; |
569 | 575 | ||
570 | beamFilename = beamfile; | 576 | beamFilename = beamfile; |
571 | } | 577 | } |
572 | 578 | ||
573 | qWarning("Beaming: %s", beamFilename.latin1() ); | 579 | qWarning("Beaming: %s", beamFilename.latin1() ); |
574 | 580 | ||
575 | Ir *ir = new Ir( this ); | 581 | Ir *ir = new Ir( this ); |
576 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 582 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
577 | QString description = c.fullName(); | 583 | QString description = c.fullName(); |
578 | ir->send( beamFilename, description, "text/x-vCard" ); | 584 | ir->send( beamFilename, description, "text/x-vCard" ); |
579 | } | 585 | } |
580 | 586 | ||
581 | void AddressbookWindow::beamDone( Ir *ir ) | 587 | void AddressbookWindow::beamDone( Ir *ir ) |
582 | { | 588 | { |
583 | 589 | ||
584 | delete ir; | 590 | delete ir; |
585 | unlink( beamfile ); | 591 | unlink( beamfile ); |
586 | } | 592 | } |
587 | 593 | ||
588 | 594 | ||
589 | static void parseName( const QString& name, QString *first, QString *middle, | 595 | static void parseName( const QString& name, QString *first, QString *middle, |
590 | QString * last ) | 596 | QString * last ) |
591 | { | 597 | { |
592 | 598 | ||
593 | int comma = name.find ( "," ); | 599 | int comma = name.find ( "," ); |
594 | QString rest; | 600 | QString rest; |
595 | if ( comma > 0 ) { | 601 | if ( comma > 0 ) { |
596 | *last = name.left( comma ); | 602 | *last = name.left( comma ); |
597 | comma++; | 603 | comma++; |
598 | while ( comma < int(name.length()) && name[comma] == ' ' ) | 604 | while ( comma < int(name.length()) && name[comma] == ' ' ) |
599 | comma++; | 605 | comma++; |
600 | rest = name.mid( comma ); | 606 | rest = name.mid( comma ); |
601 | } else { | 607 | } else { |
602 | int space = name.findRev( ' ' ); | 608 | int space = name.findRev( ' ' ); |
603 | *last = name.mid( space+1 ); | 609 | *last = name.mid( space+1 ); |
604 | rest = name.left( space ); | 610 | rest = name.left( space ); |
605 | } | 611 | } |
606 | int space = rest.find( ' ' ); | 612 | int space = rest.find( ' ' ); |
607 | if ( space <= 0 ) { | 613 | if ( space <= 0 ) { |
608 | *first = rest; | 614 | *first = rest; |
609 | } else { | 615 | } else { |
610 | *first = rest.left( space ); | 616 | *first = rest.left( space ); |
611 | *middle = rest.mid( space+1 ); | 617 | *middle = rest.mid( space+1 ); |
612 | } | 618 | } |
613 | 619 | ||
614 | } | 620 | } |
615 | 621 | ||
616 | 622 | ||
617 | void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) | 623 | void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) |
618 | { | 624 | { |
619 | if (msg == "editPersonal()") { | 625 | if (msg == "editPersonal()") { |
620 | editPersonal(); | 626 | editPersonal(); |
621 | } else if (msg == "editPersonalAndClose()") { | 627 | } else if (msg == "editPersonalAndClose()") { |
622 | editPersonal(); | 628 | editPersonal(); |
623 | close(); | 629 | close(); |
624 | } else if ( msg == "addContact(QString,QString)" ) { | 630 | } else if ( msg == "addContact(QString,QString)" ) { |
625 | QDataStream stream(data,IO_ReadOnly); | 631 | QDataStream stream(data,IO_ReadOnly); |
626 | QString name, email; | 632 | QString name, email; |
627 | stream >> name >> email; | 633 | stream >> name >> email; |
628 | 634 | ||
629 | OContact cnt; | 635 | OContact cnt; |
630 | QString fn, mn, ln; | 636 | QString fn, mn, ln; |
631 | parseName( name, &fn, &mn, &ln ); | 637 | parseName( name, &fn, &mn, &ln ); |
632 | // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); | 638 | // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); |
633 | cnt.setFirstName( fn ); | 639 | cnt.setFirstName( fn ); |
634 | cnt.setMiddleName( mn ); | 640 | cnt.setMiddleName( mn ); |
635 | cnt.setLastName( ln ); | 641 | cnt.setLastName( ln ); |
636 | cnt.insertEmails( email ); | 642 | cnt.insertEmails( email ); |
637 | cnt.setDefaultEmail( email ); | 643 | cnt.setDefaultEmail( email ); |
638 | cnt.setFileAs(); | 644 | cnt.setFileAs(); |
639 | 645 | ||
640 | m_abView -> addEntry( cnt ); | 646 | m_abView -> addEntry( cnt ); |
641 | 647 | ||
642 | // :SXm_abView()->init( cnt ); | 648 | // :SXm_abView()->init( cnt ); |
643 | editEntry( EditEntry ); | 649 | editEntry( EditEntry ); |
644 | } else if ( msg == "beamBusinessCard()" ) { | 650 | } else if ( msg == "beamBusinessCard()" ) { |
645 | QString beamFilename = addressbookPersonalVCardName(); | 651 | QString beamFilename = addressbookPersonalVCardName(); |
646 | if ( !QFile::exists( beamFilename ) ) | 652 | if ( !QFile::exists( beamFilename ) ) |
647 | return; // can't beam a non-existent file | 653 | return; // can't beam a non-existent file |
648 | 654 | ||
649 | Ir *ir = new Ir( this ); | 655 | Ir *ir = new Ir( this ); |
650 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 656 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
651 | QString description = "mycard.vcf"; | 657 | QString description = "mycard.vcf"; |
652 | ir->send( beamFilename, description, "text/x-vCard" ); | 658 | ir->send( beamFilename, description, "text/x-vCard" ); |
653 | } | 659 | } |
654 | #if 0 | 660 | #if 0 |
655 | else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) { | 661 | else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) { |
656 | QDataStream stream(data,IO_ReadOnly); | 662 | QDataStream stream(data,IO_ReadOnly); |
657 | QCString ch,m; | 663 | QCString ch,m; |
658 | QStringList types; | 664 | QStringList types; |
659 | stream >> ch >> m >> types; | 665 | stream >> ch >> m >> types; |
660 | AddressPicker picker(abList,this,0,TRUE); | 666 | AddressPicker picker(abList,this,0,TRUE); |
661 | picker.showMaximized(); | 667 | picker.showMaximized(); |
662 | picker.setChoiceNames(types); | 668 | picker.setChoiceNames(types); |
663 | int i=0; | 669 | int i=0; |
664 | for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { | 670 | for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { |
665 | QStringList sel; | 671 | QStringList sel; |
666 | stream >> sel; | 672 | stream >> sel; |
667 | picker.setSelection(i++,sel); | 673 | picker.setSelection(i++,sel); |
668 | } | 674 | } |
669 | picker.showMaximized(); | 675 | picker.showMaximized(); |
670 | picker.exec(); | 676 | picker.exec(); |
671 | 677 | ||
672 | // ###### note: contacts may have been added - save here! | 678 | // ###### note: contacts may have been added - save here! |
673 | 679 | ||
674 | setCentralWidget(abList); | 680 | setCentralWidget(abList); |
675 | QCopEnvelope e(ch,m); | 681 | QCopEnvelope e(ch,m); |
676 | i=0; | 682 | i=0; |
677 | for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { | 683 | for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { |
678 | QStringList sel = picker.selection(i++); | 684 | QStringList sel = picker.selection(i++); |
679 | e << sel; | 685 | e << sel; |
680 | } | 686 | } |
681 | } | 687 | } |
682 | #endif | 688 | #endif |
683 | 689 | ||
684 | } | 690 | } |
685 | 691 | ||
686 | void AddressbookWindow::editEntry( EntryMode entryMode ) | 692 | void AddressbookWindow::editEntry( EntryMode entryMode ) |
687 | { | 693 | { |
688 | OContact entry; | 694 | OContact entry; |
689 | if ( !abEditor ) { | 695 | if ( !abEditor ) { |
690 | abEditor = new ContactEditor( entry, this, "editor" ); | 696 | abEditor = new ContactEditor( entry, this, "editor" ); |
691 | } | 697 | } |
692 | if ( entryMode == EditEntry ) | 698 | if ( entryMode == EditEntry ) |
693 | abEditor->setEntry( m_abView -> currentEntry() ); | 699 | abEditor->setEntry( m_abView -> currentEntry() ); |
694 | else if ( entryMode == NewEntry ) | 700 | else if ( entryMode == NewEntry ) |
695 | abEditor->setEntry( entry ); | 701 | abEditor->setEntry( entry ); |
696 | // other things may change the caption. | 702 | // other things may change the caption. |
697 | abEditor->setCaption( tr("Edit Address") ); | 703 | abEditor->setCaption( tr("Edit Address") ); |
698 | 704 | ||
699 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 705 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
700 | abEditor->showMaximized(); | 706 | abEditor->showMaximized(); |
701 | #endif | 707 | #endif |
702 | // fix the foxus... | 708 | // fix the foxus... |
703 | abEditor->setNameFocus(); | 709 | abEditor->setNameFocus(); |
704 | if ( abEditor->exec() ) { | 710 | if ( abEditor->exec() ) { |
705 | setFocus(); | 711 | setFocus(); |
706 | if ( entryMode == NewEntry ) { | 712 | if ( entryMode == NewEntry ) { |
707 | OContact insertEntry = abEditor->entry(); | 713 | OContact insertEntry = abEditor->entry(); |
708 | insertEntry.assignUid(); | 714 | insertEntry.assignUid(); |
709 | m_abView -> addEntry( insertEntry ); | 715 | m_abView -> addEntry( insertEntry ); |
710 | } else { | 716 | } else { |
711 | OContact replEntry = abEditor->entry(); | 717 | OContact replEntry = abEditor->entry(); |
712 | 718 | ||
713 | if ( !replEntry.isValidUid() ) | 719 | if ( !replEntry.isValidUid() ) |
714 | replEntry.assignUid(); | 720 | replEntry.assignUid(); |
715 | 721 | ||
716 | m_abView -> replaceEntry( replEntry ); | 722 | m_abView -> replaceEntry( replEntry ); |
717 | } | 723 | } |
718 | } | 724 | } |
719 | // populateCategories(); | 725 | // populateCategories(); |
720 | 726 | ||
721 | } | 727 | } |
722 | 728 | ||
723 | void AddressbookWindow::editPersonal() | 729 | void AddressbookWindow::editPersonal() |
724 | { | 730 | { |
725 | OContact entry; | 731 | OContact entry; |
726 | 732 | ||
727 | // Switch to personal view if not selected | 733 | // Switch to personal view if not selected |
728 | // but take care of the menu, too | 734 | // but take care of the menu, too |
729 | if ( ! actionPersonal->isOn() ){ | 735 | if ( ! actionPersonal->isOn() ){ |
730 | qWarning("*** ++++"); | 736 | qWarning("*** ++++"); |
731 | actionPersonal->setOn( true ); | 737 | actionPersonal->setOn( true ); |
732 | slotPersonalView(); | 738 | slotPersonalView(); |
733 | } | 739 | } |
734 | 740 | ||
735 | if ( !abEditor ) { | 741 | if ( !abEditor ) { |
736 | abEditor = new ContactEditor( entry, this, "editor" ); | 742 | abEditor = new ContactEditor( entry, this, "editor" ); |
737 | } | 743 | } |
738 | 744 | ||
739 | abEditor->setCaption(tr("Edit My Personal Details")); | 745 | abEditor->setCaption(tr("Edit My Personal Details")); |
740 | abEditor->setPersonalView( true ); | 746 | abEditor->setPersonalView( true ); |
741 | editEntry( EditEntry ); | 747 | editEntry( EditEntry ); |
742 | abEditor->setPersonalView( false ); | 748 | abEditor->setPersonalView( false ); |
743 | 749 | ||
744 | } | 750 | } |
745 | 751 | ||
746 | 752 | ||
747 | void AddressbookWindow::slotPersonalView() | 753 | void AddressbookWindow::slotPersonalView() |
748 | { | 754 | { |
749 | qWarning("slotPersonalView()"); | 755 | qWarning("slotPersonalView()"); |
750 | if (!actionPersonal->isOn()) { | 756 | if (!actionPersonal->isOn()) { |
751 | // we just turned it off | 757 | // we just turned it off |
752 | qWarning("slotPersonalView()-> OFF"); | 758 | qWarning("slotPersonalView()-> OFF"); |
753 | setCaption( tr("Contacts") ); | 759 | setCaption( tr("Contacts") ); |
754 | actionNew->setEnabled(TRUE); | 760 | actionNew->setEnabled(TRUE); |
755 | actionTrash->setEnabled(TRUE); | 761 | actionTrash->setEnabled(TRUE); |
756 | actionFind->setEnabled(TRUE); | 762 | actionFind->setEnabled(TRUE); |
757 | actionMail->setEnabled(TRUE); | 763 | actionMail->setEnabled(TRUE); |
758 | // slotUpdateToolbar(); | 764 | // slotUpdateToolbar(); |
759 | 765 | ||
760 | m_abView->showPersonal( false ); | 766 | m_abView->showPersonal( false ); |
761 | 767 | ||
762 | return; | 768 | return; |
763 | } | 769 | } |
764 | 770 | ||
765 | qWarning("slotPersonalView()-> ON"); | 771 | qWarning("slotPersonalView()-> ON"); |
766 | // XXX need to disable some QActions. | 772 | // XXX need to disable some QActions. |
767 | actionNew->setEnabled(FALSE); | 773 | actionNew->setEnabled(FALSE); |
768 | actionTrash->setEnabled(FALSE); | 774 | actionTrash->setEnabled(FALSE); |
769 | actionFind->setEnabled(FALSE); | 775 | actionFind->setEnabled(FALSE); |
770 | actionMail->setEnabled(FALSE); | 776 | actionMail->setEnabled(FALSE); |
771 | 777 | ||
772 | setCaption( tr("Contacts - My Personal Details") ); | 778 | setCaption( tr("Contacts - My Personal Details") ); |
773 | 779 | ||
774 | m_abView->showPersonal( true ); | 780 | m_abView->showPersonal( true ); |
775 | 781 | ||
776 | } | 782 | } |
777 | 783 | ||
778 | 784 | ||
779 | void AddressbookWindow::listIsEmpty( bool empty ) | 785 | void AddressbookWindow::listIsEmpty( bool empty ) |
780 | { | 786 | { |
781 | if ( !empty ) { | 787 | if ( !empty ) { |
782 | deleteButton->setEnabled( TRUE ); | 788 | deleteButton->setEnabled( TRUE ); |
783 | } | 789 | } |
784 | } | 790 | } |
785 | 791 | ||
786 | void AddressbookWindow::reload() | 792 | void AddressbookWindow::reload() |
787 | { | 793 | { |
788 | syncing = FALSE; | 794 | syncing = FALSE; |
789 | m_abView->clear(); | 795 | m_abView->clear(); |
790 | m_abView->reload(); | 796 | m_abView->reload(); |
791 | } | 797 | } |
792 | 798 | ||
793 | void AddressbookWindow::flush() | 799 | void AddressbookWindow::flush() |
794 | { | 800 | { |
795 | syncing = TRUE; | 801 | syncing = TRUE; |
796 | m_abView->save(); | 802 | m_abView->save(); |
797 | } | 803 | } |
798 | 804 | ||
799 | 805 | ||
800 | void AddressbookWindow::closeEvent( QCloseEvent *e ) | 806 | void AddressbookWindow::closeEvent( QCloseEvent *e ) |
801 | { | 807 | { |
802 | if(active_view == AbView::CardView){ | 808 | if(active_view == AbView::CardView){ |
803 | slotViewSwitched( AbView::TableView ); | 809 | slotViewSwitched( AbView::TableView ); |
804 | e->ignore(); | 810 | e->ignore(); |
805 | return; | 811 | return; |
806 | } | 812 | } |
807 | if(syncing) { | 813 | if(syncing) { |
808 | /* shouldn't we save, I hear you say? well its already been set | 814 | /* shouldn't we save, I hear you say? well its already been set |
809 | so that an edit can not occur during a sync, and we flushed | 815 | so that an edit can not occur during a sync, and we flushed |
810 | at the start of the sync, so there is no need to save | 816 | at the start of the sync, so there is no need to save |
811 | Saving however itself would cause problems. */ | 817 | Saving however itself would cause problems. */ |
812 | e->accept(); | 818 | e->accept(); |
813 | return; | 819 | return; |
814 | } | 820 | } |
815 | //################## shouldn't always save | 821 | //################## shouldn't always save |
816 | // True, but the database handles this automatically ! (se) | 822 | // True, but the database handles this automatically ! (se) |
817 | if ( save() ) | 823 | if ( save() ) |
818 | e->accept(); | 824 | e->accept(); |
819 | else | 825 | else |
820 | e->ignore(); | 826 | e->ignore(); |
821 | } | 827 | } |
822 | 828 | ||
823 | /* | 829 | /* |
824 | Returns TRUE if it is OK to exit | 830 | Returns TRUE if it is OK to exit |
825 | */ | 831 | */ |
826 | 832 | ||
827 | bool AddressbookWindow::save() | 833 | bool AddressbookWindow::save() |
828 | { | 834 | { |
829 | if ( !m_abView->save() ) { | 835 | if ( !m_abView->save() ) { |
830 | if ( QMessageBox::critical( 0, tr( "Out of space" ), | 836 | if ( QMessageBox::critical( 0, tr( "Out of space" ), |
831 | tr("Unable to save information.\n" | 837 | tr("Unable to save information.\n" |
832 | "Free up some space\n" | 838 | "Free up some space\n" |
833 | "and try again.\n" | 839 | "and try again.\n" |
834 | "\nQuit anyway?"), | 840 | "\nQuit anyway?"), |
835 | QMessageBox::Yes|QMessageBox::Escape, | 841 | QMessageBox::Yes|QMessageBox::Escape, |
836 | QMessageBox::No|QMessageBox::Default ) | 842 | QMessageBox::No|QMessageBox::Default ) |
837 | != QMessageBox::No ) | 843 | != QMessageBox::No ) |
838 | return TRUE; | 844 | return TRUE; |
839 | else | 845 | else |
840 | return FALSE; | 846 | return FALSE; |
841 | } | 847 | } |
842 | return TRUE; | 848 | return TRUE; |
843 | } | 849 | } |
844 | 850 | ||
845 | #ifdef __DEBUG_RELEASE | 851 | #ifdef __DEBUG_RELEASE |
846 | void AddressbookWindow::slotSave() | 852 | void AddressbookWindow::slotSave() |
847 | { | 853 | { |
848 | save(); | 854 | save(); |
849 | } | 855 | } |
850 | #endif | 856 | #endif |
851 | 857 | ||
852 | 858 | ||
853 | void AddressbookWindow::slotNotFound() | 859 | void AddressbookWindow::slotNotFound() |
854 | { | 860 | { |
855 | qWarning("Got notfound signal!"); | 861 | qWarning("Got notfound signal!"); |
856 | QMessageBox::information( this, tr( "Not Found" ), | 862 | QMessageBox::information( this, tr( "Not Found" ), |
857 | tr( "Unable to find a contact for this \n search pattern!" ) ); | 863 | tr( "Unable to find a contact for this \n search pattern!" ) ); |
858 | 864 | ||
859 | 865 | ||
860 | } | 866 | } |
861 | void AddressbookWindow::slotWrapAround() | 867 | void AddressbookWindow::slotWrapAround() |
862 | { | 868 | { |
863 | qWarning("Got wrap signal!"); | 869 | qWarning("Got wrap signal!"); |
864 | // if ( doNotifyWrapAround ) | 870 | // if ( doNotifyWrapAround ) |
865 | // QMessageBox::information( this, tr( "End of list" ), | 871 | // QMessageBox::information( this, tr( "End of list" ), |
866 | // tr( "End of list. Wrap around now...!" ) + "\n" ); | 872 | // tr( "End of list. Wrap around now...!" ) + "\n" ); |
867 | 873 | ||
868 | } | 874 | } |
869 | 875 | ||
870 | void AddressbookWindow::slotSetCategory( int c ) | 876 | void AddressbookWindow::slotSetCategory( int c ) |
871 | { | 877 | { |
872 | qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); | 878 | qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); |
873 | 879 | ||
874 | QString cat, book; | 880 | QString cat, book; |
875 | AbView::Views view = AbView::TableView; | 881 | AbView::Views view = AbView::TableView; |
876 | 882 | ||
877 | if ( c <= 0 ) | 883 | if ( c <= 0 ) |
878 | return; | 884 | return; |
879 | 885 | ||
880 | // Switch view | 886 | // Switch view |
881 | if ( c < 3 ) | 887 | if ( c < 3 ) |
882 | for ( unsigned int i = 1; i < 3; i++ ){ | 888 | for ( unsigned int i = 1; i < 3; i++ ){ |
883 | if ( catMenu ) | 889 | if ( catMenu ) |
884 | catMenu->setItemChecked( i, c == (int)i ); | 890 | catMenu->setItemChecked( i, c == (int)i ); |
885 | } | 891 | } |
886 | else | 892 | else |
887 | // Checkmark Category Menu Item Selected | 893 | // Checkmark Category Menu Item Selected |
888 | for ( unsigned int i = 3; i < catMenu->count(); i++ ) | 894 | for ( unsigned int i = 3; i < catMenu->count(); i++ ) |
889 | catMenu->setItemChecked( i, c == (int)i ); | 895 | catMenu->setItemChecked( i, c == (int)i ); |
890 | 896 | ||
891 | // Now switch to the selected category | 897 | // Now switch to the selected category |
892 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) { | 898 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) { |
893 | if (catMenu->isItemChecked( i )) { | 899 | if (catMenu->isItemChecked( i )) { |
894 | if ( i == 1 ){ // default List view | 900 | if ( i == 1 ){ // default List view |
895 | book = QString::null; | 901 | book = QString::null; |
896 | view = AbView::TableView; | 902 | view = AbView::TableView; |
897 | }else if ( i == 2 ){ | 903 | }else if ( i == 2 ){ |
898 | book = tr( "Cards" ); | 904 | book = tr( "Cards" ); |
899 | view = AbView::CardView; | 905 | view = AbView::CardView; |
900 | // }else if ( i == 3 ){ | 906 | // }else if ( i == 3 ){ |
901 | // book = tr( "Personal" ); | 907 | // book = tr( "Personal" ); |
902 | // view = AbView:: PersonalView; | 908 | // view = AbView:: PersonalView; |
903 | }else if ( i == 3 ){ // default All Categories | 909 | }else if ( i == 3 ){ // default All Categories |
904 | cat = QString::null; | 910 | cat = QString::null; |
905 | }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled | 911 | }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled |
906 | cat = "Unfiled"; | 912 | cat = "Unfiled"; |
907 | qWarning ("Unfiled selected!!!"); | 913 | qWarning ("Unfiled selected!!!"); |
908 | }else{ | 914 | }else{ |
909 | cat = m_abView->categories()[i - 4]; | 915 | cat = m_abView->categories()[i - 4]; |
910 | } | 916 | } |
911 | } | 917 | } |
912 | } | 918 | } |
913 | 919 | ||
914 | // Switch to the selected View | 920 | // Switch to the selected View |
915 | slotViewSwitched( view ); | 921 | slotViewSwitched( view ); |
916 | 922 | ||
917 | // Tell the view about the selected category | 923 | // Tell the view about the selected category |
918 | m_abView -> setShowByCategory( cat ); | 924 | m_abView -> setShowByCategory( cat ); |
919 | 925 | ||
920 | if ( book.isEmpty() ) | 926 | if ( book.isEmpty() ) |
921 | book = "List"; | 927 | book = "List"; |
922 | if ( cat.isEmpty() ) | 928 | if ( cat.isEmpty() ) |
923 | cat = "All"; | 929 | cat = "All"; |
924 | 930 | ||
925 | setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); | 931 | setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); |
926 | } | 932 | } |
927 | 933 | ||
928 | void AddressbookWindow::slotViewSwitched( int view ) | 934 | void AddressbookWindow::slotViewSwitched( int view ) |
929 | { | 935 | { |
930 | qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); | 936 | qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); |
931 | int menu = 0; | 937 | int menu = 0; |
932 | 938 | ||
933 | // Switch to selected view | 939 | // Switch to selected view |
934 | switch ( view ){ | 940 | switch ( view ){ |
935 | case AbView::TableView: | 941 | case AbView::TableView: |
936 | menu = 1; | 942 | menu = 1; |
937 | m_tableViewButton->setOn(true); | 943 | m_tableViewButton->setOn(true); |
938 | m_cardViewButton->setOn(false); | 944 | m_cardViewButton->setOn(false); |
939 | break; | 945 | break; |
940 | case AbView::CardView: | 946 | case AbView::CardView: |
941 | menu = 2; | 947 | menu = 2; |
942 | m_tableViewButton->setOn(false); | 948 | m_tableViewButton->setOn(false); |
943 | m_cardViewButton->setOn(true); | 949 | m_cardViewButton->setOn(true); |
944 | break; | 950 | break; |
945 | } | 951 | } |
946 | for ( unsigned int i = 1; i < 3; i++ ){ | 952 | for ( unsigned int i = 1; i < 3; i++ ){ |
947 | if ( catMenu ) | 953 | if ( catMenu ) |
948 | catMenu->setItemChecked( i, menu == (int)i ); | 954 | catMenu->setItemChecked( i, menu == (int)i ); |
949 | } | 955 | } |
950 | 956 | ||
951 | // Tell the view about the selected view | 957 | // Tell the view about the selected view |
952 | m_abView -> setShowToView ( (AbView::Views) view ); | 958 | m_abView -> setShowToView ( (AbView::Views) view ); |
953 | active_view = view; | 959 | active_view = view; |
954 | } | 960 | } |
955 | 961 | ||
956 | 962 | ||
957 | void AddressbookWindow::slotListView() | 963 | void AddressbookWindow::slotListView() |
958 | { | 964 | { |
959 | slotViewSwitched( AbView::TableView ); | 965 | slotViewSwitched( AbView::TableView ); |
960 | } | 966 | } |
961 | 967 | ||
962 | void AddressbookWindow::slotCardView() | 968 | void AddressbookWindow::slotCardView() |
963 | { | 969 | { |
964 | slotViewSwitched( AbView::CardView ); | 970 | slotViewSwitched( AbView::CardView ); |
965 | } | 971 | } |
966 | 972 | ||
967 | void AddressbookWindow::slotSetLetter( char c ) { | 973 | void AddressbookWindow::slotSetLetter( char c ) { |
968 | 974 | ||
969 | m_abView->setShowByLetter( c ); | 975 | m_abView->setShowByLetter( c ); |
970 | 976 | ||
971 | } | 977 | } |
972 | 978 | ||
973 | 979 | ||
974 | void AddressbookWindow::populateCategories() | 980 | void AddressbookWindow::populateCategories() |
975 | { | 981 | { |
976 | catMenu->clear(); | 982 | catMenu->clear(); |
977 | 983 | ||
978 | int id, rememberId; | 984 | int id, rememberId; |
979 | id = 1; | 985 | id = 1; |
980 | rememberId = 0; | 986 | rememberId = 0; |
981 | 987 | ||
982 | catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); | 988 | catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); |
983 | catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); | 989 | catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); |
984 | // catMenu->insertItem( tr( "Personal" ), id++ ); | 990 | // catMenu->insertItem( tr( "Personal" ), id++ ); |
985 | catMenu->insertSeparator(); | 991 | catMenu->insertSeparator(); |
986 | 992 | ||
987 | catMenu->insertItem( tr( "All" ), id++ ); | 993 | catMenu->insertItem( tr( "All" ), id++ ); |
988 | QStringList categories = m_abView->categories(); | 994 | QStringList categories = m_abView->categories(); |
989 | categories.append( tr( "Unfiled" ) ); | 995 | categories.append( tr( "Unfiled" ) ); |
990 | for ( QStringList::Iterator it = categories.begin(); | 996 | for ( QStringList::Iterator it = categories.begin(); |
991 | it != categories.end(); ++it ) { | 997 | it != categories.end(); ++it ) { |
992 | catMenu->insertItem( *it, id ); | 998 | catMenu->insertItem( *it, id ); |
993 | if ( *it == m_abView -> showCategory() ) | 999 | if ( *it == m_abView -> showCategory() ) |
994 | rememberId = id; | 1000 | rememberId = id; |
995 | ++id; | 1001 | ++id; |
996 | } | 1002 | } |
997 | 1003 | ||
998 | 1004 | ||
999 | if ( m_abView -> showCategory().isEmpty() ) { | 1005 | if ( m_abView -> showCategory().isEmpty() ) { |
1000 | slotSetCategory( 3 ); | 1006 | slotSetCategory( 3 ); |
1001 | } | 1007 | } |
1002 | else { | 1008 | else { |
1003 | slotSetCategory( rememberId ); | 1009 | slotSetCategory( rememberId ); |
1004 | } | 1010 | } |
1005 | } | 1011 | } |
1006 | 1012 | ||
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index f2f4141..629feef 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp | |||
@@ -1,151 +1,154 @@ | |||
1 | #include "configdlg.h" | 1 | #include "configdlg.h" |
2 | #include "ocontactfields.h" | 2 | #include "ocontactfields.h" |
3 | 3 | ||
4 | #include <qcheckbox.h> | 4 | #include <qcheckbox.h> |
5 | #include <qradiobutton.h> | 5 | #include <qradiobutton.h> |
6 | #include <qlistbox.h> | 6 | #include <qlistbox.h> |
7 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qiconset.h> | 8 | #include <qiconset.h> |
9 | 9 | ||
10 | #include <qpe/resource.h> | 10 | #include <qpe/resource.h> |
11 | 11 | ||
12 | #include <opie/ocontact.h> | 12 | #include <opie/ocontact.h> |
13 | 13 | ||
14 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | 14 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): |
15 | ConfigDlg_Base(parent, name, true ) | 15 | ConfigDlg_Base(parent, name, true ) |
16 | { | 16 | { |
17 | contFields = OContactFields::trfields(); | 17 | contFields = OContactFields::trfields(); |
18 | 18 | ||
19 | // We add all Fields into the Listbox | 19 | // We add all Fields into the Listbox |
20 | for (uint i=0; i < contFields.count(); i++) { | 20 | for (uint i=0; i < contFields.count(); i++) { |
21 | allFieldListBox->insertItem( contFields[i] ); | 21 | allFieldListBox->insertItem( contFields[i] ); |
22 | } | 22 | } |
23 | 23 | ||
24 | // Reset Widget Flags: This was not changeable by designer :( | 24 | // Reset Widget Flags: This was not changeable by designer :( |
25 | setWFlags ( WStyle_ContextHelp ); | 25 | setWFlags ( WStyle_ContextHelp ); |
26 | 26 | ||
27 | // Set Pics to Buttons and Tabs | 27 | // Set Pics to Buttons and Tabs |
28 | m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) ); | 28 | m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) ); |
29 | m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) ); | 29 | m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) ); |
30 | m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) ); | 30 | m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) ); |
31 | m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); | 31 | m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); |
32 | 32 | ||
33 | 33 | ||
34 | // Get the translation maps between Field ID and translated strings | 34 | // Get the translation maps between Field ID and translated strings |
35 | m_mapStrToID = OContactFields::trFieldsToId(); | 35 | m_mapStrToID = OContactFields::trFieldsToId(); |
36 | m_mapIDToStr = OContactFields::idToTrFields(); | 36 | m_mapIDToStr = OContactFields::idToTrFields(); |
37 | 37 | ||
38 | connect ( m_addButton, SIGNAL( clicked() ), this, SLOT( slotItemAdd() ) ); | 38 | connect ( m_addButton, SIGNAL( clicked() ), this, SLOT( slotItemAdd() ) ); |
39 | connect ( m_removeButton, SIGNAL( clicked() ), this, SLOT( slotItemRemove() ) ); | 39 | connect ( m_removeButton, SIGNAL( clicked() ), this, SLOT( slotItemRemove() ) ); |
40 | connect ( m_upButton, SIGNAL( clicked() ), this, SLOT( slotItemUp() ) ); | 40 | connect ( m_upButton, SIGNAL( clicked() ), this, SLOT( slotItemUp() ) ); |
41 | connect ( m_downButton, SIGNAL( clicked() ), this, SLOT( slotItemDown() ) ); | 41 | connect ( m_downButton, SIGNAL( clicked() ), this, SLOT( slotItemDown() ) ); |
42 | } | 42 | } |
43 | 43 | ||
44 | void ConfigDlg::slotItemUp() | 44 | void ConfigDlg::slotItemUp() |
45 | { | 45 | { |
46 | qWarning( "void ConfigDlg::slotItemUp()" ); | 46 | qWarning( "void ConfigDlg::slotItemUp()" ); |
47 | 47 | ||
48 | int i = fieldListBox->currentItem(); | 48 | int i = fieldListBox->currentItem(); |
49 | if ( i > 0 ) { | 49 | if ( i > 0 ) { |
50 | QString item = fieldListBox->currentText(); | 50 | QString item = fieldListBox->currentText(); |
51 | fieldListBox->removeItem( i ); | 51 | fieldListBox->removeItem( i ); |
52 | fieldListBox->insertItem( item, i-1 ); | 52 | fieldListBox->insertItem( item, i-1 ); |
53 | fieldListBox->setCurrentItem( i-1 ); | 53 | fieldListBox->setCurrentItem( i-1 ); |
54 | } | 54 | } |
55 | 55 | ||
56 | } | 56 | } |
57 | 57 | ||
58 | void ConfigDlg::slotItemDown() | 58 | void ConfigDlg::slotItemDown() |
59 | { | 59 | { |
60 | qWarning( "void ConfigDlg::slotItemDown()" ); | 60 | qWarning( "void ConfigDlg::slotItemDown()" ); |
61 | 61 | ||
62 | int i = fieldListBox->currentItem(); | 62 | int i = fieldListBox->currentItem(); |
63 | if ( i < (int)fieldListBox->count() - 1 ) { | 63 | if ( i < (int)fieldListBox->count() - 1 ) { |
64 | QString item = fieldListBox->currentText(); | 64 | QString item = fieldListBox->currentText(); |
65 | fieldListBox->removeItem( i ); | 65 | fieldListBox->removeItem( i ); |
66 | fieldListBox->insertItem( item, i+1 ); | 66 | fieldListBox->insertItem( item, i+1 ); |
67 | fieldListBox->setCurrentItem( i+1 ); | 67 | fieldListBox->setCurrentItem( i+1 ); |
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | void ConfigDlg::slotItemAdd() | 71 | void ConfigDlg::slotItemAdd() |
72 | { | 72 | { |
73 | qWarning( "void ConfigDlg::slotItemAdd()" ); | 73 | qWarning( "void ConfigDlg::slotItemAdd()" ); |
74 | 74 | ||
75 | int i = allFieldListBox->currentItem(); | 75 | int i = allFieldListBox->currentItem(); |
76 | if ( i > 0 ) { | 76 | if ( i > 0 ) { |
77 | QString item = allFieldListBox->currentText(); | 77 | QString item = allFieldListBox->currentText(); |
78 | qWarning("ADding %s", item.latin1()); | 78 | qWarning("ADding %s", item.latin1()); |
79 | fieldListBox->insertItem( item ); | 79 | fieldListBox->insertItem( item ); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | void ConfigDlg::slotItemRemove() | 83 | void ConfigDlg::slotItemRemove() |
84 | { | 84 | { |
85 | qWarning( "void ConfigDlg::slotItemRemove()" ); | 85 | qWarning( "void ConfigDlg::slotItemRemove()" ); |
86 | 86 | ||
87 | int i = fieldListBox->currentItem(); | 87 | int i = fieldListBox->currentItem(); |
88 | if ( i > 0 ) { | 88 | if ( i > 0 ) { |
89 | fieldListBox->removeItem( i ); | 89 | fieldListBox->removeItem( i ); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | void ConfigDlg::setConfig( const AbConfig& cnf ) | 93 | void ConfigDlg::setConfig( const AbConfig& cnf ) |
94 | { | 94 | { |
95 | m_config = cnf; | 95 | m_config = cnf; |
96 | 96 | ||
97 | m_useRegExp->setChecked( m_config.useRegExp() ); | 97 | m_useRegExp->setChecked( m_config.useRegExp() ); |
98 | m_useWildCard->setChecked( m_config.useWildCards() ); | 98 | m_useWildCard->setChecked( m_config.useWildCards() ); |
99 | m_useQtMail->setChecked( m_config.useQtMail() ); | 99 | m_useQtMail->setChecked( m_config.useQtMail() ); |
100 | m_useOpieMail->setChecked( m_config.useOpieMail() ); | 100 | m_useOpieMail->setChecked( m_config.useOpieMail() ); |
101 | m_useCaseSensitive->setChecked( m_config.beCaseSensitive() ); | 101 | m_useCaseSensitive->setChecked( m_config.beCaseSensitive() ); |
102 | 102 | ||
103 | switch( m_config.fontSize() ){ | 103 | switch( m_config.fontSize() ){ |
104 | case 0: | 104 | case 0: |
105 | m_smallFont->setChecked( true ); | 105 | m_smallFont->setChecked( true ); |
106 | m_normalFont->setChecked( false ); | 106 | m_normalFont->setChecked( false ); |
107 | m_largeFont->setChecked( false ); | 107 | m_largeFont->setChecked( false ); |
108 | break; | 108 | break; |
109 | case 1: | 109 | case 1: |
110 | m_smallFont->setChecked( false ); | 110 | m_smallFont->setChecked( false ); |
111 | m_normalFont->setChecked( true ); | 111 | m_normalFont->setChecked( true ); |
112 | m_largeFont->setChecked( false ); | 112 | m_largeFont->setChecked( false ); |
113 | break; | 113 | break; |
114 | case 2: | 114 | case 2: |
115 | m_smallFont->setChecked( false ); | 115 | m_smallFont->setChecked( false ); |
116 | m_normalFont->setChecked( false ); | 116 | m_normalFont->setChecked( false ); |
117 | m_largeFont->setChecked( true ); | 117 | m_largeFont->setChecked( true ); |
118 | break; | 118 | break; |
119 | } | 119 | } |
120 | 120 | ||
121 | for( uint i = 0; i < m_config.orderList().count(); i++ ) { | 121 | for( uint i = 0; i < m_config.orderList().count(); i++ ) { |
122 | fieldListBox -> insertItem ( m_mapIDToStr[ m_config.orderList()[i] ] ); | 122 | fieldListBox -> insertItem ( m_mapIDToStr[ m_config.orderList()[i] ] ); |
123 | } | 123 | } |
124 | 124 | ||
125 | 125 | m_fixedBars->setChecked( m_config.fixedBars() ); | |
126 | m_moveBars->setChecked( !m_config.fixedBars() ); | ||
126 | } | 127 | } |
127 | 128 | ||
128 | AbConfig ConfigDlg::getConfig() | 129 | AbConfig ConfigDlg::getConfig() |
129 | { | 130 | { |
130 | m_config.setUseRegExp( m_useRegExp->isOn() ); | 131 | m_config.setUseRegExp( m_useRegExp->isOn() ); |
131 | m_config.setUseWildCards( m_useWildCard->isOn() ); | 132 | m_config.setUseWildCards( m_useWildCard->isOn() ); |
132 | m_config.setUseQtMail( m_useQtMail->isOn() ); | 133 | m_config.setUseQtMail( m_useQtMail->isOn() ); |
133 | m_config.setUseOpieMail( m_useOpieMail->isOn() ); | 134 | m_config.setUseOpieMail( m_useOpieMail->isOn() ); |
134 | m_config.setBeCaseSensitive( m_useCaseSensitive->isChecked() ); | 135 | m_config.setBeCaseSensitive( m_useCaseSensitive->isChecked() ); |
135 | 136 | ||
136 | if ( m_smallFont->isChecked() ) | 137 | if ( m_smallFont->isChecked() ) |
137 | m_config.setFontSize( 0 ); | 138 | m_config.setFontSize( 0 ); |
138 | if ( m_normalFont->isChecked() ) | 139 | if ( m_normalFont->isChecked() ) |
139 | m_config.setFontSize( 1 ); | 140 | m_config.setFontSize( 1 ); |
140 | if ( m_largeFont->isChecked() ) | 141 | if ( m_largeFont->isChecked() ) |
141 | m_config.setFontSize( 2 ); | 142 | m_config.setFontSize( 2 ); |
142 | 143 | ||
143 | QValueList<int> orderlist; | 144 | QValueList<int> orderlist; |
144 | for( int i = 0; i < (int)fieldListBox->count(); i++ ) { | 145 | for( int i = 0; i < (int)fieldListBox->count(); i++ ) { |
145 | orderlist.append( m_mapStrToID[ fieldListBox->text(i) ] ); | 146 | orderlist.append( m_mapStrToID[ fieldListBox->text(i) ] ); |
146 | } | 147 | } |
147 | m_config.setOrderList( orderlist ); | 148 | m_config.setOrderList( orderlist ); |
148 | 149 | ||
150 | m_config.setFixedBars( m_fixedBars->isChecked() ); | ||
151 | |||
149 | return m_config; | 152 | return m_config; |
150 | } | 153 | } |
151 | 154 | ||
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui index 308e138..1b5ac17 100644 --- a/core/pim/addressbook/configdlg_base.ui +++ b/core/pim/addressbook/configdlg_base.ui | |||
@@ -1,620 +1,679 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>ConfigDlg_Base</class> | 2 | <class>ConfigDlg_Base</class> |
3 | <author>Stefan Eilers</author> | 3 | <author>Stefan Eilers</author> |
4 | <include location="global">qwhatsthis.h</include> | 4 | <include location="global">qwhatsthis.h</include> |
5 | <widget> | 5 | <widget> |
6 | <class>QDialog</class> | 6 | <class>QDialog</class> |
7 | <property stdset="1"> | 7 | <property stdset="1"> |
8 | <name>name</name> | 8 | <name>name</name> |
9 | <cstring>Configuration</cstring> | 9 | <cstring>Configuration</cstring> |
10 | </property> | 10 | </property> |
11 | <property stdset="1"> | 11 | <property stdset="1"> |
12 | <name>geometry</name> | 12 | <name>geometry</name> |
13 | <rect> | 13 | <rect> |
14 | <x>0</x> | 14 | <x>0</x> |
15 | <y>0</y> | 15 | <y>0</y> |
16 | <width>284</width> | 16 | <width>284</width> |
17 | <height>327</height> | 17 | <height>327</height> |
18 | </rect> | 18 | </rect> |
19 | </property> | 19 | </property> |
20 | <property stdset="1"> | 20 | <property stdset="1"> |
21 | <name>sizePolicy</name> | 21 | <name>sizePolicy</name> |
22 | <sizepolicy> | 22 | <sizepolicy> |
23 | <hsizetype>5</hsizetype> | 23 | <hsizetype>5</hsizetype> |
24 | <vsizetype>5</vsizetype> | 24 | <vsizetype>5</vsizetype> |
25 | </sizepolicy> | 25 | </sizepolicy> |
26 | </property> | 26 | </property> |
27 | <property stdset="1"> | 27 | <property stdset="1"> |
28 | <name>caption</name> | 28 | <name>caption</name> |
29 | <string>Configuration</string> | 29 | <string>Configuration</string> |
30 | </property> | 30 | </property> |
31 | <property stdset="1"> | 31 | <property stdset="1"> |
32 | <name>sizeGripEnabled</name> | 32 | <name>sizeGripEnabled</name> |
33 | <bool>true</bool> | 33 | <bool>true</bool> |
34 | </property> | 34 | </property> |
35 | <property> | 35 | <property> |
36 | <name>layoutMargin</name> | 36 | <name>layoutMargin</name> |
37 | </property> | 37 | </property> |
38 | <vbox> | 38 | <vbox> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>margin</name> | 40 | <name>margin</name> |
41 | <number>1</number> | 41 | <number>1</number> |
42 | </property> | 42 | </property> |
43 | <property stdset="1"> | 43 | <property stdset="1"> |
44 | <name>spacing</name> | 44 | <name>spacing</name> |
45 | <number>6</number> | 45 | <number>6</number> |
46 | </property> | 46 | </property> |
47 | <widget> | 47 | <widget> |
48 | <class>QTabWidget</class> | 48 | <class>QTabWidget</class> |
49 | <property stdset="1"> | 49 | <property stdset="1"> |
50 | <name>name</name> | 50 | <name>name</name> |
51 | <cstring>configDlg_base</cstring> | 51 | <cstring>configDlg_base</cstring> |
52 | </property> | 52 | </property> |
53 | <property stdset="1"> | 53 | <property stdset="1"> |
54 | <name>sizePolicy</name> | 54 | <name>sizePolicy</name> |
55 | <sizepolicy> | 55 | <sizepolicy> |
56 | <hsizetype>7</hsizetype> | 56 | <hsizetype>7</hsizetype> |
57 | <vsizetype>7</vsizetype> | 57 | <vsizetype>7</vsizetype> |
58 | </sizepolicy> | 58 | </sizepolicy> |
59 | </property> | 59 | </property> |
60 | <property> | 60 | <property> |
61 | <name>layoutMargin</name> | 61 | <name>layoutMargin</name> |
62 | </property> | 62 | </property> |
63 | <property> | 63 | <property> |
64 | <name>layoutSpacing</name> | 64 | <name>layoutSpacing</name> |
65 | </property> | 65 | </property> |
66 | <property> | 66 | <property> |
67 | <name>whatsThis</name> | 67 | <name>whatsThis</name> |
68 | <string>Click on tab to select one</string> | 68 | <string>Click on tab to select one</string> |
69 | </property> | 69 | </property> |
70 | <widget> | 70 | <widget> |
71 | <class>QWidget</class> | 71 | <class>QWidget</class> |
72 | <property stdset="1"> | 72 | <property stdset="1"> |
73 | <name>name</name> | 73 | <name>name</name> |
74 | <cstring>Widget5</cstring> | 74 | <cstring>Widget5</cstring> |
75 | </property> | 75 | </property> |
76 | <attribute> | 76 | <attribute> |
77 | <name>title</name> | 77 | <name>title</name> |
78 | <string>Misc</string> | 78 | <string>Misc</string> |
79 | </attribute> | 79 | </attribute> |
80 | <vbox> | 80 | <vbox> |
81 | <property stdset="1"> | 81 | <property stdset="1"> |
82 | <name>margin</name> | 82 | <name>margin</name> |
83 | <number>5</number> | 83 | <number>2</number> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>spacing</name> | 86 | <name>spacing</name> |
87 | <number>6</number> | 87 | <number>6</number> |
88 | </property> | 88 | </property> |
89 | <widget> | 89 | <widget> |
90 | <class>QGroupBox</class> | 90 | <class>QGroupBox</class> |
91 | <property stdset="1"> | 91 | <property stdset="1"> |
92 | <name>name</name> | 92 | <name>name</name> |
93 | <cstring>GroupBox2</cstring> | 93 | <cstring>GroupBox2</cstring> |
94 | </property> | 94 | </property> |
95 | <property stdset="1"> | 95 | <property stdset="1"> |
96 | <name>title</name> | 96 | <name>title</name> |
97 | <string>Search Settings</string> | 97 | <string>Search Settings</string> |
98 | </property> | 98 | </property> |
99 | <vbox> | 99 | <vbox> |
100 | <property stdset="1"> | 100 | <property stdset="1"> |
101 | <name>margin</name> | 101 | <name>margin</name> |
102 | <number>11</number> | 102 | <number>11</number> |
103 | </property> | 103 | </property> |
104 | <property stdset="1"> | 104 | <property stdset="1"> |
105 | <name>spacing</name> | 105 | <name>spacing</name> |
106 | <number>6</number> | 106 | <number>6</number> |
107 | </property> | 107 | </property> |
108 | <widget> | 108 | <widget> |
109 | <class>QButtonGroup</class> | 109 | <class>QButtonGroup</class> |
110 | <property stdset="1"> | 110 | <property stdset="1"> |
111 | <name>name</name> | 111 | <name>name</name> |
112 | <cstring>ButtonGroup1</cstring> | 112 | <cstring>ButtonGroup1</cstring> |
113 | </property> | 113 | </property> |
114 | <property stdset="1"> | 114 | <property stdset="1"> |
115 | <name>title</name> | 115 | <name>title</name> |
116 | <string>Query Style</string> | 116 | <string>Query Style</string> |
117 | </property> | 117 | </property> |
118 | <property> | 118 | <property> |
119 | <name>whatsThis</name> | 119 | <name>whatsThis</name> |
120 | <string>Settings for the search query style</string> | 120 | <string>Settings for the search query style</string> |
121 | </property> | 121 | </property> |
122 | <vbox> | 122 | <vbox> |
123 | <property stdset="1"> | 123 | <property stdset="1"> |
124 | <name>margin</name> | 124 | <name>margin</name> |
125 | <number>11</number> | 125 | <number>11</number> |
126 | </property> | 126 | </property> |
127 | <property stdset="1"> | 127 | <property stdset="1"> |
128 | <name>spacing</name> | 128 | <name>spacing</name> |
129 | <number>6</number> | 129 | <number>6</number> |
130 | </property> | 130 | </property> |
131 | <widget> | 131 | <widget> |
132 | <class>QRadioButton</class> | 132 | <class>QRadioButton</class> |
133 | <property stdset="1"> | 133 | <property stdset="1"> |
134 | <name>name</name> | 134 | <name>name</name> |
135 | <cstring>m_useRegExp</cstring> | 135 | <cstring>m_useRegExp</cstring> |
136 | </property> | 136 | </property> |
137 | <property stdset="1"> | 137 | <property stdset="1"> |
138 | <name>text</name> | 138 | <name>text</name> |
139 | <string>Use Regular Expressions</string> | 139 | <string>Use Regular Expressions</string> |
140 | </property> | 140 | </property> |
141 | <property> | 141 | <property> |
142 | <name>whatsThis</name> | 142 | <name>whatsThis</name> |
143 | <string>Search widget expects regular expressions if selected</string> | 143 | <string>Search widget expects regular expressions if selected</string> |
144 | </property> | 144 | </property> |
145 | </widget> | 145 | </widget> |
146 | <widget> | 146 | <widget> |
147 | <class>QRadioButton</class> | 147 | <class>QRadioButton</class> |
148 | <property stdset="1"> | 148 | <property stdset="1"> |
149 | <name>name</name> | 149 | <name>name</name> |
150 | <cstring>m_useWildCard</cstring> | 150 | <cstring>m_useWildCard</cstring> |
151 | </property> | 151 | </property> |
152 | <property stdset="1"> | 152 | <property stdset="1"> |
153 | <name>text</name> | 153 | <name>text</name> |
154 | <string>Use Wildcards (*,?)</string> | 154 | <string>Use Wildcards (*,?)</string> |
155 | </property> | 155 | </property> |
156 | <property stdset="1"> | 156 | <property stdset="1"> |
157 | <name>checked</name> | 157 | <name>checked</name> |
158 | <bool>true</bool> | 158 | <bool>true</bool> |
159 | </property> | 159 | </property> |
160 | <property> | 160 | <property> |
161 | <name>whatsThis</name> | 161 | <name>whatsThis</name> |
162 | <string>Search widget just expects simple wildcards</string> | 162 | <string>Search widget just expects simple wildcards</string> |
163 | </property> | 163 | </property> |
164 | </widget> | 164 | </widget> |
165 | </vbox> | 165 | </vbox> |
166 | </widget> | 166 | </widget> |
167 | <widget> | 167 | <widget> |
168 | <class>QCheckBox</class> | 168 | <class>QCheckBox</class> |
169 | <property stdset="1"> | 169 | <property stdset="1"> |
170 | <name>name</name> | 170 | <name>name</name> |
171 | <cstring>m_useCaseSensitive</cstring> | 171 | <cstring>m_useCaseSensitive</cstring> |
172 | </property> | 172 | </property> |
173 | <property stdset="1"> | 173 | <property stdset="1"> |
174 | <name>text</name> | 174 | <name>text</name> |
175 | <string>Case Sensitive</string> | 175 | <string>Case Sensitive</string> |
176 | </property> | 176 | </property> |
177 | <property> | 177 | <property> |
178 | <name>whatsThis</name> | 178 | <name>whatsThis</name> |
179 | <string>If selected, search differs between upper and lower chars</string> | 179 | <string>If selected, search differs between upper and lower chars</string> |
180 | </property> | 180 | </property> |
181 | </widget> | 181 | </widget> |
182 | </vbox> | 182 | </vbox> |
183 | </widget> | 183 | </widget> |
184 | <widget> | 184 | <widget> |
185 | <class>QButtonGroup</class> | 185 | <class>QButtonGroup</class> |
186 | <property stdset="1"> | 186 | <property stdset="1"> |
187 | <name>name</name> | 187 | <name>name</name> |
188 | <cstring>ButtonGroup3</cstring> | 188 | <cstring>ButtonGroup3</cstring> |
189 | </property> | 189 | </property> |
190 | <property stdset="1"> | 190 | <property stdset="1"> |
191 | <name>title</name> | 191 | <name>title</name> |
192 | <string>Font</string> | 192 | <string>Font</string> |
193 | </property> | 193 | </property> |
194 | <property> | 194 | <property> |
195 | <name>whatsThis</name> | 195 | <name>whatsThis</name> |
196 | <string></string> | 196 | <string></string> |
197 | </property> | 197 | </property> |
198 | <hbox> | 198 | <hbox> |
199 | <property stdset="1"> | 199 | <property stdset="1"> |
200 | <name>margin</name> | 200 | <name>margin</name> |
201 | <number>11</number> | 201 | <number>11</number> |
202 | </property> | 202 | </property> |
203 | <property stdset="1"> | 203 | <property stdset="1"> |
204 | <name>spacing</name> | 204 | <name>spacing</name> |
205 | <number>6</number> | 205 | <number>6</number> |
206 | </property> | 206 | </property> |
207 | <widget> | 207 | <widget> |
208 | <class>QRadioButton</class> | 208 | <class>QRadioButton</class> |
209 | <property stdset="1"> | 209 | <property stdset="1"> |
210 | <name>name</name> | 210 | <name>name</name> |
211 | <cstring>m_smallFont</cstring> | 211 | <cstring>m_smallFont</cstring> |
212 | </property> | 212 | </property> |
213 | <property stdset="1"> | 213 | <property stdset="1"> |
214 | <name>text</name> | 214 | <name>text</name> |
215 | <string>Small</string> | 215 | <string>Small</string> |
216 | </property> | 216 | </property> |
217 | <property> | 217 | <property> |
218 | <name>whatsThis</name> | 218 | <name>whatsThis</name> |
219 | <string>Font size for list- and card view</string> | 219 | <string>Font size for list- and card view</string> |
220 | </property> | 220 | </property> |
221 | </widget> | 221 | </widget> |
222 | <widget> | 222 | <widget> |
223 | <class>QRadioButton</class> | 223 | <class>QRadioButton</class> |
224 | <property stdset="1"> | 224 | <property stdset="1"> |
225 | <name>name</name> | 225 | <name>name</name> |
226 | <cstring>m_normalFont</cstring> | 226 | <cstring>m_normalFont</cstring> |
227 | </property> | 227 | </property> |
228 | <property stdset="1"> | 228 | <property stdset="1"> |
229 | <name>text</name> | 229 | <name>text</name> |
230 | <string>Normal</string> | 230 | <string>Normal</string> |
231 | </property> | 231 | </property> |
232 | <property stdset="1"> | 232 | <property stdset="1"> |
233 | <name>checked</name> | 233 | <name>checked</name> |
234 | <bool>true</bool> | 234 | <bool>true</bool> |
235 | </property> | 235 | </property> |
236 | <property> | 236 | <property> |
237 | <name>whatsThis</name> | 237 | <name>whatsThis</name> |
238 | <string>Font size for list- and card view</string> | 238 | <string>Font size for list- and card view</string> |
239 | </property> | 239 | </property> |
240 | </widget> | 240 | </widget> |
241 | <widget> | 241 | <widget> |
242 | <class>QRadioButton</class> | 242 | <class>QRadioButton</class> |
243 | <property stdset="1"> | 243 | <property stdset="1"> |
244 | <name>name</name> | 244 | <name>name</name> |
245 | <cstring>m_largeFont</cstring> | 245 | <cstring>m_largeFont</cstring> |
246 | </property> | 246 | </property> |
247 | <property stdset="1"> | 247 | <property stdset="1"> |
248 | <name>text</name> | 248 | <name>text</name> |
249 | <string>Large</string> | 249 | <string>Large</string> |
250 | </property> | 250 | </property> |
251 | <property> | 251 | <property> |
252 | <name>whatsThis</name> | 252 | <name>whatsThis</name> |
253 | <string>Font size for list- and card view</string> | 253 | <string>Font size for list- and card view</string> |
254 | </property> | 254 | </property> |
255 | </widget> | 255 | </widget> |
256 | </hbox> | 256 | </hbox> |
257 | </widget> | 257 | </widget> |
258 | <widget> | ||
259 | <class>QButtonGroup</class> | ||
260 | <property stdset="1"> | ||
261 | <name>name</name> | ||
262 | <cstring>ButtonGroup4</cstring> | ||
263 | </property> | ||
264 | <property stdset="1"> | ||
265 | <name>title</name> | ||
266 | <string>Tool-/Menubar</string> | ||
267 | </property> | ||
268 | <hbox> | ||
269 | <property stdset="1"> | ||
270 | <name>margin</name> | ||
271 | <number>11</number> | ||
272 | </property> | ||
273 | <property stdset="1"> | ||
274 | <name>spacing</name> | ||
275 | <number>6</number> | ||
276 | </property> | ||
277 | <widget> | ||
278 | <class>QRadioButton</class> | ||
279 | <property stdset="1"> | ||
280 | <name>name</name> | ||
281 | <cstring>m_fixedBars</cstring> | ||
282 | </property> | ||
283 | <property stdset="1"> | ||
284 | <name>text</name> | ||
285 | <string>Fixed</string> | ||
286 | </property> | ||
287 | <property stdset="1"> | ||
288 | <name>checked</name> | ||
289 | <bool>true</bool> | ||
290 | </property> | ||
291 | <property> | ||
292 | <name>toolTip</name> | ||
293 | <string></string> | ||
294 | </property> | ||
295 | <property> | ||
296 | <name>whatsThis</name> | ||
297 | <string>Switch to fixed menu-/toolbars after restarting application !</string> | ||
298 | </property> | ||
299 | </widget> | ||
300 | <widget> | ||
301 | <class>QRadioButton</class> | ||
302 | <property stdset="1"> | ||
303 | <name>name</name> | ||
304 | <cstring>m_moveBars</cstring> | ||
305 | </property> | ||
306 | <property stdset="1"> | ||
307 | <name>text</name> | ||
308 | <string>Movable</string> | ||
309 | </property> | ||
310 | <property> | ||
311 | <name>whatsThis</name> | ||
312 | <string>Switch to moveable menu-/toolbars after restarting application !</string> | ||
313 | </property> | ||
314 | </widget> | ||
315 | </hbox> | ||
316 | </widget> | ||
258 | <spacer> | 317 | <spacer> |
259 | <property> | 318 | <property> |
260 | <name>name</name> | 319 | <name>name</name> |
261 | <cstring>Spacer3</cstring> | 320 | <cstring>Spacer3</cstring> |
262 | </property> | 321 | </property> |
263 | <property stdset="1"> | 322 | <property stdset="1"> |
264 | <name>orientation</name> | 323 | <name>orientation</name> |
265 | <enum>Vertical</enum> | 324 | <enum>Vertical</enum> |
266 | </property> | 325 | </property> |
267 | <property stdset="1"> | 326 | <property stdset="1"> |
268 | <name>sizeType</name> | 327 | <name>sizeType</name> |
269 | <enum>Expanding</enum> | 328 | <enum>Expanding</enum> |
270 | </property> | 329 | </property> |
271 | <property> | 330 | <property> |
272 | <name>sizeHint</name> | 331 | <name>sizeHint</name> |
273 | <size> | 332 | <size> |
274 | <width>20</width> | 333 | <width>20</width> |
275 | <height>20</height> | 334 | <height>20</height> |
276 | </size> | 335 | </size> |
277 | </property> | 336 | </property> |
278 | </spacer> | 337 | </spacer> |
279 | </vbox> | 338 | </vbox> |
280 | </widget> | 339 | </widget> |
281 | <widget> | 340 | <widget> |
282 | <class>QWidget</class> | 341 | <class>QWidget</class> |
283 | <property stdset="1"> | 342 | <property stdset="1"> |
284 | <name>name</name> | 343 | <name>name</name> |
285 | <cstring>tab</cstring> | 344 | <cstring>tab</cstring> |
286 | </property> | 345 | </property> |
287 | <attribute> | 346 | <attribute> |
288 | <name>title</name> | 347 | <name>title</name> |
289 | <string>Mail</string> | 348 | <string>Mail</string> |
290 | </attribute> | 349 | </attribute> |
291 | <vbox> | 350 | <vbox> |
292 | <property stdset="1"> | 351 | <property stdset="1"> |
293 | <name>margin</name> | 352 | <name>margin</name> |
294 | <number>5</number> | 353 | <number>5</number> |
295 | </property> | 354 | </property> |
296 | <property stdset="1"> | 355 | <property stdset="1"> |
297 | <name>spacing</name> | 356 | <name>spacing</name> |
298 | <number>6</number> | 357 | <number>6</number> |
299 | </property> | 358 | </property> |
300 | <widget> | 359 | <widget> |
301 | <class>QButtonGroup</class> | 360 | <class>QButtonGroup</class> |
302 | <property stdset="1"> | 361 | <property stdset="1"> |
303 | <name>name</name> | 362 | <name>name</name> |
304 | <cstring>ButtonGroup2</cstring> | 363 | <cstring>ButtonGroup2</cstring> |
305 | </property> | 364 | </property> |
306 | <property stdset="1"> | 365 | <property stdset="1"> |
307 | <name>title</name> | 366 | <name>title</name> |
308 | <string>Mail</string> | 367 | <string>Mail</string> |
309 | </property> | 368 | </property> |
310 | <property> | 369 | <property> |
311 | <name>whatsThis</name> | 370 | <name>whatsThis</name> |
312 | <string>Fontsettings for list and card view</string> | 371 | <string>Fontsettings for list and card view</string> |
313 | </property> | 372 | </property> |
314 | <vbox> | 373 | <vbox> |
315 | <property stdset="1"> | 374 | <property stdset="1"> |
316 | <name>margin</name> | 375 | <name>margin</name> |
317 | <number>11</number> | 376 | <number>11</number> |
318 | </property> | 377 | </property> |
319 | <property stdset="1"> | 378 | <property stdset="1"> |
320 | <name>spacing</name> | 379 | <name>spacing</name> |
321 | <number>6</number> | 380 | <number>6</number> |
322 | </property> | 381 | </property> |
323 | <widget> | 382 | <widget> |
324 | <class>QRadioButton</class> | 383 | <class>QRadioButton</class> |
325 | <property stdset="1"> | 384 | <property stdset="1"> |
326 | <name>name</name> | 385 | <name>name</name> |
327 | <cstring>m_useQtMail</cstring> | 386 | <cstring>m_useQtMail</cstring> |
328 | </property> | 387 | </property> |
329 | <property stdset="1"> | 388 | <property stdset="1"> |
330 | <name>text</name> | 389 | <name>text</name> |
331 | <string>Prefer QT-Mail </string> | 390 | <string>Prefer QT-Mail </string> |
332 | </property> | 391 | </property> |
333 | <property stdset="1"> | 392 | <property stdset="1"> |
334 | <name>checked</name> | 393 | <name>checked</name> |
335 | <bool>true</bool> | 394 | <bool>true</bool> |
336 | </property> | 395 | </property> |
337 | <property> | 396 | <property> |
338 | <name>whatsThis</name> | 397 | <name>whatsThis</name> |
339 | <string>Use Sharp's mail application if available</string> | 398 | <string>Use Sharp's mail application if available</string> |
340 | </property> | 399 | </property> |
341 | </widget> | 400 | </widget> |
342 | <widget> | 401 | <widget> |
343 | <class>QRadioButton</class> | 402 | <class>QRadioButton</class> |
344 | <property stdset="1"> | 403 | <property stdset="1"> |
345 | <name>name</name> | 404 | <name>name</name> |
346 | <cstring>m_useOpieMail</cstring> | 405 | <cstring>m_useOpieMail</cstring> |
347 | </property> | 406 | </property> |
348 | <property stdset="1"> | 407 | <property stdset="1"> |
349 | <name>text</name> | 408 | <name>text</name> |
350 | <string>Prefer Opie-Mail</string> | 409 | <string>Prefer Opie-Mail</string> |
351 | </property> | 410 | </property> |
352 | <property> | 411 | <property> |
353 | <name>whatsThis</name> | 412 | <name>whatsThis</name> |
354 | <string>Use OPIE mail if installed</string> | 413 | <string>Use OPIE mail if installed</string> |
355 | </property> | 414 | </property> |
356 | </widget> | 415 | </widget> |
357 | <widget> | 416 | <widget> |
358 | <class>QLabel</class> | 417 | <class>QLabel</class> |
359 | <property stdset="1"> | 418 | <property stdset="1"> |
360 | <name>name</name> | 419 | <name>name</name> |
361 | <cstring>TextLabel1</cstring> | 420 | <cstring>TextLabel1</cstring> |
362 | </property> | 421 | </property> |
363 | <property stdset="1"> | 422 | <property stdset="1"> |
364 | <name>text</name> | 423 | <name>text</name> |
365 | <string>Notice: QT-Mail is just | 424 | <string>Notice: QT-Mail is just |
366 | provided in the SHARP | 425 | provided in the SHARP |
367 | default ROM. Opie-Mail | 426 | default ROM. Opie-Mail |
368 | is provided free !</string> | 427 | is provided free !</string> |
369 | </property> | 428 | </property> |
370 | </widget> | 429 | </widget> |
371 | </vbox> | 430 | </vbox> |
372 | </widget> | 431 | </widget> |
373 | <spacer> | 432 | <spacer> |
374 | <property> | 433 | <property> |
375 | <name>name</name> | 434 | <name>name</name> |
376 | <cstring>Spacer2</cstring> | 435 | <cstring>Spacer2</cstring> |
377 | </property> | 436 | </property> |
378 | <property stdset="1"> | 437 | <property stdset="1"> |
379 | <name>orientation</name> | 438 | <name>orientation</name> |
380 | <enum>Vertical</enum> | 439 | <enum>Vertical</enum> |
381 | </property> | 440 | </property> |
382 | <property stdset="1"> | 441 | <property stdset="1"> |
383 | <name>sizeType</name> | 442 | <name>sizeType</name> |
384 | <enum>Expanding</enum> | 443 | <enum>Expanding</enum> |
385 | </property> | 444 | </property> |
386 | <property> | 445 | <property> |
387 | <name>sizeHint</name> | 446 | <name>sizeHint</name> |
388 | <size> | 447 | <size> |
389 | <width>20</width> | 448 | <width>20</width> |
390 | <height>20</height> | 449 | <height>20</height> |
391 | </size> | 450 | </size> |
392 | </property> | 451 | </property> |
393 | </spacer> | 452 | </spacer> |
394 | </vbox> | 453 | </vbox> |
395 | </widget> | 454 | </widget> |
396 | <widget> | 455 | <widget> |
397 | <class>QWidget</class> | 456 | <class>QWidget</class> |
398 | <property stdset="1"> | 457 | <property stdset="1"> |
399 | <name>name</name> | 458 | <name>name</name> |
400 | <cstring>tab</cstring> | 459 | <cstring>tab</cstring> |
401 | </property> | 460 | </property> |
402 | <attribute> | 461 | <attribute> |
403 | <name>title</name> | 462 | <name>title</name> |
404 | <string>Order</string> | 463 | <string>Order</string> |
405 | </attribute> | 464 | </attribute> |
406 | <vbox> | 465 | <vbox> |
407 | <property stdset="1"> | 466 | <property stdset="1"> |
408 | <name>margin</name> | 467 | <name>margin</name> |
409 | <number>2</number> | 468 | <number>2</number> |
410 | </property> | 469 | </property> |
411 | <property stdset="1"> | 470 | <property stdset="1"> |
412 | <name>spacing</name> | 471 | <name>spacing</name> |
413 | <number>2</number> | 472 | <number>2</number> |
414 | </property> | 473 | </property> |
415 | <widget> | 474 | <widget> |
416 | <class>QGroupBox</class> | 475 | <class>QGroupBox</class> |
417 | <property stdset="1"> | 476 | <property stdset="1"> |
418 | <name>name</name> | 477 | <name>name</name> |
419 | <cstring>GroupBox9</cstring> | 478 | <cstring>GroupBox9</cstring> |
420 | </property> | 479 | </property> |
421 | <property stdset="1"> | 480 | <property stdset="1"> |
422 | <name>title</name> | 481 | <name>title</name> |
423 | <string>Select Contact Order:</string> | 482 | <string>Select Contact Order:</string> |
424 | </property> | 483 | </property> |
425 | <grid> | 484 | <grid> |
426 | <property stdset="1"> | 485 | <property stdset="1"> |
427 | <name>margin</name> | 486 | <name>margin</name> |
428 | <number>11</number> | 487 | <number>11</number> |
429 | </property> | 488 | </property> |
430 | <property stdset="1"> | 489 | <property stdset="1"> |
431 | <name>spacing</name> | 490 | <name>spacing</name> |
432 | <number>6</number> | 491 | <number>6</number> |
433 | </property> | 492 | </property> |
434 | <widget row="0" column="2" > | 493 | <widget row="0" column="2" > |
435 | <class>QPushButton</class> | 494 | <class>QPushButton</class> |
436 | <property stdset="1"> | 495 | <property stdset="1"> |
437 | <name>name</name> | 496 | <name>name</name> |
438 | <cstring>m_upButton</cstring> | 497 | <cstring>m_upButton</cstring> |
439 | </property> | 498 | </property> |
440 | <property stdset="1"> | 499 | <property stdset="1"> |
441 | <name>sizePolicy</name> | 500 | <name>sizePolicy</name> |
442 | <sizepolicy> | 501 | <sizepolicy> |
443 | <hsizetype>1</hsizetype> | 502 | <hsizetype>1</hsizetype> |
444 | <vsizetype>0</vsizetype> | 503 | <vsizetype>0</vsizetype> |
445 | </sizepolicy> | 504 | </sizepolicy> |
446 | </property> | 505 | </property> |
447 | <property stdset="1"> | 506 | <property stdset="1"> |
448 | <name>text</name> | 507 | <name>text</name> |
449 | <string>Up</string> | 508 | <string>Up</string> |
450 | </property> | 509 | </property> |
451 | <property stdset="1"> | 510 | <property stdset="1"> |
452 | <name>autoRepeat</name> | 511 | <name>autoRepeat</name> |
453 | <bool>true</bool> | 512 | <bool>true</bool> |
454 | </property> | 513 | </property> |
455 | <property> | 514 | <property> |
456 | <name>whatsThis</name> | 515 | <name>whatsThis</name> |
457 | <string>Move selected attribute one line up</string> | 516 | <string>Move selected attribute one line up</string> |
458 | </property> | 517 | </property> |
459 | </widget> | 518 | </widget> |
460 | <widget row="1" column="2" > | 519 | <widget row="1" column="2" > |
461 | <class>QPushButton</class> | 520 | <class>QPushButton</class> |
462 | <property stdset="1"> | 521 | <property stdset="1"> |
463 | <name>name</name> | 522 | <name>name</name> |
464 | <cstring>m_downButton</cstring> | 523 | <cstring>m_downButton</cstring> |
465 | </property> | 524 | </property> |
466 | <property stdset="1"> | 525 | <property stdset="1"> |
467 | <name>sizePolicy</name> | 526 | <name>sizePolicy</name> |
468 | <sizepolicy> | 527 | <sizepolicy> |
469 | <hsizetype>1</hsizetype> | 528 | <hsizetype>1</hsizetype> |
470 | <vsizetype>0</vsizetype> | 529 | <vsizetype>0</vsizetype> |
471 | </sizepolicy> | 530 | </sizepolicy> |
472 | </property> | 531 | </property> |
473 | <property stdset="1"> | 532 | <property stdset="1"> |
474 | <name>text</name> | 533 | <name>text</name> |
475 | <string>Down</string> | 534 | <string>Down</string> |
476 | </property> | 535 | </property> |
477 | <property stdset="1"> | 536 | <property stdset="1"> |
478 | <name>autoRepeat</name> | 537 | <name>autoRepeat</name> |
479 | <bool>true</bool> | 538 | <bool>true</bool> |
480 | </property> | 539 | </property> |
481 | <property> | 540 | <property> |
482 | <name>whatsThis</name> | 541 | <name>whatsThis</name> |
483 | <string>Move selected attribute one line down</string> | 542 | <string>Move selected attribute one line down</string> |
484 | </property> | 543 | </property> |
485 | </widget> | 544 | </widget> |
486 | <widget row="4" column="0" rowspan="1" colspan="2" > | 545 | <widget row="4" column="0" rowspan="1" colspan="2" > |
487 | <class>QListBox</class> | 546 | <class>QListBox</class> |
488 | <property stdset="1"> | 547 | <property stdset="1"> |
489 | <name>name</name> | 548 | <name>name</name> |
490 | <cstring>allFieldListBox</cstring> | 549 | <cstring>allFieldListBox</cstring> |
491 | </property> | 550 | </property> |
492 | <property stdset="1"> | 551 | <property stdset="1"> |
493 | <name>sizePolicy</name> | 552 | <name>sizePolicy</name> |
494 | <sizepolicy> | 553 | <sizepolicy> |
495 | <hsizetype>7</hsizetype> | 554 | <hsizetype>7</hsizetype> |
496 | <vsizetype>7</vsizetype> | 555 | <vsizetype>7</vsizetype> |
497 | </sizepolicy> | 556 | </sizepolicy> |
498 | </property> | 557 | </property> |
499 | <property> | 558 | <property> |
500 | <name>whatsThis</name> | 559 | <name>whatsThis</name> |
501 | <string>List of all available attributes</string> | 560 | <string>List of all available attributes</string> |
502 | </property> | 561 | </property> |
503 | </widget> | 562 | </widget> |
504 | <widget row="3" column="0" > | 563 | <widget row="3" column="0" > |
505 | <class>QPushButton</class> | 564 | <class>QPushButton</class> |
506 | <property stdset="1"> | 565 | <property stdset="1"> |
507 | <name>name</name> | 566 | <name>name</name> |
508 | <cstring>m_addButton</cstring> | 567 | <cstring>m_addButton</cstring> |
509 | </property> | 568 | </property> |
510 | <property stdset="1"> | 569 | <property stdset="1"> |
511 | <name>sizePolicy</name> | 570 | <name>sizePolicy</name> |
512 | <sizepolicy> | 571 | <sizepolicy> |
513 | <hsizetype>1</hsizetype> | 572 | <hsizetype>1</hsizetype> |
514 | <vsizetype>0</vsizetype> | 573 | <vsizetype>0</vsizetype> |
515 | </sizepolicy> | 574 | </sizepolicy> |
516 | </property> | 575 | </property> |
517 | <property stdset="1"> | 576 | <property stdset="1"> |
518 | <name>text</name> | 577 | <name>text</name> |
519 | <string>Add</string> | 578 | <string>Add</string> |
520 | </property> | 579 | </property> |
521 | <property> | 580 | <property> |
522 | <name>whatsThis</name> | 581 | <name>whatsThis</name> |
523 | <string>Add selected attribute from list below to the upper list</string> | 582 | <string>Add selected attribute from list below to the upper list</string> |
524 | </property> | 583 | </property> |
525 | </widget> | 584 | </widget> |
526 | <widget row="3" column="1" > | 585 | <widget row="3" column="1" > |
527 | <class>QPushButton</class> | 586 | <class>QPushButton</class> |
528 | <property stdset="1"> | 587 | <property stdset="1"> |
529 | <name>name</name> | 588 | <name>name</name> |
530 | <cstring>m_removeButton</cstring> | 589 | <cstring>m_removeButton</cstring> |
531 | </property> | 590 | </property> |
532 | <property stdset="1"> | 591 | <property stdset="1"> |
533 | <name>sizePolicy</name> | 592 | <name>sizePolicy</name> |
534 | <sizepolicy> | 593 | <sizepolicy> |
535 | <hsizetype>1</hsizetype> | 594 | <hsizetype>1</hsizetype> |
536 | <vsizetype>0</vsizetype> | 595 | <vsizetype>0</vsizetype> |
537 | </sizepolicy> | 596 | </sizepolicy> |
538 | </property> | 597 | </property> |
539 | <property stdset="1"> | 598 | <property stdset="1"> |
540 | <name>text</name> | 599 | <name>text</name> |
541 | <string>Remove</string> | 600 | <string>Remove</string> |
542 | </property> | 601 | </property> |
543 | <property> | 602 | <property> |
544 | <name>whatsThis</name> | 603 | <name>whatsThis</name> |
545 | <string>Remove the selected attribute from the upper list</string> | 604 | <string>Remove the selected attribute from the upper list</string> |
546 | </property> | 605 | </property> |
547 | </widget> | 606 | </widget> |
548 | <spacer row="2" column="2" > | 607 | <spacer row="2" column="2" > |
549 | <property> | 608 | <property> |
550 | <name>name</name> | 609 | <name>name</name> |
551 | <cstring>Spacer23</cstring> | 610 | <cstring>Spacer23</cstring> |
552 | </property> | 611 | </property> |
553 | <property stdset="1"> | 612 | <property stdset="1"> |
554 | <name>orientation</name> | 613 | <name>orientation</name> |
555 | <enum>Vertical</enum> | 614 | <enum>Vertical</enum> |
556 | </property> | 615 | </property> |
557 | <property stdset="1"> | 616 | <property stdset="1"> |
558 | <name>sizeType</name> | 617 | <name>sizeType</name> |
559 | <enum>Expanding</enum> | 618 | <enum>Expanding</enum> |
560 | </property> | 619 | </property> |
561 | <property> | 620 | <property> |
562 | <name>sizeHint</name> | 621 | <name>sizeHint</name> |
563 | <size> | 622 | <size> |
564 | <width>20</width> | 623 | <width>20</width> |
565 | <height>20</height> | 624 | <height>20</height> |
566 | </size> | 625 | </size> |
567 | </property> | 626 | </property> |
568 | </spacer> | 627 | </spacer> |
569 | <spacer row="3" column="2" rowspan="2" colspan="1" > | 628 | <spacer row="3" column="2" rowspan="2" colspan="1" > |
570 | <property> | 629 | <property> |
571 | <name>name</name> | 630 | <name>name</name> |
572 | <cstring>Spacer2_2</cstring> | 631 | <cstring>Spacer2_2</cstring> |
573 | </property> | 632 | </property> |
574 | <property stdset="1"> | 633 | <property stdset="1"> |
575 | <name>orientation</name> | 634 | <name>orientation</name> |
576 | <enum>Vertical</enum> | 635 | <enum>Vertical</enum> |
577 | </property> | 636 | </property> |
578 | <property stdset="1"> | 637 | <property stdset="1"> |
579 | <name>sizeType</name> | 638 | <name>sizeType</name> |
580 | <enum>Expanding</enum> | 639 | <enum>Expanding</enum> |
581 | </property> | 640 | </property> |
582 | <property> | 641 | <property> |
583 | <name>sizeHint</name> | 642 | <name>sizeHint</name> |
584 | <size> | 643 | <size> |
585 | <width>20</width> | 644 | <width>20</width> |
586 | <height>20</height> | 645 | <height>20</height> |
587 | </size> | 646 | </size> |
588 | </property> | 647 | </property> |
589 | </spacer> | 648 | </spacer> |
590 | <widget row="0" column="0" rowspan="3" colspan="2" > | 649 | <widget row="0" column="0" rowspan="3" colspan="2" > |
591 | <class>QListBox</class> | 650 | <class>QListBox</class> |
592 | <property stdset="1"> | 651 | <property stdset="1"> |
593 | <name>name</name> | 652 | <name>name</name> |
594 | <cstring>fieldListBox</cstring> | 653 | <cstring>fieldListBox</cstring> |
595 | </property> | 654 | </property> |
596 | <property stdset="1"> | 655 | <property stdset="1"> |
597 | <name>sizePolicy</name> | 656 | <name>sizePolicy</name> |
598 | <sizepolicy> | 657 | <sizepolicy> |
599 | <hsizetype>7</hsizetype> | 658 | <hsizetype>7</hsizetype> |
600 | <vsizetype>7</vsizetype> | 659 | <vsizetype>7</vsizetype> |
601 | </sizepolicy> | 660 | </sizepolicy> |
602 | </property> | 661 | </property> |
603 | <property> | 662 | <property> |
604 | <name>whatsThis</name> | 663 | <name>whatsThis</name> |
605 | <string>Order (up -> down) defines the primary contact shown in the second column of the list view</string> | 664 | <string>Order (up -> down) defines the primary contact shown in the second column of the list view</string> |
606 | </property> | 665 | </property> |
607 | </widget> | 666 | </widget> |
608 | </grid> | 667 | </grid> |
609 | </widget> | 668 | </widget> |
610 | </vbox> | 669 | </vbox> |
611 | </widget> | 670 | </widget> |
612 | </widget> | 671 | </widget> |
613 | </vbox> | 672 | </vbox> |
614 | </widget> | 673 | </widget> |
615 | <tabstops> | 674 | <tabstops> |
616 | <tabstop>configDlg_base</tabstop> | 675 | <tabstop>configDlg_base</tabstop> |
617 | <tabstop>m_useQtMail</tabstop> | 676 | <tabstop>m_useQtMail</tabstop> |
618 | <tabstop>m_useOpieMail</tabstop> | 677 | <tabstop>m_useOpieMail</tabstop> |
619 | </tabstops> | 678 | </tabstops> |
620 | </UI> | 679 | </UI> |
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h index 999ce67..d590a86 100644 --- a/core/pim/addressbook/version.h +++ b/core/pim/addressbook/version.h | |||
@@ -1,10 +1,10 @@ | |||
1 | #ifndef _VERSION_H_ | 1 | #ifndef _VERSION_H_ |
2 | #define _VERSION_H_ | 2 | #define _VERSION_H_ |
3 | 3 | ||
4 | #define MAINVERSION "0" | 4 | #define MAINVERSION "0" |
5 | #define SUBVERSION "9" | 5 | #define SUBVERSION "9" |
6 | #define PATCHVERSION "2" | 6 | #define PATCHVERSION "3" |
7 | 7 | ||
8 | #define APPNAME "OPIE_ADDRESSBOOK" | 8 | #define APPNAME "OPIE_ADDRESSBOOK" |
9 | 9 | ||
10 | #endif | 10 | #endif |