mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-09 01:59:58 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user