Changeset 375 in PSPA


Ignore:
Timestamp:
Mar 7, 2013, 1:15:29 AM (11 years ago)
Author:
garnier
Message:

Affichage du nom du cas test dans le titre de la fenetre + see History

Location:
Interface_Web/trunk/pspaWT
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/Doxyfile

    r239 r375  
    123123# operators of the base classes will not be shown.
    124124
    125 INLINE_INHERITED_MEMB  = NO
     125INLINE_INHERITED_MEMB  = YES
    126126
    127127# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
  • Interface_Web/trunk/pspaWT/History

    r372 r375  
    77
    886 Mars : Laurent Garnier
    9 - pspa.css : Ajout de style pour les futurs graphiques
     9- pspa.css :
     10 o Ajout de style pour les futurs graphiques
     11 o Ajout de .softwareElementLigneFaisceauName
    1012- GWt_pspaApplication : Ajout des paramètres width et height à la méthode chartPlot2vec()
    1113  afin de pouvoir la changer facilement. AJout également d'un paramètre "makeIcon" pour faire
     
    1416  GWt_soleno, GWt_fit, GWt_rfgun
    1517  GWt_cell : bug fix #18
     18- abstractSoftware, softwareTransport, softwareParmela, softwareGenerator, softwareTest :
     19  Ajout d'une méthode getName()
     20- GWt_elementLigneFaisceau.cc,GWt_ligneFaisceau.cc : Ajout du nom du soft en bas à droite
     21- PspaApplication :
     22 o Affichage du nom du cas test dans le titre de la fenetre
     23 o Suppression de l'erreur lors du clic sur cancel dans le selecteur de fichiers
    1624
    17255 Mars : Laurent Garnier
  • Interface_Web/trunk/pspaWT/htdocs/pspa.css

    r370 r375  
    165165    transition: all 0.05s ease-in-out 0s;
    166166}
     167
     168.softwareElementLigneFaisceauName {
     169    text-align: right;
     170    font-family: futura,arial,sans-serif;
     171    font-weight: bold;
     172        font-size:11px;
     173    color: #000000;
     174}
     175
    167176*|*:-moz-any-link:not(svg|a) {
    168177    text-decoration: underline;
  • Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h

    r347 r375  
    4242    virtual string getColor() = 0;
    4343
     44    /** Name of this software
     45     */
     46    virtual string getName() = 0;
     47
    4448};
    4549#endif
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareGenerator.h

    r359 r375  
    3535        return "#a3c0ed";
    3636    }
     37
     38    inline string getName() {
     39        return "generator";
     40    }
    3741};
    3842
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h

    r359 r375  
    3737    }
    3838
     39    inline string getName() {
     40        return "parmela";
     41    }
    3942
    4043};
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareTest.h

    r359 r375  
    3434      return "#ecc38e";
    3535  }
     36   
     37  inline string getName() {
     38        return "test";
     39    }
     40
    3641};
    3742#endif
  • Interface_Web/trunk/pspaWT/sources/controler/include/softwareTransport.h

    r359 r375  
    2626        return "#c0ea8e";
    2727    }
     28   
     29    inline string getName() {
     30        return "transport";
     31    }
     32
    2833};
    2934#endif
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_elementLigneFaisceau.h

    r365 r375  
    3737    ~GWt_elementLigneFaisceau();
    3838    void addElement(GWt_abstractElement* elem);
    39     void setBGColor(const WColor);
    4039   
    4140    inline WText* getElementName() {
     
    4847   
    4948    void setElementLabel(std::string label);
     49    void update();
    5050   
    5151    inline GWt_dropZoneLigneFaisceau* getDropZoneLeft() {
     
    6060        return GWt_abstractElement_;
    6161    }
     62    inline void setSoftwareName(std::string name) {
     63        softwareName_ =new WText(name);
     64    }
    6265
    6366private:
     
    6871    void mouseWentOut();
    6972    void mouseWentOver();
    70 
     73    void setBGColor(const WColor);
    7174    GWt_dialog* messageDropZone_;
    7275    WText* firstTimeInsertMessage_;
     
    8083    WText* actionParameters_;
    8184    WText* actionTrash_;
     85    WText* softwareName_;
    8286};
    8387#endif
  • Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h

    r370 r375  
    5656
    5757  WContainerWidget* toto_;
    58 
     58  WString applicationDefaultTitle_;
     59   
    5960  GWt_softwarePanel* executeWidget_;
    6061  WFileUpload* uploadFileSelectorWidget_;
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_elementLigneFaisceau.cc

    r369 r375  
    179179    vLayoutElementContainer->addWidget(actions);
    180180   
     181    // add software name
     182    softwareName_ = new WText("");
     183    softwareName_->setStyleClass("softwareElementLigneFaisceauName");
     184    vLayoutElementContainer->addWidget(softwareName_);
     185   
    181186    gridLayout->addWidget       (elementContainer_,0,1);
    182    
     187
    183188    gridLayout->setColumnStretch (0,1);
    184189    gridLayout->setColumnStretch (2,1);
     
    199204{
    200205}
     206
     207void GWt_elementLigneFaisceau::update() {
     208    if (getGWt_AbstractElement()->getAbstractElement()) {
     209        if (getGWt_AbstractElement()->getAbstractElement()->getAbstractSoftware()) {
     210            setBGColor(WColor(getGWt_AbstractElement()->getAbstractElement()->getAbstractSoftware()->getColor()));
     211            softwareName_->setText(getGWt_AbstractElement()->getAbstractElement()->getAbstractSoftware()->getName());
     212        }
     213    }
     214}
     215
    201216
    202217void GWt_elementLigneFaisceau::setBGColor(const WColor c) {
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_ligneFaisceau.cc

    r361 r375  
    266266        if (GWt_elementLigneFaisceau* elem = dynamic_cast <GWt_elementLigneFaisceau*> (ligneFaisceauLayout_->itemAt(a)->widget ())) {
    267267            if (index == i) {
    268                 if (elem->getGWt_AbstractElement()->getAbstractElement()->getAbstractSoftware()) {
    269                     elem->setBGColor(WColor(elem->getGWt_AbstractElement()->getAbstractElement()->getAbstractSoftware()->getColor()));
    270                 }
     268                elem->update();
    271269            }
    272270            index ++;
  • Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc

    r371 r375  
    4646
    4747PspaApplication::PspaApplication(const WEnvironment& env) : WApplication(env)
     48,applicationDefaultTitle_("portail PSPA")
    4849{
    4950   
     
    5152    nameOfCase_ = "pspa"; // default
    5253   
    53     setTitle("portail PSPA");                               // application title
     54    setTitle(applicationDefaultTitle_);                               // application title
    5455    if (!wApp->environment().javaScript()) {
    5556        new WText("<i>This examples requires that javascript support is enabled.</i>",root());
     
    374375    string fileName = fs->exec();
    375376     nameOfCase_ = fileName;
    376    
     377    if (fileName == "") {
     378        return;
     379    }
     380   
    377381    removePathFromConfigName(nameOfCase_ );
    378382    cout << " nom sans path " << nameOfCase_ << endl;
     
    388392        GWt_dialog restoreWarning(" element restoring", "failure in restoring elements from file : " + fileName , GWt_dialog::Error, false,true);
    389393        restoreWarning.exec();
     394    } else {
     395        // Change the window title
     396        unsigned long found = fileName.find_last_of("/");
     397        setTitle(applicationDefaultTitle_+" : "+fileName.substr(found+1));
    390398    }
    391399   
Note: See TracChangeset for help on using the changeset viewer.