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 
46 
47  dialog->show();
48  dialog->raise();
49  dialog->activateWindow();
50 }
51 
53 {
54  // TODO Auto-generated destructor stub
55 }
56 
58 {
59  QObject::connect(m_dialog->buttonBox, SIGNAL(accepted()), this, SLOT(renameItem()));
60 }
61 
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
QTreeWidget * m_treeWidget
void setName(QString name)
LVRRenameDialog(LVRModelItem *item, QTreeWidget *treeWidget)


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 Mon Feb 28 2022 22:46:08