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
@@ -54,6 +54,8 @@ QVariant ActionsContainerModel::data(const QModelIndex &index, int role) const
|
||||
return tr("Set the horizontal speed");
|
||||
else if (std::holds_alternative<SpeedVerticalAction>(action))
|
||||
return tr("Set the vertical speed");
|
||||
else if (std::holds_alternative<SetGravityAction>(action))
|
||||
return tr("Set the gravity");
|
||||
else if (std::holds_alternative<ExecuteCodeAction>(action))
|
||||
return tr("Execute a piece of code");
|
||||
else
|
||||
@@ -72,6 +74,8 @@ QVariant ActionsContainerModel::data(const QModelIndex &index, int role) const
|
||||
return QIcon{":/qtgameengine/icons/action-speed-horizontal.png"};
|
||||
else if (std::holds_alternative<SpeedVerticalAction>(action))
|
||||
return QIcon{":/qtgameengine/icons/action-speed-vertical.png"};
|
||||
else if (std::holds_alternative<SetGravityAction>(action))
|
||||
return QIcon{":/qtgameengine/icons/action-set-gravity.png"};
|
||||
else if (std::holds_alternative<ExecuteCodeAction>(action))
|
||||
return QIcon{":/qtgameengine/icons/action-execute-code.png"};
|
||||
else
|
||||
|
||||
@@ -28,7 +28,8 @@ public:
|
||||
bool removeRows(int row, int count, const QModelIndex &parent) override;
|
||||
bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
|
||||
|
||||
ActionsContainer *actionsContainer() const { return m_actionsContainer; }
|
||||
ActionsContainer *actionsContainer() { return m_actionsContainer; }
|
||||
const ActionsContainer *actionsContainer() const { return m_actionsContainer; }
|
||||
void setActionsContainer(ActionsContainer *actionsContainer);
|
||||
|
||||
Action *getAction(const QModelIndex &index);
|
||||
|
||||
Reference in new issue
Block a user