71 lines
882 B
C++
71 lines
882 B
C++
#ifndef LAYERPARAMWIDGET_H
|
|
#define LAYERPARAMWIDGET_H
|
|
|
|
#include "fixC11.h"
|
|
|
|
#include <QWidget>
|
|
|
|
class MapLayer;
|
|
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QComboBox;
|
|
class QGridLayout;
|
|
class IHasParams;
|
|
|
|
class LayerParamWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
private:
|
|
|
|
QGridLayout* lay;
|
|
|
|
public:
|
|
|
|
explicit LayerParamWidget(QWidget *parent = 0);
|
|
|
|
private:
|
|
|
|
MapLayer* curElement = nullptr;
|
|
|
|
struct {
|
|
QLabel* info;
|
|
QLabel* lbl;
|
|
} selected;
|
|
|
|
struct {
|
|
QLineEdit* txt;
|
|
QLabel* lbl;
|
|
} name;
|
|
|
|
struct {
|
|
QLineEdit* txt;
|
|
QLabel* lbl;
|
|
} atHeight;
|
|
|
|
struct {
|
|
QLineEdit* txt;
|
|
QLabel* lbl;
|
|
} height;
|
|
|
|
void buildFields(QGridLayout* lay, IHasParams* elem);
|
|
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
/** set the to-be-edited element */
|
|
void setElement(MapLayer* l);
|
|
|
|
private slots:
|
|
|
|
void onAtHeightChanged();
|
|
void onHeightChanged();
|
|
void onNameChanged();
|
|
|
|
};
|
|
|
|
#endif // LAYERPARAMWIDGET_H
|