From: Rafał Długołęcki Date: Thu, 21 Jan 2016 18:10:32 +0000 (+0100) Subject: Extract layout code to ui file X-Git-Tag: 3.4-b1~58 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=38eafca15cc5e7990630f599719d580d3d2a5262;p=vlp.git Extract layout code to ui file --- diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index 49c9314..98debb0 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -132,16 +132,6 @@ QKernel::QKernel() LOCKED = FALSE; - desktop = new QTextEdit(this); - desktop->setReadOnly(TRUE); - QVBoxLayout * layout = new QVBoxLayout(); - layout->setContentsMargins (3, 0, 3, 0); - layout->addWidget(desktop); - QWidget *window = new QWidget(); - window->setLayout(layout); - setCentralWidget(window); - - resize(400, 200); Tasks = 0; freeINTid = 1; ActiveConnections = 0; @@ -153,18 +143,6 @@ QKernel::QKernel() connect(Net_Notify, SIGNAL(activated(int)), this, SLOT(NetMessage())); } -/** - * Event invoked on resizing kernel application window. - * @copydoc QWidget::resizeEvent(QResizeEvent*) - */ -void QKernel::resizeEvent(QResizeEvent *ev) -{ -// QFrame::resizeEvent(ev); -// if (desktop) -// desktop->setGeometry(0, bar->height(), width(), -// height() - bar->height()); -} - /** * Displays window with information about not implemented functionality. */ @@ -1051,7 +1029,7 @@ void QKernel::on_actionUnlock_console_triggered() QPushButton cb("Cancel", &d); cb.setGeometry(130, 60, 80, 30); - connect(&cb, SIGNAL(clicked()), &d, SLOT(reject())); + connect(&cb, SIGNAL(clicked()), &d, SLOT(reject())); d.resize(240, 100); diff --git a/src/kernel/kernel.h b/src/kernel/kernel.h index e0843cb..13494ea 100644 --- a/src/kernel/kernel.h +++ b/src/kernel/kernel.h @@ -95,10 +95,6 @@ public: class QKernel : public QMainWindow, private Ui::KernelWindow { Q_OBJECT public: - QTextEdit *desktop; - QMenuBar *bar; - QMenu *programMenu; - QMenu *machineMenu; QMenu *toolsMenu; char progdir[256]; int NodeNumber; @@ -106,8 +102,6 @@ public: QKernel(); - virtual void resizeEvent(QResizeEvent *ev); - void WriteMessage(char* msg); void InitMessage(); @@ -143,7 +137,6 @@ private: bool synchro; bool wait_for_info; char LockPasswd[25]; - QAction * quitAction; int net_sock; int freeINTid; diff --git a/src/kernel/kernelwindow.ui b/src/kernel/kernelwindow.ui index 0b4170c..04e255d 100644 --- a/src/kernel/kernelwindow.ui +++ b/src/kernel/kernelwindow.ui @@ -13,7 +13,29 @@ MainWindow - + + + + 3 + + + 0 + + + 3 + + + 0 + + + + + true + + + + +