From: Zoltan Papp Date: Thu, 28 May 2009 06:08:11 +0000 (+0300) Subject: Added no connection indicator to screen saver mode (no logic implemented yet) X-Git-Url: http://git.maemo.org/git/?p=qtmeetings;a=commitdiff_plain;h=5154dd6e4e1c1f746bddf3e1e6661a32a15d2b67 Added no connection indicator to screen saver mode (no logic implemented yet) --- diff --git a/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp b/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp index 7421a47..94ac225 100644 --- a/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp +++ b/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp @@ -40,19 +40,34 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget( Room *aDefaultRoom, Room:: iUntilTextLabel = ToolBox::createLabel( tr( "until %1" ).arg( aUntil.toString( iTimeFormat ) ), importantTextFont ); iUntilTextLabel->setAlignment( Qt::AlignHCenter ); iUntilTextLabel->setStyleSheet( "background-color: transparent" ); + + // No connection to server note + qDebug() << "RoomStatusIndicatorWidget::RoomStatusIndicatorWidget() creating connection label"; + QFrame* connectionLabelFrame = new QFrame( this ); + iConnectionLabel = new QLabel( tr( "No connection to server" ), connectionLabelFrame ); + iConnectionLabel->setFont( importantTextFont ); + iConnectionLabel->setAlignment( Qt::AlignHCenter ); + iConnectionLabel->setWordWrap( true ); + iConnectionLabel->setStyleSheet( "background-color: transparent; color: red; text-decoration:blink; max-width: 250px" ); + connectionLabelFrame->setFixedSize( iConnectionLabel->sizeHint() ); + //iConnectionLabel->setHidden( true ); QVBoxLayout *topLayout = new QVBoxLayout; topLayout->addStretch(); topLayout->addWidget( iTimeDisplay ); + topLayout->addSpacing( 28 ); topLayout->addWidget( iDefaultRoomLabel ); topLayout->addWidget( iStatusLabel ); topLayout->addWidget( iUntilTextLabel ); + topLayout->addSpacing( 28 ); + topLayout->addWidget( connectionLabelFrame ); topLayout->addStretch(); QHBoxLayout *mainLayout = new QHBoxLayout; mainLayout->addLayout( topLayout ); mainLayout->addStretch(); - mainLayout->setMargin( 65 ); + //mainLayout->setMargin( 65 ); + mainLayout->setContentsMargins( 65, 65, 65, 0 ); setLayout( mainLayout ); statusChanged( aStatus, aUntil ); diff --git a/src/UserInterface/Views/RoomStatusIndicatorWidget.h b/src/UserInterface/Views/RoomStatusIndicatorWidget.h index 615051e..b85cff0 100644 --- a/src/UserInterface/Views/RoomStatusIndicatorWidget.h +++ b/src/UserInterface/Views/RoomStatusIndicatorWidget.h @@ -76,6 +76,7 @@ private: QLabel *iDefaultRoomLabel; QLabel *iStatusLabel; QLabel *iUntilTextLabel; + QLabel *iConnectionLabel; TimeDisplayWidget *iTimeDisplay; QString iTimeFormat;