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
Raw Normal View History

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