ossp-pkg/as/as-gui/as_slot.cpp 1.41 -> 1.42
--- as_slot.cpp 2002/12/05 14:51:29 1.41
+++ as_slot.cpp 2002/12/05 16:08:21 1.42
@@ -190,6 +190,8 @@
}
else // Data is already up to date
m_pMaintable->setNumRows(0); // Remove all data in table
+
+ this->setDirty(false); // Reset data to clean state
}
//
@@ -288,6 +290,8 @@
}
else // Data is already up to date
pClosit->accept();
+
+ this->setDirty(false); // Reset data to clean state
}
//
@@ -349,41 +353,11 @@
}
//
-//
//
-void Titraqform::updSizes(int nSection, int nOldsize, int nNewsize)
+//
+void Titraqform::dataChanged(int nRow, int nCol)
{
- switch (nSection) {
- case TITRAQ_IDXALLCTRLS:
- m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
- m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING);
- m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING);
- m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING);
- m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING);
-// m_pRemark->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXREMARK) - TITRAQ_SPACING);
- break;
- case TITRAQ_IDXDATE:
- m_pDateedit->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXDATE) - TITRAQ_SPACING + TITRAQ_SPACING / 2);
- break;
- case TITRAQ_IDXSTART:
- m_pStarttime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXSTART) - TITRAQ_SPACING);
- break;
- case TITRAQ_IDXFINISH:
- m_pEndtime->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXFINISH) - TITRAQ_SPACING);
- break;
- case TITRAQ_IDXAMOUNT:
- m_pAmount->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXAMOUNT) - TITRAQ_SPACING);
- break;
- case TITRAQ_IDXTASK:
- m_pTasks->setFixedWidth(m_pMaintable->horizontalHeader()->sectionSize(TITRAQ_IDXTASK) - TITRAQ_SPACING);
- break;
- case TITRAQ_IDXREMARK:
-// m_pRemark->setFixedWidth(nNewsize);
- break;
- default:
- throw Genexcept("Unrecognized main window column header.");
- break;
- }
+ setDirty(); // Mark this timesheet dirty, changes pending save
}
//
|
|