Ignore:
Timestamp:
May 24, 2007, 4:43:17 PM (17 years ago)
Author:
chou
Message:

Morpheo Viewer Release 4.0 :
changements graphiques .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/src/Graphics_parameters_window.cpp

    r26 r30  
    1515  wparam->move(628,370);
    1616
    17   QBoxLayout *bpos = new QBoxLayout(QBoxLayout::LeftToRight,0);
    18   QLabel *lx = new QLabel();
    19   lx->setText("position x : ");
    20   positionX = new QLineEdit();
    21   positionX->setText("");
    22   bpos->addWidget(lx);
    23   bpos->addWidget(positionX);
    2417 
    25   QBoxLayout *bpos2 = new QBoxLayout(QBoxLayout::LeftToRight,0);
    26   QLabel *ly = new QLabel();
    27   ly->setText("position y : ");
    28   positionY = new QLineEdit();
    29   positionY->setText("");
    30   bpos2->addWidget(ly);
    31   bpos2->addWidget(positionY);
    32  
    33   QBoxLayout *bsize = new QBoxLayout(QBoxLayout::LeftToRight,0);
    34   QLabel *sx = new QLabel();
    35   sx->setText("size x : ");
    36   sizeX = new QLineEdit();
    37   sizeX->setText("");
    38   bsize->addWidget(sx);
    39   bsize->addWidget(sizeX);
    40  
    41   QBoxLayout *bsize2 = new QBoxLayout(QBoxLayout::LeftToRight,0);
    42   QLabel *sy = new QLabel();
    43   sy->setText("size y : ");
    44   sizeY = new QLineEdit();
    45   sizeY->setText("");
    46   bsize2->addWidget(sy);
    47   bsize2->addWidget(sizeY);
    48   parameters->addLayout(bpos);
    49   parameters->addLayout(bpos2);
    50   parameters->addLayout(bsize);
    51   parameters->addLayout(bsize2);
    52   QPushButton *noselect = new QPushButton("cancel selection",wparam);
    53   QPushButton *back = new QPushButton("back",wparam);
    5418  QPushButton *apply = new QPushButton("apply",wparam);
    55   connect(back,SIGNAL(clicked()),this,SLOT(_back()));
    56   connect(noselect,SIGNAL(clicked()),this,SLOT(_cancel_selection()));
    5719  connect(apply,SIGNAL(clicked()),this,SLOT(_apply()));
    5820 
    59   parameters->addWidget(noselect);
    60   parameters->addWidget(back);
    6121  parameters->addWidget(apply);
    6222
     
    6525}
    6626
    67 void Window::write_position(int x, int y){
    68   stringstream out;
    69   string str;
    70   out << x;
    71   str = out.str();
    72   positionX->setText( QString::fromStdString(str));
    73   stringstream out2;
    74   string str2;
    75   out2 << y;
    76   str2 = out2.str();
    77   positionY->setText(QString::fromStdString(str2));
    78 }
    79 
    80 void Window::erase_position(){
    81   positionX->setText("");
    82   positionY->setText("");
    83 }
    84 
    85 void Window::write_size(int x,int y){
    86   stringstream out;
    87   string str;
    88   out << x;
    89   str = out.str();
    90   sizeX->setText(QString::fromStdString(str));
    91   stringstream out2;
    92   string str2;
    93   out2 << y;
    94   str2 = out2.str();
    95   sizeY->setText(QString::fromStdString(str2));
    96 }
    97 
    98 void Window::erase_size(){
    99   sizeX->setText("");
    100   sizeY->setText("");
    101 }
    102 
    103 void Window::_cancel_selection(){
    104   component_clicked = false;
    105 }
    10627
    10728void Window::_apply(){
    108   if(positionX->isModified())
    109     cout << "positionX modified : " << positionX->text().toStdString() << endl;
    110   if(positionY->isModified())
    111     cout << "positionY modified : " << positionX->text().toStdString() << endl;
    112   if(sizeX->isModified())
    113     cout << "sizeX modified : " << sizeX->text().toStdString() << endl;
    114   if(sizeY->isModified())
    115     cout << "sizeY modified : " << sizeY->text().toStdString() << endl;
     29  cout << "apply\n";
    11630}
Note: See TracChangeset for help on using the changeset viewer.