summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/recipebrowser/stylesheetdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webenginewidgets/recipebrowser/stylesheetdialog.h')
-rw-r--r--examples/webenginewidgets/recipebrowser/stylesheetdialog.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/webenginewidgets/recipebrowser/stylesheetdialog.h b/examples/webenginewidgets/recipebrowser/stylesheetdialog.h
new file mode 100644
index 000000000..ca1b4ae99
--- /dev/null
+++ b/examples/webenginewidgets/recipebrowser/stylesheetdialog.h
@@ -0,0 +1,39 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef STYLESHEETDIALOG_H
+#define STYLESHEETDIALOG_H
+
+#include <QDialog>
+#include <QListWidgetItem>
+
+QT_BEGIN_NAMESPACE
+namespace Ui {
+class StylesheetDialog;
+}
+QT_END_NAMESPACE
+
+typedef QPair<QString, bool> StyleSheet; // <source, isEnabled>
+Q_DECLARE_METATYPE(StyleSheet);
+
+class StylesheetDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit StylesheetDialog(QWidget *parent = 0);
+ ~StylesheetDialog();
+
+private slots:
+ void currentStyleSheetChanged(QListWidgetItem *current, QListWidgetItem *previous);
+ void listItemClicked(QListWidgetItem *item);
+ void fileNameChanged(const QString &text);
+
+ void addButtonClicked();
+ void removeButtonClicked();
+
+private:
+ Ui::StylesheetDialog *ui;
+};
+
+#endif // STYLESHEETDIALOG_H