summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abconfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp
index 703faac..e58fa76 100644
--- a/core/pim/addressbook/abconfig.cpp
+++ b/core/pim/addressbook/abconfig.cpp
@@ -54,131 +54,131 @@ QMainWindow::ToolBarDock AbConfig::getToolBarPos() const
54 return (QMainWindow::ToolBarDock) m_barPos; 54 return (QMainWindow::ToolBarDock) m_barPos;
55} 55}
56 56
57 57
58void AbConfig::setUseRegExp( bool v ) 58void AbConfig::setUseRegExp( bool v )
59{ 59{
60 m_useRegExp = v ; 60 m_useRegExp = v ;
61 m_changed = true; 61 m_changed = true;
62} 62}
63void AbConfig::setUseWildCards( bool v ) 63void AbConfig::setUseWildCards( bool v )
64{ 64{
65 m_useRegExp = !v; 65 m_useRegExp = !v;
66 m_changed = true; 66 m_changed = true;
67} 67}
68void AbConfig::setBeCaseSensitive( bool v ) 68void AbConfig::setBeCaseSensitive( bool v )
69{ 69{
70 m_beCaseSensitive = v; 70 m_beCaseSensitive = v;
71 m_changed = true; 71 m_changed = true;
72} 72}
73void AbConfig::setUseQtMail( bool v ) 73void AbConfig::setUseQtMail( bool v )
74{ 74{
75 m_useQtMail = v; 75 m_useQtMail = v;
76 m_changed = true; 76 m_changed = true;
77} 77}
78void AbConfig::setUseOpieMail( bool v ) 78void AbConfig::setUseOpieMail( bool v )
79{ 79{
80 m_useOpieMail = v; 80 m_useOpieMail = v;
81 m_changed = true; 81 m_changed = true;
82} 82}
83void AbConfig::setFontSize( int v ) 83void AbConfig::setFontSize( int v )
84{ 84{
85 m_fontSize = v; 85 m_fontSize = v;
86 m_changed = true; 86 m_changed = true;
87} 87}
88 88
89void AbConfig::setOrderList( const QValueList<int>& list ) 89void AbConfig::setOrderList( const QValueList<int>& list )
90{ 90{
91 m_ordered = list; 91 m_ordered = list;
92 m_changed = true; 92 m_changed = true;
93} 93}
94 94
95void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) 95void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v )
96{ 96{
97 m_barPos = v; 97 m_barPos = v;
98 m_changed = true; 98 m_changed = true;
99} 99}
100 100
101void AbConfig::load() 101void AbConfig::load()
102{ 102{
103 // Read Config settings 103 // Read Config settings
104 Config cfg("AddressBook"); 104 Config cfg("AddressBook");
105 105
106 cfg.setGroup("Font"); 106 cfg.setGroup("Font");
107 m_fontSize = cfg.readNumEntry( "fontSize", 1 ); 107 m_fontSize = cfg.readNumEntry( "fontSize", 1 );
108 108
109 cfg.setGroup("Search"); 109 cfg.setGroup("Search");
110 m_useRegExp = cfg.readBoolEntry( "useRegExp" ); 110 m_useRegExp = cfg.readBoolEntry( "useRegExp" );
111 m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" ); 111 m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive" );
112 112
113 cfg.setGroup("Mail"); 113 cfg.setGroup("Mail");
114 m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); 114 m_useQtMail = cfg.readBoolEntry( "useQtMail", true );
115 m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); 115 m_useOpieMail=cfg.readBoolEntry( "useOpieMail" );
116 116
117 cfg.setGroup("ContactOrder"); 117 cfg.setGroup("ContactOrder");
118 int ID = 0; 118 int ID = 0;
119 int i = 0; 119 int i = 0;
120 ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); 120 ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 );
121 while ( ID != 0 ){ 121 while ( ID != 0 ){
122 m_ordered.append( ID ); 122 m_ordered.append( ID );
123 ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); 123 ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 );
124 } 124 }
125 125
126 // If no contact order is defined, we set the default 126 // If no contact order is defined, we set the default
127 if ( m_ordered.count() == 0 ) { 127 if ( m_ordered.count() == 0 ) {
128 m_ordered.append( Qtopia::DefaultEmail ); 128 m_ordered.append( Qtopia::DefaultEmail );
129 m_ordered.append( Qtopia::HomePhone); 129 m_ordered.append( Qtopia::HomePhone);
130 m_ordered.append( Qtopia::HomeMobile); 130 m_ordered.append( Qtopia::HomeMobile);
131 m_ordered.append( Qtopia::BusinessPhone); 131 m_ordered.append( Qtopia::BusinessPhone);
132 } 132 }
133 133
134 cfg.setGroup("ToolBar"); 134 cfg.setGroup("ToolBar");
135 m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); 135 m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top );
136 136
137 m_changed = false; 137 m_changed = false;
138} 138}
139 139
140void AbConfig::save() 140void AbConfig::save()
141{ 141{
142 if ( m_changed ){ 142 if ( m_changed ){
143 Config cfg("AddressBook"); 143 Config cfg("AddressBook");
144 cfg.setGroup("Font"); 144 cfg.setGroup("Font");
145 cfg.writeEntry("fontSize", m_fontSize); 145 cfg.writeEntry("fontSize", m_fontSize);
146 146
147 cfg.setGroup("Search"); 147 cfg.setGroup("Search");
148 cfg.writeEntry("useRegExp", m_useRegExp); 148 cfg.writeEntry("useRegExp", m_useRegExp);
149 cfg.writeEntry("caseSensitive", m_beCaseSensitive); 149 cfg.writeEntry("caseSensitive", m_beCaseSensitive);
150 150
151 cfg.setGroup("Mail"); 151 cfg.setGroup("Mail");
152 cfg.writeEntry( "useQtMail", m_useQtMail ); 152 cfg.writeEntry( "useQtMail", m_useQtMail );
153 cfg.writeEntry( "useOpieMail", m_useOpieMail); 153 cfg.writeEntry( "useOpieMail", m_useOpieMail);
154 154
155 cfg.setGroup("ContactOrder"); 155 cfg.setGroup("ContactOrder");
156 cfg.clearGroup(); 156 cfg.clearGroup();
157 for ( uint i = 0; i < m_ordered.count(); i++ ){ 157 for ( uint i = 0; i < m_ordered.count(); i++ ){
158 cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] ); 158 cfg.writeEntry( "ContactID_"+QString::number(i), m_ordered[i] );
159 } 159 }
160 160
161 cfg.setGroup("ToolBar"); 161 cfg.setGroup("ToolBar");
162 cfg.writeEntry( "Position", m_barPos ); 162 cfg.writeEntry( "Position", m_barPos );
163 163
164 cfg.setGroup("Version"); 164 cfg.setGroup("Version");
165 cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION); 165 cfg.writeEntry( "AppName", APPNAME + QString(" V" ) + MAINVERSION + QString(".") + SUBVERSION + QString(".") + PATCHVERSION);
166 cfg.writeEntry( "Mainversion", MAINVERSION ); 166 cfg.writeEntry( "Mainversion", MAINVERSION );
167 cfg.writeEntry( "SubVersion", SUBVERSION ); 167 cfg.writeEntry( "SubVersion", SUBVERSION );
168 cfg.writeEntry( "PatchVersion", PATCHVERSION ); 168 cfg.writeEntry( "PatchVersion", PATCHVERSION );
169 169
170 } 170 }
171 171
172} 172}
173 173
174void AbConfig::operator= ( const AbConfig& cnf ) 174void AbConfig::operator= ( const AbConfig& cnf )
175{ 175{
176 m_useQtMail = cnf.m_useQtMail; 176 m_useQtMail = cnf.m_useQtMail;
177 m_useOpieMail = cnf.m_useOpieMail; 177 m_useOpieMail = cnf.m_useOpieMail;
178 m_useRegExp = cnf.m_useRegExp; 178 m_useRegExp = cnf.m_useRegExp;
179 m_beCaseSensitive = cnf.m_beCaseSensitive; 179 m_beCaseSensitive = cnf.m_beCaseSensitive;
180 m_fontSize = cnf.m_fontSize; 180 m_fontSize = cnf.m_fontSize;
181 m_ordered = cnf.m_ordered; 181 m_ordered = cnf.m_ordered;
182 182 m_barPos = cnf.m_barPos;
183} 183}
184 184