18 #ifndef TITLEBLOCK_TEMPLATE_H 19 #define TITLEBLOCK_TEMPLATE_H 74 bool insertRow(
int,
const QList<TitleBlockCell *> &,
int = -1);
75 QList<TitleBlockCell *>
takeRow(
int);
86 QHash<TitleBlockCell *, QPair<int, int> >
getAllSpans()
const;
88 bool addLogo(
const QString &, QByteArray *,
const QString & =
"svg",
const QString & =
"xml");
92 bool renameLogo(
const QString &,
const QString &);
94 QList<QString>
logos()
const;
95 QString
logoType(
const QString &)
const;
96 QSvgRenderer *
vectorLogo(
const QString &)
const;
113 bool loadLogos(
const QDomElement &,
bool =
false);
120 void saveLogo(
const QString &, QDomElement &)
const;
132 int lengthRange(
int,
int,
const QList<int> &)
const;
bool loadFromXmlFile(const QString &)
QHash< QString, QByteArray > data_logos_
Logos raw data.
bool loadGrid(const QDomElement &)
QList< TitleBlockCell * > createColumn()
bool addLogoFromFile(const QString &, const QString &=QString())
void parseColumns(const QString &)
QHash< QString, QPixmap > bitmap_logos_
Pixmaps for bitmap logos.
bool saveLogoToFile(const QString &, const QString &)
QList< int > rows_heights_
rows heights – simple integers
QList< TitleBlockCell * > registered_cells_
Cells objects created rattached to this template, but not mandatorily used.
int lengthRange(int, int, const QList< int > &) const
QString name_
name identifying the Title Block Template within its parent collection
int columnTypeCount(QET::TitleBlockColumnLength)
void saveGrid(QDomElement &) const
void saveCells(QDomElement &) const
QList< TitleBlockCell * > createRow()
void applyCellSpan(TitleBlockCell *)
TitleBlockTemplate * clone() const
void setColumnDimension(int, const TitleBlockDimension &)
void renderCell(QPainter &, const TitleBlockCell &, const DiagramContext &, const QRect &) const
QHash< QString, QSvgRenderer * > vector_logos_
Rendered objects for vector logos.
bool loadFromXmlElement(const QDomElement &)
QList< int > columnsWidth(int) const
void setAllSpans(const QHash< TitleBlockCell *, QPair< int, int > > &)
QStringList listOfVariables()
Get list of variables.
QList< TitleBlockDimension > columns_width_
columns widths –
TitleBlockColumnLength
enum used to specify the type of a length
void saveLogos(QDomElement &) const
QString interpreteVariables(const QString &, const DiagramContext &) const
QPixmap bitmapLogo(const QString &) const
bool addLogo(const QString &, QByteArray *, const QString &="svg", const QString &="xml")
void setLogoStorage(const QString &, const QString &)
bool moveColumn(int, int)
void exportCellToXml(TitleBlockCell *, QDomElement &) const
void parseRows(const QString &)
void saveLogo(const QString &, QDomElement &) const
TitleBlockDimension columnDimension(int)
void render(QPainter &, const DiagramContext &, int) const
bool loadLogos(const QDomElement &, bool=false)
QList< TitleBlockCell * > createCellsList(int)
QList< int > rowsHeights() const
bool checkCell(const QDomElement &, TitleBlockCell **=nullptr)
bool checkCellSpan(TitleBlockCell *)
bool removeLogo(const QString &)
void saveCell(TitleBlockCell *, QDomElement &, bool=false) const
void renderTextCell(QPainter &, const QString &, const TitleBlockCell &, const QRectF &) const
QHash< TitleBlockCell *, QPair< int, int > > getAllSpans() const
void setRowDimension(int, const TitleBlockDimension &)
TitleBlockTemplate(QObject *=nullptr)
QList< TitleBlockCell * > takeRow(int)
QString logoType(const QString &) const
void renderTextCellDxf(QString &, const QString &, const TitleBlockCell &, qreal, qreal, qreal, qreal, int) const
bool loadLogo(const QDomElement &)
static QFont fontForCell(const TitleBlockCell &)
int columnTypeTotal(QET::TitleBlockColumnLength)
void loadInformation(const QDomElement &)
TitleBlockCell * cell(int, int) const
QList< QString > logos() const
QHash< QString, QString > storage_logos_
Logos applied storage type (e.g. "xml" or "base64")
bool saveToXmlFile(const QString &)
bool renameLogo(const QString &, const QString &)
void loadCell(const QDomElement &)
void renderDxf(QRectF &, const DiagramContext &, int, QString &, int) const
~TitleBlockTemplate() override
TitleBlockCell * createCell(const TitleBlockCell *=nullptr)
void setInformation(const QString &)
bool insertRow(int, const QList< TitleBlockCell *> &, int=-1)
bool saveToXmlElement(QDomElement &) const
void saveInformation(QDomElement &) const
QSet< TitleBlockCell * > spannedCells(const TitleBlockCell *, bool=false) const
QString finalTextForCell(const TitleBlockCell &, const DiagramContext &) const
bool loadCells(const QDomElement &)
QSvgRenderer * vectorLogo(const QString &) const
QHash< QString, QString > type_logos_
Logos types (e.g. "png", "jpeg", "svg")
QList< QList< TitleBlockCell * > > cells_
Cells grid.
bool insertColumn(const TitleBlockDimension &, const QList< TitleBlockCell *> &, int=-1)
QList< TitleBlockCell * > takeColumn(int)
QString information() const