Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/mainwindow.cpp | 42 |
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 @@ | |||
50 | 50 | ||
51 | static const char* const image1_data[] = { | ||
52 | "14 14 3 1", | ||
53 | ". c None", | ||
54 | "# c #000000", | ||
55 | "a c #ff0000", | ||
56 | "..............", | ||
57 | "..##.......###", | ||
58 | ".#aa#....##aa#", | ||
59 | "#aaaa#.##aaaa#", | ||
60 | ".##aaa#aaaaa##", | ||
61 | "...#aaaaaaa#..", | ||
62 | "....#aaaaa#...", | ||
63 | "...#aaaaa#....", | ||
64 | "..#aaaaaaa#...", | ||
65 | ".#aaaaaaaaa#..", | ||
66 | "#aaaa###aaaa#.", | ||
67 | "#aaa#..##aaa#.", | ||
68 | "#aaa#...#aa#..", | ||
69 | ".###.....##..."}; | ||
70 | |||
71 | |||
51 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | 72 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : |
@@ -62,3 +83,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | |||
62 | mainLayout->setSpacing( 0 ); | 83 | mainLayout->setSpacing( 0 ); |
63 | mainLayout->setMargin( 0 ); | 84 | mainLayout->setMargin( 3 ); |
64 | 85 | ||
@@ -156,2 +177,6 @@ void MainWindow::makeMenu() | |||
156 | //SEARCH BAR | 177 | //SEARCH BAR |
178 | LabelEnterText = new QLabel( searchBar, "Label" ); | ||
179 | LabelEnterText->setAutoMask( FALSE ); | ||
180 | LabelEnterText->setText( tr( "Search for: " ) ); | ||
181 | |||
157 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); | 182 | addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); |
@@ -162,5 +187,16 @@ void MainWindow::makeMenu() | |||
162 | searchBar->setStretchableWidget( searchEdit ); | 187 | searchBar->setStretchableWidget( searchEdit ); |
188 | |||
189 | //Search button | ||
163 | SearchAllAction->addTo( searchBar ); | 190 | SearchAllAction->addTo( searchBar ); |
164 | connect( searchEdit, SIGNAL( textChanged( const QString & ) ), | 191 | |
165 | this, SLOT( setSearch( const QString & ) ) ); | 192 | //image ripped of off opie-login/loginwindow.cpp |
193 | QPixmap image1( ( const char** ) image1_data ); | ||
194 | |||
195 | //Clear text | ||
196 | ClearSearchText = new QToolButton( searchBar, "ClearSearchText"); | ||
197 | ClearSearchText->setText( tr( "" ) ); | ||
198 | ClearSearchText->setPixmap( image1 ); | ||
199 | |||
200 | connect( searchEdit, SIGNAL( textChanged( const QString & ) ),this, SLOT( setSearch( const QString & ) ) ); | ||
201 | connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); | ||
166 | 202 | ||