Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Commit 0f4d82e

Browse files
committed
Fixed a bug when screenshots weren't added to the VDF-file if latest
copied screenshot was a dupe. Major refactoring (partially conforms to the MVC pattern). Minor UI improvement.
1 parent 62baca8 commit 0f4d82e

File tree

8 files changed

+1423
-1023
lines changed

8 files changed

+1423
-1023
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
SteaScree: Steam Cloud Screenshot Uploader
44

5-
SteaScree is a simple cross-platform open-source utility which allows an uploading of screenshots to the Steam Cloud taken without a use of Steam in-game overlay. You just pick screenshots and game and SteaScree will do the rest.
5+
SteaScree is a simple cross-platform open-source utility which makes screenshots taken without the use of Steam's in-game overlay uploadable to the Steam Cloud. You just pick pics and a game and SteaScree will do the rest.
66

7-
Latest installers for all platforms are always available at https://steascree.download.
7+
Latest installers for all platforms are always available at https://steascree.download.

SteaScree.pro

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
#-------------------------------------------------
2-
#
3-
# Project created by QtCreator 2016-08-20T12:24:15
4-
#
5-
#-------------------------------------------------
1+
QT += core gui network
62

7-
QT += core gui network
83
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
94

10-
TARGET = SteaScree
5+
TARGET = SteaScree
116

12-
TEMPLATE = app
7+
TEMPLATE = app
138

14-
SOURCES += main.cpp\
15-
mainwindow.cpp
9+
SOURCES += main.cpp\
10+
mainwindow.cpp \
11+
model.cpp
1612

17-
HEADERS += mainwindow.h
13+
HEADERS += mainwindow.h \
14+
model.h
1815

19-
FORMS += mainwindow.ui
16+
FORMS += mainwindow.ui
2017

21-
VERSION = 1.0.3.0
18+
VERSION = 1.0.4.0
2219

23-
macx:ICON = res/icons/SteaScree.icns
20+
macx:ICON = res/icons/SteaScree.icns
2421

2522
win32:RC_ICONS = res/icons/SteaScree.ico
2623
win32:QMAKE_TARGET_COMPANY = Foyl

main.cpp

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "mainwindow.h"
2+
#include "model.h"
23

34
#include <QApplication>
45

@@ -11,7 +12,111 @@ int main(int argc, char *argv[])
1112
QCoreApplication::setApplicationName("SteaScree");
1213

1314
MainWindow w;
15+
Model m;
16+
17+
QObject::connect(&w, &MainWindow::getOS,
18+
&m, &Model::returnOS);
19+
20+
QObject::connect(&m, &Model::sendOS,
21+
&w, &MainWindow::setButtonPadding);
22+
23+
QObject::connect(&m, &Model::addWidgetItemToScreenshotList,
24+
&w, &MainWindow::addWidgetItemToScreenshotList);
25+
26+
QObject::connect(&m, &Model::resizeScreenshotListColumns,
27+
&w, &MainWindow::resizeScreenshotListColumns);
28+
29+
QObject::connect(&w, &MainWindow::getSteamDir,
30+
&m, &Model::returnSteamDir);
31+
32+
QObject::connect(&m, &Model::sendSteamDir,
33+
&w, &MainWindow::locateSteamDir);
34+
35+
QObject::connect(&w, &MainWindow::setUserDataPaths,
36+
&m, &Model::setUserDataPaths);
37+
38+
QObject::connect(&w, &MainWindow::pushButtonAddScreenshots_clicked,
39+
&m, &Model::returnLastSelectedScreenshotDir);
40+
41+
QObject::connect(&m, &Model::sendLastSelectedScreenshotDir,
42+
&w, &MainWindow::returnScreenshotsSelected);
43+
44+
QObject::connect(&w, &MainWindow::sendScreenshotsSelected,
45+
&m, &Model::addScreenshotsToPool);
46+
47+
QObject::connect(&w, &MainWindow::pushButtonPrepare_clicked,
48+
&m, &Model::returnLinesState);
49+
50+
QObject::connect(&m, &Model::sendLinesState,
51+
&w, &MainWindow::prepareScreenshots);
52+
53+
QObject::connect(&m, &Model::disableWidgets,
54+
&w, &MainWindow::setWidgetsDisabled);
55+
56+
QObject::connect(&w, &MainWindow::clearScreenshotPathsPool,
57+
&m, &Model::clearScreenshotPathsPool);
58+
59+
QObject::connect(&w, &MainWindow::clearCopyingStatusLabels,
60+
&m, &Model::clearCopyingStatusLabels);
61+
62+
QObject::connect(&w, &MainWindow::getScreenshotPathsPoolLength,
63+
&m, &Model::returnScreenshotPathPoolLength);
64+
65+
QObject::connect(&m, &Model::sendScreenshotPathPoolLength,
66+
&w, &MainWindow::setVisibleProgressBar);
67+
68+
QObject::connect(&w, &MainWindow::writeVDF,
69+
&m, &Model::writeVDF);
70+
71+
QObject::connect(&w, &MainWindow::pushScreenshots,
72+
&m, &Model::pushScreenshots);
73+
74+
QObject::connect(&w, &MainWindow::getVDFStatus,
75+
&m, &Model::returnVDFStatus);
76+
77+
QObject::connect(&m, &Model::sendVDFStatus,
78+
&w, &MainWindow::warnOnMissingVDF);
79+
80+
QObject::connect(&m, &Model::moveWindow,
81+
&w, &MainWindow::moveWindow);
82+
83+
QObject::connect(&m, &Model::setLabelStatusErrorVisible,
84+
&w, &MainWindow::setLabelStatusErrorVisible);
85+
86+
QObject::connect(&w, &MainWindow::sendSettings,
87+
&m, &Model::writeSettings);
88+
89+
QObject::connect(&m, &Model::clearWidgets,
90+
&w, &MainWindow::setComboBoxesCleared);
91+
92+
QObject::connect(&m, &Model::sendToComboBox,
93+
&w, &MainWindow::insertIntoComboBox);
94+
95+
QObject::connect(&m, &Model::setIndexOfComboBoxGameID,
96+
&w, &MainWindow::setIndexOfComboBoxGameID);
97+
98+
QObject::connect(&m, &Model::setLabelsOnMissingStuff,
99+
&w, &MainWindow::setLabelsOnMissingStuff);
100+
101+
QObject::connect(&m, &Model::getComboBoxUserIDCurrentText,
102+
&w, &MainWindow::returnComboBoxUserIDCurrentText,
103+
Qt::DirectConnection);
104+
105+
QObject::connect(&w, &MainWindow::sendComboBoxUserIDCurrentText,
106+
&m, &Model::setSelectedUserID);
107+
108+
QObject::connect(&m, &Model::sendLabelsText,
109+
&w, &MainWindow::setLabelsText);
110+
111+
QObject::connect(&m, &Model::setProgressBarValue,
112+
&w, &MainWindow::setProgressBarValue);
113+
114+
QObject::connect(&m, &Model::deleteCopiedWidgetItem,
115+
&w, &MainWindow::deleteCopiedWidgetItem);
116+
14117
w.show();
118+
w.bootStrap();
119+
m.bootStrap();
15120

16121
return a.exec();
17122
}

0 commit comments

Comments
 (0)