1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| void QSofaLighting::lightingWidget()
{
// QWidget* fen = new QWidget;
QDialog* fen = new QDialog;
QGridLayout* layout = new QGridLayout;
QPushButton* b_enable = new QPushButton("enable");
connect(b_enable,SIGNAL(triggered()), this,SLOT(enableLight()));
if (b_enable->isChecked()){QMessageBox::information(this, "hello", "world");}
QPushButton* b_up = new QPushButton("up");
connect(b_up,SIGNAL(triggered()), this,SLOT(upLight()));
QPushButton* b_down = new QPushButton("down");
connect(b_down,SIGNAL(triggered()), this,SLOT(downLight()));
QPushButton* b_left = new QPushButton("left");
connect(b_left,SIGNAL(triggered()), this,SLOT(leftLight()));
QPushButton* b_right = new QPushButton("right");
connect(b_right,SIGNAL(triggered()), this,SLOT(rightLight()));
QPushButton* b_near = new QPushButton("near");
connect(b_near,SIGNAL(triggered()), this,SLOT(nearLight()));
QPushButton* b_far = new QPushButton("far");
connect(b_far,SIGNAL(triggered()), this,SLOT(farLight()));
QPushButton* b_visuLight = new QPushButton("visu Lighting source");
connect(b_visuLight, SIGNAL(triggered()), this, SLOT(visuLight()) );
layout->addWidget(b_enable, 0, 0);
layout->addWidget(b_up, 2, 0);
layout->addWidget(b_down, 2, 1);
layout->addWidget(b_left, 3, 0);
layout->addWidget(b_right, 3, 1);
layout->addWidget(b_near, 4, 0);
layout->addWidget(b_far, 4, 1);
layout->addWidget(b_visuLight, 5, 0);
fen->setLayout(layout);
fen->show();
}
void QSofaLighting::enableLight(){
/*ischecked_enable = !ischecked_enable;*/QMessageBox::information(this, "hello", "world");}
void QSofaLighting::upLight() {ischecked_up = !ischecked_up; }
void QSofaLighting::downLight() {ischecked_down = !ischecked_down; }
void QSofaLighting::leftLight() {ischecked_left = !ischecked_left; }
void QSofaLighting::rightLight() {ischecked_right = !ischecked_right;}
void QSofaLighting::nearLight() {ischecked_near = !ischecked_near; }
void QSofaLighting::farLight() {ischecked_far = !ischecked_far; }
void QSofaLighting::visuLight() {/*afficher ou pas la source lumiere*/} |
Partager