Workspace 6.21.5
Classes | Public Member Functions | List of all members
PackageItem Class Referenceabstract

Abstract base class for items that can go into a software package.

#include <Package/packageitem.h>

Inheritance diagram for PackageItem:
[legend]

Classes

struct  ApplicationIconDetails
 Data structure describing a single packaged application icon. More...
 
struct  EnvironmentVariableDetails
 Data structure describing a single packaged environment variable. More...
 
struct  ExecutableDetails
 Data structure describing a single packaged executable. More...
 

Public Member Functions

virtual bool addToCMakePackScript (QStringList &cmakeScript) const =0
 
PackageItemclone () const override=0
 
virtual QList< ApplicationIconDetailsgetApplicationIcons () const
 
virtual QList< EnvironmentVariableDetailsgetEnvironmentVariables () const
 
virtual QList< ExecutableDetailsgetExecutables () const
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Member Function Documentation

◆ addToCMakePackScript()

virtual bool addToCMakePackScript ( QStringList cmakeScript) const
pure virtual
Parameters
cmakeScriptUpon entry, this will hold the contents of the CMake script that have been assembled so far. These contents would normally not be modified, but this is permitted if required. Normally, the subclass implementation would simply append to cmakeScript and in some circumstances, it may search for things in cmakeScript to customize entries that will be appended.
Returns
True upon success, or false if an error was encountered that results in the CMake script incomplete or invalid.

Implemented in PackageEnvironmentVariableItemData, PackageDirectoryItemData, PackageExecutableItemData, PackageFileItemData, and PackageItemContainer.

◆ clone()

PackageItem * clone ( ) const
overridepure virtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

We redeclare this function only so that the more derived return type is available without casting.

Implements Clonable.

Implemented in PackageDirectoryItemData, PackageEnvironmentVariableItemData, PackageExecutableItemData, PackageFileItemData, and PackageItemContainer.

◆ getApplicationIcons()

QList< PackageItem::ApplicationIconDetails > getApplicationIcons ( ) const
virtual
Returns
A list of ApplicationIconDetails objects describing the set of application icons provided by this package item. Only those icons needed by ExecutableDetails objects in the package need to be present in this list. Other icons used by the package internally do not need to be included in the list.

The default implementation returns an empty list.

Reimplemented in PackageItemContainer.

◆ getEnvironmentVariables()

QList< PackageItem::EnvironmentVariableDetails > getEnvironmentVariables ( ) const
virtual
Returns
A list of EnvironmentVariableDetails objects for this package item.

The default implementation returns an empty list.

Reimplemented in PackageEnvironmentVariableItemData.

◆ getExecutables()

QList< PackageItem::ExecutableDetails > getExecutables ( ) const
virtual
Returns
A list of ExecutableDetails objects describing the set of executables provided by this package item. Only those executables for which a desktop menu entry is required need to be present in this list. Executables used by the package internally do not need to be included in the list.

The default implementation returns an empty list.

Reimplemented in PackageExecutableItemData, and PackageItemContainer.