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
|
||||
}
|
||||
|
||||
qDebug("Starting QCMA %s", QCMA_VER);
|
||||
|
||||
QTranslator translator;
|
||||
QString locale = QLocale().system().name();
|
||||
qDebug("Current locale: %s", locale.toUtf8().data());
|
||||
|
@@ -26,10 +26,13 @@
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QGridLayout>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <QTimer>
|
||||
#include <QSettings>
|
||||
#include <QSpacerItem>
|
||||
|
||||
const QStringList MainWidget::path_list = QStringList() << "photoPath" << "musicPath" << "videoPath" << "appsPath" << "urlPath";
|
||||
|
||||
@@ -108,16 +111,45 @@ void MainWidget::openManager()
|
||||
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()
|
||||
{
|
||||
options = new QAction(tr("&Settings"), 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);
|
||||
|
||||
connect(options, SIGNAL(triggered()), &dialog, SLOT(open()));
|
||||
connect(backup, SIGNAL(triggered()), this, SLOT(openManager()));
|
||||
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()));
|
||||
|
||||
QMenu *trayIconMenu = new QMenu(this);
|
||||
@@ -125,6 +157,8 @@ void MainWidget::createTrayIcon()
|
||||
trayIconMenu->addAction(reload);
|
||||
trayIconMenu->addAction(backup);
|
||||
trayIconMenu->addSeparator();
|
||||
trayIconMenu->addAction(about);
|
||||
trayIconMenu->addAction(about_qt);
|
||||
trayIconMenu->addAction(quit);
|
||||
|
||||
trayIcon = new QSystemTrayIcon(this);
|
||||
|
@@ -58,6 +58,8 @@ private:
|
||||
QAction *reload;
|
||||
QAction *options;
|
||||
QAction *backup;
|
||||
QAction *about;
|
||||
QAction *about_qt;
|
||||
QSystemTrayIcon *trayIcon;
|
||||
|
||||
const static QStringList path_list;
|
||||
@@ -65,6 +67,8 @@ private:
|
||||
private slots:
|
||||
void stopServer();
|
||||
void openManager();
|
||||
void showAboutQt();
|
||||
void showAboutDialog();
|
||||
void deviceDisconnect();
|
||||
void dialogResult(int result);
|
||||
void receiveMessage(QString message);
|
||||
|
4
qcma.pro
4
qcma.pro
@@ -81,6 +81,10 @@ FORMS += \
|
||||
TRANSLATIONS += resources/translations/qcma.es.ts \
|
||||
resources/translations/qcma.ja.ts
|
||||
|
||||
VERSION = \\\"'0.2.2'\\\"
|
||||
|
||||
DEFINES += "QCMA_VER=$${VERSION}"
|
||||
|
||||
unix {
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr/local
|
||||
|
@@ -5,5 +5,6 @@
|
||||
<file>resources/translations/qcma.es.qm</file>
|
||||
<file>resources/translations/qcma.ja.qm</file>
|
||||
<file>resources/psv_icon_16.png</file>
|
||||
<file>resources/qcma.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -99,17 +99,22 @@
|
||||
<translation type="obsolete">Agregadas %1 entradas a la base de datos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../clientmanager.cpp" line="33"/>
|
||||
<location filename="../../clientmanager.cpp" line="41"/>
|
||||
<source>Added %1 items to the database</source>
|
||||
<translation>Agregadas %1 entradas a la base de datos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../clientmanager.cpp" line="35"/>
|
||||
<location filename="../../clientmanager.cpp" line="43"/>
|
||||
<source>Database indexing aborted by user</source>
|
||||
<translation>Actualización de la base de datos cancelada por el usuario</translation>
|
||||
</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>
|
||||
<translation>No se puede actualizar la base de datos mientras se encuentre en uso</translation>
|
||||
</message>
|
||||
@@ -117,7 +122,7 @@
|
||||
<context>
|
||||
<name>CmaClient</name>
|
||||
<message>
|
||||
<location filename="../../cmaclient.cpp" line="118"/>
|
||||
<location filename="../../cmaclient.cpp" line="121"/>
|
||||
<source>Connected to </source>
|
||||
<translation>Conectado a </translation>
|
||||
</message>
|
||||
@@ -261,51 +266,76 @@
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="70"/>
|
||||
<location filename="../../mainwidget.cpp" line="73"/>
|
||||
<source>Shutting down...</source>
|
||||
<translation>Cerrando...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="71"/>
|
||||
<location filename="../../mainwidget.cpp" line="74"/>
|
||||
<source>Stopping QCMA...</source>
|
||||
<translation>Deteniendo QCMA...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="77"/>
|
||||
<location filename="../../mainwidget.cpp" line="80"/>
|
||||
<source>Disconnected</source>
|
||||
<translation>Desconectado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="78"/>
|
||||
<location filename="../../mainwidget.cpp" line="81"/>
|
||||
<source>The device has been disconnected</source>
|
||||
<translation>El dispositivo se ha desconectado</translation>
|
||||
</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>
|
||||
<source>Received PIN: %1</source>
|
||||
<translation type="obsolete">PIN recibido: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="113"/>
|
||||
<location filename="../../mainwidget.cpp" line="141"/>
|
||||
<source>&Settings</source>
|
||||
<translation>&Ajustes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="114"/>
|
||||
<location filename="../../mainwidget.cpp" line="142"/>
|
||||
<source>&Refresh database</source>
|
||||
<translation>&Refrescar base de datos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="115"/>
|
||||
<source>Backup Manager</source>
|
||||
<translation>Gestor de Respaldos</translation>
|
||||
<translation type="obsolete">Gestor de Respaldos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="116"/>
|
||||
<location filename="../../mainwidget.cpp" line="146"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&Salir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="141"/>
|
||||
<location filename="../../mainwidget.cpp" line="179"/>
|
||||
<source>Information</source>
|
||||
<translation>Información</translation>
|
||||
</message>
|
||||
|
@@ -99,17 +99,22 @@
|
||||
<translation type="obsolete">%1個の項目をデータベースに追加しました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../clientmanager.cpp" line="33"/>
|
||||
<location filename="../../clientmanager.cpp" line="41"/>
|
||||
<source>Added %1 items to the database</source>
|
||||
<translation>%1個の項目をデータベースに追加しました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../clientmanager.cpp" line="35"/>
|
||||
<location filename="../../clientmanager.cpp" line="43"/>
|
||||
<source>Database indexing aborted by user</source>
|
||||
<translation>データベース構築がユーザーにより中止されました</translation>
|
||||
</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>
|
||||
<translation>使用中にはデータベースを更新できません</translation>
|
||||
</message>
|
||||
@@ -117,7 +122,7 @@
|
||||
<context>
|
||||
<name>CmaClient</name>
|
||||
<message>
|
||||
<location filename="../../cmaclient.cpp" line="118"/>
|
||||
<location filename="../../cmaclient.cpp" line="121"/>
|
||||
<source>Connected to </source>
|
||||
<translation>次のデバイスに接続しました </translation>
|
||||
</message>
|
||||
@@ -262,51 +267,76 @@
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="70"/>
|
||||
<location filename="../../mainwidget.cpp" line="73"/>
|
||||
<source>Shutting down...</source>
|
||||
<translation>終了しています...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="71"/>
|
||||
<location filename="../../mainwidget.cpp" line="74"/>
|
||||
<source>Stopping QCMA...</source>
|
||||
<translation>QCMAを停止しています...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="77"/>
|
||||
<location filename="../../mainwidget.cpp" line="80"/>
|
||||
<source>Disconnected</source>
|
||||
<translation>切断されました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="78"/>
|
||||
<location filename="../../mainwidget.cpp" line="81"/>
|
||||
<source>The device has been disconnected</source>
|
||||
<translation>デバイスが切断されました</translation>
|
||||
</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>
|
||||
<source>Received PIN: %1</source>
|
||||
<translation type="obsolete">受信したPIN: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="113"/>
|
||||
<location filename="../../mainwidget.cpp" line="141"/>
|
||||
<source>&Settings</source>
|
||||
<translation>&設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="114"/>
|
||||
<location filename="../../mainwidget.cpp" line="142"/>
|
||||
<source>&Refresh database</source>
|
||||
<translation>&データベースを更新する</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="115"/>
|
||||
<source>Backup Manager</source>
|
||||
<translation>バックアップマネージャー</translation>
|
||||
<translation type="obsolete">バックアップマネージャー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="116"/>
|
||||
<location filename="../../mainwidget.cpp" line="146"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&終了</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../mainwidget.cpp" line="141"/>
|
||||
<location filename="../../mainwidget.cpp" line="179"/>
|
||||
<source>Information</source>
|
||||
<translation>情報</translation>
|
||||
</message>
|
||||
|
Reference in New Issue
Block a user