Reorganized project to avoid the ".pro not found" by having all the

pro files in the same directory. With this change the android library
now builds properly.

This also fixes the parallel compilation problem that happened when
building using +8 cores.
This commit is contained in:
codestation
2015-03-21 14:48:25 -04:30
parent c223016725
commit 9f790dc788
106 changed files with 13921 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
/*
* 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 "kdenotifier.h"
KDENotifier::KDENotifier(const QString &notifier_id, QObject *obj_parent) :
KStatusNotifierItem(notifier_id, obj_parent)
{
}

43
kdenotifier/kdenotifier.h Normal file
View File

@@ -0,0 +1,43 @@
/*
* 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 KDENOTIFIER_H
#define KDENOTIFIER_H
#include <kstatusnotifieritem.h>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#include <kmenu.h>
#endif
class KDENotifier : public KStatusNotifierItem
{
Q_OBJECT
public:
explicit KDENotifier(const QString &id, QObject *parent = 0);
signals:
public slots:
// block left click because it shows the default widget
virtual void activate (const QPoint &pos=QPoint()) {
Q_UNUSED(pos);
}
};
#endif // KDENOTIFIER_H

View File

@@ -0,0 +1,31 @@
include(../config.pri)
include(../gui/defines.pri)
TARGET = qcma_kdenotifier
TEMPLATE = lib
CONFIG += plugin
QT += gui widgets
DEFINES += QCMA_TRAYINDICATOR_LIBRARY
PKGCONFIG =
greaterThan(QT_MAJOR_VERSION, 4): ENABLE_KNOTIFICATIONS {
message("Enabling KDE5 notifications")
QT += KNotifications
DEFINES += ENABLE_KNOTIFICATIONS=1
} else {
QT += widgets
LIBS += -lkdeui
}
SOURCES += \
kdenotifier.cpp \
kdenotifiertray.cpp
HEADERS += \
trayindicator.h \
kdenotifier.h \
kdenotifiertray.h
target.path = /usr/lib/qcma
INSTALLS += target

View File

@@ -0,0 +1,102 @@
/*
* 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"
#ifndef ENABLE_KNOTIFICATIONS
#include <kmenu.h>
#else
#include <QMenu>
#endif
KDENotifierTray::KDENotifierTray(QWidget *obj_parent)
: TrayIndicator(obj_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()));
#ifndef ENABLE_KNOTIFICATIONS
KMenu *tray_icon_menu = new KMenu(this);
#else
QMenu *tray_icon_menu = new QMenu(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);
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/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/" + icon));
}
void KDENotifierTray::show()
{
}
void KDENotifierTray::hide()
{
}
// exported library function
TrayIndicator *createTrayIndicator(QWidget *parent)
{
return new KDENotifierTray(parent);
}

View File

@@ -0,0 +1,56 @@
/*
* 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 KDENOTIFIERTRAY_H
#define KDENOTIFIERTRAY_H
#include "trayindicator.h"
#include "kdenotifier.h"
class QAction;
class QSystemTrayIcon;
class KDENotifierTray : public TrayIndicator
{
Q_OBJECT
public:
explicit KDENotifierTray(QWidget *parent = 0);
void init();
void setIcon(const QString &icon);
bool isVisible();
void show();
void hide();
void showMessage(const QString &title, const QString &message);
private:
//system tray
QAction *quit;
QAction *reload;
QAction *options;
QAction *backup;
QAction *about;
QAction *about_qt;
KDENotifier *m_notifier_item;
public slots:
};
#endif // KDENOTIFIERTRAY_H

1
kdenotifier/trayindicator.h Symbolic link
View File

@@ -0,0 +1 @@
../gui/trayindicator.h