1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
#ifndef GR_ADDELEMENTWIDGET_H
#define GR_ADDELEMENTWIDGET_H
#include <grm/dom_render/graphics_tree/element.hxx>
#include <QWidget>
#include <QLineEdit>
#include <QComboBox>
#include <QGridLayout>
#include <QGroupBox>
#include <QLabel>
#include <QAction>
#include <vector>
#include "grm.h"
#include "BoundingObject.hxx"
class AddElementWidget;
#include "../GRPlotWidget.hxx"
class AddElementWidget : public QWidget
{
Q_OBJECT
public:
explicit AddElementWidget(GRPlotWidget *widget, QWidget *parent = nullptr);
protected:
private slots:
void elementSelected(int);
void parentSelected(int);
void reject();
void accept();
private:
GRPlotWidget *grplot_widget;
QComboBox *add_element_combo_box;
QComboBox *select_parent_combo_box;
QGridLayout *add_element_layout;
QGroupBox *add_attributes_group;
std::vector<BoundingObject> parent_vec;
std::vector<std::string> attribute_name_vec;
std::vector<std::string> attribute_type_vec;
QList<QWidget *> fields;
std::shared_ptr<GRM::Document> schema_tree;
};
#endif // GR_ADDELEMENTWIDGET_H
|