Image Component Library (ICL)
|
Internally used utils::Rect structure. More...
#include <DefineRectanglesMouseHandler.h>
Public Types | |
enum | Edge { T, R, B, L } |
Edges. More... | |
enum | State { nothing, hovered, dragged } |
Edge states. More... | |
Public Member Functions | |
utils::Rect | edge (Edge e) const |
internal helper method More... | |
utils::Rect | edgei (int i) const |
internal helper method More... | |
utils::Rect | inner () const |
internal helper method More... | |
utils::Rect | outer () const |
internal helper method More... | |
bool | allHovered () const |
internal helper method More... | |
bool | allDragged () const |
internal helper method More... | |
bool | anyDragged () const |
internal helper method More... | |
DefinedRect (const utils::Rect &r=utils::Rect::null, DefineRectanglesMouseHandler::Options *options=0) | |
Constructor. More... | |
State | event (const MouseEvent &e) |
event processing if the rectangle was hit More... | |
void | visualize (ICLDrawWidget &w) |
visualization More... | |
Public Member Functions inherited from icl::utils::Rect | |
Rect () | |
default constructor More... | |
Rect (int x, int y, int width, int height) | |
creates a defined Rect More... | |
Rect (const Point &p, const Size &s) | |
creates a new Rect with specified offset and size More... | |
Rect (const Rect &r) | |
create a deep copy of a rect More... | |
Rect (const Rect32f &other) | |
creates a Rect from given Rect32f instance More... | |
bool | isNull () const |
checks wether the object instance is null, i.e. all elements are zero More... | |
bool | operator== (const Rect &s) const |
checks if two rects are equal More... | |
bool | operator!= (const Rect &s) const |
checks if two rects are not equal More... | |
Rect | operator * (double d) const |
scales all parameters of the rect by a double value More... | |
Rect | operator/ (double d) const |
scales all parameters of the rect by a double value More... | |
Rect | operator+ (const Size &s) const |
adds a size to the rects size More... | |
Rect | operator- (const Size &s) const |
substracts a size for the rects size More... | |
Rect & | operator+= (const Size &s) |
adds a size to the rects size More... | |
Rect & | operator-= (const Size &s) |
substracs a size from the rects size More... | |
Rect | operator+ (const Point &p) const |
adds a Point to the rects offset More... | |
Rect | operator- (const Point &p) const |
substracts a Point from the rects offset More... | |
Rect & | operator+= (const Point &p) |
adds a Point to the rects offset More... | |
Rect & | operator-= (const Point &p) |
substracts a Point from the rects offset More... | |
Rect & | operator *= (double d) |
scales all rect params inplace More... | |
Rect & | operator/= (double d) |
scales all rect params inplace More... | |
int | getDim () const |
returns width*height More... | |
Rect | operator & (const Rect &r) const |
intersection of two Rects More... | |
Rect & | operator&= (const Rect &r) |
inplace intersection of two rects More... | |
Rect | operator| (const Rect &r) const |
union of two Rects More... | |
Rect & | operator|= (const Rect &r) |
inplace union of two rects More... | |
Rect | normalized () const |
rects with negative sizes are normalized to Positive sizes More... | |
bool | contains (const Rect &r) const |
returns if a Rect containes another rect More... | |
bool | contains (int x, int y) const |
returns if the Rect contains a given point (pixel-based) More... | |
Rect & | enlarge (int k) |
let the rect grow by k pixles into each direction More... | |
Rect | enlarged (int k) const |
returns an enlarged instance of this rect More... | |
Point | ul () const |
returns upper left point of the rect More... | |
Point | ll () const |
returns lower left point of the rect More... | |
Point | ur () const |
returns upper right point of the rect More... | |
Point | lr () const |
returns lower right point of the rect More... | |
Point | center () const |
returns the center Point of the rect More... | |
int | left () const |
returns the left border position More... | |
int | right () const |
returns the right border position More... | |
int | bottom () const |
returns the position of the bottom border More... | |
int | top () const |
returns the position of the upper border More... | |
Size | getSize () const |
returns the size of the rect More... | |
Rect | transform (double xfac, double yfac) const |
Public Attributes | |
State | states [4] |
State of all 4 edges. More... | |
utils::Point | allDragOffs |
Internal help variable for smooth shifting of the whole rectangle. More... | |
DefineRectanglesMouseHandler::Options * | options |
a pointer to the parent DefineRectanglesMouseHandler's Option structure More... | |
utils::Any | meta |
this can be used to attach meta data to rectangles More... | |
Friends | |
class | DefineRectanglesMouseHandler |
grant private member access to DefineRectanglesMouseHandler More... | |
Additional Inherited Members | |
Static Public Attributes inherited from icl::utils::Rect | |
static const Rect | null |
null Rect is w=0, h=0, x=0, y=0 More... | |
Internally used utils::Rect structure.
icl::qt::DefineRectanglesMouseHandler::DefinedRect::DefinedRect | ( | const utils::Rect & | r = utils::Rect::null , |
DefineRectanglesMouseHandler::Options * | options = 0 |
||
) |
Constructor.
bool icl::qt::DefineRectanglesMouseHandler::DefinedRect::allDragged | ( | ) | const |
internal helper method
bool icl::qt::DefineRectanglesMouseHandler::DefinedRect::allHovered | ( | ) | const |
internal helper method
bool icl::qt::DefineRectanglesMouseHandler::DefinedRect::anyDragged | ( | ) | const |
internal helper method
utils::Rect icl::qt::DefineRectanglesMouseHandler::DefinedRect::edge | ( | Edge | e | ) | const |
internal helper method
utils::Rect icl::qt::DefineRectanglesMouseHandler::DefinedRect::edgei | ( | int | i | ) | const |
internal helper method
State icl::qt::DefineRectanglesMouseHandler::DefinedRect::event | ( | const MouseEvent & | e | ) |
event processing if the rectangle was hit
utils::Rect icl::qt::DefineRectanglesMouseHandler::DefinedRect::inner | ( | ) | const |
internal helper method
utils::Rect icl::qt::DefineRectanglesMouseHandler::DefinedRect::outer | ( | ) | const |
internal helper method
void icl::qt::DefineRectanglesMouseHandler::DefinedRect::visualize | ( | ICLDrawWidget & | w | ) |
visualization
|
friend |
grant private member access to DefineRectanglesMouseHandler
utils::Point icl::qt::DefineRectanglesMouseHandler::DefinedRect::allDragOffs |
Internal help variable for smooth shifting of the whole rectangle.
utils::Any icl::qt::DefineRectanglesMouseHandler::DefinedRect::meta |
this can be used to attach meta data to rectangles
DefineRectanglesMouseHandler::Options* icl::qt::DefineRectanglesMouseHandler::DefinedRect::options |
a pointer to the parent DefineRectanglesMouseHandler's Option structure