diff options
-rw-r--r-- | src/gui/connectionFrame.cpp | 77 | ||||
-rw-r--r-- | src/gui/connectionFrame.h | 7 |
2 files changed, 27 insertions, 57 deletions
diff --git a/src/gui/connectionFrame.cpp b/src/gui/connectionFrame.cpp index b618668..4211a50 100644 --- a/src/gui/connectionFrame.cpp +++ b/src/gui/connectionFrame.cpp @@ -28,58 +28,31 @@ extern "C" ConnectionFrame::ConnectionFrame(QWidget *parent) : QGroupBox(parent) { - //defines the ui-stuff - - _gL = new QGridLayout(this); - _gL->setSpacing(6); - _gL->setMargin(1); - - _split = new QSplitter(this); - _split->setOrientation(Qt::Vertical); - - _frame = new Frame("", _split); - _frame->setConFrame(this); - _split->addWidget(_frame); - - _conFrameTaskbar = new QWidget(_split); - _conFrameTaskbar->setMaximumHeight(30); - - _gLayout = new QGridLayout(_conFrameTaskbar); - _gLayout->setMargin(0); - _gLayout->setSpacing(0); - - _hLayoutInCfTaskbar = new QHBoxLayout(); - - _ip = new QLabel(_conFrameTaskbar); - _ip->setAlignment(Qt::AlignCenter); - - _hLayoutInCfTaskbar->addWidget(_ip); - - _dozentContaimner = new QLabel(_conFrameTaskbar); - _dozentContaimner->setAlignment(Qt::AlignRight); - _dozentContaimner->setMaximumSize(QSize(20, 20)); - _dozentContaimner->setScaledContents(true); - - _hLayoutInCfTaskbar->addWidget(_dozentContaimner); - - _dozentContaimner->setDisabled(true); - - _status = new QLabel(_conFrameTaskbar); - _status->setAlignment(Qt::AlignRight); - _status->setMaximumSize(QSize(22, 21)); - - _hLayoutInCfTaskbar->addWidget(_status); - - _gLayout->addLayout(_hLayoutInCfTaskbar, 0, 0, 1, 1); - _split->addWidget(_conFrameTaskbar); - - _gL->addWidget(_split, 0, 0, 1, 1); - - this->setLayout(_gL); + _layoutTop = new QVBoxLayout(this); + _layoutTop->setMargin(0); + _frame = new Frame("", this); + _frame->setConFrame(this); + _frame->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); + _layoutTop->addWidget(_frame); + _layoutBottom = new QHBoxLayout(this); + _layoutBottom->setMargin(0); + _conFrameTaskbar = new QWidget(this); + _conFrameTaskbar->setLayout(_layoutBottom); + _conFrameTaskbar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); + _ip = new QLabel(_conFrameTaskbar); + _layoutBottom->addStretch(); + _layoutBottom->addWidget(_ip); + _layoutBottom->addStretch(); + _dozentContaimner = new QLabel(_conFrameTaskbar); + _dozentContaimner->setDisabled(true); + _layoutBottom->addWidget(_dozentContaimner); + _status = new QLabel(_conFrameTaskbar); + _layoutBottom->addWidget(_status); + _layoutTop->addWidget(_conFrameTaskbar); + this->setLayout(_layoutTop); setInitSize(190,168); - initFrame(); nat_height = 0; @@ -176,7 +149,7 @@ void ConnectionFrame::setInitSize(int w, int h) { resize(w, h); _frame->resize(w, h); - _conFrameTaskbar->resize(w, h); + //_conFrameTaskbar->resize(w, h); prev_height = h; prev_width = w; init_w = w; @@ -492,8 +465,8 @@ void ConnectionFrame::resizeComponent(int w, int h) { int th = (h*_conFrameTaskbar->width())/w; int uh = (h*_ip->width())/w; - _conFrameTaskbar->setMaximumSize(w, th); - _conFrameTaskbar->resize(w, th); + //_conFrameTaskbar->setMaximumSize(w, th); + //_conFrameTaskbar->resize(w, th); _ip->setMaximumSize(w, uh); _ip->resize(w,uh); } diff --git a/src/gui/connectionFrame.h b/src/gui/connectionFrame.h index 235d0fc..6578793 100644 --- a/src/gui/connectionFrame.h +++ b/src/gui/connectionFrame.h @@ -154,15 +154,12 @@ protected: private: Frame *_frame; - //clickableLabel *frame; - QSplitter *_split; - QGridLayout* _gL; + QVBoxLayout *_layoutTop; + QHBoxLayout *_layoutBottom; QLabel* _ip; QLabel* _status; QLabel* _dozentContaimner; QWidget* _conFrameTaskbar; - QGridLayout* _gLayout; - QHBoxLayout* _hLayoutInCfTaskbar; PVSClient* _myConnection; QPixmap _clientPix; |