Doors_Controller::Doors_Controller(SubteStatus *subte, SingleButton *openLeftDoors, SingleButton *closeLeftDoors, SingleButton *selectLeftDoors, SingleButton *openRightDoors, SingleButton *closeRightDoors, SingleButton *selectRightDoors, SingleButton *silbato) : Base_Controller(subte) { m_selectLeftDoors = selectLeftDoors; m_openLeftDoors = openLeftDoors; m_closeLeftDoors = closeLeftDoors; m_selectRightDoors = selectRightDoors; m_openRightDoors = openRightDoors; m_closeRightDoors = closeRightDoors; m_silbato = silbato; m_closeRightDoors->setButtonImage(QUrl("qrc:/resources/greenON.png"),QUrl("qrc:/resources/green.png")); m_closeLeftDoors->setButtonImage(QUrl("qrc:/resources/greenON.png"),QUrl("qrc:/resources/green.png")); m_openRightDoors->setButtonImage(QUrl("qrc:/resources/greenON.png"),QUrl("qrc:/resources/green.png")); m_openLeftDoors->setButtonImage(QUrl("qrc:/resources/greenON.png"),QUrl("qrc:/resources/green.png")); m_silbato->setButtonImage(QUrl("qrc:/resources/blueON.png"),QUrl("qrc:/resources/blueplane.png")); m_closeLeftDoors->setLightManagement(false); m_closeRightDoors->setLightManagement(false); m_openLeftDoors->setLightManagement(false); m_openRightDoors->setLightManagement(false); turnOn(); connect(m_closeLeftDoors,SIGNAL(buttonClicked()),this,SLOT(closeLeft())); connect(m_openLeftDoors,SIGNAL(buttonClicked()),this,SLOT(openLeft())); connect(m_closeRightDoors,SIGNAL(buttonClicked()),this,SLOT(closeRight())); connect(m_openRightDoors,SIGNAL(buttonClicked()),this,SLOT(openRight())); connect(m_selectLeftDoors,SIGNAL(buttonClicked()),this,SLOT(enableLeftPanel())); connect(m_selectRightDoors,SIGNAL(buttonClicked()),this,SLOT(enableRightPanel())); connect(m_subte,SIGNAL(DoorsChanged(bool)),this,SLOT(updatePanel(bool))); }
ParameterStereogram::ParameterStereogram(std::tr1::shared_ptr<AbstractTexture> texture) : ParameterAbstractTexture(texture) { QGroupBox * b = new QGroupBox(this); QGridLayout * g = new QGridLayout(b); b->setTitle(tr("Stereogram")); b->setLayout(g); g->addWidget(new QLabel(tr("Depth:")), 0, 0); g->addWidget(new QLabel(tr("Left:")), 1, 0); g->addWidget(new QLabel(tr("Right:")), 2, 0); g->addWidget(new QLabel(tr("Offset:")), 3, 0); linePathDepth_ = new QLineEdit(); linePathLeft_ = new QLineEdit(); linePathRight_ = new QLineEdit(); pbDepth_ = new QPushButton("..."); pbLeft_ = new QPushButton("..."); pbRight_ = new QPushButton("..."); pbDepth_->resize(26, 26); pbLeft_->resize(26, 26); pbRight_->resize(26, 26); lineOffset_ = new QLineEdit(); lineOffset_->setAlignment(Qt::AlignRight); comboStyle_ = new QComboBox(this); comboStyle_->addItem("Convex"); comboStyle_->addItem("Concave"); g->addWidget(linePathDepth_, 0, 2, 1, 2); g->addWidget(linePathLeft_, 1, 2, 1, 2); g->addWidget(linePathRight_, 2, 2, 1, 2); g->addWidget(pbDepth_, 0, 4); g->addWidget(pbLeft_, 1, 4); g->addWidget(pbRight_, 2, 4); g->addWidget(lineOffset_, 3, 2, 1, 3); g->addWidget(comboStyle_, 4, 2, 1, 3); g->setRowStretch(5, 1); addWidget(b); connect(linePathDepth_, SIGNAL(editingFinished()), this, SLOT(pathDepthEdited())); connect(linePathLeft_, SIGNAL(editingFinished()), this, SLOT(pathLeftEdited())); connect(linePathRight_, SIGNAL(editingFinished()), this, SLOT(pathRightEdited())); connect(lineOffset_, SIGNAL(editingFinished()), this, SLOT(offsetEdited())); connect(comboStyle_, SIGNAL(activated(int)), this, SLOT(styleActivated(int))); connect(pbDepth_, SIGNAL(clicked()), this, SLOT(openDepth())); connect(pbLeft_, SIGNAL(clicked()), this, SLOT(openLeft())); connect(pbRight_, SIGNAL(clicked()), this, SLOT(openRight())); reloadData(); }
void dimv::createActions() { openLeftAct = new QAction(tr("Open left..."), this); openLeftAct->setShortcut(tr("Ctrl+L")); connect(openLeftAct, SIGNAL(triggered()), this, SLOT(openLeft())); openRightAct = new QAction(tr("Open right..."), this); openRightAct->setShortcut(tr("Ctrl+R")); connect(openRightAct, SIGNAL(triggered()), this, SLOT(openRight())); zoomInAct = new QAction(tr("Zoom in"), this); zoomInAct->setShortcut(Qt::Key_Plus); connect(zoomInAct, SIGNAL(triggered()), this, SLOT(zoomIn())); zoomOutAct = new QAction(tr("Zoom out"), this); zoomOutAct->setShortcut(Qt::Key_Minus); connect(zoomOutAct, SIGNAL(triggered()), this, SLOT(zoomOut())); normalSizeAct = new QAction(tr("Original size"), this); normalSizeAct->setShortcut(tr("Ctrl+0")); connect(normalSizeAct, SIGNAL(triggered()), this, SLOT(normalSize())); leftAct = new QAction(this); leftAct->setShortcut(Qt::Key_Left); connect(leftAct, SIGNAL(triggered()), this, SLOT(left())); rightAct = new QAction(this); rightAct->setShortcut(Qt::Key_Right); connect(rightAct, SIGNAL(triggered()), this, SLOT(right())); upAct = new QAction(this); upAct->setShortcut(Qt::Key_Up); connect(upAct, SIGNAL(triggered()), this, SLOT(up())); downAct = new QAction(this); downAct->setShortcut(Qt::Key_Down); connect(downAct, SIGNAL(triggered()), this, SLOT(down())); exitAct = new QAction(tr("Close"), this); exitAct->setShortcut(Qt::Key_Escape); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); aboutAct = new QAction(tr("&About"), this); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); }