From: pavelpa Date: Thu, 28 Jan 2010 08:50:52 +0000 (+0000) Subject: search tab - header is hidden in case no conf exists in the DB X-Git-Tag: 0.5.0~159 X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/commitdiff_plain/bb6f7d6c26949e8c282b275cd0b564e4e18ca776 search tab - header is hidden in case no conf exists in the DB --- diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index b5882d6..1d8bf0a 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -135,8 +135,9 @@ void MainWindow::initTabs() dayTabContainer->setDates(startDate, endDate); tracksTabContainer->setDates(startDate, endDate); roomsTabContainer->setDates(startDate, endDate); - favsTabContainer->setDates(startDate, endDate); - searchTabContainer->setDates(startDate, endDate); + //favsTabContainer->setDates(startDate, endDate); + //searchTabContainer->setDates(startDate, endDate); + searchTabContainer->searchAgainClicked(); nowTabContainer->updateTreeView(QDate::currentDate()); } diff --git a/src/gui/searchtabcontainer.cpp b/src/gui/searchtabcontainer.cpp index b69b664..310d692 100644 --- a/src/gui/searchtabcontainer.cpp +++ b/src/gui/searchtabcontainer.cpp @@ -34,6 +34,11 @@ SearchTabContainer::SearchTabContainer(QWidget *aParent) : TabContainer( aParent searchAgainButton->hide(); treeView->hide(); + // do not show 'search' header if there are no conferences in the DB + if(Conference::getAll().count()==0) + { + header->hide(); + } connect( header, SIGNAL(searchClicked()), SLOT(searchButtonClicked())); connect( searchAgainButton, SIGNAL(clicked()), SLOT(searchAgainClicked())); diff --git a/src/gui/searchtabcontainer.h b/src/gui/searchtabcontainer.h index bcfdc7b..1eb56a4 100644 --- a/src/gui/searchtabcontainer.h +++ b/src/gui/searchtabcontainer.h @@ -14,9 +14,10 @@ public: virtual ~SearchTabContainer(); protected: virtual void loadEvents( const QDate &aDate, const int aConferenceId ); +public slots: + void searchAgainClicked(); // made it public - to show header when 1.st conf importing is done successfuly private slots: void searchButtonClicked(); - void searchAgainClicked(); private: SearchHead *header; diff --git a/src/gui/tabcontainer.cpp b/src/gui/tabcontainer.cpp index 8f30a96..7a5da45 100644 --- a/src/gui/tabcontainer.cpp +++ b/src/gui/tabcontainer.cpp @@ -31,16 +31,8 @@ TabContainer::TabContainer(QWidget *aParent) connect(treeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &))); - if(!Conference::getAll().count()) // no conference(s) in the DB - { - dayNavigator->hide(); - } - else - { - QDate aStartDate = Conference::getById(Conference::activeConference()).start(); - QDate aEndDate = Conference::getById(Conference::activeConference()).end(); - dayNavigator->setDates(aStartDate, aEndDate); - } + // day navigator is hidden by default + dayNavigator->hide(); } void TabContainer::updateTreeView(const QDate &aDate)