- Timestamp:
- 01/25/10 13:52:01 (13 years ago)
- Branches:
- master, qt5
- Children:
- c7b58d4
- Parents:
- 7b70507
- Location:
- src/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
r7b70507 r7620de0 54 54 connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesView(const QDate &))); 55 55 connect(searchDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateSearchView(const QDate &))); 56 connect(roomDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateRoomView(const QDate &))); 56 57 57 58 // DAY EVENTS View … … 95 96 nowTreeView->setItemDelegate(new Delegate(nowTreeView)); 96 97 98 // ROOMS View 99 roomTreeView->setHeaderHidden(true); 100 roomTreeView->setRootIsDecorated(false); 101 roomTreeView->setIndentation(0); 102 roomTreeView->setAnimated(true); 103 roomTreeView->setModel(new EventModel()); 104 roomTreeView->setItemDelegate(new Delegate(roomTreeView)); 105 97 106 // event details have changed 98 107 connect(dayTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int))); … … 101 110 connect(searchTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int))); 102 111 connect(nowTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int))); 112 connect(roomTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int))); 103 113 104 114 // event clicked … … 108 118 connect(searchTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 109 119 connect(nowTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 120 connect(roomTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 110 121 // request for map to be displayed 111 122 connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); … … 114 125 connect(searchTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 115 126 connect(nowTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 127 connect(roomTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); 116 128 // request for warning to be displayed 117 129 connect(dayTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &))); … … 120 132 connect(searchTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &))); 121 133 connect(nowTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &))); 134 connect(roomTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &))); 122 135 // event search button clicked 123 136 connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked())); … … 132 145 dayNavigator->hide(); // hide DayNavigatorWidget 133 146 trackDayNavigator->hide(); 147 roomDayNavigator->hide(); 134 148 } 135 149 else … … 141 155 favouriteDayNavigator->setDates(aStartDate, aEndDate); 142 156 searchDayNavigator->setDates(aStartDate, aEndDate); 157 roomDayNavigator->setDates(aStartDate, aEndDate); 143 158 // 144 159 conferenceTitle->setText(Conference::getById(AppSettings::confId()).title()); … … 232 247 void MainWindow::updateSearchView(const QDate &aDate) 233 248 { 249 /* 234 250 searchTreeView->reset(); 235 251 int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,AppSettings::confId()); … … 245 261 searchHead->show(); 246 262 } 263 */ 247 264 } 248 265 … … 253 270 nowTreeView->reset(); 254 271 nowTreeView->setAllExpanded(true); 272 } 273 274 void MainWindow::updateRoomView(const QDate &aDate) 275 { 276 static_cast<EventModel*>(roomTreeView->model())->loadEventsByRoom(aDate, AppSettings::confId()); 277 roomTreeView->reset(); 278 roomDayNavigator->show(); 255 279 } 256 280 -
src/gui/mainwindow.h
r7b70507 r7620de0 24 24 void updateSearchView(const QDate &aDate); 25 25 void updateNowView(); 26 void updateRoomView(const QDate &aDate); 26 27 void itemClicked(const QModelIndex &aIndex); 27 28 void displayMap(const QModelIndex &aIndex); -
src/gui/mainwindow.ui
r7b70507 r7620de0 6 6 <x>0</x> 7 7 <y>0</y> 8 <width> 654</width>9 <height> 444</height>8 <width>935</width> 9 <height>530</height> 10 10 </rect> 11 11 </property> … … 119 119 </layout> 120 120 </widget> 121 <widget class="QWidget" name="searchTab" >122 <attribute name="title" >121 <widget class="QWidget" name="searchTab" > 122 <attribute name="title" > 123 123 <string>Search</string> 124 124 </attribute> 125 <layout class="Q HBoxLayout" name="horizontalLayout_1">125 <layout class="QVBoxLayout" name="verticalLayout_3" > 126 126 <item> 127 <widget class="QWidget" name="searchVerticalWidget" native="true"> 128 <layout class="QVBoxLayout" name="searchDayNavigatorVerticalLayout"> 129 <item> 130 <widget class="QToolButton" name="searchAgainButton"> 131 <property name="text"> 132 <string>Search again</string> 133 </property> 134 <property name="toolButtonStyle"> 135 <enum>Qt::ToolButtonTextOnly</enum> 136 </property> 137 </widget> 138 </item> 139 <item> 140 <widget class="DayNavigatorWidget" name="searchDayNavigator" native="true"> 141 <property name="maximumSize"> 142 <size> 143 <width>16777215</width> 144 <height>16777215</height> 145 </size> 146 </property> 147 </widget> 148 </item> 149 </layout> 150 </widget> 127 <layout class="QFormLayout" name="searchHeadLayout" > 128 <property name="fieldGrowthPolicy" > 129 <enum>QFormLayout::AllNonFixedFieldsGrow</enum> 130 </property> 131 <item row="0" column="0" > 132 <widget class="QCheckBox" name="searchTitle" > 133 <property name="text" > 134 <string>Title</string> 135 </property> 136 </widget> 137 </item> 138 <item row="0" column="1" > 139 <layout class="QHBoxLayout" name="horizontalLayout" > 140 <item> 141 <widget class="QLineEdit" name="searchEdit" > 142 <property name="enabled" > 143 <bool>true</bool> 144 </property> 145 <property name="toolTip" > 146 <string>type a keyword to search</string> 147 </property> 148 </widget> 149 </item> 150 <item> 151 <widget class="QPushButton" name="searchButton" > 152 <property name="text" > 153 <string>Search</string> 154 </property> 155 <property name="checkable" > 156 <bool>false</bool> 157 </property> 158 <property name="autoDefault" > 159 <bool>false</bool> 160 </property> 161 <property name="default" > 162 <bool>true</bool> 163 </property> 164 <property name="flat" > 165 <bool>false</bool> 166 </property> 167 </widget> 168 </item> 169 </layout> 170 </item> 171 <item row="1" column="0" > 172 <widget class="QCheckBox" name="searchAbstract" > 173 <property name="text" > 174 <string>Abstract</string> 175 </property> 176 </widget> 177 </item> 178 </layout> 151 179 </item> 152 180 <item> 153 <layout class="QVBoxLayout" name="verticalLayout_3"> 154 <item> 155 <widget class="QWidget" name="searchHead" native="true"> 156 <layout class="QFormLayout" name="searchHeadLayout"> 157 <property name="fieldGrowthPolicy"> 158 <enum>QFormLayout::AllNonFixedFieldsGrow</enum> 159 </property> 160 <item row="0" column="0"> 161 <widget class="QCheckBox" name="searchTitle"> 162 <property name="text"> 163 <string>Title</string> 164 </property> 165 </widget> 166 </item> 167 <item row="0" column="1"> 168 <layout class="QHBoxLayout" name="horizontalLayout"> 169 <item> 170 <widget class="QLineEdit" name="searchEdit"> 171 <property name="enabled"> 172 <bool>true</bool> 173 </property> 174 <property name="toolTip"> 175 <string>type a keyword to search</string> 176 </property> 177 </widget> 178 </item> 179 <item> 180 <widget class="QPushButton" name="searchButton"> 181 <property name="text"> 182 <string>Search</string> 183 </property> 184 <property name="checkable"> 185 <bool>false</bool> 186 </property> 187 <property name="autoDefault"> 188 <bool>true</bool> 189 </property> 190 <property name="default"> 191 <bool>true</bool> 192 </property> 193 <property name="flat"> 194 <bool>false</bool> 195 </property> 196 </widget> 197 </item> 198 </layout> 199 </item> 200 <item row="1" column="0"> 201 <widget class="QCheckBox" name="searchAbstract"> 202 <property name="text"> 203 <string>Abstract</string> 204 </property> 205 </widget> 206 </item> 207 </layout> 208 </widget> 209 </item> 210 <item> 211 <widget class="TreeView" name="searchTreeView"> 212 <property name="maximumSize"> 181 <layout class="QHBoxLayout" name="searchDayNavigatorHorizontalLayout" > 182 <item> 183 <spacer name="horizontalSpacer_2" > 184 <property name="orientation" > 185 <enum>Qt::Horizontal</enum> 186 </property> 187 <property name="sizeHint" stdset="0" > 188 <size> 189 <width>40</width> 190 <height>20</height> 191 </size> 192 </property> 193 </spacer> 194 </item> 195 <item> 196 <widget class="DayNavigatorWidget" native="1" name="searchDayNavigator" > 197 <property name="maximumSize" > 213 198 <size> 214 199 <width>16777215</width> … … 218 203 </widget> 219 204 </item> 220 </layout> 221 </item> 222 </layout> 223 </widget> 224 <widget class="QWidget" name="conferenceTab" > 225 <attribute name="title" > 205 <item> 206 <spacer name="horizontalSpacer" > 207 <property name="orientation" > 208 <enum>Qt::Horizontal</enum> 209 </property> 210 <property name="sizeHint" stdset="0" > 211 <size> 212 <width>40</width> 213 <height>20</height> 214 </size> 215 </property> 216 </spacer> 217 </item> 218 </layout> 219 </item> 220 <item> 221 <widget class="TreeView" name="searchTreeView" > 222 <property name="maximumSize" > 223 <size> 224 <width>16777215</width> 225 <height>16777215</height> 226 </size> 227 </property> 228 </widget> 229 </item> 230 </layout> 231 </widget> 232 <widget class="QWidget" name="roomsTab" > 233 <attribute name="title" > 234 <string>Rooms</string> 235 </attribute> 236 <layout class="QGridLayout" name="gridLayout_8" > 237 <item row="0" column="0" > 238 <layout class="QHBoxLayout" name="horizontalLayout_5" > 239 <property name="sizeConstraint" > 240 <enum>QLayout::SetDefaultConstraint</enum> 241 </property> 242 <item> 243 <widget class="DayNavigatorWidget" native="1" name="roomDayNavigator" /> 244 </item> 245 <item> 246 <widget class="TreeView" name="roomTreeView" > 247 <property name="maximumSize" > 248 <size> 249 <width>16777215</width> 250 <height>16777215</height> 251 </size> 252 </property> 253 </widget> 254 </item> 255 </layout> 256 </item> 257 </layout> 258 </widget> 259 <widget class="QWidget" name="conferenceTab" > 260 <attribute name="title" > 226 261 <string>Conference</string> 227 262 </attribute> … … 356 391 <x>0</x> 357 392 <y>0</y> 358 <width> 654</width>393 <width>935</width> 359 394 <height>26</height> 360 395 </rect>
Note: See TracChangeset
for help on using the changeset viewer.