This repository has been archived by the owner on Jul 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SPlitted kde and appindicator code into shared libraries to avoid
additional dependencies.
- Loading branch information
1 parent
fb5b881
commit 992bb2e
Showing
17 changed files
with
326 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
QT += gui widgets | ||
|
||
TARGET = qcma_appindicator | ||
TEMPLATE = lib | ||
CONFIG += plugin link_pkgconfig | ||
DEFINES += QCMA_TRAYINDICATOR_LIBRARY | ||
|
||
QT_CONFIG -= no-pkg-config | ||
|
||
PKGCONFIG += appindicator-0.1 libnotify | ||
INCLUDEPATH += src/ | ||
|
||
SOURCES += \ | ||
src/indicator/unityindicator.cpp | ||
|
||
HEADERS += \ | ||
src/indicator/trayindicator_global.h \ | ||
src/indicator/trayindicator.h \ | ||
src/indicator/unityindicator.h | ||
|
||
actions64.path = $$DATADIR/icons/hicolor/64x64/actions | ||
actions64.files += resources/images/qcma_on.png | ||
actions64.files += resources/images/qcma_off.png | ||
|
||
target.path = /usr/lib/qcma | ||
INSTALLS += target actions64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
QT += gui widgets | ||
|
||
TARGET = qcma_kdenotifier | ||
TEMPLATE = lib | ||
CONFIG += plugin | ||
DEFINES += QCMA_TRAYINDICATOR_LIBRARY | ||
LIBS += -lkdeui | ||
INCLUDEPATH += src/ | ||
|
||
SOURCES += \ | ||
src/indicator/kdenotifier.cpp \ | ||
src/indicator/kdenotifiertray.cpp | ||
|
||
HEADERS += \ | ||
src/indicator/trayindicator.h \ | ||
src/indicator/kdenotifier.h \ | ||
src/indicator/kdenotifiertray.h | ||
|
||
target.path = /usr/lib/qcma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* 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 "kdenotifiertray.h" | ||
#include <kmenu.h> | ||
|
||
KDENotifierTray::KDENotifierTray(QWidget *parent) | ||
: TrayIndicator(parent) | ||
{ | ||
} | ||
|
||
void KDENotifierTray::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())); | ||
|
||
KMenu *tray_icon_menu = new KMenu(this); | ||
|
||
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); | ||
|
||
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); | ||
} | ||
|
||
void KDENotifierTray::showMessage(const QString &title, const QString &message) | ||
{ | ||
m_notifier_item->showMessage(title, message, "dialog-information", 3000); | ||
} | ||
|
||
bool KDENotifierTray::isVisible() | ||
{ | ||
return true; | ||
} | ||
|
||
void KDENotifierTray::setIcon(const QString &icon) | ||
{ | ||
m_notifier_item->setIconByPixmap(QIcon(":/main/resources/images/tray/" + icon)); | ||
} | ||
|
||
void KDENotifierTray::show() | ||
{ | ||
} | ||
|
||
void KDENotifierTray::hide() | ||
{ | ||
} | ||
|
||
// exported library function | ||
TrayIndicator *createTrayIndicator(QWidget *parent) | ||
{ | ||
return new KDENotifierTray(parent); | ||
} |
Oops, something went wrong.