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

Base class for models providing a list or table of available images. More...

#include <abstractimagemodel.h>

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

Properties

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 Member Functions

 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...
 

Signals

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

void clear () override
 Clears the model data. More...
 

Additional Inherited Members

- Public Types inherited from Schauer::AbstractBaseModel
enum  LoadMode : int { LoadAsync, LoadSync }
 Load mode for model. More...
 
- Public Slots inherited from Schauer::AbstractBaseModel
bool load (Schauer::AbstractBaseModel::LoadMode mode=LoadAsync)
 Loads the model data. More...
 

Detailed Description

Base class for models providing a list or table of available images.

This uses ListImagesJob to get a list of images from the docker daemon.

See ImageListModel for a full implementation.

Property Documentation

◆ showAll

bool AbstractImageModel::showAll
readwrite

Set this to true to show all images.

By default this is false and only images from a final layer (no children) are shown.

Access functions
Notifier signal

◆ showDigests

bool AbstractImageModel::showDigests
readwrite

Set this to true to include digest information in the repsone.

By default this is false and the RepoDigests field is not returned for each image.

Access function
Notifier signal

Constructor & Destructor Documentation

◆ AbstractImageModel()

AbstractImageModel::AbstractImageModel ( QObject parent = nullptr)
explicit

Constructs a new AbstractImageModel with the given parent.

◆ ~AbstractImageModel()

AbstractImageModel::~AbstractImageModel ( )
overridedefault

Destroys the AbstractImageModel.

Member Function Documentation

◆ clear()

void AbstractImageModel::clear ( )
overrideprotectedvirtual

Clears the model data.

The default implementation dos nothing.

Reimplemented from Schauer::AbstractBaseModel.

◆ containsRepoTag() [1/2]

bool AbstractImageModel::containsRepoTag ( const QString repo,
const QString tag = QString() 
) const

Returns true if the model contains an image identfied by repo and/or tag.

◆ containsRepoTag() [2/2]

bool AbstractImageModel::containsRepoTag ( QLatin1String  repo,
QLatin1String  tag = QLatin1String() 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ setShowAll()

void AbstractImageModel::setShowAll ( bool  showAll)

Setter function for the showAll property.

See also
showAll(), showAllChanged()

◆ setShowDigests()

void AbstractImageModel::setShowDigests ( bool  showDigests)

Setter function for the showDigests property.

See also
showDigests(), showDigestsChanged()

◆ showAll()

bool Schauer::AbstractImageModel::showAll ( ) const

Getter function for the showAll property.

See also
setShowAll(), showAllChanged()

◆ showAllChanged

void Schauer::AbstractImageModel::showAllChanged ( bool  showAll)
signal

Notifier signal for the showAll property.

See also
showAll(), setShowAll()

◆ showDigests()

bool Schauer::AbstractImageModel::showDigests ( ) const

Getter function for the showDigests property.

See also
setShowDigests(), showDigestsChanged()

◆ showDigestsChanged

void Schauer::AbstractImageModel::showDigestsChanged ( bool  schowDigests)
signal

Notifier signal for the showDigests property.

See also
showDigests(), setShowDigests()

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