This class allows to drag one or more items which correspond to a Command object. More...
#include <Widgets.h>
Signals | |
| void | emitSelectionChanged (const QString &) |
| Emits this signal if selection has changed. | |
Public Member Functions | |
| CommandIconView (QWidget *parent=0) | |
| Constructs an empty command view with parent parent. | |
| virtual | ~CommandIconView () |
| Destroys the icon view and deletes all items. | |
Protected Slots | |
| void | onSelectionChanged (QListWidgetItem *item, QListWidgetItem *) |
| This slot is called when a new item becomes current. | |
Protected Member Functions | |
| void | startDrag (Qt::DropActions supportedActions) |
| Stores the name of the selected commands for drag and drop. | |
This class allows to drag one or more items which correspond to a Command object.
The dragged items can be dropped onto the Gui::PythonConsole.
Definition at line 45 of file Widgets.h.
| CommandIconView::CommandIconView | ( | QWidget * | parent = 0 |
) |
Constructs an empty command view with parent parent.
Definition at line 51 of file Widgets.cpp.
References draftlibs::fcgeo::connect(), and onSelectionChanged().
| CommandIconView::~CommandIconView | ( | ) | [virtual] |
Destroys the icon view and deletes all items.
Definition at line 61 of file Widgets.cpp.
| void Gui::CommandIconView::emitSelectionChanged | ( | const QString & | ) | [signal] |
Emits this signal if selection has changed.
Referenced by onSelectionChanged().
| void CommandIconView::onSelectionChanged | ( | QListWidgetItem * | item, | |
| QListWidgetItem * | ||||
| ) | [protected, slot] |
This slot is called when a new item becomes current.
item is the new current item (or 0 if no item is now current). This slot emits the emitSelectionChanged() signal for its part.
Definition at line 97 of file Widgets.cpp.
References emitSelectionChanged().
Referenced by CommandIconView().
| void CommandIconView::startDrag | ( | Qt::DropActions | supportedActions | ) | [protected] |
Stores the name of the selected commands for drag and drop.
Definition at line 68 of file Widgets.cpp.
1.6.1