Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxWorkstackDrag Class Reference

Workstack drag object. More...

#include <QtxWorkstack.h>

Inheritance diagram for QtxWorkstackDrag:
Inheritance graph

Public Member Functions

 QtxWorkstackDrag (QtxWorkstack *, QtxWorkstackChild *)
 Constructor. More...
 
virtual ~QtxWorkstackDrag ()
 Destructor. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Custom event filter. More...
 

Private Member Functions

void dropWidget ()
 Called when drop operation is finished. More...
 
void updateTarget (const QPoint &)
 Detect and set dropping target widget. More...
 
QtxWorkstackAreadetectTarget (const QPoint &, int &) const
 Detect dropping target. More...
 
void setTarget (QtxWorkstackArea *, const int)
 Set dropping target. More...
 
void drawRect ()
 Draw floating rectangle. More...
 
void endDrawRect ()
 Delete rubber band on the end on the dragging operation. More...
 
void startDrawRect ()
 Create rubber band to be drawn on the dragging operation. More...
 

Private Attributes

QtxWorkstackmyWS
 parent workstack More...
 
QtxWorkstackChildmyChild
 workstack child widget container More...
 
int myTab
 workarea tab page index More...
 
QtxWorkstackAreamyArea
 workarea More...
 
QRubberBand * myTabRect
 tab bar rubber band More...
 
QRubberBand * myAreaRect
 workarea rubber band More...
 

Detailed Description

Constructor & Destructor Documentation

QtxWorkstackDrag::QtxWorkstackDrag ( QtxWorkstack ws,
QtxWorkstackChild child 
)
Parameters
wsparent workstack
childchild widget container
QtxWorkstackDrag::~QtxWorkstackDrag ( )
virtual

References endDrawRect().

Member Function Documentation

QtxWorkstackArea * QtxWorkstackDrag::detectTarget ( const QPoint &  p,
int &  tab 
) const
private
Parameters
pcurrent dragging position
tabresulting target tab page index
Returns
target workarea or 0 if there is no correct drop target

References QtxWorkstack::areaAt(), myWS, and QtxWorkstackArea::tabAt().

void QtxWorkstackDrag::drawRect ( )
private
void QtxWorkstackDrag::dropWidget ( )
private

Inserts dropped widget to the target workarea.

References QtxWorkstackArea::insertChild(), myArea, myChild, and myTab.

void QtxWorkstackDrag::endDrawRect ( )
private

References myAreaRect, and myTabRect.

bool QtxWorkstackDrag::eventFilter ( QObject ,
QEvent e 
)
virtual
Parameters
oevent receiver widget
eevent
Returns
true if event should be filtered (stop further processing)

References drawRect(), dropWidget(), endDrawRect(), and updateTarget().

void QtxWorkstackDrag::setTarget ( QtxWorkstackArea area,
const int  tab 
)
private
Parameters
areanew target workarea
tabtarget workarea's tab page index

References drawRect(), myArea, myTab, and startDrawRect().

void QtxWorkstackDrag::startDrawRect ( )
private
void QtxWorkstackDrag::updateTarget ( const QPoint &  p)
private
Parameters
pcurrent dragging position

References detectTarget(), and setTarget().

Member Data Documentation

QtxWorkstackArea* QtxWorkstackDrag::myArea
private
QRubberBand* QtxWorkstackDrag::myAreaRect
private
QtxWorkstackChild* QtxWorkstackDrag::myChild
private
int QtxWorkstackDrag::myTab
private
QRubberBand* QtxWorkstackDrag::myTabRect
private
QtxWorkstack* QtxWorkstackDrag::myWS
private

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