PluginCache Class Reference

#include <ArmarXGui/libraries/ArmarXGuiBase/PluginCache.h>

Public Member Functions

bool cachePlugin (const QString &pluginPath)
 
bool cacheWidget (QString widgetName, ArmarXWidgetInfoPtr widgetCreator)
 
void clearCacheFile ()
 
void copyResourcesToCache ()
 
QStringList getAvailableWidgetNames () const
 
WidgetCreatorMap getAvailableWidgets () const
 
QByteArray getHash (const QString &pluginPath)
 
ArmarXWidgetInfoPtr getWidgetCreator (const QString &widgetName)
 
 PluginCache (ArmarXManagerPtr manager)
 
void preloadAsync (QStringList widgetNames, int delayMS=1000)
 
void removePluginFromCache (QString pluginPath)
 
void removeWidgetFromCache (QString pluginPath, QString widgetName)
 
 ~PluginCache ()
 

Static Public Member Functions

static bool ContainsAny (const QString &str, const QStringList &items)
 
static QString GetCategoryIconPath (const QString &widgetName)
 
static QString GetIconCachePath ()
 
static QString GetIconPath (const QString &widgetName)
 

Public Attributes

const QString settingsApplicationName = "/PluginCache.conf"
 
const QString settingsOrganization = "KIT"
 

Protected Member Functions

PluginData loadFromCache (const QString &pluginPath)
 
WidgetCreatorMap loadPlugin (QSharedPointer< QPluginLoader > loader)
 
void updateLastModifiedTimestamp (const QString &pluginPath)
 
void writeToCache (const QString &pluginPath)
 

Protected Attributes

std::recursive_mutex cacheMutex
 
const QString cachePath
 
ArmarXManagerPtr manager
 
QMap< QString, PluginData > pluginData
 
std::future< void > preloadFuture
 
QSettings s
 
bool shutdown = false
 

Constructor & Destructor Documentation

◆ PluginCache()

◆ ~PluginCache()

Member Function Documentation

◆ cachePlugin()

bool cachePlugin ( const QString & pluginPath)

◆ cacheWidget()

bool cacheWidget ( QString widgetName,
ArmarXWidgetInfoPtr widgetCreator )

◆ clearCacheFile()

void clearCacheFile ( )

◆ ContainsAny()

bool ContainsAny ( const QString & str,
const QStringList & items )
static

◆ copyResourcesToCache()

void copyResourcesToCache ( )

◆ getAvailableWidgetNames()

QStringList getAvailableWidgetNames ( ) const

◆ getAvailableWidgets()

WidgetCreatorMap getAvailableWidgets ( ) const

◆ GetCategoryIconPath()

QString GetCategoryIconPath ( const QString & widgetName)
static

◆ getHash()

QByteArray getHash ( const QString & pluginPath)

◆ GetIconCachePath()

QString GetIconCachePath ( )
static

◆ GetIconPath()

QString GetIconPath ( const QString & widgetName)
static

◆ getWidgetCreator()

ArmarXWidgetInfoPtr getWidgetCreator ( const QString & widgetName)

◆ loadFromCache()

PluginData loadFromCache ( const QString & pluginPath)
protected

◆ loadPlugin()

WidgetCreatorMap loadPlugin ( QSharedPointer< QPluginLoader > loader)
protected

◆ preloadAsync()

void preloadAsync ( QStringList widgetNames,
int delayMS = 1000 )

◆ removePluginFromCache()

void removePluginFromCache ( QString pluginPath)

◆ removeWidgetFromCache()

void removeWidgetFromCache ( QString pluginPath,
QString widgetName )

◆ updateLastModifiedTimestamp()

void updateLastModifiedTimestamp ( const QString & pluginPath)
protected

◆ writeToCache()

void writeToCache ( const QString & pluginPath)
protected

Member Data Documentation

◆ cacheMutex

std::recursive_mutex cacheMutex
mutableprotected

◆ cachePath

const QString cachePath
protected

◆ manager

ArmarXManagerPtr manager
protected

◆ pluginData

QMap<QString, PluginData> pluginData
protected

◆ preloadFuture

std::future<void> preloadFuture
protected

◆ s

QSettings s
protected

◆ settingsApplicationName

const QString settingsApplicationName = "/PluginCache.conf"

◆ settingsOrganization

const QString settingsOrganization = "KIT"

◆ shutdown

bool shutdown = false
protected

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