63 const QString &initialTheme = QString());
73 void reject()
override;
76 bool event(QEvent *event)
override;
77 void keyPressEvent(QKeyEvent *event)
override;
78 bool eventFilter(QObject *watched, QEvent *event)
override;
82 void populateThemeList(
const QString &selectStem);
83 QTreeWidgetItem *themeItem(
const QString &stem)
const;
84 void updateListMarker();
85 void themeSelectionChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
86 bool loadTheme(
const QString &stem);
91 bool isBundledDraft()
const;
92 int metaEditedCount()
const;
93 int fontEditedCount()
const;
95 bool maybeSaveChanges();
100 void descriptionEdited();
101 void updateDescriptionHeight();
103 void colorDraftChanged();
105 void updateMetaFields();
108 void tabChanged(
int index);
109 void fillFontFamilies();
110 void updateFontControls();
111 void fillFamilyCombo(QComboBox *combo,
const QStringList &families,
const QString ¤t);
112 void fillSizeCombo(QComboBox *combo,
int current);
113 void fontFamilyChanged(
bool monospace);
114 void fontSizeChanged(
bool monospace);
115 void showFontContextMenu(
bool monospace, QWidget *source,
const QPoint &pos);
116 void updateFontLabels();
117 QFont resolvedFont(
const ThemeFontHint &hint,
bool monospace)
const;
120 void updateCompareCombo();
121 QString compareText();
122 void compareChanged();
123 void updateCodeView();
124 void updateCodeCounts();
125 void updateValidation();
126 bool roundTrips(
const ThemeDraft &draft,
const QString &stem, QByteArray *jsonc =
nullptr)
const;
127 void updateCodeBanner();
128 QByteArray bundledJsonc(
const QString &stem);
132 void updatePlayground();
134 void updateButtons();
136 void refreshThemeDependentLabels();
141 void previewTabChanged(
int index);
143 void previewPickMenu(QMenu *menu, QAction *before,
const QList<ThemePreviewPick::Layer> &layers);
156 bool isActiveTheme(
const QString &stem)
const;
157 void showError(
const QString &text);
158 bool writeDraft(
const ThemeDraft &draft,
const QString &stem);
159 bool saveAsPersonal(
const ThemeDraft &draft,
const QString &stem);
160 void selectWrittenTheme(
const QString &stem);
161 void notifySaved(
const QString &stem,
const QString &removedStem = QString());
162 void activateTheme(
const QString &stem);
173 template <
typename Dialog>
174 auto runChildDialog(Dialog &&dialog) ->
decltype(dialog())
176 auto result = dialog();
181 Ui::ThemeDesignerDialog *ui_;
190 QString current_stem_;
194 QStringList families_;
195 QStringList monospace_families_;
196 QHash<QString, QByteArray> bundled_jsonc_;
197 QByteArray draft_jsonc_;
198 QString validation_error_;
199 QString status_note_;
200 QString status_note_tool_tip_;
201 bool picked_once_ =
false;
202 QHash<QObject *, ThemePreviewPicker *> pickers_;
203 QList<ThemeInfo> themes_;
GeometryStateDialog(QWidget *parent, Qt::WindowFlags f=Qt::Window)
Constructs a new GeometryStateDialog with the specified parent and window flags.
Definition geometry_state_dialog.h:91