Removed the "Now" tab.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 4 Oct 2011 22:11:03 +0000 (22:11 +0000)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 4 Oct 2011 22:11:03 +0000 (22:11 +0000)
Removed the day navigator inside tabs.
Added a search button in the button bar.

Right now, at least the following does not work:
* update of favorites
* conflict editor
* setting favorite in the event dialog

13 files changed:
src/gui/conflictdialogcontainer.cpp
src/gui/conflictsdialog.cpp
src/gui/gui.pro
src/gui/mainwindow.cpp
src/gui/mainwindow.h
src/gui/mainwindow.ui
src/gui/nowtabcontainer.cpp [deleted file]
src/gui/nowtabcontainer.h [deleted file]
src/gui/searchtabcontainer.cpp
src/gui/searchtabcontainer.h
src/gui/tabcontainer.cpp
src/gui/tabcontainer.h
src/gui/tabcontainer.ui

index 8e3e00b..2149c6b 100644 (file)
@@ -30,7 +30,6 @@ void ConflictDialogContainer::loadEvents( const QDate &aDate, const int aConfere
     Q_UNUSED(aDate);
 
     static_cast<EventModel*>(treeView->model())->loadConflictEvents( mEventId, aConferenceId );
-    dayNavigator->hide();
 }
 
 void ConflictDialogContainer::updateTreeView(const QDate &aDate)
index 11fed30..b4832f7 100644 (file)
@@ -27,11 +27,6 @@ ConflictsDialog::ConflictsDialog(int aEventId, QWidget *aParent)
     connect(container, SIGNAL(eventHasChanged(int,bool)), container, SLOT(updateTreeViewModel(int,bool)));
 
     container->setEventId(aEventId);
-
-    int confId = Conference::activeConference();
-    QDate startDate = Conference::getById(confId).start();
-    QDate endDate = Conference::getById(confId).end();
-    container->setDates(startDate, endDate);
 }
 
 ConflictsDialog::~ConflictsDialog()
index b6898f7..cdea671 100644 (file)
@@ -49,7 +49,6 @@ FORMS += searchhead.ui \
     urlinputdialog.ui
 
 HEADERS += roomstabcontainer.h \
-    nowtabcontainer.h \
     trackstabcontainer.h \
     favtabcontainer.h \
     searchtabcontainer.h \
@@ -66,7 +65,6 @@ HEADERS += roomstabcontainer.h \
     urlinputdialog.h
 
 SOURCES += roomstabcontainer.cpp \
-    nowtabcontainer.cpp \
     trackstabcontainer.cpp \
     favtabcontainer.cpp \
     searchtabcontainer.cpp \
@@ -93,3 +91,5 @@ CONFIG(maemo5) {
 #    HEADERS += alarmdialog.h
 #    SOURCES += alarmdialog.cpp
 #}
+
+
index 76e69ae..730755d 100644 (file)
@@ -84,24 +84,18 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     QNetworkProxy::setApplicationProxy(proxy);
 
     // event details have changed
-    connect(dayTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(favsTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(tracksTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(roomsTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(nowTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
-    connect(searchTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
+    connect(dayTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
+    connect(favsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
+    connect(tracksTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
+    connect(roomsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
+    connect(searchTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
 
     // date has changed
-    connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(setCurDate(QDate)));
-    connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(setCurDate(QDate)));
-    connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(setCurDate(QDate)));
-    connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(setCurDate(QDate)));
-    connect(dayNavigator, SIGNAL(dateChanged(QDate)), nowTabContainer, SLOT(setCurDate(QDate)));
-    connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(setCurDate(QDate)));
-
-    connect(aboutAction, SIGNAL(triggered()), SLOT(aboutApp()));
-    connect(settingsAction, SIGNAL(triggered()), SLOT(setup()));
-    connect(conferencesAction, SIGNAL(triggered()), SLOT(showConferences()));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(redisplayDate(QDate)));
+    connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(redisplayDate(QDate)));
 
     useConference(Conference::activeConference());
     // optimization, see useConference() code
@@ -131,7 +125,7 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     connect(mXmlParser, SIGNAL(parsingScheduleEnd(const QString&)), conferenceModel, SLOT(newConferenceEnd(const QString&)));
 }
 
-void MainWindow::aboutApp()
+void MainWindow::on_aboutAction_triggered()
 {
     QDialog dialog(this);
     Ui::AboutDialog ui;
@@ -143,14 +137,31 @@ void MainWindow::aboutApp()
     dialog.exec();
 }
 
-void MainWindow::eventHasChanged(int aEventId, bool aReloadModel)
+
+void MainWindow::on_reloadAction_triggered() {
+
+}
+
+
+void MainWindow::on_nowAction_triggered() {
+
+}
+
+
+void MainWindow::on_searchAction_triggered() {
+    searchTabContainer->showSearchDialog();
+    tabWidget->setCurrentWidget(searchTab);
+}
+
+
+
+void MainWindow::redisplayEvent(int aEventId, bool aReloadModel)
 {
-    dayTabContainer->updateTreeViewModel(aEventId);
-    favsTabContainer->updateTreeViewModel(aEventId,aReloadModel);
-    tracksTabContainer->updateTreeViewModel(aEventId);
-    nowTabContainer->updateTreeViewModel(aEventId);
-    roomsTabContainer->updateTreeViewModel(aEventId);
-    searchTabContainer->updateTreeViewModel(aEventId);
+    dayTabContainer->redisplayEvent(aEventId);
+    favsTabContainer->redisplayEvent(aEventId,aReloadModel);
+    tracksTabContainer->redisplayEvent(aEventId);
+    roomsTabContainer->redisplayEvent(aEventId);
+    searchTabContainer->redisplayEvent(aEventId);
 }
 
 void MainWindow::useConference(int id)
@@ -200,13 +211,6 @@ void MainWindow::initTabs()
         QDate endDate = active.end();
 
         // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
-        dayTabContainer->setDates(startDate, endDate);
-        tracksTabContainer->setDates(startDate, endDate);
-        roomsTabContainer->setDates(startDate, endDate);
-        favsTabContainer->setDates(startDate, endDate);
-        searchTabContainer->setDates(startDate, endDate);
-        searchTabContainer->searchAgainClicked();
-        nowTabContainer->updateTreeView(QDate::currentDate());
         dayNavigator->setDates(startDate, endDate);
     }
 }
@@ -218,8 +222,6 @@ void MainWindow::clearTabs()
     roomsTabContainer->clearModel();
     favsTabContainer->clearModel();
     searchTabContainer->clearModel();
-    searchTabContainer->searchAgainClicked();
-    nowTabContainer->clearModel();
 }
 
 void MainWindow::unsetConference()
@@ -229,7 +231,7 @@ void MainWindow::unsetConference()
     setWindowTitle(saved_title);
 }
 
-void MainWindow::setup()
+void MainWindow::on_settingsAction_triggered()
 {
     SettingsDialog dialog;
     dialog.loadDialogData();
@@ -255,7 +257,7 @@ this:
 this, mXmlParser and mNetworkAccessManager:
  addition and refresh.
 */
-void MainWindow::showConferences()
+void MainWindow::on_conferencesAction_triggered()
 {
     ConferenceEditor dialog(conferenceModel, this);
 
index 2ce3b4f..1d38333 100644 (file)
@@ -41,11 +41,15 @@ public:
 signals:
     void conferenceRemoved();
 private slots:
-    void aboutApp();
-    void eventHasChanged(int aEventId, bool aReloadModel);
-    void setup();
+    void on_conferencesAction_triggered();
+    void on_settingsAction_triggered();
+    void on_aboutAction_triggered();
+    void on_reloadAction_triggered();
+    void on_nowAction_triggered();
+    void on_searchAction_triggered();
+
+    void redisplayEvent(int aEventId, bool aReloadModel);
     // TODO: remove
-    void showConferences();
     void networkQueryFinished(QNetworkReply*);
     void importFromNetwork(const QString&);
     void importFromFile(const QString&);
index 4056039..49eacca 100644 (file)
     <item>
      <widget class="QTabWidget" name="tabWidget">
       <property name="currentIndex">
-       <number>1</number>
+       <number>0</number>
       </property>
       <property name="elideMode">
        <enum>Qt::ElideRight</enum>
       </property>
-      <widget class="QWidget" name="nowTab">
-       <attribute name="title">
-        <string>Now</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_7">
-        <item row="0" column="0">
-         <widget class="NowTabContainer" name="nowTabContainer" native="true"/>
-        </item>
-       </layout>
-      </widget>
       <widget class="QWidget" name="favouritesTab">
        <attribute name="title">
-        <string>Favourites</string>
+        <string>&amp;Favourites</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout_3">
         <item row="0" column="0">
@@ -65,7 +55,7 @@
       </widget>
       <widget class="QWidget" name="dayViewTab">
        <attribute name="title">
-        <string>Day View</string>
+        <string>&amp;Days</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout">
         <item row="0" column="0">
@@ -75,7 +65,7 @@
       </widget>
       <widget class="QWidget" name="tracksTab">
        <attribute name="title">
-        <string>Tracks</string>
+        <string>&amp;Tracks</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout_4">
         <item row="0" column="0">
@@ -85,7 +75,7 @@
       </widget>
       <widget class="QWidget" name="roomsTab">
        <attribute name="title">
-        <string>Rooms</string>
+        <string>&amp;Rooms</string>
        </attribute>
        <layout class="QGridLayout" name="gridLayout_8">
         <item row="0" column="0">
@@ -95,7 +85,7 @@
       </widget>
       <widget class="QWidget" name="searchTab">
        <attribute name="title">
-        <string>Search</string>
+        <string>&amp;Search</string>
        </attribute>
        <layout class="QHBoxLayout" name="horizontalLayout_1">
         <item>
     <bool>false</bool>
    </attribute>
    <addaction name="reloadAction"/>
-   <addaction name="actionNow"/>
+   <addaction name="nowAction"/>
+   <addaction name="searchAction"/>
   </widget>
   <action name="conferencesAction">
    <property name="text">
-    <string>Conferences</string>
+    <string>C&amp;onferences</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+O</string>
    </property>
   </action>
   <action name="settingsAction">
    <property name="text">
-    <string>Settings</string>
+    <string>S&amp;ettings</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+E</string>
    </property>
   </action>
   <action name="aboutAction">
    <property name="text">
-    <string>About</string>
+    <string>&amp;About</string>
    </property>
   </action>
   <action name="quitAction">
    <property name="text">
     <string>&amp;Quit</string>
    </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
   </action>
   <action name="reloadAction">
    <property name="icon">
     <string>Ctrl+R</string>
    </property>
   </action>
-  <action name="actionNow">
+  <action name="nowAction">
    <property name="icon">
     <iconset resource="../icons.qrc">
      <normaloff>:/icons/today.png</normaloff>:/icons/today.png</iconset>
     <string>Ctrl+N</string>
    </property>
   </action>
+  <action name="searchAction">
+   <property name="icon">
+    <iconset resource="../icons.qrc">
+     <normaloff>:/icons/search.png</normaloff>:/icons/search.png</iconset>
+   </property>
+   <property name="text">
+    <string>&amp;Search</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+F</string>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
    <extends>QWidget</extends>
    <header>roomstabcontainer.h</header>
   </customwidget>
-  <customwidget>
-   <class>NowTabContainer</class>
-   <extends>QWidget</extends>
-   <header>nowtabcontainer.h</header>
-  </customwidget>
   <customwidget>
    <class>DayNavigatorWidget</class>
    <extends>QWidget</extends>
    <header>daynavigatorwidget.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
  <resources>
diff --git a/src/gui/nowtabcontainer.cpp b/src/gui/nowtabcontainer.cpp
deleted file mode 100644 (file)
index f19c2a6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <QTimer>
-#include "nowtabcontainer.h"
-
-NowTabContainer::NowTabContainer( QWidget *aParent ) : TabContainer( aParent )
-{
-    QTimer *timer = new QTimer( this );
-    connect( timer, SIGNAL(timeout()), SLOT(timerUpdateTreeView()) );
-    timer->start( 30000); // 30 seconds timer
-}
-
-void NowTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
-{
-    Q_UNUSED( aDate );
-
-    static_cast<EventModel*>(treeView->model())->loadNowEvents( aConferenceId );
-    dayNavigator->hide();
-}
-
-void NowTabContainer::timerUpdateTreeView()
-{
-    updateTreeView( QDate() );
-}
-
-void NowTabContainer::updateTreeView(const QDate &aDate)
-{
-    TabContainer::updateTreeView(aDate);
-    treeView->setAllExpanded(true);
-}
-
diff --git a/src/gui/nowtabcontainer.h b/src/gui/nowtabcontainer.h
deleted file mode 100644 (file)
index a5650e1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
- *
- * This file is part of ConfClerk.
- *
- * ConfClerk is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * ConfClerk is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NOWTABCONTAINER_H_
-#define NOWTABCONTAINER_H_
-
-#include "tabcontainer.h"
-
-class NowTabContainer: public TabContainer
-{
-    Q_OBJECT
-public:
-    NowTabContainer( QWidget *aParent );
-    virtual ~NowTabContainer() { }
-
-protected:
-    virtual void loadEvents( const QDate &aDate, const int aConferenceId );
-
-public slots:
-    virtual void updateTreeView(const QDate &aDate);
-
-private slots:
-    void timerUpdateTreeView();
-};
-
-#endif /* NOWTABCONTAINER_H_ */
index fa5f22d..9ba4965 100644 (file)
@@ -33,42 +33,19 @@ SearchTabContainer::SearchTabContainer(QWidget *aParent) : TabContainer( aParent
     sizePolicy.setHeightForWidth(header->sizePolicy().hasHeightForWidth());
     header->setSizePolicy(sizePolicy);
     header->setMinimumSize(QSize(10, 10));
-
     verticalLayout->insertWidget(0,header);
+    connect(header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
+    showSearchDialog();
+}
 
-    header->show();
-
-    searchAgainButton = new QToolButton(this);
-    searchAgainButton->setObjectName(QString::fromUtf8("button"));
-    QIcon icon;
-    icon.addPixmap(QPixmap(QString::fromUtf8(":/icons/search.png")), QIcon::Normal, QIcon::Off);
-    searchAgainButton->setIcon(icon);
-    QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Minimum);
-    sizePolicy1.setHorizontalStretch(0);
-    sizePolicy1.setVerticalStretch(0);
-    sizePolicy1.setHeightForWidth(searchAgainButton->sizePolicy().hasHeightForWidth());
-    searchAgainButton->setSizePolicy(sizePolicy1);
-
-    verticalLayout_2->insertWidget(0,searchAgainButton);
 
-    searchAgainButton->hide();
+void SearchTabContainer::showSearchDialog() {
+    header->show();
     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()));
 }
 
-SearchTabContainer::~SearchTabContainer()
-{
-}
 
-void SearchTabContainer::searchButtonClicked()
-{
+void SearchTabContainer::searchButtonClicked() {
     QHash<QString,QString> columns;
 
     SearchHead *searchHeader = static_cast<SearchHead*>(header);
@@ -118,8 +95,6 @@ void SearchTabContainer::searchButtonClicked()
     {
         // TODO: display some message
         treeView->hide();
-        searchAgainButton->hide();
-        dayNavigator->hide();
         header->show();
         QMessageBox::information(
                 this,
@@ -129,23 +104,13 @@ void SearchTabContainer::searchButtonClicked()
     }
     else
     {
-        searchAgainButton->show();
-        dayNavigator->show();
         treeView->show();
         header->hide();
 
         updateTreeView( firstDateWithFounds );
-        dayNavigator->setDates(firstDateWithFounds, lastDateWithFounds);
     }
 }
 
-void SearchTabContainer::searchAgainClicked()
-{
-    header->show();
-    searchAgainButton->hide();
-    dayNavigator->hide();
-    treeView->hide();
-}
 
 void SearchTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
 {
index 458005f..fdb1bc3 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef SEARCHTAB_H_
 #define SEARCHTAB_H_
 
-#include <QWidget>
+#include <QtGui>
 
 #include "tabcontainer.h"
 #include "searchhead.h"
@@ -30,11 +30,13 @@ class SearchTabContainer: public TabContainer {
     Q_OBJECT
 public:
     SearchTabContainer(QWidget *aParent);
-    virtual ~SearchTabContainer();
+    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
+    void showSearchDialog();
+
 private slots:
     void searchButtonClicked();
 
index da29115..694ce78 100644 (file)
@@ -44,20 +44,14 @@ TabContainer::TabContainer(QWidget *aParent)
     treeView->setModel(new EventModel());
     treeView->setItemDelegate(new Delegate(treeView));
 
-    // connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTreeView(const QDate &)));
-
-    connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool)));
+    connect(treeView, SIGNAL(eventChanged(int,bool)), SIGNAL(eventChanged(int,bool)));
     connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
     connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &)));
-
-    // day navigator is hidden by default
-    dayNavigator->hide();
 }
 
 void TabContainer::updateTreeView(const QDate &aDate)
 {
     int active_id = Conference::activeConference();
-    dayNavigator->show();
     if (active_id > 0) {
         loadEvents(aDate, active_id);
     } else {
@@ -75,9 +69,9 @@ void TabContainer::itemClicked(const QModelIndex &aIndex)
 #ifdef N810
     dialog.setFixedWidth(static_cast<QWidget*>(parent())->width());
 #endif
-    connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
     dialog.exec();
-    disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
 }
 
 void TabContainer::displayConflicts(const QModelIndex &aIndex)
@@ -86,42 +80,23 @@ void TabContainer::displayConflicts(const QModelIndex &aIndex)
 #ifdef N810
     dialog.setFixedWidth(static_cast<QWidget*>(parent())->width());
 #endif
-    connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
     dialog.exec();
-    disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
+    disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
 }
 
-void TabContainer::updateTreeViewModel(int aEventId, bool aReloadModel)
-{
-    if(aReloadModel)
-    {
-        // requires special handling
-        // eg. in case of favourites - some favourites may have changed
-        // and so we need to reload them
-        int confId = Conference::activeConference();
-        QDate startDate = Conference::getById(confId).start();
-        QDate endDate = Conference::getById(confId).end();
-        dayNavigator->setDates(startDate, endDate);
-        updateTreeView(dayNavigator->curDate());
-    }
-    else
-    {
-        // just update event in the question
-        static_cast<EventModel*>(treeView->model())->updateModel(aEventId);
-    }
+
+void TabContainer::redisplayEvent(int aEventId, bool aReloadModel) {
+    /* if (aReloadModel) updateTreeView(dayNavigator->curDate());
+    else */ static_cast<EventModel*>(treeView->model())->updateModel(aEventId);
 }
 
 
-void TabContainer::setCurDate(const QDate& curDate) {
+void TabContainer::redisplayDate(const QDate& curDate) {
     updateTreeView(curDate);
 }
 
 
-void TabContainer::setDates(const QDate &aStart, const QDate &aEnd)
-{
-    dayNavigator->setDates(aStart, aEnd);
-}
-
 void TabContainer::clearModel()
 {
     static_cast<EventModel*>(treeView->model())->clearModel();
index dfbf653..fa85b73 100644 (file)
@@ -41,12 +41,11 @@ protected:
     virtual void loadEvents( const QDate &aDate, const int aConferenceId ) = 0;
 
 signals:
-    void eventHasChanged(int aEventId, bool aReloadModel);
+    void eventChanged(int aEventId, bool aReloadModel);
 
 public slots:
-    virtual void updateTreeViewModel(int aEventId, bool aReloadModel = false);
-    void setCurDate(const QDate& curDate);
-    void setDates(const QDate &aStart, const QDate &aEnd);
+    virtual void redisplayEvent(int aEventId, bool aReloadModel = false);
+    void redisplayDate(const QDate& curDate);
 
 protected slots:
     virtual void updateTreeView(const QDate &aDate);
index 56e6e10..77b1205 100644 (file)
@@ -23,7 +23,7 @@
    <property name="margin">
     <number>0</number>
    </property>
-   <item row="0" column="2">
+   <item row="0" column="1">
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
       <widget class="TreeView" name="treeView">
      </item>
     </layout>
    </item>
-   <item row="0" column="1">
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <item>
-      <widget class="DayNavigatorWidget" name="dayNavigator" native="true">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize">
-        <size>
-         <width>10</width>
-         <height>10</height>
-        </size>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
   </layout>
  </widget>
  <customwidgets>
-  <customwidget>
-   <class>DayNavigatorWidget</class>
-   <extends>QWidget</extends>
-   <header>daynavigatorwidget.h</header>
-   <container>1</container>
-  </customwidget>
   <customwidget>
    <class>TreeView</class>
    <extends>QTreeView</extends>
    <header>../mvc/treeview.h</header>
   </customwidget>
  </customwidgets>
- <resources>
-  <include location="../icons.qrc"/>
- </resources>
+ <resources/>
  <connections/>
 </ui>