Skip to content
Snippets Groups Projects
Commit 38841cd5 authored by Jaron Emmenegger's avatar Jaron Emmenegger
Browse files

Implement abstract API interface

parent 0a4b1edf
No related branches found
No related tags found
No related merge requests found
#include "abstractapi.h"
//-------------------------------------------------------------------------------------------------
AbstractApi::AbstractApi()
: mState(None)
{
}
//-------------------------------------------------------------------------------------------------
void AbstractApi::setState(AbstractApi::State s)
{
Q_ASSERT(s != mState);
mState = s;
emit stateChanged(mState);
}
#ifndef ABSTRACTAPI_H
#define ABSTRACTAPI_H
#include <QObject>
class AbstractApi : public QObject
{
public:
enum State
{
None,
Starting,
Running
};
AbstractApi();
void init() = 0;
signals:
void stateChanged(State s);
protected:
void setState(State s);
private:
State mState;
};
#endif // ABSTRACTAPI_H
#include "ceaapp.h"
CeaApp::CeaApp()
{
}
ceaapp.h 0 → 100644
#ifndef CEAAPP_H
#define CEAAPP_H
#include <QObject>
class CeaApp : public QObject
{
public:
CeaApp();
void init();
};
#endif // CEAAPP_H
......@@ -7,4 +7,10 @@ DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
SOURCES += \
abstractapi.cc \
ceaapp.cc \
main.cc
HEADERS += \
abstractapi.h \
ceaapp.h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment