KUserFeedback

feedbackconfigwidget.h
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef KUSERFEEDBACK_FEEDBACKCONFIGWIDGET_H
8#define KUSERFEEDBACK_FEEDBACKCONFIGWIDGET_H
9
10#include "kuserfeedbackwidgets_export.h"
11
12#include <KUserFeedback/Provider>
13
14#include <QWidget>
15
16#include <memory>
17
18namespace KUserFeedback {
19
20class FeedbackConfigWidgetPrivate;
21class Provider;
22
23/*!
24 * Configuration widget for telemetry and survey contributions.
25 *
26 * Use this rather than FeedbackConfigDialog if you want to embed the
27 * feedback configuration for example into an existing configuration
28 * dialog.
29 * @see FeedbackConfigDialog
30 */
31class KUSERFEEDBACKWIDGETS_EXPORT FeedbackConfigWidget : public QWidget
32{
33 Q_OBJECT
34public:
35 /*! Create a new feedback provider configuration widget.
36 * @param parent The parent widget.
37 */
38 explicit FeedbackConfigWidget(QWidget *parent = nullptr);
39 ~FeedbackConfigWidget() override;
40
41 /*! Returns the feedback provider configured by this widget. */
42 Provider* feedbackProvider() const;
43
44 /*! Set the feedback provider that should be configured with this widget. */
45 void setFeedbackProvider(Provider *provider);
46
47 /*! Returns the telemetry level currently selected in the widget. */
48 Provider::TelemetryMode telemetryMode() const;
49
50 /*! Returns the survey interval currently selected in this widget. */
51 int surveyInterval() const;
52
53Q_SIGNALS:
54 /*! Emitted when any changes are made to the configuration represented
55 * in this widget.
56 */
58
59protected:
60 ///@cond internal
61 bool eventFilter(QObject *receiver, QEvent *event) override;
62 ///@endcond
63
64private:
65 std::unique_ptr<FeedbackConfigWidgetPrivate> d;
66};
67
68}
69
70#endif // KUSERFEEDBACK_FEEDBACKCONFIGWIDGET_H
Configuration widget for telemetry and survey contributions.
void configurationChanged()
Emitted when any changes are made to the configuration represented in this widget.
The central object managing data sources and transmitting feedback to the server.
Definition provider.h:32
TelemetryMode
Telemetry collection modes.
Definition provider.h:102
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.