Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
GridBasedOffsetProvider (Visualization::Item *vis) | |
~GridBasedOffsetProvider () | |
void | add (Cell *cell) |
Adds the cell cell to the grid of this string provider. More... | |
virtual int | offset (Qt::Key key) override |
void | setFilterNullAndEmptyComponents () |
virtual void | setOffset (int newOffset) override |
void | setSize (int width, int height) |
Sets the size of this grid string provider. More... | |
Public Member Functions inherited from OOInteraction::StringOffsetProvider | |
StringOffsetProvider (Visualization::Item *item) | |
virtual | ~StringOffsetProvider () |
virtual bool | isIndivisible () |
Returns true when the visualization corresponding to this StringProvider is an indivisible entity. More... | |
Visualization::Item * | item () const |
virtual QString | string () |
Static Public Member Functions | |
template<typename T > | |
static void | addGridConstructor (void(*constructor)(GridBasedOffsetProvider *provider, T *item)) |
static bool | hasGridConstructorfor (Visualization::Item *item) |
Static Public Member Functions inherited from OOInteraction::StringOffsetProvider | |
static void | allowGridBasedProvider (AllowGridBasedProviderFunction allow) |
static QStringList | components (Model::Node *node) |
static StringOffsetProvider * | defaultProvider (Visualization::Item *item) |
static int | itemOffset (Visualization::Item *item, int stringComponentLenght, Qt::Key key) |
static int | listItemOffset (Visualization::VList *list, const QString &prefix, const QString &separator, const QString &postfix, Qt::Key key) |
static bool | setOffsetInItem (int offset, Visualization::Item *item) |
static bool | setOffsetInListItem (int &offset, Visualization::VList *list, const QString &prefix, const QString &separator, const QString &postfix) |
static QString | stringFromComponenets (Model::Node *node) |
static QString | stringFromComponenets (Visualization::Item *item) |
static QString | stringFromStringOffsetProvider (Visualization::Item *item) |
Protected Member Functions | |
virtual QStringList | components () override |
Private Types | |
enum | Direction { Left , Up , Right , Down } |
using | ItemTypeRegistrationFunction = void(*)(GridBasedOffsetProvider *provider, Visualization::Item *item) |
Private Member Functions | |
Cell * | findCell (const QRect &start, Direction dir) const |
bool | isOnBottom (Cell *cell) const |
bool | isOnLeft (Cell *cell) const |
bool | isOnRight (Cell *cell) const |
bool | isOnTop (Cell *cell) const |
Static Private Member Functions | |
static QMap< int, ItemTypeRegistrationFunction > & | gridConstructors () |
Private Attributes | |
QList< Cell * > | cells_ |
bool | filterNullAndEmptyComponents_ {} |
QSize | size_ |
Additional Inherited Members | |
Public Types inherited from OOInteraction::StringOffsetProvider | |
using | AllowGridBasedProviderFunction = std::function< bool(Visualization::Item *)> |
using | BaseAdapteeType = Visualization::Item |
|
private |
|
private |
OOInteraction::GridBasedOffsetProvider::GridBasedOffsetProvider | ( | Visualization::Item * | vis | ) |
OOInteraction::GridBasedOffsetProvider::~GridBasedOffsetProvider | ( | ) |
void OOInteraction::GridBasedOffsetProvider::add | ( | Cell * | cell | ) |
Adds the cell cell to the grid of this string provider.
Every time a new cell is added the size of this provider will be adjusted if necessary to accommodate the new cell.
|
inlinestatic |
|
overrideprotectedvirtual |
Reimplemented from OOInteraction::StringOffsetProvider.
|
private |
|
staticprivate |
|
static |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
overridevirtual |
Implements OOInteraction::StringOffsetProvider.
|
inline |
|
overridevirtual |
Implements OOInteraction::StringOffsetProvider.
|
inline |
Sets the size of this grid string provider.
It is only necessary to call this method if padding is required. Otherwise simply using add() is sufficient.
|
private |
|
private |
|
private |