diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /source/mod_uploader/StarModUploader.hpp | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'source/mod_uploader/StarModUploader.hpp')
-rw-r--r-- | source/mod_uploader/StarModUploader.hpp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/source/mod_uploader/StarModUploader.hpp b/source/mod_uploader/StarModUploader.hpp new file mode 100644 index 0000000..603b42f --- /dev/null +++ b/source/mod_uploader/StarModUploader.hpp @@ -0,0 +1,59 @@ +#ifndef STAR_MOD_UPLOADER +#define STAR_MOD_UPLOADER + +#include <QMainWindow> +#include <QLabel> +#include <QListWidget> +#include <QLineEdit> +#include <QPlainTextEdit> +#include <QPushButton> +#include <QCheckBox> + +#include "steam/steam_api.h" + +#include "StarDirectoryAssetSource.hpp" +#include "StarSPlainTextEdit.hpp" + +namespace Star { + +class ModUploader : public QMainWindow { + Q_OBJECT +public: + ModUploader(); + +private slots: + void selectDirectory(); + void loadDirectory(); + void selectPreview(); + void writeMetadata(); + void writePreview(); + void resetModId(); + void uploadToSteam(); + +private: + void onSteamCreateItem(CreateItemResult_t* result, bool ioFailure); + void onSteamSubmitItem(SubmitItemUpdateResult_t* result, bool ioFailure); + + QPushButton* m_reloadButton; + QLabel* m_directoryLabel; + QLineEdit* m_nameEditor; + QLineEdit* m_titleEditor; + QLineEdit* m_authorEditor; + QLineEdit* m_versionEditor; + SPlainTextEdit* m_descriptionEditor; + QLabel* m_previewImageLabel; + QLabel* m_modIdLabel; + QWidget* m_editorSection; + HashMap<String, QCheckBox*> m_categorySelectors; + + Maybe<String> m_modDirectory; + Maybe<DirectoryAssetSource> m_assetSource; + QImage m_modPreview; + + Maybe<pair<CreateItemResult_t, bool>> m_steamItemCreateResult; + Maybe<pair<SubmitItemUpdateResult_t, bool>> m_steamItemSubmitResult; +}; + +} + +#endif |