|
|
@ -106,8 +106,7 @@ UBBoardView::~UBBoardView () { |
|
|
|
delete suspendedMousePressEvent; |
|
|
|
delete suspendedMousePressEvent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void UBBoardView::init () |
|
|
|
UBBoardView::init () |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
connect (UBSettings::settings ()->boardPenPressureSensitive, SIGNAL (changed (QVariant)), |
|
|
|
connect (UBSettings::settings ()->boardPenPressureSensitive, SIGNAL (changed (QVariant)), |
|
|
|
this, SLOT (settingChanged (QVariant))); |
|
|
|
this, SLOT (settingChanged (QVariant))); |
|
|
@ -144,8 +143,6 @@ UBBoardView::init () |
|
|
|
|
|
|
|
|
|
|
|
movingItem = NULL; |
|
|
|
movingItem = NULL; |
|
|
|
mWidgetMoved = false; |
|
|
|
mWidgetMoved = false; |
|
|
|
|
|
|
|
|
|
|
|
connectToStylusPalette(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBGraphicsScene* |
|
|
|
UBGraphicsScene* |
|
|
@ -1441,28 +1438,3 @@ UBBoardView::setToolCursor (int tool) |
|
|
|
controlViewport->setCursor (UBResources::resources ()->penCursor); |
|
|
|
controlViewport->setCursor (UBResources::resources ()->penCursor); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|