Added functionality to manage time lines, objects and rooms too
This commit is contained in:
1 parent
ea75ad2151
commit
2a21ffb8c7
25 files changed
+1128
-1828
No files matched your search
@@ -51,7 +51,7 @@ void BackgroundPropertiesDialog::accept()
|
||||
{
|
||||
if (m_background.name != m_ui->lineEditName->text())
|
||||
{
|
||||
if (!m_projectModel.renameBackground(m_background, m_ui->lineEditName->text()))
|
||||
if (!m_projectModel.rename<Background>(m_background, m_ui->lineEditName->text()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Renaming Background failed!"), tr("Renaming Background failed!"));
|
||||
return;
|
||||
|
||||
@@ -66,7 +66,7 @@ void FontPropertiesDialog::accept()
|
||||
{
|
||||
if (m_font.name != m_ui->lineEditName->text())
|
||||
{
|
||||
if (!m_projectModel.renameFont(m_font, m_ui->lineEditName->text()))
|
||||
if (!m_projectModel.rename<Font>(m_font, m_ui->lineEditName->text()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Renaming Font failed!"), tr("Renaming Font failed!"));
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "objectpropertiesdialog.h"
|
||||
#include "ui_objectpropertiesdialog.h"
|
||||
|
||||
ObjectPropertiesDialog::ObjectPropertiesDialog(Object &object, ProjectTreeModel &projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::ObjectPropertiesDialog>()}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
ObjectPropertiesDialog::~ObjectPropertiesDialog() = default;
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui { class ObjectPropertiesDialog; }
|
||||
struct Object;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class ObjectPropertiesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ObjectPropertiesDialog(Object &object, ProjectTreeModel &projectModel, QWidget *parent = nullptr);
|
||||
~ObjectPropertiesDialog();
|
||||
|
||||
private:
|
||||
const std::unique_ptr<Ui::ObjectPropertiesDialog> m_ui;
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ObjectPropertiesDialog</class>
|
||||
<widget class="QDialog" name="ObjectPropertiesDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Object Properties</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/qtgameengine/icons/object-file.png</normaloff>:/qtgameengine/icons/object-file.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -55,7 +55,7 @@ void PathPropertiesDialog::accept()
|
||||
{
|
||||
if (m_path.name != m_ui->lineEditName->text())
|
||||
{
|
||||
if (!m_projectModel.renamePath(m_path, m_ui->lineEditName->text()))
|
||||
if (!m_projectModel.rename<Path>(m_path, m_ui->lineEditName->text()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Renaming Path failed!"), tr("Renaming Path failed!"));
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "roompropertiesdialog.h"
|
||||
#include "ui_roompropertiesdialog.h"
|
||||
|
||||
RoomPropertiesDialog::RoomPropertiesDialog(Room &room, ProjectTreeModel &projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::RoomPropertiesDialog>()}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
RoomPropertiesDialog::~RoomPropertiesDialog() = default;
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui { class RoomPropertiesDialog; }
|
||||
struct Room;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class RoomPropertiesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RoomPropertiesDialog(Room &room, ProjectTreeModel &projectModel, QWidget *parent = nullptr);
|
||||
~RoomPropertiesDialog();
|
||||
|
||||
private:
|
||||
const std::unique_ptr<Ui::RoomPropertiesDialog> m_ui;
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RoomPropertiesDialog</class>
|
||||
<widget class="QDialog" name="RoomPropertiesDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Room Properties</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/qtgameengine/icons/room-file.png</normaloff>:/qtgameengine/icons/room-file.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -76,7 +76,7 @@ void ScriptPropertiesDialog::accept()
|
||||
{
|
||||
if (m_script.name != m_lineEditName->text())
|
||||
{
|
||||
if (!m_projectModel.renameScript(m_script, m_lineEditName->text()))
|
||||
if (!m_projectModel.rename<Script>(m_script, m_lineEditName->text()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Renaming Script failed!"), tr("Renaming Script failed!"));
|
||||
return;
|
||||
|
||||
@@ -90,7 +90,7 @@ void SoundPropertiesDialog::accept()
|
||||
{
|
||||
if (m_sound.name != m_ui->lineEditName->text())
|
||||
{
|
||||
if (!m_projectModel.renameSound(m_sound, m_ui->lineEditName->text()))
|
||||
if (!m_projectModel.rename<Sound>(m_sound, m_ui->lineEditName->text()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Renaming Sound failed!"), tr("Renaming Sound failed!"));
|
||||
return;
|
||||
|
||||
@@ -63,7 +63,7 @@ void SpritePropertiesDialog::accept()
|
||||
{
|
||||
if (m_sprite.name != m_ui->lineEditName->text())
|
||||
{
|
||||
if (!m_projectModel.renameSprite(m_sprite, m_ui->lineEditName->text()))
|
||||
if (!m_projectModel.rename<Sprite>(m_sprite, m_ui->lineEditName->text()))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Renaming Sprite failed!"), tr("Renaming Sprite failed!"));
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "timelinepropertiesdialog.h"
|
||||
#include "ui_timelinepropertiesdialog.h"
|
||||
|
||||
TimeLinePropertiesDialog::TimeLinePropertiesDialog(TimeLine &timeLine, ProjectTreeModel &projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::TimeLinePropertiesDialog>()}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
TimeLinePropertiesDialog::~TimeLinePropertiesDialog() = default;
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui { class TimeLinePropertiesDialog; }
|
||||
struct TimeLine;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class TimeLinePropertiesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TimeLinePropertiesDialog(TimeLine &timeLine, ProjectTreeModel &projectModel, QWidget *parent = nullptr);
|
||||
~TimeLinePropertiesDialog();
|
||||
|
||||
private:
|
||||
const std::unique_ptr<Ui::TimeLinePropertiesDialog> m_ui;
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TimeLinePropertiesDialog</class>
|
||||
<widget class="QDialog" name="TimeLinePropertiesDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Time Line Properties</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/qtgameengine/icons/timeline-file.png</normaloff>:/qtgameengine/icons/timeline-file.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in new issue
Block a user