Envision
A visual programming IDE for object-oriented languages
|
Public Types | |
typedef GridLayoutStyle | StyleType |
Public Member Functions | |
GridLayout (Item *parent, const StyleType *style=itemStyles().get()) | |
~GridLayout () | |
virtual QList< Visualization::VisualizationAddOn * > | addOns () override |
template<typename T > | |
T * | at (int x, int y) |
template<typename T > | |
T * | at (int x, int y) const |
void | clear (bool deleteItems=true) |
QPoint | focusedElementIndex () const |
QSize | gridSize () const |
virtual Visualization::InteractionHandler * | handler () const override |
virtual bool | isEmpty () const override |
bool | isEmpty (int x, int y) const |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
void | remove (int x, int y, bool deleteItem=true) |
void | remove (Item *item, bool deleteItem=true) |
void | set (Item *item, int x, int y, bool deleteOldItem) |
void | setGridSize (int sizeX, int sizeY, bool deleteExtraItems) |
virtual void | setStyle (const Visualization::ItemStyle *itemStyle) override |
const StyleType * | style () const |
void | swap (int x1, int y1, int x2, int y2) |
void | synchronizeWithNodes (const QList< QList< Model::Node * > > &nodes) |
Updates the content of the grid to match 'nodes'. More... | |
virtual void | updateGeometry (int availableWidth, int availableHeight) override |
Static Public Member Functions | |
static void | addAddOn (Visualization::VisualizationAddOn *addOn) |
static Visualization::InteractionHandler * | defaultClassHandler () |
static Visualization::StyleSet< GridLayout > & | itemStyles () |
static bool | removeAddOn (Visualization::VisualizationAddOn *addOn) |
static void | setDefaultClassHandler (Visualization::InteractionHandler *handler) |
Private Member Functions | |
Item * | findFirstHorizontal (bool startFromLeft) |
Item * | findFirstVertical (bool startFromTop) |
Item * | findNext (int dx, int dy) |
Static Private Member Functions | |
static QList< Visualization::VisualizationAddOn * > & | staticAddOns () |
Private Attributes | |
QVector< QVector< Item * > > | items_ |
int | sizeX_ |
int | sizeY_ |
Static Private Attributes | |
static Visualization::InteractionHandler * | defaultClassHandler_ = nullptr |
Additional Inherited Members | |
Protected Types inherited from Core::Reflect< Base > | |
using | Super = Reflect< Base > |
Visualization::GridLayout::GridLayout | ( | Item * | parent, |
const StyleType * | style = itemStyles().get() |
||
) |
Visualization::GridLayout::~GridLayout | ( | ) |
|
static |
|
overridevirtual |
|
inline |
|
inline |
void Visualization::GridLayout::clear | ( | bool | deleteItems = true | ) |
|
inlinestatic |
|
private |
|
private |
|
private |
QPoint Visualization::GridLayout::focusedElementIndex | ( | ) | const |
|
inline |
|
overridevirtual |
|
overridevirtual |
bool Visualization::GridLayout::isEmpty | ( | int | x, |
int | y | ||
) | const |
|
static |
|
overridevirtual |
void Visualization::GridLayout::remove | ( | int | x, |
int | y, | ||
bool | deleteItem = true |
||
) |
void Visualization::GridLayout::remove | ( | Item * | item, |
bool | deleteItem = true |
||
) |
|
static |
void Visualization::GridLayout::set | ( | Item * | item, |
int | x, | ||
int | y, | ||
bool | deleteOldItem | ||
) |
|
inlinestatic |
void Visualization::GridLayout::setGridSize | ( | int | sizeX, |
int | sizeY, | ||
bool | deleteExtraItems | ||
) |
|
overridevirtual |
|
staticprivate |
|
inline |
void Visualization::GridLayout::swap | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
void Visualization::GridLayout::synchronizeWithNodes | ( | const QList< QList< Model::Node * > > & | nodes | ) |
Updates the content of the grid to match 'nodes'.
The elements of the grid are updated so that they contain visualizations of the provided nodes. The grid will be resized if necessary.
nodes | A list of rows. The first row in the list is the topmost one. Each row is a list of nodes starting from the leftmost node. |
|
overridevirtual |
|
staticprivate |
|
private |
|
private |
|
private |