projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
funchelpers: Support traits for non-member functions
[quassel.git]
/
src
/
qtui
/
statusnotifieritemdbus.h
diff --git
a/src/qtui/statusnotifieritemdbus.h
b/src/qtui/statusnotifieritemdbus.h
index
2fcefda
..
fb1f5cd
100644
(file)
--- a/
src/qtui/statusnotifieritemdbus.h
+++ b/
src/qtui/statusnotifieritemdbus.h
@@
-4,9
+4,9
@@
* Quasselfied 2010 by Manuel Nickschas <sputnick@quassel-irc.org> *
* *
* This file is free software; you can redistribute it and/or modify *
* Quasselfied 2010 by Manuel Nickschas <sputnick@quassel-irc.org> *
* *
* This file is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU
General Public License as published by
*
- *
the Free Software Foundation; either version 2 of the License, or
*
- *
(at your option) any later version.
*
+ * it under the terms of the GNU
Library General Public License (LGPL)
*
+ *
as published by the Free Software Foundation; either version 2 of the
*
+ *
License, or (at your option) any later version.
*
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
@@
-16,28
+16,30
@@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 5
9 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ * 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
***************************************************************************/
#ifndef STATUSNOTIFIERITEMDBUS_H_
#define STATUSNOTIFIERITEMDBUS_H_
***************************************************************************/
#ifndef STATUSNOTIFIERITEMDBUS_H_
#define STATUSNOTIFIERITEMDBUS_H_
-#include <QObject>
-#include <QString>
#include <QDBusArgument>
#include <QDBusConnection>
#include <QDBusArgument>
#include <QDBusConnection>
+#include <QObject>
#include <QPixmap>
#include <QPixmap>
+#include <QString>
-//Custom message type for DBus
-struct DBusImageStruct {
+// Custom message type for DBus
+struct DBusImageStruct
+{
int width;
int height;
QByteArray data;
};
int width;
int height;
QByteArray data;
};
-
typedef QVector<DBusImageStruct> DBusImageVector
;
+
using DBusImageVector = QVector<DBusImageStruct>
;
-struct DBusToolTipStruct {
+struct DBusToolTipStruct
+{
QString icon;
DBusImageVector image;
QString title;
QString icon;
DBusImageVector image;
QString title;
@@
-63,21
+65,29
@@
class StatusNotifierItemDBus : public QObject
Q_PROPERTY(DBusImageVector AttentionIconPixmap READ AttentionIconPixmap)
Q_PROPERTY(QString AttentionMovieName READ AttentionMovieName)
Q_PROPERTY(DBusToolTipStruct ToolTip READ ToolTip)
Q_PROPERTY(DBusImageVector AttentionIconPixmap READ AttentionIconPixmap)
Q_PROPERTY(QString AttentionMovieName READ AttentionMovieName)
Q_PROPERTY(DBusToolTipStruct ToolTip READ ToolTip)
+ Q_PROPERTY(QString IconThemePath READ IconThemePath)
+ Q_PROPERTY(QDBusObjectPath Menu READ Menu)
friend class StatusNotifierItem;
friend class StatusNotifierItem;
+
public:
public:
- StatusNotifierItemDBus(StatusNotifierItem *parent);
- ~StatusNotifierItemDBus();
+ StatusNotifierItemDBus(StatusNotifierItem* parent);
+ ~StatusNotifierItemDBus() override;
+
+ /**
+ * @return the dbus connection used by this object
+ */
+ QDBusConnection dbusConnection() const;
/**
/**
- * Register the
service
to DBus
+ * Register the
StatusNotifierItem
to DBus
*/
*/
- void register
Service
();
+ void register
TrayIcon
();
/**
/**
- * Unregister the
service
from DBus
+ * Unregister the
StatusNotifierItem
from DBus
*/
*/
- void unregister
Service
();
+ void unregister
TrayIcon
();
/**
* @return the service this object is registered on the bus under
/**
* @return the service this object is registered on the bus under
@@
-155,9
+165,18
@@
public:
*/
DBusToolTipStruct ToolTip() const;
*/
DBusToolTipStruct ToolTip() const;
+ /**
+ * @return path to extra icon theme, to load application specific icons
+ */
+ QString IconThemePath() const;
+
+ /**
+ * @return object path to the dbusmenu object
+ */
+ QDBusObjectPath Menu() const;
-public
Q_SLOTS
:
- //interaction
+public
slots
:
+ //
interaction
/**
* Shows the context menu associated to this item
* at the desired screen position
/**
* Shows the context menu associated to this item
* at the desired screen position
@@
-178,9
+197,9
@@
public Q_SLOTS:
/**
* Inform this item that the mouse wheel was used on its representation
*/
/**
* Inform this item that the mouse wheel was used on its representation
*/
- void Scroll(int delta, const QString
&
orientation);
+ void Scroll(int delta, const QString
&
orientation);
-
Q_SIGNALS
:
+
signals
:
/**
* Inform the systemtray that the own main icon has been changed,
* so should be reloaded
/**
* Inform the systemtray that the own main icon has been changed,
* so should be reloaded
@@
-207,28
+226,26
@@
Q_SIGNALS:
* Signal the new status when it has been changed
* @see Status
*/
* Signal the new status when it has been changed
* @see Status
*/
- void NewStatus(const QString
&
status);
+ void NewStatus(const QString
&
status);
private:
private:
- StatusNotifierItem *m_statusNotifierItem;
- QString m_service;
+ StatusNotifierItem* m_statusNotifierItem;
QDBusConnection m_dbus;
static int s_serviceCount;
};
QDBusConnection m_dbus;
static int s_serviceCount;
};
-
-const QDBusArgument &operator<<(QDBusArgument &argument, const DBusImageStruct &icon);
-const QDBusArgument &operator>>(const QDBusArgument &argument, DBusImageStruct &icon);
+const QDBusArgument& operator<<(QDBusArgument& argument, const DBusImageStruct& icon);
+const QDBusArgument& operator>>(const QDBusArgument& argument, DBusImageStruct& icon);
Q_DECLARE_METATYPE(DBusImageStruct)
Q_DECLARE_METATYPE(DBusImageStruct)
-const QDBusArgument
&operator<<(QDBusArgument &argument, const DBusImageVector &
iconVector);
-const QDBusArgument
&operator>>(const QDBusArgument &argument, DBusImageVector &
iconVector);
+const QDBusArgument
& operator<<(QDBusArgument& argument, const DBusImageVector&
iconVector);
+const QDBusArgument
& operator>>(const QDBusArgument& argument, DBusImageVector&
iconVector);
Q_DECLARE_METATYPE(DBusImageVector)
Q_DECLARE_METATYPE(DBusImageVector)
-const QDBusArgument
&operator<<(QDBusArgument &argument, const DBusToolTipStruct &
toolTip);
-const QDBusArgument
&operator>>(const QDBusArgument &argument, DBusToolTipStruct &
toolTip);
+const QDBusArgument
& operator<<(QDBusArgument& argument, const DBusToolTipStruct&
toolTip);
+const QDBusArgument
& operator>>(const QDBusArgument& argument, DBusToolTipStruct&
toolTip);
Q_DECLARE_METATYPE(DBusToolTipStruct)
Q_DECLARE_METATYPE(DBusToolTipStruct)