Refactoring.
This commit is contained in:
parent
659e1f6fc0
commit
c9786ed7b7
|
@ -33,8 +33,6 @@
|
||||||
#include <QUuid>
|
#include <QUuid>
|
||||||
#include <QTransform>
|
#include <QTransform>
|
||||||
|
|
||||||
#include "../vmisc/typedef.h"
|
|
||||||
|
|
||||||
class QPixmap;
|
class QPixmap;
|
||||||
class QMimeType;
|
class QMimeType;
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#define QMUDEF_H
|
#define QMUDEF_H
|
||||||
|
|
||||||
#include "qmuparser_global.h"
|
#include "qmuparser_global.h"
|
||||||
|
#include "qmuparserdef.h"
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
#include <ciso646>
|
#include <ciso646>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#ifdef __INTEL_COMPILER
|
||||||
#include "qmuparserfixes.h"
|
#include "qmuparserfixes.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
@brief This file contains standard definitions used by the parser.
|
@brief This file contains standard definitions used by the parser.
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
|
||||||
class QxtCsvModelPrivate;
|
class QxtCsvModelPrivate;
|
||||||
|
class QTextCodec;
|
||||||
|
|
||||||
class QxtCsvModel final : public QAbstractTableModel
|
class QxtCsvModel final : public QAbstractTableModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,48 +41,60 @@ public:
|
||||||
//! This does not have to be used by subclasses, but it makes sense in cases where QVariant supports
|
//! This does not have to be used by subclasses, but it makes sense in cases where QVariant supports
|
||||||
//! the data type. Also, this can be used as cache, so that when the data() function gets called by
|
//! the data type. Also, this can be used as cache, so that when the data() function gets called by
|
||||||
//! the model, the data does not have to be converted in a QVariant every time.
|
//! the model, the data does not have to be converted in a QVariant every time.
|
||||||
QVariant VariantValue;
|
QVariant VariantValue{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! Property name
|
//! Property name
|
||||||
QString Name;
|
QString Name{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! Description
|
//! Description
|
||||||
QString Description;
|
QString Description{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! Specifies whether the property is empty or not
|
//! Specifies whether the property is empty or not
|
||||||
bool IsEmpty;
|
bool IsEmpty{false}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! Stores the property type
|
//! Stores the property type
|
||||||
QVariant::Type PropertyVariantType;
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
QMetaType::Type PropertyVariantType; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
#else
|
||||||
|
QVariant::Type PropertyVariantType; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
#endif
|
||||||
|
|
||||||
//! Stores whether the views have to update the parent of this property if it changes
|
//! Stores whether the views have to update the parent of this property if it changes
|
||||||
bool UpdateParent;
|
bool UpdateParent{false}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! Stores whether the views have to update the children of this property if it changes
|
//! Stores whether the views have to update the children of this property if it changes
|
||||||
bool UpdateChildren;
|
bool UpdateChildren{false}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! The parent property
|
//! The parent property
|
||||||
VProperty* Parent;
|
VProperty* Parent{nullptr}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
QWidget* editor;
|
QWidget* editor{nullptr}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
Property type;
|
Property type{Property::Simple}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! List of child properties
|
//! List of child properties
|
||||||
QList<VProperty*> Children;
|
QList<VProperty*> Children{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||||
|
|
||||||
//! Constructor passing name and type
|
//! Constructor passing name and type
|
||||||
VPropertyPrivate(const QString& name, QVariant::Type type)
|
VPropertyPrivate(const QString& name,
|
||||||
: VariantValue(type), Name(name), Description(QString()), IsEmpty(false), PropertyVariantType(type),
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
UpdateParent(false), UpdateChildren(false), Parent(nullptr), editor(nullptr), type(Property::Simple),
|
QMetaType::Type type)
|
||||||
Children(QList<VProperty*>())
|
: VariantValue(QMetaType(type)),
|
||||||
|
#else
|
||||||
|
QVariant::Type type)
|
||||||
|
: VariantValue(type),
|
||||||
|
#endif
|
||||||
|
Name(name),
|
||||||
|
PropertyVariantType(type)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
VPropertyPrivate()
|
VPropertyPrivate()
|
||||||
: VariantValue(), Name(), Description(QString()), IsEmpty(false), PropertyVariantType(QVariant::Invalid),
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
UpdateParent(false), UpdateChildren(false), Parent(nullptr), editor(nullptr), type(Property::Simple),
|
: PropertyVariantType(QMetaType::UnknownType)
|
||||||
Children(QList<VProperty*>())
|
#else
|
||||||
|
: PropertyVariantType(QVariant::Invalid)
|
||||||
|
#endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~VPropertyPrivate();
|
virtual ~VPropertyPrivate();
|
||||||
|
@ -92,6 +104,6 @@ private:
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
}
|
} // namespace VPE
|
||||||
|
|
||||||
#endif // VPROPERTY_P_H
|
#endif // VPROPERTY_P_H
|
||||||
|
|
|
@ -69,6 +69,6 @@ public:
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
}
|
} // namespace VPE
|
||||||
|
|
||||||
#endif // VWIDGETPROPERTY_P_H
|
#endif // VWIDGETPROPERTY_P_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user