Fixed issue 891

preferencesAboutTextFull
shibakaneki 12 years ago
parent 4eda8fd7d7
commit 529106dc83
  1. 26
      src/board/UBBoardView.cpp
  2. 2
      src/board/UBBoardView.h

@ -144,6 +144,8 @@ UBBoardView::init ()
movingItem = NULL;
mWidgetMoved = false;
connectToStylusPalette();
}
UBGraphicsScene*
@ -1440,3 +1442,27 @@ UBBoardView::setToolCursor (int tool)
}
}
void UBBoardView::connectToStylusPalette()
{
connect(UBApplication::mainWindow->actionPen, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionEraser, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionMarker, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionPointer, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionPlay, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionZoomIn, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionZoomOut, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionCapture, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionHand, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionLine, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionText, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered(bool)), this, SLOT(onTriggeredAction(bool)));
}
void UBBoardView::onTriggeredAction(bool checked)
{
Q_UNUSED(checked);
QList<QGraphicsItem*> it = scene()->selectedItems();
foreach(QGraphicsItem* i, it){
i->setSelected(false);
}
}

@ -94,6 +94,7 @@ class UBBoardView : public QGraphicsView
private:
void init();
void connectToStylusPalette();
inline bool shouldDisplayItem(QGraphicsItem *item)
{
@ -151,6 +152,7 @@ class UBBoardView : public QGraphicsView
private slots:
void settingChanged(QVariant newValue);
void onTriggeredAction(bool checked);
public slots:

Loading…
Cancel
Save