Class sh::actions::ActionInstantiation

class sh::actions::ActionInstantiation

Holds various data around action creation.

Action creation is a process, which begins with querying all actions available for certain nodes. The action factories evaluate availabilities and store some construction information here. Many parties are involved in working with it. The created action, is stored in this object as well.

Public Functions

ActionInstantiation(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> selectedNodes = {}, std::shared_ptr<sh::filesystem::FilesystemNode> currentDirectory = nullptr)

Constructor for a typical fresh instance, containing infos about selected items and some more.

ActionInstantiation(const ActionInstantiation &s) = default

Clones an existing instance.

ActionInstantiation(const ActionInstantiation &s, std::shared_ptr<sh::actions::AbstractActionItem> createdAction)

Clones an existing instance and sets createdAction. This is a convenience constructor used for some special cases.

Public Members

QList<std::shared_ptr<sh::filesystem::FilesystemNode>> selectedNodes

The selected nodes (initially: what’s selected in the active file list).

std::shared_ptr<sh::filesystem::FilesystemNode> currentDirectory

The current directory (which is visible in the active file list).

bool resolveLinks = true

If links shall be resolved for evaluation and action creation.

bool isLookupOnCurrentDirectoryLevel = false

If this instantiation refers to a lookup for actions on ‘current directory level’ (instead of ‘selection level’).

AbstractActionFactory *actionfactory = 0

The action faction.

std::shared_ptr<ActionCategory> category = 0

The action category.

std::shared_ptr<AbstractActionItem> createdAction = 0

The created action.

QKeySequence shortcut

The requested keyboard shortcut for the action.

int positionIndex = 0

The position information index.