libschauer  0.0.1
Qt based library to access the Docker HTTP API.
Public Types | Public Member Functions | List of all members
Schauer::ImageListModel Class Reference

List model providing available images. More...

#include <Schauer/ImageListModel>

Inheritance diagram for Schauer::ImageListModel:
Inheritance graph
[legend]

Public Types

enum  Roles : int {
  IdRole = Qt::UserRole + 1, ParentIdRole, RepoTagsRole, RepoDigestsRole,
  CreatedRole, SizeRole, VirtualSizeRole, SharedSizeRole,
  LabelsRole, ContainersRole
}
 Roles used to access the model data. More...
 
- Public Types inherited from Schauer::AbstractBaseModel
enum  LoadMode : int { LoadAsync, LoadSync }
 Load mode for model. More...
 

Public Member Functions

 ImageListModel (QObject *parent=nullptr)
 Constructs a new ImageListModel with the given parent. More...
 
 ~ImageListModel () override
 Destroys the ImageListModel. More...
 
- Public Member Functions inherited from Schauer::AbstractImageModel
 AbstractImageModel (QObject *parent=nullptr)
 Constructs a new AbstractImageModel with the given parent. More...
 
 ~AbstractImageModel () override
 Destroys the AbstractImageModel. More...
 
bool containsRepoTag (const QString &repo, const QString &tag=QString()) const
 Returns true if the model contains an image identfied by repo and/or tag. More...
 
bool containsRepoTag (QLatin1String repo, QLatin1String tag=QLatin1String()) const
 
void setShowAll (bool showAll)
 Setter function for the showAll property. More...
 
void setShowDigests (bool showDigests)
 Setter function for the showDigests property. More...
 
bool showAll () const
 Getter function for the showAll property. More...
 
bool showDigests () const
 Getter function for the showDigests property. More...
 
- Public Member Functions inherited from Schauer::AbstractBaseModel
 AbstractBaseModel (QObject *parent=nullptr)
 Constructs a new AbstractBaseModel class with the given parent. More...
 
 ~AbstractBaseModel () override
 Destroys the AbstractBaseModel object. More...
 
AbstractConfigurationconfiguration () 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...
 

Additional Inherited Members

- Properties inherited from Schauer::AbstractImageModel
bool showAll
 Set this to true to show all images. More...
 
bool showDigests
 Set this to true to include digest information in the repsone. More...
 
- Properties inherited from Schauer::AbstractBaseModel
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 Slots inherited from Schauer::AbstractBaseModel
bool load (Schauer::AbstractBaseModel::LoadMode mode=LoadAsync)
 Loads the model data. More...
 
- Signals inherited from Schauer::AbstractImageModel
void showAllChanged (bool showAll)
 Notifier signal for the showAll property. More...
 
void showDigestsChanged (bool schowDigests)
 Notifier signal for the showDigests property. More...
 
- Signals inherited from Schauer::AbstractBaseModel
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 inherited from Schauer::AbstractImageModel
void clear () override
 Clears the model data. More...
 

Detailed Description

List model providing available images.

Member Enumeration Documentation

◆ Roles

Roles used to access the model data.

Mainly used to access the model data from QML.

Enumerator
IdRole 

The ID of the image. Accessor: id, Type: QString

ParentIdRole 

The ID of an optional parent image. Accessor: parentId, Type: QString

RepoTagsRole 

Tags used to identify the image. Accessor: repoTags, Type: QStringList

RepoDigestsRole 

Digests used to identify the image. Accessor: repoDigests, Type: QStringList

CreatedRole 

Date and time the image has been created. Accessor: created, Type: QDateTime

SizeRole 

The size of the image. Accessor: size, Type: qint64

VirtualSizeRole 

The virtual size of the image. Accessor: virtualSize, Type: qint64

SharedSizeRole 

The shared size of the image. Accessor: sharedSize, Type: qint64

LabelsRole 

Used defind key/value pairs. Accessor: labels, Type: QMap<QString, QString>

ContainersRole 

Number of containers created from this image. Accessor: containers, Type: int

Constructor & Destructor Documentation

◆ ImageListModel()

ImageListModel::ImageListModel ( QObject parent = nullptr)
explicit

Constructs a new ImageListModel with the given parent.

◆ ~ImageListModel()

ImageListModel::~ImageListModel ( )
overridedefault

Destroys the ImageListModel.


The documentation for this class was generated from the following files: