|
libschauer
0.0.1
Qt based library to access the Docker HTTP API.
|
Base class for all data models. More...
#include <abstractbasemodel.h>

Public Types | |
| enum | LoadMode : int { LoadAsync, LoadSync } |
| Load mode for model. More... | |
Properties | |
| Schauer::AbstractConfiguration | configuration |
| Pointer to an object providing configuration data. More... | |
| int | error |
| Error code. More... | |
| QString | errorString |
| Human-readable error message. More... | |
| bool | isLoading |
| Indicates loading state. More... | |
Public Member Functions | |
| AbstractBaseModel (QObject *parent=nullptr) | |
| Constructs a new AbstractBaseModel class with the given parent. More... | |
| ~AbstractBaseModel () override | |
| Destroys the AbstractBaseModel object. More... | |
| AbstractConfiguration * | configuration () const |
| Getter function for the configuraion property. More... | |
| int | error () const |
| Returns the error code, if there has been an error. More... | |
| QString | errorString () const |
| Returns the human-readable error message. More... | |
| bool | isLoading () const |
Returns true while the model is loading, otherwise returns false. More... | |
| void | setConfiguration (AbstractConfiguration *configuration) |
| Setter function for the configuraion property. More... | |
Public Slots | |
| bool | load (Schauer::AbstractBaseModel::LoadMode mode=LoadAsync) |
| Loads the model data. More... | |
Signals | |
| void | configurationChanged (Schauer::AbstractConfiguration *configuration) |
| Notifier signal for the configuration property. More... | |
| void | errorChanged (int error) |
| Notifier signal for the error property. More... | |
| void | isLoadingChanged (bool isLoading) |
| Notifier signal for the isLoading property. More... | |
| void | loaded () |
| Emitted to indicate model data loading has been finished. More... | |
Protected Member Functions | |
| virtual void | clear () |
| Clears the model data. More... | |
Base class for all data models.
| enum Schauer::AbstractBaseModel::LoadMode : int |
|
readwrite |
Pointer to an object providing configuration data.
This property holds a pointer to an object of a class derived from AbstractConfiguration that provides configuration information for the API request. It especialls provides the remote host and port. See AbstractConfiguration for more information.
You can also set a global default configuration via Schauer::setDefaultConfiguration() that will be used if no local configuration is available.
|
read |
Error code.
This property holds the error code after the model data hase been loaded. If no error has occured, the error code will be 0. errorString property will hold a human-readble error message.
|
read |
Human-readable error message.
This property holds a translated, human-readable description of the error.
|
read |
Indicates loading state.
This property holds true while the model is loading, otherwise false.
|
explicit |
Constructs a new AbstractBaseModel class with the given parent.
|
overridedefault |
Destroys the AbstractBaseModel object.
|
protectedvirtual |
Clears the model data.
The default implementation dos nothing.
Reimplemented in Schauer::AbstractVersionModel, Schauer::AbstractContainerModel, and Schauer::AbstractImageModel.
| AbstractConfiguration* Schauer::AbstractBaseModel::configuration | ( | ) | const |
Getter function for the configuraion property.
|
signal |
Notifier signal for the configuration property.
| int Schauer::AbstractBaseModel::error | ( | ) | const |
Returns the error code, if there has been an error.
If there has been no error, 0 will be returned.
|
signal |
| QString Schauer::AbstractBaseModel::errorString | ( | ) | const |
| bool Schauer::AbstractBaseModel::isLoading | ( | ) | const |
Returns true while the model is loading, otherwise returns false.
|
signal |
Notifier signal for the isLoading property.
|
slot |
Loads the model data.
Call this function to load the model data either in asynchronous or synchronous mode. When executing load, isLoading property will be true while the model loads its data. After data loading has been finished, isLoading will be false and the loaded() signal will be emitted.
Use the error property to check if an error has occured.
|
signal |
Emitted to indicate model data loading has been finished.
Use error() to check if no error has been occured.
| void AbstractBaseModel::setConfiguration | ( | AbstractConfiguration * | configuration | ) |
Setter function for the configuraion property.
1.8.14