renamed layer to group, removed old *.pro*, some further changes
This commit is contained in:
parent
1304cb314c
commit
7caebca2c9
|
@ -1,35 +0,0 @@
|
|||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2015-01-06T11:56:33
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
QMAKE_CXXFLAGS += -std=c++14
|
||||
|
||||
TARGET = networkpacketcomposer
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += main.cpp\
|
||||
mainwindow.cpp \
|
||||
flowlayout.cpp \
|
||||
guidededitorelement.cpp \
|
||||
abstractguidededitormodel.cpp \
|
||||
guidededitorview.cpp \
|
||||
guidededitorlayer.cpp \
|
||||
guidededitorelementview.cpp
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
flowlayout.h \
|
||||
guidededitorelement.h \
|
||||
abstractguidededitormodel.h \
|
||||
guidededitorview.h \
|
||||
guidededitorlayer.h \
|
||||
guidededitorelementview.h
|
||||
|
||||
INCLUDEPATH += $$PWD/../QtGuidedEditor
|
||||
DEPENDPATH += $$PWD/../QtGuidedEditor
|
|
@ -2,15 +2,14 @@
|
|||
set(HEADERS abstractguidededitormodel.h
|
||||
guidededitorelement.h
|
||||
guidededitorelementview.h
|
||||
guidededitorlayer.h
|
||||
guidededitorlayer.h
|
||||
guidededitorgroup.h
|
||||
flowlayout.h
|
||||
)
|
||||
|
||||
set(SOURCES guidededitorelementview.cpp
|
||||
guidededitorelement.cpp
|
||||
abstractguidededitormodel.cpp
|
||||
guidededitorlayer.cpp
|
||||
guidededitorgroup.cpp
|
||||
guidededitorview.cpp
|
||||
flowlayout.cpp
|
||||
)
|
||||
|
|
|
@ -70,6 +70,16 @@ QString GuidedEditorElement::getValue() const
|
|||
|
||||
void GuidedEditorElement::setValue(const QString &value)
|
||||
{
|
||||
this->value = value;
|
||||
this->value = value;
|
||||
}
|
||||
|
||||
GuidedEditorGroup *GuidedEditorElement::getGroup() const
|
||||
{
|
||||
return this->group;
|
||||
}
|
||||
|
||||
void GuidedEditorElement::setGroup(GuidedEditorGroup *group)
|
||||
{
|
||||
this->group = group;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define EDITORELEMENT_H
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include "guidededitorgroup.h"
|
||||
|
||||
|
||||
enum class ElementType {
|
||||
|
@ -13,7 +14,6 @@ class GuidedEditorElement : public QObject
|
|||
Q_OBJECT
|
||||
public:
|
||||
|
||||
|
||||
explicit GuidedEditorElement();
|
||||
~GuidedEditorElement();
|
||||
|
||||
|
@ -35,6 +35,9 @@ public:
|
|||
QString getValue() const;
|
||||
void setValue(const QString &value);
|
||||
|
||||
GuidedEditorGroup* getGroup() const;
|
||||
void setGroup(GuidedEditorGroup* group);
|
||||
|
||||
private:
|
||||
QString title;
|
||||
QString description;
|
||||
|
@ -42,6 +45,7 @@ private:
|
|||
QString syntaxregex;
|
||||
ElementType type;
|
||||
QString value;
|
||||
GuidedEditorGroup* group;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <QComboBox>
|
||||
|
||||
#include "guidededitorelement.h"
|
||||
#include "guidededitorlayer.h"
|
||||
#include "guidededitorgroup.h"
|
||||
|
||||
|
||||
class GuidedEditorElementView : public QWidget
|
||||
|
@ -41,7 +41,7 @@ private:
|
|||
QComboBox* combobox;
|
||||
QLabel* staticLabel;
|
||||
// layer information
|
||||
GuidedEditorLayer* layer;
|
||||
GuidedEditorGroup* group;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#include "guidededitorgroup.h"
|
||||
#include "cstdlib"
|
||||
#include <QColor>
|
||||
|
||||
GuidedEditorGroup::GuidedEditorGroup(QObject *parent) : QObject(parent)
|
||||
{
|
||||
this->color = new QColor(rand()%20*10+50, rand()%20*10+50, rand()%20*10+50);
|
||||
}
|
||||
|
||||
QString GuidedEditorGroup::getTitle() const
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
void GuidedEditorGroup::setTitle(const QString &value)
|
||||
{
|
||||
title = value;
|
||||
}
|
||||
|
||||
QColor GuidedEditorGroup::getColor() const
|
||||
{
|
||||
return *color;
|
||||
}
|
||||
|
||||
void GuidedEditorGroup::setColor(QColor *value)
|
||||
{
|
||||
color = value;
|
||||
}
|
||||
|
|
@ -5,22 +5,22 @@
|
|||
#include <QString>
|
||||
#include <QColor>
|
||||
|
||||
class GuidedEditorLayer : public QObject
|
||||
class GuidedEditorGroup : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GuidedEditorLayer(QObject *parent = 0);
|
||||
GuidedEditorLayer(QString title, QObject *parent = 0);
|
||||
explicit GuidedEditorGroup(QObject *parent = 0);
|
||||
GuidedEditorGroup(QString title, QObject *parent = 0);
|
||||
|
||||
QString getTitle() const;
|
||||
void setTitle(const QString &value);
|
||||
|
||||
QColor getColor() const;
|
||||
void setColor(const QColor &value);
|
||||
void setColor(QColor *value);
|
||||
|
||||
private:
|
||||
QString title;
|
||||
QColor color;
|
||||
QColor *color;
|
||||
|
||||
|
||||
signals:
|
|
@ -1,27 +0,0 @@
|
|||
#include "guidededitorlayer.h"
|
||||
|
||||
GuidedEditorLayer::GuidedEditorLayer(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString GuidedEditorLayer::getTitle() const
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
void GuidedEditorLayer::setTitle(const QString &value)
|
||||
{
|
||||
title = value;
|
||||
}
|
||||
|
||||
QColor GuidedEditorLayer::getColor() const
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
void GuidedEditorLayer::setColor(const QColor &value)
|
||||
{
|
||||
color = value;
|
||||
}
|
||||
|
Reference in New Issue