Gui: misc event/signals cleanups. No functional changes

This commit is contained in:
Jean-Francois Dockes
2010-12-22 18:07:18 +01:00
parent 107e02b74a
commit 0a6063542f
15 changed files with 263 additions and 139 deletions
+5 -4
View File
@@ -120,11 +120,12 @@ bool DocSequenceDb::setFiltSpec(const DocSeqFiltSpec &fs)
return m_q->setQuery(m_fsdata);
}
bool DocSequenceDb::setSortSpec(const DocSeqSortSpec &sortspec)
bool DocSequenceDb::setSortSpec(const DocSeqSortSpec &spec)
{
LOGDEB(("DocSequenceDb::setSortSpec\n"));
if (sortspec.isNotNull()) {
m_q->setSortBy(sortspec.field, !sortspec.desc);
LOGDEB(("DocSequenceDb::setSortSpec: fld [%s] %s\n",
spec.field.c_str(), spec.desc ? "desc" : "asc"));
if (spec.isNotNull()) {
m_q->setSortBy(spec.field, !spec.desc);
} else {
m_q->setSortBy(string(), true);
}
+8
View File
@@ -41,6 +41,14 @@ public:
return -1;
return m_winfirst / m_pagesize;
}
int pageFirstDocNum() {
return m_winfirst;
}
int pageLastDocNum() {
if (m_winfirst < 0 || m_respage.size() == 0)
return -1;
return m_winfirst + m_respage.size() - 1;
}
virtual int pageSize() const {return m_pagesize;}
void pageNext();
bool hasNext() {return m_hasNext;}