#include <docmanager.h>
Collaboration diagram for DocManager:

Definition at line 37 of file docmanager.h.
| bool DocManager::closeAll | ( | ) |
Attempts to close all open documents, returning true if successful
Definition at line 64 of file docmanager.cpp.
References m_documentList, and removeDocumentAssociations().
| void DocManager::gotoTextLine | ( | const KURL & | url, | |
| int | line | |||
| ) |
Goes to the given line in the given text file (if the file exists)
Definition at line 82 of file docmanager.cpp.
References TextView::gotoLine(), openURL(), and TextDocument::textView().
Referenced by LanguageManager::slotParaClicked().
Attempts to open the document at the given url.
Definition at line 92 of file docmanager.cpp.
References createNewView(), findDocument(), giveDocumentFocus(), openCircuitFile(), openFlowCodeFile(), openMechanicsFile(), and openTextFile().
Referenced by ItemView::dropEvent(), gotoTextLine(), KTechlab::load(), PICComponent::mouseDoubleClickEvent(), ViewArea::restoreState(), ProcessChain::slotFinishedCompile(), and KTechlab::slotTabContextActivated().
| View* DocManager::getFocusedView | ( | ) | const [inline] |
| Document * DocManager::getFocusedDocument | ( | ) | const |
Returns the focused Document (the document of the focused view)
Definition at line 138 of file docmanager.cpp.
References Document::isDeleted(), and p_focusedView.
Referenced by ProjectItem::addCurrentFile(), KTechlab::slotDocUndoRedoChanged(), and KTechlab::slotUpdateCaptions().
| QString DocManager::untitledName | ( | int | type | ) |
Get a unique name, e.g. Untitled (circuit) - n" depending on the types of Document and whether it is the first one or not
| type | Document::DocumentType - type of Document |
Definition at line 161 of file docmanager.cpp.
References m_countCircuit, m_countFlowCode, m_countMechanics, and m_countOther.
Referenced by createCircuitDocument(), createFlowCodeDocument(), createMechanicsDocument(), and createTextDocument().
| Document * DocManager::findDocument | ( | const KURL & | url | ) | const |
Checks to see if a document with the given URL is already open, and returns a pointer to that Document if so - otherwises returns null
Definition at line 207 of file docmanager.cpp.
References m_associatedDocuments, and m_documentList.
Referenced by ProjectItem::build(), ProjectItem::closeOpenFiles(), and openURL().
| void DocManager::associateDocument | ( | const KURL & | url, | |
| Document * | document | |||
| ) |
Associates a url with a pointer to a document. When findFile is called with the given url, it will return a pointer to this document if it still exists.
Definition at line 225 of file docmanager.cpp.
References m_associatedDocuments.
Referenced by TextDocument::outputFilePath().
Gives the given document focus. If it has no open views, one will be created for it if viewAreaForNew is non-null
Definition at line 145 of file docmanager.cpp.
References Document::activeView(), createNewView(), p_ktechlab, and KTechlab::tabWidget().
Referenced by openURL(), and ProcessChain::slotFinishedCompile().
| TextDocument * DocManager::createTextDocument | ( | ) | [slot] |
Creates an empty text document (with an open view)
Definition at line 390 of file docmanager.cpp.
References TextDocument::constructTextDocument(), handleNewDocument(), p_ktechlab, and untitledName().
Referenced by ProcessChain::slotFinishedCompile().
| CircuitDocument * DocManager::createCircuitDocument | ( | ) | [slot] |
Creates an empty circuit document (with an open view), and shows the component selector.
Definition at line 398 of file docmanager.cpp.
References handleNewDocument(), p_ktechlab, KateMDI::MainWindow::showToolView(), KateMDI::MainWindow::toolView(), ComponentSelector::toolViewIdentifier(), and untitledName().
| FlowCodeDocument * DocManager::createFlowCodeDocument | ( | ) | [slot] |
Creates an empty flowcode document (with an open view), and shows the flowpart selector.
Definition at line 408 of file docmanager.cpp.
References handleNewDocument(), p_ktechlab, KateMDI::MainWindow::showToolView(), KateMDI::MainWindow::toolView(), FlowPartSelector::toolViewIdentifier(), and untitledName().
| MechanicsDocument * DocManager::createMechanicsDocument | ( | ) | [slot] |
Creates an empty mechanics document (with an open view), and shows the mechanics selector.
Definition at line 418 of file docmanager.cpp.
References handleNewDocument(), p_ktechlab, KateMDI::MainWindow::showToolView(), KateMDI::MainWindow::toolView(), MechanicsSelector::toolViewIdentifier(), and untitledName().
| void DocManager::fileOpened | ( | const KURL & | url | ) | [signal] |
Emitted when a file is successfully opened
Referenced by openCircuitFile(), openFlowCodeFile(), openMechanicsFile(), and openTextFile().
| void DocManager::slotViewFocused | ( | View * | view | ) | [protected, slot] |
Does the appropriate enabling / disabling of actions, connections, etc
Definition at line 305 of file docmanager.cpp.
References ViewContainer::activeView(), View::document(), p_connectedDocument, p_focusedView, p_ktechlab, KTechlab::requestUpdateCaptions(), ItemInterface::self(), KTechlab::slotDocModifiedChanged(), KTechlab::slotDocUndoRedoChanged(), ItemInterface::slotItemDocumentChanged(), slotViewUnfocused(), KTechlab::tabWidget(), Document::type(), and View::viewContainer().
Referenced by handleNewDocument().
| void DocManager::slotViewUnfocused | ( | ) | [protected, slot] |
Does the appropriate enabling / disabling of actions, connections, etc
Definition at line 352 of file docmanager.cpp.
References disableContextActions(), p_connectedDocument, p_focusedView, p_ktechlab, KTechlab::removeGUIClients(), KTechlab::requestUpdateCaptions(), ItemInterface::self(), and ItemInterface::slotItemDocumentChanged().
Referenced by handleNewDocument(), and slotViewFocused().
This function should be called after creating a new document to add it to the appropriate lists and connect it up as appropriate
Definition at line 255 of file docmanager.cpp.
References createNewView(), documentDestroyed(), m_documentList, m_nextDocumentID, p_ktechlab, slotViewFocused(), and slotViewUnfocused().
Referenced by createCircuitDocument(), createFlowCodeDocument(), createMechanicsDocument(), createTextDocument(), openCircuitFile(), openFlowCodeFile(), openMechanicsFile(), and openTextFile().
Takes the document, creates a new view and shoves it in a new ViewContainer
Definition at line 274 of file docmanager.cpp.
References KTechlab::addWindow(), Document::caption(), Document::createView(), ViewArea::id(), p_ktechlab, View::setFocused(), and ViewArea::viewContainer().
Referenced by giveDocumentFocus(), handleNewDocument(), and openURL().
1.5.1