Skip to content

Commit e2ca625

Browse files
committed
More moving of infra files.
1 parent 7d82116 commit e2ca625

File tree

113 files changed

+350
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+350
-357
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ file(GLOB MAIN_SOURCES
379379
Source/CommonFramework/Options/ResolutionOption.cpp
380380
Source/CommonFramework/Options/ResolutionOption.h
381381
Source/CommonFramework/Options/ScreenshotFormatOption.h
382-
Source/CommonFramework/Options/UI/LabelCellWidget.cpp
383-
Source/CommonFramework/Options/UI/LabelCellWidget.h
382+
Source/CommonFramework/Options/QtWidget/LabelCellWidget.cpp
383+
Source/CommonFramework/Options/QtWidget/LabelCellWidget.h
384384
Source/CommonFramework/Panels/PanelDescriptor.cpp
385385
Source/CommonFramework/Panels/PanelDescriptor.h
386386
Source/CommonFramework/Panels/PanelInstance.cpp
@@ -404,6 +404,10 @@ file(GLOB MAIN_SOURCES
404404
Source/CommonFramework/PersistentSettings.h
405405
Source/CommonFramework/ProgramSession.cpp
406406
Source/CommonFramework/ProgramSession.h
407+
Source/CommonFramework/ProgramStats/StatsDatabase.cpp
408+
Source/CommonFramework/ProgramStats/StatsDatabase.h
409+
Source/CommonFramework/ProgramStats/StatsTracking.cpp
410+
Source/CommonFramework/ProgramStats/StatsTracking.h
407411
Source/CommonFramework/Recording/StreamHistoryOption.cpp
408412
Source/CommonFramework/Recording/StreamHistoryOption.h
409413
Source/CommonFramework/Recording/StreamHistorySession.cpp
@@ -414,8 +418,6 @@ file(GLOB MAIN_SOURCES
414418
Source/CommonFramework/Recording/StreamHistoryTracker_SaveFrames.h
415419
Source/CommonFramework/Recording/StreamRecorder.cpp
416420
Source/CommonFramework/Recording/StreamRecorder.h
417-
Source/CommonFramework/Resources/SpriteDatabase.cpp
418-
Source/CommonFramework/Resources/SpriteDatabase.h
419421
Source/CommonFramework/Startup/NewVersionCheck.cpp
420422
Source/CommonFramework/Startup/NewVersionCheck.h
421423
Source/CommonFramework/Startup/SetupSettings.cpp
@@ -578,15 +580,13 @@ file(GLOB MAIN_SOURCES
578580
Source/CommonTools/Options/QtWidgets/StringSelectWidget.cpp
579581
Source/CommonTools/Options/QtWidgets/StringSelectWidget.h
580582
Source/CommonTools/Options/TrainOCRModeOption.h
581-
Source/CommonTools/ProgramStats/StatsDatabase.cpp
582-
Source/CommonTools/ProgramStats/StatsDatabase.h
583-
Source/CommonTools/ProgramStats/StatsTracking.cpp
584-
Source/CommonTools/ProgramStats/StatsTracking.h
585583
Source/CommonTools/MultiConsoleErrors.cpp
586584
Source/CommonTools/MultiConsoleErrors.h
587585
Source/CommonTools/TrendInference/AnomalyDetector.cpp
588586
Source/CommonTools/TrendInference/AnomalyDetector.h
589587
Source/CommonTools/TrendInference/TimeWindowStatTracker.h
588+
Source/CommonTools/Resources/SpriteDatabase.cpp
589+
Source/CommonTools/Resources/SpriteDatabase.h
590590
Source/CommonTools/StartupChecks/BlackBorderCheck.cpp
591591
Source/CommonTools/StartupChecks/BlackBorderCheck.h
592592
Source/CommonTools/StartupChecks/VideoResolutionCheck.cpp

SerialPrograms/SerialPrograms.pro

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ SOURCES += \
210210
Source/CommonFramework/Options/Environment/ThemeSelectorOption.cpp \
211211
Source/CommonFramework/Options/LabelCellOption.cpp \
212212
Source/CommonFramework/Options/ResolutionOption.cpp \
213-
Source/CommonFramework/Options/UI/LabelCellWidget.cpp \
213+
Source/CommonFramework/Options/QtWidget/LabelCellWidget.cpp \
214214
Source/CommonFramework/Panels/PanelDescriptor.cpp \
215215
Source/CommonFramework/Panels/PanelInstance.cpp \
216216
Source/CommonFramework/Panels/PanelList.cpp \
@@ -222,10 +222,11 @@ SOURCES += \
222222
Source/CommonFramework/Panels/UI/SettingsPanelWidget.cpp \
223223
Source/CommonFramework/PersistentSettings.cpp \
224224
Source/CommonFramework/ProgramSession.cpp \
225+
Source/CommonFramework/ProgramStats/StatsDatabase.cpp \
226+
Source/CommonFramework/ProgramStats/StatsTracking.cpp \
225227
Source/CommonFramework/Recording/StreamHistoryOption.cpp \
226228
Source/CommonFramework/Recording/StreamHistorySession.cpp \
227229
Source/CommonFramework/Recording/StreamRecorder.cpp \
228-
Source/CommonFramework/Resources/SpriteDatabase.cpp \
229230
Source/CommonFramework/Startup/NewVersionCheck.cpp \
230231
Source/CommonFramework/Startup/SetupSettings.cpp \
231232
Source/CommonFramework/Tools/BotBaseHandle.cpp \
@@ -296,8 +297,7 @@ SOURCES += \
296297
Source/CommonTools/Options/QtWidgets/StringSelectWidget.cpp \
297298
Source/CommonTools/Options/ScreenWatchOption.cpp \
298299
Source/CommonTools/Options/StringSelectOption.cpp \
299-
Source/CommonTools/ProgramStats/StatsDatabase.cpp \
300-
Source/CommonTools/ProgramStats/StatsTracking.cpp \
300+
Source/CommonTools/Resources/SpriteDatabase.cpp \
301301
Source/CommonTools/StartupChecks/BlackBorderCheck.cpp \
302302
Source/CommonTools/StartupChecks/VideoResolutionCheck.cpp \
303303
Source/CommonTools/TrendInference/AnomalyDetector.cpp \
@@ -1298,7 +1298,7 @@ HEADERS += \
12981298
Source/CommonFramework/Options/LabelCellOption.h \
12991299
Source/CommonFramework/Options/ResolutionOption.h \
13001300
Source/CommonFramework/Options/ScreenshotFormatOption.h \
1301-
Source/CommonFramework/Options/UI/LabelCellWidget.h \
1301+
Source/CommonFramework/Options/QtWidget/LabelCellWidget.h \
13021302
Source/CommonFramework/Panels/PanelDescriptor.h \
13031303
Source/CommonFramework/Panels/PanelInstance.h \
13041304
Source/CommonFramework/Panels/PanelList.h \
@@ -1311,12 +1311,13 @@ HEADERS += \
13111311
Source/CommonFramework/Panels/UI/SettingsPanelWidget.h \
13121312
Source/CommonFramework/PersistentSettings.h \
13131313
Source/CommonFramework/ProgramSession.h \
1314+
Source/CommonFramework/ProgramStats/StatsDatabase.h \
1315+
Source/CommonFramework/ProgramStats/StatsTracking.h \
13141316
Source/CommonFramework/Recording/StreamHistoryOption.h \
13151317
Source/CommonFramework/Recording/StreamHistorySession.h \
13161318
Source/CommonFramework/Recording/StreamHistoryTracker_RecordOnTheFly.h \
13171319
Source/CommonFramework/Recording/StreamHistoryTracker_SaveFrames.h \
13181320
Source/CommonFramework/Recording/StreamRecorder.h \
1319-
Source/CommonFramework/Resources/SpriteDatabase.h \
13201321
Source/CommonFramework/Startup/NewVersionCheck.h \
13211322
Source/CommonFramework/Startup/SetupSettings.h \
13221323
Source/CommonFramework/Tools/BotBaseHandle.h \
@@ -1405,8 +1406,7 @@ HEADERS += \
14051406
Source/CommonTools/Options/StringSelectOption.h \
14061407
Source/CommonTools/Options/StringSelectTableOption.h \
14071408
Source/CommonTools/Options/TrainOCRModeOption.h \
1408-
Source/CommonTools/ProgramStats/StatsDatabase.h \
1409-
Source/CommonTools/ProgramStats/StatsTracking.h \
1409+
Source/CommonTools/Resources/SpriteDatabase.h \
14101410
Source/CommonTools/StartupChecks/BlackBorderCheck.h \
14111411
Source/CommonTools/StartupChecks/VideoResolutionCheck.h \
14121412
Source/CommonTools/TrendInference/AnomalyDetector.h \

SerialPrograms/Source/CommonFramework/Notifications/ProgramNotifications.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "CommonFramework/Globals.h"
1515
#include "CommonFramework/GlobalSettingsPanel.h"
1616
#include "CommonFramework/Tools/ProgramEnvironment.h"
17-
#include "CommonTools/ProgramStats/StatsTracking.h"
17+
#include "CommonFramework/ProgramStats/StatsTracking.h"
1818
#include "Integrations/DiscordWebhook.h"
1919
#include "Integrations/SleepyDiscordRunner.h"
2020
#include "ProgramNotifications.h"

SerialPrograms/Source/CommonFramework/Options/UI/LabelCellWidget.cpp renamed to SerialPrograms/Source/CommonFramework/Options/QtWidget/LabelCellWidget.cpp

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
/* Label Cell
2-
*
3-
* From: https://github.com/PokemonAutomation/Arduino-Source
4-
*
5-
*/
6-
7-
#include <QHBoxLayout>
8-
#include <QFrame>
9-
#include <QLabel>
10-
#include "LabelCellWidget.h"
11-
12-
//#include <iostream>
13-
//using std::cout;
14-
//using std::endl;
15-
16-
namespace PokemonAutomation{
17-
18-
19-
20-
ConfigWidget* LabelCellOption::make_QtWidget(QWidget& parent){
21-
return new LabelCellWidget(parent, *this);
22-
}
23-
24-
25-
LabelCellWidget::~LabelCellWidget(){
26-
}
27-
LabelCellWidget::LabelCellWidget(QWidget& parent, LabelCellOption& value)
28-
: QWidget(&parent)
29-
, ConfigWidget(value, *this)
30-
// , m_value(value)
31-
{
32-
QHBoxLayout* layout = new QHBoxLayout(this);
33-
layout->setContentsMargins(0, 0, 0, 0);
34-
// layout->setAlignment(Qt::AlignLeft);
35-
36-
if (value.icon()){
37-
m_icon = new QLabel(this);
38-
Resolution resolution = value.resolution();
39-
// cout << resolution.width << " x " << resolution.height << endl;
40-
QPixmap pixmap;
41-
if (resolution.width == 0 || resolution.height == 0){
42-
pixmap = QPixmap::fromImage(value.icon().to_QImage_ref());
43-
}else{
44-
pixmap = QPixmap::fromImage(value.icon().scaled_to_QImage(resolution.width, resolution.height));
45-
}
46-
m_icon->setPixmap(pixmap);
47-
m_icon->setAlignment(Qt::AlignCenter);
48-
layout->addWidget(m_icon);
49-
}
50-
51-
m_text = new QLabel(QString::fromStdString(value.text()), this);
52-
layout->addWidget(m_text, 1);
53-
// text->setTextInteractionFlags(Qt::TextBrowserInteraction);
54-
// m_text->setOpenExternalLinks(true);
55-
}
56-
57-
58-
59-
60-
}
1+
/* Label Cell
2+
*
3+
* From: https://github.com/PokemonAutomation/Arduino-Source
4+
*
5+
*/
6+
7+
#include <QHBoxLayout>
8+
#include <QFrame>
9+
#include <QLabel>
10+
#include "LabelCellWidget.h"
11+
12+
//#include <iostream>
13+
//using std::cout;
14+
//using std::endl;
15+
16+
namespace PokemonAutomation{
17+
18+
19+
20+
ConfigWidget* LabelCellOption::make_QtWidget(QWidget& parent){
21+
return new LabelCellWidget(parent, *this);
22+
}
23+
24+
25+
LabelCellWidget::~LabelCellWidget(){
26+
}
27+
LabelCellWidget::LabelCellWidget(QWidget& parent, LabelCellOption& value)
28+
: QWidget(&parent)
29+
, ConfigWidget(value, *this)
30+
// , m_value(value)
31+
{
32+
QHBoxLayout* layout = new QHBoxLayout(this);
33+
layout->setContentsMargins(0, 0, 0, 0);
34+
// layout->setAlignment(Qt::AlignLeft);
35+
36+
if (value.icon()){
37+
m_icon = new QLabel(this);
38+
Resolution resolution = value.resolution();
39+
// cout << resolution.width << " x " << resolution.height << endl;
40+
QPixmap pixmap;
41+
if (resolution.width == 0 || resolution.height == 0){
42+
pixmap = QPixmap::fromImage(value.icon().to_QImage_ref());
43+
}else{
44+
pixmap = QPixmap::fromImage(value.icon().scaled_to_QImage(resolution.width, resolution.height));
45+
}
46+
m_icon->setPixmap(pixmap);
47+
m_icon->setAlignment(Qt::AlignCenter);
48+
layout->addWidget(m_icon);
49+
}
50+
51+
m_text = new QLabel(QString::fromStdString(value.text()), this);
52+
layout->addWidget(m_text, 1);
53+
// text->setTextInteractionFlags(Qt::TextBrowserInteraction);
54+
// m_text->setOpenExternalLinks(true);
55+
}
56+
57+
58+
59+
60+
}

SerialPrograms/Source/CommonFramework/Options/UI/LabelCellWidget.h renamed to SerialPrograms/Source/CommonFramework/Options/QtWidget/LabelCellWidget.h

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
/* Label Cell
2-
*
3-
* From: https://github.com/PokemonAutomation/Arduino-Source
4-
*
5-
*/
6-
7-
#ifndef PokemonAutomation_Options_LabelCellWidget_H
8-
#define PokemonAutomation_Options_LabelCellWidget_H
9-
10-
#include <QWidget>
11-
#include "Common/Qt/Options/ConfigWidget.h"
12-
#include "CommonFramework/Options/LabelCellOption.h"
13-
14-
class QLabel;
15-
16-
namespace PokemonAutomation{
17-
18-
19-
20-
class LabelCellWidget : public QWidget, public ConfigWidget{
21-
public:
22-
~LabelCellWidget();
23-
LabelCellWidget(QWidget& parent, LabelCellOption& value);
24-
25-
private:
26-
// LabelCellOption& m_value;
27-
QLabel* m_icon = nullptr;
28-
QLabel* m_text;
29-
};
30-
31-
32-
33-
34-
}
35-
#endif
1+
/* Label Cell
2+
*
3+
* From: https://github.com/PokemonAutomation/Arduino-Source
4+
*
5+
*/
6+
7+
#ifndef PokemonAutomation_Options_LabelCellWidget_H
8+
#define PokemonAutomation_Options_LabelCellWidget_H
9+
10+
#include <QWidget>
11+
#include "Common/Qt/Options/ConfigWidget.h"
12+
#include "CommonFramework/Options/LabelCellOption.h"
13+
14+
class QLabel;
15+
16+
namespace PokemonAutomation{
17+
18+
19+
20+
class LabelCellWidget : public QWidget, public ConfigWidget{
21+
public:
22+
~LabelCellWidget();
23+
LabelCellWidget(QWidget& parent, LabelCellOption& value);
24+
25+
private:
26+
// LabelCellOption& m_value;
27+
QLabel* m_icon = nullptr;
28+
QLabel* m_text;
29+
};
30+
31+
32+
33+
34+
}
35+
#endif

SerialPrograms/Source/CommonFramework/Panels/ProgramDescriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

7-
#include "CommonTools/ProgramStats/StatsTracking.h"
7+
#include "CommonFramework/ProgramStats/StatsTracking.h"
88
#include "ProgramDescriptor.h"
99

1010
namespace PokemonAutomation{

SerialPrograms/Source/CommonFramework/ProgramSession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "CommonFramework/GlobalSettingsPanel.h"
1010
#include "CommonFramework/Panels/ProgramDescriptor.h"
1111
#include "CommonFramework/ProgramSession.h"
12-
#include "CommonTools/ProgramStats/StatsDatabase.h"
12+
#include "CommonFramework/ProgramStats/StatsDatabase.h"
1313
#include "Integrations/ProgramTracker.h"
1414

1515
namespace PokemonAutomation{

SerialPrograms/Source/CommonTools/ProgramStats/StatsDatabase.cpp renamed to SerialPrograms/Source/CommonFramework/ProgramStats/StatsDatabase.cpp

File renamed without changes.

SerialPrograms/Source/CommonTools/ProgramStats/StatsDatabase.h renamed to SerialPrograms/Source/CommonFramework/ProgramStats/StatsDatabase.h

File renamed without changes.

SerialPrograms/Source/CommonTools/ProgramStats/StatsTracking.cpp renamed to SerialPrograms/Source/CommonFramework/ProgramStats/StatsTracking.cpp

File renamed without changes.

0 commit comments

Comments
 (0)