Tulip  5.3.0
Large graphs analysis and drawing
ShapeDialog.h
1 #ifndef NODESHAPEDIALOG_H
2 #define NODESHAPEDIALOG_H
3 
4 #include <tulip/tulipconf.h>
5 
6 #include <QDialog>
7 #include <QString>
8 #include <QPixmap>
9 
10 namespace Ui {
11 class ShapeDialog;
12 }
13 
14 namespace tlp {
15 
16 class TLP_QT_SCOPE ShapeDialog : public QDialog {
17 
18  Q_OBJECT
19 
20  Ui::ShapeDialog *_ui;
21  QString _selectedShapeName;
22  std::list<std::pair<QString, QPixmap>> shapes;
23 
24 public:
25  ShapeDialog(std::list<std::pair<QString, QPixmap>> &nodeShapes, QWidget *parent = nullptr);
26  ~ShapeDialog() override;
27 
28  QString getSelectedShapeName() const;
29 
30  void setSelectedShapeName(const QString &shapeName);
31 
32  void accept() override;
33 
34  void showEvent(QShowEvent *) override;
35 
36 protected slots:
37  void updateShapeList();
38 };
39 } // namespace tlp
40 
41 #endif