##// END OF EJS Templates
Add action to remove the selected zone with the "del" buttons
Add action to remove the selected zone with the "del" buttons

File last commit:

r1111:666a84a7f3b2
r1117:eff9e479c5d5
Show More
ActionsGuiController.cpp
26 lines | 814 B | text/x-c | CppLexer
/ gui / src / Actions / ActionsGuiController.cpp
Adds a a gui controller class to manage global actions across the application.
r1111 #include "Actions/ActionsGuiController.h"
struct ActionsGuiController::ActionsGuiControllerPrivate {
QVector<std::shared_ptr<SelectionZoneAction> > m_SelectionZoneActions;
};
ActionsGuiController::ActionsGuiController()
: impl{spimpl::make_unique_impl<ActionsGuiControllerPrivate>()}
{
}
std::shared_ptr<SelectionZoneAction>
ActionsGuiController::addSectionZoneAction(const QString &name,
SelectionZoneAction::ExecuteFunction function)
{
auto action = std::make_shared<SelectionZoneAction>(name, function);
impl->m_SelectionZoneActions.push_back(action);
return action;
}
QVector<std::shared_ptr<SelectionZoneAction> > ActionsGuiController::selectionZoneActions() const
{
return impl->m_SelectionZoneActions;
}