LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
IJobHolderRepresentationHandler Class Referenceabstract

#include "ijobholder.h"

Classes

struct  RowSelection
 The rows of this handler's representation selected in the view. More...

Public Member Functions

virtual ~IJobHolderRepresentationHandler ()=default
virtual QAbstractItemModel & GetRepresentation ()=0
 Returns the item representation model.
virtual void HandleSelectedRowsChanging (const RowSelection &selection)
 Called from a clean stack whenever the selection or the current row changes.
virtual void HandleSelectedRowsSettled (const RowSelection &selection)
 Called from a clean stack once the selection has settled.
virtual void HandleActivated (const QModelIndex &)
virtual void HandleClicked (const QModelIndex &)
virtual void HandleDoubleClicked (const QModelIndex &)
virtual void HandlePressed (const QModelIndex &)
virtual QWidget * GetInfoWidget ()
virtual QToolBar * GetControls ()
virtual QMenu * GetContextMenu ()

Detailed Description

Definition at line 121 of file ijobholder.h.

Constructor & Destructor Documentation

◆ ~IJobHolderRepresentationHandler()

virtual IJobHolderRepresentationHandler::~IJobHolderRepresentationHandler ( )
virtualdefault

Member Function Documentation

◆ GetContextMenu()

virtual QMenu * IJobHolderRepresentationHandler::GetContextMenu ( )
inlinevirtual

Definition at line 215 of file ijobholder.h.

◆ GetControls()

virtual QToolBar * IJobHolderRepresentationHandler::GetControls ( )
inlinevirtual

Definition at line 214 of file ijobholder.h.

◆ GetInfoWidget()

virtual QWidget * IJobHolderRepresentationHandler::GetInfoWidget ( )
inlinevirtual

Definition at line 213 of file ijobholder.h.

◆ GetRepresentation()

virtual QAbstractItemModel & IJobHolderRepresentationHandler::GetRepresentation ( )
pure virtual

Returns the item representation model.

The returned model is role-based: each row should provide a RowInfo via JobHolderRole::RowInfo, and process rows should also provide JobHolderProcessRole values (Done, Total, State, StateCustomText). Inside of LeechCraft the model would be merged with the models of other handlers, both of this and of other plugins.

This model is also used to retrieve controls and additional info for a given index via the CustomDataRoles::RoleControls and CustomDataRoles::RoleAdditionalInfo respectively.

Returned controls widget would be placed above the view with the jobs, so usually it has some actions controlling the job, but in fact it can have anything you want. It is only visible when a job from your plugin is selected. If a job from other plugin is selected, then other plugin's controls would be placed, and if no jobs are selected at all then all controls are hidden.

Widget with the additional information is placed to the right of the view with the jobs, so usually it has additional information about the job like transfer log for FTP client, but in fact it can have anything you want. The same rules regarding its visibility apply as for controls widget.

Returns
Representation model.
See also
IJobHolder
LC::CustomDataRoles
LC::RowInfo
LC::JobHolderProcessRole

◆ HandleActivated()

virtual void IJobHolderRepresentationHandler::HandleActivated ( const QModelIndex & )
inlinevirtual

Definition at line 208 of file ijobholder.h.

◆ HandleClicked()

virtual void IJobHolderRepresentationHandler::HandleClicked ( const QModelIndex & )
inlinevirtual

Definition at line 209 of file ijobholder.h.

◆ HandleDoubleClicked()

virtual void IJobHolderRepresentationHandler::HandleDoubleClicked ( const QModelIndex & )
inlinevirtual

Definition at line 210 of file ijobholder.h.

◆ HandlePressed()

virtual void IJobHolderRepresentationHandler::HandlePressed ( const QModelIndex & )
inlinevirtual

Definition at line 211 of file ijobholder.h.

◆ HandleSelectedRowsChanging()

virtual void IJobHolderRepresentationHandler::HandleSelectedRowsChanging ( const RowSelection & selection)
inlinevirtual

Called from a clean stack whenever the selection or the current row changes.

Changes are coalesced and reported before the next repaint, but possibly while a mouse gesture (like a click or a drag selection) is still in progress, so the implementation may update its own state and widgets, but must not modify the representation model's structure: the rows would shift under the pressed pointer.

Parameters
[in]selectionThe selected rows, empty if none of this handler's rows are selected anymore.

Definition at line 193 of file ijobholder.h.

◆ HandleSelectedRowsSettled()

virtual void IJobHolderRepresentationHandler::HandleSelectedRowsSettled ( const RowSelection & selection)
inlinevirtual

Called from a clean stack once the selection has settled.

Multiple changes are coalesced, and this is never invoked while the left mouse button is held on the view. The implementation may modify the representation model, for example, hide the rows deselected by the user.

Parameters
[in]selectionThe selected rows, as in HandleSelectedRowsChanging().

Definition at line 205 of file ijobholder.h.


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.19214.g121e5318a7-build/leechcraft-0.6.70-19214-g121e5318a7/src/interfaces/ijobholder.h