#include <engines_area.h>
Signals | |
void | engineDropped () |
Emitted if an engine is dropped in the engine area. | |
void | areaSetVisible (bool) |
Emitted if the EnginesArea change its visibility. | |
void | areaClosed () |
Emitted if the user close the EnginesArea. | |
Public Member Functions | |
EnginesArea (QWidget *parent=0) | |
Create an EnginesArea derived from QScrollArea. | |
~EnginesArea () | |
void | insertWidget (QWidget *engine, int index=-1) |
Insert an Engine in the EnginesArea. | |
void | setName (const QString &name) |
Set the engines area name as defined by the user. | |
QString | name () |
QWidget * | engineAt (const QPoint &p) |
int | engineIndexAt (const QPoint &p) |
int | count () const |
QLayoutItem * | itemAt (int index) const |
Protected Member Functions | |
void | dragEnterEvent (QDragEnterEvent *event) |
Reimplemented from QObject for drag and drop. | |
void | dragMoveEvent (QDragMoveEvent *event) |
Reimplemented from QObject for drag and drop. | |
void | dropEvent (QDropEvent *event) |
Reimplemented from QObject for drag and drop. | |
void | hideEvent (QHideEvent *event) |
void | showEvent (QShowEvent *event) |
void | closeEvent (QCloseEvent *event) |
Private Attributes | |
QString | _name |
The user friendly name. | |
QWidget * | _base |
The main widget. | |
QVBoxLayout * | _layout |
The engines layout. |
Is a scroll area where the user can store a group of his engines, it allow to do drag and drop in order to change the engines order. Drag and drop between two EnginesArea is possible.
Definition at line 32 of file engines_area.h.
EnginesArea::EnginesArea | ( | QWidget * | parent = 0 |
) |
EnginesArea::~EnginesArea | ( | ) |
Definition at line 20 of file engines_area.cpp.
void EnginesArea::insertWidget | ( | QWidget * | engine, | |
int | index = -1 | |||
) |
Insert an Engine in the EnginesArea.
engine | The engine to add | |
index | Position where to insert the engine |
Definition at line 34 of file engines_area.cpp.
References _layout.
Referenced by dropEvent(), and Win::open().
void EnginesArea::setName | ( | const QString & | name | ) |
Set the engines area name as defined by the user.
name | A name, could be whatever the user want, and should not bu unique |
Definition at line 24 of file engines_area.cpp.
References _name.
Referenced by Win::addEnginesArea(), and Win::open().
QString EnginesArea::name | ( | ) |
Definition at line 29 of file engines_area.cpp.
References _name.
Referenced by Win::addEnginesArea(), and Win::save().
QWidget * EnginesArea::engineAt | ( | const QPoint & | p | ) |
p | The position |
Definition at line 89 of file engines_area.cpp.
References _layout, and engineIndexAt().
int EnginesArea::engineIndexAt | ( | const QPoint & | p | ) |
p | The position |
Definition at line 100 of file engines_area.cpp.
References _base, and _layout.
Referenced by dropEvent(), and engineAt().
int EnginesArea::count | ( | ) | const |
Definition at line 121 of file engines_area.cpp.
References _layout.
Referenced by Win::save().
QLayoutItem * EnginesArea::itemAt | ( | int | index | ) | const |
Definition at line 126 of file engines_area.cpp.
References _layout.
Referenced by Win::save().
void EnginesArea::engineDropped | ( | ) | [signal] |
void EnginesArea::areaSetVisible | ( | bool | ) | [signal] |
void EnginesArea::areaClosed | ( | ) | [signal] |
void EnginesArea::dragEnterEvent | ( | QDragEnterEvent * | event | ) | [protected] |
Reimplemented from QObject for drag and drop.
Definition at line 44 of file engines_area.cpp.
References OrKEngine::MimeType.
void EnginesArea::dragMoveEvent | ( | QDragMoveEvent * | event | ) | [protected] |
Reimplemented from QObject for drag and drop.
Definition at line 77 of file engines_area.cpp.
References OrKEngine::MimeType.
void EnginesArea::dropEvent | ( | QDropEvent * | event | ) | [protected] |
Reimplemented from QObject for drag and drop.
Definition at line 56 of file engines_area.cpp.
References _layout, engineDropped(), engineIndexAt(), insertWidget(), and OrKEngine::MimeType.
void EnginesArea::hideEvent | ( | QHideEvent * | event | ) | [protected] |
Reimplemented, handle hide event
Definition at line 131 of file engines_area.cpp.
References areaClosed(), and areaSetVisible().
void EnginesArea::showEvent | ( | QShowEvent * | event | ) | [protected] |
Reimplemented, handle show event
Definition at line 138 of file engines_area.cpp.
References areaSetVisible().
void EnginesArea::closeEvent | ( | QCloseEvent * | event | ) | [protected] |
Reimplemented, handle close event
Definition at line 144 of file engines_area.cpp.
References areaClosed().
QString EnginesArea::_name [private] |
The user friendly name.
Definition at line 117 of file engines_area.h.
Referenced by EnginesArea(), name(), and setName().
QWidget* EnginesArea::_base [private] |
The main widget.
Definition at line 120 of file engines_area.h.
Referenced by engineIndexAt(), and EnginesArea().
QVBoxLayout* EnginesArea::_layout [private] |
The engines layout.
Definition at line 123 of file engines_area.h.
Referenced by count(), dropEvent(), engineAt(), engineIndexAt(), EnginesArea(), insertWidget(), and itemAt().