Confilcts solved
authorJan Lapinkataja <jan.lapinkataja@ixonos.com>
Fri, 29 May 2009 10:07:54 +0000 (13:07 +0300)
committerJan Lapinkataja <jan.lapinkataja@ixonos.com>
Fri, 29 May 2009 10:07:54 +0000 (13:07 +0300)
Conflicts:
src/BusinessLogic/Engine.cpp
src/UserInterface/Views/RoomStatusIndicatorWidget.cpp

src/BusinessLogic/Engine.cpp
src/BusinessLogic/UIManager.cpp
src/UserInterface/Views/RoomStatusIndicatorWidget.cpp
src/UserInterface/Views/RoomStatusIndicatorWidget.h

index a31a963..962da10 100644 (file)
@@ -264,8 +264,8 @@ void Engine::initUserInterface()
        
        connect( iWindowManager, SIGNAL( eventDetected() ), this, SLOT( handleViewEvent() ) );
        connect( iWindowManager, SIGNAL( previousViewRestored() ), iUIManager, SLOT( previousViewRestored() ) );
-//     connect( iWindowManager, SIGNAL( dialogActivated() ), this, SLOT( dialogActivated() ) );
-//     connect( iWindowManager, SIGNAL( dialogDeactivated() ), this, SLOT( dialogDeactivated() ) );
+       connect( iWindowManager, SIGNAL( dialogActivated() ), this, SLOT( dialogActivated() ) );
+       connect( iWindowManager, SIGNAL( dialogDeactivated() ), this, SLOT( dialogDeactivated() ) );
        
        // Show the UI
        iWindowManager->setWindowState( Qt::WindowMaximized );
@@ -280,7 +280,7 @@ void Engine::initUserInterface()
 
 void Engine::handleViewEvent()
 {
-       if ( iIdleTimeCounter != 0 )
+       if ( iIdleTimeCounter != 0 && iIdleTimeCounter->isActive())
        {
                // Restart the idle time counter when view event is received
                iIdleTimeCounter->stop();
index ab3d93e..7d697e8 100644 (file)
@@ -165,7 +165,6 @@ void UIManager::showMeetingProgressBar( Meeting *aMeeting )
                iProgressBar->update( tr( "Fetching meeting info..." ), tr( "Please wait" ) );
                iProgressBar->toggleCancellable( true );
                iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false, false );
-               iEngine->stopIdleTimeCounter();
        }
 }
 
@@ -205,7 +204,6 @@ void UIManager::progressBarCancelled()
        if ( iProgressBar != 0 )
        {
                iProgressBar->close();
-               iEngine->startIdleTimeCounter();
        }
 }
 
@@ -251,7 +249,7 @@ void UIManager::passwordEntered( PasswordDialog::PasswordStatus aStatus )
                        {
                                iProgressBar->update( tr( "" ), tr( "Changing operation mode" ) );
                                iProgressBar->toggleCancellable( false );
-                               iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false );
+                               iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false, false );
                        }
                        // ... and initiate the mode changing
                        iEngine->changeDeviceMode();
index c903bc0..dbc2b07 100644 (file)
@@ -6,6 +6,8 @@
 #include "DigitalTimeDisplayWidget.h"\r
 #include "ToolBox.h"\r
 \r
+#include <QEvent>\r
+\r
 #include <QtDebug>\r
 \r
 QTime RoomStatusIndicatorWidget::endOfTheDay = QTime( 23, 59, 0, 0 );\r
@@ -74,25 +76,28 @@ QString RoomStatusIndicatorWidget::statusToText( const Room::Status aStatus )
 \r
 QPalette RoomStatusIndicatorWidget::createPalette( Room::Status aStatus )\r
 {\r
-       QPixmap pixmap( aStatus == Room::BusyStatus ? ":roomstatus_busy" : ":roomstatus_free" );\r
+       // QPixmap pixmap( aStatus == Room::BusyStatus ? ":roomstatus_busy" : ":roomstatus_free" );\r
+       QString image = aStatus == Room::BusyStatus ? ":roomstatus_busy" : ":roomstatus_free";\r
 \r
        // The image needs to be moved in normal mode so the traffic light not partly outside the screen\r
        const int xoffset( 60 );\r
        const int yoffset( 19 );\r
-       int cropwidth( pixmap.width() - xoffset );\r
-       int cropheight( pixmap.height() - yoffset );\r
+//     int cropwidth( pixmap.width() - xoffset );\r
+//     int cropheight( pixmap.height() - yoffset );\r
        \r
        QBrush brush;\r
        if ( windowState() == Qt::WindowFullScreen )\r
        {\r
                // Use the full image in full screen mode\r
-               brush.setTexture( pixmap );\r
+//             brush.setTexture( pixmap );\r
+               brush.setTexture( QPixmap(image) );\r
        }\r
        else\r
        {\r
                // Take part of the image so the traffic lights are moved xoffset poxels to left \r
                // and yoffset pixels to up\r
-               brush.setTexture( pixmap.copy( xoffset, yoffset, cropwidth, cropheight ) );\r
+//             brush.setTexture( pixmap.copy( xoffset, yoffset, cropwidth, cropheight ) );\r
+               brush.setTexture( QPixmap(image) );\r
        }\r
 \r
        QPalette palette;\r
@@ -117,4 +122,26 @@ void RoomStatusIndicatorWidget::statusChanged( const Room::Status aStatus, const
                iUntilTextLabel->setText( tr( "until %1" ).arg( aUntil.toString( iTimeFormat ) ) );\r
        }\r
        setPalette( createPalette( aStatus ) );\r
+}
+\r
+void RoomStatusIndicatorWidget::currentRoomChanged( Room *aRoom )\r
+{\r
+       iDefaultRoomLabel->setText( aRoom->name() );\r
+}\r
+\r
+bool RoomStatusIndicatorWidget::event(QEvent *event)\r
+{\r
+       switch(event->type())\r
+       {\r
+               case QEvent::Paint:\r
+                       qDebug() << "[RoomStatusIndicatorWidget::event] <Paint event>";\r
+                       break;\r
+               case QEvent::PaletteChange:\r
+                       qDebug() << "[RoomStatusIndicatorWidget::event] <Palette change event>";\r
+                       break;\r
+               default:\r
+                       break;\r
+       }\r
+       \r
+       return ViewBase::event( event );\r
 }\r
index c20ce45..67d40dc 100644 (file)
@@ -12,6 +12,8 @@ class QLabel;
 class QVBoxLayout;\r
 class TimeDisplayWidget;\r
 \r
+class QEvent;\r
+\r
 //! UserInterface class. Indicates if the default meeting room is busy or not.\r
 /*!\r
  * UserInterface class. Indicates if the default meeting room is busy or not. This widget\r
@@ -37,6 +39,8 @@ public:
        RoomStatusIndicatorWidget( Room *aDefaultRoom, Room::Status aStatus, QTime aUntil, QString aTimeFormat, QWidget *aParent = 0 );\r
        //! Destructor.\r
        virtual ~RoomStatusIndicatorWidget();\r
+       \r
+       bool event(QEvent *event);\r
 \r
 public slots:\r
        //! Slot. Sets current time.\r