LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft Namespace Reference

Namespaces

 AN
 
 Util
 

Classes

struct  ActionInfo
 Describes an action exposed in shortcut manager. More...
 
struct  ANBoolFieldValue
 Describes a field with boolean values. More...
 
struct  ANFieldData
 A single additional AdvancedNotifications field. More...
 
struct  ANIntFieldValue
 Describes a field with integer values. More...
 
struct  ANStringFieldValue
 Describes a field with QString values. More...
 
class  DependencyException
 
struct  Entity
 A message used for inter-plugin communication. More...
 
struct  FlatTreeItem
 
class  IHookProxy
 Class for hook-based communication between plugins. More...
 
struct  ImageServiceInfo
 Describes a single image hosting service (including account). More...
 
class  InjectionFailureException
 
struct  ProcessStateInfo
 State of a single process represented in a IJobHolder model. More...
 
class  QuarkComponent
 Describes a single quark. More...
 
class  ReleaseFailureException
 
struct  RemoteImageInfo
 Describes a remote image. More...
 
struct  Request
 Describes the elementary subrequest. More...
 
class  SerializationException
 
class  StandardException
 
struct  TabClassInfo
 The structure describing a single tab class. More...
 
struct  TabRecoverInfo
 Keeps the tab state between runs. More...
 
class  UnknownVersionException
 

Typedefs

typedef boost::variant< ANBoolFieldValue, ANIntFieldValue, ANStringFieldValueANFieldValue
 A combination of all possible descriptions. More...
 
typedef std::shared_ptr< IHookProxyIHookProxy_ptr
 
typedef QList< ImageServiceInfoImageServiceInfos_t
 The list of image storage service descriptions. More...
 
typedef QList< RemoteImageInfoRemoteImageInfos_t
 A list of remote images. More...
 
typedef QList< QPair< QByteArray, QVariant > > DynPropertiesList_t
 
typedef QList< TabClassInfoTabClasses_t
 
typedef std::shared_ptr< QuarkComponentQuarkComponent_ptr
 A shared pointer to a quark. More...
 
typedef QList< QuarkComponent_ptrQuarkComponents_t
 A list of quarks pointers. More...
 
using FlatTreeItem_ptr = std::shared_ptr< FlatTreeItem >
 

Enumerations

enum  PartitionType {
  NonPartition = -1,
  Empty = 0x00,
  Win95FAT32 = 0x0b,
  Win95FAT32LBA = 0x0c
}
 Describes the various common partition types. More...
 
enum  CommonDevRole {
  DevType = Qt::UserRole + 1,
  DevID,
  DevPersistentID,
  CommonDevRoleMax
}
 Roles for both USB Mass Storage and generic USB devices. More...
 
enum  USBDeviceRole {
  ID = CommonDevRole::CommonDevRoleMax + 1,
  Busnum,
  Devnum,
  VendorID,
  Vendor,
  ModelID,
  Model,
  SysFile,
  USBDeviceRoleMax
}
 Roles specific to generic USB devices. More...
 
enum  MassStorageRole {
  DevFile = USBDeviceRole::USBDeviceRoleMax + 1,
  PartType,
  IsRemovable,
  IsPartition,
  IsMountable,
  IsMounted,
  IsMediaAvailable,
  VisibleName,
  AvailableSize,
  TotalSize,
  MountPoints,
  MassStorageRoleMax
}
 Roles specific to mass storage USB devices. More...
 
enum  DeviceType {
  USBDevice,
  MassStorage
}
 Describes various USB removable devices. More...
 
enum  ActionsEmbedPlace {
  ActionsEmbedPlace::ToolsMenu,
  ActionsEmbedPlace::CommonContextMenu,
  ActionsEmbedPlace::QuickLaunch,
  ActionsEmbedPlace::TrayMenu,
  ActionsEmbedPlace::LCTray
}
 Specifies where the actions should be embedded. More...
 
enum  TabFeature {
  TFEmpty = 0x0,
  TFOpenableByRequest = 1 << 0,
  TFSingle = 1 << 1,
  TFByDefault = 1 << 2,
  TFSuggestOpening = 1 << 3,
  TFOverridesTabClose = 1 << 4
}
 Defines different behavior features of tab classes. More...
 
enum  JobHolderColumn {
  JobName,
  JobStatus,
  JobProgress
}
 Describes the columns in a job holder model. More...
 
enum  JobHolderRow {
  Other,
  News,
  DownloadProgress,
  ProcessProgress
}
 Describes the semantics of a row in a job holder model. More...
 
enum  JobHolderRole { ProcessState = CustomDataRoles::RoleMAX + 1 }
 This enum contains roles that are used to query job states. More...
 
enum  ContentType {
  ContentType::HTML,
  ContentType::PlainText
}
 
enum  EditorAction {
  EditorAction::Find,
  EditorAction::Replace,
  EditorAction::Bold,
  EditorAction::Italic,
  EditorAction::Underline,
  EditorAction::InsertLink,
  EditorAction::InsertImage,
  EditorAction::ToggleView
}
 Enumeration for some standard editor actions. More...
 
enum  TaskParameter {
  NoParameters = 0,
  NoAutostart = 1,
  DoNotSaveInHistory = 2,
  IsDownloaded = 4,
  FromUserInitiated = 8,
  DoNotNotifyUser = 32,
  Internal = 64,
  NotPersistent = 128,
  DoNotAnnounceEntity = 256,
  OnlyHandle = 512,
  OnlyDownload = 1024,
  AutoAccept = 2048,
  FromCommandLine = 4096
}
 Describes single task parameter. More...
 
enum  CustomDataRoles {
  RoleTags = Qt::UserRole + 100,
  RoleControls,
  RoleAdditionalInfo,
  RoleHash,
  RoleMime,
  RoleContextMenu,
  RoleJobHolderRow,
  RoleMAX
}
 
enum  Priority {
  PLog_,
  PInfo_,
  PWarning_,
  PCritical_
}
 

Functions

bool operator== (const ANBoolFieldValue &left, const ANBoolFieldValue &right)
 Compares two fields with boolean values. More...
 
bool operator== (const ANIntFieldValue &left, const ANIntFieldValue &right)
 Compares two fields with integer values. More...
 
bool operator== (const ANStringFieldValue &left, const ANStringFieldValue &right)
 Compares two string field values. More...
 
 Q_DECLARE_FLAGS (TabFeatures, LeechCraft::TabFeature)
 
 Q_DECLARE_FLAGS (TaskParameters, TaskParameter)
 
FlatTreeItemToFlat (const QModelIndex &idx)
 
bool operator< (const LeechCraft::Entity &e1, const LeechCraft::Entity &e2)
 
bool operator== (const LeechCraft::Entity &e1, const LeechCraft::Entity &e2)
 

Typedef Documentation

◆ ANFieldValue

A combination of all possible descriptions.

Definition at line 265 of file ianemitter.h.

◆ DynPropertiesList_t

typedef QList<QPair<QByteArray, QVariant> > LeechCraft::DynPropertiesList_t

Definition at line 100 of file ihaverecoverabletabs.h.

◆ FlatTreeItem_ptr

using LeechCraft::FlatTreeItem_ptr = typedef std::shared_ptr<FlatTreeItem>

Definition at line 43 of file flattofoldersproxymodel.h.

◆ IHookProxy_ptr

typedef std::shared_ptr<IHookProxy> LeechCraft::IHookProxy_ptr

Definition at line 129 of file ihookproxy.h.

◆ ImageServiceInfos_t

The list of image storage service descriptions.

Definition at line 58 of file iimgsource.h.

◆ QuarkComponent_ptr

A shared pointer to a quark.

Definition at line 154 of file iquarkcomponentprovider.h.

◆ QuarkComponents_t

A list of quarks pointers.

Definition at line 158 of file iquarkcomponentprovider.h.

◆ RemoteImageInfos_t

A list of remote images.

Definition at line 102 of file iimgsource.h.

◆ TabClasses_t

Definition at line 152 of file ihavetabs.h.

Enumeration Type Documentation

◆ ActionsEmbedPlace

Specifies where the actions should be embedded.

Enumerator
ToolsMenu 

The Tools submenu of main LeechCraft menu.

CommonContextMenu 

The common tabbar context menu.

This menu is used to open new tabs, close opened tabs and manipulate already opened tabs. Plugins will typically embed actions that don't relate to any currently opened tab but should be invoked easily by the user.

QuickLaunch 

The quick launch area.

The quick launch area resides in the SB2 panel or similar. Actions and menus embedded in such areas are always visible by the user (unless they hide it explicitly). So, this area can be used to either perform some actions in one click (even faster than ToolsMenu) or to host actions displaying state, like a network monitor.

This area is similar to LCTray but with more focus on performing actions.

See also
LCTray
TrayMenu 

The context menu of the LeechCraft tray icon.

LCTray 

The tray area.

Similar to QuickLaunch, but with more focus on displaying state.

See also
QuickLaunch

Definition at line 42 of file iactionsexporter.h.

◆ CommonDevRole

Roles for both USB Mass Storage and generic USB devices.

Enumerator
DevType 

The type of the device.

This role is expected to contain a member of the DeviceType enum.

See also
DeviceType
DevID 

The unique device ID (QString).

DevPersistentID 

The persistent unique device ID (QString).

CommonDevRoleMax 

Definition at line 65 of file deviceroles.h.

◆ ContentType

Possible content types a text editor could handle.

Enumerator
HTML 

HTML content. The corresponding editor should provide WYSIWYG capabilities or at least some fancy highlighting for HTML.

PlainText 

Well, plain text.

Definition at line 43 of file itexteditor.h.

◆ CustomDataRoles

This enumeration describes the additional roles that may be returned from models that are embedded in Summary-like viewers. Those like IJobHolders or IFindProxies.

See also
IJobHolder, IFindProxy
Enumerator
RoleTags 

The role for the string list with tags. So, QStringList is expected to be returned.

RoleControls 

The role for the additional controls for a given item. QToolBar* is expected to be returned.

RoleAdditionalInfo 

The role for the widget appearing on the right part of the screen when the user selects an item. QWidget* is expected to be returned.

RoleHash 

The role for the hash of the item, used to compare two different results, possibly from two different models. QByteArray is expected to be returned.

RoleMime 

This should return MIME of an item if it's available, otherwise an empty string should be returned.

RoleContextMenu 

This role returns the QMenu* that should be used as the context menu.

RoleJobHolderRow 

This role is for the LeechCraft::JobHolderRow enum.

RoleMAX 

Definition at line 199 of file structures.h.

◆ DeviceType

Describes various USB removable devices.

The corresponding device model role is CommonDevRole::DevType.

All device types are expected to return meaningful data for roles in the CommonDevRole enum.

See also
CommonDevRole::DevType
CommonDevRole
Enumerator
USBDevice 

A general USB device.

The device model rows for this USB device are expected to also return data for roles in the USBDeviceRole enum.

See also
USBDeviceRole
MassStorage 

A mass storage USB device, like a flash drive.

The device model rows for this USB device are expected to also return data for roles in the MassStorageRole enum.

See also
MassStorageRole

Definition at line 44 of file devicetypes.h.

◆ EditorAction

Enumeration for some standard editor actions.

The corresponding actions may be retrieved via ITextEditor::GetEditorAction().

See also
ITextEditor::GetEditorAction()
Enumerator
Find 

Open "Find" dialog.

Replace 

Open "Replace" dialog.

Bold 

Toggle the boldness of the selected text's font.

Italic 

Toggle the italicness of the selected text's font.

Underline 

Toggle underlining of the selected text's font.

InsertLink 

Open the dialog for inserting a hyperlink.

InsertImage 

Open the dialog for inserting an image.

ToggleView 

Toggle between WYSIWYG and source view, if applicable.

Definition at line 62 of file itexteditor.h.

◆ JobHolderColumn

Describes the columns in a job holder model.

A job holder model has a fixed number of columns, and this enum gives them meaningful names.

Enumerator
JobName 

The column with the name of the task, like a torrent name or an RSS feed name.

JobStatus 

The column with the status of the task, like the download status or the unread items count of an RSS feed.

JobProgress 

The column with the progress of the task, like the amount of data downloaded so far or last update.

Definition at line 46 of file ijobholder.h.

◆ JobHolderRole

This enum contains roles that are used to query job states.

Enumerator
ProcessState 

Describes the state of a process.

This role should return a meaningful value for the JobHolderRow::DownloadProgress and JobHolderRow::ProcessProgress rows.

The returned value should be a ProcessStateInfo structure.

See also
ProcessStateInfo

Definition at line 206 of file ijobholder.h.

◆ JobHolderRow

Describes the semantics of a row in a job holder model.

Values of this enum are used to describe the semantics of rows in the representation models.

Values of this enum are expected to be obtained via the CustomDataRoles::RoleJobHolderRow role.

Enumerator
Other 

This row corresponds to something that cannot be described by other enum members.

News 

This row corresponds to a news item, say, in an RSS reader or a Twitter client.

DownloadProgress 

This row corresponds to a pending download like in a BitTorrent client or an HTTP downloader.

If a row has this type, then it also has to have meaningful process state for the JobHolderRole::ProcessState role.

ProcessProgress 

This row corresponds to some process like sending a file in IM, unpacking an archive or checking for new mail.

If a row has this type, then it also has to have meaningful process state for the JobHolderRole::ProcessState role.

Definition at line 72 of file ijobholder.h.

◆ MassStorageRole

Roles specific to mass storage USB devices.

The corresponding CommonDevRole::DevType is DeviceType::MassStorage.

Enumerator
DevFile 

The device file representing the device (QString).

For example, it could be /dev/sdc1 on a Linux system.

PartType 

The type of the partition.

This role is expected to contain a member of the PartitionType enum.

See also
PartitionType
IsRemovable 

Whether this item is removable (bool).

IsPartition 

Whether this item is a partition (bool).

IsMountable 

Whether this item could be mounted (bool).

IsMounted 

Whether this item is currently mounted (bool).

IsMediaAvailable 

Whether this item contains media (bool).

For example, a CD in a CD-ROM.

VisibleName 

Human-readable name of the device (QString).

AvailableSize 

Available size in bytes (qint64).

If the value is -1, the available size is not known. It is very likely the available size wouldn't be known for unmounted devices.

TotalSize 

Total size in bytes (qint64).

If the value is -1, the available size is not known. It is very likely the total size wouldn't be known for unmounted devices.

MountPoints 

The list of directories this item is mounted to (QStringList).

MassStorageRoleMax 

Definition at line 134 of file deviceroles.h.

◆ PartitionType

Describes the various common partition types.

This enum is used for USB Mass Storage devices and similar ones where the concept of a partition makes sense.

See also
MassStorageRole::PartType
Enumerator
NonPartition 

Something other than a partition.

Empty 

Empty partition without a type.

Win95FAT32 

FAT32 partition.

Win95FAT32LBA 

FAT32 partition with LBA.

Definition at line 44 of file deviceroles.h.

◆ Priority

Enumerator
PLog_ 
PInfo_ 
PWarning_ 
PCritical_ 

Definition at line 240 of file structures.h.

◆ TabFeature

Defines different behavior features of tab classes.

Enumerator
TFEmpty 

No special features.

TFOpenableByRequest 

This tab could be opened by user request.

If tab class has this feature, a corresponding action in new tab menu would be created to allow the user to open this tab.

If tab class doesn't have this feature, the only way for the tab to be opened is for the corresponding to emit the IHaveTabs::addNewTab() signal when needed.

See also
TFSingle.
TFSingle 

There could be only one instance of this tab.

By default, LeechCraft considers that each tab having the TFOpenableByRequest feature could be opened multiple times, but sometimes it doesn't make sense to have more than one tab of some class. In this case, this feature should also be present for that tab class.

This feature requires the TFOpenableByRequest feature as well.

See also
TFOpenableByRequest.
TFByDefault 

The tab should be opened by default.

By default, all tabs are hidden, both having TFSingle feature and lacking it. If a tab wants to be shown after LeechCraft startup until the user manually closes it, the corresponding tab class should have this feature as well.

TFSuggestOpening 

The tab is to be suggested in a quick launch area.

Tabs having this flag are expected to be contained by default in some kind of quick launch area like the one in the Sidebar plugin.

Consider adding this flag if you think user would often open tabs of your class.

TFOverridesTabClose 

The tab uses the standard tab close shortcut (Ctrl+W).

Thus, when this tab is active, the tab close shortcut will be disabled if it matches "Ctrl+W".

Definition at line 42 of file ihavetabs.h.

◆ TaskParameter

Describes single task parameter.

Enumerator
NoParameters 

Use default parameters.

NoAutostart 

Task should not be started automatically after addition.

DoNotSaveInHistory 

Task should not be saved in history.

IsDownloaded 

Task is really downloaded, so, a file, for example, has appeared as a result.

FromUserInitiated 

Task is created as a result of user's actions.

DoNotNotifyUser 

User should not be notified about task finish.

Internal 

Task is used internally and would not be visible to the user at all.

NotPersistent 

Task should not be saved as it would have no meaning after next start.

DoNotAnnounceEntity 

When the task is finished, it should not be announced via gotEntity() signal.

OnlyHandle 

This task should not be downloaded, only handled by a handler.

OnlyDownload 

This task should not be handled, only downloaded by a downloader.

AutoAccept 

This task should be automatically accepted if any handler is available.

FromCommandLine 

The entity was generated from command line parameters or LeechCraft process invocation.

Definition at line 47 of file structures.h.

◆ USBDeviceRole

Roles specific to generic USB devices.

The corresponding CommonDevRole::DevType is DeviceType::USBDevice.

Enumerator
ID 

The general USB ID of the role (QByteArray).

Busnum 

The bus this device is attached to (int).

Devnum 

The device number on the given bus (int).

VendorID 

The ID of the vendor (QString).

Vendor 

The human-readable name of the vendor (QString).

ModelID 

The ID of the model (QString).

Model 

The human-readable name of the device model (QString).

SysFile 

The system file representing the device (QString).

This role should contain the system file path representing the device, if applicable.

USBDeviceRoleMax 

Definition at line 90 of file deviceroles.h.

Function Documentation

◆ operator<()

UTIL_API bool LeechCraft::operator< ( const LeechCraft::Entity e1,
const LeechCraft::Entity e2 
)

◆ operator==() [1/4]

◆ operator==() [2/4]

bool LeechCraft::operator== ( const ANBoolFieldValue left,
const ANBoolFieldValue right 
)
inline

Compares two fields with boolean values.

Parameters
[in]leftFirst operand.
[in]rightSecond operand.
Returns
Whether left and right have the same boundary and the same operation.

Definition at line 152 of file ianemitter.h.

References LeechCraft::ANBoolFieldValue::IsSet_.

◆ operator==() [3/4]

bool LeechCraft::operator== ( const ANIntFieldValue left,
const ANIntFieldValue right 
)
inline

Compares two fields with integer values.

Parameters
[in]leftFirst operand.
[in]rightSecond operand.
Returns
Whether left and right have the same boundary and the same operation.

Definition at line 198 of file ianemitter.h.

◆ operator==() [4/4]

bool LeechCraft::operator== ( const ANStringFieldValue left,
const ANStringFieldValue right 
)
inline

Compares two string field values.

Parameters
[in]leftThe left operand.
[in]rightThe right operand.
Returns
Whether left and right have the same regexp pattern and they both require the presense (or the absence) of the match.

Definition at line 257 of file ianemitter.h.

References LeechCraft::ANStringFieldValue::Contains_, and LeechCraft::ANStringFieldValue::Rx_.

◆ Q_DECLARE_FLAGS() [1/2]

LeechCraft::Q_DECLARE_FLAGS ( TabFeatures  ,
LeechCraft::TabFeature   
)

◆ Q_DECLARE_FLAGS() [2/2]

LeechCraft::Q_DECLARE_FLAGS ( TaskParameters  ,
TaskParameter   
)

◆ ToFlat()