summaryrefslogtreecommitdiffstats
path: root/src/gui/connectionFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/connectionFrame.cpp')
-rw-r--r--src/gui/connectionFrame.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/gui/connectionFrame.cpp b/src/gui/connectionFrame.cpp
index e889991..bedd29b 100644
--- a/src/gui/connectionFrame.cpp
+++ b/src/gui/connectionFrame.cpp
@@ -51,11 +51,11 @@ ConnectionFrame::ConnectionFrame(QWidget *parent) :
_hLayoutInCfTaskbar = new QHBoxLayout();
- _username = new QLabel(_conFrameTaskbar);
- _username->setStyleSheet(QString::fromUtf8("background-color: rgb(150, 150, 168);"));
- _username->setAlignment(Qt::AlignLeft);
+ _ip = new QLabel(_conFrameTaskbar);
+ _ip->setStyleSheet(QString::fromUtf8("background-color: rgb(150, 150, 168);"));
+ _ip->setAlignment(Qt::AlignCenter);
- _hLayoutInCfTaskbar->addWidget(_username);
+ _hLayoutInCfTaskbar->addWidget(_ip);
_dozentContaimner = new QLabel(_conFrameTaskbar);
_dozentContaimner->setStyleSheet(QString::fromUtf8("background-color: rgb(150, 150, 168);"));
@@ -141,6 +141,7 @@ ConnectionFrame::ConnectionFrame(QWidget *parent) :
menu->addAction(uproject);
//menu->addAction(rHelp);
+ this->setStyleSheet(STYLE_DEFAULT);
this->show();
}
@@ -162,15 +163,15 @@ void ConnectionFrame::setTheTitle(QString title) // set frame title
QString ConnectionFrame::getTaskbarTitle() // get taskbar title
{
- if (!_username->text().isNull())
- return _username->text();
+ if (!_ip->text().isNull())
+ return _ip->text();
else
return _myConnection->getIp();
}
void ConnectionFrame::setTaskbarTitle(QString title) // set taskbar title
{
- _username->setText(title);
+ _ip->setText(title);
_frame->ip = title;
}
@@ -193,7 +194,8 @@ void ConnectionFrame::Resize(int w, int h)
void ConnectionFrame::initFrame()
{
- _clientStatus = QPixmap(":/offline");
+ _clientStatus = QPixmap(":/online");
+ _status->setDisabled(true);
_clientDozent = QPixmap(":/dozent2");
_dozentContaimner->setPixmap(_clientDozent.scaled(3*_dozentContaimner->size()/4,
Qt::KeepAspectRatio, Qt::SmoothTransformation));
@@ -372,7 +374,8 @@ void ConnectionFrame::setDummy(bool dummy)
{
_clientStatus = QPixmap(0, 0); //ein leeres Pixmap erstellen
_clientStatus.fill(Qt::white); // benöigt bevor man drin zeichen
- _clientStatus = QPixmap(":/offline");
+ _clientStatus = QPixmap(":/online");
+ _status->setDisabled(true);
_status->setMaximumSize(QSize(30, 30));
_status->setPixmap(_clientStatus.scaled(29,27,
Qt::KeepAspectRatio, Qt::SmoothTransformation));
@@ -385,6 +388,7 @@ void ConnectionFrame::setDummy(bool dummy)
_clientStatus = QPixmap(0, 0); //ein leeres Pixmap erstellen
_clientStatus.fill(Qt::white); // benöigt bevor man drin zeichen
_clientStatus = QPixmap(":/online");
+ _status->setDisabled(false);
_status->setMaximumSize(QSize(30, 30));
_status->setPixmap(_clientStatus.scaled(29,27,
Qt::KeepAspectRatio, Qt::SmoothTransformation));
@@ -490,11 +494,11 @@ void ConnectionFrame::paintCloseUp(int w, int h)
void ConnectionFrame::resizeComponent(int w, int h)
{
int th = (h*_conFrameTaskbar->width())/w;
- int uh = (h*_username->width())/w;
+ int uh = (h*_ip->width())/w;
_conFrameTaskbar->setMaximumSize(w, th);
_conFrameTaskbar->resize(w, th);
- _username->setMaximumSize(w, uh);
- _username->resize(w,uh);
+ _ip->setMaximumSize(w, uh);
+ _ip->resize(w,uh);
}
void ConnectionFrame::setSource()