Diffstat (limited to 'noncore/apps/dagger/searchbar.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/dagger/searchbar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/dagger/searchbar.cpp b/noncore/apps/dagger/searchbar.cpp index ff434dd..9953e8f 100644 --- a/noncore/apps/dagger/searchbar.cpp +++ b/noncore/apps/dagger/searchbar.cpp | |||
@@ -23,12 +23,13 @@ file; see the file COPYING. If not, write to the Free Software Foundation, Inc., | |||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
25 | 25 | ||
26 | #include <qaction.h> | 26 | #include <qaction.h> |
27 | #include <qcombobox.h> | 27 | #include <qcombobox.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qwhatsthis.h> | ||
29 | 30 | ||
30 | #include <listkey.h> | 31 | #include <listkey.h> |
31 | #include <regex.h> | 32 | #include <regex.h> |
32 | #include <versekey.h> | 33 | #include <versekey.h> |
33 | 34 | ||
34 | void searchCallback( char /*percent*/, void */*userData*/ ) | 35 | void searchCallback( char /*percent*/, void */*userData*/ ) |
@@ -40,37 +41,42 @@ SearchBar::SearchBar( QMainWindow *parent ) | |||
40 | : QToolBar( QString::null, parent, QMainWindow::Top, true ) | 41 | : QToolBar( QString::null, parent, QMainWindow::Top, true ) |
41 | , m_currText( 0x0 ) | 42 | , m_currText( 0x0 ) |
42 | { | 43 | { |
43 | // Initialize UI | 44 | // Initialize UI |
44 | m_searchText = new QLineEdit( this ); | 45 | m_searchText = new QLineEdit( this ); |
45 | setStretchableWidget( m_searchText ); | 46 | setStretchableWidget( m_searchText ); |
47 | QWhatsThis::add( m_searchText, tr( "Enter text to search for here." ) ); | ||
46 | connect(m_searchText, SIGNAL(textChanged(const QString &)), | 48 | connect(m_searchText, SIGNAL(textChanged(const QString &)), |
47 | this, SLOT(slotTextChanged(const QString &)) ); | 49 | this, SLOT(slotTextChanged(const QString &)) ); |
48 | 50 | ||
49 | m_actionFind = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, | 51 | m_actionFind = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, |
50 | 0, this, 0 ); | 52 | 0, this, 0 ); |
51 | m_actionFind->setEnabled( false ); | 53 | m_actionFind->setEnabled( false ); |
52 | m_actionFind->addTo( this ); | 54 | m_actionFind->addTo( this ); |
55 | m_actionFind->setWhatsThis( tr( "Tap here search the current module for the text entered to the left." ) ); | ||
53 | connect( m_actionFind, SIGNAL(activated()), this, SLOT(slotFind()) ); | 56 | connect( m_actionFind, SIGNAL(activated()), this, SLOT(slotFind()) ); |
54 | 57 | ||
55 | addSeparator(); | 58 | addSeparator(); |
56 | 59 | ||
57 | m_actionPrev = new QAction( tr( "Previous result" ), Resource::loadPixmap( "back" ), | 60 | m_actionPrev = new QAction( tr( "Previous result" ), Resource::loadPixmap( "back" ), |
58 | QString::null, 0, this, 0 ); | 61 | QString::null, 0, this, 0 ); |
59 | m_actionPrev->setEnabled( false ); | 62 | m_actionPrev->setEnabled( false ); |
60 | m_actionPrev->addTo( this ); | 63 | m_actionPrev->addTo( this ); |
64 | m_actionPrev->setWhatsThis( tr( "Tap here to view the previous search result." ) ); | ||
61 | connect( m_actionPrev, SIGNAL(activated()), this, SLOT(slotPrev()) ); | 65 | connect( m_actionPrev, SIGNAL(activated()), this, SLOT(slotPrev()) ); |
62 | 66 | ||
63 | m_resultList = new QComboBox( this ); | 67 | m_resultList = new QComboBox( this ); |
64 | m_resultList->setEnabled( false ); | 68 | m_resultList->setEnabled( false ); |
69 | QWhatsThis::add( m_resultList, tr( "Select the desired search result here." ) ); | ||
65 | connect( m_resultList, SIGNAL(activated(const QString &)), this, SIGNAL(sigResultClicked(const QString &)) ); | 70 | connect( m_resultList, SIGNAL(activated(const QString &)), this, SIGNAL(sigResultClicked(const QString &)) ); |
66 | 71 | ||
67 | m_actionNext = new QAction( tr( "Next result" ), Resource::loadPixmap( "forward" ), | 72 | m_actionNext = new QAction( tr( "Next result" ), Resource::loadPixmap( "forward" ), |
68 | QString::null, 0, this, 0 ); | 73 | QString::null, 0, this, 0 ); |
69 | m_actionNext->setEnabled( false ); | 74 | m_actionNext->setEnabled( false ); |
70 | m_actionNext->addTo( this ); | 75 | m_actionNext->addTo( this ); |
76 | m_actionNext->setWhatsThis( tr( "Tap here to view the next search result." ) ); | ||
71 | connect( m_actionNext, SIGNAL(activated()), this, SLOT(slotNext()) ); | 77 | connect( m_actionNext, SIGNAL(activated()), this, SLOT(slotNext()) ); |
72 | 78 | ||
73 | if ( parent ) | 79 | if ( parent ) |
74 | { | 80 | { |
75 | installEventFilter( parent ); | 81 | installEventFilter( parent ); |
76 | // TODO - install for all controls | 82 | // TODO - install for all controls |