void ExtendedTableWidget::selectTableLines(int firstLine, int count) { SqliteTableModel* m = qobject_cast<SqliteTableModel*>(model()); int lastLine = firstLine+count-1; // Are there even that many lines? if(lastLine >= m->rowCount()) return; selectTableLine(firstLine); QModelIndex topLeft = m->index(firstLine, 0); QModelIndex bottomRight = m->index(lastLine, m->columnCount()-1); selectionModel()->select(QItemSelection(topLeft, bottomRight), QItemSelectionModel::Select | QItemSelectionModel::Rows); }
int mainForm::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Q3MainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: fileOpen((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 1: fileOpen(); break; case 2: fileNew(); break; case 3: populateStructure(); break; case 4: populateTable((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 5: resetBrowser(); break; case 6: fileClose(); break; case 7: fileExit(); break; case 8: closeEvent((*reinterpret_cast< QCloseEvent*(*)>(_a[1]))); break; case 9: addRecord(); break; case 10: deleteRecord(); break; case 11: updateTableView((*reinterpret_cast< int(*)>(_a[1]))); break; case 12: selectTableLine((*reinterpret_cast< int(*)>(_a[1]))); break; case 13: navigatePrevious(); break; case 14: navigateNext(); break; case 15: navigateGoto(); break; case 16: setRecordsetLabel(); break; case 17: browseFind((*reinterpret_cast< bool(*)>(_a[1]))); break; case 18: browseFindAway(); break; case 19: lookfor((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2])),(*reinterpret_cast< const QString(*)>(_a[3]))); break; case 20: showrecord((*reinterpret_cast< int(*)>(_a[1]))); break; case 21: createTable(); break; case 22: createIndex(); break; case 23: compact(); break; case 24: deleteTable(); break; case 25: editTable(); break; case 26: deleteIndex(); break; case 27: copy(); break; case 28: paste(); break; case 29: helpWhatsThis(); break; case 30: helpAbout(); break; case 31: updateRecordText((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< QString(*)>(_a[3]))); break; case 32: logWinAway(); break; case 33: editWinAway(); break; case 34: editText((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break; case 35: doubleClickTable((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< const QPoint(*)>(_a[4]))); break; case 36: executeQuery(); break; case 37: mainTabSelected((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 38: toggleLogWindow((*reinterpret_cast< bool(*)>(_a[1]))); break; case 39: importTableFromCSV(); break; case 40: exportTableToCSV(); break; case 41: dbState((*reinterpret_cast< bool(*)>(_a[1]))); break; case 42: fileSave(); break; case 43: fileRevert(); break; case 44: exportDatabaseToSQL(); break; case 45: importDatabaseFromSQL(); break; case 46: openPreferences(); break; case 47: updatePreferences(); break; case 48: languageChange(); break; default: ; } _id -= 49; } return _id; }