summaryrefslogtreecommitdiff
path: root/core/pim
Unidiff
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp2
-rw-r--r--core/pim/osearch/mainwindow.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 9c13017..312c663 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -221,97 +221,97 @@ void ContactEditor::init() {
221 221
222 btnNote = new QPushButton( tr( "Notes..." ), container ); 222 btnNote = new QPushButton( tr( "Notes..." ), container );
223 gl->addWidget( btnNote, 9, 1 ); 223 gl->addWidget( btnNote, 9, 1 );
224 224
225 tabMain->insertTab( tabViewport, tr( "General" ) ); 225 tabMain->insertTab( tabViewport, tr( "General" ) );
226 226
227 tabViewport = new QWidget ( tabMain ); 227 tabViewport = new QWidget ( tabMain );
228 228
229 vb = new QVBoxLayout( tabViewport ); 229 vb = new QVBoxLayout( tabViewport );
230 230
231 svAddress = new QScrollView( tabViewport ); 231 svAddress = new QScrollView( tabViewport );
232 vb->addWidget( svAddress, 0, 0 ); 232 vb->addWidget( svAddress, 0, 0 );
233 svAddress->setResizePolicy( QScrollView::AutoOneFit ); 233 svAddress->setResizePolicy( QScrollView::AutoOneFit );
234 svAddress->setFrameStyle( QFrame::NoFrame ); 234 svAddress->setFrameStyle( QFrame::NoFrame );
235 235
236 container = new QWidget( svAddress->viewport() ); 236 container = new QWidget( svAddress->viewport() );
237 svAddress->addChild( container ); 237 svAddress->addChild( container );
238 238
239 gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem 239 gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem
240 240
241 cmbAddress = new QComboBox( FALSE, container ); 241 cmbAddress = new QComboBox( FALSE, container );
242 cmbAddress->insertItem( tr( "Business" ) ); 242 cmbAddress->insertItem( tr( "Business" ) );
243 cmbAddress->insertItem( tr( "Home" ) ); 243 cmbAddress->insertItem( tr( "Home" ) );
244 gl->addMultiCellWidget( cmbAddress, 0, 0, 0, 1 ); 244 gl->addMultiCellWidget( cmbAddress, 0, 0, 0, 1 );
245 245
246 l = new QLabel( tr( "Address" ), container ); 246 l = new QLabel( tr( "Address" ), container );
247 gl->addWidget( l, 1, 0 ); 247 gl->addWidget( l, 1, 0 );
248 txtAddress = new QLineEdit( container ); 248 txtAddress = new QLineEdit( container );
249 gl->addMultiCellWidget( txtAddress, 1, 1, 1, 2 ); 249 gl->addMultiCellWidget( txtAddress, 1, 1, 1, 2 );
250 250
251 l = new QLabel( tr( "City" ), container ); 251 l = new QLabel( tr( "City" ), container );
252 gl->addWidget( l, 2, 0 ); 252 gl->addWidget( l, 2, 0 );
253 txtCity = new QLineEdit( container ); 253 txtCity = new QLineEdit( container );
254 gl->addMultiCellWidget( txtCity, 2, 2, 1, 2 ); 254 gl->addMultiCellWidget( txtCity, 2, 2, 1, 2 );
255 255
256 l = new QLabel( tr( "State" ), container ); 256 l = new QLabel( tr( "State" ), container );
257 gl->addWidget( l, 3, 0 ); 257 gl->addWidget( l, 3, 0 );
258 txtState = new QLineEdit( container ); 258 txtState = new QLineEdit( container );
259 gl->addMultiCellWidget( txtState, 3, 3, 1, 2 ); 259 gl->addMultiCellWidget( txtState, 3, 3, 1, 2 );
260 260
261 l = new QLabel( tr( "Zip Code" ), container ); 261 l = new QLabel( tr( "Zip Code" ), container );
262 gl->addWidget( l, 4, 0 ); 262 gl->addWidget( l, 4, 0 );
263 txtZip = new QLineEdit( container ); 263 txtZip = new QLineEdit( container );
264 gl->addMultiCellWidget( txtZip, 4, 4, 1, 2 ); 264 gl->addMultiCellWidget( txtZip, 4, 4, 1, 2 );
265 265
266 l = new QLabel( tr( "Country" ), container ); 266 l = new QLabel( tr( "Country" ), container );
267 gl->addWidget( l, 5, 0 ); 267 gl->addWidget( l, 5, 0 );
268 cmbCountry = new QComboBox( TRUE, container ); 268 cmbCountry = new QComboBox( TRUE, container );
269 cmbCountry->insertItem( tr( "" ) ); 269 cmbCountry->insertItem( "" );
270 cmbCountry->insertItem( tr ( "United States" ) ); 270 cmbCountry->insertItem( tr ( "United States" ) );
271 cmbCountry->insertItem( tr ( "United Kingdom" ) ); 271 cmbCountry->insertItem( tr ( "United Kingdom" ) );
272 cmbCountry->insertItem( tr ( "Afghanistan" ) ); 272 cmbCountry->insertItem( tr ( "Afghanistan" ) );
273 cmbCountry->insertItem( tr ( "Albania" ) ); 273 cmbCountry->insertItem( tr ( "Albania" ) );
274 cmbCountry->insertItem( tr ( "Algeria" ) ); 274 cmbCountry->insertItem( tr ( "Algeria" ) );
275 cmbCountry->insertItem( tr ( "American Samoa" ) ); 275 cmbCountry->insertItem( tr ( "American Samoa" ) );
276 cmbCountry->insertItem( tr ( "Andorra" ) ); 276 cmbCountry->insertItem( tr ( "Andorra" ) );
277 cmbCountry->insertItem( tr ( "Angola" ) ); 277 cmbCountry->insertItem( tr ( "Angola" ) );
278 cmbCountry->insertItem( tr ( "Anguilla" ) ); 278 cmbCountry->insertItem( tr ( "Anguilla" ) );
279 cmbCountry->insertItem( tr ( "Antarctica" ) ); 279 cmbCountry->insertItem( tr ( "Antarctica" ) );
280 cmbCountry->insertItem( tr ( "Argentina" ) ); 280 cmbCountry->insertItem( tr ( "Argentina" ) );
281 cmbCountry->insertItem( tr ( "Armenia" ) ); 281 cmbCountry->insertItem( tr ( "Armenia" ) );
282 cmbCountry->insertItem( tr ( "Aruba" ) ); 282 cmbCountry->insertItem( tr ( "Aruba" ) );
283 cmbCountry->insertItem( tr ( "Australia" ) ); 283 cmbCountry->insertItem( tr ( "Australia" ) );
284 cmbCountry->insertItem( tr ( "Austria" ) ); 284 cmbCountry->insertItem( tr ( "Austria" ) );
285 cmbCountry->insertItem( tr ( "Azerbaijan" ) ); 285 cmbCountry->insertItem( tr ( "Azerbaijan" ) );
286 cmbCountry->insertItem( tr ( "Bahamas" ) ); 286 cmbCountry->insertItem( tr ( "Bahamas" ) );
287 cmbCountry->insertItem( tr ( "Bahrain" ) ); 287 cmbCountry->insertItem( tr ( "Bahrain" ) );
288 cmbCountry->insertItem( tr ( "Bangladesh" ) ); 288 cmbCountry->insertItem( tr ( "Bangladesh" ) );
289 cmbCountry->insertItem( tr ( "Barbados" ) ); 289 cmbCountry->insertItem( tr ( "Barbados" ) );
290 cmbCountry->insertItem( tr ( "Belarus" ) ); 290 cmbCountry->insertItem( tr ( "Belarus" ) );
291 cmbCountry->insertItem( tr ( "Belgium" ) ); 291 cmbCountry->insertItem( tr ( "Belgium" ) );
292 cmbCountry->insertItem( tr ( "Belize" ) ); 292 cmbCountry->insertItem( tr ( "Belize" ) );
293 cmbCountry->insertItem( tr ( "Benin" ) ); 293 cmbCountry->insertItem( tr ( "Benin" ) );
294 cmbCountry->insertItem( tr ( "Bermuda" ) ); 294 cmbCountry->insertItem( tr ( "Bermuda" ) );
295 cmbCountry->insertItem( tr ( "Bhutan" ) ); 295 cmbCountry->insertItem( tr ( "Bhutan" ) );
296 cmbCountry->insertItem( tr ( "Bolivia" ) ); 296 cmbCountry->insertItem( tr ( "Bolivia" ) );
297 cmbCountry->insertItem( tr ( "Botswana" ) ); 297 cmbCountry->insertItem( tr ( "Botswana" ) );
298 cmbCountry->insertItem( tr ( "Bouvet Island" ) ); 298 cmbCountry->insertItem( tr ( "Bouvet Island" ) );
299 cmbCountry->insertItem( tr ( "Brazil" ) ); 299 cmbCountry->insertItem( tr ( "Brazil" ) );
300 cmbCountry->insertItem( tr ( "Brunei Darussalam" ) ); 300 cmbCountry->insertItem( tr ( "Brunei Darussalam" ) );
301 cmbCountry->insertItem( tr ( "Bulgaria" ) ); 301 cmbCountry->insertItem( tr ( "Bulgaria" ) );
302 cmbCountry->insertItem( tr ( "Burkina Faso" ) ); 302 cmbCountry->insertItem( tr ( "Burkina Faso" ) );
303 cmbCountry->insertItem( tr ( "Burundi" ) ); 303 cmbCountry->insertItem( tr ( "Burundi" ) );
304 cmbCountry->insertItem( tr ( "Cambodia" ) ); 304 cmbCountry->insertItem( tr ( "Cambodia" ) );
305 cmbCountry->insertItem( tr ( "Cameroon" ) ); 305 cmbCountry->insertItem( tr ( "Cameroon" ) );
306 cmbCountry->insertItem( tr ( "Canada" ) ); 306 cmbCountry->insertItem( tr ( "Canada" ) );
307 cmbCountry->insertItem( tr ( "Cape Verde" ) ); 307 cmbCountry->insertItem( tr ( "Cape Verde" ) );
308 cmbCountry->insertItem( tr ( "Cayman Islands" ) ); 308 cmbCountry->insertItem( tr ( "Cayman Islands" ) );
309 cmbCountry->insertItem( tr ( "Chad" ) ); 309 cmbCountry->insertItem( tr ( "Chad" ) );
310 cmbCountry->insertItem( tr ( "Chile" ) ); 310 cmbCountry->insertItem( tr ( "Chile" ) );
311 cmbCountry->insertItem( tr ( "China" ) ); 311 cmbCountry->insertItem( tr ( "China" ) );
312 cmbCountry->insertItem( tr ( "Christmas Island" ) ); 312 cmbCountry->insertItem( tr ( "Christmas Island" ) );
313 cmbCountry->insertItem( tr ( "Colombia" ) ); 313 cmbCountry->insertItem( tr ( "Colombia" ) );
314 cmbCountry->insertItem( tr ( "Comoros" ) ); 314 cmbCountry->insertItem( tr ( "Comoros" ) );
315 cmbCountry->insertItem( tr ( "Congo" ) ); 315 cmbCountry->insertItem( tr ( "Congo" ) );
316 cmbCountry->insertItem( tr ( "Cook Island" ) ); 316 cmbCountry->insertItem( tr ( "Cook Island" ) );
317 cmbCountry->insertItem( tr ( "Costa Rica" ) ); 317 cmbCountry->insertItem( tr ( "Costa Rica" ) );
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 798e1f1..4589c9d 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -154,97 +154,97 @@ void MainWindow::makeMenu()
154 154
155 //SETTINGS MENU 155 //SETTINGS MENU
156 cfgMenu->insertItem( tr( "Search" ), searchOptions ); 156 cfgMenu->insertItem( tr( "Search" ), searchOptions );
157 QPopupMenu *pop; 157 QPopupMenu *pop;
158 for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){ 158 for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){
159 pop = s->popupMenu(); 159 pop = s->popupMenu();
160 if (pop){ 160 if (pop){
161 cfgMenu->insertItem( s->text(0), pop ); 161 cfgMenu->insertItem( s->text(0), pop );
162 } 162 }
163 } 163 }
164 164
165 165
166 //SEARCH 166 //SEARCH
167 SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 ); 167 SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 );
168 SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) ); 168 SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) );
169 // QWhatsThis::add( SearchAllAction, tr("Search everything...") ); 169 // QWhatsThis::add( SearchAllAction, tr("Search everything...") );
170 connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) ); 170 connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) );
171 SearchAllAction->addTo( searchMenu ); 171 SearchAllAction->addTo( searchMenu );
172 searchMenu->insertItem( tr( "Options" ), searchOptions ); 172 searchMenu->insertItem( tr( "Options" ), searchOptions );
173 173
174 //SEARCH OPTIONS 174 //SEARCH OPTIONS
175 //actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true ); 175 //actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true );
176 //actionWholeWordsOnly->addTo( searchOptions ); 176 //actionWholeWordsOnly->addTo( searchOptions );
177 actionCaseSensitiv = new QAction( tr("Case sensitive"),QString::null, 0, this, 0, true ); 177 actionCaseSensitiv = new QAction( tr("Case sensitive"),QString::null, 0, this, 0, true );
178 actionCaseSensitiv->addTo( searchOptions ); 178 actionCaseSensitiv->addTo( searchOptions );
179 actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true ); 179 actionWildcards = new QAction( tr("Use wildcards"),QString::null, 0, this, 0, true );
180 actionWildcards->addTo( searchOptions ); 180 actionWildcards->addTo( searchOptions );
181 181
182 //SEARCH BAR 182 //SEARCH BAR
183 LabelEnterText = new QLabel( searchBar, "Label" ); 183 LabelEnterText = new QLabel( searchBar, "Label" );
184 LabelEnterText->setAutoMask( FALSE ); 184 LabelEnterText->setAutoMask( FALSE );
185 LabelEnterText->setText( tr( "Search for: " ) ); 185 LabelEnterText->setText( tr( "Search for: " ) );
186 186
187 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); 187 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
188 QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" ); 188 QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
189 QWhatsThis::add( searchEdit, tr("Enter your search terms here") ); 189 QWhatsThis::add( searchEdit, tr("Enter your search terms here") );
190 searchEdit->setFocus(); 190 searchEdit->setFocus();
191 searchBar->setHorizontalStretchable( TRUE ); 191 searchBar->setHorizontalStretchable( TRUE );
192 searchBar->setStretchableWidget( searchEdit ); 192 searchBar->setStretchableWidget( searchEdit );
193 193
194 //Search button 194 //Search button
195 SearchAllAction->addTo( searchBar ); 195 SearchAllAction->addTo( searchBar );
196 196
197 //image ripped of off opie-login/loginwindow.cpp 197 //image ripped of off opie-login/loginwindow.cpp
198 QPixmap image1( ( const char** ) image1_data ); 198 QPixmap image1( ( const char** ) image1_data );
199 199
200 //Clear text 200 //Clear text
201 ClearSearchText = new QToolButton( searchBar, "ClearSearchText"); 201 ClearSearchText = new QToolButton( searchBar, "ClearSearchText");
202 ClearSearchText->setText( tr( "" ) ); 202 ClearSearchText->setText( "" );
203 ClearSearchText->setPixmap( image1 ); 203 ClearSearchText->setPixmap( image1 );
204 204
205 connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) ); 205 connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) );
206 connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); 206 connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) );
207 207
208} 208}
209 209
210MainWindow::~MainWindow() 210MainWindow::~MainWindow()
211{ 211{
212 Config cfg( "osearch", Config::User ); 212 Config cfg( "osearch", Config::User );
213 cfg.setGroup( "search_settings" ); 213 cfg.setGroup( "search_settings" );
214 cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() ); 214 cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() );
215 cfg.writeEntry( "wildcards", actionWildcards->isOn() ); 215 cfg.writeEntry( "wildcards", actionWildcards->isOn() );
216 //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() ); 216 //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() );
217} 217}
218 218
219void MainWindow::setCurrent(QListViewItem *item) 219void MainWindow::setCurrent(QListViewItem *item)
220{ 220{
221 if (!item) return; 221 if (!item) return;
222 _currentItem = (OListViewItem*)item; 222 _currentItem = (OListViewItem*)item;
223 //_currentItem = dynamic_cast<OListViewItem*>(item); 223 //_currentItem = dynamic_cast<OListViewItem*>(item);
224 if (_currentItem->rtti() == OListViewItem::Result){ 224 if (_currentItem->rtti() == OListViewItem::Result){
225 ResultItem *res = (ResultItem*)item; 225 ResultItem *res = (ResultItem*)item;
226 // ResultItem *res = dynamic_cast<ResultItem*>(item); 226 // ResultItem *res = dynamic_cast<ResultItem*>(item);
227 richEdit->setText( res->toRichText() ); 227 richEdit->setText( res->toRichText() );
228 QIntDict<QString> acts = res->actions(); 228 QIntDict<QString> acts = res->actions();
229 QButton *button; 229 QButton *button;
230 for (uint i = 0; i < acts.count(); i++){ 230 for (uint i = 0; i < acts.count(); i++){
231 button = buttonMap[i]; 231 button = buttonMap[i];
232 if (!button) { 232 if (!button) {
233 owarn << " no button for " << *acts[i] << oendl; 233 owarn << " no button for " << *acts[i] << oendl;
234 button = new QPushButton( buttonBox ); 234 button = new QPushButton( buttonBox );
235 buttonMap.insert( i, button ); 235 buttonMap.insert( i, button );
236 signalMapper->setMapping(button, i ); 236 signalMapper->setMapping(button, i );
237 connect(button, SIGNAL(clicked() ), signalMapper, SLOT(map() ) ); 237 connect(button, SIGNAL(clicked() ), signalMapper, SLOT(map() ) );
238 } 238 }
239 button->setText( *acts[i] ); 239 button->setText( *acts[i] );
240 button->show(); 240 button->show();
241 } 241 }
242 for (uint i = acts.count(); i < _buttonCount; i++){ 242 for (uint i = acts.count(); i < _buttonCount; i++){
243 button = buttonMap[i]; 243 button = buttonMap[i];
244 if (button) button->hide(); 244 if (button) button->hide();
245 } 245 }
246 _buttonCount = acts.count(); 246 _buttonCount = acts.count();
247 detailsFrame->show(); 247 detailsFrame->show();
248 buttonBox->show(); 248 buttonBox->show();
249 249
250 }else { 250 }else {