void CloudList::selectionChanged(const QItemSelection &sel, const QItemSelection &des) { selection_.clear(); for (QModelIndex s : sel.indexes()) { selection_.push_back(s.row()); } emit changedSelection(selection_); if(selection_.size() != 0) active_ = clouds_[selection_[0]]; emit updatedActive(active_); }
KstChangeNptsDialogI::KstChangeNptsDialogI( QWidget* parent, const char* name, bool modal, WFlags fl) : KstChangeNptsDialog(parent, name, modal, fl) { connect(Clear, SIGNAL(clicked()), CurveList, SLOT(clearSelection())); connect(SelectAll, SIGNAL(clicked()), this, SLOT(selectAll())); connect(Apply, SIGNAL(clicked()), this, SLOT(applyNptsChange())); connect(OK, SIGNAL(clicked()), this, SLOT(OKNptsChange())); connect(CurveList, SIGNAL(selectionChanged()), this, SLOT(changedSelection())); connect(_kstDataRange, SIGNAL(changed()), this, SLOT(modifiedRange())); _modifiedRange = false; }
KstEventMonitorI::KstEventMonitorI(QWidget* parent, const char* name, bool modal, WFlags fl) : EventMonitor(parent, name, modal, fl) { QStringList labels; _bSetWidths = FALSE; labels.append(i18n("Log as:")); labels.append(i18n("Expression:")); labels.append(i18n("Description:")); tableEvents = new KstEventTable( this, "tableEvents" ); tableEvents->setNumRows( 0 ); tableEvents->setNumCols( 3 ); tableEvents->setReadOnly( TRUE ); tableEvents->setSorting( FALSE ); tableEvents->setRowMovingEnabled( FALSE ); tableEvents->setColumnLabels( labels ); tableEvents->setSelectionMode( QTable::SingleRow ); tableEvents->setEventMonitors( &_eventMonitors ); layoutGrid->addWidget( tableEvents, 1, 0 ); connect(vectorSelector, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified())); connect(vectorSelectorEq, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified())); connect( scalarSelectorEq, SIGNAL( newScalarCreated() ), this, SIGNAL(modified())); connect( buttonGroupLog, SIGNAL( clicked(int) ), this, SLOT( logChanged(int) ) ); connect( checkBoxDebug, SIGNAL(clicked()), this, SLOT(logCheckChanged())); connect( Close, SIGNAL( clicked() ), this, SLOT( close() ) ); connect( pushButtonAdd, SIGNAL( clicked() ), this, SLOT( addEvent() ) ); connect( pushButtonDelete, SIGNAL( clicked() ), this, SLOT( deleteEvent() ) ); connect( pushButtonAccept, SIGNAL( clicked() ), this, SLOT( acceptChanges() ) ); connect( pushButtonDiscard, SIGNAL( clicked() ), this, SLOT( discardChanges() ) ); connect( lineEditEquation, SIGNAL( textChanged(const QString&) ), this, SLOT( expressionChanged(const QString&) ) ); connect( lineEditDescription, SIGNAL( textChanged(const QString&) ), this, SLOT( descriptionChanged(const QString&) ) ); connect( tableEvents, SIGNAL( currentChanged(int, int) ), this, SLOT( changedEvent(int, int) ) ); connect( tableEvents, SIGNAL( selectionChanged() ), this, SLOT( changedSelection() ) ); connect( vectorSelector, SIGNAL( selectionChanged(const QString&) ), this, SLOT( vectorChanged(const QString&) ) ); connect( vectorSelector, SIGNAL( newVectorCreated(const QString&) ), this, SLOT( vectorChanged(const QString&) ) ); connect( vectorSelectorEq, SIGNAL( selectionChangedLabel(const QString&)), lineEditEquation, SLOT( insert(const QString&) ) ); connect( scalarSelectorEq, SIGNAL( selectionChangedLabel(const QString&)), lineEditEquation, SLOT( insert(const QString&) ) ); connect( pushButtonApply, SIGNAL( clicked() ), this, SLOT( apply() ) ); languageChange( ); setChanged( FALSE ); }