summaryrefslogtreecommitdiff
path: root/core/pim/osearch/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (show 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
@@ -49,4 +49,25 @@
#include "mainwindow.h"
+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 ) :
QMainWindow( parent, name, f ), _currentItem(0)
@@ -61,5 +82,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
mainLayout = new QVBoxLayout( mainFrame );
mainLayout->setSpacing( 0 );
- mainLayout->setMargin( 0 );
+ mainLayout->setMargin( 3 );
resultsList = new OListView( mainFrame );
@@ -155,4 +176,8 @@ void MainWindow::makeMenu()
//SEARCH BAR
+ LabelEnterText = new QLabel( searchBar, "Label" );
+ LabelEnterText->setAutoMask( FALSE );
+ LabelEnterText->setText( tr( "Search for: " ) );
+
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" );
@@ -161,7 +186,18 @@ void MainWindow::makeMenu()
searchBar->setHorizontalStretchable( TRUE );
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() ) );
}