6 #ifndef SWIFT_CORE_ACTIONBIND_H
7 #define SWIFT_CORE_ACTIONBIND_H
27 template <
typename Receiver>
30 QObject *parent =
nullptr)
31 : QObject(parent), m_deleteCallback(deleteCallback)
37 const QString a = CActionBind::registerAction(action, icon);
59 bool isBound()
const {
return m_index >= 0; }
68 static QString normalizeAction(
const QString &action);
74 std::function<void()> m_deleteCallback;
SWIFT_CORE_EXPORT swift::core::CApplication * sApp
Single instance of application object.
CActionBind binds a member function to an action.
CActionBind & operator=(const CActionBind &)=delete
Not copyable.
bool isBound() const
Bound with swift::core::CInputManager.
void(U::*)(bool) MembFunc
Signature of receiving member function.
CActionBind(const QString &action, swift::misc::CIcons::IconIndex icon, Receiver *receiver, MembFunc< Receiver > slot=nullptr, const std::function< void()> &deleteCallback={}, QObject *parent=nullptr)
Constructor.
int getIndex() const
Index.
CActionBind(const CActionBind &)=delete
Not copyable.
void aboutToShutdown()
About to shutdown.
CInputManager * getInputManager() const
The input manager, if available.
bool isShuttingDown() const
Is application shutting down?
const swift::misc::CApplicationInfo & getApplicationInfo() const
swift application running
bool isUnitTest() const
Unit test.
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Backend services of the swift project, like dealing with the network or the simulators.
QSharedPointer< CActionBind > CActionBinding
Single binding.
QList< CActionBinding > CActionBindings
List of bindings.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.