void Mouse6dofInput::setActiveUAS(UASInterface* uas) { // Only connect / disconnect is the UAS is of a controllable UAS class UAS* tmp = 0; if (this->uas) { SkyeMAV* mav = dynamic_cast<SkyeMAV*>(tmp); if(mav) { disconnect(this, SIGNAL(mouse6dofChanged(double,double,double,double,double,double)), mav, SLOT(setManual6DOFControlCommands(double,double,double,double,double,double))); disconnect(this, SIGNAL(mouseRotationActiveChanged(bool)), mav, SLOT(changeMouseRotationActive(bool))); disconnect(this, SIGNAL(mouseTranslationActiveChanged(bool)), mav, SLOT(changeMouseTranslationActive(bool))); disconnect(mav, SIGNAL(inputModeChanged(SkyeMAV::QGC_INPUT_MODE)), this, SLOT(updateInputMode(SkyeMAV::QGC_INPUT_MODE))); }else{
void FalseColorDock::initUi() { // initialize scaled view view->installEventFilter(this); // needed for leave event view->init(); scene = new ScaledView(); view->setScene(scene); connect(scene, SIGNAL(newContentRect(QRect)), view, SLOT(fitContentRect(QRect))); // initialize selection widget sel = new AutohideWidget(); uisel = new Ui::FalsecolorDockSelUI(); uisel->setupUi(sel); scene->offTop = AutohideWidget::OutOffset; view->addWidget(AutohideWidget::TOP, sel); // setup source box uisel->sourceBox->setAHView(view); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::CMF], FalseColoring::CMF); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::PCA], FalseColoring::PCA); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::PCAGRAD], FalseColoring::PCAGRAD); #ifdef WITH_SOM uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::SOM], FalseColoring::SOM); uisel->sourceBox->addItem(prettyFalseColorNames[FalseColoring::SOMGRAD], FalseColoring::SOMGRAD); #endif // WITH_SOM uisel->sourceBox->setCurrentIndex(0); updateTheButton(); updateProgressBar(); connect(scene, SIGNAL(newSizeHint(QSize)), view, SLOT(updateSizeHint(QSize))); connect(scene, SIGNAL(updateScrolling(bool)), view, SLOT(suppressScrolling(bool))); connect(scene, SIGNAL(requestCursor(Qt::CursorShape)), view, SLOT(applyCursor(Qt::CursorShape))); connect(scene, SIGNAL(pixelOverlay(int,int)), this, SIGNAL(pixelOverlay(int,int))); connect(scene, SIGNAL(requestSpecSim(int,int)), this, SLOT(requestSpecSim(int,int))); connect(uisel->sourceBox, SIGNAL(currentIndexChanged(int)), this, SLOT(processSelectedColoring())); connect(uisel->theButton, SIGNAL(clicked()), this, SLOT(processApplyClicked())); connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(processVisibilityChanged(bool))); connect(uisel->screenshotButton, SIGNAL(released()), this, SLOT(screenshot())); // add similarity widget sw = new SimilarityWidget(view); scene->offBottom = AutohideWidget::OutOffset; view->addWidget(AutohideWidget::BOTTOM, sw); connect(sw->doneAction(), SIGNAL(triggered()), this, SLOT(restoreFalseColorFunction())); connect(sw->doneAction(), SIGNAL(triggered()), scene, SLOT(updateInputMode())); connect(sw->targetAction(), SIGNAL(triggered()), scene, SLOT(updateInputMode())); scene->setActionTarget(sw->targetAction()); }