#include <digestapplication.h>
Inheritance diagram for DigestApplication:

Public Slots | |
| void | newDiagram () |
| void | openDiagram () |
| void | closeDiagram (MDIChildBase *child=0) |
| bool | saveDiagram (MDIChildBase *child=0) |
| bool | saveDiagramAs (MDIChildBase *child=0) |
| bool | saveAllDiagrams () |
| void | closeActiveWindow () |
| void | setElementInspectorVisible (bool visible) |
| void | showAppPrefs () |
| void | showAppHelp () |
| void | showAppAbout () |
| void | appQuit () |
Signals | |
| void | activeChildChanged (MDIChildBase *child) |
| void | elementInspectorVisibilityToggled () |
Public Member Functions | |
| DigestApplication (int &argc, char **argv) | |
| virtual | ~DigestApplication () |
| bool | event (QEvent *e) |
| const QHash< MDIDiagramWindow *, DiagramMvcStruct > & | managedDiagrams () const |
| bool | isElementInspectorVisible () const |
| virtual bool | childWindowCloseRequest (MDIChildBase *child) |
| virtual void | setActiveChild (MDIChildBase *child) |
Static Public Member Functions | |
| static QString | saneDefaultPath () |
Classes | |
| struct | DiagramMvcStruct |
| DigestApplication::DigestApplication | ( | int & | argc, | |
| char ** | argv | |||
| ) |
| DigestApplication::~DigestApplication | ( | ) | [virtual] |
| bool DigestApplication::event | ( | QEvent * | e | ) |
| const QHash<MDIDiagramWindow*, DiagramMvcStruct>& DigestApplication::managedDiagrams | ( | ) | const [inline] |
| bool DigestApplication::isElementInspectorVisible | ( | ) | const |
This is all that external objects need to know about the element inspector.
We don't expose its class to anyone else, nor the burden of having to know how to manage it.
If our pointer to the element inspector is null (and since we use a guarded pointer, that would mean that it's not "alive"), this will return false (valid scenario).
| bool DigestApplication::childWindowCloseRequest | ( | MDIChildBase * | child | ) | [virtual] |
Re-implemented form MDIApplication.
Looks after the actual clean-up of the diagram (unlike closeDiagram(), which just initiates the close).
Returns false if the request is rejected, otherwise it returns true.
Reimplemented from MDIApplication.
| void DigestApplication::setActiveChild | ( | MDIChildBase * | child | ) | [virtual] |
Re-implemented form MDIApplication.
Emits activeChildChanged EVEN IF the child is null (it is important to know if there are no diagram windows!).
Reimplemented from MDIApplication.
| QString DigestApplication::saneDefaultPath | ( | ) | [static] |
| void DigestApplication::activeChildChanged | ( | MDIChildBase * | child | ) | [signal] |
Emits activeChildChanged EVEN IF the child is non-null (it is important to know if there are no diagram windows!).
| void DigestApplication::elementInspectorVisibilityToggled | ( | ) | [signal] |
| void DigestApplication::newDiagram | ( | ) | [slot] |
Create new diagram and set it as active.
| void DigestApplication::openDiagram | ( | ) | [slot] |
| void DigestApplication::closeDiagram | ( | MDIChildBase * | child = 0 |
) | [slot] |
Tells the active child DOCUMENT window to close, if there is one.
If "child" is null, then activeChildWindow() will be used.
Note: This differs from closeActiveWindow() in that this method only deals with the document windows, not others such as the preferences and about box dialogs. On File->Close, closeActiveWindow() should get called, not this.
| bool DigestApplication::saveDiagram | ( | MDIChildBase * | child = 0 |
) | [slot] |
This will be dispatched to the active child window, if there is one.
If "child" is null, then activeChildWindow() will be used.
If the user hasn't save the file before, then they will be presented with the "Save As" dialog, by saveDiagramAs().
Returns false IFF the user was presented with a "Save As" dialog and then clicked the "Cancel" button or escaped the dialog in any other way. Hence, if the user isn't presented with the "Save As" dialog but the save process actually failed, then this WILL return true. It's the responsibility of the diagram controller to handle those types of errors.
| bool DigestApplication::saveDiagramAs | ( | MDIChildBase * | child = 0 |
) | [slot] |
This will be dispatched to the active child window, if there is one.
If "child" is null, then activeChildWindow() will be used.
Returns false if the use cancels the save dialog or if the filename is empty, else returns true.
| bool DigestApplication::saveAllDiagrams | ( | ) | [slot] |
Calls saveDiagram() on all childWindows().
Returns false IFF the user cancels any of the "Save As" dialogs (should they be shown one), in which case this method will also be immediately stopped.
| void DigestApplication::closeActiveWindow | ( | ) | [slot] |
Note: This differs from closeNetwork() in that this method accounts for not only document windows but also for the preference & about boxes (BTW: these are non-modal on Mac OS X). This is what the action manager should call on File->Close, as to keep the app consistent with other apps on Mac OS X (i.e. Command+W closes any window other than tool windows). This may need altering for other windowing environments.
| void DigestApplication::setElementInspectorVisible | ( | bool | visible | ) | [slot] |
This should be called by the element inspector when it is made visible or explicitly hidden. It should also be called by an appropriate menu action.
Will emit elementInspectorVisibilityToggled() before returning.
| void DigestApplication::showAppPrefs | ( | ) | [slot] |
Shows the non-modal preferences box dialog.
If the preferences dialog is already open (but possibly behind another window), then it will be brought to the foreground.
The dialog is set to automatically delete itself when it is closed, which will null-ify our guarded pointer, allowing a new one to be created later.
| void DigestApplication::showAppHelp | ( | ) | [slot] |
| void DigestApplication::showAppAbout | ( | ) | [slot] |
Shows the non-modal about box dialog. It looks and behaves according to Apple HIG.
If the about box is already open (but possibly behind another window), then it will be brought to the foreground.
The dialog is set to automatically delete itself when it is closed, which will null-ify our guarded pointer, allowing a new one to be created later.
| void DigestApplication::appQuit | ( | ) | [slot] |
Try to quit the application immediately.
This does NOT depend on this being the last window to close.
All MVC sets (diagrams, diagram controllers and diagram windows) will be deleted, as WE will close all of the diagram windows.
This allows the user to click "Cancel" in any "Save As" dialog or escape them in any other way, which will terminate the quit process.
1.5.2