void Camera::c_setName(const QString& name) { if (name == m_name) return; m_name = name; if (m_state == CAMERA_INIT) { startPreview(); } emit nameChanged(m_name); }
/*! \qmlproperty string Plugin::name \since Mobility 1.2 This property holds the name of the plugin. */ void QDeclarativeGeoServiceProvider::setName(const QString &name) { if (name_ == name) return; name_ = name; emit nameChanged(name_); }
void YaContactLabel::setProfile(const YaProfile* profile) { if (profile_ != profile) { profile_ = (YaProfile*)profile; if (profile_) connect(profile_, SIGNAL(nameChanged()), SLOT(update())); update(); } }
void RoomCLEntry::handleBookmarks (const QXmppBookmarkSet& set) { for (const auto& bm : set.conferences ()) if (bm.jid () == RH_->GetRoomJID () && !bm.name ().isEmpty ()) { emit nameChanged (bm.name ()); break; } }
SoilTypeOutput::SoilTypeOutput(SoilType* soilType, OutputCatalog* catalog) : QObject(soilType), m_soilType(soilType), m_enabled(false) { m_modulus = new NonlinearPropertyOutput(soilType->modulusModel(), catalog); m_modulus->setSoilName(soilType->name()); connect(m_soilType, SIGNAL(nameChanged(QString)), m_modulus, SLOT(setSoilName(QString))); connect(m_soilType, SIGNAL(modulusModelChanged(NonlinearProperty*)), m_modulus, SLOT(setNonlinearProperty(NonlinearProperty*))); m_damping = new NonlinearPropertyOutput(soilType->dampingModel(), catalog); m_damping->setSoilName(soilType->name()); connect(m_soilType, SIGNAL(nameChanged(QString)), m_damping, SLOT(setSoilName(QString))); connect(m_soilType, SIGNAL(dampingModelChanged(NonlinearProperty*)), m_damping, SLOT(setNonlinearProperty(NonlinearProperty*))); }
/* * Path is not saved in linux without installer - added workspace to properties dialog. */ NewProject::NewProject(QWidget *parent) : QDialog(parent) { mypath = getCurrentPath(); path = new QLineEdit(mypath,this); path->setToolTip(tr("Directory for new project.")); QPushButton *btnBrowsePath = new QPushButton(this); btnBrowsePath->setText(tr("Browse")); name = new QLineEdit(this); name->setToolTip(tr("New project name and sub-directory.")); connect(name,SIGNAL(textChanged(QString)),this,SLOT(nameChanged())); path->setText(mypath+name->text()); QLabel *pathLabel = new QLabel(tr("Workspace")); QLabel *nameLabel = new QLabel(tr("Project Name")); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); connect(btnBrowsePath, SIGNAL(clicked()), this, SLOT(browsePath())); connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); okButton = (QPushButton*) buttonBox->buttons().at(0); cancelButton = (QPushButton*) buttonBox->buttons().at(1); if(okButton->text().contains("cancel",Qt::CaseInsensitive)) { okButton = (QPushButton*) buttonBox->buttons().at(1); cancelButton = (QPushButton*) buttonBox->buttons().at(1); } QLabel *create = new QLabel(this); create->setText(tr("Creating a new project:")); create->setFont(QFont(this->font().family(),this->font().pointSize()*1.5,QFont::Bold)); QLabel *inst = new QLabel(this); inst->setText(tr(" 1) Choose project workspace.\n 2) Set project name.\n\n" \ "A project folder with project name will be created in the workspace.\n" \ "The new folder will have a main .c file and a .side project file.\n")); QVBoxLayout *blay = new QVBoxLayout(this); QGridLayout *layout = new QGridLayout(); layout->addWidget(path,0,1,1,1); // tab order for widgets is according to add order layout->addWidget(name,1,1,1,1); layout->addWidget(btnBrowsePath,0,2,1,1); layout->addWidget(nameLabel,1,0,1,1); layout->addWidget(pathLabel,0,0,1,1); blay->addWidget(create); blay->addWidget(inst); blay->addLayout(layout); blay->addWidget(new QLabel(this)); blay->addWidget(buttonBox); setLayout(blay); buttonBox->setFocus(); int fontSize = path->fontInfo().pixelSize(); setMinimumWidth(mypath.length()*fontSize+100); setWindowFlags(Qt::Tool); }
int PlayerListModel::addPlayer(Player *player) { int index = m_playerList.count(); beginInsertRows(QModelIndex(), index, index); m_playerList.append(player); endInsertRows(); connect(player, SIGNAL(nameChanged(QString,QString)), SLOT(player_nameChanged(QString,QString))); return index; }
void PriceList::setName(const QString &value) { if( m_d->name != value ){ m_d->name = value; emit nameChanged( m_d->name ); if( m_parentItem ){ m_parentItem->setDataChanged( 0, this ); } } }
void VContact::setContactName(const QString& name) { Q_D(VContact); if (d->name != name) { QString previous = d->name; d->name = name; emit nameChanged(name, previous); } }
void FoursquareItem::setName(const QString& name) { if( name != m_name ) { m_name = name; QFontMetrics const fontMetrics( s_font ); setSize( QSizeF( fontMetrics.width( m_name ) + 10, fontMetrics.height() + 10 ) ); emit nameChanged(); } }
QString CDoodUserDataManage::setName(const QString &data) { if(mName == data) { return data; } mName = data; emit nameChanged(); return mName; }
void JContact::setContactName(const QString &name) { Q_D(JContact); if (d->name == name) return; QString previous = d->name; d->name = name; emit nameChanged(name, previous); }
void IQGameObject::setName(const QString &name) { if (_name != name) { _name = name; emit nameChanged(); } }
void Function::setName(const QString& name) { if (m_name == name) return; m_name = QString(name); emit nameChanged(m_id); }
void InstrumentTrackWindow::modelChanged() { m_track = castModel<InstrumentTrack>(); m_nameLineEdit->setText( m_track->name() ); m_track->disconnect( SIGNAL( nameChanged() ), this ); m_track->disconnect( SIGNAL( instrumentChanged() ), this ); connect( m_track, SIGNAL( nameChanged() ), this, SLOT( updateName() ) ); connect( m_track, SIGNAL( instrumentChanged() ), this, SLOT( updateInstrumentView() ) ); m_volumeKnob->setModel( &m_track->m_volumeModel ); m_panningKnob->setModel( &m_track->m_panningModel ); m_effectChannelNumber->setModel( &m_track->m_effectChannelModel ); m_pianoView->setModel( &m_track->m_piano ); if( m_track->instrument() && m_track->instrument()->flags().testFlag( Instrument::IsNotBendable ) == false ) { m_pitchKnob->setModel( &m_track->m_pitchModel ); m_pitchRangeSpinBox->setModel( &m_track->m_pitchRangeModel ); m_pitchKnob->show(); m_pitchLabel->show(); m_pitchRangeSpinBox->show(); m_pitchRangeLabel->show(); } else { m_pitchKnob->hide(); m_pitchLabel->hide(); m_pitchKnob->setModel( NULL ); m_pitchRangeSpinBox->hide(); m_pitchRangeLabel->hide(); } m_ssView->setModel( &m_track->m_soundShaping ); m_noteStackingView->setModel( &m_track->m_noteStacking ); m_arpeggioView->setModel( &m_track->m_arpeggio ); m_midiView->setModel( &m_track->m_midiPort ); m_effectView->setModel( m_track->m_audioPort.effects() ); updateName(); }
/* delete Input if it ever existed. Delete the callbacls on input p_input is released once here */ void InputManager::delInput() { if( !p_input ) return; msg_Dbg( p_intf, "IM: Deleting the input" ); /* Save time / position */ float f_pos = var_GetFloat( p_input , "position" ); int64_t i_time = var_GetTime( p_input, "time"); int i_length = var_GetTime( p_input , "length" ) / CLOCK_FREQ; if( f_pos < 0.05 || f_pos > 0.95 || i_length < 60) { i_time = -1; } RecentsMRL::getInstance( p_intf )->setTime( p_item->psz_uri, i_time ); delCallbacks(); i_old_playing_status = END_S; p_item = NULL; oldName = ""; artUrl = ""; b_video = false; timeA = 0; timeB = 0; f_rate = 0. ; if( p_input_vbi ) { vlc_object_release( p_input_vbi ); p_input_vbi = NULL; } vlc_object_release( p_input ); p_input = NULL; emit positionUpdated( -1.0, 0 ,0 ); emit rateChanged( var_InheritFloat( p_intf, "rate" ) ); emit nameChanged( "" ); emit chapterChanged( 0 ); emit titleChanged( 0 ); emit playingStatusChanged( END_S ); emit teletextPossible( false ); emit AtoBchanged( false, false ); emit voutChanged( false ); emit voutListChanged( NULL, 0 ); /* Reset all InfoPanels but stats */ emit artChanged( NULL ); emit artChanged( "" ); emit infoChanged( NULL ); emit currentMetaChanged( (input_item_t *)NULL ); emit encryptionChanged( false ); emit recordingStateChanged( false ); emit cachingChanged( 1 ); }
QgsNewNameDialog::QgsNewNameDialog( const QString &source, const QString &initial, const QStringList &extensions, const QStringList &existing, const QRegExp ®exp, Qt::CaseSensitivity cs, QWidget *parent, Qt::WindowFlags flags ) : QgsDialog( parent, flags, QDialogButtonBox::Ok | QDialogButtonBox::Cancel ) , mExiting( existing ) , mExtensions( extensions ) , mCaseSensitivity( cs ) , mRegexp( regexp ) { setWindowTitle( tr( "New Name" ) ); QgsDialog::layout()->setSizeConstraint( QLayout::SetMinimumSize ); layout()->setSizeConstraint( QLayout::SetMinimumSize ); layout()->setSpacing( 6 ); mOkString = buttonBox()->button( QDialogButtonBox::Ok )->text(); QString hintString; QString nameDesc = mExtensions.isEmpty() ? tr( "name" ) : tr( "base name" ); if ( source.isEmpty() ) { hintString = tr( "Enter new %1" ).arg( nameDesc ); } else { hintString = tr( "Enter new %1 for %2" ).arg( nameDesc, source ); } mHintLabel = new QLabel( hintString, this ); layout()->addWidget( mHintLabel ); mLineEdit = new QLineEdit( initial, this ); if ( !regexp.isEmpty() ) { QRegExpValidator *validator = new QRegExpValidator( regexp, this ); mLineEdit->setValidator( validator ); } mLineEdit->setMinimumWidth( mLineEdit->fontMetrics().width( QStringLiteral( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ) ) ); connect( mLineEdit, &QLineEdit::textChanged, this, &QgsNewNameDialog::nameChanged ); layout()->addWidget( mLineEdit ); mNamesLabel = new QLabel( QStringLiteral( " " ), this ); mNamesLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); if ( !mExtensions.isEmpty() ) { mNamesLabel->setWordWrap( true ); layout()->addWidget( mNamesLabel ); } mErrorLabel = new QLabel( QStringLiteral( " " ), this ); mErrorLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); mErrorLabel->setWordWrap( true ); layout()->addWidget( mErrorLabel ); mLineEdit->setFocus(); mLineEdit->selectAll(); nameChanged(); }
void testQOfonoVoiceCall() { QSignalSpy dialreg(m,SIGNAL(dialComplete(bool))); QSignalSpy dspy(m, SIGNAL(callAdded(QString))); // Dial and hangup m->dial("123",""); QTest::qWait(1000); QCOMPARE(dialreg.count(), 1); QCOMPARE(dialreg.takeFirst().at(0).toBool(),true); QCOMPARE(dspy.count(), 1); QString callid = dspy.takeFirst().at(0).toString(); QOfonoVoiceCall* call = new QOfonoVoiceCall(this); call->setVoiceCallPath(callid); QTRY_VERIFY(call->isValid()); QSignalSpy state(call, SIGNAL(stateChanged(QString))); QSignalSpy discreason(call,SIGNAL(disconnectReason(QString))); QSignalSpy hspy(call, SIGNAL(hangupComplete(bool))); QSignalSpy li (call, SIGNAL(lineIdentificationChanged(QString))); QSignalSpy name (call, SIGNAL(nameChanged(QString))); QSignalSpy info (call, SIGNAL(informationChanged(QString))); QSignalSpy mp (call, SIGNAL(multipartyChanged(bool))); QSignalSpy em (call, SIGNAL(emergencyChanged(bool))); QSignalSpy st (call, SIGNAL(startTimeChanged(QString))); QSignalSpy ic (call, SIGNAL(iconChanged(quint8))); qDebug() << "Please find a call in 'Dialing' state in phonesim window and press 'Active' button"; QTest::qWait(15000); QVERIFY(state.count()>0); QVERIFY(st.count()>0); QVERIFY(ic.count()==0); QVERIFY(em.count()==0); QVERIFY(mp.count()==0); QVERIFY(info.count()==0); QVERIFY(name.count()==0); QVERIFY(li.count()==0); QCOMPARE(call->state(),QString("active")); QCOMPARE(call->lineIdentification(),QString("123")); QCOMPARE(call->emergency(),false); QCOMPARE(call->multiparty(),false); QCOMPARE(call->name(),QString("")); QCOMPARE(call->information(),QString("")); call->hangup(); QTest::qWait(5000); QCOMPARE(hspy.count(), 1); QCOMPARE(hspy.takeFirst().at(0).toBool(),true); QCOMPARE(discreason.count(), 1); QCOMPARE(discreason.takeFirst().at(0).toString(), QString("local")); delete call; }
Editor::Editor(QWidget *parent) : QWidget(parent) , _view(NULL) , _buttonBar(NULL) , _xmlPreview(NULL) , _assembly(NULL) , _viewController(NULL) , _editorController(NULL) , _buttonBarController(NULL) { qRegisterMetaType<ItemMove>("ItemMove"); qRegisterMetaType<ItemsMove>("ItemsMove"); // Widgets _view = new GraphicsView; _buttonBar = new ButtonBar; _buttonBar->setEnabled(false); _xmlPreview = new QTextEdit; _xmlPreview->setReadOnly(true); QVBoxLayout* vLyt = new QVBoxLayout(this); vLyt->setMargin(0); vLyt->setSpacing(1); vLyt->addWidget(_view, 4); vLyt->addWidget(_buttonBar); vLyt->addWidget(_xmlPreview, 1); // Controllers _viewController = new ViewController(_view, this); _buttonBarController = new ButtonBarController(_buttonBar, this); connect(_viewController, SIGNAL(selectionChanged(int)), _buttonBarController, SLOT(onSelectionChanged(int))); _editorController = new EditorController(this); connect(_viewController, SIGNAL(elementsMoved(ItemsMove)), _editorController, SLOT(onElementsMoved(ItemsMove))); connect(_buttonBarController, SIGNAL(actionTriggered(int,Action)), _editorController, SLOT(onAction(int,Action))); connect(_buttonBarController, SIGNAL(actionValueTriggered(int,Action,qreal)), _editorController, SLOT(onActionValue(int,Action,qreal))); connect(_buttonBarController, SIGNAL(nameChanged(QString)), _editorController, SLOT(onNameEdited(QString))); QAction* redoAction = _editorController->undoStack()->createRedoAction(this); redoAction->setShortcut(QKeySequence::Redo); redoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); this->addAction(redoAction); QAction* undoAction = _editorController->undoStack()->createUndoAction(this); undoAction->setShortcut(QKeySequence::Undo); undoAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); this->addAction(undoAction); }
void TourDuMondeDocument::setName(const QString &name) { if (m_name == name) { return; } m_name = name; emit nameChanged(name); }
// --- Events ---------------------------------------------------- // void MoleculeWatcher::moleculeChanged(const Molecule *molecule, Molecule::ChangeType changeType) { switch(changeType){ case Molecule::NameChanged: Q_EMIT nameChanged(molecule); break; default: break; } }
void NetSignal::setName(const CircuitIdentifier& name, bool isAutoName) noexcept { if ((name == mName) && (isAutoName == mHasAutoName)) { return; } mName = name; mHasAutoName = isAutoName; updateErcMessages(); emit nameChanged(mName); }
void CoverConnector::setName(const QString &nName) { if (nName != m_name) { m_name = nName; #ifdef QT_DEBUG qDebug() << "Changed name to" << m_name; #endif emit nameChanged(name()); } }
void TechnologyModel::setName(const QString &name) { if (m_techname == name || name.isEmpty()) { return; } m_techname = name; Q_EMIT nameChanged(m_techname); updateTechnologies(); }
AbstractXmlItemObject * FilesModel::newItem() { File *newItem = new File(this); connect(newItem, SIGNAL(idChanged()), this, SLOT(itemDataChanged())); connect(newItem, SIGNAL(additionalDataChanged()), this, SLOT(itemDataChanged())); connect(newItem, SIGNAL(pathChanged()), this, SLOT(itemDataChanged())); connect(newItem, SIGNAL(nameChanged()), this, SLOT(itemDataChanged())); return newItem; }
void SingleRole::setName(const QString& name) { if (m_name == name) return; Q_EMIT namesAboutToBeChanged(); m_name = name; Q_EMIT nameChanged(); Q_EMIT namesChanged(); }
void Container::setName(QString n) { if(n != name()) { _items[this] = n; if(_acums.contains(this)) _acums[this] = n; emit nameChanged(this); } }
AbstractXmlItemObject * FoldersModel::newItem() { Folder *newItem = new Folder(this); connect(newItem, SIGNAL(idChanged()), this, SLOT(itemDataChanged())); connect(newItem, SIGNAL(additionalDataChanged()), this, SLOT(itemDataChanged())); connect(newItem, SIGNAL(nameChanged()), this, SLOT(itemDataChanged())); newItem->filesModel()->setItemAdditionalData(m_fileAdditionalData); return newItem; }
void QDeclarativeFontLoader::setName(const QString &name) { Q_D(QDeclarativeFontLoader); if (d->name == name ) return; d->name = name; emit nameChanged(); d->status = Ready; emit statusChanged(); }
void Tag::setName(const QString &name) { Q_ASSERT(!m_isFake); if (name.trimmed().toLower() != m_name.toLower() && !name.isEmpty()) { m_name = name.trimmed(); // We preserve original case if (!m_dontUpdateRevision) m_revision++; emit nameChanged(); } }