[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets

Ralf Habacker ralf.habacker at gmail.com
Thu Jun 7 21:35:16 UTC 2012


SVN commit 1298924 by habacker:

Made note widget text editable through doc window.
This also fixes doc window related inconsistences after selecting note widgets.

BUG:301181

 M  +1 -22     notewidget.cpp  
 M  +0 -3      notewidget.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/notewidget.cpp #1298923:1298924
@@ -143,27 +143,6 @@
 }
 
 /**
- * Returns the text in the box.
- *
- * @return  The text in the box.
- */
-QString NoteWidget::documentation() const
-{
-    return m_Text;
-}
-
-/**
- * Sets the note documentation.
- *
- * @param newText   The text to set the documentation to.
- */
-void NoteWidget::setDocumentation(const QString &newText)
-{
-    m_Text = newText;
-    update();
-}
-
-/**
  * Return the ID of the diagram hyperlinked to this note.
  *
  * @return  ID of an UMLView, or Uml::id_None if no
@@ -282,7 +261,7 @@
     int width = 60;
     int height = 30;
     const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
-    const int textWidth = fm.width(m_Text);
+    const int textWidth = fm.width(documentation());
     if (m_noteType == PreCondition) {
         const int widthtemp = fm.width("<< precondition >>");
         width = textWidth > widthtemp ? textWidth : widthtemp;
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/notewidget.h #1298923:1298924
@@ -55,9 +55,6 @@
     void setNoteType(NoteType noteType);
     void setNoteType(const QString& noteType);
 
-    QString documentation() const;
-    void setDocumentation(const QString &newText);
-
     Uml::IDType diagramLink() const;
     void setDiagramLink(Uml::IDType viewID);
 




More information about the umbrello-devel mailing list