pgLab/pglab/plugin_support/LWidgetAction.cpp
eelke f4f2474a81 Moved definition of widget instance actions to the module so other parts of the system can no about them.
The plugin system will create the Action objects and bind them to the specified slots of the
specific widget instances.
2019-01-05 19:58:23 +01:00

56 lines
949 B
C++

#include "LWidgetAction.h"
LWidgetAction::LWidgetAction(QString text, const char * slotname)
: m_text(std::move(text))
, m_slotname(slotname)
{}
const QIcon& LWidgetAction::icon() const
{
return m_icon;
}
const MenuLocation& LWidgetAction::menuLocation() const
{
return m_menuLocation;
}
void LWidgetAction::setIcon(QIcon icon)
{
m_icon = std::move(icon);
}
void LWidgetAction::setMenuLocation(MenuLocation menu_location)
{
m_menuLocation = std::move(menu_location);
}
void LWidgetAction::setShortcut(QKeySequence shortcut)
{
m_shortCut = std::move(shortcut);
}
void LWidgetAction::setText(QString text)
{
m_text = std::move(text);
}
void LWidgetAction::setToolTip(QString tooltip)
{
m_toolTip = std::move(tooltip);
}
const QKeySequence& LWidgetAction::shortcut() const
{
return m_shortCut;
}
const QString& LWidgetAction::text() const
{
return m_text;
}
const QString& LWidgetAction::toolTip() const
{
return m_toolTip;
}