The title block template editor now supports pasting multiple cells.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1597 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-03-25 16:34:53 +00:00
parent e31a8a375e
commit 8b1e7904c4
6 changed files with 181 additions and 18 deletions

View File

@@ -83,6 +83,8 @@ class TitleBlockTemplate : public QObject {
TitleBlockCell *cell(int, int) const;
QSet<TitleBlockCell *> spannedCells(const TitleBlockCell *) const;
QHash<TitleBlockCell *, QPair<int, int> > getAllSpans() const;
void setAllSpans(const QHash<TitleBlockCell *, QPair<int, int> > &);
bool addLogo(const QString &, QByteArray *, const QString & = "svg", const QString & = "xml");
bool addLogoFromFile(const QString &, const QString & = QString());
bool removeLogo(const QString &);
@@ -96,6 +98,13 @@ class TitleBlockTemplate : public QObject {
void render(QPainter &, const DiagramContext &, int) const;
void renderCell(QPainter &, const TitleBlockCell &, const DiagramContext &, const QRect &) const;
QString toString() const;
void applyCellSpans();
void forgetSpanning();
void forgetSpanning(TitleBlockCell *, bool = true);
bool checkCellSpan(TitleBlockCell *);
void applyCellSpan(TitleBlockCell *);
void applyRowColNums();
void rowColsChanged();
protected:
void loadInformation(const QDomElement &);
@@ -121,12 +130,6 @@ class TitleBlockTemplate : public QObject {
int lengthRange(int, int, const QList<int> &) const;
QString finalTextForCell(const TitleBlockCell &, const DiagramContext &) const;
void renderTextCell(QPainter &, const QString &, const TitleBlockCell &, const QRectF &) const;
void applyCellSpans();
void forgetSpanning();
bool checkCellSpan(TitleBlockCell *);
void applyCellSpan(TitleBlockCell *);
void applyRowColNums();
void rowColsChanged();
// attributes
private: