增加上一页和下一页的翻页逻辑

This commit is contained in:
work-zym\zhangyiming 2024-11-21 17:20:32 +08:00
parent e57bbaf79f
commit a25057fa35

View File

@ -271,8 +271,9 @@ void MedicalRecordManager::initLay()
}
bool MedicalRecordManager::initConnect()
{
connect(m_actSearch, SIGNAL(triggered(bool)), this, SLOT(slotSearch()));
connect(&m_btnUpPage,SIGNAL(clicked()),this,SLOT(slotPreviousPage()));
connect(&m_btnNetPage,SIGNAL(clicked()),this,SLOT(slotNextPage()));
return true;
}
void MedicalRecordManager::slotSearch()
@ -353,11 +354,19 @@ void MedicalRecordManager::initTable()
}
void MedicalRecordManager::slotPreviousPage()
{
if (m_currentPage > 1)
{
m_currentPage = m_currentPage - 2;
}
else
{
return;
}
updateContext();
}
void MedicalRecordManager::slotNextPage()
{
updateContext();
}
void MedicalRecordManager::updateContext()