void RDGpio::inputTimerData() { unsigned input_mask; unsigned output_mask; unsigned mask; if((input_mask=inputMask())!=gpio_input_mask) { for(int i=0;i<inputs();i++) { mask=1<<i; if((gpio_input_mask&mask)!=(input_mask&mask)) { if((input_mask&mask)==0) { emit inputChanged(i,false); } else { emit inputChanged(i,true); } } } gpio_input_mask=input_mask; } if((output_mask=outputMask())!=gpio_output_mask) { for(int i=0;i<outputs();i++) { mask=1<<i; if((gpio_output_mask&mask)!=(output_mask&mask)) { if((output_mask&mask)==0) { emit outputChanged(i,false); } else { emit outputChanged(i,true); } } } gpio_output_mask=output_mask; } }
void Input::showParameterWidget() { this->setupParameterWidget(widget(),dataModel()->inputs().current()); if (this->parameterWidget()) { connect(this->parameterWidget(),SIGNAL(inputChanged()),this,SIGNAL(inputChanged())); connect(this,SIGNAL(inputChanged()),this->parameterWidget(),SLOT(triggerUpdate())); } }
void TrainingSet::setInput(int pat, int index, double value) { double prevVal = inputs[pat][index]; if(prevVal != value){ inputs[pat][index] = value; emit inputChanged(pat, index, value); emit inputChanged(pat, index, prevVal, value); } }
/** * The application's main. */ void loop() { int debounceTime = userEeprom[EE_INPUT_DEBOUNCE_TIME] >> 1; int objno, channel, value, lastValue; // Handle the input pins for (channel = 0; channel < NUM_CHANNELS; ++channel) { lastValue = inputDebouncer[channel].value(); value = inputDebouncer[channel].debounce(digitalRead(inputPins[channel]), debounceTime); if (lastValue != value) inputChanged(channel, value); } // Handle updated communication objects while ((objno = nextUpdatedObject()) >= 0) { objectUpdated(objno); } // Handle timed functions (e.g. periodic update) handlePeriodic(); // Sleep up to 1 millisecond if there is nothing to do if (bus.idle()) waitForInterrupt(); }
void TextHolder::setInput(QString in) { if(m_input == in) return; m_input = in; emit inputChanged(in); }
void InputPreview::setRulerPos(QPointF const& _eventPos) { if (!input()) return; QPointF _pos = screenPos(_eventPos); input()->setRulerPos(_pos); emit inputChanged(); }
void AudioMixer::setMasterAttenuation(int attenuationMb) { if(m_masterAttenuation == attenuationMb) return; // Nothing to do m_masterAttenuation = attenuationMb; m_masterVolume = mbToLinear((float)m_masterAttenuation); emit inputChanged(NULL); // HACK: NULL input = master output }
EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) { setWindowTitle( qtr( "Program Guide" ) ); QVBoxLayout *layout = new QVBoxLayout( this ); layout->setMargin( 0 ); epg = new EPGWidget( this ); QGroupBox *descBox = new QGroupBox( qtr( "Description" ), this ); QVBoxLayout *boxLayout = new QVBoxLayout( descBox ); description = new QTextEdit( this ); description->setReadOnly( true ); description->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel ); description->setAutoFillBackground( true ); description->setAlignment( Qt::AlignLeft | Qt::AlignTop ); description->setFixedHeight( 100 ); QPalette palette; palette.setBrush(QPalette::Active, QPalette::Window, palette.brush( QPalette::Base ) ); description->setPalette( palette ); title = new QLabel( qtr( "Title" ), this ); title->setWordWrap( true ); boxLayout->addWidget( title ); boxLayout->addWidget( description ); layout->addWidget( epg, 10 ); layout->addWidget( descBox ); CONNECT( epg, itemSelectionChanged( EPGItem *), this, displayEvent( EPGItem *) ); CONNECT( epg, programActivated(int), THEMIM->getIM(), changeProgram(int) ); CONNECT( THEMIM->getIM(), epgChanged(), this, scheduleUpdate() ); CONNECT( THEMIM, inputChanged( bool ), this, inputChanged() ); QDialogButtonBox *buttonsBox = new QDialogButtonBox( this ); #if 0 QPushButton *update = new QPushButton( qtr( "Update" ) ); // Temporary to test buttonsBox->addButton( update, QDialogButtonBox::ActionRole ); BUTTONACT( update, updateInfos() ); #endif buttonsBox->addButton( new QPushButton( qtr( "&Close" ) ), QDialogButtonBox::RejectRole ); boxLayout->addWidget( buttonsBox ); CONNECT( buttonsBox, rejected(), this, close() ); timer = new QTimer( this ); timer->setSingleShot( true ); timer->setInterval( 5000 ); CONNECT( timer, timeout(), this, timeout() ); updateInfos(); restoreWidgetPosition( "EPGDialog", QSize( 650, 450 ) ); }
void TestInputPreview::setRulerPos(QPointF const& _eventPos) { if (!input()) return; QPointF _pos = screenPos(_eventPos); static_cast<input::TestImage*>(input())->setRulerPos(_pos); input()->update(); triggerUpdate(); emit inputChanged(); }
void KColorUtilsDemo::inputSwatchChanged(const QColor &color) { if (_noUpdate) return; _noUpdate = true; updateSpins(color, inRed, inGreen, inBlue); inputChanged(); _noUpdate = false; }
void KColorUtilsDemo::inputSpinChanged() { if (_noUpdate) return; _noUpdate = true; updateSwatch(inColor, inRed, inGreen, inBlue); inputChanged(); _noUpdate = false; }
void DialogGribValidation::interpolationChanged(int newMode) { if(dataManager) { newMode++; dataManager->set_interpolationMode(newMode); qWarning() << "Setting interpolation mode to " << newMode; } this->my_centralWidget->send_redrawAll(); inputChanged(); }
void Input::selectInputId(QString const& _id) { dataModel()->inputs().setCurrentId(_id); auto* _current = dataModel()->inputs().current(); if (_current) { for (auto& _input : dataModel()->inputs()) { input::Controller::instance()->deactivate(_input.second.get()); } input::Controller::instance()->activate(_current); _current->update(); emit inputChanged(); } }
void AMScanParametersDictionary::setInput(const QString &input){ QString oldInput = input_; input_ = input; keywordParser_->setInitialText(input); keywordParser_->replaceAllUsingDictionary(keywordDictionary_); QString oldOutput = output_; output_ = keywordParser_->getReplacedText(); operateImplementation(output_); if(oldOutput != output_) emit outputChanged(output_); if(oldInput != input_) emit inputChanged(input_); }
void FilterTableHeader::generateFilters(int number) { // Delete all the current filter widgets for(int i=0;i < filterWidgets.size(); ++i) delete filterWidgets.at(i); filterWidgets.clear(); // And generate a bunch of new ones for(int i=0;i < number; ++i) { QLineEdit* l = new QLineEdit(this); l->setPlaceholderText(tr("Filter")); l->setProperty("column", i); // Store the column number for later use l->setVisible(i>0); // This hides the first input widget which belongs to the hidden rowid column connect(l, SIGNAL(textChanged(QString)), this, SLOT(inputChanged(QString))); filterWidgets.push_back(l); } // Position them correctly adjustPositions(); }
PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ intf_thread_t *_p_intf, /* main Qt p_intf */ playlist_item_t * p_root, QObject *parent ) /* Basic Qt parent */ : VLCModel( _p_intf, parent ) { p_playlist = _p_playlist; rootItem = NULL; /* PLItem rootItem, will be set in rebuild( ) */ latestSearch = QString(); rebuild( p_root ); DCONNECT( THEMIM->getIM(), metaChanged( input_item_t *), this, processInputItemUpdate( input_item_t *) ); DCONNECT( THEMIM, inputChanged( ), this, processInputItemUpdate( ) ); CONNECT( THEMIM, playlistItemAppended( int, int ), this, processItemAppend( int, int ) ); CONNECT( THEMIM, playlistItemRemoved( int ), this, processItemRemoval( int ) ); }
SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent ) : QLabel( parent ), p_intf( _p_intf ) { tooltipStringPattern = qtr( "Current playback speed: %1\nClick to adjust" ); /* Create the Speed Control Widget */ speedControl = new SpeedControlWidget( p_intf, this ); speedControlMenu = new QMenu( this ); QWidgetAction *widgetAction = new QWidgetAction( speedControl ); widgetAction->setDefaultWidget( speedControl ); speedControlMenu->addAction( widgetAction ); /* Change the SpeedRate in the Label */ CONNECT( THEMIM->getIM(), rateChanged( float ), this, setRate( float ) ); DCONNECT( THEMIM, inputChanged( ), speedControl, activateOnState() ); setContentsMargins(4, 0, 4, 0); setRate( var_InheritFloat( THEPL, "rate" ) ); }
void FilterTableHeader::generateFilters(int number, bool showFirst) { // Delete all the current filter widgets for(int i=0;i < filterWidgets.size(); ++i) delete filterWidgets.at(i); filterWidgets.clear(); // And generate a bunch of new ones for(int i=0;i < number; ++i) { FilterLineEdit* l = new FilterLineEdit(this, &filterWidgets, i); if(!showFirst && i == 0) // This hides the first input widget which belongs to the hidden rowid column l->setVisible(false); else l->setVisible(true); connect(l, SIGNAL(delayedTextChanged(QString)), this, SLOT(inputChanged(QString))); filterWidgets.push_back(l); } // Position them correctly adjustPositions(); }
void Stage::inputValueChanged(AbstractSlot * slot) { inputChanged(slot); onInputValueChanged(slot); }
virtual void operator()() { if (inputChanged(DefaultInputParamName)) { storeOutput<type::Double>("Output", std::sin(Node::loadInput<type::Double>())); } };
medSegmentationWorkspace::medSegmentationWorkspace(QWidget * parent) : medSelectorWorkspace(parent, staticName()) { connect(this->stackedViewContainers(), SIGNAL(containersSelectedChanged()), selectorToolBox(), SIGNAL(inputChanged())); }
void Input::inputUpdatedEmitter() { emit inputChanged(); }
medAlgorithmPaintToolbox::medAlgorithmPaintToolbox(QWidget *parent ) : medSegmentationAbstractToolBox( parent), m_MinValueImage(0), m_MaxValueImage(500), m_strokeRadius(4), m_strokeLabel(1), m_paintState(PaintState::None) { QWidget *displayWidget = new QWidget(this); this->addWidget(displayWidget); this->setTitle(this->name()); QVBoxLayout * layout = new QVBoxLayout(displayWidget); m_strokeButton = new QPushButton( tr("Paint / Erase") , displayWidget); m_strokeButton->setToolTip(tr("Left-click: Start painting with specified label.\nRight-click: Erase painted voxels.")); m_strokeButton->setCheckable(true); m_magicWandButton = new QPushButton(tr("Magic Wand"), displayWidget); QPixmap pixmap(":medSegmentation/pixmaps/magic_wand.png"); QIcon buttonIcon(pixmap); m_magicWandButton->setIcon(buttonIcon); m_magicWandButton->setToolTip(tr("Magic wand to automatically paint similar voxels.")); m_magicWandButton->setCheckable(true); QHBoxLayout * addRemoveButtonLayout = new QHBoxLayout(); addRemoveButtonLayout->addWidget( m_strokeButton ); addRemoveButtonLayout->addWidget( m_magicWandButton ); layout->addLayout( addRemoveButtonLayout ); QHBoxLayout * brushSizeLayout = new QHBoxLayout(); m_brushSizeSlider = new QSlider(Qt::Horizontal, displayWidget); m_brushSizeSlider->setToolTip(tr("Changes the brush radius.")); m_brushSizeSlider->setValue(this->m_strokeRadius); m_brushSizeSlider->setRange(1, 10); m_brushSizeSlider->hide(); m_brushSizeSpinBox = new QSpinBox(displayWidget); m_brushSizeSpinBox->setToolTip(tr("Changes the brush radius.")); m_brushSizeSpinBox->setValue(this->m_strokeRadius); m_brushSizeSpinBox->setMinimum(1); m_brushSizeSpinBox->setMaximum(10); m_brushSizeSpinBox->hide(); m_brushRadiusLabel = new QLabel(tr("Brush Radius"), displayWidget); m_brushRadiusLabel->hide(); connect(m_brushSizeSpinBox, SIGNAL(valueChanged(int)),m_brushSizeSlider,SLOT(setValue(int)) ); connect(m_brushSizeSlider,SIGNAL(valueChanged(int)),m_brushSizeSpinBox,SLOT(setValue(int)) ); brushSizeLayout->addWidget(m_brushRadiusLabel); brushSizeLayout->addWidget( m_brushSizeSlider ); brushSizeLayout->addWidget( m_brushSizeSpinBox ); layout->addLayout( brushSizeLayout ); QHBoxLayout * magicWandLayout = new QHBoxLayout(); m_wandThresholdSizeSlider = new QSlider(Qt::Horizontal, displayWidget); m_wandThresholdSizeSlider->setValue(100); m_wandThresholdSizeSlider->setMinimum(0); m_wandThresholdSizeSlider->setMaximum(1000); m_wandThresholdSizeSlider->hide(); m_wandThresholdSizeSpinBox = new QDoubleSpinBox(displayWidget); m_wandThresholdSizeSpinBox->setMinimum(0); m_wandThresholdSizeSpinBox->setMaximum(1000000); m_wandThresholdSizeSpinBox->setDecimals(2); m_wandThresholdSizeSpinBox->hide(); this->setWandSpinBoxValue(100); connect(m_wandThresholdSizeSpinBox, SIGNAL(valueChanged(double)),this,SLOT(setWandSliderValue(double)) ); connect(m_wandThresholdSizeSlider,SIGNAL(valueChanged(int)),this,SLOT(setWandSpinBoxValue(int)) ); m_wand3DCheckbox = new QCheckBox (tr("3D"), displayWidget); m_wand3DCheckbox->setCheckState(Qt::Unchecked); m_wand3DCheckbox->hide(); magicWandLayout->addWidget( m_wand3DCheckbox ); magicWandLayout->addWidget( m_wandThresholdSizeSlider ); magicWandLayout->addWidget( m_wandThresholdSizeSpinBox ); layout->addLayout( magicWandLayout ); this->generateLabelColorMap(24); QHBoxLayout * labelSelectionLayout = new QHBoxLayout(); m_strokeLabelSpinBox = new QSpinBox(displayWidget); m_strokeLabelSpinBox->setToolTip(tr("Changes the painted label.")); m_strokeLabelSpinBox->setValue(this->m_strokeLabel); m_strokeLabelSpinBox->setMinimum(1); m_strokeLabelSpinBox->setMaximum(24); m_strokeLabelSpinBox->hide(); connect (m_strokeLabelSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setLabel(int))); m_labelColorWidget = new QPushButton(displayWidget); m_labelColorWidget->setToolTip(tr("Current label color")); m_labelColorWidget->setStyleSheet("background-color: rgb(255, 0, 0);border:0;border-radius: 0px;width:20px;height:20px;"); m_labelColorWidget->setCheckable(false); m_labelColorWidget->setText(""); m_labelColorWidget->hide(); connect(m_labelColorWidget, SIGNAL(clicked()), this, SLOT(setLabelColor())); m_colorLabel = new QLabel(tr("Label:"), displayWidget); m_colorLabel->hide(); labelSelectionLayout->addStretch(); labelSelectionLayout->addWidget(m_colorLabel ); labelSelectionLayout->addWidget( m_labelColorWidget ); labelSelectionLayout->addWidget( m_strokeLabelSpinBox ); layout->addLayout( labelSelectionLayout ); m_clearMaskButton = new QPushButton( tr("Clear Mask") , displayWidget); m_clearMaskButton->setToolTip(tr("Resets the mask.")); QHBoxLayout * dataButtonsLayout = new QHBoxLayout(); dataButtonsLayout->addWidget(m_clearMaskButton); layout->addLayout(dataButtonsLayout); connect (m_strokeButton, SIGNAL(pressed()), this, SLOT(activateStroke ())); connect (m_magicWandButton, SIGNAL(pressed()),this,SLOT(activateMagicWand())); connect (m_clearMaskButton, SIGNAL(pressed()), this, SLOT(clearMask())); connect(this->segmentationToolBox(), SIGNAL(inputChanged()), this, SLOT(updateMouseInteraction())); showButtons(false); }
void Stage::inputOptionsChanged(AbstractSlot * slot) { inputChanged(slot); }
void AtemAudioGainCommand::setInput(const QString& input) { this->input = input; emit inputChanged(this->input); }