Shows the record of hierarchy and allows selecting one or more records.
More...
#include <recordtreewidget.h>
|
| void | progressChanged (const QString title, const QString text, const int currentValue, const int maximumValue) const |
| | Progress of the current record operation has changed. More...
|
| |
| void | recordReparented (const QVariant &recordId, const QVariant &newParentId) |
| | A record has been reparented to another record in the hierarchy. More...
|
| |
|
| | RecordTreeWidget (RecordsController &recordsController, FacetsController &facetsController, FieldDefinitionsController &fieldDefinitionsController, ProjectController &projectController, SettingsController &settingsController) |
| | Constructs a new widget that shows the record of hierarchy and allows selecting one or more records. More...
|
| |
| void | addRecord (const QVariant &id, const QString &displayName, const QVariant &parentId) |
| | Adds the specified record to show in the hierarchy. More...
|
| |
| QVariant | getSelectedRecordId () const |
| | Gets the id of the currently selected record. More...
|
| |
| QVariantList | getSelectedRecordIds () const |
| | Gets a list of ids of all currently selected records. More...
|
| |
|
void | navigateForward () |
| | Selects the next record in the history of selected records.
|
| |
|
void | navigateBackward () |
| | Selects the previous record in the history of selected records.
|
| |
| void | updateRecord (const QVariant &oldId, const QString &oldDisplayName, const QString &oldEditorIconFieldId, const QVariant &newId, const QString &newDisplayName, const QString &newEditorIconFieldId) |
| | Updates the specified record in the hierarchy. More...
|
| |
| void | selectRecord (const QVariant &id, const bool addToHistory) |
| | Selects the specified record in the hierarchy. More...
|
| |
| void | setContextMenuActions (QList< QAction *> actions) |
| | Sets the list of actions to show in the context menu of the selected records. More...
|
| |
| void | setRecords (const RecordList &records) |
| | Sets the records to show in the hierarchy. More...
|
| |
| void | removeRecord (const QVariant &id) |
| | Removes the specified record from the hierarchy. More...
|
| |
|
| void | contextMenuEvent (QContextMenuEvent *event) Q_DECL_OVERRIDE |
| | Shows the context menu for the current set of selected records. More...
|
| |
| bool | dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action) Q_DECL_OVERRIDE |
| | Checks whether to reparent a record in the hierarchy by drag & drop. More...
|
| |
| void | mousePressEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
| | Selects a record in the hierarchy, or clears the current selection. More...
|
| |
Shows the record of hierarchy and allows selecting one or more records.
◆ RecordTreeWidget()
Constructs a new widget that shows the record of hierarchy and allows selecting one or more records.
- Parameters
-
| recordsController | Controller for adding, updating and removing records. |
| facetsController | Controller for validating type facets. |
| fieldDefinitionsController | Controller for adding, updating and removing field definitions. |
| projectController | Controller for creating, loading and saving projects. |
| settingsController | Controller for accessing user settings. |
◆ addRecord()
| void RecordTreeWidget::addRecord |
( |
const QVariant & |
id, |
|
|
const QString & |
displayName, |
|
|
const QVariant & |
parentId |
|
) |
| |
Adds the specified record to show in the hierarchy.
- Parameters
-
| id | Id of the record to add. |
| displayName | Display name of the record to show in the hierarchy. |
| parentId | Id of the record to parent the new record to in the hierarchy. |
◆ contextMenuEvent()
| void RecordTreeWidget::contextMenuEvent |
( |
QContextMenuEvent * |
event | ) |
|
|
protected |
Shows the context menu for the current set of selected records.
- Parameters
-
| event | Event for showing the context menu. |
◆ dropMimeData()
| bool RecordTreeWidget::dropMimeData |
( |
QTreeWidgetItem * |
parent, |
|
|
int |
index, |
|
|
const QMimeData * |
data, |
|
|
Qt::DropAction |
action |
|
) |
| |
|
protected |
Checks whether to reparent a record in the hierarchy by drag & drop.
- Parameters
-
| parent | New parent to reparent the dragged record to. |
| index | Unused. |
| data | Dragged record. |
| action | Unused. |
- Returns
- True, if a record has been dragged & dropped onto another one, and false otherwise.
◆ getSelectedRecordId()
| QVariant RecordTreeWidget::getSelectedRecordId |
( |
| ) |
const |
Gets the id of the currently selected record.
- Returns
- Id of the currently selected record, or null if no record is selected.
◆ getSelectedRecordIds()
| QVariantList RecordTreeWidget::getSelectedRecordIds |
( |
| ) |
const |
Gets a list of ids of all currently selected records.
- Returns
- List of ids of all currently selected records, or an empty list if no record is selected.
◆ mousePressEvent()
| void RecordTreeWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Selects a record in the hierarchy, or clears the current selection.
- Parameters
-
| event | Event to selecting a record in the hierarchy or clearing the selection. |
◆ progressChanged
| void Tome::RecordTreeWidget::progressChanged |
( |
const QString |
title, |
|
|
const QString |
text, |
|
|
const int |
currentValue, |
|
|
const int |
maximumValue |
|
) |
| const |
|
signal |
Progress of the current record operation has changed.
- Parameters
-
| title | Title of the current record operation step. |
| text | Details of the current record operation step. |
| currentValue | Current progress value of the current record operation step. |
| maximumValue | Maximum progress value of the current record operation step. |
◆ recordReparented
| void Tome::RecordTreeWidget::recordReparented |
( |
const QVariant & |
recordId, |
|
|
const QVariant & |
newParentId |
|
) |
| |
|
signal |
A record has been reparented to another record in the hierarchy.
- Parameters
-
| recordId | Id of the record which has been reparented. |
| newParentId | Id of the new parent of the record, or null if the record has been made a root of the hierarchy. |
◆ removeRecord()
| void RecordTreeWidget::removeRecord |
( |
const QVariant & |
id | ) |
|
Removes the specified record from the hierarchy.
- Parameters
-
| id | Id of the record to remove. |
◆ selectRecord()
| void RecordTreeWidget::selectRecord |
( |
const QVariant & |
id, |
|
|
const bool |
addToHistory |
|
) |
| |
Selects the specified record in the hierarchy.
- Parameters
-
| id | Id of the record to select. |
| addToHistory | Whether to add the record to the navigation history, or not. |
◆ setContextMenuActions()
| void RecordTreeWidget::setContextMenuActions |
( |
QList< QAction *> |
actions | ) |
|
Sets the list of actions to show in the context menu of the selected records.
- Parameters
-
| actions | List of actions to show in the context menu of the selected records. |
◆ setRecords()
| void RecordTreeWidget::setRecords |
( |
const RecordList & |
records | ) |
|
Sets the records to show in the hierarchy.
- Parameters
-
| records | Records to show in the hierarchy. |
◆ updateRecord()
| void RecordTreeWidget::updateRecord |
( |
const QVariant & |
oldId, |
|
|
const QString & |
oldDisplayName, |
|
|
const QString & |
oldEditorIconFieldId, |
|
|
const QVariant & |
newId, |
|
|
const QString & |
newDisplayName, |
|
|
const QString & |
newEditorIconFieldId |
|
) |
| |
Updates the specified record in the hierarchy.
- Parameters
-
| oldId | Previous id of the record to update. |
| oldDisplayName | Previous display name of the record to update to show in the hierarchy. |
| oldEditorIconFieldId | Previous id of the field to use as editor icon for the record to update. |
| newId | New id of the record to update. |
| newDisplayName | New display name of the record to update to show in the hierarchy. |
| newEditorIconFieldId | New id of the field to use as editor icon for the record to update. |
The documentation for this class was generated from the following files:
- Source/Tome/Features/Records/View/recordtreewidget.h
- Source/Tome/Features/Records/View/recordtreewidget.cpp