Tulip  4.6.0
Better Visualization Through Research
library/tulip-gui/include/tulip/RenamePropertyDialog.h
00001 /*
00002  *
00003  * This file is part of Tulip (www.tulip-software.org)
00004  *
00005  * Authors: David Auber and the Tulip development Team
00006  * from LaBRI, University of Bordeaux
00007  *
00008  * Tulip is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation, either version 3
00011  * of the License, or (at your option) any later version.
00012  *
00013  * Tulip is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  *
00018  */
00019 ///@cond DOXYGEN_HIDDEN
00020 
00021 #ifndef RENAMEPROPERTYDIALOG_H
00022 #define RENAMEPROPERTYDIALOG_H
00023 
00024 #include <tulip/tulipconf.h>
00025 
00026 #include <QDialog>
00027 
00028 namespace Ui {
00029 class RenamePropertyDialogData;
00030 }
00031 
00032 namespace tlp {
00033 class Graph;
00034 class PropertyInterface;
00035 
00036 /**
00037   * @brief Provide a dialog that allow user to rename a property.
00038   *
00039   * The easiest way to use this class is to use the renameProperty static function.
00040   *
00041   **/
00042 
00043 class TLP_QT_SCOPE RenamePropertyDialog : public QDialog {
00044   Q_OBJECT
00045 public:
00046   RenamePropertyDialog(QWidget *parent = NULL);
00047   ~RenamePropertyDialog();
00048 
00049   /**
00050     * @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.
00051     *
00052     * The function creates a modal property rename dialog with the given property, and parent widget.
00053     *
00054     * @param toRenameProp The property to rename.
00055     **/
00056   static bool renameProperty(tlp::PropertyInterface* toRenameProp,
00057                              QWidget* parent=NULL);
00058 
00059 private:
00060   Ui::RenamePropertyDialogData *ui;
00061 };
00062 }
00063 #endif // RENAMEPROPERTYDIALOG_H
00064 ///@endcond
 All Classes Files Functions Variables Enumerations Enumerator Properties