Moved group dialog files.

This commit is contained in:
Leonardo Zide 2023-04-29 20:04:58 -07:00
parent 4e474fb13d
commit 2c2cb46ddb
6 changed files with 39 additions and 40 deletions

View file

@ -1,23 +1,22 @@
#include "lc_global.h" #include "lc_global.h"
#include "lc_qgroupdialog.h" #include "lc_groupdialog.h"
#include "ui_lc_qgroupdialog.h" #include "ui_lc_groupdialog.h"
#include "group.h" #include "group.h"
lcQGroupDialog::lcQGroupDialog(QWidget *parent, const QString& Name) : lcGroupDialog::lcGroupDialog(QWidget* Parent, const QString& Name)
QDialog(parent), : QDialog(Parent), ui(new Ui::lcGroupDialog)
ui(new Ui::lcQGroupDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->name->setText(Name); ui->name->setText(Name);
} }
lcQGroupDialog::~lcQGroupDialog() lcGroupDialog::~lcGroupDialog()
{ {
delete ui; delete ui;
} }
void lcQGroupDialog::accept() void lcGroupDialog::accept()
{ {
QString Name = ui->name->text(); QString Name = ui->name->text();

24
common/lc_groupdialog.h Normal file
View file

@ -0,0 +1,24 @@
#pragma once
#include <QDialog>
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;
};

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>lcQGroupDialog</class> <class>lcGroupDialog</class>
<widget class="QDialog" name="lcQGroupDialog"> <widget class="QDialog" name="lcGroupDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -48,7 +48,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>accepted()</signal> <signal>accepted()</signal>
<receiver>lcQGroupDialog</receiver> <receiver>lcGroupDialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
@ -64,7 +64,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>rejected()</signal> <signal>rejected()</signal>
<receiver>lcQGroupDialog</receiver> <receiver>lcGroupDialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">

View file

@ -18,7 +18,7 @@
#include "lc_qarraydialog.h" #include "lc_qarraydialog.h"
#include "lc_qselectdialog.h" #include "lc_qselectdialog.h"
#include "lc_minifigdialog.h" #include "lc_minifigdialog.h"
#include "lc_qgroupdialog.h" #include "lc_groupdialog.h"
#include "lc_qeditgroupsdialog.h" #include "lc_qeditgroupsdialog.h"
#include "lc_qpropertiesdialog.h" #include "lc_qpropertiesdialog.h"
#include "lc_qutils.h" #include "lc_qutils.h"
@ -1831,7 +1831,7 @@ void lcModel::GroupSelection()
return; return;
} }
lcQGroupDialog Dialog(gMainWindow, GetGroupName(tr("Group #"))); lcGroupDialog Dialog(gMainWindow, GetGroupName(tr("Group #")));
if (Dialog.exec() != QDialog::Accepted) if (Dialog.exec() != QDialog::Accepted)
return; return;

View file

@ -185,6 +185,7 @@ SOURCES += \
common/lc_file.cpp \ common/lc_file.cpp \
common/lc_findreplacewidget.cpp \ common/lc_findreplacewidget.cpp \
common/lc_glextensions.cpp \ common/lc_glextensions.cpp \
common/lc_groupdialog.cpp \
common/lc_http.cpp \ common/lc_http.cpp \
common/lc_instructions.cpp \ common/lc_instructions.cpp \
common/lc_instructionsdialog.cpp \ common/lc_instructionsdialog.cpp \
@ -216,7 +217,6 @@ SOURCES += \
qt/system.cpp \ qt/system.cpp \
qt/qtmain.cpp \ qt/qtmain.cpp \
qt/lc_qarraydialog.cpp \ qt/lc_qarraydialog.cpp \
qt/lc_qgroupdialog.cpp \
qt/lc_qeditgroupsdialog.cpp \ qt/lc_qeditgroupsdialog.cpp \
qt/lc_qselectdialog.cpp \ qt/lc_qselectdialog.cpp \
qt/lc_qpropertiesdialog.cpp \ qt/lc_qpropertiesdialog.cpp \
@ -255,6 +255,7 @@ HEADERS += \
common/lc_findreplacewidget.h \ common/lc_findreplacewidget.h \
common/lc_glextensions.h \ common/lc_glextensions.h \
common/lc_global.h \ common/lc_global.h \
common/lc_groupdialog.h \
common/lc_http.h \ common/lc_http.h \
common/lc_instructions.h \ common/lc_instructions.h \
common/lc_instructionsdialog.h \ common/lc_instructionsdialog.h \
@ -285,7 +286,6 @@ HEADERS += \
common/group.h \ common/group.h \
common/camera.h \ common/camera.h \
qt/lc_qarraydialog.h \ qt/lc_qarraydialog.h \
qt/lc_qgroupdialog.h \
qt/lc_qeditgroupsdialog.h \ qt/lc_qeditgroupsdialog.h \
qt/lc_qselectdialog.h \ qt/lc_qselectdialog.h \
qt/lc_qpropertiesdialog.h \ qt/lc_qpropertiesdialog.h \
@ -303,7 +303,6 @@ HEADERS += \
common/lc_partpalettedialog.h common/lc_partpalettedialog.h
FORMS += \ FORMS += \
qt/lc_qarraydialog.ui \ qt/lc_qarraydialog.ui \
qt/lc_qgroupdialog.ui \
qt/lc_qeditgroupsdialog.ui \ qt/lc_qeditgroupsdialog.ui \
qt/lc_qselectdialog.ui \ qt/lc_qselectdialog.ui \
qt/lc_qpropertiesdialog.ui \ qt/lc_qpropertiesdialog.ui \
@ -316,6 +315,7 @@ FORMS += \
qt/lc_renderdialog.ui \ qt/lc_renderdialog.ui \
qt/lc_setsdatabasedialog.ui \ qt/lc_setsdatabasedialog.ui \
common/lc_aboutdialog.ui \ common/lc_aboutdialog.ui \
common/lc_groupdialog.ui \
common/lc_minifigdialog.ui \ common/lc_minifigdialog.ui \
common/lc_pagesetupdialog.ui \ common/lc_pagesetupdialog.ui \
common/lc_partpalettedialog.ui common/lc_partpalettedialog.ui

View file

@ -1,24 +0,0 @@
#pragma once
#include <QDialog>
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;
};