Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces 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  Q_OBJECT
45 public:
46  RenamePropertyDialog(QWidget *parent = NULL);
47  ~RenamePropertyDialog();
48 
49  /**
50  * @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.
51  *
52  * The function creates a modal property rename dialog with the given property, and parent widget.
53  *
54  * @param toRenameProp The property to rename.
55  **/
56  static bool renameProperty(tlp::PropertyInterface* toRenameProp,
57  QWidget* parent=NULL);
58 
59 private:
60  Ui::RenamePropertyDialogData *ui;
61 };
62 }
63 #endif // RENAMEPROPERTYDIALOG_H
64 ///@endcond
PropertyInterface describes the interface of a graph property.