Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* PixelTextBoxData as Addon to GeometryModel
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Norbert Thoden, SLSE, 2023-04-27
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QColor>
|
||||
#include <QPoint>
|
||||
#include <QSize>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include "geometry_model_export.h"
|
||||
|
||||
namespace SituationMap
|
||||
{
|
||||
|
||||
class GEOMETRYMODEL_EXPORT PixelTextBoxData
|
||||
{
|
||||
public:
|
||||
PixelTextBoxData() = default;
|
||||
explicit PixelTextBoxData(const QString &htmlText, const QColor &backgroundColor);
|
||||
|
||||
void reset();
|
||||
bool isEmpty() const;
|
||||
|
||||
QString toDebugString() const;
|
||||
|
||||
QString m_htmlText;
|
||||
QColor m_backgroundColor;
|
||||
QPoint m_position;
|
||||
QSize m_size;
|
||||
|
||||
// operator
|
||||
bool operator==(const PixelTextBoxData &o) const;
|
||||
|
||||
|
||||
// Json:
|
||||
QJsonObject toJson() const;
|
||||
static PixelTextBoxData fromJson(const QJsonValue &json);
|
||||
|
||||
QString toJsonStr(QJsonDocument::JsonFormat format = QJsonDocument::JsonFormat::Indented) const;
|
||||
static PixelTextBoxData fromJsonStr(const QString &jsonStr);
|
||||
|
||||
static QJsonObject pixelTextBoxContainerToJson(const QVector<PixelTextBoxData> &ptbdCont);
|
||||
static QVector<PixelTextBoxData> pixelTextBoxContainerFromJson(const QJsonValue &json);
|
||||
|
||||
static QString pixelTextBoxContainerToJsonStr(const QVector<PixelTextBoxData> &ptbdCont, QJsonDocument::JsonFormat format = QJsonDocument::JsonFormat::Indented);
|
||||
static QVector<PixelTextBoxData> pixelTextBoxContainerFromJsonStr(const QString &jsonStr);
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// output operator:
|
||||
//-----------------------------------------------------------------------------
|
||||
GEOMETRYMODEL_EXPORT std::ostream &operator<< (std::ostream &stream,
|
||||
const PixelTextBoxData &value);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace SituationMap
|
||||
Reference in new issue
Block a user