From 4caaa3f1bc4ec6a5ddbe9886a5db5476964627a0 Mon Sep 17 00:00:00 2001 From: Peter Repukat Date: Sun, 12 Nov 2017 01:03:14 +0100 Subject: [PATCH] Cleanup --- GloSC/GloSC.cpp | 34 ++++++++++++++++++---------------- GloSC/GloSC.h | 8 ++++---- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/GloSC/GloSC.cpp b/GloSC/GloSC.cpp index 0e20a93..004f8e9 100644 --- a/GloSC/GloSC.cpp +++ b/GloSC/GloSC.cpp @@ -220,6 +220,7 @@ void GloSC::on_pbAddToSteam_clicked() QFile shortcutsFile(steamPath + "/userdata/" + activeUser + "/config/shortcuts.vdf"); + //TODO: FIXME: If User has no shortcuts file, create one! if (!shortcutsFile.exists()) { QMessageBox::information(this, "GloSC", "Couldn't detect Steam shortcuts file!\nSteam must be running for it to be detected", QMessageBox::Ok); @@ -341,6 +342,7 @@ void GloSC::on_pbSearchPath_clicked() void GloSC::on_pbUWP_clicked() { + //TODO: FIXME: Make Async QSettings *settings = new QSettings("HKEY_CLASSES_ROOT", QSettings::NativeFormat); QStringList childs = settings->childGroups(); @@ -488,21 +490,21 @@ void GloSC::on_lwInstances_itemSelectionChanged() { animate(wide_x); } else { - //ui.configBox->setGraphicsEffect(&opEff); - //QPropertyAnimation* anim = new QPropertyAnimation(&opEff, "opacity"); - //anim->setEasingCurve(QEasingCurve::OutExpo); - //anim->setDuration(160); - //anim->setStartValue(1.f); - //anim->setEndValue(0.f); - //connect(anim, &QPropertyAnimation::finished, this, [this]() - //{ - // QPropertyAnimation* anim2 = new QPropertyAnimation(&opEff, "opacity"); - // anim2->setEasingCurve(QEasingCurve::InExpo); - // anim2->setDuration(160); - // anim2->setStartValue(0.f); - // anim2->setEndValue(1.f); - // anim2->start(QPropertyAnimation::DeleteWhenStopped); - //}); - //anim->start(QPropertyAnimation::DeleteWhenStopped); + ui.configBox->setGraphicsEffect(&opEff); + QPropertyAnimation* anim = new QPropertyAnimation(&opEff, "opacity"); + anim->setEasingCurve(QEasingCurve::OutExpo); + anim->setDuration(160); + anim->setStartValue(1.f); + anim->setEndValue(0.f); + connect(anim, &QPropertyAnimation::finished, this, [this]() + { + QPropertyAnimation* anim2 = new QPropertyAnimation(&opEff, "opacity"); + anim2->setEasingCurve(QEasingCurve::InExpo); + anim2->setDuration(160); + anim2->setStartValue(0.f); + anim2->setEndValue(1.f); + anim2->start(QPropertyAnimation::DeleteWhenStopped); + }); + anim->start(QPropertyAnimation::DeleteWhenStopped); } } diff --git a/GloSC/GloSC.h b/GloSC/GloSC.h index 977af2e..c9aeec1 100644 --- a/GloSC/GloSC.h +++ b/GloSC/GloSC.h @@ -38,13 +38,13 @@ limitations under the License. class GloSC : public QMainWindow { - Q_OBJECT + Q_OBJECT public: - GloSC(QWidget *parent = Q_NULLPTR); + GloSC(QWidget *parent = Q_NULLPTR); private: - Ui::GloSCClass ui; + Ui::GloSCClass ui; void updateEntryList() const; void writeIni(QString entryName) const; @@ -53,7 +53,7 @@ private: QList uwpPairs; - const unsigned int GLOSC_VERSION = 0x00000122; + const unsigned int GLOSC_VERSION = 0x00000140; //Version Number in as bytes, just remove the dots. int wide_x = 711; int small_x = 302;