This commit is contained in:
Hannah von Reth 2015-12-03 15:25:29 +01:00
parent d16fc7d2c7
commit 867ee2268f
5 changed files with 16 additions and 7 deletions

View File

@ -73,12 +73,6 @@ const QString &SnorePlugin::name() const
return m_container->name();
}
SnorePlugin::PluginTypes SnorePlugin::type() const
{
Q_ASSERT_X(m_container, Q_FUNC_INFO, "Plugin container not set.");
return m_container->type();
}
const QString SnorePlugin::typeName() const
{
return SnorePlugin::typeToString(type());

View File

@ -118,7 +118,7 @@ public:
/**
* Returns the plugin type.
*/
virtual PluginTypes type() const;
virtual PluginTypes type() const = 0;
/**
* Returns the name of the plugin type.

View File

@ -39,6 +39,11 @@ public:
virtual bool canCloseNotification() const;
virtual bool canUpdateNotification() const;
PluginTypes type() const override
{
return Backend;
}
Q_SIGNALS:
void notificationClosed(Snore::Notification);

View File

@ -34,6 +34,11 @@ public:
SnoreFrontend();
virtual ~SnoreFrontend();
PluginTypes type() const override
{
return Frontend;
}
public Q_SLOTS:
virtual void slotActionInvoked(Snore::Notification notification);
virtual void slotNotificationClosed(Snore::Notification notification);

View File

@ -34,6 +34,11 @@ public:
SnoreSecondaryBackend();
virtual ~SnoreSecondaryBackend();
PluginTypes type() const override
{
return SecondaryBackend;
}
public Q_SLOTS:
virtual void slotNotify(Snore::Notification notification);
virtual void slotNotificationDisplayed(Snore::Notification notification);