Changes to screen saver mode connection status handling
[qtmeetings] / src / UserInterface / Views / RoomStatusIndicatorWidget.cpp
index ce5c8eb..60d9253 100644 (file)
@@ -31,15 +31,19 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget( Room *aDefaultRoom, Room::
        iDefaultRoomLabel = ToolBox::createLabel( aDefaultRoom->name(), importantTextFont );\r
        iDefaultRoomLabel->setAlignment( Qt::AlignHCenter );\r
        iDefaultRoomLabel->setStyleSheet( "background-color: transparent" );\r
+       iDefaultRoomLabel->setHidden( true );\r
+       \r
        // is busy\r
        iStatusLabel = ToolBox::createLabel( tr( "is %1" ).arg( statusToText( aStatus ) ), importantTextFont );\r
        iStatusLabel->setAlignment( Qt::AlignHCenter );\r
        iStatusLabel->setStyleSheet( "background-color: transparent" );\r
+       iStatusLabel->setHidden( true );\r
 \r
        // until 13:22\r
        iUntilTextLabel = ToolBox::createLabel( tr( "until %1" ).arg( aUntil.toString( iTimeFormat ) ), importantTextFont );\r
        iUntilTextLabel->setAlignment( Qt::AlignHCenter );\r
        iUntilTextLabel->setStyleSheet( "background-color: transparent" );\r
+       iUntilTextLabel->setHidden( true );\r
        \r
        // No connection to server note\r
        qDebug() << "RoomStatusIndicatorWidget::RoomStatusIndicatorWidget() creating connection label";\r
@@ -50,7 +54,8 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget( Room *aDefaultRoom, Room::
        iConnectionLabel->setWordWrap( true );\r
        iConnectionLabel->setStyleSheet( "background-color: transparent; color: red; text-decoration:blink; max-width: 250px" );\r
        connectionLabelFrame->setFixedSize( iConnectionLabel->sizeHint() );\r
-       //iConnectionLabel->setHidden( true );\r
+       if( connectedOnce && !connectionError ) iConnectionLabel->setHidden( true );\r
+               \r
 \r
        QVBoxLayout *topLayout = new QVBoxLayout;\r
        topLayout->addStretch();\r
@@ -133,3 +138,24 @@ void RoomStatusIndicatorWidget::statusChanged( const Room::Status aStatus, const
        }\r
        setPalette( createPalette( aStatus ) );\r
 }\r
+\r
+void RoomStatusIndicatorWidget::connectionEstablished()\r
+{\r
+       if( !connectedOnce )\r
+       {\r
+               // Just got the required meetings for the first time\r
+               qDebug() << "RoomStatusIndicatorWidget::connectionEstablished() first call";\r
+               iDefaultRoomLabel->setHidden( false );\r
+               iUntilTextLabel->setHidden( false );\r
+               iStatusLabel->setHidden( false );\r
+       }\r
+       ViewBase::connectionEstablished();\r
+       iConnectionLabel->setHidden( true );\r
+}\r
+\r
+void RoomStatusIndicatorWidget::connectionLost()\r
+{\r
+       ViewBase::connectionLost();\r
+       iConnectionLabel->setHidden( false );\r
+}\r
+\r