Tulip  5.7.4
Large graphs analysis and drawing
ViewGraphPropertiesSelectionWidget.h
1 /**
2  *
3  * This file is part of Tulip (https://tulip.labri.fr)
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 
20 #ifndef VIEWGRAPHPROERTIESSELECTIONWIDGET_H_
21 #define VIEWGRAPHPROERTIESSELECTIONWIDGET_H_
22 
23 #include <vector>
24 #include <string>
25 
26 #include <QWidget>
27 
28 #include <tulip/Graph.h>
29 
30 namespace Ui {
31 class ViewGraphPropertiesSelectionWidgetData;
32 }
33 
34 namespace tlp {
35 
36 class TLP_QT_SCOPE ViewGraphPropertiesSelectionWidget : public QWidget, public Observable {
37 
38  Q_OBJECT
39 
40 public:
41  ViewGraphPropertiesSelectionWidget(QWidget *parent = nullptr);
42  ~ViewGraphPropertiesSelectionWidget() override;
43 
44  void setWidgetParameters(Graph *graph,
45  const std::vector<std::string> &graphPropertiesTypesFilter);
46  std::vector<std::string> getSelectedGraphProperties();
47 
48  void setWidgetEnabled(const bool enabled);
49  void setSelectedProperties(const std::vector<std::string> &selectedProperties);
50 
51  ElementType getDataLocation() const;
52  void setDataLocation(const ElementType location);
53  void enableEdgesButton(const bool enable);
54  void treatEvent(const Event &) override;
55 
56  bool configurationChanged();
57 
58 private:
59  Ui::ViewGraphPropertiesSelectionWidgetData *_ui;
60  Graph *graph;
61  std::vector<std::string> graphPropertiesTypesFilter;
62  std::vector<std::string> lastSelectedProperties;
63  ElementType lastDataLocation;
64 };
65 } // namespace tlp
66 
67 #endif /* VIEWGRAPHPROERTIESSELECTIONWIDGET_H_ */
ElementType
Definition: Graph.h:50