|
|
@ -1203,7 +1203,7 @@ void Register::focusInEvent(TQFocusEvent* ev)
|
|
|
|
TQTable::focusInEvent(ev);
|
|
|
|
TQTable::focusInEvent(ev);
|
|
|
|
if(m_focusItem) {
|
|
|
|
if(m_focusItem) {
|
|
|
|
m_focusItem->setFocus(true, false);
|
|
|
|
m_focusItem->setFocus(true, false);
|
|
|
|
tqrepaintItems(m_focusItem);
|
|
|
|
repaintItems(m_focusItem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1211,7 +1211,7 @@ void Register::focusOutEvent(TQFocusEvent* ev)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(m_focusItem) {
|
|
|
|
if(m_focusItem) {
|
|
|
|
m_focusItem->setFocus(false, false);
|
|
|
|
m_focusItem->setFocus(false, false);
|
|
|
|
tqrepaintItems(m_focusItem);
|
|
|
|
repaintItems(m_focusItem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TQTable::focusOutEvent(ev);
|
|
|
|
TQTable::focusOutEvent(ev);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1402,7 +1402,7 @@ void Register::adjustColumn(int col)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Register::tqrepaintItems(RegisterItem* first, RegisterItem* last)
|
|
|
|
void Register::repaintItems(RegisterItem* first, RegisterItem* last)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(first == 0 && last == 0) {
|
|
|
|
if(first == 0 && last == 0) {
|
|
|
|
first = firstItem();
|
|
|
|
first = firstItem();
|
|
|
@ -1415,7 +1415,7 @@ void Register::tqrepaintItems(RegisterItem* first, RegisterItem* last)
|
|
|
|
if(last == 0)
|
|
|
|
if(last == 0)
|
|
|
|
last = first;
|
|
|
|
last = first;
|
|
|
|
|
|
|
|
|
|
|
|
// qDebug("tqrepaintItems from row %d to row %d", first->startRow(), last->startRow()+last->numRowsRegister()-1);
|
|
|
|
// qDebug("repaintItems from row %d to row %d", first->startRow(), last->startRow()+last->numRowsRegister()-1);
|
|
|
|
|
|
|
|
|
|
|
|
// the following code is based on code I found in
|
|
|
|
// the following code is based on code I found in
|
|
|
|
// TQTable::cellGeometry() and TQTable::updateCell() (ipwizard)
|
|
|
|
// TQTable::cellGeometry() and TQTable::updateCell() (ipwizard)
|
|
|
@ -1477,7 +1477,7 @@ void Register::doSelectItems(int from, int to, bool selected)
|
|
|
|
|
|
|
|
|
|
|
|
// anything changed?
|
|
|
|
// anything changed?
|
|
|
|
if(firstItem || lastItem)
|
|
|
|
if(firstItem || lastItem)
|
|
|
|
tqrepaintItems(firstItem, lastItem);
|
|
|
|
repaintItems(firstItem, lastItem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
RegisterItem* Register::itemAtRow(int row) const
|
|
|
|
RegisterItem* Register::itemAtRow(int row) const
|
|
|
@ -1618,7 +1618,7 @@ bool Register::setFocusItem(RegisterItem* focusItem)
|
|
|
|
m_focusItem->setFocus(false);
|
|
|
|
m_focusItem->setFocus(false);
|
|
|
|
// issue a tqrepaint here only if we move the focus
|
|
|
|
// issue a tqrepaint here only if we move the focus
|
|
|
|
if(m_focusItem != focusItem)
|
|
|
|
if(m_focusItem != focusItem)
|
|
|
|
tqrepaintItems(m_focusItem);
|
|
|
|
repaintItems(m_focusItem);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Transaction* item = dynamic_cast<Transaction*>(focusItem);
|
|
|
|
Transaction* item = dynamic_cast<Transaction*>(focusItem);
|
|
|
|
if(m_focusItem != focusItem && item) {
|
|
|
|
if(m_focusItem != focusItem && item) {
|
|
|
@ -1630,7 +1630,7 @@ bool Register::setFocusItem(RegisterItem* focusItem)
|
|
|
|
if(m_listsDirty)
|
|
|
|
if(m_listsDirty)
|
|
|
|
updateRegister(KMyMoneyGlobalSettings::ledgerLens() | !KMyMoneyGlobalSettings::transactionForm());
|
|
|
|
updateRegister(KMyMoneyGlobalSettings::ledgerLens() | !KMyMoneyGlobalSettings::transactionForm());
|
|
|
|
ensureItemVisible(m_focusItem);
|
|
|
|
ensureItemVisible(m_focusItem);
|
|
|
|
tqrepaintItems(m_focusItem);
|
|
|
|
repaintItems(m_focusItem);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
@ -1980,7 +1980,7 @@ void Register::slotToggleErronousTransactions(void)
|
|
|
|
KMyMoneyRegister::RegisterItem* p = m_firstErronous;
|
|
|
|
KMyMoneyRegister::RegisterItem* p = m_firstErronous;
|
|
|
|
while(p && p->prevItem() != m_lastErronous) {
|
|
|
|
while(p && p->prevItem() != m_lastErronous) {
|
|
|
|
if(p->isErronous())
|
|
|
|
if(p->isErronous())
|
|
|
|
tqrepaintItems(p);
|
|
|
|
repaintItems(p);
|
|
|
|
p = p->nextItem();
|
|
|
|
p = p->nextItem();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|