void DocumentItem::setPath(const QString &path) { //TODO: remote urls m_document->openDocument(path, KUrl(path), KMimeType::findByUrl(KUrl(path))); m_tocModel->fill(m_document->documentSynopsis()); m_tocModel->setCurrentViewport(m_document->viewport()); m_matchingPages.clear(); for (uint i = 0; i < m_document->pages(); ++i) { m_matchingPages << (int)i; } emit matchingPagesChanged(); emit pathChanged(); emit pageCountChanged(); emit openedChanged(); emit supportsSearchingChanged(); emit windowTitleForDocumentChanged(); }
/*! \fn void SQLiteDatabase::close() Closes the database. Emits the \c openedChanged() signal. */ void SQLiteDatabase::close() { m_database.close(); emit openedChanged(); }
/*! \fn bool SQLiteDatabase::open() Opens the database. This requires that the database name be set. Returns true if successful. \sa setDatabaseName() */ bool SQLiteDatabase::open() { bool result = m_database.open(); if(result && m_database.isOpen()) emit openedChanged(); return result; }