![]() |
LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
|
#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 () |
Definition at line 121 of file ijobholder.h.
|
virtualdefault |
|
inlinevirtual |
Definition at line 215 of file ijobholder.h.
|
inlinevirtual |
Definition at line 214 of file ijobholder.h.
|
inlinevirtual |
Definition at line 213 of file ijobholder.h.
|
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.
|
inlinevirtual |
Definition at line 208 of file ijobholder.h.
|
inlinevirtual |
Definition at line 209 of file ijobholder.h.
|
inlinevirtual |
Definition at line 210 of file ijobholder.h.
|
inlinevirtual |
Definition at line 211 of file ijobholder.h.
|
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.
| [in] | selection | The selected rows, empty if none of this handler's rows are selected anymore. |
Definition at line 193 of file ijobholder.h.
|
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.
| [in] | selection | The selected rows, as in HandleSelectedRowsChanging(). |
Definition at line 205 of file ijobholder.h.