Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
af8be50
add resource downloading table - minimal implementation
jw098 Mar 15, 2026
34fd060
move ResourceDownloadTable.h to ResourceDownload folder
jw098 Mar 15, 2026
14bb494
add DownloadButton and DownloadButtonWidget
jw098 Mar 15, 2026
9c8044d
add Delete Button
jw098 Mar 15, 2026
9bb0892
add_rows_from_resource_list_json
jw098 Mar 16, 2026
98aee6c
refactor so that we keep a handle on m_resources and m_resource_rows.
jw098 Mar 16, 2026
4c1d407
check if resource is downloaded
jw098 Mar 17, 2026
6554806
check if downloaded. add "Version" column
jw098 Mar 17, 2026
60c4024
add DOWNLOADED_RESOURCE_PATH()
jw098 Mar 17, 2026
f7a6652
initial implementation of updating "Version" column on a separate thr…
jw098 Mar 17, 2026
e582f0f
initialize worker thread outside of constructor
jw098 Mar 18, 2026
64ae1e6
convert member fields to PIMPL
jw098 Mar 18, 2026
be129ed
add version number to the JSON
jw098 Mar 19, 2026
058e8c1
update version_num, version_status for each row
jw098 Mar 19, 2026
b136c2f
refactor Row class into its own file
jw098 Mar 20, 2026
767d148
clicking Download button disables it until action is done
jw098 Mar 20, 2026
008317c
add download pop-up
jw098 Mar 21, 2026
881349b
move functions to Helper class to avoid circular dependency. lazy ini…
jw098 Mar 24, 2026
d30759c
cleanup headers
jw098 Mar 24, 2026
18362a0
print to console when throwing ParseException
jw098 Mar 25, 2026
1736cb8
update exception handling within the thread. add predownload_warning_…
jw098 Mar 25, 2026
8b9e41e
FileDownloader::download_file_to_disk
jw098 Mar 26, 2026
fafd581
initial progress bar implementation
jw098 Mar 26, 2026
6d6d9ad
fix Download button
jw098 Mar 27, 2026
2ad2b73
added static progress bar to UI
jw098 Mar 27, 2026
d63ed48
refactor. move functions out of DownloadButton into Row. Move buttons…
jw098 Mar 27, 2026
07450a8
more refactor of ResourceDownloadRow class. pass local_metadata to it…
jw098 Mar 27, 2026
c91ece7
working implementation of Progress bar. fix inheritance for DownloadW…
jw098 Mar 27, 2026
5e9d39d
download failed pop-up if internet disconnected.
jw098 Mar 27, 2026
ee4fd7e
delete folder prior to downloading. create parent directory during th…
jw098 Mar 31, 2026
a154fbe
catch errors with get_resource_version_num()
jw098 Mar 31, 2026
0b4a5f9
add unzip progress bar
jw098 Mar 31, 2026
17a280d
minor UI changes with the progress bar
jw098 Mar 31, 2026
eaa37db
minor fix
jw098 Mar 31, 2026
d9012ca
update the Version and Downloaded column after downloading
jw098 Apr 1, 2026
918f18f
add cancel button
jw098 Apr 1, 2026
7889422
add cancel callback to download routine
jw098 Apr 1, 2026
8913a4b
add cancel callback to unzip function
jw098 Apr 2, 2026
4196b88
refactor: move logic from DownloadButton class to DownloadRow class.
jw098 Apr 2, 2026
a61d90b
implement delete action for Delete button
jw098 Apr 2, 2026
861031d
unzip routine will throw OperationCancelledException if cancelled. an…
jw098 Apr 3, 2026
8620003
adjust logic that updates button state
jw098 Apr 3, 2026
30adc57
update UI state for progress bar
jw098 Apr 4, 2026
3821cc0
adjust text and width of buttons
jw098 Apr 4, 2026
bd42eca
get SHA 256 after each download
jw098 Apr 8, 2026
9ab8984
compare with expected hash
jw098 Apr 8, 2026
ab0a65e
minior UI changes. update file size in table to KiB/MiB/GiB.
jw098 Apr 8, 2026
fccc36a
minor changes
jw098 Apr 8, 2026
be7f2ab
remove tabs
jw098 Apr 8, 2026
e29ba6c
fix build
jw098 Apr 8, 2026
66dca0d
fix build
jw098 Apr 9, 2026
a3d376f
use Filesystem::Path instead of implicitly using std::filesystem
jw098 Apr 9, 2026
0932d46
fix build
jw098 Apr 9, 2026
4b82781
draft: use CancellableScope
jw098 Apr 11, 2026
80e2d68
move thread into DownloadThread class
jw098 Apr 14, 2026
bdcf4bc
refactor DownloadThread and its lifetime
jw098 Apr 16, 2026
0f3578c
update initialization of DownloadThread to use factory method to ensu…
jw098 Apr 16, 2026
df47629
fix ResourceDownload buttons, which fixes the issue with blank box in…
jw098 Apr 16, 2026
741d1c6
add missing semicolon
jw098 Apr 17, 2026
92621b6
add DownloadListener. first step of migration away from Qt signals
jw098 Apr 17, 2026
772573e
remove Qt signals from DownloadRow. remove slots from DownloadWidget
jw098 Apr 18, 2026
e9d4712
fix build
jw098 Apr 18, 2026
d2f708a
minor refactor
jw098 Apr 18, 2026
0e07929
update table labels
jw098 Apr 18, 2026
8e09153
minor
jw098 Apr 18, 2026
d2071fc
change progress updates from percentage to bytes_done, total_bytes
jw098 Apr 19, 2026
b69fcbb
remove extra semi colons
jw098 Apr 19, 2026
5255230
remove qint64 from header
jw098 Apr 19, 2026
061e8de
LabelCellWidget: remove listener
jw098 Apr 19, 2026
41cd51b
remove spaces
jw098 Apr 19, 2026
a102cfc
Merge branch 'main' into download-table
jw098 Apr 19, 2026
1132e99
remove spaces
jw098 Apr 19, 2026
17c1d20
remove ResourceType::ZIP_FILE
jw098 Apr 20, 2026
2bd1f08
Merge branch 'main' into download-table
jw098 Apr 20, 2026
992bc2c
minor fixes
jw098 Apr 21, 2026
175fe11
add MAX_CONCURRENT_DOWNLOADS. DownloadThreads check their position in…
jw098 May 3, 2026
5f55e7a
Merge branch 'main' into download-table
jw098 May 3, 2026
6f7a4e9
check ActionState before proceeding with the action
jw098 May 4, 2026
1b06111
add PRE_DELETE, PRE_DOWNLOAD ActionState
jw098 May 4, 2026
89bd2ca
Block button actions if not in the correct ActionState
jw098 May 4, 2026
d4a128d
minor update
jw098 May 4, 2026
1bec6ce
ensure correct ActionState at start of ensure_remote_metadata_loaded
jw098 May 4, 2026
8786b50
change unique_lock to lock_guard
jw098 May 4, 2026
4d182b2
add pop-up for cancelling download
jw098 May 4, 2026
0c083b8
remove old comments
jw098 May 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ GlobalSettings::GlobalSettings()
PA_ADD_OPTION(TEMP_FOLDER);
PA_ADD_OPTION(THEME);
PA_ADD_OPTION(USE_PADDLE_OCR);
PA_ADD_OPTION(RESOURCE_DOWNLOAD_TABLE);
PA_ADD_OPTION(WINDOW_SIZE);
PA_ADD_OPTION(LOG_WINDOW_SIZE);
PA_ADD_OPTION(LOG_WINDOW_STARTUP);
Expand Down
2 changes: 2 additions & 0 deletions SerialPrograms/Source/CommonFramework/GlobalSettingsPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "Common/Cpp/Options/ButtonOption.h"
#include "CommonFramework/Panels/SettingsPanel.h"
#include "CommonFramework/Panels/PanelTools.h"
#include "CommonFramework/ResourceDownload/ResourceDownloadTable.h"

//#include <iostream>
//using std::cout;
Expand Down Expand Up @@ -124,6 +125,7 @@ class GlobalSettings : public BatchOption, private ConfigOption::Listener, priva

Pimpl<ThemeSelectorOption> THEME;
BooleanCheckBoxOption USE_PADDLE_OCR;
ResourceDownloadTable RESOURCE_DOWNLOAD_TABLE;
Pimpl<ResolutionOption> WINDOW_SIZE;
Pimpl<ResolutionOption> LOG_WINDOW_SIZE;
BooleanCheckBoxOption LOG_WINDOW_STARTUP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace Filesystem{
struct DownloadedResourceMetadata{
std::string resource_name;
std::optional<uint16_t> version_num;
size_t size_compressed_bytes;
size_t size_decompressed_bytes;
uint64_t size_compressed_bytes;
uint64_t size_decompressed_bytes;
std::string url;
std::string sha256;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Resource Download Row
*
* From: https://github.com/PokemonAutomation/
*
*/

#include "ResourceDownloadRow.h"
#include "ResourceDownloadOptions.h"

// #include <thread>

#include <iostream>
using std::cout;
using std::endl;

namespace PokemonAutomation{

// ResourceDownloadButton::~ResourceDownloadButton(){}
ResourceDownloadButton::ResourceDownloadButton(ResourceDownloadRow& p_row)
: ConfigOptionImpl<ResourceDownloadButton>(LockMode::UNLOCK_WHILE_RUNNING)
, row(p_row)
, m_enabled(true)
{}


ResourceDeleteButton::ResourceDeleteButton(ResourceDownloadRow& p_row)
: ConfigOptionImpl<ResourceDeleteButton>(LockMode::UNLOCK_WHILE_RUNNING)
, row(p_row)
, m_enabled(true)
{}


ResourceCancelButton::ResourceCancelButton(ResourceDownloadRow& p_row)
: ConfigOptionImpl<ResourceCancelButton>(LockMode::UNLOCK_WHILE_RUNNING)
, row(p_row)
, m_enabled(true)
{}


ResourceProgressBar::ResourceProgressBar(ResourceDownloadRow& p_row)
: ConfigOptionImpl<ResourceProgressBar>(LockMode::UNLOCK_WHILE_RUNNING)
, row(p_row)
{}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/* Resource Download Row
*
* From: https://github.com/PokemonAutomation/
*
*/

#ifndef PokemonAutomation_ResourceDownloadOptions_H
#define PokemonAutomation_ResourceDownloadOptions_H

// #include "Common/Cpp/Containers/Pimpl.h"
// #include "Common/Cpp/Concurrency/AsyncTask.h"
// #include "Common/Cpp/Options/StaticTableOption.h"
// #include "ResourceDownloadHelpers.h"


namespace PokemonAutomation{

class ResourceDownloadRow;


class ResourceDownloadButton : public ConfigOptionImpl<ResourceDownloadButton>{
public:
// ~ResourceDownloadButton();
ResourceDownloadButton(ResourceDownloadRow& p_row);

public:
inline bool get_enabled(){ return m_enabled; }
inline void set_enabled(bool enabled){
m_enabled = enabled;
}

public:
ResourceDownloadRow& row;

private:
bool m_enabled; // button should be blocked during an active task. m_enabled is false when blocked




};

class ResourceDeleteButton : public ConfigOptionImpl<ResourceDeleteButton>{
public:
ResourceDeleteButton(ResourceDownloadRow& p_row);

public:
inline bool get_enabled(){ return m_enabled; }
inline void set_enabled(bool enabled){
m_enabled = enabled;
}

public:
ResourceDownloadRow& row;

private:
bool m_enabled;
};

class ResourceCancelButton : public ConfigOptionImpl<ResourceCancelButton>{
public:
ResourceCancelButton(ResourceDownloadRow& p_row);

public:
inline bool get_enabled(){ return m_enabled; }
inline void set_enabled(bool enabled){
m_enabled = enabled;
}

public:
ResourceDownloadRow& row;

private:
bool m_enabled;
};

class ResourceProgressBar : public ConfigOptionImpl<ResourceProgressBar>{
public:
ResourceProgressBar(ResourceDownloadRow& p_row);

ResourceDownloadRow& row;
};



}
#endif
Loading