summaryrefslogtreecommitdiffstats
path: root/tests/manual/examples/widgets/tools/plugandpaint/app/plugindialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/examples/widgets/tools/plugandpaint/app/plugindialog.h')
-rw-r--r--tests/manual/examples/widgets/tools/plugandpaint/app/plugindialog.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/tools/plugandpaint/app/plugindialog.h b/tests/manual/examples/widgets/tools/plugandpaint/app/plugindialog.h
new file mode 100644
index 0000000000..32b8aa6fe0
--- /dev/null
+++ b/tests/manual/examples/widgets/tools/plugandpaint/app/plugindialog.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef PLUGINDIALOG_H
+#define PLUGINDIALOG_H
+
+#include <QDialog>
+#include <QIcon>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QPushButton;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+class PluginDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ PluginDialog(const QString &path, const QStringList &fileNames,
+ QWidget *parent = nullptr);
+
+private:
+ void findPlugins(const QString &path, const QStringList &fileNames);
+ void populateTreeWidget(QObject *plugin, const QString &text);
+ void addItems(QTreeWidgetItem *pluginItem, const char *interfaceName,
+ const QStringList &features);
+
+ QLabel *label = nullptr;
+ QTreeWidget *treeWidget = nullptr;
+ QPushButton *okButton = nullptr;
+ QIcon interfaceIcon;
+ QIcon featureIcon;
+};
+
+#endif