48 lines
997 B
C++
48 lines
997 B
C++
#ifndef GUIDEDEDITORELEMENTVIEW_H
|
|
#define GUIDEDEDITORELEMENTVIEW_H
|
|
|
|
#include "guidededitorelement.h"
|
|
#include <QWidget>
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
#include "guidededitorlayer.h"
|
|
#include <QBoxLayout>
|
|
#include <memory>
|
|
#include <QComboBox>
|
|
|
|
|
|
class GuidedEditorElementView : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit GuidedEditorElementView(GuidedEditorElement* element, QWidget *parent = 0);
|
|
|
|
void setElement(GuidedEditorElement* element);
|
|
|
|
|
|
signals:
|
|
void inputChanged();
|
|
|
|
public slots:
|
|
void dataChanged();
|
|
|
|
private:
|
|
// layout
|
|
std::unique_ptr<QBoxLayout> layout;
|
|
// widget container
|
|
//?
|
|
// title label
|
|
std::unique_ptr<QLabel> title;
|
|
// example/regex label
|
|
std::unique_ptr<QLabel> example;
|
|
// mouseover description?
|
|
std::unique_ptr<QString> description;
|
|
// input field based on element type
|
|
std::unique_ptr<QLineEdit> input;
|
|
std::unique_ptr<QComboBox> combobox;
|
|
// layer information
|
|
std::shared_ptr<GuidedEditorLayer> layer;
|
|
};
|
|
|
|
#endif // GUIDEDEDITORELEMENTVIEW_H
|