|
|
|
@ -36,7 +36,7 @@ class UBBoardView : public QGraphicsView |
|
|
|
|
{ |
|
|
|
|
Q_OBJECT |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
public: |
|
|
|
|
|
|
|
|
|
UBBoardView(UBBoardController* pController, QWidget* pParent = 0, bool isControl = false, bool isDesktop = false); |
|
|
|
|
UBBoardView(UBBoardController* pController, int pStartLayer, int pEndLayer, QWidget* pParent = 0, bool isControl = false, bool isDesktop = false); |
|
|
|
@ -53,19 +53,18 @@ class UBBoardView : public QGraphicsView |
|
|
|
|
|
|
|
|
|
void setMultiselection(bool enable); |
|
|
|
|
bool isMultipleSelectionEnabled() { return mMultipleSelectionIsEnabled; } |
|
|
|
|
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above
|
|
|
|
|
// work around for handling tablet events on MAC OS with Qt 4.8.0 and above
|
|
|
|
|
#if defined(Q_WS_MACX) |
|
|
|
|
bool directTabletEvent(QEvent *event); |
|
|
|
|
QWidget *widgetForTabletEvent(QWidget *w, const QPoint &pos); |
|
|
|
|
#endif |
|
|
|
|
signals: |
|
|
|
|
signals: |
|
|
|
|
|
|
|
|
|
void resized(QResizeEvent* event); |
|
|
|
|
void hidden(); |
|
|
|
|
void shown(); |
|
|
|
|
void clickOnBoard(); |
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
protected: |
|
|
|
|
|
|
|
|
|
bool itemIsLocked(QGraphicsItem *item); |
|
|
|
|
bool isUBItem(QGraphicsItem *item); // we should to determine items who is not UB and use general scene behavior for them.
|
|
|
|
@ -98,7 +97,6 @@ class UBBoardView : public QGraphicsView |
|
|
|
|
QGraphicsItem *items[], |
|
|
|
|
const QStyleOptionGraphicsItem options[]); |
|
|
|
|
|
|
|
|
|
// virtual void dragEnterEvent(QDragEnterEvent * event);
|
|
|
|
|
virtual void dropEvent(QDropEvent *event); |
|
|
|
|
virtual void dragMoveEvent(QDragMoveEvent *event); |
|
|
|
|
|
|
|
|
@ -106,10 +104,7 @@ class UBBoardView : public QGraphicsView |
|
|
|
|
|
|
|
|
|
virtual void drawBackground(QPainter *painter, const QRectF &rect); |
|
|
|
|
|
|
|
|
|
virtual void showEvent(QShowEvent * event); |
|
|
|
|
virtual void hideEvent(QHideEvent * event); |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
private: |
|
|
|
|
|
|
|
|
|
void init(); |
|
|
|
|
|
|
|
|
@ -171,11 +166,11 @@ class UBBoardView : public QGraphicsView |
|
|
|
|
|
|
|
|
|
static bool hasSelectedParents(QGraphicsItem * item); |
|
|
|
|
|
|
|
|
|
private slots: |
|
|
|
|
private slots: |
|
|
|
|
|
|
|
|
|
void settingChanged(QVariant newValue); |
|
|
|
|
|
|
|
|
|
public slots: |
|
|
|
|
public slots: |
|
|
|
|
|
|
|
|
|
void virtualKeyboardActivated(bool b); |
|
|
|
|
void longPressEvent(); |
|
|
|
|