#include <QtDebug>\r
\r
WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *aConfiguration, QWidget *aParent ) :\r
- ObservedWidget( aParent ), iConfiguration( aConfiguration )\r
+ ViewBase( ViewBase::NormalView, aParent ), iConfiguration( aConfiguration )\r
{\r
\r
// *****************************************\r
iSettingsButton = new QPushButton;\r
iSettingsButton->setIcon( QPixmap( ":button_settings" ) );\r
iSettingsButton->setFixedWidth( 36 );\r
- connect( iSettingsButton, SIGNAL( clicked() ), this, SIGNAL( showSettingsView() ) );\r
+ connect( iSettingsButton, SIGNAL( clicked() ), this, SIGNAL( settingsButtonClicked() ) );\r
\r
iCurrentDayLabel = ToolBox::createLabel( aCurrentDateTime.toString( iConfiguration->displaySettings()->dateFormat() ), regularTextFont );\r
iCurrentWeekLabel = ToolBox::createLabel( tr( "Wk %1" ).arg( aCurrentDateTime.date().weekNumber() ), regularTextFont );\r
\r
iRoomsCombo = new MeetingRoomCombo( iConfiguration->rooms(), this );\r
iRoomsCombo->setCurrentRoom( iConfiguration->defaultRoom() );\r
- connect( iRoomsCombo, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) );\r
+ connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( currentRoomChanged( Room * ) ) );\r
\r
iTimeDisplay = new DigitalTimeDisplayWidget( aCurrentDateTime.time(), iConfiguration->displaySettings()->timeFormat(), this );\r
iTimeDisplay->setFrameVisible( false );\r
iTimeDisplay->setFont( regularTextFont );\r
- connect( iTimeDisplay, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) );\r
\r
iSchedule = new ScheduleWidget( aCurrentDateTime, iConfiguration->displaySettings(), this );\r
connect( iSchedule, SIGNAL( shownWeekChanged( QDate ) ), this, SIGNAL( shownWeekChanged( QDate ) ) );\r
- connect( iSchedule, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) );\r
connect( iSchedule, SIGNAL( meetingActivated( Meeting* ) ), this, SIGNAL( meetingActivated( Meeting* ) ) );\r
\r
iPreviousWeekButton = new QPushButton( this );\r
mainLayout->addLayout( tableLayout );\r
mainLayout->addLayout( bottomLayout );\r
setLayout( mainLayout );\r
+ \r
+ // Set child observing\r
+ observeChild( iRoomsCombo );\r
+ observeChild( iTimeDisplay );\r
+ observeChild( iCurrentDayLabel );\r
+ observeChild( iCurrentWeekLabel );\r
+ observeChild( iPreviousWeekButton );\r
+ observeChild( iCurrentWeekButton );\r
+ observeChild( iNextWeekButton );\r
+ observeChild( iSettingsButton );\r
\r
QPalette palette;\r
palette.setColor( QPalette::Window, Qt::white );\r
// ******************************************\r
// Handle all the signal connections\r
// TODO : this solution if interaction monitoring is not elegant enough\r
- connect( iPreviousWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) );\r
- connect( iCurrentWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) );\r
- connect( iNextWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) );\r
- connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( observedEventDetected() ) );\r
- connect( iRoomsCombo, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( observedEventDetected() ) );\r
+// connect( iPreviousWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) );\r
+// connect( iCurrentWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) );\r
+// connect( iNextWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) );\r
+// connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( observedEventDetected() ) );\r
+// connect( iRoomsCombo, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( observedEventDetected() ) );\r
// TODO: connect RoomCombo signals to change meetings data.\r
connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), iSchedule, SLOT( clear() ) );\r
connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( currentRoomChanged( Room * ) ) );\r