17#include <QProgressBar>
19#include <QStackedWidget>
63 void error(
const QString& message);
76 std::atomic<bool> cancelled_{
false};
118 QLabel* thumbnailLabel_ =
nullptr;
119 QLabel* infoLabel_ =
nullptr;
120 bool selected_ =
false;
121 bool hovered_ =
false;
139 void setGame(
const QString& gameName,
int steamAppId = 0);
144 return selectedGridPath_;
148 return selectedHeroPath_;
152 return selectedLogoPath_;
156 return selectedIconPath_;
163 void onSearchClicked();
164 void onGameSelected(QListWidgetItem* item);
165 void onImageTypeChanged(
int index);
166 void onSearchComplete(
const std::vector<SteamGridDBGame>& games);
167 void onImagesLoaded(
const std::vector<SteamGridDBImage>& images);
168 void onDownloadComplete(
bool success,
const QString& localPath);
169 void onError(
const QString& message);
172 void onApplyClicked();
177 void setupSearchPanel(QWidget* panel);
178 void setupImagePanel(QWidget* panel);
179 void clearImageGrid();
180 void loadThumbnails();
181 void downloadSelectedImage();
182 void startSearch(
const QString& query);
183 void loadImagesForGame(
int gameId);
187 int selectedGameId_ = 0;
190 QString selectedGridPath_;
191 QString selectedHeroPath_;
192 QString selectedLogoPath_;
193 QString selectedIconPath_;
199 QLineEdit* searchEdit_ =
nullptr;
200 QPushButton* searchBtn_ =
nullptr;
201 QListWidget* gameList_ =
nullptr;
202 QLabel* gameInfoLabel_ =
nullptr;
203 QComboBox* imageTypeCombo_ =
nullptr;
204 QScrollArea* imageScrollArea_ =
nullptr;
205 QWidget* imageGridWidget_ =
nullptr;
206 QGridLayout* imageGridLayout_ =
nullptr;
207 QLabel* statusLabel_ =
nullptr;
208 QProgressBar* progressBar_ =
nullptr;
209 QPushButton* applyBtn_ =
nullptr;
210 QPushButton* cancelBtn_ =
nullptr;
211 QStackedWidget* contentStack_ =
nullptr;
220 std::vector<ArtworkPreviewWidget*> previewWidgets_;
224 QThread* workerThread_ =
nullptr;
226 std::atomic<bool> loading_{
false};
228 ThemeManager* themeManager_;
Async image loader using QThreadPool.
void error(const QString &message)
void downloadComplete(bool success, const QString &localPath)
SteamGridDBSearchWorker(QObject *parent=nullptr)
void setSearchQuery(const QString &query)
void searchComplete(const std::vector< SteamGridDBGame > &games)
void setImageType(SteamGridImageType type)
void imagesLoaded(const std::vector< SteamGridDBImage > &images)
void setGameId(int gameId)
void doDownloadImage(const SteamGridDBImage &image, const QString &gameName)
void setSteamAppId(int appId)
SteamGridDBSelectorDialog(QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
QString getSelectedGridPath() const
QString getSelectedIconPath() const
bool hasSelection() const
void setGame(const QString &gameName, int steamAppId=0)
QString getSelectedHeroPath() const
QString getSelectedLogoPath() const
~SteamGridDBSelectorDialog() override
Image result from SteamGridDB.