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.
This commit is contained in:
parent
d0c4dabe8b
commit
f4f2474a81
21 changed files with 418 additions and 204 deletions
56
pglab/plugin_support/LWidgetAction.cpp
Normal file
56
pglab/plugin_support/LWidgetAction.cpp
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
#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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue