Last change
on this file since 32 was
20,
checked in by chou, 17 years ago
|
1ere release du Viewer :
- Parseur xml sur Base de données
- Chargement d'un fichier de positions
- Dessin du top-level
- Dessin des ports du top level
- Dessin des sous composants
- Dessin des ports de ces sous composants
les valeurs de positions et de taille sont en %.
|
File size:
965 bytes
|
Rev | Line | |
---|
[20] | 1 | /* |
---|
| 2 | * |
---|
| 3 | * [desc.] |
---|
| 4 | */ |
---|
| 5 | #include "Tools/Viewer/Bdd/include/ListePorts.h" |
---|
| 6 | |
---|
| 7 | namespace morpheo{ |
---|
| 8 | namespace tools{ |
---|
| 9 | namespace viewer{ |
---|
| 10 | namespace bdd{ |
---|
| 11 | |
---|
| 12 | /*p_x : centre abs; p_y : centre ordonnée ; s_x s_y : size entiere */ |
---|
| 13 | /* |
---|
| 14 | * x-------x |
---|
| 15 | * | | |
---|
| 16 | * | ° | |
---|
| 17 | * \ \ |
---|
| 18 | */ |
---|
| 19 | QList<morpheo::tools::viewer::bdd::Port> ListePorts::getPortNorth(Coord *c){ |
---|
| 20 | int count=1; |
---|
| 21 | int nb=countPort("north"); |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | QList<morpheo::tools::viewer::bdd::Port> *result=new \ |
---|
| 25 | QList<morpheo::tools::viewer::bdd::Port>(); |
---|
| 26 | |
---|
| 27 | for(QList<morpheo::tools::viewer::bdd::Port>::iterator it\ |
---|
| 28 | = ports->begin();it!=ports->end();++it) |
---|
| 29 | { |
---|
| 30 | if( !strcmp(it->getLocalisation().c_str(),"north")) |
---|
| 31 | { |
---|
| 32 | it->set_y( c->get_hg_y() ); |
---|
| 33 | it->set_x( c->get_hg_x() + count*( (c->get_size_x())/(nb+1)) ); |
---|
| 34 | |
---|
| 35 | result->append(*it); |
---|
| 36 | count++; |
---|
| 37 | } |
---|
| 38 | } |
---|
| 39 | return *result; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | };//end bdd |
---|
| 44 | };//end viewer |
---|
| 45 | };//end tools |
---|
| 46 | };//end morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.