git-svn-id: svn://db.shs.com.ru/libs@316 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -12,6 +12,20 @@
|
||||
#include "blockviewwavetrace.h"
|
||||
#include "blockbusitem.h"
|
||||
|
||||
/// data:
|
||||
/// 1002 - flag for move parent (true)
|
||||
/// 1003 - flag for visualize selection (true)
|
||||
/// 1004 - BlockItemPin ("pin")
|
||||
/// 1005 - BlockBusItem ("connection")
|
||||
/// 1006 - BlockItem ("item")
|
||||
/// 1007 - BlockItem selection ("item_selection")
|
||||
/// 1008 - item is NOT decor, ignore for function decors() (true)
|
||||
/// 1009 - item is scene decor ("decor")
|
||||
/// 1010 - BlockItem decor (src text for QGraphicsSimpleTextItem)
|
||||
/// 1011 - item is BlockItem decor ("decor")
|
||||
/// 1100 - flag for correct move (true)
|
||||
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -31,6 +45,7 @@ class BlockView: public QGraphicsView
|
||||
Q_PROPERTY(bool connectByMouse READ isConnectByMouseEnabled WRITE setConnectByMouseEnabled)
|
||||
Q_PROPERTY(bool navigationEnabled READ isNavigationEnabled WRITE setNavigationEnabled)
|
||||
Q_PROPERTY(bool navigateAnimationEnabled READ isNavigateAnimationEnabled WRITE setNavigateAnimationEnabled)
|
||||
Q_PROPERTY(bool blockAnimationEnabled READ isBlockAnimationEnabled WRITE setBlockAnimationEnabled)
|
||||
Q_PROPERTY(bool traceConsiderBuses READ isTraceConsiderBuses WRITE setTraceConsiderBuses)
|
||||
Q_PROPERTY(bool pinMulticonnect READ isPinMulticonnectEnabled WRITE setPinMulticonnectEnabled)
|
||||
Q_PROPERTY(bool miniMap READ isMiniMapEnabled WRITE setMiniMapEnabled)
|
||||
@@ -55,6 +70,7 @@ public:
|
||||
bool isPostMoveConnectEnabled() const {return pm_connect;}
|
||||
bool isNavigationEnabled() const {return navigation;}
|
||||
bool isNavigateAnimationEnabled() const {return is_nav_anim;}
|
||||
bool isBlockAnimationEnabled() const {return is_block_anim;}
|
||||
bool isConnectByMouseEnabled() const {return m_connect;}
|
||||
bool isTraceConsiderBuses() const {return m_trace_with_buses;}
|
||||
bool isPinMulticonnectEnabled() const {return m_pin_mc;}
|
||||
@@ -115,8 +131,8 @@ protected:
|
||||
bool connectTmpToBus(BlockBusItem* bus);
|
||||
void markPins(int bus_type);
|
||||
void unmarkPins(bool to_normal = false);
|
||||
void hoverAcceptedPin(BlockItemPin * pin);
|
||||
void unhoverPins();
|
||||
void hoverAcceptedPin(BlockItemPin * pin, bool hover);
|
||||
void unhoverPins(BlockItemPin * excl_pin = 0);
|
||||
void simplifyBuses();
|
||||
void moveBuses(const QList<QGraphicsItem * > & items, QPointF dp);
|
||||
QList<BlockBusItem * > internalBuses(const QList<BlockItem * > & items);
|
||||
@@ -155,7 +171,7 @@ protected:
|
||||
Qt::KeyboardModifiers mm_mods;
|
||||
QPropertyAnimation thumb_anim, nav_anim;
|
||||
int timer_thumb, thumb_hide_delay, thick;
|
||||
bool mm_drag, new_bus, new_branch, moved, mm_cancel, iconnect, mm_copy, mm_thumb, ae_enabled, is_nav_anim;
|
||||
bool mm_drag, new_bus, new_branch, moved, mm_cancel, iconnect, mm_copy, mm_thumb, ae_enabled, is_nav_anim, is_block_anim, move_bus_point;
|
||||
bool grid_visible, grid_snap, pm_connect, navigation, m_connect, m_trace_with_buses, m_pin_mc, minimap;
|
||||
bool nav_prev_aa, nav_prev_grid;
|
||||
double grid_step, grid_points, cur_scl, _talpha, thumb_scl;
|
||||
@@ -174,6 +190,8 @@ protected slots:
|
||||
void _setThumb(double v);
|
||||
void _setNav(QRectF v);
|
||||
void _navFinished();
|
||||
void startBusPointMove(int bus_type);
|
||||
void endBusPointMove();
|
||||
|
||||
public slots:
|
||||
void setGridPen(const QPen & pen) {grid_pen = pen; _updateBack();}
|
||||
@@ -184,6 +202,7 @@ public slots:
|
||||
void setPostMoveConnectEnabled(bool on) {pm_connect = on;}
|
||||
void setNavigationEnabled(bool on) {navigation = on;}
|
||||
void setNavigateAnimationEnabled(bool on) {is_nav_anim = on;}
|
||||
void setBlockAnimationEnabled(bool on) {is_block_anim = on;}
|
||||
void setConnectByMouseEnabled(bool on) {m_connect = on;}
|
||||
void setTraceConsiderBuses(bool on) {m_trace_with_buses = on;}
|
||||
void setPinMulticonnectEnabled(bool on) {m_pin_mc = on;}
|
||||
|
||||
Reference in New Issue
Block a user