void PropertiesDock::addProperty() { QInputDialog *dialog = new QInputDialog(mPropertyBrowser); dialog->setInputMode(QInputDialog::TextInput); dialog->setLabelText(tr("Name:")); dialog->setWindowTitle(tr("Add Property")); dialog->open(this, SLOT(addProperty(QString))); }
void FontSettingsPage::openCopyColorSchemeDialog() { QInputDialog *dialog = new QInputDialog(d_ptr->m_ui->copyButton->window()); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setInputMode(QInputDialog::TextInput); dialog->setWindowTitle(tr("Copy Color Scheme")); dialog->setLabelText(tr("Color scheme name:")); dialog->setTextValue(tr("%1 (copy)").arg(d_ptr->m_value.colorScheme().displayName())); connect(dialog, &QInputDialog::textValueSelected, this, &FontSettingsPage::copyColorScheme); dialog->open(); }
void ObjectTypesEditor::renameProperty() { QtBrowserItem *item = mUi->propertiesView->currentItem(); if (!item) return; const QString oldName = item->property()->propertyName(); QInputDialog *dialog = new QInputDialog(mUi->propertiesView); dialog->setInputMode(QInputDialog::TextInput); dialog->setLabelText(tr("Name:")); dialog->setTextValue(oldName); dialog->setWindowTitle(tr("Rename Property")); dialog->open(this, SLOT(renamePropertyTo(QString))); }
void PropertiesDock::renameProperty() { QtBrowserItem *item = mPropertyBrowser->currentItem(); if (!mPropertyBrowser->isCustomPropertyItem(item)) return; const QString oldName = item->property()->propertyName(); QInputDialog *dialog = new QInputDialog(mPropertyBrowser); dialog->setInputMode(QInputDialog::TextInput); dialog->setLabelText(tr("Name:")); dialog->setTextValue(oldName); dialog->setWindowTitle(tr("Rename Property")); dialog->open(this, SLOT(renamePropertyTo(QString))); }
void FolderWizardTargetPage::slotAddRemoteFolder() { QTreeWidgetItem *current = _ui.folderTreeWidget->currentItem(); QString parent('/'); if (current) { parent = current->data(0, Qt::UserRole).toString(); } QInputDialog *dlg = new QInputDialog(this); dlg->setWindowTitle(tr("Add Remote Folder")); dlg->setLabelText(tr("Enter the name of the new folder:")); dlg->setTextValue(parent); dlg->open(this, SLOT(slotCreateRemoteFolder(QString))); dlg->setAttribute(Qt::WA_DeleteOnClose); }