Styles was added
This commit is contained in:
34
models/abstractmodel.h
Normal file
34
models/abstractmodel.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef ABSTRACTMODEL_H
|
||||
#define ABSTRACTMODEL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QVariantMap>
|
||||
|
||||
class BeerService;
|
||||
class AbstractModel : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString entity READ entity CONSTANT)
|
||||
|
||||
public:
|
||||
explicit AbstractModel(QObject *parent = nullptr);
|
||||
|
||||
virtual QString entity() const = 0;
|
||||
|
||||
public slots:
|
||||
void created(const QVariant &data);
|
||||
void modified(const QVariant &data);
|
||||
void deleted(const QVariant &data);
|
||||
void received(const QVariant &data);
|
||||
|
||||
signals:
|
||||
void dataChanged();
|
||||
|
||||
protected:
|
||||
BeerService *service() const;
|
||||
|
||||
QVariantMap m_data;
|
||||
};
|
||||
|
||||
#endif // ABSTRACTMODEL_H
|
||||
Reference in New Issue
Block a user