void AccountInterfacePrivate::setAccount(Accounts::Account *acc) { if (!acc) { qWarning() << "AccountInterface: setAccount() called with null account! Aborting operation."; return; } if (account) { qWarning() << "AccountInterface: setAccount() called but account already set! Aborting operation."; return; } account = acc; // connect up our signals. connect(account, SIGNAL(enabledChanged(QString,bool)), this, SLOT(enabledHandler(QString,bool))); connect(account, SIGNAL(displayNameChanged(QString)), this, SLOT(displayNameChangedHandler())); connect(account, SIGNAL(synced()), this, SLOT(handleSynced())); connect(account, SIGNAL(removed()), this, SLOT(invalidate())); connect(account, SIGNAL(destroyed()), this, SLOT(invalidate())); // first time read from db. we should be in Initializing state to begin with. // QueuedConnection to ensure that clients have a chance to connect to state changed signals. QMetaObject::invokeMethod(this, "asyncQueryInfo", Qt::QueuedConnection); }
void Node::removeNode() { if(b_deleted) return; b_deleted = true; emit removed(this); p_icnDocument->appendDeleteList(this); }
void Q3LocalFs::operationRemove( Q3NetworkOperation *op ) { #ifdef QLOCALFS_DEBUG qDebug( "Q3LocalFs: operationRemove" ); #endif op->setState( StInProgress ); QString name = Q3Url( op->arg( 0 ) ).path(); bool deleted = false; dir = QDir( url()->path() ); QFileInfo fi( dir, name ); if ( fi.isDir() ) { if ( dir.rmdir( name ) ) deleted = true; } if ( deleted || dir.remove( name ) ) { op->setState( StDone ); emit removed( op ); emit finished( op ); } else { QString msg = tr( "Could not remove file or directory\n%1" ).arg( name ); op->setState( StFailed ); op->setProtocolDetail( msg ); op->setErrorCode( (int)ErrRemove ); emit finished( op ); } }
SimApp::SimApp(QWidget *parent, Qt::WFlags f) : QMainWindow(parent, f), view(0), notification(0), hasStk(false), simToolkitAvailable(false), eventList(0), failLabel(0), commandOutsideMenu(false), idleModeMsgId(-1), hasSustainedDisplayText(false) { status = new QValueSpaceObject("/Telephony/Status", this); setWindowTitle(tr("SIM Applications")); stack = new QStackedWidget(this); stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); setCentralWidget(stack); stk = new QSimToolkit( QString(), this ); iconReader = 0; connect(stk, SIGNAL(command(QSimCommand)), this, SLOT(simCommand(QSimCommand))); connect(stk, SIGNAL(beginFailed()), this, SLOT(beginFailed())); QSimInfo *simInfo = new QSimInfo(QString(), this); connect(simInfo, SIGNAL(removed()), this, SLOT(simRemoved())); #ifndef QTOPIA_TEST waitDlg = UIFactory::createDialog( "DelayedWaitDialog", this ); if ( waitDlg ) { QMetaObject::invokeMethod( waitDlg, "setText", Qt::DirectConnection, Q_ARG(QString, tr( "Waiting for response..." ) ) ); QMetaObject::invokeMethod( waitDlg, "setDelay", Qt::DirectConnection, Q_ARG(int, 500 ) ); } else {
EditWidget::EditWidget(QWidget *parent, Model * newmod ) : QStackedWidget(parent) { this->setMaximumWidth(230); this->setMinimumWidth(230); stateWidget = new StateWidget(this, newmod); this->addWidget(stateWidget);//,tr("State")); transWidget = new TransWidget(this, newmod); this->addWidget(transWidget);//, tr("Transition")); subtaskWidget = new SubtaskWidget(this, newmod); this->addWidget(subtaskWidget);//, tr("Subtasks")); this->addWidget(new QWidget()); connect(this, SIGNAL(currentChanged(int)), this, SLOT(refreshWidget(int))); connect(subtaskWidget, SIGNAL(added(QString)), (RESpecTa *)this->parentWidget(), SLOT(SubtaskAdded(QString))); connect(subtaskWidget, SIGNAL(changed(QString,QString)), (RESpecTa *)this->parentWidget(), SLOT(SubtaskChanged(QString, QString))); connect(subtaskWidget, SIGNAL(removed(QString)), (RESpecTa *)this->parentWidget(), SLOT(SubtaskRemoved(QString))); connect(subtaskWidget, SIGNAL(reportError(QString)), this, SLOT(forwardError(QString))); //connect (stateWidget, SIGNAL(InsertState(BaseState*)), (RESpecTa *)this->parentWidget(),SLOT(InsertState(BaseState*))); connect (stateWidget, SIGNAL(ReplaceState(BaseState * , BaseState * )), (RESpecTa *)this->parentWidget(),SLOT(ReplaceState(BaseState * , BaseState * ))); connect (stateWidget, SIGNAL(reportError(QString)), this, SLOT(forwardError(QString))); //connect (transWidget, SIGNAL(insertTransition(std::pair<QString,QString>)), (RESpecTa *)this->parentWidget(),SLOT(insertTransition(std::pair<QString,QString>))); connect (transWidget, SIGNAL(reportError(QString)), this, SLOT(forwardError(QString))); connect((RESpecTa *)this->parentWidget(), SIGNAL(refreshWidgets()), this, SLOT(refreshAllWidgets())); connect((RESpecTa *)this->parentWidget(), SIGNAL(SignalDeleted()), this, SLOT(SignalDeleted())); this->setCurrentIndex(3); }
bool QNetworkManagerSettingsConnection::setConnections() { if(!isValid() ) return false; bool allOk = false; if(!nmConnection.connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Updated"), this, SIGNAL(updated(QNmSettingsMap)))) { allOk = true; } else { QDBusError error = nmConnection.lastError(); } delete nmDBusHelper; nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(QString)), this,SIGNAL(removed(QString))); if (!nmConnection.connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"), nmDBusHelper, SIGNAL(slotSettingsRemoved()))) { allOk = true; } return allOk; }
CategoriesPage::CategoriesPage(Nepomuk::WebExtractorConfig* cfg, QWidget * parent): QWidget(parent), m_config(cfg), m_categoryEdited(false) { this->setupUi(this); this->query_edit_widget->hide(); this->query_prefix_edit->hide(); this->plugins_selector = new PluginSelector(this); this->verticalLayout->insertWidget(0, this->plugins_selector); m_oldDelegate = this->plugins_selector->selectedView()->itemDelegate(); m_newDelegate = new CategoryPluginItemDelegate(this->plugins_selector->selectedView(), this); this->plugins_selector->selectedView()->setItemDelegate(m_newDelegate); //this->plugins_selector->selectedListWidget()->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); connect(this->query_edit, SIGNAL(textChanged()), this, SLOT(setCategoryChanged())); connect(this->query_prefix_edit, SIGNAL(textChanged()), this, SLOT(setCategoryChanged())); connect(this->interval_spinbox, SIGNAL(valueChanged(int)), this, SLOT(setCategoryChanged())); connect(this->plugins_selector, SIGNAL(added()), this, SLOT(setCategoryChanged())); connect(this->plugins_selector, SIGNAL(removed()), this, SLOT(setCategoryChanged())); connect(this->plugins_selector, SIGNAL(movedUp()), this, SLOT(setCategoryChanged())); connect(this->plugins_selector, SIGNAL(movedDown()), this, SLOT(setCategoryChanged())); connect(enabled_categories_listwidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), SLOT(switchCategory(QListWidgetItem*, QListWidgetItem*))); connect(Nepomuk::CategoriesPool::self(), SIGNAL(categoriesChanged()), this, SLOT(reloadAvailableCategoriesList())); // Initialize machine m_machine = new QStateMachine(); s1 = new QState(); s2 = new QState(); s3 = new QState(); s1->addTransition(manageButton, SIGNAL(clicked()), s2); s2->addTransition(returnButton, SIGNAL(clicked()), s1); m_machine->addState(s1); m_machine->addState(s2); m_machine->setInitialState(s1); connect(s1, SIGNAL(entered()), this, SLOT(reloadEnabledCategoriesList())); connect(s2, SIGNAL(exited()), this, SLOT(syncEnabledCategoriesList())); s1->assignProperty(stackedWidget, "currentIndex", 0); s2->assignProperty(stackedWidget, "currentIndex", 1); // Initialize validator m_catvalidator = new CategoryNameValidator(this); // Inilialize buttons this->add_button->setGuiItem(KStandardGuiItem::add()); this->add_button->setText(QString()); this->remove_button->setGuiItem(KStandardGuiItem::remove()); this->remove_button->setText(QString()); connect(this->add_button, SIGNAL(clicked()), this, SLOT(addButton())); // no need to query endless numbers of results when we only want to create a query Nepomuk::Query::Query baseQuery; baseQuery.setLimit(10); queryBuilder->setBaseQuery(baseQuery); }
int QwtPicker::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: activated((*reinterpret_cast< bool(*)>(_a[1]))); break; case 1: selected((*reinterpret_cast< const QPolygon(*)>(_a[1]))); break; case 2: appended((*reinterpret_cast< const QPoint(*)>(_a[1]))); break; case 3: moved((*reinterpret_cast< const QPoint(*)>(_a[1]))); break; case 4: removed((*reinterpret_cast< const QPoint(*)>(_a[1]))); break; case 5: changed((*reinterpret_cast< const QPolygon(*)>(_a[1]))); break; case 6: setEnabled((*reinterpret_cast< bool(*)>(_a[1]))); break; default: ; } _id -= 7; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< bool*>(_v) = isEnabled(); break; case 1: *reinterpret_cast< ResizeMode*>(_v) = resizeMode(); break; case 2: *reinterpret_cast< DisplayMode*>(_v) = trackerMode(); break; case 3: *reinterpret_cast< QPen*>(_v) = trackerPen(); break; case 4: *reinterpret_cast< QFont*>(_v) = trackerFont(); break; case 5: *reinterpret_cast< RubberBand*>(_v) = rubberBand(); break; case 6: *reinterpret_cast< QPen*>(_v) = rubberBandPen(); break; } _id -= 7; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setEnabled(*reinterpret_cast< bool*>(_v)); break; case 1: setResizeMode(*reinterpret_cast< ResizeMode*>(_v)); break; case 2: setTrackerMode(*reinterpret_cast< DisplayMode*>(_v)); break; case 3: setTrackerPen(*reinterpret_cast< QPen*>(_v)); break; case 4: setTrackerFont(*reinterpret_cast< QFont*>(_v)); break; case 5: setRubberBand(*reinterpret_cast< RubberBand*>(_v)); break; case 6: setRubberBandPen(*reinterpret_cast< QPen*>(_v)); break; } _id -= 7; } else if (_c == QMetaObject::ResetProperty) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 7; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 7; } #endif // QT_NO_PROPERTIES return _id; }
void MainWindow::addField() { FieldForm * fieldForm = new FieldForm(this); fieldForms << fieldForm; connect(fieldForm, SIGNAL(removed()), this, SLOT(removeField())); fieldsLayout->addWidget(fieldForm); fieldForm->show(); }
EditStringListWrapper::EditStringListWrapper(const QString &objectName, KEditListBox *parent) : QObject(parent), parent(parent) { setObjectName(objectName); connect(parent, SIGNAL(added(QString)), this, SLOT(stringListChanged())); connect(parent, SIGNAL(removed(QString)), this, SLOT(stringListChanged())); connect(parent, SIGNAL(changed()), this, SLOT(stringListChanged())); }
void SamplingItem::revive(void) { if (removed()) { setRemoved(false); my.curve->attach(my.chart); } }
void Echo::SimpleChat::disconnect (boost::shared_ptr<Ekiga::ChatObserver> observer) { observers.remove (observer); if (observers.empty ()) removed (); }
void Opal::Presentity::remove () { xmlUnlinkNode (node); xmlFreeNode (node); trigger_saving (); removed (this->shared_from_this ()); }
void CValuables::remove(const hacc::TIDList & idList) { HACC_DB->exec("delete from valuables where id in (" + tools::convert::idListToString(idList) + ")"); foreach(hacc::TDBID id, idList) { //! \todo проследить, чтобы удалились перемещения detachTags(id); emit removed(id); }
bool User::can_change_right(AdminRights r, const UserPtr& who) const { if (!who || who->removed() || removed()) { return false; } if (who != self() && has_permission(SUPER_RIGHTS_CHANGER)) { return false; } return who->has_permission(SUPER_RIGHTS_CHANGER); }
void Opal::Presentity::remove () { xmlUnlinkNode (node); xmlFreeNode (node); trigger_saving (); removed (); }
void Plugin::remove() { if (!d->removed) { d->removed = !QFile::exists(absolutePath()) || QFile::remove(absolutePath()); if (d->removed) { emit removed(); } } }
void ViBufferStream::remove(qint64 position, int length) { QMutexLocker streamLocker(&mStreamMutex); if(mBuffer->remove(position, length)) { streamLocker.unlock(); removed(position, length); } }
//------------------------------------------------------------------------------------------------- void BachKeywordView::enableCallbacks() { if ( m_CallbacksEnabled ) return; connect( BachKeyword::table(), SIGNAL( updated( Record, Record ) ), mKeywordsModel, SLOT( updated( Record ) ) ); connect( BachKeywordMap::table(), SIGNAL( added( RecordList ) ), SLOT( refresh() ) ); connect( BachKeywordMap::table(), SIGNAL( removed( RecordList ) ), SLOT( refresh() ) ); m_CallbacksEnabled = true; }
void OPENLDAP::Book::remove () { xmlUnlinkNode (node); xmlFreeNode (node); trigger_saving (); removed (this->shared_from_this ()); }
void TagWidget::mouseReleaseEvent(QMouseEvent* event) { if(event->button() == Qt::LeftButton) { if(isButtonHovered_) { emit removed(name_); } else { int action = action_; action ^= true; action_ = static_cast<TagFilter::Action>(action); update(); emit changed(name_, action_); } } else if(event->button() == Qt::MiddleButton) { emit removed(name_); } }
bool PopupMenuEditor::qt_emit( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: inserted((QAction*)static_QUType_ptr.get(_o+1)); break; case 1: removed((QAction*)static_QUType_ptr.get(_o+1)); break; default: return QWidget::qt_emit(_id,_o); } return TRUE; }
uint32_t IntegerAttribute::clearDoc(DocId doc) { uint32_t removed(0); if (hasMultiValue() && (doc < getNumDocs())) { removed = getValueCount(doc); } AttributeVector::clearDoc(_changes, doc); return removed; }
Wt::WString User::safe_username() const { if (removed() && (!tApp->user() || !tApp->user()->has_permission(USER_REMOVER))) { return Wt::WString::tr("tc.user.Removed_message"); } else { std::string name = Wt::Utils::htmlEncode(username20()).toUTF8(); boost::replace_all(name, " ", " "); return Wt::WString::fromUTF8(name); } }
//------------------------------------------------------------------------------------------------- void BachKeywordView::disableCallbacks() { if ( !m_CallbacksEnabled ) return; disconnect( BachKeyword::table(), SIGNAL( updated( Record, Record ) ), mKeywordsModel, SLOT( updated( Record ) ) ); disconnect( BachKeywordMap::table(), SIGNAL( added( RecordList ) ), NULL, SLOT( refresh() ) ); disconnect( BachKeywordMap::table(), SIGNAL( removed( RecordList ) ), NULL, SLOT( refresh() ) ); m_CallbacksEnabled = false; }
void TracingItem::redraw(void) { if (removed() == false) { // point curve update by legend check, but not the rest: my.dropCurve->setVisible(hidden() == false); my.spanCurve->setVisible(hidden() == false); my.selectionCurve->setVisible(hidden() == false); } }
Task::Task(const QString& id, Project* parent) : Model(parent) { initialize<Task, TaskAdaptor>(id); setProjectId(parent->id()); foreach (const QString& eventId, eventIds()) { Event* e = new Event(eventId, this); connect (e, SIGNAL(removed()), SIGNAL(eventIdsChanged())); }
void LM::Account::remove () { disable (); xmlUnlinkNode (node); xmlFreeNode (node); trigger_saving (); removed (); }
void TracingItem::revive(void) { if (removed()) { setRemoved(false); my.dropCurve->attach(my.chart); my.spanCurve->attach(my.chart); my.pointCurve->attach(my.chart); my.selectionCurve->attach(my.chart); } }
void Item::removeItem() { if (b_deleted) return; b_deleted = true; hide(); setCanvas(0l); emit removed(this); p_itemDocument->appendDeleteList(this); }