Diagram editor : add a new widget in the "curent selection dock" for edit the independent text. WIP

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5737 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2019-02-19 16:42:07 +00:00
parent 2300314bf5
commit 33d757e0d8
12 changed files with 533 additions and 74 deletions

View File

@@ -24,30 +24,26 @@
This class represents an independent text field on a particular diagram.
It may be moved, edited, and rotated.
*/
class IndependentTextItem : public DiagramTextItem {
class IndependentTextItem : public DiagramTextItem
{
Q_OBJECT
// constructors, destructor
// constructors, destructor
public:
IndependentTextItem();
IndependentTextItem(const QString &);
~IndependentTextItem() override;
IndependentTextItem();
IndependentTextItem(const QString &);
~IndependentTextItem() override;
// attributes
// attributes
public:
enum { Type = UserType + 1005 };
// methods
public:
/**
Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into an
IndependentTextItem.
@return le type de QGraphicsItem
*/
int type() const override { return Type; }
void fromXml(const QDomElement &) override;
QDomElement toXml(QDomDocument &) const override;
private:
QPointF mouse_to_origin_movement_;
enum { Type = UserType + 1005 };
int type() const override { return Type; }
void fromXml(const QDomElement &) override;
QDomElement toXml(QDomDocument &) const override;
protected:
void focusOutEvent(QFocusEvent *event) override;
};
#endif