• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
  • cmds
cmd_handleRename.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2002-2013 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #include "cmd_handleRename.h"
12 
13 #include "floatingtextwidget.h"
14 
15 // kde includes
16 #include <klocale.h>
17 
18 namespace Uml
19 {
20 
21  CmdHandleRename::CmdHandleRename(FloatingTextWidget* ftw, QString& txt)
22  : QUndoCommand(),
23  m_ftw(ftw),
24  m_newstring(txt)
25  {
26  m_oldstring = ftw->text();
27  setText(i18n("Change text : %1 to %2", m_oldstring, txt));
28  }
29 
30  CmdHandleRename::~CmdHandleRename()
31  {
32  }
33 
34  void CmdHandleRename::redo()
35  {
36  m_ftw->changeName(m_newstring);
37  }
38 
39  void CmdHandleRename::undo()
40  {
41  m_ftw->changeName(m_oldstring);
42  }
43 
44 }
cmd_handleRename.h
FloatingTextWidget::text
QString text() const
Use to get the main body of text (e.g.
Definition: floatingtextwidget.cpp:82
Uml::CmdHandleRename::redo
void redo()
Definition: cmd_handleRename.cpp:34
Uml::CmdHandleRename::undo
void undo()
Definition: cmd_handleRename.cpp:39
Uml::CmdHandleRename::~CmdHandleRename
~CmdHandleRename()
Definition: cmd_handleRename.cpp:30
FloatingTextWidget
Displays a line of text or an operation.
Definition: floatingtextwidget.h:36
floatingtextwidget.h
FloatingTextWidget::changeName
void changeName(const QString &newText)
Changes the text of linked widget.
Definition: floatingtextwidget.cpp:406
Uml::CmdHandleRename::CmdHandleRename
CmdHandleRename(FloatingTextWidget *ftw, QString &txt)
Definition: cmd_handleRename.cpp:21
QUndoCommand
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal