X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FUserInterface%2FViews%2FWeeklyViewWidget.cpp;h=52833540674d5675989d72347f2b9ac6ef9a22cb;hb=9410983800d4a2e644eafcb728570278281d622c;hp=b33e5172c250aba4e66678cd7c9cd626480f1c9b;hpb=658e4917f437e1f3bb214466ae91dc8fa0ea4705;p=qtmeetings diff --git a/src/UserInterface/Views/WeeklyViewWidget.cpp b/src/UserInterface/Views/WeeklyViewWidget.cpp index b33e517..5283354 100644 --- a/src/UserInterface/Views/WeeklyViewWidget.cpp +++ b/src/UserInterface/Views/WeeklyViewWidget.cpp @@ -20,7 +20,7 @@ #include WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *aConfiguration, QWidget *aParent ) : - ObservedWidget( aParent ), iConfiguration( aConfiguration ) + ViewBase( ViewBase::NormalView, aParent ), iConfiguration( aConfiguration ) { // ***************************************** @@ -36,23 +36,21 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a iSettingsButton = new QPushButton; iSettingsButton->setIcon( QPixmap( ":button_settings" ) ); iSettingsButton->setFixedWidth( 36 ); - connect( iSettingsButton, SIGNAL( clicked() ), this, SIGNAL( showSettingsView() ) ); + connect( iSettingsButton, SIGNAL( clicked() ), this, SIGNAL( settingsButtonClicked() ) ); iCurrentDayLabel = ToolBox::createLabel( aCurrentDateTime.toString( iConfiguration->displaySettings()->dateFormat() ), regularTextFont ); iCurrentWeekLabel = ToolBox::createLabel( tr( "Wk %1" ).arg( aCurrentDateTime.date().weekNumber() ), regularTextFont ); iRoomsCombo = new MeetingRoomCombo( iConfiguration->rooms(), this ); iRoomsCombo->setCurrentRoom( iConfiguration->defaultRoom() ); - connect( iRoomsCombo, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) ); + connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( currentRoomChanged( Room * ) ) ); iTimeDisplay = new DigitalTimeDisplayWidget( aCurrentDateTime.time(), iConfiguration->displaySettings()->timeFormat(), this ); iTimeDisplay->setFrameVisible( false ); iTimeDisplay->setFont( regularTextFont ); - connect( iTimeDisplay, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) ); iSchedule = new ScheduleWidget( aCurrentDateTime, iConfiguration->displaySettings(), this ); connect( iSchedule, SIGNAL( shownWeekChanged( QDate ) ), this, SIGNAL( shownWeekChanged( QDate ) ) ); - connect( iSchedule, SIGNAL( observedEventDetected() ), this, SIGNAL( observedEventDetected() ) ); connect( iSchedule, SIGNAL( meetingActivated( Meeting* ) ), this, SIGNAL( meetingActivated( Meeting* ) ) ); iPreviousWeekButton = new QPushButton( this ); @@ -91,6 +89,16 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a mainLayout->addLayout( tableLayout ); mainLayout->addLayout( bottomLayout ); setLayout( mainLayout ); + + // Set child observing + observeChild( iRoomsCombo ); + observeChild( iTimeDisplay ); + observeChild( iCurrentDayLabel ); + observeChild( iCurrentWeekLabel ); + observeChild( iPreviousWeekButton ); + observeChild( iCurrentWeekButton ); + observeChild( iNextWeekButton ); + observeChild( iSettingsButton ); QPalette palette; palette.setColor( QPalette::Window, Qt::white ); @@ -100,11 +108,11 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a // ****************************************** // Handle all the signal connections // TODO : this solution if interaction monitoring is not elegant enough - connect( iPreviousWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) ); - connect( iCurrentWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) ); - connect( iNextWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) ); - connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( observedEventDetected() ) ); - connect( iRoomsCombo, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( observedEventDetected() ) ); +// connect( iPreviousWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) ); +// connect( iCurrentWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) ); +// connect( iNextWeekButton, SIGNAL( clicked() ), this, SIGNAL( observedEventDetected() ) ); +// connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( observedEventDetected() ) ); +// connect( iRoomsCombo, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( observedEventDetected() ) ); // TODO: connect RoomCombo signals to change meetings data. connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), iSchedule, SLOT( clear() ) ); connect( iRoomsCombo, SIGNAL( currentRoomChanged( Room * ) ), this, SIGNAL( currentRoomChanged( Room * ) ) );