void Scene::deactivate_cutting_plane() { disconnect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane())); m_view_plane = false; }
Value() { modified(); }
void CustomFunctionsPanel::onChildModified() { emit modified(); }
void UcUseCaseCanvas::history_hide() { Q3CanvasItem::setVisible(FALSE); disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); disconnect(browser_node->get_data(), 0, this, 0); }
void OptimAlgos::insertAlgo(QString name,OptimAlgo* algo) { this->insert(name,algo); connect(algo,SIGNAL(modified()),this,SIGNAL(modified())); }
void CodClassInstCanvas::history_load(QBuffer & b) { CodObjCanvas::history_load(b); connect(browser_node->get_data(), SIGNAL(changed()), this, SLOT(modified())); connect(browser_node->get_data(), SIGNAL(deleted()), this, SLOT(deleted())); connect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
bool RelationData::tool_cmd(ToolCom * com, BrowserRelation * rel, const char * args) { if (((unsigned char) args[-1]) >= firstSetCmd) { if (!rel->is_writable() && !root_permission()) com->write_ack(FALSE); else { RoleData & r = (rel == start) ? a : b; switch ((unsigned char) args[-1]) { case setDescriptionCmd: r.comment = args; break; case setStereotypeCmd: set_stereotype(args); modified(); com->write_ack(TRUE); // send the other side to update it if (rel == start) { if (end != 0) end->write_id(com); else com->write_id(0); } else start->write_id(com); return TRUE; case setRelationAssocClassCmd: { AType t; com->get_type(t, args); set_association(t); modified(); com->write_ack(TRUE); // send the other side to update it if (rel == start) { if (end != 0) end->write_id(com); else com->write_id(0); } else start->write_id(com); } return TRUE; case setNameCmd: name = args; break; case setDefaultValueCmd: r.init_value = args; break; case setIsClassMemberCmd: r.isa_class_relation = (*args != 0); break; case setIsVolatileCmd: r.isa_volatile_relation = (*args != 0); break; case setVisibilityCmd: { UmlVisibility v; if (! com->get_visibility(v, args)) { com->write_ack(FALSE); return TRUE; } r.uml_visibility = v; } break; case setConstraintCmd: r.constraint = args; break; case setCppDeclCmd: r.cpp_decl = args; break; case setJavaDeclCmd: r.java_decl = args; break; case setJavaAnnotationCmd: { WrapperStr s = args; s = s.stripWhiteSpace(); if (! s.isEmpty()) s += '\n'; r.java_annotation = s; } break; case setPhpDeclCmd: r.php_decl = args; break; case setPythonDeclCmd: r.python_decl = args; break; case setIdlDeclCmd: r.idl_decl = args; break; case setCppVisibilityCmd: { UmlVisibility v; if (! com->get_visibility(v, args)) { com->write_ack(FALSE); return TRUE; } r.cpp_visibility = v; } break; case setIsReadOnlyCmd: r.isa_const_relation = (*args != 0); break; case setIsCppMutableCmd: r.cpp_mutable = (*args != 0); break; case setRoleNameCmd: if ((rel == start) ? wrong_role_a_name(args) : wrong_role_b_name(args)) { com->write_ack(FALSE); return TRUE; } r.role = args; break; case setMultiplicityCmd: r.multiplicity = args; break; case setCppVirtualInheritanceCmd: r.cpp_virtual_inheritance = (*args != 0); break; case setIsIdlTruncatableCmd: r.idl_truncatable_inheritance = (*args != 0);; break; case setIsJavaTransientCmd: r.java_transient = (*args != 0); break; case setIdlCaseCmd: { BrowserAttribute * at = (BrowserAttribute *) com->get_id(args); set_idlcase(r, at, args); } break; case setDerivedCmd: switch (*args) { case 0: r.is_derived = r.is_derivedunion = FALSE; break; case 1: r.is_derived = TRUE; r.is_derivedunion = FALSE; break; case 3: r.is_derived = r.is_derivedunion = TRUE; break; default: // derived union but non derived com->write_ack(FALSE); return TRUE; } break; case setOrderingCmd: r.is_ordered = (*args != 0); break; case setUniqueCmd: r.is_unique = (*args != 0); break; case setTypeCmd: // only inside associations { UmlCode c; if (!com->get_relation_kind(c, args)) { com->write_ack(FALSE); return TRUE; } else { type = c; if (end) end->package_modified(); if (check_end_visibility()) end->modified(); start->modified(); start->package_modified(); modified(); } } break; default: return FALSE; } // ok case if (rel == start) { start->modified(); start->package_modified(); } else { end->modified(); end->package_modified(); } modified(); com->write_ack(TRUE); } } else { switch ((unsigned char) args[-1]) { case getDefCmd: send_uml_def(com, rel); send_cpp_def(com, rel); send_java_def(com, rel); if (com->api_format() >= 34) { send_php_def(com, rel); if (com->api_format() >= 39) send_python_def(com, rel); } send_idl_def(com, rel); break; case getUmlDefCmd: send_uml_def(com, rel); break; case getCppDefCmd: send_uml_def(com, rel); send_cpp_def(com, rel); break; case getJavaDefCmd: send_uml_def(com, rel); send_java_def(com, rel); break; case getPhpDefCmd: send_uml_def(com, rel); send_php_def(com, rel); break; case getPythonDefCmd: send_uml_def(com, rel); send_python_def(com, rel); break; case getIdlDefCmd: send_uml_def(com, rel); send_idl_def(com, rel); break; case sideCmd: if (*args) start->write_id(com); else if (end != 0) end->write_id(com); else com->write_id(0); break; default: return FALSE; } } return TRUE; }
void Doc::resetModified() { m_modified = false; emit modified(false); }
void SdDurationCanvas::history_hide() { Q3CanvasItem::setVisible(FALSE); disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
void setupSlots(QWidget* dialog) { if (dialog) { connect(_vector, SIGNAL(selectionChanged(QString)), dialog, SIGNAL(modified())); connect(_scalarStep, SIGNAL(selectionChanged(QString)), dialog, SIGNAL(modified())); } }
void Doc::setModified() { m_modified = true; emit modified(true); }
bool KstVectorDialogI::editObject() { // if editing multiple objects, edit each one if (_editMultipleMode) { // get dirties first _fileNameDirty = !_w->FileName->url().isEmpty(); _skipDirty = _w->_kstDataRange->Skip->text() != " "; _f0Dirty = !_w->_kstDataRange->F0->text().isEmpty(); _nDirty = !_w->_kstDataRange->N->text().isEmpty(); _NDirty = _w->_N->text() != " "; _xMinDirty = !_w->_xMin->text().isEmpty(); _xMaxDirty = !_w->_xMax->text().isEmpty(); // now edit the vectors bool didEdit = false; for (uint i = 0; i < _editMultipleWidget->_objectList->count(); i++) { if (_editMultipleWidget->_objectList->isSelected(i)) { // get the pointer to the object KST::vectorList.lock().readLock(); KstVectorList::Iterator vcIter = KST::vectorList.findTag(_editMultipleWidget->_objectList->text(i)); if (vcIter == KST::vectorList.end()) { KST::vectorList.lock().unlock(); return false; } KstVectorPtr vcPtr = *vcIter; KST::vectorList.lock().unlock(); if (!editSingleObject(vcPtr)) { return false; } didEdit = true; } } if (!didEdit) { KMessageBox::sorry(this, i18n("Select one or more objects to edit.")); return false; } } else { // verify that the curve name is unique QString tag_name = _tagName->text(); _dp->writeLock(); if (tag_name != _dp->tagName() && KstData::self()->vectorTagNameNotUnique(tag_name)) { _dp->unlock(); _tagName->setFocus(); return false; } _dp->setTagName(KstObjectTag(tag_name, _dp->tag().context())); // FIXME: doesn't allow changing tag context _dp->unlock(); // then edit the object _fileNameDirty = true; _f0Dirty = true; _nDirty = true; _NDirty = true; _countFromEndDirty = true; _readToEndDirty = true; _doFilterDirty = true; _doSkipDirty = true; _skipDirty = true; _xMinDirty = true; _xMaxDirty = true; KstVectorPtr vp = kst_cast<KstVector>(_dp); if (!vp || !editSingleObject(vp)) { return false; } } emit modified(); return true; }
bool KstVectorDialogI::newObject() { KstDataSourcePtr file; QString tag_name = _tagName->text(); if (_w->_readFromSource->isChecked()) { tag_name.replace(defaultTag, _w->Field->currentText()); tag_name = KST::suggestVectorName(tag_name); // if there is not an active DataSource, create one { KST::dataSourceList.lock().writeLock(); KstDataSourceList::Iterator it = KST::dataSourceList.findReusableFileName(_w->FileName->url()); if (it == KST::dataSourceList.end()) { file = KstDataSource::loadSource(_w->FileName->url()); if (!file || !file->isValid()) { KST::dataSourceList.lock().unlock(); KMessageBox::sorry(this, i18n("The file could not be loaded.")); return false; } if (file->isEmpty()) { KST::dataSourceList.lock().unlock(); KMessageBox::sorry(this, i18n("The file does not contain data.")); return false; } KST::dataSourceList.append(file); } else { file = *it; } KST::dataSourceList.lock().unlock(); } file->readLock(); if (!file->isValidField(_w->Field->currentText())) { file->unlock(); KMessageBox::sorry(this, i18n("The requested field is not defined for the requested file.")); return false; } int f0, n; if (_w->_kstDataRange->isStartRelativeTime()) { f0 = file->sampleForTime(_w->_kstDataRange->f0Value()); } else if (_w->_kstDataRange->isStartAbsoluteTime()) { bool ok = false; f0 = file->sampleForTime(_w->_kstDataRange->f0DateTimeValue(), &ok); if (!ok) { file->unlock(); KMessageBox::sorry(this, i18n("The requested field or file could not use the specified date.")); return false; } } else { f0 = int(_w->_kstDataRange->f0Value()); } if (_w->_kstDataRange->isRangeRelativeTime()) { double nValStored = _w->_kstDataRange->nValue(); if (_w->_kstDataRange->CountFromEnd->isChecked()) { int frameCount = file->frameCount(_w->Field->currentText()); double msCount = file->relativeTimeForSample(frameCount - 1); n = frameCount - 1 - file->sampleForTime(msCount - nValStored); } else { double fTime = file->relativeTimeForSample(f0); n = file->sampleForTime(fTime + nValStored) - file->sampleForTime(fTime); } } else { n = int(_w->_kstDataRange->nValue()); } file->unlock(); // create the vector KstRVectorPtr vector = new KstRVector( file, _w->Field->currentText(), KstObjectTag(tag_name, file->tag(), false), _w->_kstDataRange->CountFromEnd->isChecked() ? -1 : f0, _w->_kstDataRange->ReadToEnd->isChecked() ? -1 : n, _w->_kstDataRange->Skip->value(), _w->_kstDataRange->DoSkip->isChecked(), _w->_kstDataRange->DoFilter->isChecked()); emit vectorCreated(KstVectorPtr(vector)); vector = 0L; emit modified(); } else { double x0 = _w->_xMin->text().toDouble(); double x1 = _w->_xMax->text().toDouble(); int n = _w->_N->value(); QString tagname = _tagName->text(); if (tagname == defaultTag) { tagname = KST::suggestVectorName(QString("(%1..%2)").arg(x0).arg(x1)); } KstSVectorPtr svector = new KstSVector(x0, x1, n, KstObjectTag(tagname, KstObjectTag::globalTagContext)); emit vectorCreated(KstVectorPtr(svector)); svector = 0L; emit modified(); } return true; }
CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model, GeneralSettings & generalSettings, Firmware * firmware): GenericPanel(parent, model, generalSettings, firmware), functions(model ? model->customFn : generalSettings.customFn), initialized(false) #if defined(PHONON) , phononCurrent(-1), clickObject(NULL), clickOutput(NULL) #endif { QGridLayout * gridLayout = new QGridLayout(this); addLabel(gridLayout, tr("Switch"), 1); addLabel(gridLayout, tr("Action"), 2); addLabel(gridLayout, tr("Parameters"), 3); addLabel(gridLayout, tr("Enable"), 4, true ); addEmptyLabel(gridLayout, 5 ); lock = true; int num_fsw = model ? firmware->getCapability(CustomFunctions) : firmware->getCapability(GlobalFunctions); if (!firmware->getCapability(VoicesAsNumbers)) { tracksSet = getFilesSet(getSoundsPath(generalSettings), QStringList() << "*.wav" << "*.WAV", firmware->getCapability(VoicesMaxLength)); for (int i=0; i<num_fsw; i++) { if (functions[i].func==FuncPlayPrompt || functions[i].func==FuncBackgroundMusic) { QString temp = functions[i].paramarm; if (!temp.isEmpty()) { tracksSet.insert(temp); } } } } if (IS_TARANIS(firmware->getBoard())) { scriptsSet = getFilesSet(g.profile[g.id()].sdPath() + "/SCRIPTS", QStringList() << "*.lua", firmware->getCapability(VoicesMaxLength)); for (int i=0; i<num_fsw; i++) { if (functions[i].func==FuncPlayScript) { QString temp = functions[i].paramarm; if (!temp.isEmpty()) { scriptsSet.insert(temp); } } } } CompanionIcon playIcon("play.png"); for (int i=0; i<num_fsw; i++) { // The label QLabel * label = new QLabel(this); label->setContextMenuPolicy(Qt::CustomContextMenu); label->setMouseTracking(true); label->setProperty("index", i); if (model) label->setText(tr("SF%1").arg(i+1)); else label->setText(tr("GF%1").arg(i+1)); label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); connect(label, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(fsw_customContextMenuRequested(QPoint))); gridLayout->addWidget(label, i+1, 0); // The switch fswtchSwtch[i] = new QComboBox(this); fswtchSwtch[i]->setProperty("index", i); fswtchSwtch[i]->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum); fswtchSwtch[i]->setMaxVisibleItems(10); connect(fswtchSwtch[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); gridLayout->addWidget(fswtchSwtch[i], i+1, 1); // The function fswtchFunc[i] = new QComboBox(this); fswtchFunc[i]->setProperty("index", i); connect(fswtchFunc[i], SIGNAL(currentIndexChanged(int)), this, SLOT(functionEdited())); gridLayout->addWidget(fswtchFunc[i], i+1, 2); // The parameters QHBoxLayout *paramLayout = new QHBoxLayout(); gridLayout->addLayout(paramLayout, i+1, 3); fswtchGVmode[i] = new QComboBox(this); fswtchGVmode[i]->setProperty("index", i); connect(fswtchGVmode[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchGVmode[i]); fswtchParamGV[i] = new QCheckBox(this); fswtchParamGV[i]->setProperty("index", i); fswtchParamGV[i]->setText("GV"); fswtchParamGV[i]->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); connect(fswtchParamGV[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchParamGV[i]); fswtchParam[i] = new QDoubleSpinBox(this); fswtchParam[i]->setProperty("index", i); fswtchParam[i]->setAccelerated(true); fswtchParam[i]->setDecimals(0); connect(fswtchParam[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchParam[i]); fswtchParamTime[i] = new QTimeEdit(this); fswtchParamTime[i]->setProperty("index", i); fswtchParamTime[i]->setAccelerated(true); fswtchParamTime[i]->setDisplayFormat("hh:mm:ss"); connect(fswtchParamTime[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchParamTime[i]); fswtchParamT[i] = new QComboBox(this); fswtchParamT[i]->setProperty("index", i); paramLayout->addWidget(fswtchParamT[i]); connect(fswtchParamT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); fswtchParamArmT[i] = new QComboBox(this); fswtchParamArmT[i]->setProperty("index", i); fswtchParamArmT[i]->setEditable(true); paramLayout->addWidget(fswtchParamArmT[i]); connect(fswtchParamArmT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited())); fswtchBLcolor[i] = new QSlider(this); fswtchBLcolor[i]->setProperty("index", i); fswtchBLcolor[i]->setMinimum(0); fswtchBLcolor[i]->setMaximum(100); fswtchBLcolor[i]->setSingleStep(1); fswtchBLcolor[i]->setOrientation(Qt::Horizontal); paramLayout->addWidget(fswtchBLcolor[i]); connect(fswtchBLcolor[i], SIGNAL(sliderReleased()), this, SLOT(customFunctionEdited())); #ifdef PHONON playBT[i] = new QPushButton(this); playBT[i]->setProperty("index", i); playBT[i]->setIcon(playIcon); paramLayout->addWidget(playBT[i]); connect(playBT[i], SIGNAL(pressed()), this, SLOT(playMusic())); #endif QHBoxLayout *repeatLayout = new QHBoxLayout(); gridLayout->addLayout(repeatLayout, i+1, 4); fswtchRepeat[i] = new RepeatComboBox(this, functions[i].repeatParam); repeatLayout->addWidget(fswtchRepeat[i], i+1); connect(fswtchRepeat[i], SIGNAL(modified()), this, SLOT(onChildModified())); fswtchEnable[i] = new QCheckBox(this); fswtchEnable[i]->setProperty("index", i); fswtchEnable[i]->setText(tr("ON")); fswtchEnable[i]->setFixedWidth( 80 ); repeatLayout->addWidget(fswtchEnable[i], i+1); connect(fswtchEnable[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); } // Push rows upward addDoubleSpring(gridLayout, 5, num_fsw+1); disableMouseScrolling(); lock = false; }
void InfoCanvas::menu(const QPoint&) { Q3PopupMenu m(0); Q3PopupMenu fontsubm(0); MenuFactory::createTitle(m, TR("Information")); m.insertSeparator(); m.insertItem(TR("Upper"), 0); m.insertItem(TR("Lower"), 1); m.insertItem(TR("Go up"), 5); m.insertItem(TR("Go down"), 6); m.insertSeparator(); m.insertItem(TR("Edit"), 2); m.insertSeparator(); m.insertItem(TR("Font"), &fontsubm); init_font_menu(fontsubm, the_canvas(), 10); m.insertItem(TR("Edit drawing settings"), 3); if (linked()) { m.insertSeparator(); m.insertItem(TR("Select linked items"), 4); } m.insertSeparator(); int index = m.exec(QCursor::pos()); switch (index) { case 0: upper(); modified(); // call package_modified() return; case 1: lower(); modified(); // call package_modified() return; case 5: z_up(); modified(); // call package_modified() return; case 6: z_down(); modified(); // call package_modified() return; case 2: who->open(); return; case 3: for (;;) { ColorSpecVector co(1); co[0].set(TR("note color"), &itscolor); SettingsDialog dialog(0, &co, FALSE); dialog.raise(); if (dialog.exec() == QDialog::Accepted) modified(); if (!dialog.redo()) return; } break; case 4: the_canvas()->unselect_all(); select_associated(); return; default: if (index >= 10) { itsfont = (UmlFont) (index - 10); modified(); } return; } package_modified(); }
void SdDurationCanvas::menu(const QPoint & p) { Q3PopupMenu m(0); Q3CanvasItemList items = collisions(TRUE); Q3PtrList<SdDurationCanvas> l; Q3CanvasItemList::ConstIterator it; Q3CanvasItemList::ConstIterator end = items.end(); for (it = items.begin(); it != end; ++it) { if ((*it)->visible()) { DiagramItem * di = QCanvasItemToDiagramItem(*it); if ((di != 0) && (di->type() == UmlActivityDuration) && (((SdDurationCanvas *) di)->support == support)) l.append((SdDurationCanvas *) di); } } m.insertItem(new MenuTitle(TR("Activity bar"), m.font()), -1); m.insertSeparator(); m.insertItem(TR("Upper"), 0); m.insertItem(TR("Lower"), 1); m.insertItem(TR("Go up"), 9); m.insertItem(TR("Go down"), 10); m.insertSeparator(); m.insertItem((coregion) ? TR("Draw as activity bar") : TR("Draw as a coregion"), 7); m.insertItem(TR("Edit drawing settings"), 2); m.insertSeparator(); m.insertItem(TR("Select linked items"), 3); m.insertSeparator(); m.insertItem(TR("Remove from diagram"), 4); m.insertSeparator(); m.insertItem(TR("Cut here"), 5); if (!l.isEmpty()) m.insertItem(TR("Merge juxtaposed activity bars"), 6); if (support->isaDuration()) m.insertItem(TR("Collapse in parent bar"), 8); switch (m.exec(QCursor::pos())) { case 0: upper(); modified(); return; case 1: lower(); modified(); return; case 9: z_up(); modified(); // call package_modified() return; case 10: z_down(); modified(); // call package_modified() return; case 2: edit_drawing_settings(); return; case 3: select_associated(); break; case 4: delete_it(); package_modified(); break; case 5: cut(p); package_modified(); break; case 6: merge(l); package_modified(); break; case 7: coregion = !coregion; modified(); return; case 8: { SdDurationCanvas * d = (SdDurationCanvas *) support; d->collapse(this); d->update_hpos(); // update sub duration and msg hpos d->update_self(); } package_modified(); break; default: return; } canvas()->update(); }
void CodClassInstCanvas::menu(const QPoint&) { QPopupMenu m(0); bool modelized = (browser_node->get_type() == UmlClassInstance); m.insertItem(new MenuTitle(full_name(), m.font()), -1); m.insertSeparator(); m.insertItem(TR("Upper"), 0); m.insertItem(TR("Lower"), 1); m.insertItem(TR("Go up"), 13); m.insertItem(TR("Go down"), 14); m.insertSeparator(); m.insertItem(TR("Edit drawing settings"), 2); m.insertSeparator(); m.insertItem(TR("Edit"), 3); m.insertSeparator(); if (modelized) m.insertItem(TR("Select in browser"), 4); m.insertItem(TR("Select class in browser"), 5); if (linked()) m.insertItem(TR("Select linked items"), 6); m.insertSeparator(); if (modelized) m.insertItem(TR("Exit from model"), 9); else { if (container(UmlClass)->is_writable()) m.insertItem(TR("Insert in model"), 10); m.insertItem(TR("Replace it"), 11); } m.insertSeparator(); m.insertItem(TR("Remove from diagram"), 7); if (modelized && browser_node->is_writable()) m.insertItem(TR("Delete from model"), 8); switch (m.exec(QCursor::pos())) { case 0: upper(); modified(); // call package_modified return; case 1: lower(); modified(); // call package_modified return; case 13: z_up(); modified(); // call package_modified() return; case 14: z_down(); modified(); // call package_modified() return; case 2: edit_drawing_settings(); return; case 3: open(); // call package_modified return; case 4: browser_node->select_in_browser(); return; case 5: get_type()->select_in_browser(); return; case 6: the_canvas()->unselect_all(); select_associated(); return; case 7: delete_it(); break; case 8: //delete from model browser_node->delete_it(); // will delete the canvas break; case 9: { BasicData * d = browser_node->get_data(); disconnect(d, SIGNAL(changed()), this, SLOT(modified())); disconnect(d, SIGNAL(deleted()), this, SLOT(deleted())); iname = browser_node->get_name(); browser_node = ((ClassInstanceData *) d)->get_class(); d = browser_node->get_data(); connect(d, SIGNAL(changed()), this, SLOT(modified())); connect(d, SIGNAL(deleted()), this, SLOT(deleted())); } break; case 10: { BasicData * d = browser_node->get_data(); disconnect(d, SIGNAL(changed()), this, SLOT(modified())); disconnect(d, SIGNAL(deleted()), this, SLOT(deleted())); browser_node = new BrowserClassInstance(iname, (BrowserClass *) browser_node, container(UmlClass)); d = browser_node->get_data(); connect(d, SIGNAL(changed()), this, SLOT(modified())); connect(d, SIGNAL(deleted()), this, SLOT(deleted())); } break; case 11: { BrowserNode * bn = BrowserClassInstance::get_classinstance((BrowserClass *) browser_node); if (bn == 0) return; BasicData * d = browser_node->get_data(); disconnect(d, SIGNAL(changed()), this, SLOT(modified())); disconnect(d, SIGNAL(deleted()), this, SLOT(deleted())); browser_node = bn; d = browser_node->get_data(); connect(d, SIGNAL(changed()), this, SLOT(modified())); connect(d, SIGNAL(deleted()), this, SLOT(deleted())); modified(); // call package_modified return; } break; default: return; } package_modified(); }
void GeneralEdit::onTabModified() { emit modified(); }
void KstFilterDialogI::generateEntries(bool input, int& cnt, QWidget *parent, QGridLayout *grid, const QValueList<Plugin::Data::IOValue>& table) { // get fixed vector for filter QString fixedVector; const QString& pluginName = _pluginList[_w->PluginCombo->currentItem()]; const Plugin::Data& pluginData = PluginCollection::self()->pluginList()[PluginCollection::self()->pluginNameList()[pluginName]]; if (input) { fixedVector = pluginData._filterInputVector; } else { fixedVector = pluginData._filterOutputVector; } QString scalarLabelTemplate, vectorLabelTemplate, stringLabelTemplate; if (input) { stringLabelTemplate = i18n("Input String - %1:"); scalarLabelTemplate = i18n("Input Scalar - %1:"); vectorLabelTemplate = i18n("Input Vector - %1:"); } else { stringLabelTemplate = i18n("Output String - %1:"); scalarLabelTemplate = i18n("Output Scalar - %1:"); vectorLabelTemplate = i18n("Output Vector - %1:"); } for (QValueList<Plugin::Data::IOValue>::ConstIterator it = table.begin(); it != table.end(); ++it) { QString labellabel; bool string = false; bool scalar = false; bool fixed = false; switch ((*it)._type) { case Plugin::Data::IOValue::PidType: continue; case Plugin::Data::IOValue::FloatType: labellabel = scalarLabelTemplate.arg((*it)._name); scalar = true; break; case Plugin::Data::IOValue::StringType: labellabel = stringLabelTemplate.arg((*it)._name); string = true; break; case Plugin::Data::IOValue::TableType: if ((*it)._name == fixedVector) { fixed = true; } if ((*it)._subType == Plugin::Data::IOValue::FloatSubType || (*it)._subType == Plugin::Data::IOValue::FloatNonVectorSubType) { labellabel = vectorLabelTemplate.arg((*it)._name); } else { // unsupported continue; } break; default: // unsupported continue; } QLabel *label = new QLabel(labellabel, parent, input ? "Input label" : "Output label"); QWidget *widget = 0L; if (input) { if (scalar) { ScalarSelector *w = new ScalarSelector(parent, (*it)._name.latin1()); widget = w; connect(w->_scalar, SIGNAL(activated(const QString&)), this, SLOT(updateScalarTooltip(const QString&))); connect(widget, SIGNAL(newScalarCreated()), this, SIGNAL(modified())); if (!(*it)._default.isEmpty()) { w->_scalar->insertItem((*it)._default); w->_scalar->setCurrentText((*it)._default); //printf("default: |%s|\n", (*it)._default.latin1()); } KstScalarPtr p = *KST::scalarList.findTag(w->_scalar->currentText()); w->allowDirectEntry(true); if (p) { p->readLock(); QToolTip::remove(w->_scalar); QToolTip::add(w->_scalar, QString::number(p->value())); p->unlock(); } } else if (string) { StringSelector *w = new StringSelector(parent, (*it)._name.latin1()); widget = w; connect(w->_string, SIGNAL(activated(const QString&)), this, SLOT(updateStringTooltip(const QString&))); connect(widget, SIGNAL(newStringCreated()), this, SIGNAL(modified())); if (!(*it)._default.isEmpty()) { w->_string->insertItem((*it)._default); w->_string->setCurrentText((*it)._default); } KstStringPtr p = *KST::stringList.findTag(w->_string->currentText()); w->allowDirectEntry(true); if (p) { p->readLock(); QToolTip::remove(w->_string); QToolTip::add(w->_string, p->value()); p->unlock(); } } else { if (fixed) { widget = new QLabel(parent, (*it)._name.latin1()); static_cast<QLabel*>(widget)->setText(_yvector); } else { widget = new VectorSelector(parent, (*it)._name.latin1()); connect(widget, SIGNAL(newVectorCreated(const QString&)), this, SIGNAL(modified())); } } } else {
void GeneralEdit::on_calretrieve_PB_clicked() { int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt(); QString calib=g.profile[profile_id].stickPotCalib(); int potsnum=GetCurrentFirmware()->getCapability(Pots)+GetCurrentFirmware()->getCapability(Sliders); int numSwPots=GetCurrentFirmware()->getCapability(Switches)+GetCurrentFirmware()->getCapability(Pots)+GetCurrentFirmware()->getCapability(Sliders); if (calib.isEmpty()) { return; } else { QString trainercalib = g.profile[profile_id].trainerCalib(); QString hwtypes = g.profile[profile_id].controlTypes(); QString controlNames=g.profile[profile_id].controlNames(); int8_t txVoltageCalibration = (int8_t)g.profile[profile_id].txVoltageCalibration(); int8_t txCurrentCalibration = (int8_t)g.profile[profile_id].txCurrentCalibration(); int8_t PPM_Multiplier = (int8_t)g.profile[profile_id].ppmMultiplier(); uint8_t GSStickMode = (uint8_t)g.profile[profile_id].gsStickMode(); uint8_t vBatWarn = (uint8_t)g.profile[profile_id].vBatWarn(); QString DisplaySet = g.profile[profile_id].display(); QString BeeperSet = g.profile[profile_id].beeper(); QString HapticSet = g.profile[profile_id].haptic(); QString SpeakerSet = g.profile[profile_id].speaker(); QString CountrySet = g.profile[profile_id].countryCode(); if ((calib.length()==(NUM_STICKS+potsnum)*12) && (trainercalib.length()==16)) { QString Byte; int16_t byte16; bool ok; for (int i=0; i<(NUM_STICKS+potsnum); i++) { Byte=calib.mid(i*12,4); byte16=(int16_t)Byte.toInt(&ok,16); if (ok) generalSettings.calibMid[i]=byte16; Byte=calib.mid(4+i*12,4); byte16=(int16_t)Byte.toInt(&ok,16); if (ok) generalSettings.calibSpanNeg[i]=byte16; Byte=calib.mid(8+i*12,4); byte16=(int16_t)Byte.toInt(&ok,16); if (ok) generalSettings.calibSpanPos[i]=byte16; } for (int i=0; i<4; i++) { Byte=trainercalib.mid(i*4,4); byte16=(int16_t)Byte.toInt(&ok,16); if (ok) generalSettings.trainer.calib[i]=byte16; } generalSettings.txCurrentCalibration=txCurrentCalibration; generalSettings.txVoltageCalibration=txVoltageCalibration; generalSettings.vBatWarn=vBatWarn; if (GetCurrentFirmware()->getCapability(HasBatMeterRange)) { generalSettings.vBatMin = (int8_t) g.profile[profile_id].vBatMin(); generalSettings.vBatMax = (int8_t) g.profile[profile_id].vBatMax(); } generalSettings.PPM_Multiplier=PPM_Multiplier; } else { QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, radio calibration was not retrieved")); } if (hwtypes.length()==numSwPots) { QString Byte; int16_t byte16; QByteArray qba; int16_t offset; bool ok; for (int i=0; i<NUM_STICKS; i++) { qba = controlNames.mid(3*i,3).toAscii(); strcpy(generalSettings.stickName[i], qba.data()); } for (int i=0; i<(GetCurrentFirmware()->getCapability(Switches)); i++) { Byte=hwtypes.mid(i,1); byte16=(int16_t)Byte.toInt(&ok,16); qba=controlNames.mid(3*(i+NUM_STICKS),3).toAscii(); if (ok) generalSettings.switchConfig[i]=byte16; strcpy(generalSettings.switchName[i], qba.data()); } offset = GetCurrentFirmware()->getCapability(Switches); for (int i=0; i<(GetCurrentFirmware()->getCapability(Pots)); i++) { Byte=hwtypes.mid(i+offset,1); byte16=(int16_t)Byte.toInt(&ok,16); qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toAscii(); if (ok) generalSettings.potConfig[i]=byte16; strcpy(generalSettings.potName[i], qba.data()); } offset += GetCurrentFirmware()->getCapability(Pots); for (int i=0; i<(GetCurrentFirmware()->getCapability(Sliders)); i++) { Byte=hwtypes.mid(i+offset,1); byte16=(int16_t)Byte.toInt(&ok,16); qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toAscii(); if (ok) generalSettings.sliderConfig[i]=byte16; strcpy(generalSettings.sliderName[i], qba.data()); } } else { QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, Switch/pot config not retrieved")); } if ((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6)) { generalSettings.stickMode=GSStickMode; uint8_t byte8u; int8_t byte8; QString chars; bool ok; byte8=(int8_t)DisplaySet.mid(0,2).toInt(&ok,16); if (ok) generalSettings.optrexDisplay=(byte8==1 ? true : false); byte8u=(uint8_t)DisplaySet.mid(2,2).toUInt(&ok,16); if (ok) generalSettings.contrast=byte8u; byte8u=(uint8_t)DisplaySet.mid(4,2).toUInt(&ok,16); if (ok) generalSettings.backlightBright=byte8u; byte8=(int8_t)BeeperSet.mid(0,2).toUInt(&ok,16); if (ok) generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8; byte8=(int8_t)BeeperSet.mid(2,2).toInt(&ok,16); if (ok) generalSettings.beeperLength=byte8; byte8=(int8_t)HapticSet.mid(0,2).toUInt(&ok,16); if (ok) generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8; byte8=(int8_t)HapticSet.mid(2,2).toInt(&ok,16); if (ok) generalSettings.hapticStrength=byte8; byte8=(int8_t)HapticSet.mid(4,2).toInt(&ok,16); if (ok) generalSettings.hapticLength=byte8; byte8u=(uint8_t)SpeakerSet.mid(0,2).toUInt(&ok,16); if (ok) generalSettings.speakerMode=byte8u; byte8u=(uint8_t)SpeakerSet.mid(2,2).toUInt(&ok,16); if (ok) generalSettings.speakerPitch=byte8u; byte8u=(uint8_t)SpeakerSet.mid(4,2).toUInt(&ok,16); if (ok) generalSettings.speakerVolume=byte8u; if (CountrySet.length()==6) { byte8u=(uint8_t)CountrySet.mid(0,2).toUInt(&ok,16); if (ok) generalSettings.countryCode=byte8u; byte8u=(uint8_t)CountrySet.mid(2,2).toUInt(&ok,16); if (ok) generalSettings.imperial=byte8u; chars=CountrySet.mid(4,2); generalSettings.ttsLanguage[0]=chars[0].toAscii(); generalSettings.ttsLanguage[1]=chars[1].toAscii(); } } else { QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, hw related parameters were not retrieved")); } } emit modified(); }
void UcUseCaseCanvas::menu(const QPoint&) { Q3PopupMenu m(0); Q3PopupMenu toolm(0); MenuFactory::createTitle(m, browser_node->get_data()->definition(FALSE, TRUE)); m.insertSeparator(); m.insertItem("Upper", 0); m.insertItem("Lower", 1); m.insertItem("Go up", 13); m.insertItem("Go down", 14); m.insertSeparator(); m.insertItem("Add related elements", 10); m.insertSeparator(); m.insertItem("Edit", 2); m.insertSeparator(); m.insertItem("Edit drawing settings", 3); m.insertSeparator(); m.insertItem("Select in browser",4); if (linked()) m.insertItem("Select linked items", 5); m.insertSeparator(); if (browser_node->is_writable()) { if (browser_node->get_associated() != (BrowserNode *) the_canvas()->browser_diagram()) m.insertItem("Set associated diagram",6); if (browser_node->get_associated()) m.insertItem("Remove diagram association",9); } m.insertSeparator(); m.insertItem("Remove from diagram",7); if (browser_node->is_writable()) m.insertItem("Delete from model", 8); m.insertSeparator(); if (Tool::menu_insert(&toolm, UmlUseCase, 20)) m.insertItem("Tool", &toolm); int rank = m.exec(QCursor::pos()); switch (rank) { case 0: upper(); modified(); return; case 1: lower(); modified(); return; case 13: z_up(); modified(); return; case 14: z_down(); modified(); return; case 2: browser_node->open(TRUE); break; case 3: edit_drawing_settings(); return; case 4: browser_node->select_in_browser(); return; case 5: the_canvas()->unselect_all(); select_associated(); return; case 6: ((BrowserUseCase *) browser_node)->set_associated_diagram((BrowserUseCaseDiagram *) the_canvas()->browser_diagram()); break; case 12: ((BrowserUseCase *) browser_node) ->set_associated_diagram(0); return; case 7: // remove from diagram delete_it(); break; case 8: // delete from model browser_node->delete_it(); // will remove canvas break; case 10: ((UmlCanvas *) canvas())->get_view() ->add_related_elements(this, TR("use case"), TRUE, FALSE); return; default: if (rank >= 20) ToolCom::run(Tool::command(rank - 20), browser_node); return; } package_modified(); }
bool StateData::tool_cmd(ToolCom * com, const char * args, BrowserNode * bn, const QString & comment) { if (((unsigned char) args[-1]) >= firstSetCmd) { bool ok = TRUE; if (!bn->is_writable() && !root_permission()) ok = FALSE; else { switch ((unsigned char) args[-1]) { case setUmlEntryBehaviorCmd: if (reference != 0) ok = FALSE; else uml.on_entry = args; break; case setUmlExitBehaviorCmd: if (reference != 0) ok = FALSE; else uml.on_exit = args; break; case setUmlActivityCmd: if (reference != 0) ok = FALSE; else uml.do_activity = args; break; case setCppEntryBehaviorCmd: if (reference != 0) ok = FALSE; else cpp.on_entry = args; break; case setCppExitBehaviorCmd: if (reference != 0) ok = FALSE; else cpp.on_exit = args; break; case setCppActivityCmd: if (reference != 0) ok = FALSE; else cpp.do_activity = args; break; case setJavaEntryBehaviorCmd: if (reference != 0) ok = FALSE; else java.on_entry = args; break; case setJavaExitBehaviorCmd: if (reference != 0) ok = FALSE; else java.on_exit = args; break; case setJavaActivityCmd: if (reference != 0) ok = FALSE; else java.do_activity = args; break; case setDefCmd: if (reference != 0) ok = FALSE; else set_specification((BrowserOperation *) com->get_id(args)); break; case setActiveCmd: if (reference != 0) ok = FALSE; else is_active = (*args != 0); break; case setDerivedCmd: { BrowserState * st = (BrowserState *) com->get_id(args); if (st == reference) { com->write_ack(TRUE); return TRUE; } if ((st != 0) && (!((BrowserState *) bn)->can_reference() || !((BrowserState *) browser_node)->can_reference(st))) ok = FALSE; else set_reference(st); } break; default: return BasicData::tool_cmd(com, args, bn, comment); } } if (ok) { bn->package_modified(); modified(); } com->write_ack(ok); return TRUE; } else return BasicData::tool_cmd(com, args, bn, comment); }
void UcUseCaseCanvas::delete_it() { disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); disconnect(browser_node->get_data(), 0, this, 0); DiagramCanvas::delete_it(); }
bool isModified() const { return ((!string_empty(m_path.c_str()) // had or has an absolute path && m_modified != modified()) // AND disk timestamp changed || !path_equal(rootPath(m_originalName.c_str()), m_path.c_str())); // OR absolute vfs-root changed }
void ParameterSetCanvas::menu(const QPoint &) { QPopupMenu m(0); QPopupMenu toolm(0); int index; m.insertItem(new MenuTitle(browser_node->get_data()->definition(FALSE, TRUE), m.font()), -1); m.insertSeparator(); m.insertItem(TR("Upper"), 0); m.insertItem(TR("Lower"), 1); m.insertItem(TR("Go up"), 13); m.insertItem(TR("Go down"), 14); m.insertSeparator(); m.insertItem(TR("Edit drawing settings"), 2); m.insertSeparator(); m.insertItem(TR("Edit parameter set"), 3); m.insertSeparator(); m.insertItem(TR("Select in browser"), 4); if (linked()) m.insertItem(TR("Select linked items"), 5); m.insertSeparator(); if (browser_node->is_writable()) { m.insertItem(TR("Delete from model"), 8); m.insertSeparator(); } if (Tool::menu_insert(&toolm, UmlParameterSet, 20)) m.insertItem(TR("Tool"), &toolm); switch (index = m.exec(QCursor::pos())) { case 0: act->upper(); modified(); // call package_modified() return; case 1: act->lower(); modified(); // call package_modified() return; case 13: act->z_up(); modified(); // call package_modified() return; case 14: act->z_down(); modified(); // call package_modified() return; case 2: edit_drawing_settings(); return; case 3: browser_node->open(TRUE); return; case 4: browser_node->select_in_browser(); return; case 5: the_canvas()->unselect_all(); select_associated(); return; case 8: //delete from model browser_node->delete_it(); // will delete the canvas break; default: if (index >= 20) ToolCom::run(Tool::command(index - 20), browser_node); return; } package_modified(); }
void SubjectCanvas::history_hide() { DiagramCanvas::setVisible(FALSE); disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); }
void RepeatComboBox::onIndexChanged(int index) { repeatParam = itemData(index).toInt(); emit modified(); }
void SubjectCanvas::delete_it() { disconnect(DrawingSettings::instance(), SIGNAL(changed()), this, SLOT(modified())); DiagramCanvas::delete_it(); }
CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model, GeneralSettings & generalSettings, Firmware * firmware): GenericPanel(parent, model, generalSettings, firmware), functions(model ? model->customFn : generalSettings.customFn) #if defined(PHONON) , phononCurrent(-1), clickObject(NULL), clickOutput(NULL) #endif { Stopwatch s1("CustomFunctionsPanel - populate"); lock = true; int num_fsw = model ? firmware->getCapability(CustomFunctions) : firmware->getCapability(GlobalFunctions); if (!firmware->getCapability(VoicesAsNumbers)) { tracksSet = getFilesSet(getSoundsPath(generalSettings), QStringList() << "*.wav" << "*.WAV", firmware->getCapability(VoicesMaxLength)); for (int i=0; i<num_fsw; i++) { if (functions[i].func==FuncPlayPrompt || functions[i].func==FuncBackgroundMusic) { QString temp = functions[i].paramarm; if (!temp.isEmpty()) { tracksSet.insert(temp); } } } } s1.report("get tracks"); if (IS_TARANIS(firmware->getBoard())) { scriptsSet = getFilesSet(g.profile[g.id()].sdPath() + "/SCRIPTS/FUNCTIONS", QStringList() << "*.lua", firmware->getCapability(VoicesMaxLength)); for (int i=0; i<num_fsw; i++) { if (functions[i].func==FuncPlayScript) { QString temp = functions[i].paramarm; if (!temp.isEmpty()) { scriptsSet.insert(temp); } } } } s1.report("get scripts"); CompanionIcon playIcon("play.png"); QStringList headerLabels; headerLabels << "#" << tr("Switch") << tr("Action") << tr("Parameters") << tr("Enable"); TableLayout * tableLayout = new TableLayout(this, num_fsw, headerLabels); for (int i=0; i<num_fsw; i++) { // The label QLabel * label = new QLabel(this); label->setContextMenuPolicy(Qt::CustomContextMenu); label->setMouseTracking(true); label->setProperty("index", i); if (model) label->setText(tr("SF%1").arg(i+1)); else label->setText(tr("GF%1").arg(i+1)); label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); connect(label, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(fsw_customContextMenuRequested(QPoint))); tableLayout->addWidget(i, 0, label); // s1.report("label"); // The switch fswtchSwtch[i] = new QComboBox(this); fswtchSwtch[i]->setProperty("index", i); populateSwitchCB(fswtchSwtch[i], functions[i].swtch, generalSettings, model ? SpecialFunctionsContext : GlobalFunctionsContext); fswtchSwtch[i]->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum); fswtchSwtch[i]->setMaxVisibleItems(10); connect(fswtchSwtch[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); tableLayout->addWidget(i, 1, fswtchSwtch[i]); // s1.report("switch"); // The function fswtchFunc[i] = new QComboBox(this); fswtchFunc[i]->setProperty("index", i); populateFuncCB(fswtchFunc[i], functions[i].func); connect(fswtchFunc[i], SIGNAL(currentIndexChanged(int)), this, SLOT(functionEdited())); tableLayout->addWidget(i, 2, fswtchFunc[i]); // s1.report("func"); // The parameters QHBoxLayout * paramLayout = new QHBoxLayout(); tableLayout->addLayout(i, 3, paramLayout); fswtchGVmode[i] = new QComboBox(this); fswtchGVmode[i]->setProperty("index", i); populateGVmodeCB(fswtchGVmode[i], functions[i].adjustMode); fswtchGVmode[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); connect(fswtchGVmode[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchGVmode[i]); fswtchParamGV[i] = new QCheckBox(this); fswtchParamGV[i]->setProperty("index", i); fswtchParamGV[i]->setText("GV"); fswtchParamGV[i]->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); connect(fswtchParamGV[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchParamGV[i]); fswtchParam[i] = new QDoubleSpinBox(this); fswtchParam[i]->setProperty("index", i); fswtchParam[i]->setAccelerated(true); fswtchParam[i]->setDecimals(0); connect(fswtchParam[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchParam[i]); fswtchParamTime[i] = new QTimeEdit(this); fswtchParamTime[i]->setProperty("index", i); fswtchParamTime[i]->setAccelerated(true); fswtchParamTime[i]->setDisplayFormat("hh:mm:ss"); connect(fswtchParamTime[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited())); paramLayout->addWidget(fswtchParamTime[i]); fswtchParamT[i] = new QComboBox(this); fswtchParamT[i]->setProperty("index", i); populateFuncParamCB(fswtchParamT[i], functions[i].func, functions[i].param, functions[i].adjustMode); paramLayout->addWidget(fswtchParamT[i]); fswtchParamT[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); connect(fswtchParamT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); fswtchParamArmT[i] = new QComboBox(this); fswtchParamArmT[i]->setProperty("index", i); fswtchParamArmT[i]->setEditable(true); fswtchParamArmT[i]->setSizeAdjustPolicy(QComboBox::AdjustToContents); paramLayout->addWidget(fswtchParamArmT[i]); connect(fswtchParamArmT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited())); fswtchBLcolor[i] = new QSlider(this); fswtchBLcolor[i]->setProperty("index", i); fswtchBLcolor[i]->setMinimum(0); fswtchBLcolor[i]->setMaximum(100); fswtchBLcolor[i]->setSingleStep(1); fswtchBLcolor[i]->setOrientation(Qt::Horizontal); paramLayout->addWidget(fswtchBLcolor[i]); connect(fswtchBLcolor[i], SIGNAL(sliderReleased()), this, SLOT(customFunctionEdited())); #ifdef PHONON playBT[i] = new QPushButton(this); playBT[i]->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); playBT[i]->setProperty("index", i); playBT[i]->setIcon(playIcon); paramLayout->addWidget(playBT[i]); connect(playBT[i], SIGNAL(pressed()), this, SLOT(playMusic())); #endif QHBoxLayout * repeatLayout = new QHBoxLayout(); tableLayout->addLayout(i, 4, repeatLayout); fswtchRepeat[i] = new RepeatComboBox(this, functions[i].repeatParam); repeatLayout->addWidget(fswtchRepeat[i], i+1); connect(fswtchRepeat[i], SIGNAL(modified()), this, SLOT(onChildModified())); fswtchEnable[i] = new QCheckBox(this); fswtchEnable[i]->setProperty("index", i); fswtchEnable[i]->setText(tr("ON")); fswtchEnable[i]->setFixedWidth(200); repeatLayout->addWidget(fswtchEnable[i], i+1); connect(fswtchEnable[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); } s1.report("add items"); disableMouseScrolling(); s1.report("disableMouseScrolling"); lock = false; update(); s1.report("update"); tableLayout->resizeColumnsToContents(); s1.report("resizeColumnsToContents"); tableLayout->setColumnWidth(3, 300); tableLayout->pushRowsUp(num_fsw+1); s1.report("end"); }
void Scene::activate_cutting_plane() { connect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane())); m_view_plane = true; }