Add version so this project is easier to track
This commit is contained in:
2
main.cpp
2
main.cpp
@@ -69,6 +69,8 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug("Starting QCMA %s", QCMA_VER);
|
||||||
|
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
QString locale = QLocale().system().name();
|
QString locale = QLocale().system().name();
|
||||||
qDebug("Current locale: %s", locale.toUtf8().data());
|
qDebug("Current locale: %s", locale.toUtf8().data());
|
||||||
|
@@ -26,10 +26,13 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QGridLayout>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QSpacerItem>
|
||||||
|
|
||||||
const QStringList MainWidget::path_list = QStringList() << "photoPath" << "musicPath" << "videoPath" << "appsPath" << "urlPath";
|
const QStringList MainWidget::path_list = QStringList() << "photoPath" << "musicPath" << "videoPath" << "appsPath" << "urlPath";
|
||||||
|
|
||||||
@@ -108,16 +111,45 @@ void MainWidget::openManager()
|
|||||||
form.show();
|
form.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWidget::showAboutDialog()
|
||||||
|
{
|
||||||
|
QMessageBox about;
|
||||||
|
|
||||||
|
about.setText(QString("QCMA ") + QCMA_VER);
|
||||||
|
about.setWindowTitle(tr("About QCMA"));
|
||||||
|
about.setInformativeText(tr("Copyright (C) 2013 Codestation\n"));
|
||||||
|
about.setStandardButtons(QMessageBox::Ok);
|
||||||
|
about.setIconPixmap(QPixmap(":/main/resources/qcma.png"));
|
||||||
|
about.setDefaultButton(QMessageBox::Ok);
|
||||||
|
|
||||||
|
// hack to expand the messagebox minimum size
|
||||||
|
QSpacerItem* horizontalSpacer = new QSpacerItem(300, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
QGridLayout* layout = (QGridLayout*)about.layout();
|
||||||
|
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
|
||||||
|
|
||||||
|
about.show();
|
||||||
|
about.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWidget::showAboutQt()
|
||||||
|
{
|
||||||
|
QMessageBox::aboutQt(this);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWidget::createTrayIcon()
|
void MainWidget::createTrayIcon()
|
||||||
{
|
{
|
||||||
options = new QAction(tr("&Settings"), this);
|
options = new QAction(tr("&Settings"), this);
|
||||||
reload = new QAction(tr("&Refresh database"), this);
|
reload = new QAction(tr("&Refresh database"), this);
|
||||||
backup = new QAction(tr("Backup Manager"), this);
|
backup = new QAction(tr("&Backup Manager"), this);
|
||||||
|
about = new QAction(tr("&About"), this);
|
||||||
|
about_qt = new QAction(tr("Abou&t Qt"), this);
|
||||||
quit = new QAction(tr("&Quit"), this);
|
quit = new QAction(tr("&Quit"), this);
|
||||||
|
|
||||||
connect(options, SIGNAL(triggered()), &dialog, SLOT(open()));
|
connect(options, SIGNAL(triggered()), &dialog, SLOT(open()));
|
||||||
connect(backup, SIGNAL(triggered()), this, SLOT(openManager()));
|
connect(backup, SIGNAL(triggered()), this, SLOT(openManager()));
|
||||||
connect(reload, SIGNAL(triggered()), &manager, SLOT(refreshDatabase()));
|
connect(reload, SIGNAL(triggered()), &manager, SLOT(refreshDatabase()));
|
||||||
|
connect(about, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
|
||||||
|
connect(about_qt, SIGNAL(triggered()), this, SLOT(showAboutQt()));
|
||||||
connect(quit, SIGNAL(triggered()), this, SLOT(stopServer()));
|
connect(quit, SIGNAL(triggered()), this, SLOT(stopServer()));
|
||||||
|
|
||||||
QMenu *trayIconMenu = new QMenu(this);
|
QMenu *trayIconMenu = new QMenu(this);
|
||||||
@@ -125,6 +157,8 @@ void MainWidget::createTrayIcon()
|
|||||||
trayIconMenu->addAction(reload);
|
trayIconMenu->addAction(reload);
|
||||||
trayIconMenu->addAction(backup);
|
trayIconMenu->addAction(backup);
|
||||||
trayIconMenu->addSeparator();
|
trayIconMenu->addSeparator();
|
||||||
|
trayIconMenu->addAction(about);
|
||||||
|
trayIconMenu->addAction(about_qt);
|
||||||
trayIconMenu->addAction(quit);
|
trayIconMenu->addAction(quit);
|
||||||
|
|
||||||
trayIcon = new QSystemTrayIcon(this);
|
trayIcon = new QSystemTrayIcon(this);
|
||||||
|
@@ -58,6 +58,8 @@ private:
|
|||||||
QAction *reload;
|
QAction *reload;
|
||||||
QAction *options;
|
QAction *options;
|
||||||
QAction *backup;
|
QAction *backup;
|
||||||
|
QAction *about;
|
||||||
|
QAction *about_qt;
|
||||||
QSystemTrayIcon *trayIcon;
|
QSystemTrayIcon *trayIcon;
|
||||||
|
|
||||||
const static QStringList path_list;
|
const static QStringList path_list;
|
||||||
@@ -65,6 +67,8 @@ private:
|
|||||||
private slots:
|
private slots:
|
||||||
void stopServer();
|
void stopServer();
|
||||||
void openManager();
|
void openManager();
|
||||||
|
void showAboutQt();
|
||||||
|
void showAboutDialog();
|
||||||
void deviceDisconnect();
|
void deviceDisconnect();
|
||||||
void dialogResult(int result);
|
void dialogResult(int result);
|
||||||
void receiveMessage(QString message);
|
void receiveMessage(QString message);
|
||||||
|
4
qcma.pro
4
qcma.pro
@@ -81,6 +81,10 @@ FORMS += \
|
|||||||
TRANSLATIONS += resources/translations/qcma.es.ts \
|
TRANSLATIONS += resources/translations/qcma.es.ts \
|
||||||
resources/translations/qcma.ja.ts
|
resources/translations/qcma.ja.ts
|
||||||
|
|
||||||
|
VERSION = \\\"'0.2.2'\\\"
|
||||||
|
|
||||||
|
DEFINES += "QCMA_VER=$${VERSION}"
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
isEmpty(PREFIX) {
|
isEmpty(PREFIX) {
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@@ -5,5 +5,6 @@
|
|||||||
<file>resources/translations/qcma.es.qm</file>
|
<file>resources/translations/qcma.es.qm</file>
|
||||||
<file>resources/translations/qcma.ja.qm</file>
|
<file>resources/translations/qcma.ja.qm</file>
|
||||||
<file>resources/psv_icon_16.png</file>
|
<file>resources/psv_icon_16.png</file>
|
||||||
|
<file>resources/qcma.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -99,17 +99,22 @@
|
|||||||
<translation type="obsolete">Agregadas %1 entradas a la base de datos</translation>
|
<translation type="obsolete">Agregadas %1 entradas a la base de datos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../clientmanager.cpp" line="33"/>
|
<location filename="../../clientmanager.cpp" line="41"/>
|
||||||
<source>Added %1 items to the database</source>
|
<source>Added %1 items to the database</source>
|
||||||
<translation>Agregadas %1 entradas a la base de datos</translation>
|
<translation>Agregadas %1 entradas a la base de datos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../clientmanager.cpp" line="35"/>
|
<location filename="../../clientmanager.cpp" line="43"/>
|
||||||
<source>Database indexing aborted by user</source>
|
<source>Database indexing aborted by user</source>
|
||||||
<translation>Actualización de la base de datos cancelada por el usuario</translation>
|
<translation>Actualización de la base de datos cancelada por el usuario</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../clientmanager.cpp" line="97"/>
|
<location filename="../../clientmanager.cpp" line="57"/>
|
||||||
|
<source>Cannot initialize VitaMTP library</source>
|
||||||
|
<translation>No se pudo inicializar VitaMTP</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../clientmanager.cpp" line="111"/>
|
||||||
<source>Cannot refresh the database while is in use</source>
|
<source>Cannot refresh the database while is in use</source>
|
||||||
<translation>No se puede actualizar la base de datos mientras se encuentre en uso</translation>
|
<translation>No se puede actualizar la base de datos mientras se encuentre en uso</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -117,7 +122,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>CmaClient</name>
|
<name>CmaClient</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../cmaclient.cpp" line="118"/>
|
<location filename="../../cmaclient.cpp" line="121"/>
|
||||||
<source>Connected to </source>
|
<source>Connected to </source>
|
||||||
<translation>Conectado a </translation>
|
<translation>Conectado a </translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -261,51 +266,76 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWidget</name>
|
<name>MainWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="70"/>
|
<location filename="../../mainwidget.cpp" line="73"/>
|
||||||
<source>Shutting down...</source>
|
<source>Shutting down...</source>
|
||||||
<translation>Cerrando...</translation>
|
<translation>Cerrando...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="71"/>
|
<location filename="../../mainwidget.cpp" line="74"/>
|
||||||
<source>Stopping QCMA...</source>
|
<source>Stopping QCMA...</source>
|
||||||
<translation>Deteniendo QCMA...</translation>
|
<translation>Deteniendo QCMA...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="77"/>
|
<location filename="../../mainwidget.cpp" line="80"/>
|
||||||
<source>Disconnected</source>
|
<source>Disconnected</source>
|
||||||
<translation>Desconectado</translation>
|
<translation>Desconectado</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="78"/>
|
<location filename="../../mainwidget.cpp" line="81"/>
|
||||||
<source>The device has been disconnected</source>
|
<source>The device has been disconnected</source>
|
||||||
<translation>El dispositivo se ha desconectado</translation>
|
<translation>El dispositivo se ha desconectado</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="119"/>
|
||||||
|
<source>About QCMA</source>
|
||||||
|
<translation>Acerca de QCMA</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="120"/>
|
||||||
|
<source>Copyright (C) 2013 Codestation
|
||||||
|
</source>
|
||||||
|
<translation>Copyright (C) 2013 Codestation\n</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="143"/>
|
||||||
|
<source>&Backup Manager</source>
|
||||||
|
<translation>&Gestor de Respaldos</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="144"/>
|
||||||
|
<source>&About</source>
|
||||||
|
<translation>&Acerca de</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="145"/>
|
||||||
|
<source>Abou&t Qt</source>
|
||||||
|
<translation>A&cerca de Qt</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Received PIN: %1</source>
|
<source>Received PIN: %1</source>
|
||||||
<translation type="obsolete">PIN recibido: %1</translation>
|
<translation type="obsolete">PIN recibido: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="113"/>
|
<location filename="../../mainwidget.cpp" line="141"/>
|
||||||
<source>&Settings</source>
|
<source>&Settings</source>
|
||||||
<translation>&Ajustes</translation>
|
<translation>&Ajustes</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="114"/>
|
<location filename="../../mainwidget.cpp" line="142"/>
|
||||||
<source>&Refresh database</source>
|
<source>&Refresh database</source>
|
||||||
<translation>&Refrescar base de datos</translation>
|
<translation>&Refrescar base de datos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="115"/>
|
|
||||||
<source>Backup Manager</source>
|
<source>Backup Manager</source>
|
||||||
<translation>Gestor de Respaldos</translation>
|
<translation type="obsolete">Gestor de Respaldos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="116"/>
|
<location filename="../../mainwidget.cpp" line="146"/>
|
||||||
<source>&Quit</source>
|
<source>&Quit</source>
|
||||||
<translation>&Salir</translation>
|
<translation>&Salir</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="141"/>
|
<location filename="../../mainwidget.cpp" line="179"/>
|
||||||
<source>Information</source>
|
<source>Information</source>
|
||||||
<translation>Información</translation>
|
<translation>Información</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@@ -99,17 +99,22 @@
|
|||||||
<translation type="obsolete">%1個の項目をデータベースに追加しました</translation>
|
<translation type="obsolete">%1個の項目をデータベースに追加しました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../clientmanager.cpp" line="33"/>
|
<location filename="../../clientmanager.cpp" line="41"/>
|
||||||
<source>Added %1 items to the database</source>
|
<source>Added %1 items to the database</source>
|
||||||
<translation>%1個の項目をデータベースに追加しました</translation>
|
<translation>%1個の項目をデータベースに追加しました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../clientmanager.cpp" line="35"/>
|
<location filename="../../clientmanager.cpp" line="43"/>
|
||||||
<source>Database indexing aborted by user</source>
|
<source>Database indexing aborted by user</source>
|
||||||
<translation>データベース構築がユーザーにより中止されました</translation>
|
<translation>データベース構築がユーザーにより中止されました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../clientmanager.cpp" line="97"/>
|
<location filename="../../clientmanager.cpp" line="57"/>
|
||||||
|
<source>Cannot initialize VitaMTP library</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../clientmanager.cpp" line="111"/>
|
||||||
<source>Cannot refresh the database while is in use</source>
|
<source>Cannot refresh the database while is in use</source>
|
||||||
<translation>使用中にはデータベースを更新できません</translation>
|
<translation>使用中にはデータベースを更新できません</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -117,7 +122,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>CmaClient</name>
|
<name>CmaClient</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../cmaclient.cpp" line="118"/>
|
<location filename="../../cmaclient.cpp" line="121"/>
|
||||||
<source>Connected to </source>
|
<source>Connected to </source>
|
||||||
<translation>次のデバイスに接続しました </translation>
|
<translation>次のデバイスに接続しました </translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -262,51 +267,76 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWidget</name>
|
<name>MainWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="70"/>
|
<location filename="../../mainwidget.cpp" line="73"/>
|
||||||
<source>Shutting down...</source>
|
<source>Shutting down...</source>
|
||||||
<translation>終了しています...</translation>
|
<translation>終了しています...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="71"/>
|
<location filename="../../mainwidget.cpp" line="74"/>
|
||||||
<source>Stopping QCMA...</source>
|
<source>Stopping QCMA...</source>
|
||||||
<translation>QCMAを停止しています...</translation>
|
<translation>QCMAを停止しています...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="77"/>
|
<location filename="../../mainwidget.cpp" line="80"/>
|
||||||
<source>Disconnected</source>
|
<source>Disconnected</source>
|
||||||
<translation>切断されました</translation>
|
<translation>切断されました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="78"/>
|
<location filename="../../mainwidget.cpp" line="81"/>
|
||||||
<source>The device has been disconnected</source>
|
<source>The device has been disconnected</source>
|
||||||
<translation>デバイスが切断されました</translation>
|
<translation>デバイスが切断されました</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="119"/>
|
||||||
|
<source>About QCMA</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="120"/>
|
||||||
|
<source>Copyright (C) 2013 Codestation
|
||||||
|
</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="143"/>
|
||||||
|
<source>&Backup Manager</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="144"/>
|
||||||
|
<source>&About</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../mainwidget.cpp" line="145"/>
|
||||||
|
<source>Abou&t Qt</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Received PIN: %1</source>
|
<source>Received PIN: %1</source>
|
||||||
<translation type="obsolete">受信したPIN: %1</translation>
|
<translation type="obsolete">受信したPIN: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="113"/>
|
<location filename="../../mainwidget.cpp" line="141"/>
|
||||||
<source>&Settings</source>
|
<source>&Settings</source>
|
||||||
<translation>&設定</translation>
|
<translation>&設定</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="114"/>
|
<location filename="../../mainwidget.cpp" line="142"/>
|
||||||
<source>&Refresh database</source>
|
<source>&Refresh database</source>
|
||||||
<translation>&データベースを更新する</translation>
|
<translation>&データベースを更新する</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="115"/>
|
|
||||||
<source>Backup Manager</source>
|
<source>Backup Manager</source>
|
||||||
<translation>バックアップマネージャー</translation>
|
<translation type="obsolete">バックアップマネージャー</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="116"/>
|
<location filename="../../mainwidget.cpp" line="146"/>
|
||||||
<source>&Quit</source>
|
<source>&Quit</source>
|
||||||
<translation>&終了</translation>
|
<translation>&終了</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../mainwidget.cpp" line="141"/>
|
<location filename="../../mainwidget.cpp" line="179"/>
|
||||||
<source>Information</source>
|
<source>Information</source>
|
||||||
<translation>情報</translation>
|
<translation>情報</translation>
|
||||||
</message>
|
</message>
|
||||||
|
Reference in New Issue
Block a user