Tulip  5.2.0
Large graphs analysis and drawing
VectorEditor.h
1 /*
2  *
3  * This file is part of Tulip (http://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 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef VECTOREDITOR_H
22 #define VECTOREDITOR_H
23 
24 #include <QDialog>
25 #include <QAbstractButton>
26 
27 #include <tulip/tulipconf.h>
28 
29 namespace Ui {
30 class VectorEditor;
31 }
32 
33 class TLP_QT_SCOPE VectorEditor : public QDialog {
34  Q_OBJECT
35  Ui::VectorEditor *_ui;
36 
37  int _userType;
38  QVector<QVariant> currentVector;
39 
40 public:
41  explicit VectorEditor(QWidget *parent = nullptr);
42  ~VectorEditor() override;
43  void setVector(const QVector<QVariant> &d, int userType);
44  const QVector<QVariant> &vector() const {
45  return currentVector;
46  }
47 
48 public slots:
49  void add();
50  void remove();
51  void done(int r) override;
52 };
53 
54 #endif // VECTOREDITIONWIDGET_H
55 ///@endcond