Brief description of class still missing. More...
#include <MouseTracking.h>
Public Member Functions | |
const LayerMouseTracking & | activeLayer () const |
void | add (const LayerMouseTracking &l) |
bool | contains (GraphContentLayer *layer, int id=-1) const |
int | indexOf (GraphContentLayer *layer, int id=-1) const |
void | initRectangle (const QPoint &topLeft) |
bool | isActive () const |
bool | isEmpty () const |
bool | isEmptyRectangle () const |
bool | isRectangle () const |
bool | isRectangleVisible () const |
MouseTracking () | |
QRect * | rectangle () const |
void | remove (int i) |
void | resetRectangle () |
void | setActive (bool a) |
~MouseTracking () |
Brief description of class still missing.
Full description of class still missing
SciFigs::MouseTracking::MouseTracking | ( | ) | [inline] |
Description of constructor still missing
{_rectangle=0; _active=true;}
SciFigs::MouseTracking::~MouseTracking | ( | ) | [inline] |
Description of destructor still missing
{delete _rectangle;}
const LayerMouseTracking& SciFigs::MouseTracking::activeLayer | ( | ) | const [inline] |
{return first();}
void SciFigs::MouseTracking::add | ( | const LayerMouseTracking & | l | ) |
bool SciFigs::MouseTracking::contains | ( | GraphContentLayer * | layer, |
int | id = -1 |
||
) | const [inline] |
{return indexOf(layer, id)>-1;}
int SciFigs::MouseTracking::indexOf | ( | GraphContentLayer * | layer, |
int | id = -1 |
||
) | const |
References SciFigs::LayerMouseTracking::id(), SciFigs::LayerMouseTracking::layer(), and TRACE.
{ TRACE; int n=count(); for(int i=0; i<n; i++ ) { const LayerMouseTracking& l=at(i); if(l.layer()==layer && l.id()==id) return i; } return -1; }
void SciFigs::MouseTracking::initRectangle | ( | const QPoint & | topLeft | ) |
bool SciFigs::MouseTracking::isActive | ( | ) | const [inline] |
{return _active;}
bool SciFigs::MouseTracking::isEmpty | ( | ) | const [inline] |
Referenced by isRectangle(), and isRectangleVisible().
{return QList<LayerMouseTracking>::isEmpty();}
bool SciFigs::MouseTracking::isEmptyRectangle | ( | ) | const [inline] |
References QGpCoreTools::abs().
bool SciFigs::MouseTracking::isRectangle | ( | ) | const |
bool SciFigs::MouseTracking::isRectangleVisible | ( | ) | const |
QRect* SciFigs::MouseTracking::rectangle | ( | ) | const [inline] |
{return _rectangle;}
void SciFigs::MouseTracking::remove | ( | int | i | ) |
References SciFigs::LayerMouseTracking::rectangle(), and TRACE.
{ TRACE; const LayerMouseTracking& l=at(i); bool checkRect=l.rectangle(); QList<LayerMouseTracking>::removeAt(i); if(checkRect && _rectangle) { // check if remaining layers that need rectangle for(iterator it=begin(); it!=end(); it++ ) { if(it->rectangle()) return; } delete _rectangle; _rectangle=0; } }
void SciFigs::MouseTracking::setActive | ( | bool | a | ) | [inline] |
{_active=a;}