This repository has been archived on 2020-12-30. You can view files and clone it, but cannot push or open issues or pull requests.
NetworkPacketComposer/guidededitorelementview.h

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