libs/main
KoMainWindow Class Reference
Main window for a KOffice application. More...
#include <KoMainWindow.h>

Public Slots | |
| KoPrintJob * | exportToPdf (QString fileName=QString()) |
| virtual void | slotCloseAllViews () |
| virtual void | slotConfigureKeys () |
| virtual void | slotConfigureToolbars () |
| virtual void | slotDocumentInfo () |
| void | slotEmailFile () |
| void | slotExportFile () |
| virtual void | slotFileClose () |
| virtual void | slotFileNew () |
| virtual void | slotFileOpen () |
| virtual void | slotFileOpenRecent (const KUrl &) |
| virtual void | slotFilePrint () |
| virtual void | slotFilePrintPreview () |
| virtual void | slotFileQuit () |
| virtual void | slotFileSave () |
| virtual void | slotFileSaveAs () |
| void | slotImportFile () |
| virtual void | slotNewToolbarConfig () |
| void | slotProgress (int value) |
| void | slotReloadFile () |
| virtual void | slotRemoveView () |
| virtual void | slotSetOrientation () |
| virtual void | slotSplitView () |
| virtual void | slotToolbarToggled (bool toggle) |
| void | slotVersionsFile () |
| virtual void | viewFullscreen (bool fullScreen) |
Signals | |
| void | documentSaved () |
| void | restoringDone () |
| void | saveDialogShown () |
Public Member Functions | |
| KoMainWindow (const KComponentData &instance) | |
| virtual | ~KoMainWindow () |
| void | addRecentURL (const KUrl &url) |
| QList< KoCanvasObserver * > | canvasObservers () |
| QDockWidget * | createDockWidget (KoDockFactory *factory) |
| KoDockerManager * | dockerManager () const |
| QList< QDockWidget * > | dockWidgets () |
| bool | openDocument (KoDocument *newdoc, const KUrl &url) |
| virtual bool | openDocument (const KUrl &url) |
| virtual KParts::PartManager * | partManager () |
| void | reloadRecentFileList () |
| virtual KoDocument * | rootDocument () const |
| virtual KoView * | rootView () const |
| void | setDockerManager (KoDockerManager *) |
| void | setDocToOpen (KoDocument *doc) |
| void | setMaxRecentItems (uint _number) |
| void | setReadWrite (bool readwrite) |
| virtual void | setRootDocument (KoDocument *doc) |
| void | showToolbar (const char *tbName, bool shown) |
| QLabel * | statusBarLabel () |
| bool | toolbarIsVisible (const char *tbName) |
| virtual void | updateCaption (const QString &caption, bool mod) |
| virtual void | updateCaption () |
| void | updateReloadFileAction (KoDocument *doc) |
| void | updateVersionsFileAction (KoDocument *doc) |
Protected Slots | |
| virtual void | slotActivePartChanged (KParts::Part *newPart) |
Detailed Description
Main window for a KOffice application.
This class is used to represent a main window of a KOffice component. Each main window contains a menubar and some toolbars.
- Note:
- This class does NOT need to be subclassed in your application.
Definition at line 57 of file KoMainWindow.h.
Constructor & Destructor Documentation
| KoMainWindow::KoMainWindow | ( | const KComponentData & | instance | ) | [explicit] |
Constructor.
Initializes a KOffice main window (with its basic GUI etc.).
Definition at line 217 of file KoMainWindow.cpp.
| KoMainWindow::~KoMainWindow | ( | ) | [virtual] |
Destructor.
Definition at line 377 of file KoMainWindow.cpp.
Member Function Documentation
| void KoMainWindow::addRecentURL | ( | const KUrl & | url | ) |
The document opened a URL -> store into recent documents list.
Definition at line 518 of file KoMainWindow.cpp.
| QList< KoCanvasObserver * > KoMainWindow::canvasObservers | ( | ) |
Definition at line 1862 of file KoMainWindow.cpp.
| QDockWidget * KoMainWindow::createDockWidget | ( | KoDockFactory * | factory | ) |
Returns the dockwidget specified by the factory.
If the dock widget doesn't exist yet it's created. Add a "view_palette_action_menu" action to your view menu if you want to use closable dock widgets.
- Parameters:
-
factory the factory used to create the dock widget if needed
- Returns:
- the dock widget specified by
factory(may be 0)
Definition at line 1757 of file KoMainWindow.cpp.
| KoDockerManager * KoMainWindow::dockerManager | ( | ) | const |
- Returns:
- the KoDockerManager which is assigned WARNING: this could be 0, if no docker have been assigned yet. In that case create one and assign it. Note This should only be called by KoView setDockerManager to assign it.
Definition at line 1877 of file KoMainWindow.cpp.
| QList< QDockWidget * > KoMainWindow::dockWidgets | ( | ) |
Return the list of dock widgets belonging to this main window.
Definition at line 1857 of file KoMainWindow.cpp.
| void KoMainWindow::documentSaved | ( | ) | [signal] |
This signal is emitted if the document has been saved successfully.
| KoPrintJob * KoMainWindow::exportToPdf | ( | QString | fileName = QString() |
) | [slot] |
Definition at line 1308 of file KoMainWindow.cpp.
| bool KoMainWindow::openDocument | ( | KoDocument * | newdoc, | |
| const KUrl & | url | |||
| ) |
Load the URL into this document (and make it root doc after loading).
Special method for KoApplication::start, don't use.
Definition at line 635 of file KoMainWindow.cpp.
| bool KoMainWindow::openDocument | ( | const KUrl & | url | ) | [virtual] |
Load the desired document and show it.
- Parameters:
-
url the URL to open
- Returns:
- TRUE on success.
Definition at line 623 of file KoMainWindow.cpp.
| KParts::PartManager * KoMainWindow::partManager | ( | ) | [virtual] |
Definition at line 618 of file KoMainWindow.cpp.
| void KoMainWindow::reloadRecentFileList | ( | ) |
Reloads the recent documents list.
Definition at line 556 of file KoMainWindow.cpp.
| void KoMainWindow::restoringDone | ( | ) | [signal] |
This signal is emitted right after the docker states have been succefully restored from config.
| KoDocument * KoMainWindow::rootDocument | ( | ) | const [virtual] |
Retrieves the document that is displayed in the mainwindow.
Definition at line 606 of file KoMainWindow.cpp.
| KoView * KoMainWindow::rootView | ( | ) | const [virtual] |
Definition at line 611 of file KoMainWindow.cpp.
| void KoMainWindow::saveDialogShown | ( | ) | [signal] |
This signals is emmitted before the save dialog is shown.
| void KoMainWindow::setDockerManager | ( | KoDockerManager * | dm | ) |
use this to assign a KoDockerManager.
Note this should only be called by KoView dockerManager to retrieve it.
Definition at line 1882 of file KoMainWindow.cpp.
| void KoMainWindow::setDocToOpen | ( | KoDocument * | doc | ) |
This is used to handle the document used at start up before it actually added as root document.
Definition at line 1752 of file KoMainWindow.cpp.
| void KoMainWindow::setMaxRecentItems | ( | uint | _number | ) |
Sets the maximum number of recent documents entries.
Definition at line 1633 of file KoMainWindow.cpp.
| void KoMainWindow::setReadWrite | ( | bool | readwrite | ) |
Definition at line 510 of file KoMainWindow.cpp.
| void KoMainWindow::setRootDocument | ( | KoDocument * | doc | ) | [virtual] |
Called when a document is assigned to this mainwindow.
This creates a view for this document, makes it the active part, etc.
Definition at line 412 of file KoMainWindow.cpp.
| void KoMainWindow::showToolbar | ( | const char * | tbName, | |
| bool | shown | |||
| ) |
The application should call this to show or hide a toolbar.
It also takes care of the corresponding action in the settings menu.
Definition at line 1394 of file KoMainWindow.cpp.
| void KoMainWindow::slotActivePartChanged | ( | KParts::Part * | newPart | ) | [protected, virtual, slot] |
Definition at line 1534 of file KoMainWindow.cpp.
| void KoMainWindow::slotCloseAllViews | ( | ) | [virtual, slot] |
Close all views.
Definition at line 1431 of file KoMainWindow.cpp.
| void KoMainWindow::slotConfigureKeys | ( | ) | [virtual, slot] |
Configure key bindings.
Definition at line 1336 of file KoMainWindow.cpp.
| void KoMainWindow::slotConfigureToolbars | ( | ) | [virtual, slot] |
Configure toolbars.
Definition at line 1341 of file KoMainWindow.cpp.
| void KoMainWindow::slotDocumentInfo | ( | ) | [virtual, slot] |
Show a dialog with author and document information.
Definition at line 1227 of file KoMainWindow.cpp.
| void KoMainWindow::slotEmailFile | ( | ) | [slot] |
Slot for eMailing the document using KMail.
This is a very simple extension that will allow any document that is currently being edited to be emailed using KMail.
Definition at line 1638 of file KoMainWindow.cpp.
| void KoMainWindow::slotExportFile | ( | ) | [slot] |
File --> Export.
This will call slotFileSaveAs(). To differentiate this from an ordinary call to slotFileSaveAs() call isExporting().
Definition at line 1733 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileClose | ( | ) | [virtual, slot] |
Closes the document.
Definition at line 1250 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileNew | ( | ) | [virtual, slot] |
Slot for opening a new document.
If the current document is empty, the new document replaces it. If not, a new shell will be opened for showing the document.
Definition at line 1175 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileOpen | ( | ) | [virtual, slot] |
Slot for opening a saved file.
If the current document is empty, the opened document replaces it. If not a new shell will be opened for showing the opened file.
Definition at line 1180 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileOpenRecent | ( | const KUrl & | url | ) | [virtual, slot] |
Slot for opening a file among the recently opened files.
If the current document is empty, the opened document replaces it. If not a new shell will be opened for showing the opened file.
Definition at line 1208 of file KoMainWindow.cpp.
| void KoMainWindow::slotFilePrint | ( | ) | [virtual, slot] |
Prints the actual document.
Definition at line 1268 of file KoMainWindow.cpp.
| void KoMainWindow::slotFilePrintPreview | ( | ) | [virtual, slot] |
Definition at line 1287 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileQuit | ( | ) | [virtual, slot] |
Closes the shell.
Definition at line 1263 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileSave | ( | ) | [virtual, slot] |
Saves the current document with the current name.
Definition at line 1215 of file KoMainWindow.cpp.
| void KoMainWindow::slotFileSaveAs | ( | ) | [virtual, slot] |
Saves the current document with a new name.
Definition at line 1221 of file KoMainWindow.cpp.
| void KoMainWindow::slotImportFile | ( | ) | [slot] |
File --> Import.
This will call slotFileOpen(). To differentiate this from an ordinary call to slotFileOpen() call isImporting().
Definition at line 1724 of file KoMainWindow.cpp.
| void KoMainWindow::slotNewToolbarConfig | ( | ) | [virtual, slot] |
Post toolbar config.
(Plug action lists back in, etc.)
Definition at line 1350 of file KoMainWindow.cpp.
| void KoMainWindow::slotProgress | ( | int | value | ) | [slot] |
Definition at line 1496 of file KoMainWindow.cpp.
| void KoMainWindow::slotReloadFile | ( | ) | [slot] |
Reload file.
Definition at line 1698 of file KoMainWindow.cpp.
| void KoMainWindow::slotRemoveView | ( | ) | [virtual, slot] |
Definition at line 1449 of file KoMainWindow.cpp.
| void KoMainWindow::slotSetOrientation | ( | ) | [virtual, slot] |
Definition at line 1490 of file KoMainWindow.cpp.
| void KoMainWindow::slotSplitView | ( | ) | [virtual, slot] |
View splitting stuff.
Definition at line 1416 of file KoMainWindow.cpp.
| void KoMainWindow::slotToolbarToggled | ( | bool | toggle | ) | [virtual, slot] |
Shows or hides a toolbar.
Definition at line 1371 of file KoMainWindow.cpp.
| void KoMainWindow::slotVersionsFile | ( | ) | [slot] |
This will call a dialogbox to add version to list of files.
Definition at line 1689 of file KoMainWindow.cpp.
| QLabel * KoMainWindow::statusBarLabel | ( | ) |
Get hold of the label in the statusbar, to write messages to it.
You can also insert other items in the status bar by using QStatusBar::addWidget.
Definition at line 1624 of file KoMainWindow.cpp.
| bool KoMainWindow::toolbarIsVisible | ( | const char * | tbName | ) |
- Returns:
- TRUE if the toolbar
tbNameis visible
Definition at line 1388 of file KoMainWindow.cpp.
| void KoMainWindow::updateCaption | ( | const QString & | caption, | |
| bool | mod | |||
| ) | [virtual] |
Updates the window caption based on the document info and path.
Definition at line 587 of file KoMainWindow.cpp.
| void KoMainWindow::updateCaption | ( | ) | [virtual] |
Update caption from document info - call when document info (title in the about page) changes.
Definition at line 569 of file KoMainWindow.cpp.
| void KoMainWindow::updateReloadFileAction | ( | KoDocument * | doc | ) |
Definition at line 499 of file KoMainWindow.cpp.
| void KoMainWindow::updateVersionsFileAction | ( | KoDocument * | doc | ) |
Definition at line 504 of file KoMainWindow.cpp.
| void KoMainWindow::viewFullscreen | ( | bool | fullScreen | ) | [virtual, slot] |
Toggle full screen on/off.
Definition at line 1480 of file KoMainWindow.cpp.
The documentation for this class was generated from the following files:
