summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/recipebrowser/stylesheetdialog.h
blob: ca1b4ae9932a89f414fd84f17aa3eb73660c651b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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