diff --git a/qt/lc_qgroupdialog.cpp b/common/lc_groupdialog.cpp similarity index 55% rename from qt/lc_qgroupdialog.cpp rename to common/lc_groupdialog.cpp index d69e2acb..fbe0ed77 100644 --- a/qt/lc_qgroupdialog.cpp +++ b/common/lc_groupdialog.cpp @@ -1,23 +1,22 @@ #include "lc_global.h" -#include "lc_qgroupdialog.h" -#include "ui_lc_qgroupdialog.h" +#include "lc_groupdialog.h" +#include "ui_lc_groupdialog.h" #include "group.h" -lcQGroupDialog::lcQGroupDialog(QWidget *parent, const QString& Name) : - QDialog(parent), - ui(new Ui::lcQGroupDialog) +lcGroupDialog::lcGroupDialog(QWidget* Parent, const QString& Name) + : QDialog(Parent), ui(new Ui::lcGroupDialog) { ui->setupUi(this); ui->name->setText(Name); } -lcQGroupDialog::~lcQGroupDialog() +lcGroupDialog::~lcGroupDialog() { delete ui; } -void lcQGroupDialog::accept() +void lcGroupDialog::accept() { QString Name = ui->name->text(); diff --git a/common/lc_groupdialog.h b/common/lc_groupdialog.h new file mode 100644 index 00000000..0968626a --- /dev/null +++ b/common/lc_groupdialog.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +namespace Ui { +class lcGroupDialog; +} + +class lcGroupDialog : public QDialog +{ + Q_OBJECT + +public: + explicit lcGroupDialog(QWidget* Parent, const QString& Name); + ~lcGroupDialog(); + + QString mName; + +public slots: + void accept() override; + +private: + Ui::lcGroupDialog *ui; +}; diff --git a/qt/lc_qgroupdialog.ui b/common/lc_groupdialog.ui similarity index 91% rename from qt/lc_qgroupdialog.ui rename to common/lc_groupdialog.ui index 8b2b7a37..b3dee528 100644 --- a/qt/lc_qgroupdialog.ui +++ b/common/lc_groupdialog.ui @@ -1,7 +1,7 @@ - lcQGroupDialog - + lcGroupDialog + 0 @@ -48,7 +48,7 @@ buttonBox accepted() - lcQGroupDialog + lcGroupDialog accept() @@ -64,7 +64,7 @@ buttonBox rejected() - lcQGroupDialog + lcGroupDialog reject() diff --git a/common/lc_model.cpp b/common/lc_model.cpp index 68ebadd8..3d6ef0fd 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -18,7 +18,7 @@ #include "lc_qarraydialog.h" #include "lc_qselectdialog.h" #include "lc_minifigdialog.h" -#include "lc_qgroupdialog.h" +#include "lc_groupdialog.h" #include "lc_qeditgroupsdialog.h" #include "lc_qpropertiesdialog.h" #include "lc_qutils.h" @@ -1831,7 +1831,7 @@ void lcModel::GroupSelection() return; } - lcQGroupDialog Dialog(gMainWindow, GetGroupName(tr("Group #"))); + lcGroupDialog Dialog(gMainWindow, GetGroupName(tr("Group #"))); if (Dialog.exec() != QDialog::Accepted) return; diff --git a/leocad.pro b/leocad.pro index fb07cc99..338d73a6 100644 --- a/leocad.pro +++ b/leocad.pro @@ -185,6 +185,7 @@ SOURCES += \ common/lc_file.cpp \ common/lc_findreplacewidget.cpp \ common/lc_glextensions.cpp \ + common/lc_groupdialog.cpp \ common/lc_http.cpp \ common/lc_instructions.cpp \ common/lc_instructionsdialog.cpp \ @@ -216,7 +217,6 @@ SOURCES += \ qt/system.cpp \ qt/qtmain.cpp \ qt/lc_qarraydialog.cpp \ - qt/lc_qgroupdialog.cpp \ qt/lc_qeditgroupsdialog.cpp \ qt/lc_qselectdialog.cpp \ qt/lc_qpropertiesdialog.cpp \ @@ -255,6 +255,7 @@ HEADERS += \ common/lc_findreplacewidget.h \ common/lc_glextensions.h \ common/lc_global.h \ + common/lc_groupdialog.h \ common/lc_http.h \ common/lc_instructions.h \ common/lc_instructionsdialog.h \ @@ -285,7 +286,6 @@ HEADERS += \ common/group.h \ common/camera.h \ qt/lc_qarraydialog.h \ - qt/lc_qgroupdialog.h \ qt/lc_qeditgroupsdialog.h \ qt/lc_qselectdialog.h \ qt/lc_qpropertiesdialog.h \ @@ -303,7 +303,6 @@ HEADERS += \ common/lc_partpalettedialog.h FORMS += \ qt/lc_qarraydialog.ui \ - qt/lc_qgroupdialog.ui \ qt/lc_qeditgroupsdialog.ui \ qt/lc_qselectdialog.ui \ qt/lc_qpropertiesdialog.ui \ @@ -316,6 +315,7 @@ FORMS += \ qt/lc_renderdialog.ui \ qt/lc_setsdatabasedialog.ui \ common/lc_aboutdialog.ui \ + common/lc_groupdialog.ui \ common/lc_minifigdialog.ui \ common/lc_pagesetupdialog.ui \ common/lc_partpalettedialog.ui diff --git a/qt/lc_qgroupdialog.h b/qt/lc_qgroupdialog.h deleted file mode 100644 index f4a20c26..00000000 --- a/qt/lc_qgroupdialog.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -namespace Ui { -class lcQGroupDialog; -} - -class lcQGroupDialog : public QDialog -{ - Q_OBJECT - -public: - explicit lcQGroupDialog(QWidget* Parent, const QString& Name); - ~lcQGroupDialog(); - - QString mName; - -public slots: - void accept() override; - -private: - Ui::lcQGroupDialog *ui; -};