Commit a7568d74 authored by Volker Krause's avatar Volker Krause
Browse files

Move ProviderPrivate declaration into its own file

parent dfdad704
......@@ -17,12 +17,12 @@
#include <config-userfeedback-version.h>
#include "abstractdatasource.h"
#include "provider.h"
#include "provider_p.h"
#include "abstractdatasource.h"
#include "surveyinfo.h"
#include <QCoreApplication>
#include <QDateTime>
#include <QDebug>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QJsonArray>
......@@ -33,9 +33,6 @@
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QSettings>
#include <QStringList>
#include <QTime>
#include <QTimer>
#include <QUrl>
#include <algorithm>
......@@ -43,59 +40,6 @@
using namespace UserFeedback;
namespace UserFeedback {
class ProviderPrivate
{
public:
ProviderPrivate(Provider *qq);
~ProviderPrivate();
void reset();
int currentApplicationTime() const;
void load();
void store();
void aboutToQuit();
QByteArray jsonData() const;
void scheduleNextSubmission();
void submitFinished();
void selectSurvey(const SurveyInfo &survey) const;
void scheduleEncouragement();
void emitShowEncouragementMessage();
Provider *q;
QString productId;
QTimer submissionTimer;
QNetworkAccessManager *networkAccessManager;
QUrl serverUrl;
QDateTime lastSubmitTime;
int submissionInterval;
Provider::StatisticsCollectionMode statisticsMode;
int surveyInterval;
QDateTime lastSurveyTime;
QStringList completedSurveys;
QTime startTime;
int startCount;
int usageTime;
QTimer encouragementTimer;
int encouragementStarts;
int encouragementTime;
int encouragementDelay;
bool encouragementDisplayed;
QVector<AbstractDataSource*> dataSources;
};
}
ProviderPrivate::ProviderPrivate(Provider *qq)
: q(qq)
, networkAccessManager(Q_NULLPTR)
......
......@@ -23,7 +23,6 @@
#include <QObject>
#include <QUrl>
namespace UserFeedback {
class AbstractDataSource;
......
/*
Copyright (C) 2017 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef USERFEEDBACK_PROVIDER_P_H
#define USERFEEDBACK_PROVIDER_P_H
#include "provider.h"
#include <QDateTime>
#include <QStringList>
#include <QTime>
#include <QTimer>
#include <QVector>
QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
QT_END_NAMESPACE
namespace UserFeedback {
class ProviderPrivate
{
public:
ProviderPrivate(Provider *qq);
~ProviderPrivate();
void reset();
int currentApplicationTime() const;
void load();
void store();
void aboutToQuit();
QByteArray jsonData() const;
void scheduleNextSubmission();
void submitFinished();
void selectSurvey(const SurveyInfo &survey) const;
void scheduleEncouragement();
void emitShowEncouragementMessage();
Provider *q;
QString productId;
QTimer submissionTimer;
QNetworkAccessManager *networkAccessManager;
QUrl serverUrl;
QDateTime lastSubmitTime;
int submissionInterval;
Provider::StatisticsCollectionMode statisticsMode;
int surveyInterval;
QDateTime lastSurveyTime;
QStringList completedSurveys;
QTime startTime;
int startCount;
int usageTime;
QTimer encouragementTimer;
int encouragementStarts;
int encouragementTime;
int encouragementDelay;
bool encouragementDisplayed;
QVector<AbstractDataSource*> dataSources;
};
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment