From 1f409b0f25c16be8c894428452aaf6363c1c9342 Mon Sep 17 00:00:00 2001 From: Syping Date: Sun, 18 Nov 2018 18:08:18 +0100 Subject: [PATCH] Scaleable navigation bar icons --- .ci/debian_build.sh | 6 ++-- .ci/windows_build.sh | 2 +- .ci/wininstall_build.sh | 2 +- DatabaseThread.cpp | 69 ---------------------------------------- PictureDialog.cpp | 4 +-- gta5view.pro | 2 +- res/app.qrc | 4 +-- res/back.png | Bin 317 -> 0 bytes res/back.svg | 1 + res/next.png | Bin 316 -> 0 bytes res/next.svg | 1 + 11 files changed, 12 insertions(+), 79 deletions(-) delete mode 100644 res/back.png create mode 100644 res/back.svg delete mode 100644 res/next.png create mode 100644 res/next.svg diff --git a/.ci/debian_build.sh b/.ci/debian_build.sh index c8baf3c..cca698f 100755 --- a/.ci/debian_build.sh +++ b/.ci/debian_build.sh @@ -21,13 +21,13 @@ mkdir -p /usr/share/gta5view && \ # Starting build cd qt5 && \ -qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../../gta5view.pro && \ +qmake -qt=5 -spec linux-clang GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_DONATION "DEFINES+=GTA5SYNC_DONATION_EMAIL=\\\\\\\"paypal/at/syping.de\\\\\\\"" ../../gta5view.pro && \ make depend && \ make -j 4 && \ -checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=${PROJECT_DIR}/assets && \ +checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt5 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \" --requires=libqt5core5a,libqt5gui5,libqt5network5,libqt5svg5,libqt5widgets5,qttranslations5-l10n --conflicts=gta5view,gta5view-qt4 --replaces=gta5view,gta5view-qt4 --pakdir=${PROJECT_DIR}/assets && \ cd .. && \ cd qt4 && \ qmake -qt=4 GTA5SYNC_PREFIX=/usr QMAKE_CXXFLAGS+=-std=gnu++11 ${QMAKE_FLAGS_QT4} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" DEFINES+=GTA5SYNC_QCONF ../../gta5view.pro && \ make depend && \ make -j 4 && \ -checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \" --requires=libqtcore4,libqtgui4,libqt4-network,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=${PROJECT_DIR}/assets +checkinstall -D --default --nodoc --install=no --pkgname=gta5view-qt4 --pkgversion=${PACKAGE_VERSION} --pkgrelease=${PACKAGE_BUILD} --pkggroup=utility --maintainer="Syping \" --requires=libqtcore4,libqtgui4,libqt4-network,libqt4-svg,qtcore4-l10n --conflicts=gta5view,gta5view-qt5 --replaces=gta5view,gta5view-qt5 --pakdir=${PROJECT_DIR}/assets diff --git a/.ci/windows_build.sh b/.ci/windows_build.sh index ca92438..2fb53ce 100755 --- a/.ci/windows_build.sh +++ b/.ci/windows_build.sh @@ -12,7 +12,7 @@ mkdir -p assets && \ # Starting build cd build && \ -qmake-static ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" ../gta5view.pro && \ +qmake-static ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_DONATION "DEFINES+=GTA5SYNC_DONATION_EMAIL=\\\\\\\"paypal/at/syping.de\\\\\\\"" ../gta5view.pro && \ make depend && \ make -j 4 && \ cp -Rf release/*.exe ${PROJECT_DIR}/assets/${GTA5VIEW_EXECUTABLE} && \ diff --git a/.ci/wininstall_build.sh b/.ci/wininstall_build.sh index a90ef6a..8936ee0 100755 --- a/.ci/wininstall_build.sh +++ b/.ci/wininstall_build.sh @@ -12,7 +12,7 @@ mkdir -p assets && \ # Starting build cd build && \ -qmake ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' ../gta5view.pro && \ +qmake ${QMAKE_FLAGS_QT5} ${QMAKE_BUILD_TYPE} "DEFINES+=GTA5SYNC_BUILDCODE=\\\\\\\"${PACKAGE_CODE}\\\\\\\"" "DEFINES+=GTA5SYNC_APPVER=\\\\\\\"${APPLICATION_VERSION}\\\\\\\"" "DEFINES+=GTA5SYNC_COMMIT=\\\\\\\"${APPLICATION_COMMIT}\\\\\\\"" DEFINES+=GTA5SYNC_TELEMETRY "DEFINES+=GTA5SYNC_TELEMETRY_WEBURL=\\\\\\\"https://dev.syping.de/gta5view-userstats/\\\\\\\"" DEFINES+=GTA5SYNC_DONATION "DEFINES+=GTA5SYNC_DONATION_EMAIL=\\\\\\\"paypal/at/syping.de\\\\\\\"" DEFINES+=GTA5SYNC_QCONF DEFINES+=GTA5SYNC_INLANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_LANG='\\\"RUNDIR:SEPARATOR:lang\\\"' DEFINES+=GTA5SYNC_PLUG='\\\"RUNDIR:SEPARATOR:plugins\\\"' "LIBS+=-ljpeg" ../gta5view.pro && \ make depend && \ make -j 4 && \ cd ${PROJECT_DIR}/assets && \ diff --git a/DatabaseThread.cpp b/DatabaseThread.cpp index 47160e0..498ad90 100644 --- a/DatabaseThread.cpp +++ b/DatabaseThread.cpp @@ -44,79 +44,10 @@ void DatabaseThread::run() { QEventLoop threadLoop; - QStringList crewList; - QStringList crewListR; - - // Register thread loop end signal QObject::connect(this, SIGNAL(threadTerminated()), &threadLoop, SLOT(quit())); - // Setup crewList for Quick time scan - crewList = crewDB->getCrews(); - if (!crewList.isEmpty()) - { - crewListR = deleteCompatibleCrews(crewList); - } - else - { - while (crewList.isEmpty() && threadRunning) - { - QTimer::singleShot(1000, &threadLoop, SLOT(quit())); - threadLoop.exec(); - if (!crewDB->isAddingCrews()) - { - crewList = crewDB->getCrews(); - } - } - if (threadRunning) - { - crewListR = deleteCompatibleCrews(crewList); - } - } - - // Only do QTS when Thread should be run - if (threadRunning) - { - // Quick time scan -#ifdef GTA5SYNC_DEBUG - qDebug() << "Start QTS"; -#endif - if (crewListR.length() <= 5) - { - scanCrewReference(crewListR, 2500); - emit crewNameUpdated(); - } - if (crewList.length() <= 3) - { - scanCrewMembersList(crewList, 3, 2500); - emit playerNameUpdated(); - } - else if (crewList.length() <= 5) - { - scanCrewMembersList(crewList, 2, 2500); - emit playerNameUpdated(); - } - - if (threadRunning) - { - QTimer::singleShot(10000, &threadLoop, SLOT(quit())); - threadLoop.exec(); - } - } - while (threadRunning) { - crewList = crewDB->getCrews(); - crewListR = deleteCompatibleCrews(crewList); - - // Long time scan -#ifdef GTA5SYNC_DEBUG - qDebug() << "Start LTS"; -#endif - scanCrewReference(crewListR, 10000); - emit crewNameUpdated(); - scanCrewMembersList(crewList, crewMaxPages, 10000); - emit playerNameUpdated(); - if (threadRunning) { QTimer::singleShot(300000, &threadLoop, SLOT(quit())); diff --git a/PictureDialog.cpp b/PictureDialog.cpp index aa4fb0c..d024c4c 100644 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -232,8 +232,8 @@ void PictureDialog::addPreviousNextButtons() QToolBar *uiToolbar = new QToolBar("Picture Toolbar", this); uiToolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); uiToolbar->setObjectName("uiToolbar"); - uiToolbar->addAction(QIcon(":/img/back.png"), "", this, SLOT(previousPictureRequestedSlot())); - uiToolbar->addAction(QIcon(":/img/next.png"), "", this, SLOT(nextPictureRequestedSlot())); + uiToolbar->addAction(QIcon(":/img/back.svg"), "", this, SLOT(previousPictureRequestedSlot())); + uiToolbar->addAction(QIcon(":/img/next.svg"), "", this, SLOT(nextPictureRequestedSlot())); layout()->setMenuBar(uiToolbar); naviEnabled = true; diff --git a/gta5view.pro b/gta5view.pro index cc3c85b..60e01ea 100644 --- a/gta5view.pro +++ b/gta5view.pro @@ -16,7 +16,7 @@ #* along with this program. If not, see . #*****************************************************************************/ -QT += core gui network +QT += core gui network svg greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): greaterThan(QT_MINOR_VERSION, 1): win32: QT += winextras diff --git a/res/app.qrc b/res/app.qrc index 9874535..551b5f7 100644 --- a/res/app.qrc +++ b/res/app.qrc @@ -11,10 +11,10 @@ 5sync-256.png avatararea.png avatarareaimport.png - back.png + back.svg empty1x16.png mappreview.jpg - next.png + next.svg pointmaker-8.png pointmaker-16.png pointmaker-24.png diff --git a/res/back.png b/res/back.png deleted file mode 100644 index 3c01d8c3fa3c8daedb9881a96cfdb1bfb97ede1e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmV-D0mA-?P)1u;H0jb1iCP{6IhqoRi%mgDfz{N|+~Ob&4hD)riHqojJN9`uS&) z3{XoDT;uo8G)E>JX_VrG)&XwY6k5otZD$Mx~z;mBU7ya9;v{Oa@_}ye9 zWOf01L+T$?-xm^%x!&V04xl~I|FJP6r4FjW<;$XhG;sg9oDmx+r{2*B^dv^`DNLtU P00000NkvXXu0mjfNfv^X diff --git a/res/back.svg b/res/back.svg new file mode 100644 index 0000000..ef41738 --- /dev/null +++ b/res/back.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/next.png b/res/next.png deleted file mode 100644 index d87fd54879af54dbdc30ec4082a5001c1fe9aca5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmV-C0mJ@@P) \ No newline at end of file