Ejemplo n.º 1
0
QtnPropertySetAllPropertyTypes::~QtnPropertySetAllPropertyTypes()
{
    
        _b = false;
    
    disconnectSlots();
}
Ejemplo n.º 2
0
//=============================================================================
// Clear all controls.
//=============================================================================
void CCommunication::clearControls()
{
  unsigned int    row;
  
  disconnectSlots();

  for (row = 0; row < mLine.count(); row++)
    mLine.at(row)->clear();

  mIDs.clear();
  
  connectSlots();
}
Ejemplo n.º 3
0
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());
	}
}
Ejemplo n.º 4
0
/*!
 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");
}
Ejemplo n.º 5
0
//=============================================================================
// 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();
}
Ejemplo n.º 6
0
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();
}
Ejemplo n.º 7
0
//=============================================================================
// 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();
}
Ejemplo n.º 8
0
//=============================================================================
// 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();
}
Ejemplo n.º 9
0
QtnPropertySetTest3::~QtnPropertySetTest3()
{
    disconnectSlots();
}
Ejemplo n.º 10
0
QtnPropertySetSS::~QtnPropertySetSS()
{
    disconnectSlots();
}
Ejemplo n.º 11
0
QtnPropertySetAA::~QtnPropertySetAA()
{
    disconnectSlots();
}
Ejemplo n.º 12
0
QtnPropertySetYY::~QtnPropertySetYY()
{
    disconnectSlots();
}
Ejemplo n.º 13
0
QtnPropertySetTest1::~QtnPropertySetTest1()
{
    disconnectSlots();
}
Ejemplo n.º 14
0
QtnPropertySetSubPropertySetType::~QtnPropertySetSubPropertySetType()
{
    disconnectSlots();
}
Ejemplo n.º 15
0
QtnPropertySetTextAttributes::~QtnPropertySetTextAttributes()
{
    disconnectSlots();
}
Ejemplo n.º 16
0
//=============================================================================
// 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);
}
Ejemplo n.º 17
0
QtnPropertySetTest2::~QtnPropertySetTest2()
{
    disconnectSlots();
}
Ejemplo n.º 18
0
QtnPropertySetSamplePS::~QtnPropertySetSamplePS()
{
    disconnectSlots();
}