summaryrefslogtreecommitdiff
path: root/core/pim/osearch/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/mainwindow.cpp42
1 files changed, 39 insertions, 3 deletions
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index 07403a1..55302cb 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -50,2 +50,23 @@
+static const char* const image1_data[] = {
+"14 14 3 1",
+". c None",
+"# c #000000",
+"a c #ff0000",
+"..............",
+"..##.......###",
+".#aa#....##aa#",
+"#aaaa#.##aaaa#",
+".##aaa#aaaaa##",
+"...#aaaaaaa#..",
+"....#aaaaa#...",
+"...#aaaaa#....",
+"..#aaaaaaa#...",
+".#aaaaaaaaa#..",
+"#aaaa###aaaa#.",
+"#aaa#..##aaa#.",
+"#aaa#...#aa#..",
+".###.....##..."};
+
+
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
@@ -62,3 +83,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
mainLayout->setSpacing( 0 );
- mainLayout->setMargin( 0 );
+ mainLayout->setMargin( 3 );
@@ -156,2 +177,6 @@ void MainWindow::makeMenu()
//SEARCH BAR
+ LabelEnterText = new QLabel( searchBar, "Label" );
+ LabelEnterText->setAutoMask( FALSE );
+ LabelEnterText->setText( tr( "Search for: " ) );
+
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
@@ -162,5 +187,16 @@ void MainWindow::makeMenu()
searchBar->setStretchableWidget( searchEdit );
+
+ //Search button
SearchAllAction->addTo( searchBar );
- connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( setSearch( const QString & ) ) );
+
+ //image ripped of off opie-login/loginwindow.cpp
+ QPixmap image1( ( const char** ) image1_data );
+
+ //Clear text
+ ClearSearchText = new QToolButton( searchBar, "ClearSearchText");
+ ClearSearchText->setText( tr( "" ) );
+ ClearSearchText->setPixmap( image1 );
+
+ connect( searchEdit, SIGNAL( textChanged( const QString & ) ),this, SLOT( setSearch( const QString & ) ) );
+ connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) );