![]() |
HAL
|
The PlacementHint class object provides hints for the layouter how new box objects are placed on a view. In standard mode placement is done using the most compact squere-like arrangement. Alternatively new box objects can be placed to the left or right to a node which serves as 'origin'. More...
#include <gui_def.h>
Public Types | |
enum | PlacementModeType { Standard = 0 , PreferLeft = 1 , PreferRight = 2 , GridPosition = 3 } |
The PlacementModeType enum either most compact arrangement (Standard) or to the left or right of given origin. More... | |
Public Member Functions | |
PlacementHint (PlacementModeType mod=Standard, const Node &orign=Node()) | |
PlacementHint standard constructor. More... | |
PlacementHint (const GridPlacement &gridPlc) | |
PlacementHint constructor for grid placement. More... | |
PlacementModeType | mode () const |
mode getter for placement mode type More... | |
Node | preferredOrigin () const |
preferredOrigin getter for placement origin if any. More... | |
bool | operator< (const PlacementHint &rhs) const |
operator < provide an order structure for placement hints More... | |
bool | operator== (const PlacementHint &rhs) const |
operator == test whether two placement hints are equal More... | |
void | addGridPosition (const Node &nd, const QPoint &p) |
const QHash< Node, QPoint > & | gridPosition () const |
The PlacementHint class object provides hints for the layouter how new box objects are placed on a view. In standard mode placement is done using the most compact squere-like arrangement. Alternatively new box objects can be placed to the left or right to a node which serves as 'origin'.
|
inline |
PlacementHint standard constructor.
mod | placement mode must be either Standard or PreferLeft or PreferRight |
orign | node to start from when PreferLeft or PreferRight are set |
|
inline |
PlacementHint constructor for grid placement.
gridPlc | Hash node to position |
Assigns a given node the given position. Stores it internally.
nd | - The node. |
p | - The position |
Definition at line 263 of file gui_def.h.
References QHash::insert().
Referenced by hal::ActionFoldModule::exec(), hal::ActionRemoveItemsFromObject::exec(), hal::ActionUnfoldModule::exec(), hal::GraphContextManager::openNetEndpointsInView(), and hal::GraphContext::unfoldModule().
Get the data structure containing the node - position assignments.
Definition at line 273 of file gui_def.h.
Referenced by hal::StandardGraphLayouter::add(), and hal::ActionAddItemsToObject::writeToXml().
|
inline |
mode getter for placement mode type
Definition at line 223 of file gui_def.h.
Referenced by hal::GraphContext::add(), hal::StandardGraphLayouter::add(), hal::GraphContext::unfoldModule(), and hal::ActionAddItemsToObject::writeToXml().
|
inline |
|
inline |
|
inline |
preferredOrigin getter for placement origin if any.
It can be tested by preferredOrigin().isNull if no origin has been set.
Definition at line 231 of file gui_def.h.
Referenced by hal::StandardGraphLayouter::add(), and hal::ActionAddItemsToObject::writeToXml().