Tulip  4.9.0
Better Visualization Through Research
 All Classes Files Functions Variables Enumerations Enumerator Properties Groups Pages
RenamePropertyDialog.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef RENAMEPROPERTYDIALOG_H
22 #define RENAMEPROPERTYDIALOG_H
23 
24 #include <tulip/tulipconf.h>
25 
26 #include <QDialog>
27 
28 namespace Ui {
29 class RenamePropertyDialogData;
30 }
31 
32 namespace tlp {
33 class Graph;
34 class PropertyInterface;
35 
36 /**
37  * @brief Provide a dialog that allow user to rename a property.
38  *
39  * The easiest way to use this class is to use the renameProperty static function.
40  *
41  **/
42 
43 class TLP_QT_SCOPE RenamePropertyDialog : public QDialog {
44 public:
45  RenamePropertyDialog(QWidget *parent = NULL);
46  ~RenamePropertyDialog();
47 
48  /**
49  * @brief This is a convenience static function to rename a property using a dialog. If the user presses Cancel or an error occurs, it returns false.
50  *
51  * The function creates a modal property rename dialog with the given property, and parent widget.
52  *
53  * @param toRenameProp The property to rename.
54  **/
55  static bool renameProperty(tlp::PropertyInterface* toRenameProp,
56  QWidget* parent=NULL);
57 
58 private:
59  Ui::RenamePropertyDialogData *ui;
60 };
61 }
62 #endif // RENAMEPROPERTYDIALOG_H
63 ///@endcond
PropertyInterface describes the interface of a graph property.