Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
deck_editor_settings_page.h
Go to the documentation of this file.
1#ifndef COCKATRICE_DECK_EDITOR_SETTINGS_PAGE_H
2#define COCKATRICE_DECK_EDITOR_SETTINGS_PAGE_H
3
5
6#include <QCheckBox>
7#include <QLabel>
8#include <QPushButton>
9#include <QString>
10#include <qtmetamacros.h>
11
12class QAction;
13class QGroupBox;
14class QLineEdit;
15class QListWidget;
16class QListWidgetItem;
17class QModelIndex;
18
20{
21 Q_OBJECT
22public:
24 void retranslateUi() override;
25 QString getLastUpdateTime();
26
27private slots:
28 void storeSettings();
29 void urlListChanged(const QModelIndex &, int, int, const QModelIndex &, int);
30 void setSpoilersEnabled(bool);
32 void updateSpoilers();
33 void unlockSettings();
34 void actAddURL();
35 void actRemoveURL();
36 void actEditURL();
37 void actAdjustRateLimit();
39
40private:
41 QPushButton resetDownloadURLs;
44 QListWidget *urlList;
45 QAction *aAdd, *aEdit, *aRemove, *aRateLimit;
50
55 QPushButton *mpSpoilerPathButton;
56 QPushButton *updateNowButton;
57
59 QListWidgetItem *addUrlItem(const QString &url);
60
62 [[nodiscard]] QString urlForItem(const QListWidgetItem *item) const;
63
65 [[nodiscard]] QString urlLabel(const QString &url) const;
66
68 void refreshUrlItems();
69};
70
71#endif // COCKATRICE_DECK_EDITOR_SETTINGS_PAGE_H
Definition abstract_settings_page.h:25
QAction * aRateLimit
Definition deck_editor_settings_page.h:45
QPushButton resetDownloadURLs
Definition deck_editor_settings_page.h:41
QAction * aEdit
Definition deck_editor_settings_page.h:45
QLabel msDownloadSpoilersLabel
Definition deck_editor_settings_page.h:47
QGroupBox * mpSpoilerGroupBox
Definition deck_editor_settings_page.h:49
void storeSettings()
Definition deck_editor_settings_page.cpp:189
QString urlLabel(const QString &url) const
Returns the display label for a URL, including its current effective rate limit.
Definition deck_editor_settings_page.cpp:245
void spoilerPathButtonClicked()
Definition deck_editor_settings_page.cpp:361
void retranslateUi() override
Definition deck_editor_settings_page.cpp:390
QGroupBox * mpGeneralGroupBox
Definition deck_editor_settings_page.h:48
void actRemoveURL()
Definition deck_editor_settings_page.cpp:166
DeckEditorSettingsPage()
Definition deck_editor_settings_page.cpp:42
void actAddURL()
Definition deck_editor_settings_page.cpp:156
QLabel urlLinkLabel
Definition deck_editor_settings_page.h:42
QString urlForItem(const QListWidgetItem *item) const
Returns the raw URL stored on a list item.
Definition deck_editor_settings_page.cpp:240
QLabel lastUpdatedLabel
Definition deck_editor_settings_page.h:53
QListWidget * urlList
Definition deck_editor_settings_page.h:44
QCheckBox picDownloadCheckBox
Definition deck_editor_settings_page.h:43
QString getLastUpdateTime()
Definition deck_editor_settings_page.cpp:347
QPushButton * updateNowButton
Definition deck_editor_settings_page.h:56
QAction * aRemove
Definition deck_editor_settings_page.h:45
QListWidgetItem * addUrlItem(const QString &url)
Adds a list item for the given URL, storing the raw URL alongside its displayed label.
Definition deck_editor_settings_page.cpp:232
QLineEdit * mpSpoilerSavePathLineEdit
Definition deck_editor_settings_page.h:51
QCheckBox mcDownloadSpoilersCheckBox
Definition deck_editor_settings_page.h:46
void unlockSettings()
Definition deck_editor_settings_page.cpp:341
QLabel infoOnSpoilersLabel
Definition deck_editor_settings_page.h:54
void actEditURL()
Definition deck_editor_settings_page.cpp:174
void refreshUrlItems()
Refreshes the displayed label of every URL item after limits or settings change.
Definition deck_editor_settings_page.cpp:265
void actAdjustRateLimit()
Definition deck_editor_settings_page.cpp:273
void resetDownloadedURLsButtonClicked()
Definition deck_editor_settings_page.cpp:146
QPushButton * mpSpoilerPathButton
Definition deck_editor_settings_page.h:55
void setSpoilersEnabled(bool)
Definition deck_editor_settings_page.cpp:375
QAction * aAdd
Definition deck_editor_settings_page.h:45
QLabel mcSpoilerSaveLabel
Definition deck_editor_settings_page.h:52
void updateSpoilers()
Definition deck_editor_settings_page.cpp:329
void urlListChanged(const QModelIndex &, int, int, const QModelIndex &, int)
Definition deck_editor_settings_page.cpp:324