Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
ShapeDialog.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///@cond DOXYGEN_HIDDEN
21
22#ifndef SHAPEDIALOG_H
23#define SHAPEDIALOG_H
24
25#include <tulip/tulipconf.h>
26
27#include <QDialog>
28#include <QString>
29#include <QPixmap>
30
31namespace Ui {
32class ShapeDialog;
33}
34
35namespace tlp {
36
37class TLP_QT_SCOPE ShapeDialog : public QDialog {
38
39 Q_OBJECT
40
41 bool _forNodes;
42 Ui::ShapeDialog *_ui;
43 QString _selectedShapeName;
44 std::list<std::pair<QString, QPixmap>> shapes;
45
46public:
47 ShapeDialog(bool forNodes, QWidget *parent = nullptr);
48 ~ShapeDialog() override;
49
50 QString getSelectedShapeName() const;
51
52 void setSelectedShapeName(const QString &shapeName);
53
54 void accept() override;
55
56 void showEvent(QShowEvent *) override;
57
58protected:
59 bool eventFilter(QObject *, QEvent *e) override;
60
61protected slots:
62 void updateShapeList();
63};
64} // namespace tlp
65
66#endif
67
68///@endcond