Events can now contain multiple actions, implemented draggable action icons

This commit is contained in:
2024-01-04 01:50:12 +01:00
parent f94bdf2113
commit 7571c4b1ad
24 changed files with 2027 additions and 69 deletions
+7 -7
View File
@@ -6,7 +6,7 @@
#include "projectcontainer.h"
CodeActionDialog::CodeActionDialog(Action &action, QWidget *parent) :
CodeActionDialog::CodeActionDialog(ExecuteCodeAction &action, QWidget *parent) :
CodeEditorDialog{tr("Execute Code"), parent},
m_action{action},
m_radioButtonSelf{new QRadioButton{tr("Self"), this}},
@@ -23,9 +23,9 @@ CodeActionDialog::CodeActionDialog(Action &action, QWidget *parent) :
addToolbarWidget(m_radioButtonOther);
addToolbarWidget(m_radioButtonObject);
m_radioButtonSelf->setChecked(m_action.appliesTo == Action::AppliesTo::Self);
m_radioButtonOther->setChecked(m_action.appliesTo == Action::AppliesTo::Other);
m_radioButtonObject->setChecked(m_action.appliesTo == Action::AppliesTo::Object);
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);
setScript(m_action.script);
@@ -46,11 +46,11 @@ void CodeActionDialog::accept()
}
if (m_radioButtonSelf->isChecked())
m_action.appliesTo = Action::AppliesTo::Self;
m_action.appliesTo = ExecuteCodeAction::AppliesTo::Self;
else if (m_radioButtonOther->isChecked())
m_action.appliesTo = Action::AppliesTo::Other;
m_action.appliesTo = ExecuteCodeAction::AppliesTo::Other;
else if (m_radioButtonObject->isChecked())
m_action.appliesTo = Action::AppliesTo::Object;
m_action.appliesTo = ExecuteCodeAction::AppliesTo::Object;
else
{
QMessageBox::warning(this, tr("No Applies To selected!"), tr("No Applies To selected!"));