Version: 9.15.0
SUIT_ShortcutModuleAssets Class Reference

GUI-related module assets. More...

#include <SUIT_ShortcutMgr.h>

Inheritance diagram for SUIT_ShortcutModuleAssets:
Inheritance graph

Public Member Functions

 ~SUIT_ShortcutModuleAssets ()=default
 
int depth () const
 
SUIT_ShortcutAssets::Type type () const
 
const QString & bestName (const QString &theLang=QString()) const
 
QString description () const
 
- Public Member Functions inherited from SUIT_ShortcutAssets
virtual ~SUIT_ShortcutAssets ()=0
 
const std::map< QString, std::shared_ptr< SUIT_ShortcutItemAssets > > & children () const
 
std::shared_ptr< SUIT_ShortcutItemAssetsfindDescendantItem (const QString &theRelativeID) const
 
std::shared_ptr< SUIT_ShortcutItemAssetsdescendantItem (const QString &theRelativeID, bool theIsAction=true)
 
bool fromJSON (const QJsonObject &theJsonObject, bool theParseDescendants=true, const std::set< QString > &theLangs={})
 
bool fromJSON (const QJsonObject &theJsonObject, const QString &theRelativeID, const std::set< QString > &theLangs={})
 Parses only the branch of descdendants, which leads to the item with theRelativeID. More...
 
void toJSON (QJsonObject &oJsonObject) const
 
virtual void merge (const SUIT_ShortcutAssets &theOther, bool theOverride)
 
virtual void merge (SUIT_ShortcutAssets &&theOther, bool theOverride)
 
void loadIcon (bool theReload=false)
 
void forEachDescendant (const std::function< void(SUIT_ShortcutItemAssets &)> &theFunc) const
 Iterates all descendants. *this is not iterated. More...
 
void forEachDescendant (const std::function< void(const SUIT_ShortcutItemAssets &)> &theFunc) const
 Iterates all descendants. *this is not iterated. More...
 
void forEachDescendant (const std::function< void(std::shared_ptr< SUIT_ShortcutItemAssets >)> &theFunc) const
 Iterates all descendants. *this is not iterated. More...
 
void forEachDescendant (const std::function< void(std::shared_ptr< const SUIT_ShortcutItemAssets >)> &theFunc) const
 Iterates all descendants. *this is not iterated. More...
 
QString toString () const
 
QStringList getLangs () const
 
void clearAllLangsExcept (const QString &theLang)
 
const LangDependentAssetsbestLangDependentAssets (QString theLang=QString()) const
 
virtual const QString & bestToolTip (const QString &theLang=QString()) const
 

Static Public Member Functions

static std::shared_ptr< SUIT_ShortcutModuleAssetscreate (const QString &theModuleID)
 

Private Member Functions

 SUIT_ShortcutModuleAssets (const QString &theModuleID)
 
 SUIT_ShortcutModuleAssets (const SUIT_ShortcutModuleAssets &)=delete
 
SUIT_ShortcutModuleAssetsoperator= (const SUIT_ShortcutModuleAssets &)=delete
 

Additional Inherited Members

- Public Types inherited from SUIT_ShortcutAssets
enum class  Type { Module , Item }
 
- Public Attributes inherited from SUIT_ShortcutAssets
const QString myModuleID
 
std::map< QString, LangDependentAssetsmyLangDependentAssets
 
QString myIconPath
 
QIcon myIcon
 
- Static Public Attributes inherited from SUIT_ShortcutAssets
static const QString PROP_ID_LANG_DEPENDENT_ASSETS = "langDependentAssets"
 
static const QString PROP_ID_ICON_PATH = "iconPath"
 
static const QString PROP_ID_CHILDREN = "children"
 
- Protected Member Functions inherited from SUIT_ShortcutAssets
 SUIT_ShortcutAssets (const QString &theModuleID)
 

Detailed Description

GUI-related module assets.

Constructor & Destructor Documentation

◆ SUIT_ShortcutModuleAssets() [1/2]

SUIT_ShortcutModuleAssets::SUIT_ShortcutModuleAssets ( const QString &  theModuleID)
private

◆ SUIT_ShortcutModuleAssets() [2/2]

SUIT_ShortcutModuleAssets::SUIT_ShortcutModuleAssets ( const SUIT_ShortcutModuleAssets )
privatedelete

◆ ~SUIT_ShortcutModuleAssets()

SUIT_ShortcutModuleAssets::~SUIT_ShortcutModuleAssets ( )
default

Member Function Documentation

◆ bestName()

const QString & SUIT_ShortcutModuleAssets::bestName ( const QString &  theLang = QString()) const
virtual
Parameters
theLangIf empty, current language is requested.
Returns
Requested name or name in EN, if requested language is absent. If EN is absent - moduleID.

Implements SUIT_ShortcutAssets.

References SUIT_ShortcutAssets::bestLangDependentAssets(), and SUIT_ShortcutAssets::myModuleID.

◆ create()

std::shared_ptr< SUIT_ShortcutModuleAssets > SUIT_ShortcutModuleAssets::create ( const QString &  theModuleID)
static

◆ depth()

int SUIT_ShortcutModuleAssets::depth ( ) const
inlinevirtual

Implements SUIT_ShortcutAssets.

◆ description()

QString SUIT_ShortcutModuleAssets::description ( ) const
virtual

◆ operator=()

SUIT_ShortcutModuleAssets& SUIT_ShortcutModuleAssets::operator= ( const SUIT_ShortcutModuleAssets )
privatedelete

◆ type()

SUIT_ShortcutAssets::Type SUIT_ShortcutModuleAssets::type ( ) const
inlinevirtual

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