umbrello
2.32.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <uml.h>
Signals | |
void | sigCutSuccessful () |
Static Public Member Functions | |
static UMLApp * | app () |
static bool | shuttingDown () |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | keyReleaseEvent (QKeyEvent *e) |
virtual void | customEvent (QEvent *e) |
void | handleCursorKeyReleaseEvent (QKeyEvent *e) |
void | saveOptions () |
void | readOptions () |
void | initActions () |
void | initStatusBar () |
void | initView () |
virtual bool | queryClose () |
virtual void | saveProperties (KConfigGroup &cfg) |
virtual void | readProperties (const KConfigGroup &cfg) |
void | updateLangSelectMenu (Uml::ProgrammingLanguage::Enum activeLanguage) |
Private Slots | |
void | setLang_actionscript () |
void | setLang_ada () |
void | setLang_cpp () |
void | setLang_csharp () |
void | setLang_d () |
void | setLang_idl () |
void | setLang_java () |
void | setLang_javascript () |
void | setLang_mysql () |
void | setLang_pascal () |
void | setLang_perl () |
void | setLang_php () |
void | setLang_php5 () |
void | setLang_postgresql () |
void | setLang_python () |
void | setLang_ruby () |
void | setLang_sql () |
void | setLang_tcl () |
void | setLang_vala () |
void | setLang_xmlschema () |
void | setLang_none () |
Private Member Functions | |
QMenu * | findMenu (const QString &name) |
QAction * | createZoomAction (int zoom, int currentZoom) |
void | setZoom (int zoom, bool withView=true) |
void | resetStatusMsg () |
void | setProgLangAction (Uml::ProgrammingLanguage::Enum pl, const char *name, const char *action) |
void | readOptionState () const |
void | initClip () |
void | initSavedCodeGenerators () |
void | createDiagram (Uml::DiagramType::Enum type) |
void | createBirdView (UMLView *view) |
Static Private Member Functions | |
static bool | canDecode (const QMimeData *mimeSource) |
Private Attributes | |
UMLAppPrivate * | m_d |
QMenu * | m_langSelect |
For selecting the active language. More... | |
QMenu * | m_zoomSelect |
Popup menu for zoom selection. More... | |
Uml::ProgrammingLanguage::Enum | m_activeLanguage |
Active language. More... | |
CodeGenerator * | m_codegen |
Active code generator. More... | |
CodeGenerationPolicy * | m_commoncodegenpolicy |
CodeGenPolicyExt * | m_policyext |
Active policy extension. More... | |
KSharedConfigPtr | m_config |
The configuration object of the application. More... | |
QPointer< UMLView > | m_view |
UMLDoc * | m_doc |
UMLListView * | m_listView |
Listview shows the current open file. More... | |
QDockWidget * | m_mainDock |
The widget which shows the diagrams. More... | |
QDockWidget * | m_listDock |
Contains the UMLListView tree view. More... | |
QDockWidget * | m_debugDock |
Contains the debug DocWindow widget. More... | |
QDockWidget * | m_documentationDock |
Contains the documentation DocWindow widget. More... | |
QDockWidget * | m_cmdHistoryDock |
Contains the undo/redo viewer widget. More... | |
QDockWidget * | m_propertyDock |
Contains the property browser widget. More... | |
QDockWidget * | m_logDock |
Contains the log window widget. More... | |
BirdViewDockWidget * | m_birdViewDock |
Contains the bird's eye view. More... | |
DocWindow * | m_docWindow |
Documentation window. More... | |
QListWidget * | m_logWindow |
Logging window. More... | |
BirdView * | m_birdView |
Bird View window. More... | |
QUndoView * | m_pQUndoView |
Undo / Redo Viewer. More... | |
RefactoringAssistant * | m_refactoringAssist |
Refactoring assistant. More... | |
KRecentFilesAction * | fileOpenRecent |
QAction * | printPreview |
QAction * | filePrint |
QAction * | editCut |
QAction * | editCopy |
QAction * | editPaste |
QAction * | editUndo |
QAction * | editRedo |
QAction * | viewShowTree |
QAction * | viewShowDebug |
QAction * | viewShowDoc |
QAction * | viewShowLog |
QAction * | viewShowCmdHistory |
QAction * | viewShowBirdView |
KActionMenu * | newDiagram |
QAction * | viewClearDiagram |
KToggleAction * | viewSnapToGrid |
KToggleAction * | viewShowGrid |
QAction * | viewExportImage |
QAction * | viewProperties |
QAction * | zoom100Action |
QAction * | m_langAct [Uml::ProgrammingLanguage::Reserved+1] |
KAction * | deleteSelectedWidget |
KAction * | deleteDiagram |
QToolButton * | m_newSessionButton |
KMenu * | m_diagramMenu |
WorkToolBar * | m_toolsbar |
QTimer * | m_clipTimer |
QTimer * | m_copyTimer |
bool | m_loading |
True if the application is opening an existing document. More... | |
QStackedWidget * | m_viewStack |
KTabWidget * | m_tabWidget |
QVBoxLayout * | m_layout |
QString | m_imageMimeType |
Default mime type to use for image export. More... | |
SettingsDialog * | m_settingsDialog |
The global UML settings dialog. More... | |
UMLViewImageExporterAll * | m_imageExporterAll |
Used to export all the views. More... | |
QLabel * | m_zoomValueLbl |
QPushButton * | m_pZoomOutPB |
QPushButton * | m_pZoomInPB |
StatusBarToolButton * | m_pZoomFitSBTB |
StatusBarToolButton * | m_pZoomFullSBTB |
QSlider * | m_pZoomSlider |
QLabel * | m_statusBarMessage |
XhtmlGenerator * | m_xhtmlGenerator |
KUndoStack * | m_pUndoStack |
UndoStack used to store actions, to provide Undo/Redo feature. More... | |
bool | m_undoEnabled |
Undo enabled flag. More... | |
bool | m_hasBegunMacro |
Macro creation flag. More... | |
QPointer< DiagramPrintPage > | m_printSettings |
printer diagram settings More... | |
QPrinter * | m_printer |
print instance More... | |
Static Private Attributes | |
static UMLApp * | s_instance |
The last created instance of this class. More... | |
static bool | s_shuttingDown = false |
Friends | |
class | UMLAppPrivate |
class | UMLView |
The base class for UML application windows. It sets up the main window and reads the config file as well as providing a menubar, toolbar and statusbar. A list of UMLView instances creates the center views, which are connected to the window's Doc object. The handling of views is realized with two different widgets:
|
explicit |
Constructor. Calls all init functions to create the application.
UMLApp::~UMLApp | ( | ) |
Standard deconstructor.
Uml::ProgrammingLanguage::Enum UMLApp::activeLanguage | ( | ) | const |
Get the language for import and code generation.
bool UMLApp::activeLanguageIsCaseSensitive | ( | ) | const |
Return true if the active language is case sensitive.
QString UMLApp::activeLanguageScopeSeparator | ( | ) | const |
Return the target language depedent scope separator.
|
static |
Get the last created instance of this class.
void UMLApp::beginMacro | ( | const QString & | text | ) |
Begin a U/R command macro
|
staticprivate |
Returns whether we can decode the given mimesource
void UMLApp::clearUndoStack | ( | ) |
Removes all entries from the UndoStack and RedoStack and disables the undo and redo actions.
CodeGenerationPolicy * UMLApp::commonPolicy | ( | ) | const |
Returns the default code generation policy.
KConfig * UMLApp::config | ( | ) | const |
Return the config data.
|
private |
Helper function to create diagram name and the diagram itself.
type | the type of diagram |
CodeGenerator* UMLApp::createGenerator | ( | ) |
Helper method to create the zoom actions.
UMLView * UMLApp::currentView | ( | ) | const |
Get the current view. This may return a null pointer (when no view was previously specified.)
|
protectedvirtual |
Event handler to receive custom events. It handles events such as exporting all views from command line (in that case, it executes the exportAllViews method in the event).
QCursor UMLApp::defaultCursor | ( | ) | const |
Uml::ProgrammingLanguage::Enum UMLApp::defaultLanguage | ( | ) | const |
Return the default code generation language as configured by KConfig. If the activeLanguage is not found in the KConfig then use Uml::ProgrammingLanguage::Cpp as the default.
UMLDoc * UMLApp::document | ( | ) | const |
Returns a pointer to the current document connected to the KMainWindow instance. Used by the View class to access the document object's methods.
DocWindow * UMLApp::docWindow | ( | ) | const |
Returns the doc window used.
bool UMLApp::editCutCopy | ( | bool | bFromView | ) |
Carries out the cut/copy command with different action performed depending on if from view or list view. Cut/Copy are the same. It is up to the caller to delete/cut the selection..
If the operation is successful, the signal sigCutSuccessful() is emitted.
Callers should connect to this signal to know what to do next.
void UMLApp::enablePrint | ( | bool | enable | ) |
Set whether to allow printing. It will enable/disable the menu/toolbar options.
enable | Set whether to allow printing. |
void UMLApp::enableRedoAction | ( | bool | enable | ) |
Set whether to allow Redo. It will enable/disable the menu/toolbar options.
enable | Set whether to allow printing. |
void UMLApp::enableUndo | ( | bool | enable | ) |
Set the state of undo support.
void UMLApp::enableUndoAction | ( | bool | enable | ) |
Set whether to allow Undo. It will enable/disable the menu/toolbar options.
enable | Set whether to allow printing. |
void UMLApp::endMacro | ( | ) |
End an U/R command macro
void UMLApp::executeCommand | ( | QUndoCommand * | cmd | ) |
Execute a command and push it in the stack.
|
private |
Searches for a menu with the given name.
name | The name of the menu to search for (name, not text) |
CodeGenerator * UMLApp::generator | ( | ) | const |
Gets the appropriate CodeGenerator.
|
protected |
Helper method for handling cursor key release events (refactoring). TODO Move this to UMLWidgetController?
QString UMLApp::imageMimeType | ( | ) | const |
Gets the default mime type for all diagrams that are exported as images.
void UMLApp::importFiles | ( | QStringList & | fileList, |
const QString & | rootPath = QString() |
||
) |
Import the source files that are in fileList.
|
protected |
Initializes the KActions and the status bar of the application and calls setupGUI(). Note: Check also the file umbrelloui.rc and add actions there too.
|
private |
Initialize Qt's global clipboard support for the application.
void UMLApp::initGenerator | ( | ) |
Reads the activeLanguage from the KConfig and calls updateLangSelectMenu()
|
private |
|
protected |
Sets up the statusbar for the main window by initializing a statuslabel.
|
protected |
Creates the centerwidget of the KMainWindow instance and sets it as the view.
bool UMLApp::isCutCopyState | ( | ) | const |
Returns the state on Cut/Copy.
bool UMLApp::isPasteState | ( | ) | const |
Returns the paste state.
bool UMLApp::isRedoActionEnabled | ( | ) | const |
Returns the redo state.
bool UMLApp::isSimpleCodeGeneratorActive | ( | ) | const |
Determines if SimpleCodeGenerator is active.
bool UMLApp::isUndoActionEnabled | ( | ) | const |
Returns the undo state. Is used for popupmenu of a view.
bool UMLApp::isUndoEnabled | ( | ) | const |
Returns the state of undo support.
|
protectedvirtual |
Event handler to receive key press events.
|
protectedvirtual |
Event handler for key release.
UMLListView * UMLApp::listView | ( | ) | const |
Returns a pointer to the list view.
QListWidget * UMLApp::logWindow | ( | ) | const |
Returns the log window used.
QWidget * UMLApp::mainViewWidget | ( | ) | const |
Returns the widget used as the parent for UMLViews.
void UMLApp::openDocumentFile | ( | const KUrl & | url = KUrl() | ) |
Opens a file specified by commandline option.
CodeGenPolicyExt * UMLApp::policyExt | ( | ) | const |
Returns the CodeGenPolicyExt object.
|
protectedvirtual |
queryClose is called by KMainWindow on each closeEvent of a window. Counter to the default implementation (which only returns true), this calls saveModified() on the document object to ask if the document shall be saved if Modified; on cancel the closeEvent is rejected.
|
protected |
Read general Options again and initialize all variables like the recent file list.
|
private |
Reads from the config file the options state. Not in readOptions as it needs to be read earlier than some of the other options, before some items are created.
|
protectedvirtual |
Reads the session config file and restores the application's state including the last opened files and documents by reading the temporary files saved by saveProperties()
void UMLApp::redo | ( | ) |
Redo last 'undone' command. Is called from popupmenu of a view.
void UMLApp::refactor | ( | UMLClassifier * | classifier | ) |
Call the refactoring assistant on a classifier.
classifier | Pointer to the classifier to refactor. |
|
private |
Helper method to reset the status bar message.
|
protected |
Save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration file.
|
protectedvirtual |
Saves the window properties for each open window during session end to the session config file, including saving the currently opened file by a temporary filename provided by KApplication.
void UMLApp::setActiveLanguage | ( | Uml::ProgrammingLanguage::Enum | pl | ) |
Set the language for which code will be generated.
pl | The name of the language to set |
void UMLApp::setDiagramMenuItemsState | ( | bool | bState | ) |
Sets the state of the view properties menu item.
bState | Boolean, true to enable the view properties item. |
void UMLApp::setGenerator | ( | CodeGenerator * | gen, |
bool | giveWarning = true |
||
) |
CodeGenerator * UMLApp::setGenerator | ( | Uml::ProgrammingLanguage::Enum | pl | ) |
Auxiliary function for UMLDoc::loadExtensionsFromXMI(): Return the code generator of the given language if it already exists; if it does not yet exist then create it and return the newly created generator. It is the caller's responsibility to load XMI into the newly created generator.
void UMLApp::setImageMimeType | ( | const QString & | mimeType | ) |
Sets the default mime type for all diagrams that are exported as images.
mimeType | the mime type |
|
privateslot |
Slots for connection to the QActions of the m_langSelect menu.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
void UMLApp::setModified | ( | bool | modified | ) |
Sets whether the program has been modified. This will change how the program saves/exits.
modified | true - modified. |
void UMLApp::setPolicyExt | ( | CodeGenPolicyExt * | policy | ) |
Sets the CodeGenPolicyExt object.
|
private |
Helper method to setup the programming language action.
|
slot |
Prepares the zoom menu for display.
Set the zoom factor of the current diagram.
zoom | Zoom factor in percentage. |
withView | also setup the currently displayed diagram |
|
static |
Return true during shutdown, i.e. during ~UMLApp().
|
signal |
|
slot |
Create this view.
|
slot |
Calls the active code generator to add its default datatypes.
|
slot |
Bottom Alignment
|
slot |
Horizontal Distribute Alignment
|
slot |
Horizontal Middle Alignment
|
slot |
Left Alignment
|
slot |
Right Alignment
|
slot |
Top Alignment
|
slot |
Vertical Distribute Alignment
|
slot |
Vertical Middle Alignment
|
slot |
Commits the changes from the global preferences dialog.
|
slot |
Slot for changes of the bird view's rectangle by moving.
delta | change value for a move |
|
slot |
Make the tab on the left of the current one the active one.
|
slot |
Make the tab on the right of the current one the active one.
|
slot |
Create this view.
|
slot |
Class wizard menu selection.
|
slot |
Notification of changed clipboard data.
|
slot |
Close the current diagram. Clicked on tab close button.
tab | Widget's tab to close |
|
slot |
Create this view.
|
slot |
Create this view.
|
slot |
Slot for enabling cut and copy to clipboard.
|
slot |
Menu selection for current view and contained widgets properties.
|
slot |
The displayed diagram has changed.
|
slot |
Menu selection for clear current view.
|
slot |
Menu selection for exporting current view as an image.
|
slot |
Menu selection for current view show grid property.
|
slot |
Menu selection for current view snap to grid property.
|
slot |
Deletes the current diagram. Called from menu action.
|
slot |
Deletes selected widgets or list view items.
|
slot |
Create this view.
|
slot |
Put the marked text/object into the clipboard.
|
slot |
Put the marked text/object into the clipboard and remove it from the document.
|
slot |
Paste the clipboard into the document.
|
slot |
Reverts the document back to the state it was prior to the last undo.
|
slot |
Reverts the document back to the state it was prior to the last action performed by the user.
|
slot |
Create this view.
|
slot |
Runs the code generation wizard.
|
slot |
Asks for saving if the file is modified, then closes the current file and window.
|
slot |
Exports the current model to docbook in a subdir of the current model directory named from the model name.
|
slot |
Exports the current model to XHTML in a subdir of the current model directory named from the model name.
|
slot |
Clears the document in the actual view to reuse it as the new document.
|
slot |
Open a file and load it into the document.
|
slot |
Opens a file from the recent files menu.
|
slot |
Print the current file.
|
slot |
Closes all open windows by calling close() on each memberList item until the list is empty, then quits the application. If queryClose() returns false because the user canceled the saveModified() dialog, the closing aborts.
|
slot |
Save a document.
|
slot |
Save a document by a new filename.
|
slot |
find text
|
slot |
Slot for showing next find result
|
slot |
Slot for showing previous find result
|
slot |
Generate code for all classes.
|
slot |
Import class menu selection.
|
slot |
Runs the code importing wizard.
|
slot |
Import project menu selection.
|
slot |
Move the current tab left.
|
slot |
Move the current tab right.
|
slot |
Create this view.
|
slot |
open file in internal editor
file | path to the file to open |
startCursor | cursor position for selection start |
endCursor | cursor position for selection end |
|
slot |
Shows the global preferences dialog.
|
slot |
Print preview
|
slot |
Print preview painting slot
|
slot |
Slot for showing a print settings dialog.
|
slot |
Select all widgets on the current diagram.
|
slot |
Create this view.
|
slot |
Set the zoom factor of the current diagram.
action | Action which is called. |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
The show grid value has been changed.
|
slot |
|
slot |
|
slot |
The snap to grid value has been changed.
|
slot |
Create this view.
|
slot |
Changes the statusbar contents for the standard label permanently, used to indicate current actions.
text | The text that is displayed in the statusbar |
|
slot |
Called when the tab has changed.
tab | The changed tab widget |
|
slot |
Register new views (aka diagram) with the GUI so they show up in the menu.
|
slot |
Create this view.
|
slot |
Menu selection for exporting all views as images.
|
slot |
This slot deletes the current XHTML documentation generator as soon as this one signals that it has finished.
status | true if successful else false |
|
slot |
Set zoom to 100%.
|
slot |
Set zoom to fit the view.
|
slot |
Increase the zoom factor of the current diagram.
|
slot |
Decrease the zoom factor of the current diagram.
Connected to by the zoomAction, a value of between 300 and 2200 is scaled to zoom to between 9% and 525%. The min and max values of the slider are hard coded in the statusbar slider.
QString UMLApp::statusBarMsg | ( | ) | const |
Returns the current text in the status bar.
KTabWidget * UMLApp::tabWidget | ( | ) |
Return the tab widget.
void UMLApp::undo | ( | ) |
Undo last command. Is called from popupmenu of a view.
|
protected |
Updates the Menu for language selection and sets the active language. If no active language is found or if it is not one of the registered languages it tries to fall back to Cpp
void UMLApp::viewCodeDocument | ( | UMLClassifier * | classifier | ) |
Call the code viewing assistant on a given UMLClassifier.
classifier | Pointer to the classifier to view. |
WorkToolBar * UMLApp::workToolBar | ( | ) | const |
Returns the toolbar being used.
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Active language.
|
private |
Bird View window.
|
private |
Contains the bird's eye view.
|
private |
|
private |
Contains the undo/redo viewer widget.
|
private |
Active code generator.
|
private |
|
private |
The configuration object of the application.
|
private |
|
private |
|
private |
Contains the debug DocWindow widget.
|
private |
|
private |
Doc represents your actual document and is created only once. It keeps information such as filename and does the loading and saving of your files.
|
private |
Contains the documentation DocWindow widget.
|
private |
Documentation window.
|
private |
Macro creation flag.
|
private |
Used to export all the views.
|
private |
Default mime type to use for image export.
|
private |
|
private |
For selecting the active language.
|
private |
Layout supports the dynamic management of the diagram representation (tabbed/stacked) if tabbed diagrams is enabled it contains m_tabWidget if tabbed diagrams is disabled it contains m_viewStack
|
private |
Contains the UMLListView tree view.
|
private |
Listview shows the current open file.
|
private |
True if the application is opening an existing document.
|
private |
Contains the log window widget.
|
private |
Logging window.
|
private |
The widget which shows the diagrams.
|
private |
|
private |
Active policy extension.
|
private |
Undo / Redo Viewer.
|
private |
print instance
|
private |
printer diagram settings
|
private |
Contains the property browser widget.
|
private |
UndoStack used to store actions, to provide Undo/Redo feature.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Refactoring assistant.
|
private |
The global UML settings dialog.
|
private |
|
private |
Shows, and is parent of, all the UMLViews (diagrams) if tabbed diagrams are enabled.
|
private |
|
private |
Undo enabled flag.
|
private |
View is the main widget which represents your working area. The View class should handle all events of the view widget. It is kept empty so you can create your view according to your application's needs by changing the view class.
|
private |
Shows, and is parent of, all the UMLViews (diagrams) if tabbed diagrams are not enabled.
|
private |
The running XHTML documentation generator. Null when no generation is running.
|
private |
Popup menu for zoom selection.
|
private |
Statusbar items
|
private |
|
private |
|
staticprivate |
The last created instance of this class.
Static pointer, holding the last created instance.
|
staticprivate |
Static flag returned by static function shuttingDown(). It is intentionally an extra static member because it is queried after calling the UMLApp destructor. Member accesses shall be avoided during destruction.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |