File indexing completed on 2024-05-12 16:40:07
0001 /* This file is part of the KDE project 0002 Copyright (C) 2012 Jarosław Staniek <staniek@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KEXIUSERFEEDBACKAGENT_H 0021 #define KEXIUSERFEEDBACKAGENT_H 0022 0023 #include <QObject> 0024 0025 class KJob; 0026 0027 //! User Feedback Agent 0028 class KexiUserFeedbackAgent : public QObject 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 explicit KexiUserFeedbackAgent(QObject* parent = 0); 0034 0035 ~KexiUserFeedbackAgent(); 0036 0037 enum Area { 0038 NoAreas = 0, 0039 BasicArea = 1, 0040 AnonymousIdentificationArea = 2, 0041 SystemInfoArea = 4, 0042 ScreenInfoArea = 8, 0043 RegionalSettingsArea = 16, 0044 AllAreas = 31, 0045 }; 0046 Q_DECLARE_FLAGS(Areas, Area) 0047 0048 void setEnabledAreas(Areas areas); 0049 0050 Areas enabledAreas() const; 0051 0052 QVariant value(const QString& key) const; 0053 0054 QString serviceUrl() const; 0055 0056 Q_SIGNALS: 0057 void redirectLoaded(); 0058 0059 public Q_SLOTS: 0060 void waitForRedirect(QObject *receiver, const char* slot); 0061 0062 private Q_SLOTS: 0063 void sendDataFinished(KJob* job); 0064 void sendRedirectQuestionFinished(KJob* job); 0065 0066 private: 0067 void sendData(); 0068 void sendRedirectQuestion(); 0069 0070 class Private; 0071 Private * const d; 0072 }; 0073 0074 Q_DECLARE_OPERATORS_FOR_FLAGS(KexiUserFeedbackAgent::Areas) 0075 0076 #endif