gapMea  1.0-rc1-1.5.3.2
GapMea est un outil visuel écrit en c++ à l'aide de la bibliothèque QT qui sert de base entre autre à l'environnement graphique de KDE.Il permet de dessiner des schémas recueillant et structurant les informations nécessaires à un domaine de gestion. Le schéma obtenu est enregistré dans un fichier texte au format xml.
 All Classes Functions Variables
Entite Class Reference

The Entite class Entity is an object we have to deal with. More...

#include <entite.h>

Inheritance diagram for Entite:
Inheritance graph
Collaboration diagram for Entite:
Collaboration graph

Public Types

enum  { Type = TABLE }
 

Public Slots

int nbLien (Entite *lAutre)
 nbLien More...
 

Public Member Functions

int type () const
 
 Entite (MainWindow *mum, QString nom, qreal x, qreal y, QGraphicsItem *parent, QCustomGraphicsScene *laScene, QStringList listeDesChamps, bool isAssoc)
 Entite. More...
 
QString getNomEntite ()
 getNomEntite More...
 
void contextMenuEvent (QGraphicsSceneMouseEvent *event)
 contextMenuEvent More...
 
QPolygonF polygon ()
 polygon More...
 
QString nomTableTronque ()
 nomTableTronque More...
 
QString getPrimaryKey ()
 getPrimaryKey More...
 
void redraw ()
 redraw
 
QVector< Entite * > renvoieEntiteMeres ()
 renvoieEntiteMeres More...
 
bool isEntiteFaible ()
 isEntiteFaible More...
 
QString toSql (bool withoutFK=false)
 toSql More...
 
QStringList renvoieClefsEtrangeres (bool constraintInsideTable=true)
 renvoieClefsEtrangeres More...
 
QString getPrimaryKeyAsFields (bool=true)
 getPrimaryKeyAsFields More...
 
QStringList renvoieChampsEtrangers ()
 renvoieChampsEtrangers More...
 
QString getkeyAsForeignKey (QString role)
 getkeyAsForeignKey More...
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
bool canBeWriten (QVector< Entite * > vectEntitesGeneres)
 canBeWriten More...
 
int noLien (Entite *lAutre, Lien *leLien)
 noLien More...
 

Public Attributes

QGraphicsRectItemrectTitle
 rectTitle rectangle wich contains title
 
QGraphicsTextItemtitle
 title
 
QString nomEntite
 nomEntite name of entity
 
QVector< Lien * > vectLiens
 vectLiens this vector contains adresses of the links concerning entity
 
QVector< Property * > vecteurChamps
 vecteurChamps container for entity's fields
 
MainWindowmaman
 maman the main window
 
bool association
 

Detailed Description

The Entite class Entity is an object we have to deal with.

Definition at line 20 of file entite.h.

Constructor & Destructor Documentation

Entite::Entite ( MainWindow mum,
QString  nom,
qreal  x,
qreal  y,
QGraphicsItem *  parent,
QCustomGraphicsScene laScene,
QStringList  listeDesChamps,
bool  isAssoc 
)

Entite.

Parameters
mum
nom
x
y
parent
laScene
listeDesChamps
isAssocthe constructor

Definition at line 120 of file entite.cpp.

Here is the call graph for this function:

Member Function Documentation

bool Entite::canBeWriten ( QVector< Entite * >  vectEntitesGeneres)

canBeWriten

Parameters
vectEntitesGeneres
Returns
true if all needed entities are already created false in other case

Definition at line 312 of file entite.cpp.

void Entite::contextMenuEvent ( QGraphicsSceneMouseEvent *  event)

contextMenuEvent

Parameters
eventDisplay context Menu

Definition at line 204 of file entite.cpp.

Here is the call graph for this function:

QString Entite::getkeyAsForeignKey ( QString  role)

getkeyAsForeignKey

Parameters
rolesometimes used to distinguish serveral links
Returns

Definition at line 412 of file entite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString Entite::getNomEntite ( )
inline

getNomEntite

Returns
accessor for name

Definition at line 64 of file entite.h.

QString Entite::getPrimaryKey ( )

getPrimaryKey

Returns
primary key of entity as QString

Definition at line 341 of file entite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString Entite::getPrimaryKeyAsFields ( bool  references = true)

getPrimaryKeyAsFields

Returns
a string containing primary key

Definition at line 376 of file entite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Entite::isEntiteFaible ( )

isEntiteFaible

Returns
true if leak entity as hotel's room

Definition at line 336 of file entite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int Entite::nbLien ( Entite lAutre)
slot

nbLien

Parameters
lAutre
Returns
how many links between me and the other one

Definition at line 109 of file entite.cpp.

Here is the caller graph for this function:

int Entite::noLien ( Entite lAutre,
Lien leLien 
)

noLien

Parameters
lAutre
leLien
Returns
1 for first link or 2 for second or 3 ...

Definition at line 96 of file entite.cpp.

Here is the caller graph for this function:

QString Entite::nomTableTronque ( )
inline

nomTableTronque

Returns
the 10 left characters + "..."

Definition at line 95 of file entite.h.

Here is the caller graph for this function:

QPolygonF Entite::polygon ( )
inline

polygon

Returns
rectangle wich limits entity

Definition at line 90 of file entite.h.

Here is the caller graph for this function:

QStringList Entite::renvoieChampsEtrangers ( )

renvoieChampsEtrangers

Returns
all foreign fields

Definition at line 257 of file entite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QStringList Entite::renvoieClefsEtrangeres ( bool  constraintInsideTable = true)

renvoieClefsEtrangeres

Parameters
constraintInsideTableif true references follow each field
Returns
foreign keys

Definition at line 284 of file entite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QVector< Entite * > Entite::renvoieEntiteMeres ( )

renvoieEntiteMeres

Returns
entities from which actual is issued

Definition at line 242 of file entite.cpp.

Here is the caller graph for this function:

QString Entite::toSql ( bool  withoutFK = false)

toSql

Parameters
withoutFK
Returns
"create table ..."

Definition at line 434 of file entite.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: