Bump version to 0.3.4.

Fixed compatibility with FW 3.30.
Added setting to put a custom protocol version to avoid updates.
Added notifications via libnotify on Linux.
Added AppIndicator support for GNOME 3 and Unity.
This commit is contained in:
codestation
2014-10-03 01:40:35 -04:30
parent a85d49ebc9
commit fb5b881345
30 changed files with 781 additions and 387 deletions

View File

@@ -1,3 +1,12 @@
qcma (0.3.4) unstable; urgency=low
* Fixed compatibility with FW 3.30.
* Added setting to put a custom protocol version to avoid updates.
* Added notifications via libnotify on Linux.
* Added AppIndicator support for GNOME 3 and Unity.
-- codestation <codestation404@gmail.com> Thu, 28 Jun 2014 00:00:00 -0000
qcma (0.3.3) unstable; urgency=low qcma (0.3.3) unstable; urgency=low
* Fixed wrong file sizes under windows. * Fixed wrong file sizes under windows.

1
debian/control vendored
View File

@@ -13,6 +13,7 @@ Build-Depends:
qtbase5-dev, qtbase5-dev,
qttools5-dev-tools, qttools5-dev-tools,
qt5-default, qt5-default,
libnotify-dev,
pkg-config, pkg-config,
vitamtp-dev vitamtp-dev

2
debian/qcma.install vendored
View File

@@ -1,3 +1,5 @@
usr/bin/qcma usr/bin/qcma
resources/qcma.desktop usr/share/applications/qcma resources/qcma.desktop usr/share/applications/qcma
resources/images/qcma.png usr/share/icons/hicolor/64x64/apps resources/images/qcma.png usr/share/icons/hicolor/64x64/apps
resources/images/qcma_on.png usr/share/icons/hicolor/64x64/actions
resources/images/qcma_off.png usr/share/icons/hicolor/64x64/actions

View File

@@ -6,7 +6,7 @@
QT += core network sql QT += core network sql
VERSION = 0.3.3 VERSION = 0.3.4
TEMPLATE = app TEMPLATE = app

View File

@@ -10,6 +10,8 @@ SOURCES += \
src/gui/singleapplication.cpp \ src/gui/singleapplication.cpp \
src/gui/clientmanager.cpp \ src/gui/clientmanager.cpp \
src/gui/filterlineedit.cpp \ src/gui/filterlineedit.cpp \
src/indicator/trayindicator.cpp \
src/indicator/qtrayicon.cpp \
# forms # forms
src/forms/backupitem.cpp \ src/forms/backupitem.cpp \
src/forms/backupmanagerform.cpp \ src/forms/backupmanagerform.cpp \
@@ -23,6 +25,9 @@ HEADERS += \
src/gui/singleapplication.h \ src/gui/singleapplication.h \
src/gui/clientmanager.h \ src/gui/clientmanager.h \
src/gui/filterlineedit.h \ src/gui/filterlineedit.h \
src/indicator/trayindicator_global.h \
src/indicator/trayindicator.h \
src/indicator/qtrayicon.h \
# forms # forms
src/forms/backupitem.h \ src/forms/backupitem.h \
src/forms/backupmanagerform.h \ src/forms/backupmanagerform.h \
@@ -50,9 +55,20 @@ unix:!macx {
icon64.path = $$DATADIR/icons/hicolor/64x64/apps icon64.path = $$DATADIR/icons/hicolor/64x64/apps
icon64.files += resources/images/$${TARGET}.png icon64.files += resources/images/$${TARGET}.png
# AppIndicator support
ENABLE_INDICATOR {
actions64.path = $$DATADIR/icons/hicolor/64x64/actions
actions64.files += resources/images/qcma_on.png
actions64.files += resources/images/qcma_off.png
SOURCES += src/indicator/unityindicator.cpp
HEADERS += src/indicator/unityindicator.h
PKGCONFIG += appindicator3-0.1
DEFINES += ENABLE_APPINDICATOR=1
}
target.path = $$BINDIR target.path = $$BINDIR
INSTALLS += target desktop icon64 INSTALLS += target desktop icon64 actions64
# KDE support # KDE support
ENABLE_KDE { ENABLE_KDE {
@@ -68,6 +84,8 @@ unix:!macx {
unix:!macx { unix:!macx {
PKGCONFIG += libnotify
QT += dbus QT += dbus
# Create the introspection XML # Create the introspection XML

21
qcma_indicator.pro Normal file
View File

@@ -0,0 +1,21 @@
QT += gui widgets
TARGET = qcma_trayindicator
TEMPLATE = lib
CONFIG += plugin
PKGCONFIG += appindicator3-0.1
DEFINES += QCMA_TRAYINDICATOR_LIBRARY
SOURCES += \
src/indicator/trayindicator.cpp \
src/indicator/qtrayicon.cpp
HEADERS += \
src/indicator/trayindicator_global.h \
src/indicator/trayindicator.h
unix {
target.path = /usr/lib/qcma
INSTALLS += target
}

View File

@@ -1,11 +1,11 @@
<RCC> <RCC>
<qresource prefix="/main"> <qresource prefix="/main">
<file>resources/xml/psp2-updatelist.xml</file> <file>resources/xml/psp2-updatelist.xml</file>
<file>resources/images/psv_icon.png</file> <file>resources/images/tray/qcma_on.png</file>
<file>resources/images/psv_icon_16.png</file> <file>resources/images/tray/qcma_on_16.png</file>
<file>resources/images/qcma.png</file> <file>resources/images/qcma.png</file>
<file>resources/images/edit-clear-locationbar-rtl.png</file> <file>resources/images/edit-clear-locationbar-rtl.png</file>
<file>resources/images/psv_icon_dc.png</file> <file>resources/images/tray/qcma_off.png</file>
<file>resources/images/psv_icon_16_dc.png</file> <file>resources/images/tray/qcma_off_16.png</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View File

Before

Width:  |  Height:  |  Size: 301 B

After

Width:  |  Height:  |  Size: 301 B

View File

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 387 B

View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

View File

@@ -6,7 +6,7 @@ Name: qcma
Summary: PSVita Content Manager Assistant Summary: PSVita Content Manager Assistant
License: GPL-3.0 License: GPL-3.0
Release: 1 Release: 1
Version: 0.3.3 Version: 0.3.4
URL: https://github.com/codestation/qcma URL: https://github.com/codestation/qcma
Source: https://github.com/codestation/qcma.git Source: https://github.com/codestation/qcma.git
Group: Productivity/File utilities Group: Productivity/File utilities

View File

@@ -6,7 +6,7 @@ Name: qcma
Summary: PSVita Content Manager Assistant Summary: PSVita Content Manager Assistant
License: GPL-3.0 License: GPL-3.0
Release: 1 Release: 1
Version: 0.3.3 Version: 0.3.4
URL: https://github.com/codestation/qcma URL: https://github.com/codestation/qcma
Source: https://github.com/codestation/qcma.git Source: https://github.com/codestation/qcma.git
Group: Productivity/File utilities Group: Productivity/File utilities

View File

@@ -40,7 +40,7 @@ bool DeviceCapability::exchangeInfo(vita_device_t *device)
} }
QString hostname = QHostInfo::localHostName(); QString hostname = QHostInfo::localHostName();
const initiator_info_t *pc_info = VitaMTP_Data_Initiator_New(hostname.toUtf8().data(), vita_info.protocolVersion); const initiator_info_t *pc_info = VitaMTP_Data_Initiator_New(hostname.toUtf8().data(), VITAMTP_PROTOCOL_MAX_VERSION);
// Next, we send the client's (this program) info (discard the const here) // Next, we send the client's (this program) info (discard the const here)
if(VitaMTP_SendInitiatorInfo(device, (initiator_info_t *)pc_info) != PTP_RC_OK) { if(VitaMTP_SendInitiatorInfo(device, (initiator_info_t *)pc_info) != PTP_RC_OK) {

View File

@@ -15,305 +15,116 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QTabWidget" name="tabWidget"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="enabled"> <item>
<bool>true</bool> <layout class="QFormLayout" name="formLayout_3">
</property> <item row="0" column="0">
<property name="currentIndex"> <widget class="QLabel" name="label_3">
<number>0</number> <property name="text">
</property> <string>Online ID / Username</string>
<widget class="QWidget" name="backupTab">
<attribute name="title">
<string>Backup Manager</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="columnCount">
<number>1</number>
</property> </property>
<column/>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <widget class="QComboBox" name="accountBox"/>
<item>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Online ID / Username</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="accountBox"/>
</item>
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayout_4">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Backup Type</string>
</property>
<property name="margin">
<number>2</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="backupComboBox">
<item>
<property name="text">
<string>PS Vita Games</string>
</property>
</item>
<item>
<property name="text">
<string>PSP Games</string>
</property>
</item>
<item>
<property name="text">
<string>PSM Games</string>
</property>
</item>
<item>
<property name="text">
<string>PSOne Games</string>
</property>
</item>
<item>
<property name="text">
<string>PSP Savedatas</string>
</property>
</item>
<item>
<property name="text">
<string>Backups</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="usageLabel">
<property name="text">
<string>Backup disk usage</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="FilterLineEdit" name="filterLineEdit">
<property name="styleSheet">
<string notr="true">FilterLineEdit { color:gray; font-style:italic; }</string>
</property>
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </item>
<widget class="QWidget" name="downloadTab"> <item>
<property name="enabled"> <layout class="QFormLayout" name="formLayout_4">
<bool>false</bool> <property name="fieldGrowthPolicy">
</property> <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
<attribute name="title"> </property>
<string>Download List</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout"> <widget class="QLabel" name="label_4">
<property name="text">
<string>Backup Type</string>
</property>
<property name="margin">
<number>2</number>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="backupComboBox">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <property name="text">
<item> <string>PS Vita Games</string>
<widget class="QLabel" name="label_5"> </property>
<property name="text">
<string>Console</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox">
<item>
<property name="text">
<string>PS Vita</string>
</property>
</item>
<item>
<property name="text">
<string>PSP</string>
</property>
</item>
<item>
<property name="text">
<string>Other</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Content</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_2">
<item>
<property name="text">
<string>Games</string>
</property>
</item>
<item>
<property name="text">
<string>Demos</string>
</property>
</item>
<item>
<property name="text">
<string>DLC</string>
</property>
</item>
<item>
<property name="text">
<string>Other</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Status</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_3">
<item>
<property name="text">
<string>New</string>
</property>
</item>
<item>
<property name="text">
<string>Downloading</string>
</property>
</item>
<item>
<property name="text">
<string>Completed</string>
</property>
</item>
<item>
<property name="text">
<string>Paused</string>
</property>
</item>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <property name="text">
<item> <string>PSP Games</string>
<widget class="QLabel" name="label_8"> </property>
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="usernameEdit"/>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="passwordEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refreshButton">
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QListWidget" name="listWidget"/> <property name="text">
<string>PSM Games</string>
</property>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <property name="text">
<item> <string>PSOne Games</string>
<widget class="QLabel" name="label_10"> </property>
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_3"/>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Resume All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Pause All</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> <item>
<property name="text">
<string>PSP Savedatas</string>
</property>
</item>
<item>
<property name="text">
<string>Backups</string>
</property>
</item>
</widget>
</item> </item>
</layout> </layout>
</widget> </item>
</layout>
</item>
<item row="1" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="columnCount">
<number>1</number>
</property>
<column/>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="usageLabel">
<property name="text">
<string>Backup disk usage</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="FilterLineEdit" name="filterLineEdit">
<property name="styleSheet">
<string notr="true">FilterLineEdit { color:gray; font-style:italic; }</string>
</property>
<property name="text">
<string>Filter</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>

View File

@@ -62,6 +62,7 @@ void ConfigWidget::connectSignals()
connect(mapper, SIGNAL(mapped(int)), this, SLOT(browseBtnPressed(int))); connect(mapper, SIGNAL(mapped(int)), this, SLOT(browseBtnPressed(int)));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(ui->resetProtocolButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
} }
void ConfigWidget::setDefaultData() void ConfigWidget::setDefaultData()
@@ -98,6 +99,8 @@ void ConfigWidget::setDefaultData()
ui->photoSkipCheck->setChecked(settings.value("photoSkip", false).toBool()); ui->photoSkipCheck->setChecked(settings.value("photoSkip", false).toBool());
ui->videoSkipCheck->setChecked(settings.value("videoSkip", false).toBool()); ui->videoSkipCheck->setChecked(settings.value("videoSkip", false).toBool());
ui->musicSkipCheck->setChecked(settings.value("musicSkip", false).toBool()); ui->musicSkipCheck->setChecked(settings.value("musicSkip", false).toBool());
ui->protocolEdit->setText(settings.value("protocolVersion", VITAMTP_PROTOCOL_MAX_VERSION).toString());
} }
ConfigWidget::~ConfigWidget() ConfigWidget::~ConfigWidget()
@@ -105,6 +108,11 @@ ConfigWidget::~ConfigWidget()
delete ui; delete ui;
} }
void ConfigWidget::resetButtonPressed()
{
ui->protocolEdit->setText(QString::number(VITAMTP_PROTOCOL_MAX_VERSION));
}
void ConfigWidget::browseBtnPressed(int btn) void ConfigWidget::browseBtnPressed(int btn)
{ {
QString msg; QString msg;
@@ -179,6 +187,7 @@ void ConfigWidget::accept()
settings.setValue("photoSkip", ui->photoSkipCheck->isChecked()); settings.setValue("photoSkip", ui->photoSkipCheck->isChecked());
settings.setValue("videoSkip", ui->videoSkipCheck->isChecked()); settings.setValue("videoSkip", ui->videoSkipCheck->isChecked());
settings.setValue("musicSkip", ui->musicSkipCheck->isChecked()); settings.setValue("musicSkip", ui->musicSkipCheck->isChecked());
settings.setValue("protocolVersion", ui->protocolEdit->text().toLongLong());
settings.sync(); settings.sync();
done(Accepted); done(Accepted);

View File

@@ -48,6 +48,7 @@ private:
private slots: private slots:
void browseBtnPressed(int from); void browseBtnPressed(int from);
void resetButtonPressed();
void accept(); void accept();
}; };

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>520</width> <width>520</width>
<height>450</height> <height>439</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -19,7 +19,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@@ -211,28 +211,28 @@
</item> </item>
</layout> </layout>
</item> </item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_9"> <widget class="QLabel" name="label_9">
<property name="text">
<string>Packages</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLabel" name="label_9"> <widget class="QLineEdit" name="pkgPath"/>
<property name="text">
<string>Packages</string>
</property>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <widget class="QPushButton" name="pkgBtn">
<item> <property name="text">
<widget class="QLineEdit" name="pkgPath"/> <string>Browse...</string>
</item> </property>
<item> </widget>
<widget class="QPushButton" name="pkgBtn">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </item>
@@ -299,6 +299,9 @@
</item> </item>
<item> <item>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
@@ -346,6 +349,31 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>CMA Protocol version</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="protocolEdit">
<property name="inputMask">
<string>9999999</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="resetProtocolButton">
<property name="text">
<string>Reset to default</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">

View File

@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
qDebug("Starting main thread: 0x%016" PRIxPTR, (uintptr_t)QThread::currentThreadId()); qDebug("Starting main thread: 0x%016" PRIxPTR, (uintptr_t)QThread::currentThreadId());
// set the organization/application for QSettings to work properly // set the organization/application for QSettings to work properly
app.setOrganizationName("qcma"); app.setOrganizationName("codestation");
app.setApplicationName("qcma"); app.setApplicationName("qcma");
//TODO: check if this is actually needed since we don't have a main window by default //TODO: check if this is actually needed since we don't have a main window by default

View File

@@ -28,22 +28,22 @@
#include "qlistdb.h" #include "qlistdb.h"
#include "sqlitedb.h" #include "sqlitedb.h"
#include <QAction> #ifdef ENABLE_APPINDICATOR
#include "indicator/unityindicator.h"
#else
#include "indicator/qtrayicon.h"
#endif
#include <QApplication> #include <QApplication>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QGridLayout> #include <QGridLayout>
#include <QMenu>
#include <QMessageBox> #include <QMessageBox>
#include <QSettings> #include <QSettings>
#include <QTimer> #include <QTimer>
#include <QSettings> #include <QSettings>
#include <QSpacerItem> #include <QSpacerItem>
#ifdef ENABLE_KDE_NOTIFIER
#include <kmenu.h>
#endif
const QStringList MainWidget::path_list = QStringList() << "photoPath" << "musicPath" << "videoPath" << "appsPath" << "urlPath"; const QStringList MainWidget::path_list = QStringList() << "photoPath" << "musicPath" << "videoPath" << "appsPath" << "urlPath";
bool sleptOnce = false; bool sleptOnce = false;
@@ -115,12 +115,12 @@ void MainWidget::deviceDisconnect()
{ {
#ifndef ENABLE_KDE_NOTIFIER #ifndef ENABLE_KDE_NOTIFIER
#ifndef Q_OS_WIN32 #ifndef Q_OS_WIN32
trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon_dc.png")); trayIcon->setIcon("qcma_off.png");
#else #else
trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon_16_dc.png")); trayIcon->setIcon("qcma_off_16.png");
#endif #endif
#else #else
notifierItem->setIconByPixmap(QIcon(":/main/resources/images/psv_icon_dc.png")); notifierItem->setIconByPixmap(QIcon(":/main/resources/images/tray/qcma_off.png"));
#endif #endif
qDebug("Icon changed - disconnected"); qDebug("Icon changed - disconnected");
setTrayTooltip(tr("Disconnected")); setTrayTooltip(tr("Disconnected"));
@@ -131,12 +131,12 @@ void MainWidget::deviceConnect(QString message)
{ {
#ifndef ENABLE_KDE_NOTIFIER #ifndef ENABLE_KDE_NOTIFIER
#ifndef Q_OS_WIN32 #ifndef Q_OS_WIN32
trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon.png")); trayIcon->setIcon("qcma_on.png");
#else #else
trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon_16.png")); trayIcon->setIcon("qcma_off_16.png");
#endif #endif
#else #else
notifierItem->setIconByPixmap(QIcon(":/main/resources/images/psv_icon.png")); notifierItem->setIconByPixmap(QIcon(":/main/resources/images/tray/qcma_on.png"));
#endif #endif
qDebug("Icon changed - connected"); qDebug("Icon changed - connected");
setTrayTooltip(message); setTrayTooltip(message);
@@ -152,7 +152,7 @@ void MainWidget::prepareApplication(bool showSystray)
db = new SQLiteDB(); db = new SQLiteDB();
} }
configForm = new ConfigWidget(); configForm = new ConfigWidget(this);
backupForm = new BackupManagerForm(db, this); backupForm = new BackupManagerForm(db, this);
managerForm = new ClientManager(db, this); managerForm = new ClientManager(db, this);
connectSignals(); connectSignals();
@@ -234,56 +234,26 @@ void MainWidget::refreshDatabase()
void MainWidget::createTrayIcon() void MainWidget::createTrayIcon()
{ {
options = new QAction(tr("&Settings"), this); #ifdef ENABLE_APPINDICATOR
reload = new QAction(tr("&Refresh database"), this); trayIcon = new UnityIndicator(this);
backup = new QAction(tr("&Backup Manager"), this);
about = new QAction(tr("&About QCMA"), this);
about_qt = new QAction(tr("Abou&t Qt"), this);
quit = new QAction(tr("&Quit"), this);
connect(options, SIGNAL(triggered()), this, SLOT(openConfig()));
connect(backup, SIGNAL(triggered()), this, SLOT(openManager()));
connect(reload, SIGNAL(triggered()), this, SLOT(refreshDatabase()));
connect(about, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
connect(about_qt, SIGNAL(triggered()), this, SLOT(showAboutQt()));
connect(quit, SIGNAL(triggered()), this, SLOT(stopServer()));
#ifndef ENABLE_KDE_NOTIFIER
QMenu *trayIconMenu = new QMenu(this);
#else #else
KMenu *trayIconMenu = new KMenu(this); trayIcon = new QTrayIcon(this);
#endif #endif
trayIcon->init();
trayIconMenu->addAction(options);
trayIconMenu->addAction(reload);
trayIconMenu->addAction(backup);
trayIconMenu->addSeparator();
trayIconMenu->addAction(about);
trayIconMenu->addAction(about_qt);
trayIconMenu->addSeparator();
trayIconMenu->addAction(quit);
#ifndef ENABLE_KDE_NOTIFIER
trayIcon = new QSystemTrayIcon(this);
trayIcon->setContextMenu(trayIconMenu);
#ifndef Q_OS_WIN32 #ifndef Q_OS_WIN32
trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon_dc.png")); trayIcon->setIcon("qcma_off.png");
#else #else
trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon_16_dc.png")); trayIcon->setIcon("qcma_off_16.png");
#endif #endif
trayIcon->show(); trayIcon->show();
#else
notifierItem = new KDENotifier("QcmaNotifier", this); connect(trayIcon, SIGNAL(openConfig()), this, SLOT(openConfig()));
notifierItem->setContextMenu(trayIconMenu); connect(trayIcon, SIGNAL(openManager()), this, SLOT(openManager()));
notifierItem->setTitle("Qcma"); connect(trayIcon, SIGNAL(refreshDatabase()), this, SLOT(refreshDatabase()));
notifierItem->setCategory(KStatusNotifierItem::ApplicationStatus); connect(trayIcon, SIGNAL(showAboutDialog()), this, SLOT(showAboutDialog()));
notifierItem->setIconByPixmap(QIcon(":/main/resources/images/psv_icon_dc.png")); connect(trayIcon, SIGNAL(showAboutQt()), this, SLOT(showAboutQt()));
notifierItem->setStatus(KStatusNotifierItem::Active); connect(trayIcon, SIGNAL(stopServer()), this, SLOT(stopServer()));
notifierItem->setToolTipTitle(tr("Qcma status"));
notifierItem->setToolTipIconByPixmap(QIcon(":/main/resources/images/qcma.png"));
notifierItem->setToolTipSubTitle(tr("Disconnected"));
notifierItem->setStandardActionsEnabled(false);
#endif
connect(managerForm, SIGNAL(deviceConnected(QString)), this, SLOT(deviceConnect(QString))); connect(managerForm, SIGNAL(deviceConnected(QString)), this, SLOT(deviceConnect(QString)));
connect(managerForm, SIGNAL(deviceDisconnected()), this, SLOT(deviceDisconnect())); connect(managerForm, SIGNAL(deviceDisconnected()), this, SLOT(deviceDisconnect()));
@@ -299,14 +269,8 @@ void MainWidget::receiveMessage(QString message)
sleptOnce = true; sleptOnce = true;
} }
#ifndef ENABLE_KDE_NOTIFIER if(trayIcon->isVisible())
if(trayIcon->isVisible()) {
trayIcon->showMessage(tr("Information"), message); trayIcon->showMessage(tr("Information"), message);
}
#else
notifierItem->showMessage(tr("Qcma - Information"), message, "dialog-information", 3000);
#endif
} }
MainWidget::~MainWidget() MainWidget::~MainWidget()

View File

@@ -40,6 +40,8 @@
#include <vitamtp.h> #include <vitamtp.h>
class TrayIndicator;
class MainWidget : public QWidget class MainWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
@@ -66,23 +68,11 @@ private:
ClientManager *managerForm; ClientManager *managerForm;
BackupManagerForm *backupForm; BackupManagerForm *backupForm;
//system tray
QAction *quit;
QAction *reload;
QAction *options;
QAction *backup;
QAction *about;
QAction *about_qt;
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
QDBusConnection dbus_conn; QDBusConnection dbus_conn;
#endif #endif
#ifndef ENABLE_KDE_NOTIFIER TrayIndicator *trayIcon;
QSystemTrayIcon *trayIcon;
#else
KDENotifier *notifierItem;
#endif
const static QStringList path_list; const static QStringList path_list;

117
src/indicator/qtrayicon.cpp Normal file
View File

@@ -0,0 +1,117 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qtrayicon.h"
#include <QSystemTrayIcon>
#ifdef ENABLE_KDE_NOTIFIER
#include <kmenu.h>
#else
#include <QIcon>
#include <QMenu>
#endif
QTrayIcon::QTrayIcon(QWidget *parent)
: TrayIndicator(parent)
{
}
void QTrayIcon::init()
{
options = new QAction(tr("Settings"), this);
reload = new QAction(tr("Refresh database"), this);
backup = new QAction(tr("Backup Manager"), this);
about = new QAction(tr("About QCMA"), this);
about_qt = new QAction(tr("About Qt"), this);
quit = new QAction(tr("Quit"), this);
connect(options, SIGNAL(triggered()), this, SIGNAL(openConfig()));
connect(backup, SIGNAL(triggered()), this, SIGNAL(openManager()));
connect(reload, SIGNAL(triggered()), this, SIGNAL(refreshDatabase()));
connect(about, SIGNAL(triggered()), this, SIGNAL(showAboutDialog()));
connect(about_qt, SIGNAL(triggered()), this, SIGNAL(showAboutQt()));
connect(quit, SIGNAL(triggered()), this, SIGNAL(stopServer()));
#ifndef ENABLE_KDE_NOTIFIER
QMenu *tray_icon_menu = new QMenu(this);
#else
KMenu *tray_icon_menu = new KMenu(this);
#endif
tray_icon_menu->addAction(options);
tray_icon_menu->addAction(reload);
tray_icon_menu->addAction(backup);
tray_icon_menu->addSeparator();
tray_icon_menu->addAction(about);
tray_icon_menu->addAction(about_qt);
tray_icon_menu->addSeparator();
tray_icon_menu->addAction(quit);
#ifndef ENABLE_KDE_NOTIFIER
m_tray_icon = new QSystemTrayIcon(this);
m_tray_icon->setContextMenu(tray_icon_menu);
#else
m_notifier_item = new KDENotifier("QcmaNotifier", this);
m_notifier_item->setContextMenu(tray_icon_menu);
m_notifier_item->setTitle("Qcma");
m_notifier_item->setCategory(KStatusNotifierItem::ApplicationStatus);
m_notifier_item->setIconByPixmap(QIcon(":/main/resources/images/tray/qcma_off.png"));
m_notifier_item->setStatus(KStatusNotifierItem::Active);
m_notifier_item->setToolTipTitle(tr("Qcma status"));
m_notifier_item->setToolTipIconByPixmap(QIcon(":/main/resources/images/qcma.png"));
m_notifier_item->setToolTipSubTitle(tr("Disconnected"));
m_notifier_item->setStandardActionsEnabled(false);
#endif
}
#ifndef Q_OS_LINUX
void QTrayIcon::showMessage(const QString &title, const QString &message)
{
m_tray_icon->showMessage(title, message);
}
#endif
bool QTrayIcon::isVisible()
{
#ifndef ENABLE_KDE_NOTIFIER
return m_tray_icon->isVisible();
#else
return true;
#endif
}
void QTrayIcon::setIcon(const QString &icon)
{
m_tray_icon->setIcon(QIcon(":/main/resources/images/tray/" + icon));
}
void QTrayIcon::show()
{
#ifndef ENABLE_KDE_NOTIFIER
m_tray_icon->show();
#endif
}
void QTrayIcon::hide()
{
#ifndef ENABLE_KDE_NOTIFIER
m_tray_icon->hide();
#endif
}

62
src/indicator/qtrayicon.h Normal file
View File

@@ -0,0 +1,62 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QTRAYICON_H
#define QTRAYICON_H
#include "trayindicator.h"
class QAction;
class QSystemTrayIcon;
class QTrayIcon : public TrayIndicator
{
Q_OBJECT
public:
explicit QTrayIcon(QWidget *parent = 0);
void init();
void setIcon(const QString &icon);
bool isVisible();
void show();
void hide();
#ifndef Q_OS_LINUX
void showMessage(const QString &title, const QString &message);
#endif
private:
//system tray
QAction *quit;
QAction *reload;
QAction *options;
QAction *backup;
QAction *about;
QAction *about_qt;
#ifndef ENABLE_KDE_NOTIFIER
QSystemTrayIcon *m_tray_icon;
#else
KDENotifier *m_notifier_item;
#endif
public slots:
};
#endif // QTRAYICON_H

View File

@@ -0,0 +1,54 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "trayindicator.h"
#undef signals
extern "C" {
#include <libnotify/notify.h>
}
#define signals public
TrayIndicator::TrayIndicator(QWidget *parent)
: QWidget(parent)
{
#ifdef Q_OS_LINUX
notify_init("qcma");
#endif
}
TrayIndicator::~TrayIndicator()
{
#ifdef Q_OS_LINUX
notify_uninit();
#endif
}
void TrayIndicator::showMessage(const QString &title, const QString &message)
{
#ifdef Q_OS_LINUX
NotifyNotification *notif = notify_notification_new(qPrintable(title), qPrintable(message), "dialog-information");
notify_notification_show(notif, NULL);
g_object_unref(G_OBJECT(notif));
#else
Q_UNUSED(title);
Q_UNUSED(message);
#endif
}

View File

@@ -0,0 +1,53 @@
#ifndef TRAYINDICATOR_H
#define TRAYINDICATOR_H
#include "trayindicator_global.h"
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QString>
#include <QWidget>
class TRAYINDICATORSHARED_EXPORT TrayIndicator : public QWidget
{
Q_OBJECT
public:
virtual ~TrayIndicator();
virtual void init() = 0;
virtual bool isVisible() = 0;
virtual void setIcon(const QString &icon) = 0;
virtual void showMessage(const QString &title, const QString &message);
virtual void show() = 0;
virtual void hide() = 0;
protected:
TrayIndicator(QWidget *parent = 0);
signals:
void openConfig();
void openManager();
void refreshDatabase();
void showAboutDialog();
void showAboutQt();
void stopServer();
};
#endif // TRAYINDICATOR_H

View File

@@ -0,0 +1,31 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRAYINDICATOR_GLOBAL_H
#define TRAYINDICATOR_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(QCMA_TRAYINDICATOR_LIBRARY)
# define TRAYINDICATORSHARED_EXPORT Q_DECL_EXPORT
#else
# define TRAYINDICATORSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // TRAYINDICATOR_GLOBAL_H

View File

@@ -0,0 +1,172 @@
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "unityindicator.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QStandardPaths>
#else
#include <QDesktopServices>
#define QStandardPaths QDesktopServices
#define writableLocation storageLocation
#endif
#include <QDir>
extern "C" {
#include <gtk/gtk.h>
void optionsIndicator(GtkMenu *menu, gpointer data);
void reloadIndicator(GtkMenu *menu, gpointer data);
void backupIndicator(GtkMenu *menu, gpointer data);
void aboutIndicator(GtkMenu *menu, gpointer data);
void aboutQtIndicator(GtkMenu *menu, gpointer data);
void quitIndicator(GtkMenu *menu, gpointer data);
}
UnityIndicator::UnityIndicator(QWidget *parent) :
TrayIndicator(parent)
{
}
UnityIndicator::~UnityIndicator()
{
for(QVector<QPair<gpointer, gulong> >::iterator it = m_handlers.begin(); it != m_handlers.end(); ++it)
{
g_signal_handler_disconnect(it->first, it->second);
}
}
void optionsIndicator(GtkMenu *, gpointer data)
{
UnityIndicator *m_this = reinterpret_cast<UnityIndicator *>(data);
emit m_this->openConfig();
}
void reloadIndicator(GtkMenu *, gpointer data)
{
UnityIndicator *m_this = reinterpret_cast<UnityIndicator *>(data);
emit m_this->refreshDatabase();
}
void backupIndicator(GtkMenu *, gpointer data)
{
UnityIndicator *m_this = reinterpret_cast<UnityIndicator *>(data);
emit m_this->openManager();
}
void aboutIndicator(GtkMenu *, gpointer data)
{
UnityIndicator *m_this = reinterpret_cast<UnityIndicator *>(data);
emit m_this->showAboutDialog();
}
void aboutQtIndicator(GtkMenu *, gpointer data)
{
UnityIndicator *m_this = reinterpret_cast<UnityIndicator *>(data);
emit m_this->showAboutQt();
}
void quitIndicator(GtkMenu *, gpointer data)
{
UnityIndicator *m_this = reinterpret_cast<UnityIndicator *>(data);
emit m_this->stopServer();
}
void UnityIndicator::init()
{
GtkWidget *menu = gtk_menu_new();
GtkWidget *options = gtk_menu_item_new_with_label(qPrintable(tr("Settings")));
GtkWidget *reload = gtk_menu_item_new_with_label(qPrintable(tr("Refresh database")));
GtkWidget *backup = gtk_menu_item_new_with_label(qPrintable(tr("Backup Manager")));
GtkWidget *separator1 = gtk_separator_menu_item_new();
GtkWidget *about = gtk_menu_item_new_with_label(qPrintable(tr("About QCMA")));
GtkWidget *about_qt = gtk_menu_item_new_with_label(qPrintable(tr("About Qt")));
GtkWidget *separator2 = gtk_separator_menu_item_new();
GtkWidget *quit = gtk_menu_item_new_with_label(qPrintable(tr("Quit")));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), options);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), reload);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), backup);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator1);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), about);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), about_qt);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator2);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), quit);
gulong handle;
handle = g_signal_connect(options, "activate", G_CALLBACK(optionsIndicator), this);
m_handlers.append(QPair<gpointer, gulong>(options, handle));
handle = g_signal_connect(reload, "activate", G_CALLBACK(reloadIndicator), this);
m_handlers.append(QPair<gpointer, gulong>(reload, handle));
handle = g_signal_connect(backup, "activate", G_CALLBACK(backupIndicator), this);
m_handlers.append(QPair<gpointer, gulong>(backup, handle));
handle = g_signal_connect(about, "activate", G_CALLBACK(aboutIndicator), this);
m_handlers.append(QPair<gpointer, gulong>(about, handle));
handle = g_signal_connect(about_qt, "activate", G_CALLBACK(aboutQtIndicator), this);
m_handlers.append(QPair<gpointer, gulong>(about_qt, handle));
handle = g_signal_connect(quit, "activate", G_CALLBACK(quitIndicator), this);
m_handlers.append(QPair<gpointer, gulong>(quit, handle));
gtk_widget_show(options);
gtk_widget_show(reload);
gtk_widget_show(backup);
gtk_widget_show(separator1);
gtk_widget_show(about);
gtk_widget_show(about_qt);
gtk_widget_show(separator2);
gtk_widget_show(quit);
m_indicator = app_indicator_new(
"unique-application-name",
"indicator-messages",
APP_INDICATOR_CATEGORY_APPLICATION_STATUS
);
QString icon_name = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "icons/hicolor/64x64/tray/qcma_on.png");
if(!icon_name.isEmpty())
{
QString icon_path = QFileInfo(icon_name).absolutePath();
app_indicator_set_icon_theme_path(m_indicator, qPrintable(icon_path));
}
app_indicator_set_status(m_indicator, APP_INDICATOR_STATUS_ACTIVE);
app_indicator_set_menu(m_indicator, GTK_MENU(menu));
}
bool UnityIndicator::isVisible()
{
return true;
}
void UnityIndicator::setIcon(const QString &icon)
{
app_indicator_set_icon_full(m_indicator, qPrintable(icon), "icon");
}
void UnityIndicator::show()
{
}
void UnityIndicator::hide()
{
}

View File

@@ -0,0 +1,51 @@
#ifndef UNITYINDICATOR_H
#define UNITYINDICATOR_H
/*
* QCMA: Cross-platform content manager assistant for the PS Vita
*
* Copyright (C) 2014 Codestation
*
* This program 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 3 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "indicator/trayindicator.h"
#undef signals
extern "C" {
#include <libappindicator/app-indicator.h>
}
#define signals public
#include <QVector>
class UnityIndicator : public TrayIndicator
{
Q_OBJECT
public:
explicit UnityIndicator(QWidget *parent = 0);
~UnityIndicator();
void init();
void setIcon(const QString &icon);
bool isVisible();
void show();
void hide();
private:
AppIndicator *m_indicator;
QVector<QPair<gpointer, gulong> > m_handlers;
};
#endif // UNITYINDICATOR_H