Namespace sh::scripting::api

namespace sh::scripting::api

Adapter functions and classes for interaction with scripting.

Some programming interfaces in the core are not directly usable for the scripting api. Scripting-friendly surrogates for them are here.

class ApiActionActionItem : public sh::actions::ActionActionItem
#include <apiaction.h>

Public Functions

ApiActionActionItem(QString text, bool enabled, QString icon, int defaultActionPrecedence)
void _execute()
void _initializeSync()
void action(sh::actions::ActionExecutionInfo *info) override

The action implementation, i.e. what the actions should actually do.

void initialize() override

Initialize the action. This should make the time-consuming parts, e.g. for determining a label or enabled state.

void execute()

Executes this action.

void execute(sh::actions::ActionExecutionInfo *info)

Executes this action.

QKeySequence shortcuthint()

Returns the keyboard shortcut for triggering this action.

bool shortcuthintTriggersOnCurrentDirectory()

Checks if using the keyboard shortcut shall trigger the action on the current directory (or on the entry selection).

void setShortcuthint(QKeySequence shortcut, bool triggersOnCurrentDirectory = false)

Sets the keyboard shortcut for triggering this action.

QString text()

Returns the displayed text for this action.

QString icon()

Returns the icon for this action.

bool enabled()

Checks if this action is enabled.

bool isChecked()

Checks if this action is checked (has a cross in the ui).

bool isCheckable()

Checks if this action is checkable (can have a cross in the ui).

int defaultActionPrecedence() const

Returns the precedence for becoming the default action of a parent submenu.

This e.g. leads to a bold label.

The action with the highest value becomes the default. Only values >0 will be considered. See ActionDefaultPrecedenceValues for reference values.

void setText(QString text)

Sets the displayed text.

void setIcon(QString icon)

Sets the icon.

void setEnabled(bool enabled)

Sets if the item is enabled.

void setChecked(bool checked)

Sets if the item is checked (has a cross in the ui).

void setVisible(bool visible)

Sets the visibility of this item.

bool visible()

Checks the visibility of this item (non-recursively).

std::weak_ptr<AbstractActionItem> parentAction()

Returns the parent action, if it is added to a container.

void _setParentAction(std::shared_ptr<AbstractActionItem> parent)

Sets the parent action. .

void initializeAsync(std::function<void()> oninitialized = 0)

Asynchonously initializes the action.

void initializeSync()

Synchonously initializes the action.

bool isInitialized()

Checks if this action is initialized.

bool isInitializing()

Checks if this action is initializing.

Public Members

std::function<void()> _initialize
std::function<void(sh::actions::ActionExecutionInfo*)> _action

Signals

void changed()

Emits when some data changed.

class ApiActionFactory : public sh::actions::AbstractActionFactory
#include <apipredicatedactionfactory.h>

Public Functions

ApiActionFactory(QString category, QList<std::shared_ptr<actions::Predicate>> predicates)
std::shared_ptr<sh::actions::AbstractActionItem> construct(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes)
std::shared_ptr<ActionInstantiation> actionAvailable(ActionInstantiation *instantiation)

Public Members

std::function< std::shared_ptr< sh::actions::AbstractActionItem >QList< std::shared_ptr< sh::filesystem::FilesystemNode > > nodes)> _construct
class ApiDetailColumn : public sh::filesystem::DetailColumn
#include <apidetailcolumn.h>

Public Functions

ApiDetailColumn(QString name, QString displayName, int displayIndex, bool sort_doTypediff, int defaultWidth, bool isRightAligned)
QVariant determineValue(std::shared_ptr<sh::filesystem::FilesystemNode> node, sh::filesystem::Operation *op)
void applyValue(std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::filesystem::Operation *op, QVariant value)
QString name()

The internal unique name.

QString displayName()

The display name.

bool isValueAvailable(std::shared_ptr<FilesystemNode> node)

Checks if a value for this detail is available for one given node.

QVariant value(std::shared_ptr<FilesystemNode> node, bool ignoreAged = false)

Returns the value for this detail for one given node.

Parameters
  • ignoreAged: If no value should be returned which is older than the last request (not useful for nearly all cases).

QString displayValue(std::shared_ptr<FilesystemNode> node, const sh::filesystem::FilesystemModelFileviewProxy *viewmodel)

Returns the stringified value for this details for one given node considering the configuration of a view.

bool isVisible()

If this detail shall be a visible column in the view.

QVariant requestValue(std::shared_ptr<FilesystemNode> node, sh::filesystem::Operation *op = 0, bool withNodeValues = false, bool withOperationsCache = true)

Requests to determine the value for this detail for one given node. Blocks until the value is available. Get it with the value method afterwards.

bool sort_doTypediff()

If sorting should separate files and directories.

int sort_order(std::shared_ptr<FilesystemNode> n1, std::shared_ptr<FilesystemNode> n2)

The sorting order.

uint displayIndex()

Controls which place this column should get in the user interface.

QVariant computeValue(std::shared_ptr<FilesystemNode> node, sh::filesystem::Operation *op)

Returns a freshly determined value for this column and the given node. It neither asks nor populates any caches or storages.

int defaultWidth()
bool isRightAligned()
void applyValueByEurl(std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::filesystem::Operation *op, QVariant value)

Applies the detail value to a given eurl (without using any caches).

Used for transferring some details when a file transfer occurs.

Optionally implement the one of the applyValueBy… methods and register the instance with sh::filesystem::FilesystemOperation::addTransferrableDetailColumn. For performance reasons, you should decide to implement applyValueByEurl.

void applyValueByNode(std::shared_ptr<FilesystemNode> node, sh::filesystem::Operation *op, QVariant value)

Applies the detail value to a given node (without using any caches).

Used for transferring some details when a file transfer occurs.

Optionally implement the one of the applyValueBy… methods and register the instance with sh::filesystem::FilesystemOperation::addTransferrableDetailColumn. For performance reasons, you should decide to implement applyValueByEurl.

Public Members

std::function<QString(std::shared_ptr<sh::filesystem::FilesystemNode>, sh::filesystem::Operation*)> _determineValue
std::function<void(std::shared_ptr<sh::filesystem::Eurl>, sh::filesystem::Operation*, QString)> _applyValue

Public Static Functions

QVariant VALUE_UNAVAILABLE()

A special value expressing that the value is not yet available.

void registerKnownDetailColumn(QString name, std::shared_ptr<DetailColumn> column)
std::shared_ptr<DetailColumn> findKnownDetailColumn(QString name)

Public Static Attributes

const uint DISPLAYINDEX_CORE = 10000
const uint DISPLAYINDEX_INTERESTING = 20000
const uint DISPLAYINDEX_EXOTIC = 30000
class ApiFilePropertyDialogTab : public sh::ui::FilePropertyDialogTab
#include <apifilepropertydialogtab.h>

Public Functions

ApiFilePropertyDialogTab(QString title, QList<PropertyConfig> properties)
QString title() override

The tab title. .

QList<QString> properties() override

Returns the list of property labels (one entry for each widget).

Each property is displayed with a header and a widget (created in createWidget) with some content (populated in updateWidget).

void populateWidget(int i, sh::ui::FilePropertyDialogTabActionsView *widget) override

Populates the tab widget for the i-th property.

Typically uses the FilePropertyDialog::create* methods to create sub-widgets.

See also dialog().

void updateWidget(int i, sh::ui::FilePropertyDialogTabActionsView *widget, sh::filesystem::Operation *op) override

Populates the widget for the i-th property with actual content. .

QString titleWithoutMnemonic()

The tab title without mnemonic.

void refresh()

Refreshes the complete content.

Typically called after some user actions in a property widget require that all the other content must be refreshed.

QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes()

The nodes to show.

FilePropertyDialogTabActionsView *widgetAt(int i)

Returns the widget for the i-th property.

int widgetCount()

Returns the number of widgets.

std::shared_ptr<FilePropertyDialog> dialog()

Returns the associated dialog.

Public Members

std::function< QList< QString >int, sh::filesystem::Operation *, qintptr)> _updateWidget
std::function<void(QString)> _buttonTriggered

Public Static Attributes

const int PROPERTY_TYPE_STRING = 1
const int PROPERTY_TYPE_STRINGMAP = 2
const int PROPERTY_TYPE_ICONTEXTBANNER = 3

Private Types

typedef QPair<QString, QString> StringPair

Private Members

QString _title
QList<PropertyConfig> _properties
class PropertyConfig
#include <apifilepropertydialogtab.h>

Public Types

typedef QPair<QString, QString> ButtonConfig

Public Functions

PropertyConfig(QString title, int propertytype, QList<ButtonConfig> buttons)

Public Members

QString title
int propertytype
QList<ButtonConfig> buttons
class ApiFilePropertyDialogTabFactory : public sh::ui::FilePropertyDialogTabFactory
#include <apifilepropertydialogtab.h>

Public Functions

ApiFilePropertyDialogTabFactory()
std::shared_ptr<sh::ui::FilePropertyDialogTab> construct(std::shared_ptr<sh::ui::FilePropertyDialog> dialog)
std::shared_ptr<sh::ui::FilePropertyDialogTab> construct(std::shared_ptr<sh::ui::FilePropertyDialog> dialog) = 0

Constructs a fresh instance of a FilePropertyDialogTab implementation. .

Public Members

std::function< std::shared_ptr< sh::scripting::api::ApiFilePropertyDialogTab >)> _construct

Public Static Attributes

const int REGISTER_FILEPROPERTYDIALOGTAB_INDEX_CORE = 10000

Base value for display indexes of core (i.e. maximum important) tabs.

Used in FilePropertyDialog::addTabFactory.

const int REGISTER_FILEPROPERTYDIALOGTAB_INDEX_VERYIMPORTANT = 20000

Base value for display indexes of very important tabs.

Used in FilePropertyDialog::addTabFactory.

const int REGISTER_FILEPROPERTYDIALOGTAB_INDEX_IMPORTANT = 30000

Base value for display indexes of important tabs.

Used in FilePropertyDialog::addTabFactory.

const int REGISTER_FILEPROPERTYDIALOGTAB_INDEX_NORMAL = 40000

Base value for display indexes of tabs with medium importance.

Used in FilePropertyDialog::addTabFactory.

const int REGISTER_FILEPROPERTYDIALOGTAB_INDEX_EXOTIC = 50000

Base value for display indexes of exotic (i.e. less important) tabs.

Used in FilePropertyDialog::addTabFactory.

class ApiFilesystemHandler : public sh::filesystem::FilesystemHandler
#include <apifilesystemhandler.h>

Public Functions

ApiFilesystemHandler(sh::filesystem::FilesystemModel *model)
void itemlist(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::filesystem::FilesystemNodeType type, sh::filesystem::FilesystemNodeListEditor *list)
void configureItems(sh::filesystem::Operation *op, QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes)
sh::filesystem::FilesystemNodeType getType(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
qint64 getSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QDateTime getMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void setMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QDateTime time)
QString getMimetype(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QString getLinkTarget(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QList<QString> listExtendedAttributes(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
quint64 getExtendedAttributeSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)
QByteArray getExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)
void setExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute, QByteArray value)
void removeExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)
QMap<QString, QString> getCustomAttributes(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void setCustomAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute, QString value)
bool canGetFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
std::shared_ptr<QIODevice> getFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canCreateDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void createDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canCreateLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void createLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString target)
bool canCreateFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void createFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QIODevice *content, HandlerTransfer *handlertransfer)
bool canDeleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void deleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
bool canRenameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src)
void renameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src, QString destpath)
QList<std::shared_ptr<sh::actions::AbstractActionItem>> getActions(const QList<std::shared_ptr<const sh::filesystem::Eurl>> eurls)
void itemlist(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::filesystem::FilesystemNodeType type, sh::filesystem::FilesystemNodeListEditor *list) = 0

Determine a list of subelements in a certain directory.

void configureItems(sh::filesystem::Operation *op, QList<std::shared_ptr<FilesystemNode>> nodes)

Configure newly created nodes (e.g. setting another icon or changing the display name).

sh::filesystem::FilesystemNodeType getType(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine if a file is regular, or a dir, or a link, …

qint64 getSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine the size of a file.

QDateTime getMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine the mtime of a file.

void setMtime(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QDateTime time) = 0

Set the mtime of a file.

QString getMimetype(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Determine mime type of a file.

QString getLinkTarget(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Resolve a link.

QList<QString> listExtendedAttributes(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Fetches the list of available extended attributes for an entry.

quint64 getExtendedAttributeSize(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)

Returns the site of value for one extended attribute for an entry.

QByteArray getExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)

Returns the value for one extended attribute for an entry.

void setExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute, QByteArray value)

Sets the value for one extended attribute for an entry.

void removeExtendedAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute)

Removes one extended attributes for an entry.

QMap<QString, QString> getCustomAttributes(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Returns the custom attributes for an entry.

In contrast to extended attributes, the custom attributes are not directly stored in the filesystem this way, but handle implementation specific aspects (like permissions).

void setCustomAttribute(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString attribute, QString value)

Sets the value for one custom attribute for an entry.

See also getCustomAttributes.

bool canGetFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to get the content of a certain file.

std::shared_ptr<QIODevice> getFileContent(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Get the content of a file.

bool canCreateDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to create subdirectories in a certain directory.

void createDirectory(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Create a directory.

bool canCreateLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to create a link in a certain directory.

void createLink(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QString target) = 0

Create a link.

bool canCreateFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to create files in a certain directory.

void createFile(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, QIODevice *content, HandlerTransfer *handlertransfer) = 0

Creates a file with some content.

It may use handlertransfer for some better integration, like cancel support and progress monitoring.

bool canDeleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Returns if it is allowed to delete a certain file/directory/link/….

void deleteItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl) = 0

Delete a file/directory/link/…

void deleteDirectoryIfEmpty(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Deletes a directory only of it is empty.

bool canRenameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src) = 0

Returns if it is allowed to rename a certain file, directory, link, … (see renameItem).

void renameItem(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> src, QString destpath) = 0

Renames an item to another path.

It can be a simple filename change or also changes in the deeper path segments.

QList<std::shared_ptr<sh::actions::AbstractActionItem>> getActions(const QList<std::shared_ptr<const sh::filesystem::Eurl>> eurls) = 0

Returns a list of actions (see former example) for showing for certain files.

bool requiresResolvedLinks()

Returns if this handler requires to be used by the engine with resolved links.

void viewEnteredDirectory(std::shared_ptr<const sh::filesystem::Eurl>)

Callback for preparing stuff when the view entered some directory (e.g. for enabling watchers). See also viewLeftDirectory.

void viewLeftDirectory(std::shared_ptr<const sh::filesystem::Eurl>)

Callback for preparing stuff when the view left some directory. See also viewEnteredDirectory.

bool isWellKnownScheme()

Returns if the scheme for this handler is a well known one (which external programs typically would understand).

void search(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl, std::function<void(std::shared_ptr<const sh::filesystem::Eurl>, QList<std::shared_ptr<sh::search::SearchCriterion>>, sh::filesystem::FilesystemNodeType ftype)> addfile, std::function<void(std::shared_ptr<const sh::filesystem::Eurl>)> visitdir, QList<std::shared_ptr<sh::search::SearchCriterion>> criteria, )

Helps searching for files.

Override this method with a behavior identical to the default, if a specialized implementation can be much faster than the default one.

void customizeUi(std::shared_ptr<sh::filesystem::FilesystemNode> node, bool *showSearchPanel)

Creates a custom gui, which becomes part of the fileview.

sh::filesystem::FilesystemModel *model()

A convenience shortcut to the sh::filesystem::FilesystemModel (a singleton).

Public Members

std::function<int(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _getType
std::function<qint64(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _getSize
std::function<double(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _getMtime
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, double)> _setMtime
std::function<QString(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _getLinkTarget
std::function< QList< QString >sh::filesystem::Operation *op, std::shared_ptr< sh::filesystem::Eurl > eurl)> _listExtendedAttributes
std::function<quint64(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute)> _getExtendedAttributeSize
std::function<QByteArray(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute)> _getExtendedAttribute
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute, QByteArray value)> _setExtendedAttribute
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute)> _removeExtendedAttribute
std::function< QList< QString >sh::filesystem::Operation *op, std::shared_ptr< sh::filesystem::Eurl > eurl)> _getCustomAttributes
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString attribute, QString value)> _setCustomAttribute
std::function<QString(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _getMimetype
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _canCreateDirectory
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _createDirectory
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _canCreateLink
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QString target)> _createLink
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _canCreateFile
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _canDeleteItem
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _deleteItem
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> src)> _canRenameItem
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> src, QString destpath)> _renameItem
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, int type, sh::filesystem::FilesystemNodeListEditor *list)> _itemlist
std::function<void(sh::filesystem::Operation *op, QList<std::shared_ptr<sh::filesystem::FilesystemNode>>)> _configureItems
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _canGetFileContent
std::function< std::shared_ptr< QIODevice >sh::filesystem::Operation *op, std::shared_ptr< sh::filesystem::Eurl > eurl)> _getFileContent
std::function<void(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl, QIODevice *content, HandlerTransfer *handlertransfer)> _createFile
std::function< QList< std::shared_ptr< sh::actions::AbstractActionItem > >QList< std::shared_ptr< sh::filesystem::Eurl > > eurls)> _getActions
class ApiFilesystemOperationProgressMonitor : public sh::filesystem::FilesystemOperationProgressMonitor
#include <apifilesystemoperationprogressmonitor.h>

Public Functions

ApiFilesystemOperationProgressMonitor(sh::actions::ActionExecutionInfo *actionExecution)
bool hasItemInfo()

Checks if this progress monitor provides information about how many items of a certain total number are transferred so far.

quint64 doneItems()

Checks how many items are transferred so far.

quint64 allItems()

Checks how many items are to be transferred in total (as predicted in the current moment).

bool hasBytesInfo()

Checks if this progress monitor provides information about how many byte of a certain total number are transferred so far.

quint64 doneBytes()

Checks how many bytes are transferred so far.

quint64 allBytes()

Checks how many bytes are to be transferred in total (as predicted in the current moment).

QString getItemInfoFrom()

Returns the current source of transfer (as textual information).

QString getItemInfoTo()

Returns the current destination of transfer (as textual information).

QString estimation()

Returns the current performance and time estimation (as textual information).

Public Members

std::function<void()> _changed
std::function<bool(QList<sh::filesystem::FilesystemOperationTransfers::OperationStep*>)> _resolveConflicts
class ApiGlobalObject : public sh::base::Singleton
#include <apiglobalobject.h>

Public Functions

std::shared_ptr<const sh::filesystem::Eurl> getEurlFromString(QString eurl)
void logDebug(QString msg)
void logInfo(QString msg)
void logWarning(QString msg)
void logError(QString msg)
int filesystemnodetype_file()
int filesystemnodetype_directory()
int filesystemnodetype_link()
int filesystemnodetype_unknown()
int filesystemnodetype_firsttype()
int filesystemnodetype_lastphysicaltype()
int filesystemnodetype_none()
int filesystemnodetype_specialtreeonlydirectory()
int filesystemnodetype_lasttype()
int actiondefaultprecedencevalues_openfile()
int actiondefaultprecedencevalues_builtinspecialopen()
int messageboxbutton_ok()
int messageboxbutton_continue()
int messageboxbutton_cancel()
int messageboxbutton_retry()
int messageboxbutton_yes()
int messageboxbutton_no()
int displayindex_core()
int displayindex_interesting()
int displayindex_exotic()
int configurationcategory_gui()
int configurationcategory_behavior()
int configurationcategory_externaltools()
int settinggroup_global()
int settinggroup_gui()
int settinggroup_filehandling()
int settinggroup_dataview()
int settinggroup_behavior()
int settinggroup_special()
int paneldetail_positionindex_veryinteresting()
int paneldetail_positionindex_interesting()
int paneldetail_positionindex_exotic()
int operationstep_conflictresolution_mergedirectories()
int operationstep_conflictresolution_overwritedestination()
int operationstep_conflictresolution_renamedestinationbefore()
int operationstep_conflictresolution_skip()
int operationstep_conflictresolution_unresolved()
int operationstep_conflictresolution_indirect()
int operationstep_conflictresolution_usedifferentdestinationname()
int filepropertydialogtab_index_core()
int filepropertydialogtab_index_veryimportant()
int filepropertydialogtab_index_important()
int filepropertydialogtab_index_normal()
int filepropertydialogtab_index_exotic()
int filepropertydialogtab_propertytype_string()
int filepropertydialogtab_propertytype_stringmap()
int filepropertydialogtab_propertytype_icontextbanner()
int searchcriterionfactory_index_core()
int searchcriterionfactory_index_normal()
int searchcriterionfactory_index_exotic()
int thumbnailprovider_index_core()
int thumbnailprovider_index_normal()
int thumbnailprovider_index_exotic()
int thumbnailprovider_index_fallback()
void register_predicatedactionfactory(std::shared_ptr<sh::scripting::api::ApiActionFactory> f)
bool isDebugBuild()
std::shared_ptr<sh::scripting::api::ApiFilesystemHandler> create_FilesystemHandler()
std::shared_ptr<sh::scripting::api::ApiActionActionItem> create_ActionActionItem(QString text, bool enabled, QString icon, int defaultActionPrecedence)
std::shared_ptr<sh::scripting::api::ApiSubmenuActionItem> create_SubmenuActionItem(QString text, bool enabled, QString icon, int defaultActionPrecedence)
std::shared_ptr<sh::scripting::api::ApiDetailColumn> create_DetailColumn(QString name, QString displayName, int displayIndex, bool sort_doTypediff, int defaultWidth, bool isRightAligned)
std::shared_ptr<sh::scripting::api::ApiFilePropertyDialogTab> create_FilePropertyDialogTab(QString title, QList<QString> properties)
std::shared_ptr<sh::scripting::api::ApiFilePropertyDialogTabFactory> create_FilePropertyDialogTabFactory()
std::shared_ptr<sh::scripting::api::ApiActionFactory> create_ActionFactory(QString category, QList<std::shared_ptr<actions::Predicate>> predicates)
std::shared_ptr<sh::scripting::api::ApiPanelDetailFactorySingle> create_DetailFactorySingle(int position, int valueWidthHint)
std::shared_ptr<sh::scripting::api::ApiPanelDetailFactoryMulti> create_DetailFactoryMulti(int position, int valueWidthHint)
std::shared_ptr<sh::scripting::api::ApiFilesystemOperationProgressMonitor> create_FilesystemOperationProgressMonitor(sh::actions::ActionExecutionInfo *actionExecution)
std::shared_ptr<sh::filesystem::FilesystemNode> _createFilesystemNode(std::shared_ptr<sh::filesystem::Eurl> eurl, sh::scripting::api::ApiFilesystemHandler *handler, int nodetype, std::shared_ptr<sh::filesystem::FilesystemNode> parent, bool doinsert, bool showInitialLoadingLabel, bool isHidden)
std::shared_ptr<sh::scripting::api::ApiThumbnailProvider> create_ThumbnailProvider()
std::shared_ptr<sh::filesystem::FilesystemNode> _getOrCreateFilesystemNode(std::shared_ptr<sh::filesystem::Eurl> eurl, sh::scripting::api::ApiFilesystemHandler *handler, int nodetype, std::shared_ptr<sh::filesystem::FilesystemNode> parent, bool doinsert, bool showInitialLoadingLabel, bool isHidden)
void _register_FilesystemHandler(std::shared_ptr<sh::scripting::api::ApiFilesystemHandler> handler, QString scheme)
std::shared_ptr<sh::filesystem::FilesystemNode> modelRootNode()
QList<std::shared_ptr<sh::filesystem::FilesystemNode>> _findFilesystemNodesForEurl(std::shared_ptr<const sh::filesystem::Eurl> eurl)
QList<std::shared_ptr<sh::filesystem::FilesystemNode>> _tryGetFilesystemNodesForEurl(std::shared_ptr<const sh::filesystem::Eurl> eurl)
void refreshData(std::shared_ptr<const sh::filesystem::Eurl> eurl, bool forceFindParent, bool withDetails)
std::shared_ptr<filesystem::Eurl> createEurl(QString scheme, QString hostname, QString path)
std::shared_ptr<sh::filesystem::Operation> createOperation()
sh::scripting::StringMap<QString> createArgumentException()
sh::scripting::StringMap<QString> createIOException()
sh::scripting::StringMap<QString> createRuntimeException()
sh::scripting::StringMap<QString> createProgramException()
sh::scripting::StringMap<QString> createException()
std::shared_ptr<sh::scripting::api::ApiReadDataDevice> _createReadDataDevice()
std::shared_ptr<ApiSetting> createSetting(QString name, QString description, int group, bool isAdvancedSetting, bool isGlobal, bool isPerFileview)
std::shared_ptr<sh::scripting::api::ApiThread> create_Thread()
std::shared_ptr<sh::scripting::api::ApiTimer> create_Timer()
std::shared_ptr<sh::scripting::api::ApiSearchCriterion> create_SearchCriterion(std::shared_ptr<sh::scripting::api::ApiSearchCriterionFactory> factory)
std::shared_ptr<sh::scripting::api::ApiSearchCriterionFactory> create_SearchCriterionFactory(QString key, QString description)
sh::ui::MainWindow *mainwindow()
void registerPanelDetailFactorySingle(std::shared_ptr<sh::scripting::api::ApiPanelDetailFactorySingle>)
void registerPanelDetailFactoryMulti(std::shared_ptr<sh::scripting::api::ApiPanelDetailFactoryMulti>)
void registerSetting(std::shared_ptr<sh::settings::Setting> setting)
void openItems(QList<std::shared_ptr<const sh::filesystem::Eurl>> eurls)
void registerFilePropertyDialogTabFactory(int index, std::shared_ptr<sh::scripting::api::ApiFilePropertyDialogTabFactory>)
void registerThumbnailProvider(int idx, std::shared_ptr<sh::scripting::api::ApiThumbnailProvider> thumbnailprovider)
void registerSearchCriterionFactory(int idx, std::shared_ptr<ApiSearchCriterionFactory> apicrit)
std::shared_ptr<sh::configuration::ConfigurationValue> register_ConfigurationValueInt(QString name, int deflt, QString desc, int category, QString longdesc, QString changehint)
std::shared_ptr<sh::configuration::ConfigurationValue> register_ConfigurationValueFloat(QString name, int deflt, QString desc, int category, QString longdesc, QString changehint)
std::shared_ptr<sh::configuration::ConfigurationValue> register_ConfigurationValueBool(QString name, bool deflt, QString desc, int category, QString longdesc, QString changehint)
std::shared_ptr<sh::configuration::ConfigurationValue> register_ConfigurationValueString(QString name, QString deflt, QString desc, int category, QString longdesc, QString changehint)
void registerTransferrableDetailColumn(int i, std::shared_ptr<sh::filesystem::DetailColumn> detailColumn)
std::shared_ptr<sh::filesystem::DetailColumn> findDetailColumnByName(QString name)
QString shallotDataDir()
QString shallotBuiltinPluginDir()
QString shallotSystemPluginDir()
QString shallotUserPluginDir()
QString shallotLanguage()
sh::tools::BookmarkManager *bookmarkManager()
std::shared_ptr<sh::actions::Predicate> create_OnDirectoriesPredicate()
std::shared_ptr<sh::actions::Predicate> create_OnFilesPredicate()
std::shared_ptr<sh::actions::Predicate> create_OnLinksPredicate()
std::shared_ptr<sh::actions::Predicate> create_OnSingleEntrySelectionPredicate()
std::shared_ptr<sh::actions::Predicate> create_DontResolveLinksPredicate()
std::shared_ptr<sh::actions::Predicate> create_HideOnCurrentDirectoryLevelPredicate()
std::shared_ptr<sh::actions::Predicate> create_HideOnSelectionLevelPredicate()
std::shared_ptr<sh::actions::Predicate> create_ByRegExpPredicate(QString pattern)
std::shared_ptr<sh::actions::Predicate> create_KeyShortcutPredicate(QString shortcut, bool triggersOnCurrentDirectoryLevel)
std::shared_ptr<sh::actions::Predicate> create_PositionIndexPredicate(int index)
void doInitialize()

Executes singleton initialization.

void doShutdown()

Executes singleton shutdown.

void shutdown()

Shutdown down this singleton.

bool isAlive()

Returns if this singleton is alive (true until its shutdown begins).

Private Functions

ApiGlobalObject()
class ApiHelperMethods
#include <apihelpermethods.h>

Public Static Functions

QByteArray QIODevice_read(QIODevice *self)
QByteArray QIODevice_readall(QIODevice *self)
QByteArray ApiReadDataDevice_read(sh::scripting::api::ApiReadDataDevice *self)
QByteArray ApiReadDataDevice_readall(sh::scripting::api::ApiReadDataDevice *self)
void FilesystemNodeList_resetItems(sh::filesystem::FilesystemNodeList *self, int type, QList<std::shared_ptr<sh::filesystem::FilesystemNode>> list)
void FilesystemNode_addDetail(filesystem::FilesystemNode *self, std::shared_ptr<sh::filesystem::DetailColumn> col)
void FilesystemNode_setIcon(sh::filesystem::FilesystemNode *self, QString icon)
void FilesystemNode_setDisplayName(filesystem::FilesystemNode *self, QString displayname)
bool FilesystemNode_isHidden(filesystem::FilesystemNode *self)
void FilesystemNode_setHidden(filesystem::FilesystemNode *self, bool v)
void ConfigurationValue_setConfigValueInt(sh::configuration::ConfigurationValue *self, int v)
void ConfigurationValue_setConfigValueFloat(sh::configuration::ConfigurationValue *self, double v)
void ConfigurationValue_setConfigValueBool(sh::configuration::ConfigurationValue *self, bool v)
void ConfigurationValue_setConfigValueString(sh::configuration::ConfigurationValue *self, QString v)
QList<std::shared_ptr<sh::filesystem::Eurl>> FilesystemOperation_itemlist(sh::filesystem::FilesystemOperation *self, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QList<std::shared_ptr<sh::filesystem::Eurl>> FilesystemOperation_itemlistByType(sh::filesystem::FilesystemOperation *self, std::shared_ptr<const sh::filesystem::Eurl> eurl, int ntype)
int FilesystemOperation_getType(sh::filesystem::FilesystemOperation *self, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void FilesystemOperation_createFile(sh::filesystem::FilesystemOperation *self, std::shared_ptr<const sh::filesystem::Eurl> eurl, sh::scripting::api::ApiReadDataDevice *content, std::shared_ptr<filesystem::FilesystemOperationProgressMonitor> progressmon)
QList<std::shared_ptr<sh::filesystem::FilesystemNode>> FilesystemOperation_resolveNodeLink(sh::filesystem::FilesystemOperation *self, std::shared_ptr<sh::filesystem::FilesystemNode> node)
std::shared_ptr<sh::filesystem::Eurl> FilesystemOperation_resolveEurlLink(sh::filesystem::FilesystemOperation *self, std::shared_ptr<const sh::filesystem::Eurl> eurl)
void PanelDetail_setRow(sh::paneldetails::PanelDetail *self, QString key, QList<QString> value)
void MainWindow_jumpToEurl(sh::ui::MainWindow *self, std::shared_ptr<const sh::filesystem::Eurl> eurl)
std::shared_ptr<sh::filesystem::FilesystemNode> MainWindow_getCurrentDirectoryNode(sh::ui::MainWindow *self)
void ApiActionActionItem_setEnabled(sh::scripting::api::ApiActionActionItem *self, bool enabled)
bool ApiActionActionItem_enabled(sh::scripting::api::ApiActionActionItem *self)
void ApiActionActionItem_setVisible(sh::scripting::api::ApiActionActionItem *self, bool visible)
bool ApiActionActionItem_visible(sh::scripting::api::ApiActionActionItem *self)
void ApiSubmenuActionItem_setSubitems(sh::scripting::api::ApiSubmenuActionItem *self, QList<std::shared_ptr<actions::AbstractActionItem>> subitems)
void ApiSubmenuActionItem_setEnabled(sh::scripting::api::ApiSubmenuActionItem *self, bool enabled)
bool ApiSubmenuActionItem_enabled(sh::scripting::api::ApiSubmenuActionItem *self)
void ApiSubmenuActionItem_setVisible(sh::scripting::api::ApiSubmenuActionItem *self, bool visible)
bool ApiSubmenuActionItem_visible(sh::scripting::api::ApiSubmenuActionItem *self)
int OperationStep_conflictResolution(filesystem::FilesystemOperationTransfers::OperationStep *self)
bool FilesystemOperationProgressMonitor_hasItemInfo(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
quint64 FilesystemOperationProgressMonitor_doneItems(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
quint64 FilesystemOperationProgressMonitor_allItems(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
bool FilesystemOperationProgressMonitor_hasBytesInfo(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
quint64 FilesystemOperationProgressMonitor_doneBytes(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
quint64 FilesystemOperationProgressMonitor_allBytes(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
QString FilesystemOperationProgressMonitor_getItemInfoFrom(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
QString FilesystemOperationProgressMonitor_getItemInfoTo(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
QString FilesystemOperationProgressMonitor_estimation(sh::scripting::api::ApiFilesystemOperationProgressMonitor *self)
QList<std::shared_ptr<sh::filesystem::FilesystemNode>> ApiFilePropertyDialogTab_nodes(sh::scripting::api::ApiFilePropertyDialogTab *self)
int ActionExecutionUserFeedback_messageBox(sh::actions::ActionExecutionUserFeedback *self, QString m, QList<QString> l, QString s, int i, int j)
QString ActionExecutionUserFeedback_simpleInputBox(sh::actions::ActionExecutionUserFeedback *self, QString text, QString deflt)
int FilePropertyDialogTab_selectedIndexForProperty(ApiFilePropertyDialogTab *self, qintptr widget)
void FilePropertyDialogTab_refresh(ApiFilePropertyDialogTab *self)
class ApiPanelDetailFactoryMulti : public sh::paneldetails::PanelDetailFactoryForFunctionMulti
#include <apipaneldetailfactory.h>

Public Functions

ApiPanelDetailFactoryMulti(int position, int valueWidthHint)
void setvalue(std::shared_ptr<sh::paneldetails::PanelDetail> detail, QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes, filesystem::Operation *op)
void linktriggered(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes, QString linktarget)
std::shared_ptr<PanelDetail> construct(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes, sh::filesystem::Operation *op)

Public Members

std::function<void(sh::paneldetails::PanelDetail*, QList<std::shared_ptr<sh::filesystem::FilesystemNode>>, sh::filesystem::Operation *op)> _setvalue
std::function<void(QList<std::shared_ptr<sh::filesystem::FilesystemNode>>, QString)> _linktriggered
class ApiPanelDetailFactorySingle : public sh::paneldetails::PanelDetailFactoryForFunctionSingle
#include <apipaneldetailfactory.h>

Public Functions

ApiPanelDetailFactorySingle(int position, int valueWidthHint)
void setvalue(std::shared_ptr<sh::paneldetails::PanelDetail>, std::shared_ptr<sh::filesystem::FilesystemNode> node, filesystem::Operation *op)
void linktriggered(std::shared_ptr<sh::filesystem::FilesystemNode> node, QString linktarget)
std::shared_ptr<PanelDetail> construct(QList<std::shared_ptr<sh::filesystem::FilesystemNode>> nodes, sh::filesystem::Operation *op)

Public Members

std::function<void(sh::paneldetails::PanelDetail*, std::shared_ptr<sh::filesystem::FilesystemNode>, sh::filesystem::Operation *op)> _setvalue
std::function<void(std::shared_ptr<sh::filesystem::FilesystemNode>, QString)> _linktriggered
class ApiReadDataDevice : public sh::tools::ReadDataDevice
#include <apireaddatadevice.h>

Public Functions

ApiReadDataDevice()
QByteArray getdata()

This method returns the next available chunk of data. It may return empty arrays whenever temporarily no data is available. Returning a null array (with QByteArray::isNull()==true) marks the end of the stream. .

void _ended()

Public Members

std::function<QByteArray()> _getdata

Private Members

bool isended
class ApiSearchCriterion : public sh::search::criteria::AbstractActionDrivenSearchCriterion
#include <apisearchcriterion.h>

Public Functions

ApiSearchCriterion(std::shared_ptr<sh::search::SearchCriterionFactory> factory)
bool match2(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)
QList<QString> getsearchspec()
bool match(sh::filesystem::Operation *op, std::shared_ptr<const sh::filesystem::Eurl> eurl)

Checks if a given file (by eurl) matches this criterion. .

QString valuedescription()

Returns a human readable text describing the current criterion shortly and precisely. .

QString serialize()

Serializes this criterion to a string. See also SearchCriterion::deserialize.

std::shared_ptr<sh::search::SearchCriterionFactory> factory()

Returns the factory this criterion has created (provides some more metadata).

Public Members

std::function<void(sh::actions::ActionExecutionInfo*)> _configure
std::function<bool(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::Eurl> eurl)> _match
QStringList searchspec

Public Static Functions

void _createEditor(std::shared_ptr<sh::search::SearchCriterion> cfg, sh::ui::SearchPanelConfiguration *panelcfg)
void _editorUpdateConfiguration(sh::ui::SearchPanelConfiguration *panelcfg, std::shared_ptr<sh::search::SearchCriterion> c)
std::shared_ptr<sh::search::SearchCriterion> deserialize(QString s)

Deserializes this criterion from a string. See also SearchCriterion::serialize.

class ApiSearchCriterionFactory : public sh::search::SearchCriterionFactory
#include <apisearchcriterion.h>

Public Functions

ApiSearchCriterionFactory(QString key, QString description)
QString key()

Returns the string key for the associated search criterion class. .

QString description()

Returns the description string for the associated search criterion class. .

void editor(std::shared_ptr<sh::search::SearchCriterion> c, sh::ui::SearchPanelConfiguration *panelcfg)
void editorupdateconfig(sh::ui::SearchPanelConfiguration *panelcfg, std::shared_ptr<sh::search::SearchCriterion> c)
std::shared_ptr<sh::search::SearchCriterion> construct()

Constructs an instance of the associated search criterion class. .

bool isVisibleFor(sh::filesystem::Operation *op, std::shared_ptr<sh::filesystem::FilesystemNode> node)

Checks if the associated search criterion class should be offered to the user for a given node. .

void editor(std::shared_ptr<sh::search::SearchCriterion> c, sh::ui::SearchPanelConfiguration *panelcfg) = 0

Builds the search config ui in a search panel.

Takes the data from c and populates panelcfg with it.

void editorupdateconfig(sh::ui::SearchPanelConfiguration *panelcfg, std::shared_ptr<sh::search::SearchCriterion> c) = 0

Updates own data with the content from the search config ui in a search panel.

Takes the data from panelcfg and updates c with it.

Public Members

std::function<QString(QList<QString>)> _getsearchspecdesc
std::function< std::shared_ptr< sh::search::SearchCriterion >)> _construct
std::function<bool(sh::filesystem::Operation*, std::shared_ptr<sh::filesystem::FilesystemNode>)> _isVisibleFor
class ApiSetting : public sh::settings::Setting
#include <apisetting.h>

Public Functions

ApiSetting(QString name, QString description, sh::settings::SettingGroup group, bool isAdvancedSetting, bool isGlobal, bool isPerFileview)
QString name()

Gets the internal name.

QString description()

Gets the description text.

sh::settings::SettingGroup group()

Gets the group;.

bool isAdvancedSetting()

Is this an advanced setting?

void setValue(QString value)

Called from Shallot core when the value was set (for a not-per-fileview setting).

void setValue(sh::ui::FileView *filelist, QString value)

Called from Shallot core when the value was set (for a per-fileview setting).

QString getValue(sh::ui::FileView *filelist)

Get the currently set value.

bool isGlobal()

Does this setting apply globally or just for a certain subtree of nodes?

bool isPerFileview()

Does this setting apply for each fileview individually or for the complete main window?

QString valueDescription(QString value)

Gets a human readable description text for a value.

Public Members

std::function<void(QString)> _setValue1
std::function<void(int, QString)> _setValue2
std::function<QString(int)> _getValue
std::function<QString(QString)> _valueDescription
QString _name
QString _description
sh::settings::SettingGroup _group
bool _isAdvancedSetting
bool _isGlobal
bool _isPerFileview

Public Static Functions

QString getGroupDescription(int g)

Low-level function which gets the description text of a group.

class ApiSubmenuActionItem : public sh::actions::SubmenuActionItem
#include <apiaction.h>

Public Functions

ApiSubmenuActionItem(QString text, bool enabled, QString icon, int defaultActionPrecedence)
void initialize() override

Initialize the action. This should make the time-consuming parts, e.g. for determining a label or enabled state.

const QList<std::shared_ptr<sh::actions::AbstractActionItem>> subitems()

Returns the list of subitems from this submenu.

void setSubitems(const QList<std::shared_ptr<sh::actions::AbstractActionItem>> subitems)

Sets the subitems.

QString text()

Returns the displayed text for this action.

QString icon()

Returns the icon for this action.

bool enabled()

Checks if this action is enabled.

bool isChecked()

Checks if this action is checked (has a cross in the ui).

bool isCheckable()

Checks if this action is checkable (can have a cross in the ui).

int defaultActionPrecedence() const

Returns the precedence for becoming the default action of a parent submenu.

This e.g. leads to a bold label.

The action with the highest value becomes the default. Only values >0 will be considered. See ActionDefaultPrecedenceValues for reference values.

void setText(QString text)

Sets the displayed text.

void setIcon(QString icon)

Sets the icon.

void setEnabled(bool enabled)

Sets if the item is enabled.

void setChecked(bool checked)

Sets if the item is checked (has a cross in the ui).

void setVisible(bool visible)

Sets the visibility of this item.

bool visible()

Checks the visibility of this item (non-recursively).

std::weak_ptr<AbstractActionItem> parentAction()

Returns the parent action, if it is added to a container.

void _setParentAction(std::shared_ptr<AbstractActionItem> parent)

Sets the parent action. .

void initializeAsync(std::function<void()> oninitialized = 0)

Asynchonously initializes the action.

void initializeSync()

Synchonously initializes the action.

bool isInitialized()

Checks if this action is initialized.

bool isInitializing()

Checks if this action is initializing.

Public Members

std::function<void()> _initialize

Signals

void subitemsChanged()

Emits when the list of subitems changed.

void changed()

Emits when some data changed.

class ApiThread : public std::enable_shared_from_this<ApiThread>
#include <apithread.h>

Public Functions

ApiThread()
void start()

Public Members

std::function<void()> _run
class ApiThumbnailProvider : public sh::tools::ThumbnailProvider
#include <apithumbnailprovider.h>

Public Functions

ApiThumbnailProvider()
void getThumbnail(sh::filesystem::Operation *operation, std::shared_ptr<sh::filesystem::FilesystemNode> node, QString contentType, int width, int height, QIcon *icon)

Public Members

std::function<QByteArray(sh::filesystem::Operation*, std::shared_ptr<sh::filesystem::FilesystemNode>, QString, int, int)> _getThumbnail
class ApiTimer : public std::enable_shared_from_this<ApiTimer>
#include <apitimer.h>

Public Functions

ApiTimer()
void start(int interval)
void stop()

Public Members

std::function<void()> _run

Private Members

QMutex _mutex
QTimer _timer
bool _isexecuting = false
QList<std::shared_ptr<ApiTimer>> _runningTimers