mirror of
https://github.com/leozide/leocad
synced 2024-12-26 21:58:44 +01:00
Moved Minifig Dialog.
This commit is contained in:
parent
f5ddd46776
commit
d1991b9264
5 changed files with 43 additions and 43 deletions
|
@ -1,6 +1,6 @@
|
|||
#include "lc_global.h"
|
||||
#include "lc_qminifigdialog.h"
|
||||
#include "ui_lc_qminifigdialog.h"
|
||||
#include "lc_minifigdialog.h"
|
||||
#include "ui_lc_minifigdialog.h"
|
||||
#include "lc_viewwidget.h"
|
||||
#include "lc_qcolorpicker.h"
|
||||
#include "minifig.h"
|
||||
|
@ -10,8 +10,8 @@
|
|||
#include "view.h"
|
||||
#include "camera.h"
|
||||
|
||||
lcQMinifigDialog::lcQMinifigDialog(QWidget* Parent)
|
||||
: QDialog(Parent), ui(new Ui::lcQMinifigDialog)
|
||||
lcMinifigDialog::lcMinifigDialog(QWidget* Parent)
|
||||
: QDialog(Parent), ui(new Ui::lcMinifigDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -99,13 +99,13 @@ lcQMinifigDialog::lcQMinifigDialog(QWidget* Parent)
|
|||
mView->ZoomExtents();
|
||||
}
|
||||
|
||||
lcQMinifigDialog::~lcQMinifigDialog()
|
||||
lcMinifigDialog::~lcMinifigDialog()
|
||||
{
|
||||
delete mMinifigWizard;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::UpdateTemplateCombo()
|
||||
void lcMinifigDialog::UpdateTemplateCombo()
|
||||
{
|
||||
ui->TemplateComboBox->clear();
|
||||
|
||||
|
@ -114,7 +114,7 @@ void lcQMinifigDialog::UpdateTemplateCombo()
|
|||
ui->TemplateComboBox->addItem(Template.first);
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::on_TemplateComboBox_currentIndexChanged(const QString& TemplateName)
|
||||
void lcMinifigDialog::on_TemplateComboBox_currentIndexChanged(const QString& TemplateName)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
const auto& Templates = mMinifigWizard->GetTemplates();
|
||||
|
@ -158,7 +158,7 @@ void lcQMinifigDialog::on_TemplateComboBox_currentIndexChanged(const QString& Te
|
|||
#endif
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::on_TemplateSaveButton_clicked()
|
||||
void lcMinifigDialog::on_TemplateSaveButton_clicked()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
QString CurrentName = ui->TemplateComboBox->currentText();
|
||||
|
@ -200,7 +200,7 @@ void lcQMinifigDialog::on_TemplateSaveButton_clicked()
|
|||
#endif
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::on_TemplateDeleteButton_clicked()
|
||||
void lcMinifigDialog::on_TemplateDeleteButton_clicked()
|
||||
{
|
||||
QString Template = ui->TemplateComboBox->currentText();
|
||||
QString Question = tr("Are you sure you want to delete the template '%1'?").arg(Template);
|
||||
|
@ -213,7 +213,7 @@ void lcQMinifigDialog::on_TemplateDeleteButton_clicked()
|
|||
UpdateTemplateCombo();
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::on_TemplateImportButton_clicked()
|
||||
void lcMinifigDialog::on_TemplateImportButton_clicked()
|
||||
{
|
||||
QString FileName = QFileDialog::getOpenFileName(this, tr("Import Templates"), "", tr("Minifig Template Files (*.minifig);;All Files (*.*)"));
|
||||
|
||||
|
@ -234,7 +234,7 @@ void lcQMinifigDialog::on_TemplateImportButton_clicked()
|
|||
UpdateTemplateCombo();
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::on_TemplateExportButton_clicked()
|
||||
void lcMinifigDialog::on_TemplateExportButton_clicked()
|
||||
{
|
||||
QString FileName = QFileDialog::getSaveFileName(this, tr("Export Templates"), "", tr("Minifig Template Files (*.minifig);;All Files (*.*)"));
|
||||
|
||||
|
@ -253,7 +253,7 @@ void lcQMinifigDialog::on_TemplateExportButton_clicked()
|
|||
File.write(Templates);
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::TypeChanged(int Index)
|
||||
void lcMinifigDialog::TypeChanged(int Index)
|
||||
{
|
||||
std::array<QComboBox*, LC_MFW_NUMITEMS>::iterator Search = std::find(mComboBoxes.begin(), mComboBoxes.end(), sender());
|
||||
|
||||
|
@ -265,7 +265,7 @@ void lcQMinifigDialog::TypeChanged(int Index)
|
|||
mView->Redraw();
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::ColorChanged(int Index)
|
||||
void lcMinifigDialog::ColorChanged(int Index)
|
||||
{
|
||||
std::array<lcQColorPicker*, LC_MFW_NUMITEMS>::iterator Search = std::find(mColorPickers.begin(), mColorPickers.end(), sender());
|
||||
|
||||
|
@ -276,7 +276,7 @@ void lcQMinifigDialog::ColorChanged(int Index)
|
|||
mView->Redraw();
|
||||
}
|
||||
|
||||
void lcQMinifigDialog::AngleChanged(double Value)
|
||||
void lcMinifigDialog::AngleChanged(double Value)
|
||||
{
|
||||
std::array<QDoubleSpinBox*, LC_MFW_NUMITEMS>::iterator Search = std::find(mSpinBoxes.begin(), mSpinBoxes.end(), sender());
|
||||
|
|
@ -5,16 +5,16 @@ class lcQColorPicker;
|
|||
class View;
|
||||
|
||||
namespace Ui {
|
||||
class lcQMinifigDialog;
|
||||
class lcMinifigDialog;
|
||||
}
|
||||
|
||||
class lcQMinifigDialog : public QDialog
|
||||
class lcMinifigDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit lcQMinifigDialog(QWidget* Parent);
|
||||
~lcQMinifigDialog();
|
||||
explicit lcMinifigDialog(QWidget* Parent);
|
||||
~lcMinifigDialog();
|
||||
|
||||
MinifigWizard* mMinifigWizard;
|
||||
|
||||
|
@ -31,7 +31,7 @@ protected slots:
|
|||
protected:
|
||||
void UpdateTemplateCombo();
|
||||
|
||||
Ui::lcQMinifigDialog* ui;
|
||||
Ui::lcMinifigDialog* ui;
|
||||
|
||||
View* mView;
|
||||
std::array<QComboBox*, LC_MFW_NUMITEMS> mComboBoxes;
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>lcQMinifigDialog</class>
|
||||
<widget class="QDialog" name="lcQMinifigDialog">
|
||||
<class>lcMinifigDialog</class>
|
||||
<widget class="QDialog" name="lcMinifigDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -803,7 +803,7 @@
|
|||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>lcQMinifigDialog</receiver>
|
||||
<receiver>lcMinifigDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
@ -819,7 +819,7 @@
|
|||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>lcQMinifigDialog</receiver>
|
||||
<receiver>lcMinifigDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
|
@ -16,7 +16,7 @@
|
|||
#include "minifig.h"
|
||||
#include "lc_qarraydialog.h"
|
||||
#include "lc_qselectdialog.h"
|
||||
#include "lc_qminifigdialog.h"
|
||||
#include "lc_minifigdialog.h"
|
||||
#include "lc_qgroupdialog.h"
|
||||
#include "lc_qeditgroupsdialog.h"
|
||||
#include "lc_selectbycolordialog.h"
|
||||
|
@ -4409,7 +4409,7 @@ void lcModel::ShowArrayDialog()
|
|||
|
||||
void lcModel::ShowMinifigDialog()
|
||||
{
|
||||
lcQMinifigDialog Dialog(gMainWindow);
|
||||
lcMinifigDialog Dialog(gMainWindow);
|
||||
|
||||
if (Dialog.exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
|
14
leocad.pro
14
leocad.pro
|
@ -171,8 +171,6 @@ macx {
|
|||
}
|
||||
|
||||
SOURCES += common/view.cpp \
|
||||
common/lc_instructionsdialog.cpp \
|
||||
common/lc_previewwidget.cpp \
|
||||
common/texfont.cpp \
|
||||
common/project.cpp \
|
||||
common/pieceinf.cpp \
|
||||
|
@ -189,13 +187,16 @@ SOURCES += common/view.cpp \
|
|||
common/lc_glextensions.cpp \
|
||||
common/lc_glwidget.cpp \
|
||||
common/lc_http.cpp \
|
||||
common/lc_instructionsdialog.cpp \
|
||||
common/lc_library.cpp \
|
||||
common/lc_lxf.cpp \
|
||||
common/lc_mainwindow.cpp \
|
||||
common/lc_mesh.cpp \
|
||||
common/lc_meshloader.cpp \
|
||||
common/lc_minifigdialog.cpp \
|
||||
common/lc_model.cpp \
|
||||
common/lc_partselectionwidget.cpp \
|
||||
common/lc_previewwidget.cpp \
|
||||
common/lc_profile.cpp \
|
||||
common/lc_scene.cpp \
|
||||
common/lc_selectbycolordialog.cpp \
|
||||
|
@ -219,7 +220,6 @@ SOURCES += common/view.cpp \
|
|||
qt/lc_qselectdialog.cpp \
|
||||
qt/lc_qpropertiesdialog.cpp \
|
||||
qt/lc_qhtmldialog.cpp \
|
||||
qt/lc_qminifigdialog.cpp \
|
||||
qt/lc_qpreferencesdialog.cpp \
|
||||
qt/lc_qcategorydialog.cpp \
|
||||
qt/lc_qimagedialog.cpp \
|
||||
|
@ -234,8 +234,6 @@ SOURCES += common/view.cpp \
|
|||
qt/lc_setsdatabasedialog.cpp \
|
||||
common/lc_partpalettedialog.cpp
|
||||
HEADERS += \
|
||||
common/lc_instructionsdialog.h \
|
||||
common/lc_previewwidget.h \
|
||||
common/view.h \
|
||||
common/texfont.h \
|
||||
common/project.h \
|
||||
|
@ -257,13 +255,16 @@ HEADERS += \
|
|||
common/lc_global.h \
|
||||
common/lc_glwidget.h \
|
||||
common/lc_http.h \
|
||||
common/lc_instructionsdialog.h \
|
||||
common/lc_library.h \
|
||||
common/lc_lxf.h \
|
||||
common/lc_mainwindow.h \
|
||||
common/lc_math.h \
|
||||
common/lc_mesh.h \
|
||||
common/lc_meshloader.h \
|
||||
common/lc_minifigdialog.h \
|
||||
common/lc_model.h \
|
||||
common/lc_previewwidget.h \
|
||||
common/lc_profile.h \
|
||||
common/lc_scene.h \
|
||||
common/lc_selectbycolordialog.h \
|
||||
|
@ -286,7 +287,6 @@ HEADERS += \
|
|||
qt/lc_qselectdialog.h \
|
||||
qt/lc_qpropertiesdialog.h \
|
||||
qt/lc_qhtmldialog.h \
|
||||
qt/lc_qminifigdialog.h \
|
||||
qt/lc_qpreferencesdialog.h \
|
||||
qt/lc_qcategorydialog.h \
|
||||
qt/lc_qimagedialog.h \
|
||||
|
@ -308,7 +308,6 @@ FORMS += \
|
|||
qt/lc_qselectdialog.ui \
|
||||
qt/lc_qpropertiesdialog.ui \
|
||||
qt/lc_qhtmldialog.ui \
|
||||
qt/lc_qminifigdialog.ui \
|
||||
qt/lc_qpreferencesdialog.ui \
|
||||
qt/lc_qcategorydialog.ui \
|
||||
qt/lc_qimagedialog.ui \
|
||||
|
@ -317,6 +316,7 @@ FORMS += \
|
|||
qt/lc_qmodellistdialog.ui \
|
||||
qt/lc_renderdialog.ui \
|
||||
qt/lc_setsdatabasedialog.ui \
|
||||
common/lc_minifigdialog.ui \
|
||||
common/lc_partpalettedialog.ui
|
||||
OTHER_FILES +=
|
||||
RESOURCES += leocad.qrc resources/stylesheet/stylesheet.qrc
|
||||
|
|
Loading…
Reference in a new issue