QtnPropertySetAllPropertyTypes::~QtnPropertySetAllPropertyTypes() { _b = false; disconnectSlots(); }
//============================================================================= // Clear all controls. //============================================================================= void CCommunication::clearControls() { unsigned int row; disconnectSlots(); for (row = 0; row < mLine.count(); row++) mLine.at(row)->clear(); mIDs.clear(); connectSlots(); }
void Note::setText(const QString & text, bool check) { // disconnect the signal so it doesn't fire recursively disconnectSlots(); QString oldText = text; m_graphicsTextItem->document()->setHtml(text); connectSlots(); if (check) { QSizeF newSize; checkSize(newSize); forceFormat(0, m_graphicsTextItem->document()->characterCount()); } }
/*! Disables or enables auto-update feature of the model \param autoUpdate (HsMenuAutoUpdate) */ void CaItemModelPrivate::setAutoUpdate(bool autoUpdate) { CACLIENTTEST_FUNC_ENTRY("CaItemModelPrivate::setAutoUpdate"); if (autoUpdate) { if (!mNotifier) { CaNotifierFilter filter(mQuery); mNotifier = mService->createNotifier(filter); connectSlots(); } } else { disconnectSlots(); delete mNotifier; mNotifier = NULL; } CACLIENTTEST_FUNC_EXIT("CaItemModelPrivate::setAutoUpdate"); }
//============================================================================= // Clear all controls. //============================================================================= void CAddress::clearControls() { unsigned int row; disconnectSlots(); for (row = 0; row < mAddress.count(); row++) { mAddress.at(row)->clear(); mAddress.at(row)->setToolTip (""); } mIDs.clear(); connectSlots(); }
void Note::forceFormat(int position, int charsAdded) { disconnectSlots(); QTextCursor textCursor = m_graphicsTextItem->textCursor(); QTextCharFormat f; QFont font("Droid Sans", 9, QFont::Normal); f.setFont(font); f.setFontFamily("Droid Sans"); f.setFontPointSize(9); int cc = m_graphicsTextItem->document()->characterCount(); textCursor.setPosition(position, QTextCursor::MoveAnchor); if (position + charsAdded >= cc) { charsAdded--; } textCursor.setPosition(position + charsAdded, QTextCursor::KeepAnchor); //textCursor.setCharFormat(f); textCursor.mergeCharFormat(f); //DebugDialog::debug(QString("setting font tc:%1,%2 params:%3,%4") //.arg(textCursor.anchor()).arg(textCursor.position()) //.arg(position).arg(position + charsAdded)); /* textCursor = m_graphicsTextItem->textCursor(); for (int i = 0; i < charsAdded; i++) { textCursor.setPosition(position + i, QTextCursor::MoveAnchor); f = textCursor.charFormat(); DebugDialog::debug(QString("1format %1 %2 %3").arg(f.fontPointSize()).arg(f.fontFamily()).arg(f.fontWeight())); //f.setFont(font); //f.setFontPointSize(9); //f.setFontWeight(QFont::Normal); //textCursor.setCharFormat(f); //QTextCharFormat g = textCursor.charFormat(); //DebugDialog::debug(QString("2format %1 %2 %3").arg(g.fontPointSize()).arg(g.fontFamily()).arg(g.fontWeight())); } */ connectSlots(); }
//============================================================================= // SLOT: Add another line to the grid. //============================================================================= void CAddress::slotAddLine () { CAddressBox *box; int row; disconnectSlots(); //---------------------------------------------------------------------------- // Delete the "more" button. //---------------------------------------------------------------------------- FREE_PTR(mMore); //---------------------------------------------------------------------------- // Create a new combobox and the edit fields and add them to the grid layout. //---------------------------------------------------------------------------- row = mAddress.count(); box = new CAddressBox (this); mLayout->addWidget (box, row, 0); mAddress.append (box); //---------------------------------------------------------------------------- // Add the "more" button again. //---------------------------------------------------------------------------- mMore = new QPushButton (tr("More"), this); mMore->setMaximumWidth (60); mLayout->addWidget (mMore, row + 1, 0, AlignRight); connect (mMore, SIGNAL(clicked()), this, SLOT(slotAddLine())); box->show(); mMore->show(); connectSlots(); }
//============================================================================= // SLOT: Add another line to the grid. //============================================================================= void CCommunication::slotAddLine () { CCommLine *line; int row; disconnectSlots(); //---------------------------------------------------------------------------- // Delete the "more" button. //---------------------------------------------------------------------------- FREE_PTR(mMore); //---------------------------------------------------------------------------- // Create a new combobox and lineedit and add it to the grid layout. //---------------------------------------------------------------------------- row = mLine.count(); line = new CCommLine (this); mLayout->addWidget (line, row, 0); mLine.append (line); //---------------------------------------------------------------------------- // Add the "more" button again. //---------------------------------------------------------------------------- mMore = new QPushButton (tr("More"), this); mMore->setFixedWidth (80); mLayout->addWidget (mMore, row + 1, 0, AlignRight); connect (mMore, SIGNAL(clicked()), this, SLOT(slotAddLine())); line->show(); mMore->show(); connectSlots(); }
QtnPropertySetTest3::~QtnPropertySetTest3() { disconnectSlots(); }
QtnPropertySetSS::~QtnPropertySetSS() { disconnectSlots(); }
QtnPropertySetAA::~QtnPropertySetAA() { disconnectSlots(); }
QtnPropertySetYY::~QtnPropertySetYY() { disconnectSlots(); }
QtnPropertySetTest1::~QtnPropertySetTest1() { disconnectSlots(); }
QtnPropertySetSubPropertySetType::~QtnPropertySetSubPropertySetType() { disconnectSlots(); }
QtnPropertySetTextAttributes::~QtnPropertySetTextAttributes() { disconnectSlots(); }
//============================================================================= // Load the detail communication information of the person. //============================================================================= void CCommunication::loadData (QString id, bool readonly) { QString DBnull = "?", tip; unsigned int row = 0; //---------------------------------------------------------------------------- // Disconnect the slots during data load. //---------------------------------------------------------------------------- removeAllLines(); slotAddLine(); disconnectSlots(); //---------------------------------------------------------------------------- // Load the communication types. //---------------------------------------------------------------------------- QSqlQuery query ("SELECT comm_id, type, number, created, last_modified " "FROM contacts_communications " "WHERE person_id = " + id + " ORDER BY type"); if (!query.isActive()) { SHOW_DB_ERROR(tr ("Error during database query"), query); return; } while (query.next()) { if (row >= mLine.count()) { slotAddLine(); disconnectSlots(); } mIDs << query.value(0).toString(); mLine.at(row)->setID (query.value(0).toString()); mLine.at(row)->setType (query.value(1).toInt()); mLine.at(row)->setValue (query.value(2).toString()); mLine.at(row)->setToolTip (tr ("Created:\t\t\t") + formatDateTime (query.value(3).toString()) + tr ("\nLast Modified:\t\t") + formatDateTime (query.value(4).toString())); mLine.at(row)->setChanged (false); row++; } //---------------------------------------------------------------------------- // Store the ID of the currently loaded person. //---------------------------------------------------------------------------- mCurrent = id; mReadonly = readonly; //---------------------------------------------------------------------------- // Connect the slots after data load is complete. //---------------------------------------------------------------------------- connectSlots(); setReadonly (readonly); emit contentLoaded (true); emit contentChanged (false); }
QtnPropertySetTest2::~QtnPropertySetTest2() { disconnectSlots(); }
QtnPropertySetSamplePS::~QtnPropertySetSamplePS() { disconnectSlots(); }