]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.cpp
search update
[toast/confclerk.git] / src / gui / mainwindow.cpp
index ec6fc0e88262013017e00ae5da5066049ffc1f10..43ae8b29c2a389d9b69bf3f37e8ed6eed7176c6c 100644 (file)
@@ -121,6 +121,7 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     connect(nowTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     // event search button clicked
     connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked()));
     connect(nowTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     // event search button clicked
     connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked()));
+    connect(searchAgainButton, SIGNAL(clicked()), SLOT(searchAgainClicked()));
     // event conference map button clicked
     connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
     //
     // event conference map button clicked
     connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
     //
@@ -150,7 +151,8 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     }
 
     searchTreeView->hide();
     }
 
     searchTreeView->hide();
-    searchDayNavigator->hide();
+    searchVerticalWidget->hide();
+    searchHead->show();
 
     // open dialog for given Event ID
     // this is used in case Alarm Dialog request application to start
 
     // open dialog for given Event ID
     // this is used in case Alarm Dialog request application to start
@@ -232,12 +234,15 @@ void MainWindow::updateSearchView(const QDate &aDate)
     searchTreeView->reset();
     int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,AppSettings::confId());
     if( eventsCount ){
     searchTreeView->reset();
     int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,AppSettings::confId());
     if( eventsCount ){
-        searchDayNavigator->show();
+        searchVerticalWidget->show();
+        searchAgainButton->show();
         searchTreeView->show();
         searchTreeView->show();
+        searchHead->hide();
     }
     else{
         searchTreeView->hide();
     }
     else{
         searchTreeView->hide();
-        searchDayNavigator->hide();
+        searchVerticalWidget->hide();
+        searchHead->show();
     }
 }
 
     }
 }
 
@@ -293,6 +298,12 @@ void MainWindow::searchClicked()
     updateSearchView( Conference::getById(AppSettings::confId()).start() );
 }
 
     updateSearchView( Conference::getById(AppSettings::confId()).start() );
 }
 
+void MainWindow::searchAgainClicked()
+{
+    searchHead->show();
+    searchAgainButton->hide();
+}
+
 void MainWindow::conferenceMapClicked()
 {
 
 void MainWindow::conferenceMapClicked()
 {