|
|
* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * *************************************************************************
| UMLView (QWidget * parent, UMLViewData * pData)
| UMLView |
Constructor for the main view
| ~UMLView ()
| ~UMLView |
Destructor for the main view
| void SynchronizeData ()
| SynchronizeData |
Synchronize the views data. Call before saving or a full cip of the view.
| UMLDoc * getDocument ()
| getDocument |
[const]
returns a pointer to the document connected to the view instance. Mind that this method requires a UMLApp instance as a parent widget to get to the window document pointer by calling the UMLApp::getDocument() method.
See also: getDocument
| void print (KPrinter *pPrinter, QPainter & pPainter)
|
contains the implementation for printing functionality
| Diagram_Type getType ()
| getType |
Returns the type of diagram this is.
Returns: Returns the type of diagram this is.
| int getID ()
| getID |
Returns the ID of thios diagram.
Returns: Returns the ID of thios diagram.
| void setID (int NewID)
| setID |
Sets the ID of this diagram.
Returns: Sets the ID of this diagram.
| void viewportMouseReleaseEvent (QMouseEvent *me)
| viewportMouseReleaseEvent |
Overrides the standard operation.
| void viewportMouseMoveEvent (QMouseEvent *me)
| viewportMouseMoveEvent |
Overrides the standard operation.
| void hideEvent (QHideEvent *he)
| hideEvent |
Overrides the standard operation.
| void showEvent (QShowEvent *se)
| showEvent |
Overrides the standard operation.
| MyListView * getListView ()
| getListView |
Returns a reference to the UMLView class.
Returns: Returns a reference to the UMLView class.
| bool setAssoc (UMLWidget *w)
| setAssoc |
Sets an association to include the given widget. If this is the second widget set for the association it creates the association.
Parameters:
| w | The widget to set for the association. |
| void checkMessages (UMLWidget * w)
| checkMessages |
Sees if a message is relevant to the given widget. If it does delete it.
Parameters:
| w | The widget to check messages against. |
| bool serialize (QDataStream *s, bool archive)
| serialize |
Use to save or load this classes information
Parameters:
| s | Pointer to the datastream (file or clip) to save/load from. |
| archive | If true will save the classes information, else will load the information. Archive to true to save to file or to clip |
| long getClipSizeOf ()
| getClipSizeOf |
[virtual]
Returns the amount of bytes needed to serialize an instance object to the clipboard
| UMLWidget * findWidget (int id)
| findWidget |
Finds a widget with the given ID.
Parameters:
| id | The ID of the widget to find. |
Returns: Returns the widget found, returns 0 if no widget found.
| void removeWidget (UMLWidget * o)
| removeWidget |
Remove a widget from view.
Parameters:
| o | The widget to remove. |
| void setBGColor (QColor color)
| setBGColor |
Set the background color.
Parameters:
| color | The color to use. |
| void setLineColor (QColor color)
| setLineColor |
Sets the line color.
Parameters:
| color | The color to use. |
| void setFont ( QFont font )
| setFont |
Sets the font for the view and all the widgets on the view.
| QColor getBGColor ()
| getBGColor |
Returns the background color.
Returns: Returns the background color.
| QColor getLineColor ()
| getLineColor |
Returns the line color.
Returns: Returns the line color.
| void setSelected (UMLWidget * w, QMouseEvent * me)
| setSelected |
Sets a widget to a selected state and adds it to a list of selected widgets.
Parameters:
| w | The widget to set to selected. |
| me | The mouse event containing the information about the selection. |
| void clearSelected ()
| clearSelected |
Clear the selected widgets list.
| void moveSelected (UMLWidget * w, int x, int y)
| moveSelected |
Move all the selected widgets.
Parameters:
| w | The widget in the selected list to move in reference to. |
| x | The distance to move horizontally. |
| y | The distance to move vertically. |
| int getSelectCount ()
| getSelectCount |
Return the amount of widgets selected.
Returns: Return the amount of widgets selected.
| void selectionUseFillColor (bool useFC)
| selectionUseFillColor |
Set the useFillColor variable to all selected widgets
Parameters:
| useFC | The state to set the widget to. |
| void selectionSetFont ( QFont font )
| selectionSetFont |
Set the font for all the currently selected items.
| void deleteSelection ()
| deleteSelection |
Delete the selected widgets list and the widgets in it.
| int getLocalID ()
| getLocalID |
Return a unique ID for the diagram. Used by the ObjectWidget class.
Returns: Return a unique ID for the diagram.
| bool widgetOnDiagram (int id)
| widgetOnDiagram |
Returns whether a widget is already on the diagram.
Parameters:
| id | The id of the widget to check for. |
Returns: Returns true if the widget is already on the diagram, false if not.
| void setPos (QPoint _pos)
| setPos |
Set the pos variable. Used internally to keep track of the cursor.
Parameters:
| _pos | The position to set to. |
| void setMenu ()
| setMenu |
Sets the popup menu to use.
| bool GetAssocWidgets (AssociationWidgetList & Associations)
| GetAssocWidgets |
Fills the list parameter with the Associations contained in this UMLView.
Returns: Returns true if the list was filled without problems
| void resetToolbar ()
| resetToolbar |
Reset the toolbar.
| bool getPaste ()
| getPaste |
Returns the status on whether in a paste state.
Returns: Returns the status on whether in a paste state.
| void updateNoteWidgets ()
| updateNoteWidgets |
FIXME Gustavo ???
| UMLObjectList* getUMLObjects ()
| getUMLObjects |
Returns a List of all the UMLObjects(Use Cases, Concepts and Actors) in the View
| bool Activate ()
| Activate |
Activate all the objects and associations after a clipSerialize from the clipboard
| bool GetSelectedAssocDatas (AssociationWidgetDataList & AssociationWidgetDataList)
| GetSelectedAssocDatas |
Fills the List with all the selected associations from the diagram
| bool GetSelectedWidgets (UMLWidgetList& WidgetList)
| GetSelectedWidgets |
Fills the List with all the selected widgets from the diagram
| bool GetSelectedWidgetDatas (UMLWidgetDataList& WidgetDataList)
| GetSelectedWidgetDatas |
Fills the List with all the selected widget Datas from the diagram
| bool CreateWidget (UMLWidgetData* WidgetData)
| CreateWidget |
Creates an UMLWidget from the UMLWidgetData
| bool CreateAssoc (AssociationWidgetData* AssocData)
| CreateAssoc |
Creates an association from a AssociationWidgetData from the clipboard, Activate must be called to make this assoc visible
| bool ActivateAfterSerialize ( bool bUseLog = false )
| ActivateAfterSerialize |
Activate the view after a load a new file (serialize)
Returns: Return true if the activate was succesful
| IDChangeLog* GetLocalIDChangeLog ()
| GetLocalIDChangeLog |
FIXME Gustavo ???
| void EndPartialWidgetPaste ()
| EndPartialWidgetPaste |
FIXME Gustavo ???
| void BeginPartialWidgetPaste ()
| BeginPartialWidgetPaste |
FIXME Gustavo ???
| void RemoveAssoc (AssociationWidget* pAssoc)
| RemoveAssoc |
Removes a AssociationWidget from a diagram
| void RemoveAssociations (UMLWidget* Widget)
| RemoveAssociations |
Removes all the associations related to Widget
| void SelectAssociations (bool bSelect)
| SelectAssociations |
Sets each association as selected if the widgets it associates are selected
| void GetWidgetAssocs (UMLObject* Obj, AssociationWidgetList & Associations)
| GetWidgetAssocs |
Fills Associations with all the associations that includes a widget related to object
| void RemoveAllAssociations ()
| RemoveAllAssociations |
Removes All the associations of the diagram
| void RemoveAllWidgets ()
| RemoveAllWidgets |
Removes All the widgets of the diagram
| void setUseFillColor ( bool ufc )
| setUseFillColor |
Sets whether to use the fill/background color
| bool getUseFillColor ()
| getUseFillColor |
Returns whether to use the fill/background color
| SettingsDlg::OptionState getOptionState ()
| getOptionState |
Returns the options being used.
| void setOptionState ( SettingsDlg::OptionState options)
| setOptionState |
Sets the options to be used.
| QString GetName ()
| GetName |
Returns a copy of m_Name
| void SetName (QString& strName)
| SetName |
Set the UMLView's m_Name property
| AssociationWidgetList * getAssociationWidgetList ()
| getAssociationWidgetList |
Returns the list contianing all the association widgets on this view.
| void showDocumentation ( UMLObject * object, bool overwrite )
| showDocumentation |
Calls the same method in the DocWindow.
| void showDocumentation ( UMLWidget * widget, bool overwrite )
| showDocumentation |
Calls the same method in the DocWindow.
| void showDocumentation ( AssociationWidget * widget, bool overwrite )
| showDocumentation |
Calls the same method in the DocWindow.
| void updateDocumentation ( bool clear )
| updateDocumentation |
Calls the same method in the DocWindow.
| QString getDoc ()
| getDoc |
Returns the documentation for the view.
| void setDoc ( QString doc )
| setDoc |
Sets the documentation for the view.
| void getDiagram (QPixmap & diagram)
| getDiagram |
Returns the PNG picture of the paste operation.
Parameters:
| diagram | the class to store PNG picture of the paste operation. |
| void copyAsImage (QPixmap*& pix)
| copyAsImage |
Returns the PNG picture of the paste operation.
| void exportImage (const KURL& url)
| exportImage |
Saves a png file to the given url.
| bool addAssociation ( AssociationWidgetData* AssocData )
| addAssociation |
Adds an association to the view from the given data. Use this method when pasting.
| bool addWidget ( UMLWidgetData * pWidgetData )
| addWidget |
Adds a widget to the view from the given data. Use this method when pasting.
| UMLViewData * getData ()
| getData |
Returns the views data.
| QPoint getPastePoint ()
| getPastePoint |
Returns the offset point at which to place the paste from clipboard. Just add the amount to your co-ords. Only call this straight after the event, the value won't stay valid. Should only be called by Assoc widgets at the moment. no one else needs it.
| void setStartedCut ()
| setStartedCut |
Called by the view or any of its children when they start a cut operation.
| void createAutoAssociations ( UMLWidget * widget )
| createAutoAssociations |
Creates automatically any Associations that the given UMLWidget may have on any diagram. This method is used when you just add the UMLWidget to a diagram.
| bool getSnapToGrid ()
| getSnapToGrid |
Return whether to use snap to grid.
| bool getShowSnapGrid ()
| getShowSnapGrid |
Returns whether to show snap grid.
| int getSnapX ()
| getSnapX |
Returns the x grid size.
| int getSnapY ()
| getSnapY |
Returns the y grid size.
| void setSnapX ( int x )
| setSnapX |
Sets the x grid size.
| void setSnapY ( int y )
| setSnapY |
Sets the y grid size.
| void setSnapToGrid ( bool bSnap )
| setSnapToGrid |
Sets whether to use snap to grid.
| void setShowSnapGrid ( bool bShow )
| setShowSnapGrid |
Sets whether to to show snap grid.
| bool saveToXMI ( QDomDocument & qDoc, QDomElement & qElement )
| saveToXMI |
Saves the class to an XMI file.
| bool showPropDialog ()
| showPropDialog |
Shows the properties dialog for the view.
| void setConceptWidgetOptions ( ClassOptionsPage * page )
| setConceptWidgetOptions |
Sets some options for all the ConceptWidget on the view.
| void checkSelections ()
| checkSelections |
Call before copying/cutting selected widgets. This will make sure any associations/message selected will make sure both the widgets widgets they are connected to are selected.
| void addSeqLine ( SeqLineWidget * pLine )
| addSeqLine |
Adds a sequence line to the list.
| void removeSeqLine ( SeqLineWidget * pLine )
| removeSeqLine |
Removes a sequence line to the list.
| QPtrList<MessageWidget> getMessageWidgetList ()
| getMessageWidgetList |
Returns a list of all the messagewidgets on the view.
| void closeEvent ( QCloseEvent * e )
| closeEvent |
[protected]
Override standard method.
| void viewportDragEnterEvent (QDragEnterEvent *e)
| viewportDragEnterEvent |
[protected]
Override standard method.
| void viewportDropEvent (QDropEvent *e)
| viewportDropEvent |
[protected]
Override standard method.
| UMLWidget * onWidgetLine ( QPoint point )
| onWidgetLine |
[protected]
Determine whether on a sequence diagram we have clicked on a line of an Object.
Returns: Returns the widget thats line was clicked on. Returns 0 if no line was clicked on.
| void init ()
| init |
[protected]
Initializes key variables.
| void viewportMouseDoubleClickEvent (QMouseEvent * me)
| viewportMouseDoubleClickEvent |
[protected]
Override standard method.
| QRect getDiagramRect ()
| getDiagramRect |
[protected]
Gets the smallest area to print.
Returns: Returns the smallest area to print.
| void viewportMousePressEvent (QMouseEvent * me)
| viewportMousePressEvent |
[protected]
Override standard method.
| void selectWidgets ()
| selectWidgets |
[protected]
Selects all the widgets within an internally kept rectangle.
| QPoint m_Pos | m_Pos |
[protected]
| QPoint m_LineToPos | m_LineToPos |
[protected]
| bool m_bCreateObject | m_bCreateObject |
[protected]
| bool m_bDrawRect | m_bDrawRect |
[protected]
| bool m_bDrawSelectedOnly | m_bDrawSelectedOnly |
[protected]
| bool m_bPaste | m_bPaste |
[protected]
| ListPopupMenu * m_pMenu | m_pMenu |
[protected]
| QList<UMLWidget> m_SelectedList | m_SelectedList |
[protected]
| AssociationWidget * m_pMoveAssoc | m_pMoveAssoc |
[protected]
| bool m_bStartedCut | m_bStartedCut |
[protected]
| SeqLineWidget * m_pSeqLine | m_pSeqLine |
[protected]
| WorkToolBar::ToolBar_Buttons m_CurrentCursor | m_CurrentCursor |
| void slotToolBarChanged (int c)
| slotToolBarChanged |
[slot]
Holds a list of all the sequence lines on a sequence diagram.
| void slotObjectCreated (UMLObject * o)
| slotObjectCreated |
[slot]
| void slotObjectRemoved (UMLObject * o)
| slotObjectRemoved |
[slot]
| void slotMenuSelection (int sel)
| slotMenuSelection |
[slot]
When a menu selection has been made on the menu that this view created, this method gets called.
| void slotRemovePopupMenu ()
| slotRemovePopupMenu |
[slot]
This slot is entered when an event has occurred on the views display, most likely a mouse event. Before it sends out that mouse event everyone that displays a menu on the views surface (widgets and this ) thould remove any menu. This stops more then one menu bieing diplayed.
| void slotActivate ()
| slotActivate |
[slot]
makes this view the active view by asking the document to show us
| void slotCutSuccessful ()
| slotCutSuccessful |
[slot]
Connects to the signal that UMLApp emits when a cut operation is successful. If the view or a child started the operation the flag m_bStartedCut will be set and we can carry out any operation that is needed, like deleting the selected widgets for the cut operation.
| void slotShowView ()
| slotShowView |
[slot]
Called by menu when to show the instance of the view.
| void sigResetToolBar ()
| sigResetToolBar |
[signal]
| void sigColorChanged ( int )
| sigColorChanged |
[signal]
| void sigRemovePopupMenu ()
| sigRemovePopupMenu |
[signal]
| void sigClearAllSelected ()
| sigClearAllSelected |
[signal]
| void sigLineColorChanged ( QColor )
| sigLineColorChanged |
[signal]
| Generated by: jr on radge on Wed Sep 25 00:11:47 2002, using kdoc 2.0a54. |