git-svn-id: svn://db.shs.com.ru/libs@414 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -28,7 +28,7 @@ class BlockItem: public QGraphicsObject, public PropertyStorage
|
||||
public:
|
||||
BlockItem(QGraphicsItem * parent = 0);
|
||||
~BlockItem();
|
||||
|
||||
|
||||
BlockItem * copy() const;
|
||||
BlockItemPin * addPin(BlockItemPin * pin, bool update_ = true);
|
||||
BlockItemPin * addPin(Qt::Alignment align, int bus_type, const QString & text, bool update_ = true);
|
||||
@@ -61,9 +61,20 @@ public:
|
||||
QByteArray save() const;
|
||||
void load(const QByteArray & data);
|
||||
void arrangePins();
|
||||
|
||||
|
||||
void removeBindings(const QString & bind_name);
|
||||
void removeBindingByProperty(const QString & prop_name);
|
||||
void addBinding(const QString & prop_name, const QString & bind_name);
|
||||
void applyBinding(const QString & bind_name, const QVariant & bind_value);
|
||||
void applyBindings(const PropertyStorage & bindings);
|
||||
void setBindings(const QList<QPair<QString, QString> > & bindings);
|
||||
QList<QPair<QString, QString> > getBindings();
|
||||
QString getBindName(const QString & prop_name) const;
|
||||
QStringList getBindNames() const;
|
||||
QStringList getBindProps() const;
|
||||
|
||||
enum {Type = UserType + 1};
|
||||
|
||||
|
||||
protected:
|
||||
void _resize(QSizeF s);
|
||||
void _moveToTop(bool only_decors = false);
|
||||
@@ -78,13 +89,14 @@ protected:
|
||||
double bottom() const {return boundingRect().bottom();}
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant & value);
|
||||
|
||||
|
||||
QGraphicsRectItem g_main, g_selection;
|
||||
int pins_margin;
|
||||
QColor col;
|
||||
QMap<Qt::Alignment, QVector<BlockItemPin * > > pins_;
|
||||
QList<QGraphicsItem * > decors_;
|
||||
|
||||
QList<QPair<QString, QString> > prop_bindings; // <property_name, binding_name>
|
||||
|
||||
private:
|
||||
double thickness() const;
|
||||
void setThickness(double w);
|
||||
|
||||
Reference in New Issue
Block a user