Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Persistent.h
Go to the documentation of this file.
1#pragma once
2#include <QObject>
3#include <QStringList>
4#include <misc/global.h>
5
6namespace sf
7{
8
14{
15 public:
20 explicit Persistent(QObject* obj);
21
26 void setSourceObject(QObject* obj);
27
31 [[nodiscard]] QStringList getProperties() const;
32
36 void setProperties(const QStringList&) const;
37
38 protected:
42 QMap<int, const char*> getObjectProperties(const QObject* obj) const;
43
44 private:
45 QObject* _object;
46};
47
48}// namespace sf
Class to multiple inherit which adds functions to read and write properties from a given object....
Definition Persistent.h:14
QStringList getProperties() const
Gets the properties from the object as a string list to store as settings.
QMap< int, const char * > getObjectProperties(const QObject *obj) const
Gets a mapped property list af all properties of the object.
void setProperties(const QStringList &) const
Sets the properties of the object as a string list settings.
Persistent(QObject *obj)
Constructor.
void setSourceObject(QObject *obj)
#define _MISC_DATA
Definition misc/global.h:38
Definition Application.h:10