Refactoring.
Fix code style.
This commit is contained in:
parent
baba595be3
commit
1a0ca6c782
|
@ -29,15 +29,17 @@
|
|||
#ifndef VTEXTMANAGER_H
|
||||
#define VTEXTMANAGER_H
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDate>
|
||||
#include <QFont>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
#include <Qt>
|
||||
#include <QtGlobal>
|
||||
#include <QCoreApplication>
|
||||
#include <QVector>
|
||||
|
||||
#include "../vmisc/defglobal.h"
|
||||
|
||||
class VPieceLabelData;
|
||||
class VAbstractPattern;
|
||||
|
@ -57,8 +59,9 @@ struct TextLine
|
|||
bool m_italic{false};
|
||||
Qt::Alignment m_eAlign{Qt::AlignCenter};
|
||||
|
||||
friend auto operator<<(QDataStream& dataStream, const TextLine& data) -> QDataStream&;
|
||||
friend auto operator>>(QDataStream& dataStream, TextLine& data) -> QDataStream&;
|
||||
friend auto operator<<(QDataStream &dataStream, const TextLine &data) -> QDataStream &;
|
||||
friend auto operator>>(QDataStream &dataStream, TextLine &data) -> QDataStream &;
|
||||
|
||||
private:
|
||||
static const quint32 streamHeader;
|
||||
static const quint16 classVersion;
|
||||
|
@ -71,6 +74,7 @@ private:
|
|||
class VTextManager
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(VTextManager) // NOLINT
|
||||
|
||||
public:
|
||||
VTextManager() = default;
|
||||
virtual ~VTextManager() = default;
|
||||
|
@ -85,23 +89,23 @@ public:
|
|||
|
||||
virtual auto GetSpacing() const -> int;
|
||||
|
||||
void SetFont(const QFont& font);
|
||||
auto GetFont() const -> const QFont&;
|
||||
void SetFont(const QFont &font);
|
||||
auto GetFont() const -> const QFont &;
|
||||
void SetFontSize(int iFS);
|
||||
void FitFontSize(qreal fW, qreal fH);
|
||||
|
||||
auto GetAllSourceLines() const -> QVector<TextLine>;
|
||||
void SetAllSourceLines(const QVector<TextLine> &lines);
|
||||
auto GetSourceLinesCount() const -> vsizetype;
|
||||
auto GetSourceLine(vsizetype i) const -> const TextLine&;
|
||||
auto GetSourceLine(vsizetype i) const -> const TextLine &;
|
||||
|
||||
auto MaxLineWidth(int width) const -> int;
|
||||
|
||||
void Update(const QString& qsName, const VPieceLabelData& data, const VContainer *pattern);
|
||||
void Update(VAbstractPattern* pDoc, const VContainer *pattern);
|
||||
void Update(const QString &qsName, const VPieceLabelData &data, const VContainer *pattern);
|
||||
void Update(VAbstractPattern *pDoc, const VContainer *pattern);
|
||||
|
||||
friend auto operator<<(QDataStream& dataStream, const VTextManager& data) -> QDataStream&;
|
||||
friend auto operator>>(QDataStream& dataStream, VTextManager& data) -> QDataStream&;
|
||||
friend auto operator<<(QDataStream &dataStream, const VTextManager &data) -> QDataStream &;
|
||||
friend auto operator>>(QDataStream &dataStream, VTextManager &data) -> QDataStream &;
|
||||
|
||||
private:
|
||||
QFont m_font{};
|
||||
|
|
Loading…
Reference in New Issue
Block a user