Implemented object selection widgets in action dialogs
This commit is contained in:
1 parent
4046a5c044
commit
97a9da4030
41 files changed
+1283
-228
No files matched your search
@@ -1,31 +1,54 @@
|
||||
#include "executecodedialog.h"
|
||||
|
||||
#include <QRadioButton>
|
||||
#include <QLineEdit>
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "projectcontainer.h"
|
||||
#include "widgets/objectselectorwidget.h"
|
||||
|
||||
ExecuteCodeDialog::ExecuteCodeDialog(ExecuteCodeAction &action, QWidget *parent) :
|
||||
ExecuteCodeDialog::ExecuteCodeDialog(ExecuteCodeAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
CodeEditorDialog{tr("Execute Code"), parent},
|
||||
m_action{action},
|
||||
m_radioButtonSelf{new QRadioButton{tr("Self"), this}},
|
||||
m_radioButtonOther{new QRadioButton{tr("Other"), this}},
|
||||
m_radioButtonObject{new QRadioButton{tr("Object"), this}}
|
||||
m_radioButtonObject{new QRadioButton{tr("Object"), this}},
|
||||
m_objectSelector{new ObjectSelectorWidget{this}}
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
setWindowFlags((windowFlags() & ~Qt::Dialog) | Qt::Window);
|
||||
#endif
|
||||
setWindowFlag(Qt::WindowCloseButtonHint);
|
||||
|
||||
m_objectSelector->setProjectModel(projectModel);
|
||||
|
||||
m_objectSelector->setEmptySelectionText(tr("self"));
|
||||
m_objectSelector->setShowClearObjectAction(false);
|
||||
|
||||
addToolbarWidget(new QLabel{tr("Applies to:"), this});
|
||||
addToolbarWidget(m_radioButtonSelf);
|
||||
addToolbarWidget(m_radioButtonOther);
|
||||
addToolbarWidget(m_radioButtonObject);
|
||||
auto action_ = addToolbarWidget(m_objectSelector);
|
||||
|
||||
m_radioButtonSelf->setChecked(m_action.appliesTo == ExecuteCodeAction::AppliesTo::Self);
|
||||
m_radioButtonOther->setChecked(m_action.appliesTo == ExecuteCodeAction::AppliesTo::Other);
|
||||
m_radioButtonObject->setChecked(m_action.appliesTo == ExecuteCodeAction::AppliesTo::Object);
|
||||
connect(m_radioButtonObject, &QRadioButton::toggled,
|
||||
m_objectSelector, &QWidget::setVisible);
|
||||
connect(m_radioButtonObject, &QRadioButton::toggled,
|
||||
action_, &QAction::setVisible);
|
||||
|
||||
m_radioButtonSelf->setChecked(std::holds_alternative<AppliesToSelf>(m_action.appliesTo));
|
||||
m_radioButtonOther->setChecked(std::holds_alternative<AppliesToOther>(m_action.appliesTo));
|
||||
{
|
||||
auto ptr = std::get_if<AppliesToObject>(&m_action.appliesTo);
|
||||
m_radioButtonObject->setChecked(ptr != nullptr);
|
||||
m_objectSelector->setVisible(ptr != nullptr);
|
||||
action_->setVisible(ptr != nullptr);
|
||||
if (ptr)
|
||||
m_objectSelector->setObject(ptr->objectName);
|
||||
else
|
||||
m_objectSelector->clearObject();
|
||||
}
|
||||
|
||||
setScript(m_action.script);
|
||||
|
||||
@@ -46,11 +69,11 @@ void ExecuteCodeDialog::accept()
|
||||
}
|
||||
|
||||
if (m_radioButtonSelf->isChecked())
|
||||
m_action.appliesTo = ExecuteCodeAction::AppliesTo::Self;
|
||||
m_action.appliesTo = AppliesToSelf{};
|
||||
else if (m_radioButtonOther->isChecked())
|
||||
m_action.appliesTo = ExecuteCodeAction::AppliesTo::Other;
|
||||
m_action.appliesTo = AppliesToOther{};
|
||||
else if (m_radioButtonObject->isChecked())
|
||||
m_action.appliesTo = ExecuteCodeAction::AppliesTo::Object;
|
||||
m_action.appliesTo = AppliesToObject{ .objectName = m_objectSelector->objectName() };
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, tr("No Applies To selected!"), tr("No Applies To selected!"));
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
|
||||
class QRadioButton;
|
||||
struct ExecuteCodeAction;
|
||||
class ProjectTreeModel;
|
||||
class ObjectSelectorWidget;
|
||||
|
||||
class ExecuteCodeDialog : public CodeEditorDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ExecuteCodeDialog(ExecuteCodeAction &action, QWidget *parent = nullptr);
|
||||
explicit ExecuteCodeDialog(ExecuteCodeAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
|
||||
void accept() override;
|
||||
|
||||
@@ -20,4 +22,6 @@ private:
|
||||
QRadioButton * const m_radioButtonSelf;
|
||||
QRadioButton * const m_radioButtonOther;
|
||||
QRadioButton * const m_radioButtonObject;
|
||||
|
||||
ObjectSelectorWidget * const m_objectSelector;
|
||||
};
|
||||
@@ -3,13 +3,23 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
MoveFixedDialog::MoveFixedDialog(MoveFixedAction &action, QWidget *parent) :
|
||||
MoveFixedDialog::MoveFixedDialog(MoveFixedAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::MoveFixedDialog>()},
|
||||
m_action{action}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
{
|
||||
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
m_ui->widgetObject->setSizePolicy(sp_retain);
|
||||
}
|
||||
m_ui->widgetObject->setProjectModel(projectModel);
|
||||
|
||||
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
||||
m_ui->widgetObject->setShowClearObjectAction(false);
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
|
||||
namespace Ui { class MoveFixedDialog; }
|
||||
class MoveFixedAction;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class MoveFixedDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MoveFixedDialog(MoveFixedAction &action, QWidget *parent = nullptr);
|
||||
explicit MoveFixedDialog(MoveFixedAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
~MoveFixedDialog() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonObject">
|
||||
<property name="text">
|
||||
@@ -59,12 +59,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
<widget class="ObjectSelectorWidget" name="widgetObject" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -285,6 +282,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ObjectSelectorWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>widgets/objectselectorwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../resources_editor.qrc"/>
|
||||
</resources>
|
||||
@@ -321,5 +326,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButtonObject</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetObject</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>127</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>289</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -3,13 +3,23 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
MoveFreeDialog::MoveFreeDialog(MoveFreeAction &action, QWidget *parent) :
|
||||
MoveFreeDialog::MoveFreeDialog(MoveFreeAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::MoveFreeDialog>()},
|
||||
m_action{action}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
{
|
||||
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
m_ui->widgetObject->setSizePolicy(sp_retain);
|
||||
}
|
||||
m_ui->widgetObject->setProjectModel(projectModel);
|
||||
|
||||
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
||||
m_ui->widgetObject->setShowClearObjectAction(false);
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
|
||||
namespace Ui { class MoveFreeDialog; }
|
||||
class MoveFreeAction;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class MoveFreeDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MoveFreeDialog(MoveFreeAction &action, QWidget *parent = nullptr);
|
||||
explicit MoveFreeDialog(MoveFreeAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
~MoveFreeDialog() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonObject">
|
||||
<property name="text">
|
||||
@@ -59,12 +59,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
<widget class="ObjectSelectorWidget" name="widgetObject" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -188,6 +185,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ObjectSelectorWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>widgets/objectselectorwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../resources_editor.qrc"/>
|
||||
</resources>
|
||||
@@ -224,5 +229,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButtonObject</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetObject</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>127</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>289</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -3,13 +3,23 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
MoveTowardsDialog::MoveTowardsDialog(MoveTowardsAction &action, QWidget *parent) :
|
||||
MoveTowardsDialog::MoveTowardsDialog(MoveTowardsAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::MoveTowardsDialog>()},
|
||||
m_action{action}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
{
|
||||
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
m_ui->widgetObject->setSizePolicy(sp_retain);
|
||||
}
|
||||
m_ui->widgetObject->setProjectModel(projectModel);
|
||||
|
||||
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
||||
m_ui->widgetObject->setShowClearObjectAction(false);
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
|
||||
namespace Ui { class MoveTowardsDialog; }
|
||||
class MoveTowardsAction;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class MoveTowardsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MoveTowardsDialog(MoveTowardsAction &action, QWidget *parent = nullptr);
|
||||
explicit MoveTowardsDialog(MoveTowardsAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
~MoveTowardsDialog() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonObject">
|
||||
<property name="text">
|
||||
@@ -59,12 +59,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
<widget class="ObjectSelectorWidget" name="widgetObject" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -201,6 +198,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ObjectSelectorWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>widgets/objectselectorwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../resources_editor.qrc"/>
|
||||
</resources>
|
||||
@@ -237,5 +242,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButtonObject</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetObject</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>127</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>289</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -0,0 +1,29 @@
|
||||
#include "setgravitydialog.h"
|
||||
#include "ui_setgravitydialog.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
SetGravityDialog::SetGravityDialog(SetGravityAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::SetGravityDialog>()},
|
||||
m_action{action}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
{
|
||||
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
m_ui->widgetObject->setSizePolicy(sp_retain);
|
||||
}
|
||||
m_ui->widgetObject->setProjectModel(projectModel);
|
||||
|
||||
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
||||
m_ui->widgetObject->setShowClearObjectAction(false);
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/delete.png"});
|
||||
}
|
||||
|
||||
SetGravityDialog::~SetGravityDialog() = default;
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui { class SetGravityDialog; }
|
||||
struct SetGravityAction;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class SetGravityDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SetGravityDialog(SetGravityAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
~SetGravityDialog() override;
|
||||
|
||||
private:
|
||||
const std::unique_ptr<Ui::SetGravityDialog> m_ui;
|
||||
|
||||
SetGravityAction &m_action;
|
||||
};
|
||||
@@ -0,0 +1,249 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SetGravityDialog</class>
|
||||
<widget class="QDialog" name="SetGravityDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>435</width>
|
||||
<height>429</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Set Gravity</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1,0">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../resources_editor.qrc">:/qtgameengine/icons/action-set-gravity.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Applies to</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSelf">
|
||||
<property name="text">
|
||||
<string>Self</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonOther">
|
||||
<property name="text">
|
||||
<string>Other</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonObject">
|
||||
<property name="text">
|
||||
<string>Object:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ObjectSelectorWidget" name="widgetObject" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelDirection">
|
||||
<property name="text">
|
||||
<string>direction:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBoxDirection</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxDirection"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelGravity">
|
||||
<property name="text">
|
||||
<string>gravity:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBoxGravity</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxGravity"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkBoxRelative">
|
||||
<property name="text">
|
||||
<string>Relative</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ObjectSelectorWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>widgets/objectselectorwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../resources_editor.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SetGravityDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>257</x>
|
||||
<y>419</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>SetGravityDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>325</x>
|
||||
<y>419</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButtonObject</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetObject</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>127</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>289</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -3,13 +3,23 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
SpeedHorizontalDialog::SpeedHorizontalDialog(SpeedHorizontalAction &action, QWidget *parent) :
|
||||
SpeedHorizontalDialog::SpeedHorizontalDialog(SpeedHorizontalAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::SpeedHorizontalDialog>()},
|
||||
m_action{action}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
{
|
||||
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
m_ui->widgetObject->setSizePolicy(sp_retain);
|
||||
}
|
||||
m_ui->widgetObject->setProjectModel(projectModel);
|
||||
|
||||
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
||||
m_ui->widgetObject->setShowClearObjectAction(false);
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
|
||||
namespace Ui { class SpeedHorizontalDialog; }
|
||||
struct SpeedHorizontalAction;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class SpeedHorizontalDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SpeedHorizontalDialog(SpeedHorizontalAction &action, QWidget *parent = nullptr);
|
||||
explicit SpeedHorizontalDialog(SpeedHorizontalAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
~SpeedHorizontalDialog() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,31 +6,183 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>435</width>
|
||||
<height>429</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Speed Horizontal</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1,0">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../resources_editor.qrc">:/qtgameengine/icons/action-speed-horizontal.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Applies to</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSelf">
|
||||
<property name="text">
|
||||
<string>Self</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonOther">
|
||||
<property name="text">
|
||||
<string>Other</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonObject">
|
||||
<property name="text">
|
||||
<string>Object:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ObjectSelectorWidget" name="widgetObject" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelHorSpeed">
|
||||
<property name="text">
|
||||
<string>hor. speed:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBoxHorSpeed</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxHorSpeed"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkBoxRelative">
|
||||
<property name="text">
|
||||
<string>Relative</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ObjectSelectorWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>widgets/objectselectorwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../resources_editor.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
@@ -39,8 +191,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
<x>257</x>
|
||||
<y>419</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
@@ -55,8 +207,8 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
<x>325</x>
|
||||
<y>419</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
@@ -64,5 +216,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButtonObject</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetObject</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>127</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>289</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -3,13 +3,23 @@
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
SpeedVerticalDialog::SpeedVerticalDialog(SpeedVerticalAction &action, QWidget *parent) :
|
||||
SpeedVerticalDialog::SpeedVerticalDialog(SpeedVerticalAction &action, ProjectTreeModel *projectModel, QWidget *parent) :
|
||||
QDialog{parent},
|
||||
m_ui{std::make_unique<Ui::SpeedVerticalDialog>()},
|
||||
m_action{action}
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
{
|
||||
QSizePolicy sp_retain = m_ui->widgetObject->sizePolicy();
|
||||
sp_retain.setRetainSizeWhenHidden(true);
|
||||
m_ui->widgetObject->setSizePolicy(sp_retain);
|
||||
}
|
||||
m_ui->widgetObject->setProjectModel(projectModel);
|
||||
|
||||
m_ui->widgetObject->setEmptySelectionText(tr("self"));
|
||||
m_ui->widgetObject->setShowClearObjectAction(false);
|
||||
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Ok))
|
||||
button->setIcon(QIcon{":/qtgameengine/icons/ok.png"});
|
||||
if (auto button = m_ui->buttonBox->button(QDialogButtonBox::Cancel))
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
|
||||
namespace Ui { class SpeedVerticalDialog; }
|
||||
struct SpeedVerticalAction;
|
||||
class ProjectTreeModel;
|
||||
|
||||
class SpeedVerticalDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SpeedVerticalDialog(SpeedVerticalAction &action, QWidget *parent = nullptr);
|
||||
explicit SpeedVerticalDialog(SpeedVerticalAction &action, ProjectTreeModel *projectModel, QWidget *parent = nullptr);
|
||||
~SpeedVerticalDialog() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,31 +6,183 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>435</width>
|
||||
<height>429</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Speed Vertical</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1,0">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../resources_editor.qrc">:/qtgameengine/icons/action-speed-vertical.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Applies to</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonSelf">
|
||||
<property name="text">
|
||||
<string>Self</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonOther">
|
||||
<property name="text">
|
||||
<string>Other</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonObject">
|
||||
<property name="text">
|
||||
<string>Object:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ObjectSelectorWidget" name="widgetObject" native="true">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelVertSpeed">
|
||||
<property name="text">
|
||||
<string>vert. speed:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBoxVertSpeed</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxVertSpeed"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkBoxRelative">
|
||||
<property name="text">
|
||||
<string>Relative</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ObjectSelectorWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>widgets/objectselectorwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../resources_editor.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
@@ -39,8 +191,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
<x>257</x>
|
||||
<y>419</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
@@ -55,8 +207,8 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
<x>325</x>
|
||||
<y>419</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
@@ -64,5 +216,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>radioButtonObject</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>widgetObject</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>127</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>289</x>
|
||||
<y>115</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Reference in new issue
Block a user