Added no connection indicator to screen saver mode (no logic implemented yet)
authorZoltan Papp <zoltan.papp@ixonos.com>
Thu, 28 May 2009 06:08:11 +0000 (09:08 +0300)
committerZoltan Papp <zoltan.papp@ixonos.com>
Thu, 28 May 2009 06:08:11 +0000 (09:08 +0300)
src/UserInterface/Views/RoomStatusIndicatorWidget.cpp
src/UserInterface/Views/RoomStatusIndicatorWidget.h

index 7421a47..94ac225 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
index 615051e..b85cff0 100644 (file)
@@ -76,6 +76,7 @@ private:
        QLabel *iDefaultRoomLabel;\r
        QLabel *iStatusLabel;\r
        QLabel *iUntilTextLabel;\r
+       QLabel *iConnectionLabel;\r
        TimeDisplayWidget *iTimeDisplay;\r
        QString iTimeFormat;\r
 \r