Changeset 469 for trunk/yao


Ignore:
Timestamp:
10/26/10 19:01:57 (14 years ago)
Author:
yerima
Message:

update in the modinspace window. Visual Yao

Location:
trunk/yao/src/interface/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/interface/src/ConstantWindow.cpp

    r460 r469  
    240240void ConstantWindow::callConstantHelp() { 
    241241 
    242         QMessageBox::about(this, tr("Aide sur la directive Constant."), 
     242        QMessageBox::about(this, tr("Aide sur la directive Defval"), 
    243243                        ("<p> La directive Defval appelée aussi Constant permet d'associer un nom symbolique à une valeur. Voici les différents emplois:" 
    244                          "<p><u>Exemple 1</u>: defval szx 12 <p><u>Exemple 2</u>: defval szy \"chaine\"<p> <u>Exemple 3</u>: defval szz szx" 
     244                         "<p><u>Exemple 1</u>: defval szx 12 (nombre entier douze) <p><u>Exemple 2</u>: defval szy \"chaine\" (chaine de caractÚres)<p> <u>Exemple 3</u>: defval szz szx (nom d'une autre constante defval)." 
     245                         "<p>Dans la fenêtre graphique, vous devez renseigner les champs nom et valeur de la constante. Visual Yao vérifie la syntaxe "  
     246                         "et vous guide au fur et à mesure."  
     247                         "<br>Le bouton \"Ajouter\" permet d'insérer des nouveaux enregistrements (ici le nom et la valeur d'une constante) dans la structure de données); " 
     248                         "<br>Le bouton \"Supprimer\" permet de retirer un enregistrement sélectionné de la structure de données;" 
     249                         "<br> Le bouton \"Quitter\" permet de fermer la fenêtre;"  
     250                         "<br> Le bouton \"Aide\" permet d'afficher cette fenêtre." 
    245251                         "<p> Pour plus d'informations sur defval, <a href=\"help/constante_aide.html\">cliquez ici.</a>")); 
    246252 
  • trunk/yao/src/interface/src/ModinspaceWindow.cpp

    r468 r469  
    6666        m_modulNameModel                = new QStandardItemModel(0, 0) ; 
    6767        m_outlineModel                  = new QStandardItemModel(0, 4) ; 
    68                 m_outlineModel->setHorizontalHeaderLabels(QStringList() << "" << "" << "" << "");  
     68                m_outlineModel->setHorizontalHeaderLabels(QStringList() << "     " << "     " << "     " << "     ");  
    6969 
    7070        m_axesListView->setModel(m_axesModel); 
    7171        m_modulNameListView->setModel(m_modulNameModel); 
    7272        m_outlineTreeView1->setModel(m_outlineModel); 
    73          
     73        //m_outlineTreeView1->resizeColumnsToContents(); 
     74        //m_outlineTreeView1->setShowGrid(false); 
    7475        //connect(m_axesListView, SIGNAL(clicked(QModelIndex)), this, SLOT(deleteAxesRow(QModelIndex))); 
    7576        //connect(m_modulNameListView, SIGNAL(clicked(QModelIndex)), this, SLOT(deleteModulRow(QModelIndex))); 
     
    8182        connect(m_rightModulNameButton, SIGNAL(clicked()), this, SLOT(addTheModulRow())); 
    8283        //connect(m_modinspaceDeleteButton, SIGNAL(clicked()), this, SLOT(deleteTheRow())); 
    83         connect(m_blocEndCheckBox, SIGNAL(clicked(bool )), this, SLOT(addBlockEndRow(bool ))); 
    84         connect(m_endCheckBox, SIGNAL(clicked(bool )), this, SLOT(addEndRow(bool ))); 
     84        connect(m_beginOrEndComboBox, SIGNAL(currentIndexChanged (int )), this, SLOT(addBlockEndRow(int ))); 
     85        //connect(m_blocEndCheckBox, SIGNAL(clicked(bool )), this, SLOT(addBlockEndRow(bool ))); 
     86        //connect(m_endCheckBox, SIGNAL(clicked(bool )), this, SLOT(addEndRow(bool ))); 
    8587 
    8688} 
    8789/******************************** implementation of method ***********************************/ 
    88 void ModinspaceWindow::addBlockEndRow(bool aBool) { 
    89          
     90void ModinspaceWindow::addBlockEndRow(int anInt) { 
     91         
     92        int col = m_outlineModel->columnCount(); 
    9093        int row0 = m_outlineModel->rowCount(); 
    91         if (aBool && row0 >= 2) 
    92                 m_outlineModel->setItem(row0, 1, new QStandardItem("forder"));  
     94        static int ordercounter = 1;     
     95        static int fordercounter = 0; 
     96 
     97        switch(anInt) { 
     98                case 0: break; 
     99                case 1:{ 
     100                                m_outlineModel->setItem(row0, ordercounter + 1, new QStandardItem("order"));  
     101                                ordercounter++;  
     102                        } break; 
     103                case 2: { 
    93104                         
     105                                m_outlineModel->setItem(row0, ordercounter, new QStandardItem("forder"));  
     106                                fordercounter++;  
     107                        }break; 
     108                case 3: { 
     109                                m_outlineModel->setItem(row0, 0, new QStandardItem("forder"));   
     110                                m_spaceOrOperaNameComboBox->setDisabled(true); 
     111                                m_axesComboBox->setDisabled(true); 
     112                        } break; 
     113        } 
     114         
     115        //if (row0 >= 2){ 
     116                 
     117        //      m_outlineModel->setItem(1, col, new QStandardItem("forder"));  
     118        //} 
    94119} 
    95120/******************************** implementation of method ***********************************/ 
    96 void ModinspaceWindow::addEndRow(bool aBool) { 
     121/*void ModinspaceWindow::addEndRow(bool aBool) { 
    97122         
    98123        int row0 = m_outlineModel->rowCount(); 
     
    100125                m_outlineModel->setItem(row0, 0, new QStandardItem("forder"));  
    101126                         
    102 } 
     127}*/ 
    103128/********************************* Implementation of the selectedFunction(QModelIndex index) method  ***********************************/ 
    104129/******************************** implementation of method ***********************************/ 
     
    113138void ModinspaceWindow::addTheAxesRow() { 
    114139         
     140        static int cpt = 0; 
     141                 
    115142        QString theAxe = m_axesComboBox->currentText(); // 
    116143        int row0 = m_outlineModel->rowCount(); 
     
    130157        m_axesComboBox->setCurrentIndex(0); 
    131158 
    132         m_outlineModel->setItem(row0, 0, new QStandardItem("order"));  
    133                 //m_theLocalModulTable->push_back(); 
    134         m_outlineModel->setItem(row0, 1, new QStandardItem("modinpace"));  
    135         m_outlineModel->setItem(row0, 2, new QStandardItem(spaceOrOpera));  
    136         m_outlineModel->setItem(row1, 1, new QStandardItem("order"));  
    137         m_outlineModel->setItem(row1, 2, new QStandardItem(theAxe));  
     159        if (!cpt) { 
     160         
     161                m_outlineModel->setItem(row0, 0, new QStandardItem("order"));  
     162                m_outlineModel->setItem(row0, 1, new QStandardItem("modinpace"));  
     163                m_outlineModel->setItem(row0, 2, new QStandardItem(spaceOrOpera));  
     164                m_outlineModel->setItem(row1, 1, new QStandardItem("order"));  
     165                cpt++; 
     166 
     167        }       //m_theLocalModulTable->push_back(); 
     168         
     169        static int col = m_outlineModel->columnCount(); 
     170        m_outlineModel->setItem(1, col-2, new QStandardItem(theAxe));  
     171                col++; 
    138172                //m_theLocalAxesTable->push_back(theAxe.toStdString()); 
    139173        //m_outlineModel->setItem(row1, 1, new QStandardItem("order"));  
     
    154188        QString theModul = m_modulNameComboBox->currentText(); 
    155189         
     190        int row0 =  m_outlineModel->rowCount(); 
     191         
    156192        if (theModul.isEmpty()) return; 
    157193 
    158194        m_modulNameModel->setItem(m_modulNameModel->rowCount(), 0, new QStandardItem(theModul));         
     195        m_outlineModel->setItem(row0, 2, new QStandardItem(theModul));  
     196 
     197        m_spaceOrOperaNameComboBox->setDisabled(true); 
     198        m_axesComboBox->setDisabled(true); 
     199 
    159200        m_modulNameComboBox->setCurrentIndex(0); 
    160201 
  • trunk/yao/src/interface/src/OrderWindow.cpp

    r460 r469  
    2020 
    2121/***************************************** Implementation of the Construtor OrderWindow() *************************************************/ 
    22 OrderWindow::OrderWindow(Table <Trajectory> *aTrajectoryTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, Table <Modul> *aModulTable, QWidget *parent) : stateOfSpaceintrajEndCheckBox(false), QWidget(parent) { 
     22OrderWindow::OrderWindow(Table <Trajectory> *aTrajectoryTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, Table <Modul> *aModulTable,  QWidget *parent) : stateOfSpaceintrajEndCheckBox(false), QWidget(parent) { 
    2323 
    2424        setupUi(this); 
     
    8888void OrderWindow::theOrderHelp() { 
    8989         
    90         QMessageBox::about(this, tr("Aide sur la directive Order"), ("")); 
     90        QMessageBox::about(this, tr("Aide sur la directive Order"), ("Order permet d'indiquer l'enchainement, l'ordre de calcul dans YAO. Il existent deux cas d'utilisation: modinspace et spaceintraj. Les étapes à suivre sont les suivantes: <br> Faire un choix dans le champ deroulant \"modinspace/spaceintraj\"; <br> Pour le cas de modinspace, indiquer d'abord les coordonnées (possibilité de répeter les operations), ensuite les modules (possibilité de faire plusieurs opérations) et enfin préciser la condition d'arrêt.<br> Pour le cas de spaceintraj, choisir respectivement la trajectoire, les espaces et cocher la case \"Fin de saisie\".")); 
    9191 
    9292} 
  • trunk/yao/src/interface/src/include/ModinspaceWindow.hpp

    r468 r469  
    3232                void deleteAxesRow();  
    3333                void deleteModulRow();  
    34                 void addBlockEndRow(bool aBool);  
    35                 void addEndRow(bool aBool);  
     34                void addBlockEndRow(int anInt);  
     35        //      void addEndRow(bool aBool);  
    3636         
    3737        signals: 
  • trunk/yao/src/interface/src/ui_/modinspace.ui

    r464 r469  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>689</width> 
     9    <width>790</width> 
    1010    <height>440</height> 
    1111   </rect> 
     
    8282     <rect> 
    8383      <x>20</x> 
    84       <y>250</y> 
     84      <y>230</y> 
    8585      <width>91</width> 
    8686      <height>27</height> 
     
    9292     <rect> 
    9393      <x>120</x> 
    94       <y>250</y> 
     94      <y>230</y> 
    9595      <width>26</width> 
    9696      <height>25</height> 
     
    9999    <property name="text"> 
    100100     <string>...</string> 
    101     </property> 
    102    </widget> 
    103    <widget class="QCheckBox" name="m_endCheckBox"> 
    104     <property name="geometry"> 
    105      <rect> 
    106       <x>20</x> 
    107       <y>350</y> 
    108       <width>111</width> 
    109       <height>22</height> 
    110      </rect> 
    111     </property> 
    112     <property name="text"> 
    113      <string>Fin de saisie</string> 
    114101    </property> 
    115102   </widget> 
     
    120107      <y>30</y> 
    121108      <width>131</width> 
    122       <height>321</height> 
     109      <height>301</height> 
    123110     </rect> 
    124111    </property> 
     
    171158    </layout> 
    172159   </widget> 
    173    <widget class="QCheckBox" name="m_blocEndCheckBox"> 
    174     <property name="geometry"> 
    175      <rect> 
    176       <x>20</x> 
    177       <y>320</y> 
    178       <width>111</width> 
    179       <height>22</height> 
    180      </rect> 
    181     </property> 
    182     <property name="text"> 
    183      <string>Fin de bloc</string> 
     160   <widget class="QComboBox" name="m_beginOrEndComboBox"> 
     161    <property name="geometry"> 
     162     <rect> 
     163      <x>160</x> 
     164      <y>340</y> 
     165      <width>131</width> 
     166      <height>27</height> 
     167     </rect> 
     168    </property> 
     169    <item> 
     170     <property name="text"> 
     171      <string/> 
     172     </property> 
     173    </item> 
     174    <item> 
     175     <property name="text"> 
     176      <string>Début d'un bloc</string> 
     177     </property> 
     178    </item> 
     179    <item> 
     180     <property name="text"> 
     181      <string>Fin d'un bloc</string> 
     182     </property> 
     183    </item> 
     184    <item> 
     185     <property name="text"> 
     186      <string>Fin de sélection</string> 
     187     </property> 
     188    </item> 
     189   </widget> 
     190   <widget class="QLabel" name="label"> 
     191    <property name="geometry"> 
     192     <rect> 
     193      <x>20</x> 
     194      <y>341</y> 
     195      <width>131</width> 
     196      <height>21</height> 
     197     </rect> 
     198    </property> 
     199    <property name="text"> 
     200     <string>Conditions d'arrêt</string> 
    184201    </property> 
    185202   </widget> 
     
    190207     <x>410</x> 
    191208     <y>10</y> 
    192      <width>271</width> 
     209     <width>371</width> 
    193210     <height>421</height> 
    194211    </rect> 
     
    205222      <x>10</x> 
    206223      <y>40</y> 
    207       <width>251</width> 
     224      <width>351</width> 
    208225      <height>371</height> 
    209226     </rect> 
     
    213230    <property name="geometry"> 
    214231     <rect> 
    215       <x>110</x> 
     232      <x>170</x> 
    216233      <y>10</y> 
    217234      <width>59</width> 
  • trunk/yao/src/interface/src/ui_/orderwindow.ui

    r464 r469  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>709</width> 
     9    <width>799</width> 
    1010    <height>543</height> 
    1111   </rect> 
     
    1919     <x>10</x> 
    2020     <y>60</y> 
    21      <width>691</width> 
     21     <width>781</width> 
    2222     <height>441</height> 
    2323    </rect> 
     
    3333   <property name="geometry"> 
    3434    <rect> 
    35      <x>200</x> 
     35     <x>220</x> 
    3636     <y>20</y> 
    3737     <width>291</width> 
     
    5555   <property name="geometry"> 
    5656    <rect> 
    57      <x>620</x> 
     57     <x>710</x> 
    5858     <y>510</y> 
    5959     <width>81</width> 
  • trunk/yao/src/interface/src/ui_/spaceintraj.ui

    r460 r469  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>687</width> 
    10     <height>417</height> 
     9    <width>789</width> 
     10    <height>442</height> 
    1111   </rect> 
    1212  </property> 
     
    2020     <y>80</y> 
    2121     <width>371</width> 
    22      <height>331</height> 
     22     <height>351</height> 
    2323    </rect> 
    2424   </property> 
     
    6666     <rect> 
    6767      <x>10</x> 
    68       <y>300</y> 
     68      <y>320</y> 
    6969      <width>111</width> 
    7070      <height>22</height> 
     
    7575    </property> 
    7676   </widget> 
    77    <widget class="QWidget" name=""> 
     77   <widget class="QWidget" name="layoutWidget"> 
    7878    <property name="geometry"> 
    7979     <rect> 
    8080      <x>280</x> 
    8181      <y>120</y> 
    82       <width>81</width> 
    83       <height>61</height> 
     82      <width>87</width> 
     83      <height>62</height> 
    8484     </rect> 
    8585    </property> 
     
    107107     <x>390</x> 
    108108     <y>10</y> 
    109      <width>291</width> 
    110      <height>401</height> 
     109     <width>391</width> 
     110     <height>421</height> 
    111111    </rect> 
    112112   </property> 
     
    122122      <x>10</x> 
    123123      <y>40</y> 
    124       <width>271</width> 
    125       <height>351</height> 
     124      <width>371</width> 
     125      <height>371</height> 
    126126     </rect> 
    127127    </property> 
     
    130130    <property name="geometry"> 
    131131     <rect> 
    132       <x>130</x> 
     132      <x>180</x> 
    133133      <y>10</y> 
    134134      <width>59</width> 
Note: See TracChangeset for help on using the changeset viewer.