src
tools
lvr2_viewer
widgets
LVRRenameDialog.cpp
Go to the documentation of this file.
1
28
#include <QFileDialog>
29
#include "
LVRRenameDialog.hpp
"
30
31
namespace
lvr2
32
{
33
34
LVRRenameDialog::LVRRenameDialog
(
LVRModelItem
* item, QTreeWidget* treeWidget) :
35
m_item(item), m_treeWidget(treeWidget)
36
{
37
// Setup DialogUI and events
38
QDialog* dialog =
new
QDialog(
m_treeWidget
);
39
m_dialog
=
new
RenameDialog;
40
m_dialog
->setupUi(dialog);
41
42
QString oldName =
m_item
->
getName
();
43
m_dialog
->label_dynamic->setText(oldName);
44
45
connectSignalsAndSlots
();
46
47
dialog->show();
48
dialog->raise();
49
dialog->activateWindow();
50
}
51
52
LVRRenameDialog::~LVRRenameDialog
()
53
{
54
// TODO Auto-generated destructor stub
55
}
56
57
void
LVRRenameDialog::connectSignalsAndSlots
()
58
{
59
QObject::connect(
m_dialog
->buttonBox, SIGNAL(accepted()),
this
, SLOT(
renameItem
()));
60
}
61
62
void
LVRRenameDialog::renameItem
()
63
{
64
QLineEdit* newName_box =
m_dialog
->lineEdit_name;
65
QString newName = newName_box->text();
66
67
m_item
->
setName
(newName);
68
}
69
70
}
// namespace lvr2
lvr2::LVRRenameDialog::connectSignalsAndSlots
void connectSignalsAndSlots()
Definition:
LVRRenameDialog.cpp:57
lvr2::LVRRenameDialog::m_treeWidget
QTreeWidget * m_treeWidget
Definition:
LVRRenameDialog.hpp:60
lvr2::LVRRenameDialog::LVRRenameDialog
LVRRenameDialog(LVRModelItem *item, QTreeWidget *treeWidget)
Definition:
LVRRenameDialog.cpp:34
LVRRenameDialog.hpp
lvr2::LVRModelItem::setName
void setName(QString name)
Definition:
LVRModelItem.cpp:114
lvr2::LVRModelItem
Definition:
LVRModelItem.hpp:47
lvr2
Definition:
BaseBufferManipulators.hpp:39
lvr2::LVRRenameDialog::~LVRRenameDialog
virtual ~LVRRenameDialog()
Definition:
LVRRenameDialog.cpp:52
lvr2::LVRModelItem::getName
QString getName()
Definition:
LVRModelItem.cpp:109
lvr2::LVRRenameDialog::renameItem
void renameItem()
Definition:
LVRRenameDialog.cpp:62
lvr2::LVRRenameDialog::m_item
LVRModelItem * m_item
Definition:
LVRRenameDialog.hpp:59
lvr2::LVRRenameDialog::m_dialog
RenameDialog * m_dialog
Definition:
LVRRenameDialog.hpp:58
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz
, Alexander Mock
, Lars Kiesow
, Lukas Kalbertodt
, Tristan Igelbrink
, Johan M. von Behren
, Dominik Feldschnieders
, Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24