From 656fe443f2c6e0443db15bffd9d254c52225cf42 Mon Sep 17 00:00:00 2001 From: Romain DERRE <romain.derre@pc227-19.pedago.ensiie.fr> Date: Fri, 29 Mar 2019 09:57:33 +0100 Subject: [PATCH] new mainwindow --- app/mainwindow.cpp | 22 ++-------------- app/mainwindow.h | 2 -- app/mainwindow.ui | 62 ++++++++++++++++------------------------------ 3 files changed, 23 insertions(+), 63 deletions(-) diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 66281b1..81e440d 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -10,8 +10,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->setupUi(this); // on affiche d'abord la TreeView - ui->treeWidget->show(); - ui->listWidget->hide(); + //ui->treeWidget->show(); + //ui->listWidget->hide(); @@ -62,24 +62,6 @@ void MainWindow::update_tasks() ui->tableView->update(); } -void MainWindow::on_comboBox_currentTextChanged(const QString &arg1) -{ - if (arg1 == "Tree"){ - ui->treeWidget->show(); - ui->listWidget->hide(); - - } - else if (arg1 == "List"){ - ui->listWidget->show(); - ui->treeWidget->hide(); - - } - else { - QMessageBox msgBox; - msgBox.setText(tr("Choix modifié mais problème sélection Tree ou List")); - msgBox.exec(); - } -} void MainWindow::on_commandLinkButton_7_clicked() { diff --git a/app/mainwindow.h b/app/mainwindow.h index 6e79b22..905daf3 100644 --- a/app/mainwindow.h +++ b/app/mainwindow.h @@ -25,8 +25,6 @@ public: void update_tasks(); private slots: - void on_comboBox_currentTextChanged(const QString &arg1); - void on_commandLinkButton_7_clicked(); private: diff --git a/app/mainwindow.ui b/app/mainwindow.ui index ecdf7e4..500baf7 100644 --- a/app/mainwindow.ui +++ b/app/mainwindow.ui @@ -172,6 +172,18 @@ </property> <item> <widget class="QCommandLinkButton" name="commandLinkButton_7"> + <property name="minimumSize"> + <size> + <width>150</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>150</width> + <height>30</height> + </size> + </property> <property name="text"> <string>Create Task</string> </property> @@ -197,12 +209,18 @@ <widget class="QCommandLinkButton" name="commandLinkButton_6"> <property name="minimumSize"> <size> - <width>60</width> + <width>150</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>150</width> <height>30</height> </size> </property> <property name="text"> - <string>sendSignal</string> + <string>Send Signal</string> </property> </widget> </item> @@ -212,7 +230,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Expanding</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -222,46 +240,8 @@ </property> </spacer> </item> - <item> - <widget class="QComboBox" name="comboBox"> - <property name="minimumSize"> - <size> - <width>80</width> - <height>30</height> - </size> - </property> - <item> - <property name="text"> - <string>Tree</string> - </property> - </item> - <item> - <property name="text"> - <string>List</string> - </property> - </item> - </widget> - </item> </layout> </item> - <item> - <widget class="QListWidget" name="listWidget"> - <item> - <property name="text"> - <string>ListView</string> - </property> - </item> - </widget> - </item> - <item> - <widget class="QTreeWidget" name="treeWidget"> - <column> - <property name="text"> - <string notr="true">1</string> - </property> - </column> - </widget> - </item> <item> <widget class="QTableView" name="tableView"/> </item> -- GitLab