Beispiel #1
0
/**
 * Lets inheriting classes process an item selection made through the list 
 * widget.
 * This slot is connected to the doubleClicked() and returnPressed()
 * signals of the list widget.
 */
void SearchList::slotItemSelected(QTreeWidgetItem* pItem, int column)
{
	Q_UNUSED(column);

	processItemSelected(pItem);
	m_pEdit->setText("");
}
Beispiel #2
0
/**
 * Lets inheriting classes process an item selection made through the edit 
 * widget.
 * This slot is connected to the returnPressed() signal of the edit widget.
 */
void SearchList::slotItemSelected()
{
	QListViewItem* pItem;

	if ((pItem = m_pList->selectedItem()) != NULL) {
		m_pEdit->setText(pItem->text(m_nSearchCol));
		processItemSelected(pItem);
	}
	
	m_pEdit->setText("");
}
Beispiel #3
0
/**
 * Lets inheriting classes process an item selection made through the edit 
 * widget.
 * This slot is connected to the returnPressed() signal of the edit widget.
 */
void SearchList::slotItemSelected()
{
	QList<QTreeWidgetItem*> selectedItemsList = m_pList->selectedItems();

	if (!selectedItemsList.isEmpty()){
		QListIterator<QTreeWidgetItem*> it(selectedItemsList);

		while (it.hasNext())
			processItemSelected(it.next());
	}

	m_pEdit->setText("");
}
Beispiel #4
0
/**
 * Lets inheriting classes process an item selection made through the list 
 * widget.
 * This slot is connected to the doubleClicked() and returnPressed()
 * signals of the list widget.
 */
void SearchList::slotItemSelected(QListViewItem* pItem)
{
	processItemSelected(pItem);
	m_pEdit->setText("");
}