EnginesArea Class Reference

A widget to store the Engine widget. More...

#include <engines_area.h>

List of all members.

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.


Detailed Description

A widget to store the Engine widget.

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.


Constructor & Destructor Documentation

EnginesArea::EnginesArea ( QWidget *  parent = 0  ) 

Create an EnginesArea derived from QScrollArea.

Definition at line 6 of file engines_area.cpp.

References _base, _layout, and _name.

EnginesArea::~EnginesArea (  ) 

Definition at line 20 of file engines_area.cpp.


Member Function Documentation

void EnginesArea::insertWidget ( QWidget *  engine,
int  index = -1 
)

Insert an Engine in the EnginesArea.

Parameters:
engine The engine to add
index Position where to insert the engine
Insert an engine at a specific index or at the end if index = -1

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.

Parameters:
name A name, could be whatever the user want, and should not bu unique
See also:
name()

Definition at line 24 of file engines_area.cpp.

References _name.

Referenced by Win::addEnginesArea(), and Win::open().

QString EnginesArea::name (  ) 

Returns:
The engines area name as defined by the user
See also:
setName()

Definition at line 29 of file engines_area.cpp.

References _name.

Referenced by Win::addEnginesArea(), and Win::save().

QWidget * EnginesArea::engineAt ( const QPoint &  p  ) 

Returns:
The engine at the position p, it returns 0 if there is no engine at point p
Parameters:
p The position

Definition at line 89 of file engines_area.cpp.

References _layout, and engineIndexAt().

int EnginesArea::engineIndexAt ( const QPoint &  p  ) 

Returns:
The engine index at the position p, it returns -1 if there is no engine at point p
Parameters:
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

Returns:
The number of items in the layout

Definition at line 121 of file engines_area.cpp.

References _layout.

Referenced by Win::save().

QLayoutItem * EnginesArea::itemAt ( int  index  )  const

Returns:
The item at the given index. If there is no item it returns 0

Definition at line 126 of file engines_area.cpp.

References _layout.

Referenced by Win::save().

void EnginesArea::engineDropped (  )  [signal]

Emitted if an engine is dropped in the engine area.

Referenced by dropEvent().

void EnginesArea::areaSetVisible ( bool   )  [signal]

Emitted if the EnginesArea change its visibility.

Referenced by hideEvent(), and showEvent().

void EnginesArea::areaClosed (  )  [signal]

Emitted if the user close the EnginesArea.

Referenced by closeEvent(), and hideEvent().

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

See also:
win.h

Definition at line 131 of file engines_area.cpp.

References areaClosed(), and areaSetVisible().

void EnginesArea::showEvent ( QShowEvent *  event  )  [protected]

Reimplemented, handle show event

See also:
win.h

Definition at line 138 of file engines_area.cpp.

References areaSetVisible().

void EnginesArea::closeEvent ( QCloseEvent *  event  )  [protected]

Reimplemented, handle close event

See also:
win.h

Definition at line 144 of file engines_area.cpp.

References areaClosed().


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on Sun Jun 22 23:46:29 2008 for OrK by  doxygen 1.5.6