|
a/src/qtgui/restable.cpp |
|
b/src/qtgui/restable.cpp |
|
... |
|
... |
491 |
this, SLOT(linkWasClicked(const QUrl &)));
|
491 |
this, SLOT(linkWasClicked(const QUrl &)));
|
492 |
splitter->addWidget(m_detail);
|
492 |
splitter->addWidget(m_detail);
|
493 |
splitter->setOrientation(Qt::Vertical);
|
493 |
splitter->setOrientation(Qt::Vertical);
|
494 |
}
|
494 |
}
|
495 |
|
495 |
|
|
|
496 |
int ResTable::getDetailDocNumOrTopRow()
|
|
|
497 |
{
|
|
|
498 |
if (m_detaildocnum >= 0)
|
|
|
499 |
return m_detaildocnum;
|
|
|
500 |
QModelIndex modelIndex = tableView->indexAt(QPoint(0, 0));
|
|
|
501 |
return modelIndex.row();
|
|
|
502 |
}
|
|
|
503 |
|
|
|
504 |
void ResTable::makeRowVisible(int row)
|
|
|
505 |
{
|
|
|
506 |
LOGDEB(("ResTable::showRow(%d)\n", row));
|
|
|
507 |
QModelIndex modelIndex = m_model->index(row, 0);
|
|
|
508 |
tableView->scrollTo(modelIndex, QAbstractItemView::PositionAtTop);
|
|
|
509 |
tableView->selectionModel()->clear();
|
|
|
510 |
m_detail->clear();
|
|
|
511 |
m_detaildocnum = -1;
|
|
|
512 |
}
|
|
|
513 |
|
496 |
// This is called by rclmain_w prior to exiting
|
514 |
// This is called by rclmain_w prior to exiting
|
497 |
void ResTable::saveColState()
|
515 |
void ResTable::saveColState()
|
498 |
{
|
516 |
{
|
499 |
QSettings settings;
|
517 |
QSettings settings;
|
500 |
settings.setValue("resTableSplitterSizes", splitter->saveState());
|
518 |
settings.setValue("resTableSplitterSizes", splitter->saveState());
|