Diffstat (limited to 'core/pim/osearch/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/mainwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp index 3dba3a9..41ce5b6 100644 --- a/core/pim/osearch/mainwindow.cpp +++ b/core/pim/osearch/mainwindow.cpp | |||
@@ -27,25 +27,25 @@ | |||
27 | #include <qfile.h> | 27 | #include <qfile.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qtextbrowser.h> | 31 | #include <qtextbrowser.h> |
32 | 32 | ||
33 | #include "olistview.h" | 33 | #include "olistview.h" |
34 | #include "olistviewitem.h" | 34 | #include "olistviewitem.h" |
35 | #include "resultitem.h" | 35 | #include "resultitem.h" |
36 | #include "adresssearch.h" | 36 | #include "adresssearch.h" |
37 | #include "todosearch.h" | 37 | #include "todosearch.h" |
38 | #include "datebooksearch.h" | 38 | #include "datebooksearch.h" |
39 | 39 | #include "applnksearch.h" | |
40 | 40 | ||
41 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | 41 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : |
42 | QMainWindow( parent, name, f ), _currentItem(0) | 42 | QMainWindow( parent, name, f ), _currentItem(0) |
43 | { | 43 | { |
44 | setCaption( tr("OSearch") ); | 44 | setCaption( tr("OSearch") ); |
45 | 45 | ||
46 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); | 46 | setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); |
47 | 47 | ||
48 | QFrame *mainFrame = new QFrame( this, "mainFrame" ); | 48 | QFrame *mainFrame = new QFrame( this, "mainFrame" ); |
49 | 49 | ||
50 | mainLayout = new QVBoxLayout( mainFrame ); | 50 | mainLayout = new QVBoxLayout( mainFrame ); |
51 | mainLayout->setSpacing( 0 ); | 51 | mainLayout->setSpacing( 0 ); |
@@ -68,24 +68,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | |||
68 | QPushButton *buttonEdit = new QPushButton( detailsFrame, "Edit" ); | 68 | QPushButton *buttonEdit = new QPushButton( detailsFrame, "Edit" ); |
69 | buttonEdit->setText( tr("edit") ); | 69 | buttonEdit->setText( tr("edit") ); |
70 | // buttonEdit->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); | 70 | // buttonEdit->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)); |
71 | buttonLayout->addWidget( buttonShow, 0 ); | 71 | buttonLayout->addWidget( buttonShow, 0 ); |
72 | buttonLayout->addWidget( buttonEdit, 0 ); | 72 | buttonLayout->addWidget( buttonEdit, 0 ); |
73 | 73 | ||
74 | mainLayout->addWidget( detailsFrame, 0 ); | 74 | mainLayout->addWidget( detailsFrame, 0 ); |
75 | detailsFrame->hide(); | 75 | detailsFrame->hide(); |
76 | 76 | ||
77 | adrSearch = new AdressSearch( resultsList, tr("adressbook") ); | 77 | adrSearch = new AdressSearch( resultsList, tr("adressbook") ); |
78 | todoSearch = new TodoSearch( resultsList, tr("todo") ); | 78 | todoSearch = new TodoSearch( resultsList, tr("todo") ); |
79 | datebookSearch = new DatebookSearch( resultsList, tr("datebook") ); | 79 | datebookSearch = new DatebookSearch( resultsList, tr("datebook") ); |
80 | applnkSearch = new AppLnkSearch( resultsList, tr("applications") ); | ||
80 | 81 | ||
81 | makeMenu(); | 82 | makeMenu(); |
82 | setCentralWidget( mainFrame ); | 83 | setCentralWidget( mainFrame ); |
83 | 84 | ||
84 | popupTimer = new QTimer(); | 85 | popupTimer = new QTimer(); |
85 | 86 | ||
86 | connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); | 87 | connect(popupTimer, SIGNAL(timeout()), SLOT(showPopup())); |
87 | connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); | 88 | connect(resultsList, SIGNAL(pressed(QListViewItem*)), SLOT(setCurrent(QListViewItem*))); |
88 | connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); | 89 | connect(resultsList, SIGNAL(clicked(QListViewItem*)), SLOT(stopTimer(QListViewItem*))); |
89 | connect(buttonShow, SIGNAL(clicked()), SLOT( showItem() ) ); | 90 | connect(buttonShow, SIGNAL(clicked()), SLOT( showItem() ) ); |
90 | connect(buttonEdit, SIGNAL(clicked()), SLOT( editItem() ) ); | 91 | connect(buttonEdit, SIGNAL(clicked()), SLOT( editItem() ) ); |
91 | 92 | ||
@@ -146,24 +147,25 @@ void MainWindow::stopTimer(QListViewItem*) | |||
146 | 147 | ||
147 | void MainWindow::showPopup() | 148 | void MainWindow::showPopup() |
148 | { | 149 | { |
149 | qDebug("showPopup"); | 150 | qDebug("showPopup"); |
150 | if (!_item) return; | 151 | if (!_item) return; |
151 | } | 152 | } |
152 | 153 | ||
153 | void MainWindow::setSearch( const QString &key ) | 154 | void MainWindow::setSearch( const QString &key ) |
154 | { | 155 | { |
155 | adrSearch->setSearch(key); | 156 | adrSearch->setSearch(key); |
156 | todoSearch->setSearch(key); | 157 | todoSearch->setSearch(key); |
157 | datebookSearch->setSearch(key); | 158 | datebookSearch->setSearch(key); |
159 | applnkSearch->setSearch(key); | ||
158 | } | 160 | } |
159 | 161 | ||
160 | 162 | ||
161 | void MainWindow::showItem() | 163 | void MainWindow::showItem() |
162 | { | 164 | { |
163 | if (_currentItem->rtti() == OListViewItem::Result){ | 165 | if (_currentItem->rtti() == OListViewItem::Result){ |
164 | ResultItem *res = (ResultItem*)_currentItem; | 166 | ResultItem *res = (ResultItem*)_currentItem; |
165 | // ResultItem *res = dynamic_cast<ResultItem*>(item); | 167 | // ResultItem *res = dynamic_cast<ResultItem*>(item); |
166 | res->showItem(); | 168 | res->showItem(); |
167 | } | 169 | } |
168 | } | 170 | } |
169 | 171 | ||