service/tray: adopt bindable properties

This commit is contained in:
outfoxxed 2024-11-21 19:44:51 -08:00
parent 0e9e593078
commit b43b4a06d0
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 200 additions and 135 deletions

View file

@ -1,7 +1,6 @@
#include "dbus_item_types.hpp"
#include <qdbusargument.h>
#include <qdbusextratypes.h>
#include <qdebug.h>
#include <qendian.h>
#include <qimage.h>
@ -10,6 +9,15 @@
#include <qsysinfo.h>
#include <qtypes.h>
bool DBusSniIconPixmap::operator==(const DBusSniIconPixmap& other) const {
return this->width == other.width && this->height == other.height && this->data == other.data;
}
bool DBusSniTooltip::operator==(const DBusSniTooltip& other) const {
return this->icon == other.icon && this->title == other.title
&& this->description == other.description && this->iconPixmaps == other.iconPixmaps;
}
QImage DBusSniIconPixmap::createImage() const {
// fix byte order if on a little endian machine
if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) {
@ -113,9 +121,3 @@ QDebug operator<<(QDebug debug, const DBusSniTooltip& tooltip) {
return debug;
}
QDebug operator<<(QDebug debug, const QDBusObjectPath& path) {
debug.nospace() << "QDBusObjectPath(" << path.path() << ")";
return debug;
}