File indexing completed on 2024-12-15 03:45:05
0001 /* 0002 SPDX-FileCopyrightText: 2016 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: MIT 0005 */ 0006 0007 #ifndef KUSERFEEDBACK_CONSOLE_FEEDBACKCONFIGDIALOG_H 0008 #define KUSERFEEDBACK_CONSOLE_FEEDBACKCONFIGDIALOG_H 0009 0010 #include "kuserfeedbackwidgets_export.h" 0011 #include <QDialog> 0012 0013 #include <memory> 0014 0015 namespace KUserFeedback { 0016 0017 class FeedbackConfigDialogPrivate; 0018 class Provider; 0019 0020 /*! Configure which feedback a user wants to provide. 0021 * 0022 * @see FeedbackConfigWidget 0023 */ 0024 class KUSERFEEDBACKWIDGETS_EXPORT FeedbackConfigDialog : public QDialog 0025 { 0026 Q_OBJECT 0027 public: 0028 /*! Create a new feedback configuration dialog. 0029 * @param parent The parent widget. 0030 */ 0031 explicit FeedbackConfigDialog(QWidget *parent = nullptr); 0032 ~FeedbackConfigDialog() override; 0033 0034 /*! Set the feedback provider that this dialog configures. */ 0035 void setFeedbackProvider(KUserFeedback::Provider *provider); 0036 0037 /*! Accepts the dialog and write changes made by the user to 0038 * the feedback provider. 0039 */ 0040 void accept() override; 0041 0042 private: 0043 std::unique_ptr<FeedbackConfigDialogPrivate> d; 0044 }; 0045 0046 } 0047 0048 #endif // KUSERFEEDBACK_CONSOLE_FEEDBACKCONFIGDIALOG_H