mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 04:43:56 -07:00
move code to separate file
This commit is contained in:
parent
981fcdada5
commit
001ed0d7d9
5 changed files with 167 additions and 131 deletions
44
cockatrice/src/interface/recording.h
Normal file
44
cockatrice/src/interface/recording.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef COCKATRICE_RECORDING_H
|
||||
#define COCKATRICE_RECORDING_H
|
||||
|
||||
#include "pqEventObserver.h"
|
||||
#include "pqEventSource.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(RecordingLog, "recording");
|
||||
|
||||
class QXmlStreamReader;
|
||||
class QXmlStreamWriter;
|
||||
|
||||
class XMLEventObserver : public pqEventObserver
|
||||
{
|
||||
QXmlStreamWriter *XMLStream;
|
||||
QString XMLString;
|
||||
|
||||
public:
|
||||
explicit XMLEventObserver(QObject *p);
|
||||
~XMLEventObserver() override;
|
||||
|
||||
protected:
|
||||
void setStream(QTextStream *stream) override;
|
||||
void onRecordEvent(const QString &widget,
|
||||
const QString &command,
|
||||
const QString &arguments,
|
||||
const int &eventType) override;
|
||||
};
|
||||
|
||||
class XMLEventSource : public pqEventSource
|
||||
{
|
||||
QXmlStreamReader *XMLStream;
|
||||
|
||||
public:
|
||||
explicit XMLEventSource(QObject *p);
|
||||
~XMLEventSource() override;
|
||||
|
||||
protected:
|
||||
void setContent(const QString &xmlFileName) override;
|
||||
int getNextEvent(QString &widget, QString &command, QString &arguments, int &eventType) override;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_RECORDING_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue