Kross::ActionCollectionView Class Reference
The ActionCollectionView class shows a QTreeView where the content of a ActionCollection is displayed and optional actions to run, stop, add, edit and remove scripts are provided.
More...
#include <view.h>
List of all members.
Detailed Description
The ActionCollectionView class shows a QTreeView where the content of a ActionCollection is displayed and optional actions to run, stop, add, edit and remove scripts are provided.
Example how to create, fill and use an instance of a ActionCollectionView;
Definition at line 163 of file view.h.
Constructor & Destructor Documentation
ActionCollectionView::ActionCollectionView |
( |
QWidget * |
parent = 0 |
) |
[explicit] |
Constructor.
- Parameters:
-
| parent | The optional parent widget this widget is child of. |
Definition at line 285 of file view.cpp.
ActionCollectionView::~ActionCollectionView |
( |
|
) |
[virtual] |
Member Function Documentation
- Returns:
- the KActionCollection which is filled with KAction instances this view provides. Per default there are the actions "run" to run a script, "stop" to stop execution, "edit" to edit the selected item, "add" to add a new item or resource, "remove" to remove the selected item and "manager" to call and show the modal Script Manager dialog.
Definition at line 370 of file view.cpp.
- Returns:
- the KPushButton instance which has the actionname
actionname
or NULL if there is not such button.
Definition at line 375 of file view.cpp.
Create and return a new KPushButton instance for the given actionname.
- Parameters:
-
| parentWidget | The parent widget. |
| actionname | The name of the action. Each button points to an action from within the actionCollection() and triggers that action if the button got clicked. |
- Returns:
- The new KPushButton instance or NULL if e.g. there exist no such action with
actionname
.
Definition at line 387 of file view.cpp.
void Kross::ActionCollectionView::enabledChanged |
( |
const QString & |
actionname |
) |
[signal] |
This signal is emitted if the enabled/disabled state of an action changed.
This happens for example if the slotSelectionChanged() above got called cause another item was selected.
- Parameters:
-
| actionname | The name of the action that changed. You are able to use actionCollection() to receive the to the name matching KAction instance. You are able to use e.g. a QSignalMapper here to map such changes direct to your e.g. KPushButton instances used to display some of the actions provided with actionCollection() . |
bool ActionCollectionView::isModified |
( |
|
) |
const |
- Returns:
- true if the collection was modified.
Definition at line 360 of file view.cpp.
QItemSelection ActionCollectionView::itemSelection |
( |
|
) |
const [protected] |
This method provides us access to the QItemSelection.
Compared to the selectionModel()->selection() method this method does also map the selection to the source-model for the case e.g. the ActionCollectionProxyModel proxy-model was used rather then a ActionCollectionModel direct.
Definition at line 380 of file view.cpp.
void ActionCollectionView::setModified |
( |
bool |
modified |
) |
|
Set the internal modified state of the collection to modified
.
Definition at line 365 of file view.cpp.
void ActionCollectionView::slotAdd |
( |
|
) |
[virtual, slot] |
Called if the "add" action was triggered and a new item should be added.
Definition at line 522 of file view.cpp.
void ActionCollectionView::slotDataChanged |
( |
const QModelIndex & |
topLeft, |
|
|
const QModelIndex & |
bottomRight | |
|
) |
| | [protected, virtual, slot] |
This slot got called if the data changed.
Definition at line 446 of file view.cpp.
void ActionCollectionView::slotEdit |
( |
|
) |
[virtual, slot] |
Called if the "edit" action was triggered and the select item should be edited via the scripts manager editor dialog.
Definition at line 488 of file view.cpp.
void ActionCollectionView::slotEnabledChanged |
( |
const QString & |
actionname |
) |
[protected, virtual, slot] |
This slot got called if the enable/disable state of an action changed.
Definition at line 404 of file view.cpp.
void ActionCollectionView::slotRemove |
( |
|
) |
[virtual, slot] |
Called if the "remove" action was triggered and the selected item should be removed.
Definition at line 556 of file view.cpp.
void ActionCollectionView::slotRun |
( |
|
) |
[virtual, slot] |
Called if the "run" action was triggered and the selected script should be executed.
Definition at line 451 of file view.cpp.
void ActionCollectionView::slotSelectionChanged |
( |
|
) |
[protected, virtual, slot] |
This slot got called if the selected item changed.
Definition at line 412 of file view.cpp.
void ActionCollectionView::slotStop |
( |
|
) |
[virtual, slot] |
Called if the "stop" action was triggered and the selected script stops execution if running.
Definition at line 472 of file view.cpp.
The documentation for this class was generated from the following files: