Changeset 7f84a70
- Timestamp:
- 01/19/10 13:55:24 (13 years ago)
- Branches:
- master, qt5
- Children:
- 0c658c1
- Parents:
- 2fc2878
- Location:
- src/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r2fc2878 r7f84a70 39 39 connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &))); 40 40 connect(activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &))); 41 connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesDayView(const QDate &))); 41 42 42 43 // DAY EVENTS View … … 94 95 dayNavigator->setDates(aStartDate, aEndDate); 95 96 activityDayNavigator->setDates(aStartDate, aEndDate); 97 favouriteDayNavigator->setDates(aStartDate, aEndDate); 96 98 } 97 99 … … 168 170 static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId); 169 171 dayTreeView->reset(); 172 dayNavigator->show(); 170 173 } 171 174 break; 172 175 case 1: //index 1 of tabWidget: favouritesTab 173 176 { 174 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId); 175 favTreeView->reset(); 177 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId); 178 favTreeView->reset(); 179 favouriteDayNavigator->show(); 180 } 181 break; 182 case 2: //index 2 of tabWidget: activitiesTab 183 { 184 static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(Conference::getById(confId).start(),confId); 185 actTreeView->reset(); 186 activityDayNavigator->show(); 176 187 } 177 188 break; 178 189 default: 179 190 { 180 //TODO: update of activitiesTab needed? 191 181 192 } 182 193 }; 183 194 184 dayNavigator->show(); 185 } 186 195 196 } 187 197 188 198 void MainWindow::updateActivitiesDayView(const QDate &aDate) … … 192 202 actTreeView->reset(); 193 203 activityDayNavigator->show(); 204 } 205 206 void MainWindow::updateFavouritesDayView(const QDate &aDate) 207 { 208 int confId = 1; 209 static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId); 210 favTreeView->reset(); 211 favouriteDayNavigator->show(); 194 212 } 195 213 -
src/gui/mainwindow.h
r2fc2878 r7f84a70 21 21 void updateDayView(const QDate &aDate); 22 22 void updateTab(const int n); 23 /*void updateFavViewComplete();*/24 23 void updateActivitiesDayView(const QDate &aDate); 24 void updateFavouritesDayView(const QDate &aDate); 25 25 void itemDoubleClicked(const QModelIndex &aIndex); 26 26 void displayMap(const QModelIndex &aIndex); -
src/gui/mainwindow.ui
r2fc2878 r7f84a70 1 <ui version="4.0" > 1 <?xml version="1.0" encoding="UTF-8"?> 2 <ui version="4.0"> 2 3 <class>MainWindow</class> 3 <widget class="QMainWindow" name="MainWindow" 4 <property name="geometry" 4 <widget class="QMainWindow" name="MainWindow"> 5 <property name="geometry"> 5 6 <rect> 6 7 <x>0</x> … … 10 11 </rect> 11 12 </property> 12 <property name="minimumSize" 13 <property name="minimumSize"> 13 14 <size> 14 15 <width>400</width> … … 16 17 </size> 17 18 </property> 18 <property name="windowTitle" 19 <property name="windowTitle"> 19 20 <string>MainWindow</string> 20 21 </property> 21 <widget class="QWidget" name="centralwidget" 22 <layout class="QGridLayout" name="gridLayout" 23 <item row="0" column="0" 24 <widget class="QTabWidget" name="tabWidget" 25 <property name="currentIndex" 22 <widget class="QWidget" name="centralwidget"> 23 <layout class="QGridLayout" name="gridLayout"> 24 <item row="0" column="0"> 25 <widget class="QTabWidget" name="tabWidget"> 26 <property name="currentIndex"> 26 27 <number>1</number> 27 28 </property> 28 <widget class="QWidget" name="dayViewTab" 29 <attribute name="title" 29 <widget class="QWidget" name="dayViewTab"> 30 <attribute name="title"> 30 31 <string>Day View</string> 31 32 </attribute> 32 <layout class="QGridLayout" name="gridLayout_2" 33 <item row="0" column="0" 34 <layout class="QVBoxLayout" name="verticalLayout" 33 <layout class="QGridLayout" name="gridLayout_2"> 34 <item row="0" column="0"> 35 <layout class="QVBoxLayout" name="verticalLayout"> 35 36 <item> 36 <widget class="DayNavigatorWidget" na tive="1" name="dayNavigator"/>37 <widget class="DayNavigatorWidget" name="dayNavigator" native="true"/> 37 38 </item> 38 39 <item> 39 <widget class="TreeView" name="dayTreeView" 40 <property name="maximumSize" 40 <widget class="TreeView" name="dayTreeView"> 41 <property name="maximumSize"> 41 42 <size> 42 43 <width>16777215</width> … … 50 51 </layout> 51 52 </widget> 52 <widget class="QWidget" name="favouritesTab" 53 <attribute name="title" 53 <widget class="QWidget" name="favouritesTab"> 54 <attribute name="title"> 54 55 <string>Favourites</string> 55 56 </attribute> 56 <layout class="QGridLayout" name="gridLayout_3" > 57 <item row="0" column="0" > 58 <widget class="TreeView" name="favTreeView" /> 57 <layout class="QGridLayout" name="gridLayout_3"> 58 <item row="0" column="0"> 59 <layout class="QVBoxLayout" name="verticalLayout_2"> 60 <item> 61 <widget class="DayNavigatorWidget" name="favouriteDayNavigator" native="true"/> 62 </item> 63 <item> 64 <widget class="TreeView" name="favTreeView"/> 65 </item> 66 </layout> 59 67 </item> 60 68 </layout> 61 69 </widget> 62 <widget class="QWidget" name="activitiesTab" 63 <attribute name="title" 70 <widget class="QWidget" name="activitiesTab"> 71 <attribute name="title"> 64 72 <string>Activities</string> 65 73 </attribute> 66 <layout class="QGridLayout" name="gridLayout_4" 67 <item row="0" column="0" 68 <layout class="QVBoxLayout" name="activitiesVerticalLayout" 74 <layout class="QGridLayout" name="gridLayout_4"> 75 <item row="0" column="0"> 76 <layout class="QVBoxLayout" name="activitiesVerticalLayout"> 69 77 <item> 70 <widget class="DayNavigatorWidget" na tive="1" name="activityDayNavigator"/>78 <widget class="DayNavigatorWidget" name="activityDayNavigator" native="true"/> 71 79 </item> 72 80 <item> 73 <widget class="TreeView" name="actTreeView" 74 <property name="maximumSize" 81 <widget class="TreeView" name="actTreeView"> 82 <property name="maximumSize"> 75 83 <size> 76 84 <width>16777215</width> … … 84 92 </layout> 85 93 </widget> 86 <widget class="QWidget" name="searchTab" 87 <attribute name="title" 94 <widget class="QWidget" name="searchTab"> 95 <attribute name="title"> 88 96 <string>Search</string> 89 97 </attribute> 90 98 </widget> 91 <widget class="QWidget" name="mapTab" 92 <attribute name="title" 99 <widget class="QWidget" name="mapTab"> 100 <attribute name="title"> 93 101 <string>Map</string> 94 102 </attribute> … … 98 106 </layout> 99 107 </widget> 100 <widget class="QMenuBar" name="menubar" 101 <property name="geometry" 108 <widget class="QMenuBar" name="menubar"> 109 <property name="geometry"> 102 110 <rect> 103 111 <x>0</x> 104 112 <y>0</y> 105 113 <width>531</width> 106 <height> 40</height>114 <height>24</height> 107 115 </rect> 108 116 </property> 109 <widget class="QMenu" name="menuFile" 110 <property name="title" 117 <widget class="QMenu" name="menuFile"> 118 <property name="title"> 111 119 <string>File</string> 112 120 </property> 113 <addaction name="actionImportSchedule" 114 <addaction name="actionQuit" 121 <addaction name="actionImportSchedule"/> 122 <addaction name="actionQuit"/> 115 123 </widget> 116 <widget class="QMenu" name="menuAbout" 117 <property name="title" 124 <widget class="QMenu" name="menuAbout"> 125 <property name="title"> 118 126 <string>Help</string> 119 127 </property> 120 <addaction name="actionAboutQt" 121 <addaction name="actionAboutApplication" 128 <addaction name="actionAboutQt"/> 129 <addaction name="actionAboutApplication"/> 122 130 </widget> 123 <addaction name="menuAbout" 124 <addaction name="menuFile" 131 <addaction name="menuAbout"/> 132 <addaction name="menuFile"/> 125 133 </widget> 126 <widget class="QStatusBar" name="statusbar" 127 <action name="actionImportSchedule" 128 <property name="text" 134 <widget class="QStatusBar" name="statusbar"/> 135 <action name="actionImportSchedule"> 136 <property name="text"> 129 137 <string>Import Schedule</string> 130 138 </property> 131 139 </action> 132 <action name="actionAboutQt" 133 <property name="text" 140 <action name="actionAboutQt"> 141 <property name="text"> 134 142 <string>About Qt</string> 135 143 </property> 136 144 </action> 137 <action name="actionAboutApplication" 138 <property name="text" 145 <action name="actionAboutApplication"> 146 <property name="text"> 139 147 <string>About application</string> 140 148 </property> 141 149 </action> 142 <action name="actionQuit" 143 <property name="text" 150 <action name="actionQuit"> 151 <property name="text"> 144 152 <string>Quit</string> 145 153 </property> … … 167 175 <slot>close()</slot> 168 176 <hints> 169 <hint type="sourcelabel" 177 <hint type="sourcelabel"> 170 178 <x>-1</x> 171 179 <y>-1</y> 172 180 </hint> 173 <hint type="destinationlabel" 181 <hint type="destinationlabel"> 174 182 <x>266</x> 175 183 <y>187</y>
Note: See TracChangeset
for help on using the changeset viewer.