From 8c083ea0a407ba6392e6098f83236eba858521a3 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Thu, 28 Nov 2013 05:11:01 +0100 Subject: [PATCH 1/6] Added some help messages to the Settings window; --set-locale switch --- .gitignore | 2 + configwidget.ui | 30 ++++++++++++++ main.cpp | 7 ++++ resources/translations/qcma.es.ts | 66 ++++++++++++++++++++++--------- resources/translations/qcma.ja.ts | 66 ++++++++++++++++++++++--------- 5 files changed, 135 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index d3fec56..ed6769f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ qcma.pro.user* +*.qm +.directory \ No newline at end of file diff --git a/configwidget.ui b/configwidget.ui index 14f524d..8cc29a7 100644 --- a/configwidget.ui +++ b/configwidget.ui @@ -42,6 +42,9 @@ + + This is the location your Screenshots and Pictures are Saved to/Imported from. + Photo Folder @@ -51,6 +54,9 @@ + + This is the location your Screenshots and Pictures are Saved to/Imported from. + true @@ -71,6 +77,9 @@ + + This is the location your Videos are Saved to/Imported from. + Video Folder @@ -80,6 +89,9 @@ + + This is the location your Videos are Saved to/Imported from. + true @@ -100,6 +112,9 @@ + + This is the location your Music is Saved to/Imported from. + Music Folder @@ -109,6 +124,9 @@ + + This is the location your Music is Saved to/Imported from. + true @@ -129,6 +147,9 @@ + + This is the location your Games, Apps, Savegames, and System Backups are Saved to/Imported from. + Applications / Backups @@ -138,6 +159,9 @@ + + This is the location your Games, Apps, Savegames, and System Backups are Saved to/Imported from. + true @@ -158,6 +182,9 @@ + + This is the location your Software Updates and Browser Data is Saved to/Imported from. + Updates / Web content @@ -167,6 +194,9 @@ + + This is the location your Software Updates and Browser Data is Saved to/Imported from. + true diff --git a/main.cpp b/main.cpp index 7a26f62..23a857a 100644 --- a/main.cpp +++ b/main.cpp @@ -74,6 +74,13 @@ int main(int argc, char *argv[]) QTranslator translator; QString locale = QLocale().system().name(); qDebug("Current locale: %s", locale.toUtf8().data()); + if(app.arguments().contains("--set-locale")) { + int index = app.arguments().indexOf("--set-locale"); + if(index+1 < app.arguments().length()) { + qDebug("Enforcing locale: %s", app.arguments().at(index+1).toUtf8().data()); + locale = app.arguments().at(index+1); + } + } if(translator.load("qcma." + locale, ":/main/resources/translations")) { app.installTranslator(&translator); } diff --git a/resources/translations/qcma.es.ts b/resources/translations/qcma.es.ts index a8f0a86..5bf5a76 100644 --- a/resources/translations/qcma.es.ts +++ b/resources/translations/qcma.es.ts @@ -146,80 +146,110 @@ + + This is the location your Screenshots and Pictures are Saved to/Imported from. + + + + Photo Folder Directorio de Fotos - - - - - + + + + + Browse... Buscar... - + + + This is the location your Videos are Saved to/Imported from. + + + + Video Folder Directorio de Videos - + + + This is the location your Music is Saved to/Imported from. + + + + Music Folder Directorio de Música - + + + This is the location your Games, Apps, Savegames, and System Backups are Saved to/Imported from. + + + + Applications / Backups Aplicaciones / Juegos / Respaldos - + + + This is the location your Software Updates and Browser Data is Saved to/Imported from. + + + + Updates / Web content Actualizaciones / Contenido Web - + Other Otros - + <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Advanced settings</span></p></body></html> - + Offline Mode - + Skip metadata extraction - + Update database automatically when files on the PC are changed - + Disable USB monitoring - + Disable Wi-Fi monitoring - + Database backend - + In Memory diff --git a/resources/translations/qcma.ja.ts b/resources/translations/qcma.ja.ts index 0d70d37..c17daf9 100644 --- a/resources/translations/qcma.ja.ts +++ b/resources/translations/qcma.ja.ts @@ -146,80 +146,110 @@ + + This is the location your Screenshots and Pictures are Saved to/Imported from. + + + + Photo Folder フォト - - - - - + + + + + Browse... 参照... - + + + This is the location your Videos are Saved to/Imported from. + + + + Video Folder ビデオ - + + + This is the location your Music is Saved to/Imported from. + + + + Music Folder ミュージック - + + + This is the location your Games, Apps, Savegames, and System Backups are Saved to/Imported from. + + + + Applications / Backups アプリケーション/バックアップファイル - + + + This is the location your Software Updates and Browser Data is Saved to/Imported from. + + + + Updates / Web content アップデート/Webコンテンツ - + Other その他 - + <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Advanced settings</span></p></body></html> <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">詳細設定</span></p></body></html> - + Offline Mode オフラインモード - + Skip metadata extraction メタデータの展開をスキップする - + Update database automatically when files on the PC are changed PCのファイルが変更された際にデータベースを自動的に更新する - + Disable USB monitoring USBの監視を無効にする - + Disable Wi-Fi monitoring Wi-Fiの監視を無効にする - + Database backend データベース保存 - + In Memory メモリ内 From 698f12e2d7b2fe182483fcd498bcc34b2914e4a8 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Thu, 28 Nov 2013 07:07:57 +0100 Subject: [PATCH 2/6] Merged feature-filter into master --- backupmanagerform.cpp | 19 ++++++++ backupmanagerform.h | 2 + backupmanagerform.ui | 30 +++++++++++++ filterlineedit.cpp | 53 +++++++++++++++++++++++ filterlineedit.h | 31 +++++++++++++ qcma.pro | 6 ++- qcmares.qrc | 1 + resources/edit-clear-locationbar-rtl.png | Bin 0 -> 859 bytes resources/translations/qcma.es.ts | 23 ++++++++-- resources/translations/qcma.ja.ts | 23 ++++++++-- 10 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 filterlineedit.cpp create mode 100644 filterlineedit.h create mode 100644 resources/edit-clear-locationbar-rtl.png diff --git a/backupmanagerform.cpp b/backupmanagerform.cpp index 428ba35..d50f9c5 100644 --- a/backupmanagerform.cpp +++ b/backupmanagerform.cpp @@ -23,6 +23,7 @@ #include "sforeader.h" #include "confirmdialog.h" #include "utils.h" +#include "filterlineedit.h" #include #include @@ -199,4 +200,22 @@ void BackupManagerForm::loadBackupListing(int index) vert_header->setUpdatesEnabled(true); db->mutex.unlock(); + + // apply filter + this->on_filterLineEdit_textChanged(ui->filterLineEdit->text()); +} + +void BackupManagerForm::on_filterLineEdit_textChanged(const QString &arg1) +{ + if(arg1 != tr("Filter")) { + for(int i = 0; i < ui->tableWidget->rowCount(); ++i) { + BackupItem *item = (BackupItem*) ui->tableWidget->cellWidget(i, 0); + + if(item->title.contains(arg1, Qt::CaseInsensitive)) { + ui->tableWidget->setRowHidden(i, false); + } else { + ui->tableWidget->setRowHidden(i, true); + } + } + } } diff --git a/backupmanagerform.h b/backupmanagerform.h index d892eae..e09fef7 100644 --- a/backupmanagerform.h +++ b/backupmanagerform.h @@ -48,6 +48,8 @@ private: public slots: void loadBackupListing(int index); void removeEntry(BackupItem *item); +private slots: + void on_filterLineEdit_textChanged(const QString &arg1); }; #endif // BACKUPMANAGERFORM_H diff --git a/backupmanagerform.ui b/backupmanagerform.ui index ad69167..24555ba 100644 --- a/backupmanagerform.ui +++ b/backupmanagerform.ui @@ -100,10 +100,40 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + color:gray;font-style:italic + + + Filter + + + + + + FilterLineEdit + QLineEdit +
filterlineedit.h
+
+
diff --git a/filterlineedit.cpp b/filterlineedit.cpp new file mode 100644 index 0000000..23ef75d --- /dev/null +++ b/filterlineedit.cpp @@ -0,0 +1,53 @@ +#include "filterlineedit.h" + +#include +#include + +FilterLineEdit::FilterLineEdit(QWidget *parent) : + QLineEdit(parent) +{ + clearButton = new QToolButton(this); + QIcon clearIcon(":/main/resources/edit-clear-locationbar-rtl.png"); + clearButton->setIcon(clearIcon); + clearButton->setCursor(Qt::ArrowCursor); + clearButton->setStyleSheet("border:none;padding:0px"); + clearButton->hide(); + connect(clearButton, SIGNAL(clicked()), this, SLOT(clear())); + connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateCloseButton(const QString&))); +} + +void FilterLineEdit::updateCloseButton(const QString& text) +{ + if(text.isEmpty() || text == tr("Filter")) + clearButton->setVisible(false); + else + clearButton->setVisible(true); +} + +void FilterLineEdit::focusInEvent(QFocusEvent *e) +{ + if(this->styleSheet() == "color:gray;font-style:italic") + this->clear(); + + this->setStyleSheet(QString("color:black;font-style:normal;padding-right:%1").arg(clearButton->sizeHint().width())); + + QLineEdit::focusInEvent(e); +} + +void FilterLineEdit::focusOutEvent(QFocusEvent *e) +{ + if(this->text().isEmpty()) { + this->setText(tr("Filter")); + this->setStyleSheet("color:gray;font-style:italic"); + } + + QLineEdit::focusOutEvent(e); +} + +void FilterLineEdit::resizeEvent(QResizeEvent *e) +{ + QSize sz = clearButton->sizeHint(); + clearButton->move(rect().right() - sz.width(), (rect().bottom() - sz.height())/2); + + QLineEdit::resizeEvent(e); +} diff --git a/filterlineedit.h b/filterlineedit.h new file mode 100644 index 0000000..71d77df --- /dev/null +++ b/filterlineedit.h @@ -0,0 +1,31 @@ +#ifndef FILTERLINEEDIT_H +#define FILTERLINEEDIT_H + +#include +#include + +class FilterLineEdit : public QLineEdit +{ + Q_OBJECT +public: + explicit FilterLineEdit(QWidget *parent = 0); + +signals: + +public slots: + +private slots: + void updateCloseButton(const QString &text); + +protected: + void focusInEvent(QFocusEvent *e); + void focusOutEvent(QFocusEvent *e); + + void resizeEvent(QResizeEvent *e); + +private: + QToolButton *clearButton; + +}; + +#endif // FILTERLINEEDIT_H diff --git a/qcma.pro b/qcma.pro index 699f9ec..34e7ebc 100644 --- a/qcma.pro +++ b/qcma.pro @@ -32,7 +32,8 @@ SOURCES += main.cpp \ backupitem.cpp \ confirmdialog.cpp \ progressform.cpp \ - pinform.cpp + pinform.cpp \ + filterlineedit.cpp HEADERS += \ capability.h \ @@ -53,7 +54,8 @@ HEADERS += \ backupitem.h \ confirmdialog.h \ progressform.h \ - pinform.h + pinform.h \ + filterlineedit.h CONFIG += link_pkgconfig PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale diff --git a/qcmares.qrc b/qcmares.qrc index 9be88cd..7e5a977 100644 --- a/qcmares.qrc +++ b/qcmares.qrc @@ -6,5 +6,6 @@ resources/translations/qcma.ja.qm resources/psv_icon_16.png resources/qcma.png + resources/edit-clear-locationbar-rtl.png diff --git a/resources/edit-clear-locationbar-rtl.png b/resources/edit-clear-locationbar-rtl.png new file mode 100644 index 0000000000000000000000000000000000000000..2bc48d860751ed430633f496731d379277f5ce66 GIT binary patch literal 859 zcmV-h1ElA!$=f?BY=9fsgxp zob%m#zw_PSPeMevj*v3`6JIZ}99Kktf4^;DVBqb?6PV`r{HMlioU+S zhY~4;?%jRR;&QogaBzTfxhzmBm7vqSAO$CG?M_uh5; zPRqo^1V%?kVK5kwN~MrYCehT?gt4(PjE|2)tJUJ<Bs9$;nANJw2sju}HjfIzB$8!NEc5zSTulo;r;?J3DW*8d_h; zWy&Fk-3czl!omWqRx6A~BUCCCyk0K~g#t7h4NEE!*MUF)*=!b>O!l%X)M~Xco&NSo ztJV(LtTyCwIh>!LV}E}iQ&Uq&r_+K+sZ>@;h0Z>o4~vV7kjv#PMdmUw&-l8d!+5`^ zr$@}rq%~}9ZDDS1PLOf4Y6yqJ2!%qTnUP3@7nA>^-DIpI_V)HfkxVA5jH1YHw_{{v z1pL0v6(*AjPNx&|^YfKS1uiv@ql>ZG+}upOEdn6G`cgC+CGNUFB9WkYJYKtJsmSed z6YEb3g`(EH-yNZ0ykl~a$Sa^=Fi31Mft{TlVtdi>@MDU_VzuY1tE*(OT8Ql{8kXrOD^8s{=EH$ z?WL=%Sg+T!)znb&sgp^iOjUso de disco en respaldos - + + + Filter + + + + Default account Cuenta por defecto - + Are you sure to remove the backup of the following entry? ¿Estas seguro de borrar la siguiente entrada? - + Backup disk usage: %1 Uso de disco en respaldos: %1 - + - (Launcher only) - (Solo lanzador LiveArea) @@ -293,6 +299,15 @@ + + FilterLineEdit + + + + Filter + + + MainWidget diff --git a/resources/translations/qcma.ja.ts b/resources/translations/qcma.ja.ts index c17daf9..0891be4 100644 --- a/resources/translations/qcma.ja.ts +++ b/resources/translations/qcma.ja.ts @@ -72,22 +72,28 @@ バックアップディスク使用容量 - + + + Filter + + + + Default account 標準アカウント - + Are you sure to remove the backup of the following entry? 次の項目のバックアップを削除してもよろしいですか? - + Backup disk usage: %1 バックアップディスク使用容量: %1 - + - (Launcher only) - (LiveArea専用) @@ -294,6 +300,15 @@ + + FilterLineEdit + + + + Filter + + + MainWidget From fd9b3c5e1b61ca1cdaf47354861efd40a927efd2 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Sat, 14 Dec 2013 15:01:41 +0100 Subject: [PATCH 3/6] Added rpmbuild spec files --- README.md | 10 +++--- rpmbuild/VitaMTP.spec | 68 +++++++++++++++++++++++++++++++++++++++++ rpmbuild/VitaMTP64.spec | 68 +++++++++++++++++++++++++++++++++++++++++ rpmbuild/qcma.spec | 42 +++++++++++++++++++++++++ rpmbuild/qcma64.spec | 42 +++++++++++++++++++++++++ 5 files changed, 225 insertions(+), 5 deletions(-) create mode 100644 rpmbuild/VitaMTP.spec create mode 100644 rpmbuild/VitaMTP64.spec create mode 100644 rpmbuild/qcma.spec create mode 100644 rpmbuild/qcma64.spec diff --git a/README.md b/README.md index c177091..1a3e314 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ QCMA ==== -QCMA is an cross-platform application to provide a Open Source implementation +QCMA is a cross-platform application to provide a Open Source implementation of the original Content Manager Assistant that comes with the PS Vita. QCMA is meant to be compatible with Linux, Windows and MAC OS X. ## Features -The aim of this project is to provide a implementation that is on par with the +The aim of this project is to provide an implementation that is on par with the official CMA and also offer some features missing in the original one. #### Implemented features missing in OpenCMA (Yifan Lu CLI application) @@ -23,11 +23,11 @@ official CMA and also offer some features missing in the original one. * Complete categories for music. * SQLite backend for database. -## Planned features +#### Planned features * **UPNP bridge**: connect an existing UPNP server to interface with the Vita using the wireless streaming feature. -#### Dependencies +## Dependencies * [Qt 4.x or 5.x](http://qt-project.org/) * [VitaMTP](https://github.com/yifanlu/VitaMTP). Use my @@ -42,7 +42,7 @@ Check the GitHub repo here: https://github.com/codestation/qcma #### I want to contribute Contact me on [GitHub](https://github.com/codestation/) -#### Thanks to +## Thanks to [Yifan Lu](https://github.com/yifanlu/vitamtp/) - for the vitamtp library and the reference implementation of OpenCMA. diff --git a/rpmbuild/VitaMTP.spec b/rpmbuild/VitaMTP.spec new file mode 100644 index 0000000..4a79706 --- /dev/null +++ b/rpmbuild/VitaMTP.spec @@ -0,0 +1,68 @@ +# +# VitaMTP spec file +# + +Name: libvitamtp2 +Summary: Low-level Vita communication library +License: GPL-3.0 +Release: 2 +Version: 2.1.0 +URL: https://github.com/codestation/VitaMTP +Source: https://github.com/codestation/VitaMTP.git +Prefix: /usr +Group: System/Libraries + +%package devel +Summary: Low-level Vita communication library - development files +Group: Development/Libraries/C and C++ +Requires: libvitamtp2 == 2.1.0 + +%description +libVitaMTP is a library based off of libMTP that does low level USB +communications with the Vita. It can read and receive MTP commands that +the Vita sends, which are a proprietary set of commands that is based on +the MTP open standard. + +%description devel +libVitaMTP is a library based off of libMTP that does low level USB +communications with the Vita. It can read and receive MTP commands that +the Vita sends, which are a proprietary set of commands that is based on +the MTP open standard. +This package contains only the files necessary for development. + +%changelog +* Tue Nov 05 2013 codestation - 2.1.0 +- Added new CMA version. + +%prep +rm -rf $RPM_SOURCE_DIR/libvitamtp2 +git clone https://github.com/codestation/VitaMTP.git $RPM_SOURCE_DIR/libvitamtp2 +cp -r $RPM_SOURCE_DIR/libvitamtp2 $RPM_BUILD_DIR/libvitamtp2 +%setup -n libvitamtp2 -DT + +%build +./autogen.sh +./configure --prefix=/usr --disable-opencma +make + +%install +make DESTDIR=%{buildroot} install +mkdir -p %{buildroot}/lib/udev/rules.d +cp debian/vitamtp1.udev %{buildroot}/lib/udev/rules.d/80-psvita.rules + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +/lib/udev/rules.d/80-psvita.rules +/usr/lib/libvitamtp.la +/usr/lib/libvitamtp.so.2 +/usr/lib/libvitamtp.so.2.0.0 + +%files devel +%defattr(-,root,root,-) +/usr/include/vitamtp.h +/usr/lib/libvitamtp.a +/usr/lib/libvitamtp.so +/usr/lib/pkgconfig/libvitamtp.pc \ No newline at end of file diff --git a/rpmbuild/VitaMTP64.spec b/rpmbuild/VitaMTP64.spec new file mode 100644 index 0000000..b149cbc --- /dev/null +++ b/rpmbuild/VitaMTP64.spec @@ -0,0 +1,68 @@ +# +# VitaMTP spec file +# + +Name: libvitamtp2 +Summary: Low-level Vita communication library +License: GPL-3.0 +Release: 2 +Version: 2.1.0 +URL: https://github.com/codestation/VitaMTP +Source: https://github.com/codestation/VitaMTP.git +Prefix: /usr +Group: System/Libraries + +%package devel +Summary: Low-level Vita communication library - development files +Group: Development/Libraries/C and C++ +Requires: libvitamtp2 == 2.1.0 + +%description +libVitaMTP is a library based off of libMTP that does low level USB +communications with the Vita. It can read and receive MTP commands that +the Vita sends, which are a proprietary set of commands that is based on +the MTP open standard. + +%description devel +libVitaMTP is a library based off of libMTP that does low level USB +communications with the Vita. It can read and receive MTP commands that +the Vita sends, which are a proprietary set of commands that is based on +the MTP open standard. +This package contains only the files necessary for development. + +%changelog +* Tue Nov 05 2013 codestation - 2.1.0 +- Added new CMA version. + +%prep +rm -rf $RPM_SOURCE_DIR/libvitamtp2 +git clone https://github.com/codestation/VitaMTP.git $RPM_SOURCE_DIR/libvitamtp2 +cp -r $RPM_SOURCE_DIR/libvitamtp2 $RPM_BUILD_DIR/libvitamtp2 +%setup -n libvitamtp2 -DT + +%build +./autogen.sh +./configure --prefix=/usr --disable-opencma +make + +%install +make DESTDIR=%{buildroot} install +mkdir -p %{buildroot}/lib/udev/rules.d +cp debian/vitamtp1.udev %{buildroot}/lib/udev/rules.d/80-psvita.rules + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +/lib/udev/rules.d/80-psvita.rules +/usr/lib64/libvitamtp.la +/usr/lib64/libvitamtp.so.2 +/usr/lib64/libvitamtp.so.2.0.0 + +%files devel +%defattr(-,root,root,-) +/usr/include/vitamtp.h +/usr/lib64/libvitamtp.a +/usr/lib64/libvitamtp.so +/usr/lib64/pkgconfig/libvitamtp.pc \ No newline at end of file diff --git a/rpmbuild/qcma.spec b/rpmbuild/qcma.spec new file mode 100644 index 0000000..0e10df4 --- /dev/null +++ b/rpmbuild/qcma.spec @@ -0,0 +1,42 @@ +# +# qcma spec file +# + +Name: qcma +Summary: PSVita Content Manager Assistant +License: GPL-3.0 +Release: 1 +Version: 0.2.4 +URL: https://github.com/codestation/qcma +Source: https://github.com/codestation/qcma.git +Prefix: /usr +Group: Productivity/File utilities + +%description +QCMA is an cross-platform application to provide a Open Source implementation +of the original Content Manager Assistant that comes with the PS Vita. QCMA +is meant to be compatible with Linux, Windows and MAC OS X. + +%changelog +* Tue Nov 06 2013 codestation - 0.2.4 +- QCMA in WiFi mode is compatible with FW 3.00. + +%prep +rm -rf $RPM_SOURCE_DIR/qcma +git clone https://github.com/codestation/qcma.git $RPM_SOURCE_DIR/qcma +cp -r $RPM_SOURCE_DIR/qcma $RPM_BUILD_DIR/qcma +%setup -n qcma -DT + +%build +lrelease qcma.pro +qmake PREFIX=/usr +make + +%install +make INSTALL_ROOT=%{buildroot} install + +%files +%defattr(-,root,root,-) +/usr/bin/qcma +/usr/share/applications/qcma/qcma.desktop +/usr/share/icons/hicolor/64x64/apps/qcma.png \ No newline at end of file diff --git a/rpmbuild/qcma64.spec b/rpmbuild/qcma64.spec new file mode 100644 index 0000000..0e10df4 --- /dev/null +++ b/rpmbuild/qcma64.spec @@ -0,0 +1,42 @@ +# +# qcma spec file +# + +Name: qcma +Summary: PSVita Content Manager Assistant +License: GPL-3.0 +Release: 1 +Version: 0.2.4 +URL: https://github.com/codestation/qcma +Source: https://github.com/codestation/qcma.git +Prefix: /usr +Group: Productivity/File utilities + +%description +QCMA is an cross-platform application to provide a Open Source implementation +of the original Content Manager Assistant that comes with the PS Vita. QCMA +is meant to be compatible with Linux, Windows and MAC OS X. + +%changelog +* Tue Nov 06 2013 codestation - 0.2.4 +- QCMA in WiFi mode is compatible with FW 3.00. + +%prep +rm -rf $RPM_SOURCE_DIR/qcma +git clone https://github.com/codestation/qcma.git $RPM_SOURCE_DIR/qcma +cp -r $RPM_SOURCE_DIR/qcma $RPM_BUILD_DIR/qcma +%setup -n qcma -DT + +%build +lrelease qcma.pro +qmake PREFIX=/usr +make + +%install +make INSTALL_ROOT=%{buildroot} install + +%files +%defattr(-,root,root,-) +/usr/bin/qcma +/usr/share/applications/qcma/qcma.desktop +/usr/share/icons/hicolor/64x64/apps/qcma.png \ No newline at end of file From efced3781c708fff1ad5c421d66054bd47aac175 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Mon, 16 Dec 2013 10:34:48 +0100 Subject: [PATCH 4/6] Changed folder structure --- {debian => build/debian}/changelog | 0 {debian => build/debian}/compat | 0 {debian => build/debian}/control | 0 {debian => build/debian}/copyright | 0 {debian => build/debian}/docs | 0 {debian => build/debian}/rules | 0 {debian => build/debian}/source/format | 0 {rpmbuild => build/rpmbuild}/VitaMTP.spec | 0 {rpmbuild => build/rpmbuild}/VitaMTP64.spec | 0 {rpmbuild => build/rpmbuild}/qcma.spec | 0 {rpmbuild => build/rpmbuild}/qcma64.spec | 0 filterlineedit.cpp | 2 +- qcma.pro | 109 +++++++++--------- qcmares.qrc | 11 -- .../edit-clear-locationbar-rtl.png | Bin resources/{ => images}/psv_icon.png | Bin resources/{ => images}/psv_icon_16.png | Bin resources/{ => images}/qcma.icns | Bin resources/{ => images}/qcma.ico | Bin resources/{ => images}/qcma.png | Bin qcma.desktop => resources/qcma.desktop | 0 qcma.rc => resources/qcma.rc | 0 resources/qcmares.qrc | 11 ++ resources/{ => xml}/psp2-updatelist.xml | 0 avdecoder.cpp => src/avdecoder.cpp | 0 avdecoder.h => src/avdecoder.h | 0 capability.cpp => src/capability.cpp | 0 capability.h => src/capability.h | 0 clientmanager.cpp => src/clientmanager.cpp | 2 +- clientmanager.h => src/clientmanager.h | 4 +- cmabroadcast.cpp => src/cmabroadcast.cpp | 0 cmabroadcast.h => src/cmabroadcast.h | 0 cmaclient.cpp => src/cmaclient.cpp | 0 cmaclient.h => src/cmaclient.h | 0 cmaevent.cpp => src/cmaevent.cpp | 0 cmaevent.h => src/cmaevent.h | 0 cmaobject.cpp => src/cmaobject.cpp | 0 cmaobject.h => src/cmaobject.h | 0 cmarootobject.cpp => src/cmarootobject.cpp | 0 cmarootobject.h => src/cmarootobject.h | 0 database.cpp => src/database.cpp | 0 database.h => src/database.h | 0 backupitem.cpp => src/forms/backupitem.cpp | 2 +- backupitem.h => src/forms/backupitem.h | 0 backupitem.ui => src/forms/backupitem.ui | 0 .../forms/backupmanagerform.cpp | 6 +- .../forms/backupmanagerform.h | 2 +- .../forms/backupmanagerform.ui | 0 .../forms/configwidget.cpp | 0 configwidget.h => src/forms/configwidget.h | 0 configwidget.ui => src/forms/configwidget.ui | 0 .../forms/confirmdialog.cpp | 0 confirmdialog.h => src/forms/confirmdialog.h | 0 .../forms/confirmdialog.ui | 0 pinform.cpp => src/forms/pinform.cpp | 0 pinform.h => src/forms/pinform.h | 0 pinform.ui => src/forms/pinform.ui | 0 .../forms/progressform.cpp | 0 progressform.h => src/forms/progressform.h | 0 progressform.ui => src/forms/progressform.ui | 0 main.cpp => src/main.cpp | 0 mainwidget.cpp => src/mainwidget.cpp | 6 +- mainwidget.h => src/mainwidget.h | 8 +- sforeader.cpp => src/sforeader.cpp | 0 sforeader.h => src/sforeader.h | 0 .../singleapplication.cpp | 0 .../singleapplication.h | 0 utils.cpp => src/utils.cpp | 0 utils.h => src/utils.h | 0 69 files changed, 83 insertions(+), 80 deletions(-) rename {debian => build/debian}/changelog (100%) rename {debian => build/debian}/compat (100%) rename {debian => build/debian}/control (100%) rename {debian => build/debian}/copyright (100%) rename {debian => build/debian}/docs (100%) rename {debian => build/debian}/rules (100%) rename {debian => build/debian}/source/format (100%) rename {rpmbuild => build/rpmbuild}/VitaMTP.spec (100%) rename {rpmbuild => build/rpmbuild}/VitaMTP64.spec (100%) rename {rpmbuild => build/rpmbuild}/qcma.spec (100%) rename {rpmbuild => build/rpmbuild}/qcma64.spec (100%) delete mode 100644 qcmares.qrc rename resources/{ => images}/edit-clear-locationbar-rtl.png (100%) rename resources/{ => images}/psv_icon.png (100%) rename resources/{ => images}/psv_icon_16.png (100%) rename resources/{ => images}/qcma.icns (100%) rename resources/{ => images}/qcma.ico (100%) rename resources/{ => images}/qcma.png (100%) rename qcma.desktop => resources/qcma.desktop (100%) rename qcma.rc => resources/qcma.rc (100%) create mode 100644 resources/qcmares.qrc rename resources/{ => xml}/psp2-updatelist.xml (100%) rename avdecoder.cpp => src/avdecoder.cpp (100%) rename avdecoder.h => src/avdecoder.h (100%) rename capability.cpp => src/capability.cpp (100%) rename capability.h => src/capability.h (100%) rename clientmanager.cpp => src/clientmanager.cpp (99%) rename clientmanager.h => src/clientmanager.h (96%) rename cmabroadcast.cpp => src/cmabroadcast.cpp (100%) rename cmabroadcast.h => src/cmabroadcast.h (100%) rename cmaclient.cpp => src/cmaclient.cpp (100%) rename cmaclient.h => src/cmaclient.h (100%) rename cmaevent.cpp => src/cmaevent.cpp (100%) rename cmaevent.h => src/cmaevent.h (100%) rename cmaobject.cpp => src/cmaobject.cpp (100%) rename cmaobject.h => src/cmaobject.h (100%) rename cmarootobject.cpp => src/cmarootobject.cpp (100%) rename cmarootobject.h => src/cmarootobject.h (100%) rename database.cpp => src/database.cpp (100%) rename database.h => src/database.h (100%) rename backupitem.cpp => src/forms/backupitem.cpp (99%) rename backupitem.h => src/forms/backupitem.h (100%) rename backupitem.ui => src/forms/backupitem.ui (100%) rename backupmanagerform.cpp => src/forms/backupmanagerform.cpp (98%) rename backupmanagerform.h => src/forms/backupmanagerform.h (98%) rename backupmanagerform.ui => src/forms/backupmanagerform.ui (100%) rename configwidget.cpp => src/forms/configwidget.cpp (100%) rename configwidget.h => src/forms/configwidget.h (100%) rename configwidget.ui => src/forms/configwidget.ui (100%) rename confirmdialog.cpp => src/forms/confirmdialog.cpp (100%) rename confirmdialog.h => src/forms/confirmdialog.h (100%) rename confirmdialog.ui => src/forms/confirmdialog.ui (100%) rename pinform.cpp => src/forms/pinform.cpp (100%) rename pinform.h => src/forms/pinform.h (100%) rename pinform.ui => src/forms/pinform.ui (100%) rename progressform.cpp => src/forms/progressform.cpp (100%) rename progressform.h => src/forms/progressform.h (100%) rename progressform.ui => src/forms/progressform.ui (100%) rename main.cpp => src/main.cpp (100%) rename mainwidget.cpp => src/mainwidget.cpp (96%) rename mainwidget.h => src/mainwidget.h (94%) rename sforeader.cpp => src/sforeader.cpp (100%) rename sforeader.h => src/sforeader.h (100%) rename singleapplication.cpp => src/singleapplication.cpp (100%) rename singleapplication.h => src/singleapplication.h (100%) rename utils.cpp => src/utils.cpp (100%) rename utils.h => src/utils.h (100%) diff --git a/debian/changelog b/build/debian/changelog similarity index 100% rename from debian/changelog rename to build/debian/changelog diff --git a/debian/compat b/build/debian/compat similarity index 100% rename from debian/compat rename to build/debian/compat diff --git a/debian/control b/build/debian/control similarity index 100% rename from debian/control rename to build/debian/control diff --git a/debian/copyright b/build/debian/copyright similarity index 100% rename from debian/copyright rename to build/debian/copyright diff --git a/debian/docs b/build/debian/docs similarity index 100% rename from debian/docs rename to build/debian/docs diff --git a/debian/rules b/build/debian/rules similarity index 100% rename from debian/rules rename to build/debian/rules diff --git a/debian/source/format b/build/debian/source/format similarity index 100% rename from debian/source/format rename to build/debian/source/format diff --git a/rpmbuild/VitaMTP.spec b/build/rpmbuild/VitaMTP.spec similarity index 100% rename from rpmbuild/VitaMTP.spec rename to build/rpmbuild/VitaMTP.spec diff --git a/rpmbuild/VitaMTP64.spec b/build/rpmbuild/VitaMTP64.spec similarity index 100% rename from rpmbuild/VitaMTP64.spec rename to build/rpmbuild/VitaMTP64.spec diff --git a/rpmbuild/qcma.spec b/build/rpmbuild/qcma.spec similarity index 100% rename from rpmbuild/qcma.spec rename to build/rpmbuild/qcma.spec diff --git a/rpmbuild/qcma64.spec b/build/rpmbuild/qcma64.spec similarity index 100% rename from rpmbuild/qcma64.spec rename to build/rpmbuild/qcma64.spec diff --git a/filterlineedit.cpp b/filterlineedit.cpp index 8d23741..62b5e54 100644 --- a/filterlineedit.cpp +++ b/filterlineedit.cpp @@ -26,7 +26,7 @@ FilterLineEdit::FilterLineEdit(QWidget *parent) : QLineEdit(parent) { clearButton = new QToolButton(this); - QIcon clearIcon(":/main/resources/edit-clear-locationbar-rtl.png"); + QIcon clearIcon(":/main/images/edit-clear-locationbar-rtl.png"); clearButton->setIcon(clearIcon); clearButton->setCursor(Qt::ArrowCursor); clearButton->setStyleSheet("border:none;padding:0px"); diff --git a/qcma.pro b/qcma.pro index 34e7ebc..46e95b9 100644 --- a/qcma.pro +++ b/qcma.pro @@ -13,49 +13,51 @@ TARGET = qcma TEMPLATE = app -SOURCES += main.cpp \ - capability.cpp \ - database.cpp \ - cmaobject.cpp \ - cmarootobject.cpp \ - utils.cpp \ - mainwidget.cpp \ - configwidget.cpp \ - singleapplication.cpp \ - sforeader.cpp \ - cmaclient.cpp \ - cmabroadcast.cpp \ - avdecoder.cpp \ - cmaevent.cpp \ - clientmanager.cpp \ - backupmanagerform.cpp \ - backupitem.cpp \ - confirmdialog.cpp \ - progressform.cpp \ - pinform.cpp \ - filterlineedit.cpp +SOURCES += src/main.cpp \ + src/capability.cpp \ + src/database.cpp \ + src/cmaobject.cpp \ + src/cmarootobject.cpp \ + src/utils.cpp \ + src/mainwidget.cpp \ + src/singleapplication.cpp \ + src/sforeader.cpp \ + src/cmaclient.cpp \ + src/cmabroadcast.cpp \ + src/avdecoder.cpp \ + src/cmaevent.cpp \ + src/clientmanager.cpp \ + filterlineedit.cpp \ +# forms + src/forms/backupitem.cpp \ + src/forms/backupmanagerform.cpp \ + src/forms/configwidget.cpp \ + src/forms/confirmdialog.cpp \ + src/forms/pinform.cpp \ + src/forms/progressform.cpp HEADERS += \ - capability.h \ - database.h \ - cmaobject.h \ - cmarootobject.h \ - utils.h \ - mainwidget.h \ - configwidget.h \ - singleapplication.h \ - sforeader.h \ - cmaclient.h \ - cmabroadcast.h \ - avdecoder.h \ - cmaevent.h \ - clientmanager.h \ - backupmanagerform.h \ - backupitem.h \ - confirmdialog.h \ - progressform.h \ - pinform.h \ - filterlineedit.h + src/capability.h \ + src/database.h \ + src/cmaobject.h \ + src/cmarootobject.h \ + src/utils.h \ + src/mainwidget.h \ + src/singleapplication.h \ + src/sforeader.h \ + src/cmaclient.h \ + src/cmabroadcast.h \ + src/avdecoder.h \ + src/cmaevent.h \ + src/clientmanager.h \ + filterlineedit.h \ +# forms + src/forms/backupitem.h \ + src/forms/backupmanagerform.h \ + src/forms/configwidget.h \ + src/forms/confirmdialog.h \ + src/forms/pinform.h \ + src/forms/progressform.h CONFIG += link_pkgconfig PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale @@ -63,24 +65,25 @@ PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale QMAKE_CXXFLAGS += -Wno-write-strings -Wall -D__STDC_CONSTANT_MACROS RESOURCES += \ - qcmares.qrc + resources/qcmares.qrc OTHER_FILES += \ - resources/psp2-updatelist.xml \ - resources/psv_icon.png \ + resources/xml/psp2-updatelist.xml \ + resources/images/psv_icon.png \ README.md \ - qcma.desktop \ - qcma.rc + resources/qcma.desktop \ + resources/qcma.rc FORMS += \ - configwidget.ui \ - backupmanagerform.ui \ - backupitem.ui \ - confirmdialog.ui \ - progressform.ui \ - pinform.ui + src/forms/configwidget.ui \ + src/forms/backupmanagerform.ui \ + src/forms/backupitem.ui \ + src/forms/confirmdialog.ui \ + src/forms/progressform.ui \ + src/forms/pinform.ui -TRANSLATIONS += resources/translations/qcma.es.ts \ +TRANSLATIONS += \ + resources/translations/qcma.es.ts \ resources/translations/qcma.ja.ts VERSION = \\\"'0.2.4'\\\" diff --git a/qcmares.qrc b/qcmares.qrc deleted file mode 100644 index 7e5a977..0000000 --- a/qcmares.qrc +++ /dev/null @@ -1,11 +0,0 @@ - - - resources/psp2-updatelist.xml - resources/psv_icon.png - resources/translations/qcma.es.qm - resources/translations/qcma.ja.qm - resources/psv_icon_16.png - resources/qcma.png - resources/edit-clear-locationbar-rtl.png - - diff --git a/resources/edit-clear-locationbar-rtl.png b/resources/images/edit-clear-locationbar-rtl.png similarity index 100% rename from resources/edit-clear-locationbar-rtl.png rename to resources/images/edit-clear-locationbar-rtl.png diff --git a/resources/psv_icon.png b/resources/images/psv_icon.png similarity index 100% rename from resources/psv_icon.png rename to resources/images/psv_icon.png diff --git a/resources/psv_icon_16.png b/resources/images/psv_icon_16.png similarity index 100% rename from resources/psv_icon_16.png rename to resources/images/psv_icon_16.png diff --git a/resources/qcma.icns b/resources/images/qcma.icns similarity index 100% rename from resources/qcma.icns rename to resources/images/qcma.icns diff --git a/resources/qcma.ico b/resources/images/qcma.ico similarity index 100% rename from resources/qcma.ico rename to resources/images/qcma.ico diff --git a/resources/qcma.png b/resources/images/qcma.png similarity index 100% rename from resources/qcma.png rename to resources/images/qcma.png diff --git a/qcma.desktop b/resources/qcma.desktop similarity index 100% rename from qcma.desktop rename to resources/qcma.desktop diff --git a/qcma.rc b/resources/qcma.rc similarity index 100% rename from qcma.rc rename to resources/qcma.rc diff --git a/resources/qcmares.qrc b/resources/qcmares.qrc new file mode 100644 index 0000000..1576176 --- /dev/null +++ b/resources/qcmares.qrc @@ -0,0 +1,11 @@ + + + xml/psp2-updatelist.xml + translations/qcma.es.qm + translations/qcma.ja.qm + images/psv_icon.png + images/psv_icon_16.png + images/qcma.png + images/edit-clear-locationbar-rtl.png + + diff --git a/resources/psp2-updatelist.xml b/resources/xml/psp2-updatelist.xml similarity index 100% rename from resources/psp2-updatelist.xml rename to resources/xml/psp2-updatelist.xml diff --git a/avdecoder.cpp b/src/avdecoder.cpp similarity index 100% rename from avdecoder.cpp rename to src/avdecoder.cpp diff --git a/avdecoder.h b/src/avdecoder.h similarity index 100% rename from avdecoder.h rename to src/avdecoder.h diff --git a/capability.cpp b/src/capability.cpp similarity index 100% rename from capability.cpp rename to src/capability.cpp diff --git a/capability.h b/src/capability.h similarity index 100% rename from capability.h rename to src/capability.h diff --git a/clientmanager.cpp b/src/clientmanager.cpp similarity index 99% rename from clientmanager.cpp rename to src/clientmanager.cpp index 881d20e..e43e7a3 100644 --- a/clientmanager.cpp +++ b/src/clientmanager.cpp @@ -18,9 +18,9 @@ */ #include "clientmanager.h" -#include "progressform.h" #include "cmaclient.h" #include "utils.h" +#include "forms/progressform.h" #include diff --git a/clientmanager.h b/src/clientmanager.h similarity index 96% rename from clientmanager.h rename to src/clientmanager.h index c5cff10..9ff8792 100644 --- a/clientmanager.h +++ b/src/clientmanager.h @@ -20,9 +20,9 @@ #ifndef CLIENTMANAGER_H #define CLIENTMANAGER_H -#include "pinform.h" #include "database.h" -#include "progressform.h" +#include "forms/pinform.h" +#include "forms/progressform.h" #include #include diff --git a/cmabroadcast.cpp b/src/cmabroadcast.cpp similarity index 100% rename from cmabroadcast.cpp rename to src/cmabroadcast.cpp diff --git a/cmabroadcast.h b/src/cmabroadcast.h similarity index 100% rename from cmabroadcast.h rename to src/cmabroadcast.h diff --git a/cmaclient.cpp b/src/cmaclient.cpp similarity index 100% rename from cmaclient.cpp rename to src/cmaclient.cpp diff --git a/cmaclient.h b/src/cmaclient.h similarity index 100% rename from cmaclient.h rename to src/cmaclient.h diff --git a/cmaevent.cpp b/src/cmaevent.cpp similarity index 100% rename from cmaevent.cpp rename to src/cmaevent.cpp diff --git a/cmaevent.h b/src/cmaevent.h similarity index 100% rename from cmaevent.h rename to src/cmaevent.h diff --git a/cmaobject.cpp b/src/cmaobject.cpp similarity index 100% rename from cmaobject.cpp rename to src/cmaobject.cpp diff --git a/cmaobject.h b/src/cmaobject.h similarity index 100% rename from cmaobject.h rename to src/cmaobject.h diff --git a/cmarootobject.cpp b/src/cmarootobject.cpp similarity index 100% rename from cmarootobject.cpp rename to src/cmarootobject.cpp diff --git a/cmarootobject.h b/src/cmarootobject.h similarity index 100% rename from cmarootobject.h rename to src/cmarootobject.h diff --git a/database.cpp b/src/database.cpp similarity index 100% rename from database.cpp rename to src/database.cpp diff --git a/database.h b/src/database.h similarity index 100% rename from database.h rename to src/database.h diff --git a/backupitem.cpp b/src/forms/backupitem.cpp similarity index 99% rename from backupitem.cpp rename to src/forms/backupitem.cpp index 810c92a..901dade 100644 --- a/backupitem.cpp +++ b/src/forms/backupitem.cpp @@ -19,7 +19,7 @@ #include "backupitem.h" #include "ui_backupitem.h" -#include "utils.h" +#include "../utils.h" #include #include diff --git a/backupitem.h b/src/forms/backupitem.h similarity index 100% rename from backupitem.h rename to src/forms/backupitem.h diff --git a/backupitem.ui b/src/forms/backupitem.ui similarity index 100% rename from backupitem.ui rename to src/forms/backupitem.ui diff --git a/backupmanagerform.cpp b/src/forms/backupmanagerform.cpp similarity index 98% rename from backupmanagerform.cpp rename to src/forms/backupmanagerform.cpp index d50f9c5..29bf6a8 100644 --- a/backupmanagerform.cpp +++ b/src/forms/backupmanagerform.cpp @@ -19,10 +19,10 @@ #include "backupmanagerform.h" #include "ui_backupmanagerform.h" -#include "cmaobject.h" -#include "sforeader.h" +#include "../cmaobject.h" +#include "../sforeader.h" #include "confirmdialog.h" -#include "utils.h" +#include "../utils.h" #include "filterlineedit.h" #include diff --git a/backupmanagerform.h b/src/forms/backupmanagerform.h similarity index 98% rename from backupmanagerform.h rename to src/forms/backupmanagerform.h index e09fef7..b78ab77 100644 --- a/backupmanagerform.h +++ b/src/forms/backupmanagerform.h @@ -20,7 +20,7 @@ #ifndef BACKUPMANAGERFORM_H #define BACKUPMANAGERFORM_H -#include "database.h" +#include "../database.h" #include "backupitem.h" #include diff --git a/backupmanagerform.ui b/src/forms/backupmanagerform.ui similarity index 100% rename from backupmanagerform.ui rename to src/forms/backupmanagerform.ui diff --git a/configwidget.cpp b/src/forms/configwidget.cpp similarity index 100% rename from configwidget.cpp rename to src/forms/configwidget.cpp diff --git a/configwidget.h b/src/forms/configwidget.h similarity index 100% rename from configwidget.h rename to src/forms/configwidget.h diff --git a/configwidget.ui b/src/forms/configwidget.ui similarity index 100% rename from configwidget.ui rename to src/forms/configwidget.ui diff --git a/confirmdialog.cpp b/src/forms/confirmdialog.cpp similarity index 100% rename from confirmdialog.cpp rename to src/forms/confirmdialog.cpp diff --git a/confirmdialog.h b/src/forms/confirmdialog.h similarity index 100% rename from confirmdialog.h rename to src/forms/confirmdialog.h diff --git a/confirmdialog.ui b/src/forms/confirmdialog.ui similarity index 100% rename from confirmdialog.ui rename to src/forms/confirmdialog.ui diff --git a/pinform.cpp b/src/forms/pinform.cpp similarity index 100% rename from pinform.cpp rename to src/forms/pinform.cpp diff --git a/pinform.h b/src/forms/pinform.h similarity index 100% rename from pinform.h rename to src/forms/pinform.h diff --git a/pinform.ui b/src/forms/pinform.ui similarity index 100% rename from pinform.ui rename to src/forms/pinform.ui diff --git a/progressform.cpp b/src/forms/progressform.cpp similarity index 100% rename from progressform.cpp rename to src/forms/progressform.cpp diff --git a/progressform.h b/src/forms/progressform.h similarity index 100% rename from progressform.h rename to src/forms/progressform.h diff --git a/progressform.ui b/src/forms/progressform.ui similarity index 100% rename from progressform.ui rename to src/forms/progressform.ui diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/mainwidget.cpp b/src/mainwidget.cpp similarity index 96% rename from mainwidget.cpp rename to src/mainwidget.cpp index efd08b3..af518b6 100644 --- a/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -119,7 +119,7 @@ void MainWidget::showAboutDialog() 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.setIconPixmap(QPixmap(":/main/images/qcma.png")); about.setDefaultButton(QMessageBox::Ok); // hack to expand the messagebox minimum size @@ -164,9 +164,9 @@ void MainWidget::createTrayIcon() trayIcon = new QSystemTrayIcon(this); trayIcon->setContextMenu(trayIconMenu); #ifndef Q_OS_WIN32 - trayIcon->setIcon(QIcon(":/main/resources/psv_icon.png")); + trayIcon->setIcon(QIcon(":/main/images/psv_icon.png")); #else - trayIcon->setIcon(QIcon(":/main/resources/psv_icon_16.png")); + trayIcon->setIcon(QIcon(":/main/images/psv_icon_16.png")); #endif trayIcon->show(); // try to avoid the iconTray Qt bug diff --git a/mainwidget.h b/src/mainwidget.h similarity index 94% rename from mainwidget.h rename to src/mainwidget.h index 696b250..d877a1e 100644 --- a/mainwidget.h +++ b/src/mainwidget.h @@ -20,11 +20,11 @@ #ifndef MAINWIDGET_H #define MAINWIDGET_H -#include "configwidget.h" -#include "clientmanager.h" -#include "backupmanagerform.h" #include "cmaclient.h" -#include "progressform.h" +#include "clientmanager.h" +#include "forms/configwidget.h" +#include "forms/backupmanagerform.h" +#include "forms/progressform.h" #include #include diff --git a/sforeader.cpp b/src/sforeader.cpp similarity index 100% rename from sforeader.cpp rename to src/sforeader.cpp diff --git a/sforeader.h b/src/sforeader.h similarity index 100% rename from sforeader.h rename to src/sforeader.h diff --git a/singleapplication.cpp b/src/singleapplication.cpp similarity index 100% rename from singleapplication.cpp rename to src/singleapplication.cpp diff --git a/singleapplication.h b/src/singleapplication.h similarity index 100% rename from singleapplication.h rename to src/singleapplication.h diff --git a/utils.cpp b/src/utils.cpp similarity index 100% rename from utils.cpp rename to src/utils.cpp diff --git a/utils.h b/src/utils.h similarity index 100% rename from utils.h rename to src/utils.h From 5c255ea221932491708c84fd3a7493065ac50b11 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Mon, 16 Dec 2013 13:39:02 +0100 Subject: [PATCH 5/6] Fixed filterlineedit location --- qcma.pro | 6 ++++-- filterlineedit.cpp => src/filterlineedit.cpp | 0 filterlineedit.h => src/filterlineedit.h | 0 src/forms/backupitem.cpp | 2 +- src/forms/backupmanagerform.cpp | 6 +++--- src/forms/backupmanagerform.h | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) rename filterlineedit.cpp => src/filterlineedit.cpp (100%) rename filterlineedit.h => src/filterlineedit.h (100%) diff --git a/qcma.pro b/qcma.pro index 46e95b9..0238752 100644 --- a/qcma.pro +++ b/qcma.pro @@ -27,7 +27,7 @@ SOURCES += src/main.cpp \ src/avdecoder.cpp \ src/cmaevent.cpp \ src/clientmanager.cpp \ - filterlineedit.cpp \ + src/filterlineedit.cpp \ # forms src/forms/backupitem.cpp \ src/forms/backupmanagerform.cpp \ @@ -50,7 +50,7 @@ HEADERS += \ src/avdecoder.h \ src/cmaevent.h \ src/clientmanager.h \ - filterlineedit.h \ + src/filterlineedit.h \ # forms src/forms/backupitem.h \ src/forms/backupmanagerform.h \ @@ -59,6 +59,8 @@ HEADERS += \ src/forms/pinform.h \ src/forms/progressform.h +INCLUDEPATH += src/ + CONFIG += link_pkgconfig PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale diff --git a/filterlineedit.cpp b/src/filterlineedit.cpp similarity index 100% rename from filterlineedit.cpp rename to src/filterlineedit.cpp diff --git a/filterlineedit.h b/src/filterlineedit.h similarity index 100% rename from filterlineedit.h rename to src/filterlineedit.h diff --git a/src/forms/backupitem.cpp b/src/forms/backupitem.cpp index 901dade..810c92a 100644 --- a/src/forms/backupitem.cpp +++ b/src/forms/backupitem.cpp @@ -19,7 +19,7 @@ #include "backupitem.h" #include "ui_backupitem.h" -#include "../utils.h" +#include "utils.h" #include #include diff --git a/src/forms/backupmanagerform.cpp b/src/forms/backupmanagerform.cpp index 29bf6a8..d50f9c5 100644 --- a/src/forms/backupmanagerform.cpp +++ b/src/forms/backupmanagerform.cpp @@ -19,10 +19,10 @@ #include "backupmanagerform.h" #include "ui_backupmanagerform.h" -#include "../cmaobject.h" -#include "../sforeader.h" +#include "cmaobject.h" +#include "sforeader.h" #include "confirmdialog.h" -#include "../utils.h" +#include "utils.h" #include "filterlineedit.h" #include diff --git a/src/forms/backupmanagerform.h b/src/forms/backupmanagerform.h index b78ab77..e09fef7 100644 --- a/src/forms/backupmanagerform.h +++ b/src/forms/backupmanagerform.h @@ -20,7 +20,7 @@ #ifndef BACKUPMANAGERFORM_H #define BACKUPMANAGERFORM_H -#include "../database.h" +#include "database.h" #include "backupitem.h" #include From 4c5356a35dd9bb5a042f8c1dc1e7677b083c99d0 Mon Sep 17 00:00:00 2001 From: Xian Nox Date: Mon, 16 Dec 2013 14:35:56 +0100 Subject: [PATCH 6/6] Moved qcma.rc and qcma.qrc --- qcma.pro | 8 ++++---- resources/qcma.rc => qcma.rc | 0 qcmares.qrc | 11 +++++++++++ resources/qcma.desktop | 2 +- resources/qcmares.qrc | 11 ----------- src/cmaevent.cpp | 2 +- src/filterlineedit.cpp | 2 +- src/mainwidget.cpp | 6 +++--- 8 files changed, 21 insertions(+), 21 deletions(-) rename resources/qcma.rc => qcma.rc (100%) create mode 100644 qcmares.qrc delete mode 100644 resources/qcmares.qrc diff --git a/qcma.pro b/qcma.pro index 0238752..39554d9 100644 --- a/qcma.pro +++ b/qcma.pro @@ -66,15 +66,15 @@ PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale QMAKE_CXXFLAGS += -Wno-write-strings -Wall -D__STDC_CONSTANT_MACROS -RESOURCES += \ - resources/qcmares.qrc +RESOURCES += qcmares.qrc OTHER_FILES += \ resources/xml/psp2-updatelist.xml \ resources/images/psv_icon.png \ - README.md \ + resources/images/psv_icon_16.png \ + resources/images/qcma.png \ resources/qcma.desktop \ - resources/qcma.rc + qcma.rc FORMS += \ src/forms/configwidget.ui \ diff --git a/resources/qcma.rc b/qcma.rc similarity index 100% rename from resources/qcma.rc rename to qcma.rc diff --git a/qcmares.qrc b/qcmares.qrc new file mode 100644 index 0000000..b9e6c18 --- /dev/null +++ b/qcmares.qrc @@ -0,0 +1,11 @@ + + + resources/xml/psp2-updatelist.xml + resources/translations/qcma.es.qm + resources/translations/qcma.ja.qm + resources/images/psv_icon.png + resources/images/psv_icon_16.png + resources/images/qcma.png + resources/images/edit-clear-locationbar-rtl.png + + diff --git a/resources/qcma.desktop b/resources/qcma.desktop index 66cdeb5..2ffd664 100644 --- a/resources/qcma.desktop +++ b/resources/qcma.desktop @@ -5,7 +5,7 @@ GenericName=Content Manager Assistant GenericName[es]=Asistente del Gestor de Contenido Comment=Content Manager Assistant for the PS Vita Comment[es]=Asistente del Gestor de Contenido para PS Vita -Icon=qcma.png +Icon=images/qcma.png Name=QCMA Path= StartupNotify=false diff --git a/resources/qcmares.qrc b/resources/qcmares.qrc deleted file mode 100644 index 1576176..0000000 --- a/resources/qcmares.qrc +++ /dev/null @@ -1,11 +0,0 @@ - - - xml/psp2-updatelist.xml - translations/qcma.es.qm - translations/qcma.ja.qm - images/psv_icon.png - images/psv_icon_16.png - images/qcma.png - images/edit-clear-locationbar-rtl.png - - diff --git a/src/cmaevent.cpp b/src/cmaevent.cpp index f08abc7..b70aa54 100644 --- a/src/cmaevent.cpp +++ b/src/cmaevent.cpp @@ -478,7 +478,7 @@ void CmaEvent::vitaEventSendHttpObjectFromURL(vita_event_t *event, int eventId) if(!file.open(QIODevice::ReadOnly)) { if(basename == "psp2-updatelist.xml") { qDebug("Found request for update list. Sending cached data"); - QFile res(":/main/resources/psp2-updatelist.xml"); + QFile res(":/main/resources/xml/psp2-updatelist.xml"); res.open(QIODevice::ReadOnly); data = res.readAll(); } else { diff --git a/src/filterlineedit.cpp b/src/filterlineedit.cpp index 62b5e54..0119926 100644 --- a/src/filterlineedit.cpp +++ b/src/filterlineedit.cpp @@ -26,7 +26,7 @@ FilterLineEdit::FilterLineEdit(QWidget *parent) : QLineEdit(parent) { clearButton = new QToolButton(this); - QIcon clearIcon(":/main/images/edit-clear-locationbar-rtl.png"); + QIcon clearIcon(":/main/resources/images/edit-clear-locationbar-rtl.png"); clearButton->setIcon(clearIcon); clearButton->setCursor(Qt::ArrowCursor); clearButton->setStyleSheet("border:none;padding:0px"); diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp index af518b6..fbe4bc5 100644 --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -119,7 +119,7 @@ void MainWidget::showAboutDialog() about.setWindowTitle(tr("About QCMA")); about.setInformativeText(tr("Copyright (C) 2013 Codestation") + "\n"); about.setStandardButtons(QMessageBox::Ok); - about.setIconPixmap(QPixmap(":/main/images/qcma.png")); + about.setIconPixmap(QPixmap(":/main/resources/images/qcma.png")); about.setDefaultButton(QMessageBox::Ok); // hack to expand the messagebox minimum size @@ -164,9 +164,9 @@ void MainWidget::createTrayIcon() trayIcon = new QSystemTrayIcon(this); trayIcon->setContextMenu(trayIconMenu); #ifndef Q_OS_WIN32 - trayIcon->setIcon(QIcon(":/main/images/psv_icon.png")); + trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon.png")); #else - trayIcon->setIcon(QIcon(":/main/images/psv_icon_16.png")); + trayIcon->setIcon(QIcon(":/main/resources/images/psv_icon_16.png")); #endif trayIcon->show(); // try to avoid the iconTray Qt bug