![]() |
Tulip
4.6.0
Better Visualization Through Research
|
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 _Tulip_MOUSESHOWELEMENTINFOS_H 00022 #define _Tulip_MOUSESHOWELEMENTINFOS_H 00023 00024 #include <tulip/InteractorComposite.h> 00025 #include <tulip/Graph.h> 00026 00027 namespace Ui { 00028 class ElementInformationsWidget; 00029 } 00030 00031 class QWidget; 00032 class QGraphicsProxyWidget; 00033 class QTableView; 00034 class QAbstractItemModel; 00035 class QObject; 00036 00037 namespace tlp { 00038 00039 class View; 00040 class ViewWidget; 00041 struct SelectedEntity; 00042 00043 /** 00044 * We define a specific interactor to show element graph infos in eltProperties 00045 */ 00046 class TLP_QT_SCOPE MouseShowElementInfos : public InteractorComponent { 00047 00048 Ui::ElementInformationsWidget* _ui; 00049 public: 00050 MouseShowElementInfos(); 00051 ~MouseShowElementInfos(); 00052 virtual bool eventFilter(QObject* widget, QEvent* e); 00053 00054 void viewChanged(View *); 00055 00056 void clear(); 00057 00058 virtual bool pick(int x, int y, SelectedEntity &selectedEntity); 00059 00060 protected: 00061 00062 ViewWidget *_view; 00063 QWidget *_informationsWidget; 00064 QGraphicsProxyWidget *_informationsWidgetItem; 00065 00066 QTableView* tableView() const; 00067 00068 /** 00069 * @brief buildModel create and returns the model to visualize edit elements parameters. 00070 * @param elementType the type of the element can be NODE or EDGE 00071 * @param elementId elementId the id of the element 00072 * @param parent the parent for the model creation. 00073 * @return 00074 */ 00075 virtual QAbstractItemModel* buildModel(ElementType elementType, unsigned int elementId, QObject *parent)const; 00076 /** 00077 * @brief elementName returns the title of the element. 00078 * @param elementType the type of the element can be NODE or EDGE 00079 * @param elementId the id of the element 00080 * @return 00081 */ 00082 virtual QString elementName(ElementType elementType, unsigned int elementId)const; 00083 }; 00084 00085 } 00086 00087 00088 00089 #endif 00090 ///@endcond