QWidgetWindow::QWidgetWindow(QWidget *widget) : QWindow(*new QWidgetWindowPrivate(), 0) , m_widget(widget) { updateObjectName(); connect(m_widget, &QObject::objectNameChanged, this, &QWidgetWindow::updateObjectName); }
void SceneObject::setItem(const shared_ptr<Item> &item) { if (_item) _item.reset(); _item = item; connect(this, SIGNAL(objectNameChanged(QString)), item.get(), SLOT(updateObjectName(QString))); }
HashLineEdit::HashLineEdit(const QString &text, bool defaultValue, QWidget *parent) : QLineEdit(text, parent) { connect(this, SIGNAL(editingFinished()), parent, SLOT(lineEditChanged())); m_firstText = text; m_isDefaultValue = defaultValue; if(defaultValue) { setStyleSheet("font-style: italic;"); connect(this,SIGNAL(textChanged(QString)),this,SLOT(updateObjectName())); } else { setStyleSheet("font-style: normal;"); } }
QWidgetWindow::QWidgetWindow(QWidget *widget) : QWindow(*new QWidgetWindowPrivate(), 0) , m_widget(widget) { updateObjectName(); // Enable QOpenGLWidget/QQuickWidget children if the platform plugin supports it, // and the application developer has not explicitly disabled it. if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::RasterGLSurface) && !QApplication::testAttribute(Qt::AA_ForceRasterWidgets)) { setSurfaceType(QSurface::RasterGLSurface); } connect(m_widget, &QObject::objectNameChanged, this, &QWidgetWindow::updateObjectName); connect(this, SIGNAL(screenChanged(QScreen*)), this, SLOT(repaintWindow())); }
IrcUser::IrcUser(const QString &hostmask, Network *network) : SyncableObject(network), _initialized(false), _nick(nickFromMask(hostmask)), _user(userFromMask(hostmask)), _host(hostFromMask(hostmask)), _realName(), _awayMessage(), _away(false), _server(), // _idleTime(QDateTime::currentDateTime()), _ircOperator(), _lastAwayMessage(0), _whoisServiceReply(), _network(network), _codecForEncoding(0), _codecForDecoding(0) { updateObjectName(); }
void EList::mouseDoubleClickEvent(QMouseEvent *){ if(0 < rowCount() && 0 == column(selectedItems().first())){ int index = selectedItems().first()->row(); QString oldName = selectedItems().first()->text(); QString newName = QInputDialog::getText(this, tr("Umbenennen"), tr("Name der Ebene:"), QLineEdit::Normal, oldName, 0); if(!newName.isEmpty()){ //name has to be unique for(int i = 0; rowCount() > i; ++i) if(item(i, 0)->text() == newName) return; item(index, 0)->setText(newName); emit updateObjectName(newName); } } }
ModelValidationWidget::ModelValidationWidget(QWidget *parent): QWidget(parent) { try { vector<QString> vers; setupUi(this); this->setModel(nullptr); swapobjectsids_wgt=nullptr; swapobjectsids_wgt=new SwapObjectsIdsWidget(this); SchemaParser::getPgSQLVersions(vers); version_cmb->addItem(trUtf8("Autodetect")); while(!vers.empty()) { version_cmb->addItem(vers.back()); vers.pop_back(); } options_frm->setVisible(false); curr_step=0; validation_thread=new QThread(this); validation_helper.moveToThread(validation_thread); connect(&validation_helper, SIGNAL(s_validationInfoGenerated(ValidationInfo)), this, SLOT(updateValidation(ValidationInfo))); connect(&validation_helper, SIGNAL(s_progressUpdated(int,QString,ObjectType)), this, SLOT(updateProgress(int,QString,ObjectType))); connect(&validation_helper, SIGNAL(s_objectProcessed(QString,ObjectType)), this, SLOT(updateObjectName(QString,ObjectType))); connect(hide_tb, SIGNAL(clicked(void)), this, SLOT(hide(void))); connect(clear_btn, SIGNAL(clicked(void)), this, SLOT(clearOutput(void))); connect(options_btn, SIGNAL(toggled(bool)), options_frm, SLOT(setVisible(bool))); connect(sql_validation_chk, SIGNAL(toggled(bool)), connections_cmb, SLOT(setEnabled(bool))); connect(sql_validation_chk, SIGNAL(toggled(bool)), version_cmb, SLOT(setEnabled(bool))); connect(version_cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(configureValidation(void))); connect(connections_cmb, SIGNAL(currentIndexChanged(int)), this, SLOT(configureValidation(void))); connect(sql_validation_chk, SIGNAL(toggled(bool)), this, SLOT(configureValidation(void))); connect(validation_thread, SIGNAL(started(void)), &validation_helper, SLOT(validateModel(void))); connect(validate_btn, SIGNAL(clicked(void)), this, SLOT(validateModel(void))); connect(validation_thread, SIGNAL(started(void)), &validation_helper, SLOT(applyFixes(void))); connect(fix_btn, SIGNAL(clicked(void)), this, SLOT(applyFixes(void))); connect(&validation_helper, SIGNAL(s_validationFinished(void)), this, SLOT(reenableValidation(void))); connect(&validation_helper, SIGNAL(s_validationCanceled(void)), this, SLOT(reenableValidation(void))); connect(&validation_helper, SIGNAL(s_sqlValidationStarted(bool)), options_btn, SLOT(setDisabled(bool))); connect(&validation_helper, SIGNAL(s_sqlValidationStarted(bool)), clear_btn, SLOT(setDisabled(bool))); connect(&validation_helper, SIGNAL(s_sqlValidationStarted(bool)), options_frm, SLOT(setDisabled(bool))); connect(&validation_helper, SIGNAL(s_fixApplied(void)), this, SLOT(clearOutput(void))); connect(&validation_helper, SIGNAL(s_fixApplied(void)), prog_info_wgt, SLOT(show(void))); connect(cancel_btn, SIGNAL(clicked(void)), this, SLOT(cancelValidation(void))); connect(swap_ids_btn, SIGNAL(clicked(void)), this, SLOT(swapObjectsIds(void))); } catch(Exception &e) { throw Exception(e.getErrorMessage(),e.getErrorType(),__PRETTY_FUNCTION__,__FILE__,__LINE__, &e); } }