summaryrefslogtreecommitdiff
path: root/core/pim/osearch/mainwindow.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index bfe95b0..8b6a5df 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -180,49 +180,49 @@ void MainWindow::makeMenu()
180 180
181 //SEARCH BAR 181 //SEARCH BAR
182 LabelEnterText = new QLabel( searchBar, "Label" ); 182 LabelEnterText = new QLabel( searchBar, "Label" );
183 LabelEnterText->setAutoMask( FALSE ); 183 LabelEnterText->setAutoMask( FALSE );
184 LabelEnterText->setText( tr( "Search for: " ) ); 184 LabelEnterText->setText( tr( "Search for: " ) );
185 185
186 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); 186 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
187 QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" ); 187 QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
188 QWhatsThis::add( searchEdit, tr("Enter your search terms here") ); 188 QWhatsThis::add( searchEdit, tr("Enter your search terms here") );
189 searchEdit->setFocus(); 189 searchEdit->setFocus();
190 searchBar->setHorizontalStretchable( TRUE ); 190 searchBar->setHorizontalStretchable( TRUE );
191 searchBar->setStretchableWidget( searchEdit ); 191 searchBar->setStretchableWidget( searchEdit );
192 192
193 //Search button 193 //Search button
194 SearchAllAction->addTo( searchBar ); 194 SearchAllAction->addTo( searchBar );
195 195
196 //image ripped of off opie-login/loginwindow.cpp 196 //image ripped of off opie-login/loginwindow.cpp
197 QPixmap image1( ( const char** ) image1_data ); 197 QPixmap image1( ( const char** ) image1_data );
198 198
199 //Clear text 199 //Clear text
200 ClearSearchText = new QToolButton( searchBar, "ClearSearchText"); 200 ClearSearchText = new QToolButton( searchBar, "ClearSearchText");
201 ClearSearchText->setText( tr( "" ) ); 201 ClearSearchText->setText( tr( "" ) );
202 ClearSearchText->setPixmap( image1 ); 202 ClearSearchText->setPixmap( image1 );
203 203
204 connect( searchEdit, SIGNAL( textChanged( const QString & ) ),this, SLOT( setSearch( const QString & ) ) ); 204 connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) );
205 connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); 205 connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) );
206 206
207} 207}
208 208
209MainWindow::~MainWindow() 209MainWindow::~MainWindow()
210{ 210{
211 Config cfg( "osearch", Config::User ); 211 Config cfg( "osearch", Config::User );
212 cfg.setGroup( "search_settings" ); 212 cfg.setGroup( "search_settings" );
213 cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() ); 213 cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() );
214 cfg.writeEntry( "wildcards", actionWildcards->isOn() ); 214 cfg.writeEntry( "wildcards", actionWildcards->isOn() );
215 //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() ); 215 //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() );
216} 216}
217 217
218void MainWindow::setCurrent(QListViewItem *item) 218void MainWindow::setCurrent(QListViewItem *item)
219{ 219{
220 if (!item) return; 220 if (!item) return;
221 _currentItem = (OListViewItem*)item; 221 _currentItem = (OListViewItem*)item;
222 //_currentItem = dynamic_cast<OListViewItem*>(item); 222 //_currentItem = dynamic_cast<OListViewItem*>(item);
223 if (_currentItem->rtti() == OListViewItem::Result){ 223 if (_currentItem->rtti() == OListViewItem::Result){
224 ResultItem *res = (ResultItem*)item; 224 ResultItem *res = (ResultItem*)item;
225 // ResultItem *res = dynamic_cast<ResultItem*>(item); 225 // ResultItem *res = dynamic_cast<ResultItem*>(item);
226 richEdit->setText( res->toRichText() ); 226 richEdit->setText( res->toRichText() );
227 QIntDict<QString> acts = res->actions(); 227 QIntDict<QString> acts = res->actions();
228 QButton *button; 228 QButton *button;