From 8e05c84d422bb8bdb27bb2e0729ccb1956f662b1 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Mon, 10 Jun 2019 14:44:25 -0400 Subject: [PATCH] make the map properties widget actually a widget --- source/tycho/cc_source/mapprops.cc | 12 +++++++ source/tycho/ui/mapprops.ui | 50 +++--------------------------- 2 files changed, 16 insertions(+), 46 deletions(-) diff --git a/source/tycho/cc_source/mapprops.cc b/source/tycho/cc_source/mapprops.cc index 41cc735..f2cf73e 100644 --- a/source/tycho/cc_source/mapprops.cc +++ b/source/tycho/cc_source/mapprops.cc @@ -2,11 +2,23 @@ #include "mapprops.h" #include "../ui/ui_mapprops.h" +#include + MapProps::MapProps(QWidget *parent) : QDialog(parent), ui(new Ui::MapProps) { ui->setupUi(this); + + setModal(true); + + auto bbox = new QDialogButtonBox(this); + bbox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); + ui->verticalLayout->addWidget(bbox); + + connect(bbox, SIGNAL(accepted()), this, SLOT(accept())); + connect(bbox, SIGNAL(rejected()), this, SLOT(reject())); + dbgPrintFunc(); } diff --git a/source/tycho/ui/mapprops.ui b/source/tycho/ui/mapprops.ui index 430239d..5ffb711 100644 --- a/source/tycho/ui/mapprops.ui +++ b/source/tycho/ui/mapprops.ui @@ -1,7 +1,10 @@ MapProps - + + + false + Qt::WindowModal @@ -16,9 +19,6 @@ Map Properties - - true - @@ -431,16 +431,6 @@ Some of them also set the "failure" terminal state when the objective - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - @@ -461,37 +451,5 @@ Some of them also set the "failure" terminal state when the objective - - buttonBox - accepted() - MapProps - accept() - - - 345 - 645 - - - 287 - -12 - - - - - buttonBox - rejected() - MapProps - reject() - - - 315 - 648 - - - 324 - -6 - - -