Merge branch 'master' into dev_local
[qtmeetings] / src / UserInterface / Views / RoomStatusIndicatorWidget.cpp
index c903bc0..ce5c8eb 100644 (file)
@@ -40,19 +40,34 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget( Room *aDefaultRoom, Room::
        iUntilTextLabel = ToolBox::createLabel( tr( "until %1" ).arg( aUntil.toString( iTimeFormat ) ), importantTextFont );\r
        iUntilTextLabel->setAlignment( Qt::AlignHCenter );\r
        iUntilTextLabel->setStyleSheet( "background-color: transparent" );\r
+       \r
+       // No connection to server note\r
+       qDebug() << "RoomStatusIndicatorWidget::RoomStatusIndicatorWidget() creating connection label";\r
+       QFrame* connectionLabelFrame = new QFrame( this );\r
+       iConnectionLabel = new QLabel( tr( "No connection to server" ), connectionLabelFrame );\r
+       iConnectionLabel->setFont( importantTextFont ); \r
+       iConnectionLabel->setAlignment( Qt::AlignHCenter );\r
+       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
 \r
        QVBoxLayout *topLayout = new QVBoxLayout;\r
        topLayout->addStretch();\r
        topLayout->addWidget( iTimeDisplay );\r
+       topLayout->addSpacing( 28 );\r
        topLayout->addWidget( iDefaultRoomLabel );\r
        topLayout->addWidget( iStatusLabel );\r
        topLayout->addWidget( iUntilTextLabel );\r
+       topLayout->addSpacing( 28 );\r
+       topLayout->addWidget( connectionLabelFrame );\r
        topLayout->addStretch();\r
 \r
        QHBoxLayout *mainLayout = new QHBoxLayout;\r
        mainLayout->addLayout( topLayout );\r
        mainLayout->addStretch();\r
-       mainLayout->setMargin( 65 );\r
+       //mainLayout->setMargin( 65 );\r
+       mainLayout->setContentsMargins( 65, 65, 65, 0 );\r
        setLayout( mainLayout );\r
 \r
        statusChanged( aStatus, aUntil );\r