added some more doc
This commit is contained in:
parent
2f4bd7bb69
commit
6e4f0b3659
|
@ -45,18 +45,54 @@ class SNORE_EXPORT Notification
|
|||
{
|
||||
friend class NotificationData;
|
||||
public:
|
||||
|
||||
/**
|
||||
* The reason why the Notification was closed.
|
||||
*/
|
||||
enum CloseReason
|
||||
{
|
||||
/**
|
||||
* The default value, the notification was not closed.
|
||||
*/
|
||||
NONE = 0x0,
|
||||
|
||||
/**
|
||||
* The Notification was closed becaouse it timed out.
|
||||
*/
|
||||
TIMED_OUT = 0x1,
|
||||
|
||||
/**
|
||||
* The Notification was dismissed by the user, close button.
|
||||
*/
|
||||
DISMISSED = 0x2,
|
||||
|
||||
/**
|
||||
* The Notification was closed after an action was invoked.
|
||||
* @see actionInvoked()
|
||||
*/
|
||||
CLOSED = 0x4
|
||||
};
|
||||
Q_DECLARE_FLAGS(CloseReasons, CloseReason)
|
||||
|
||||
enum Priority{
|
||||
/**
|
||||
* The Priority for the Notification.
|
||||
* Some notification systems support this flag to filter notifications or indicate different prioritys by color.
|
||||
*/
|
||||
enum Priority
|
||||
{
|
||||
/**
|
||||
* Indicates a low priority.
|
||||
*/
|
||||
LOW = -1,
|
||||
|
||||
/**
|
||||
* The default priority.
|
||||
*/
|
||||
NORMAL = 0,
|
||||
|
||||
/**
|
||||
* Indicates a priority above the normal level.
|
||||
*/
|
||||
HIGH = +1
|
||||
};
|
||||
Q_DECLARE_FLAGS(Prioritys, Priority)
|
||||
|
|
|
@ -28,14 +28,42 @@
|
|||
namespace Snore
|
||||
{
|
||||
|
||||
/**
|
||||
* Action contains informations about possible interactions with the notification system.
|
||||
* Some notification systems don't support actions but will report one if the notification was clicked,
|
||||
* in this case an invalid Action will be emitted.
|
||||
* @see isValid
|
||||
* @author Patrick von Reth \<vonreth at kde.org\>
|
||||
*/
|
||||
|
||||
class SNORE_EXPORT Action
|
||||
{
|
||||
public:
|
||||
Action();
|
||||
|
||||
/**
|
||||
* Creates an Action
|
||||
* @param id can be used to identify the action
|
||||
* @param name will be displayed in the notification system.
|
||||
*/
|
||||
Action(int id,QString name);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
int id() const;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
QString name() const;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return whether this is a valid Action
|
||||
*/
|
||||
bool isValid() const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -106,6 +106,7 @@ void SnoreCore::loadPlugins( SnorePlugin::PluginTypes types )
|
|||
snoreDebug( SNORE_DEBUG )<<"dont load "<<info->file()<<info->type();
|
||||
}
|
||||
}
|
||||
snoreDebug( SNORE_INFO ) << "Loaded Plugins:" << d->m_notificationBackends << d->m_Frontends << d->m_secondaryNotificationBackends << d->m_plugins;
|
||||
}
|
||||
|
||||
void SnoreCore::broadcastNotification ( Notification notification )
|
||||
|
|
|
@ -176,13 +176,16 @@ public:
|
|||
signals:
|
||||
/**
|
||||
* This signal is emitted when an action on the Notification was performed.
|
||||
* Some notification systems don't support actions but will report one if the notification was clicked,
|
||||
* in this case the Action will be invalid.
|
||||
* @todo maybe introduce a pecial action state for this case
|
||||
* @see Action
|
||||
*/
|
||||
void actionInvoked( Snore::Notification );
|
||||
|
||||
/**
|
||||
* This signal is emitted when a Notification is closed.
|
||||
* @see NotificationEnums::CloseReasons
|
||||
* @see Notification::CloseReasons
|
||||
*/
|
||||
void notificationClosed(Snore::Notification );
|
||||
|
||||
|
|
|
@ -9,19 +9,48 @@
|
|||
|
||||
namespace Snore{
|
||||
|
||||
class SNORE_EXPORT Version{
|
||||
/**
|
||||
* Version contains relevant version informations.
|
||||
* @author Patrick von Reth \<vonreth at kde.org\>
|
||||
*/
|
||||
class SNORE_EXPORT Version
|
||||
{
|
||||
public:
|
||||
static const QString version();
|
||||
/**
|
||||
*
|
||||
* @return the version "major().minor().suffix()"
|
||||
*/
|
||||
static const QString version();
|
||||
|
||||
static const QString major();
|
||||
/**
|
||||
*
|
||||
* @return the major version
|
||||
*/
|
||||
static const QString major();
|
||||
|
||||
static const QString minor();
|
||||
/**
|
||||
*
|
||||
* @return the minor version
|
||||
*/
|
||||
static const QString minor();
|
||||
|
||||
static const QString suffix();
|
||||
/**
|
||||
*
|
||||
* @return the suffix ("pre", "alpha", "beta", "")
|
||||
*/
|
||||
static const QString suffix();
|
||||
|
||||
static const QString revision();
|
||||
/**
|
||||
*
|
||||
* @return the git revision, can be empty in a release
|
||||
*/
|
||||
static const QString revision();
|
||||
|
||||
static const QString buildTime();
|
||||
/**
|
||||
*
|
||||
* @return the build time
|
||||
*/
|
||||
static const QString buildTime();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <QSystemTrayIcon>
|
||||
#include <QSettings>
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue