Fixed issue 280

preferencesAboutTextFull
shibakaneki 12 years ago
parent 4b2b29eb92
commit af3e7ef5c3
  1. 17
      src/desktop/UBDesktopAnnotationController.cpp
  2. 1
      src/desktop/UBDesktopAnnotationController.h

@ -102,9 +102,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
} }
connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(goToUniboard())); connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(goToUniboard()));
connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(customCapture())); connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(customCapture()));
connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(windowCapture())); connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(windowCapture()));
connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture())); connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture()));
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(onToolClicked()));
connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized())); connect(mDesktopPalette, SIGNAL(maximized()), this, SLOT(onDesktopPaletteMaximized()));
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize())); connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), this, SLOT(onDesktopPaletteMinimize()));
@ -382,6 +386,7 @@ void UBDesktopAnnotationController::hideWindow()
void UBDesktopAnnotationController::goToUniboard() void UBDesktopAnnotationController::goToUniboard()
{ {
onToolClicked();
hideWindow(); hideWindow();
UBPlatformUtils::setDesktopMode(false); UBPlatformUtils::setDesktopMode(false);
@ -397,6 +402,7 @@ void UBDesktopAnnotationController::goToUniboard()
void UBDesktopAnnotationController::customCapture() void UBDesktopAnnotationController::customCapture()
{ {
onToolClicked();
mIsFullyTransparent = true; mIsFullyTransparent = true;
updateBackground(); updateBackground();
@ -424,6 +430,7 @@ void UBDesktopAnnotationController::customCapture()
void UBDesktopAnnotationController::windowCapture() void UBDesktopAnnotationController::windowCapture()
{ {
onToolClicked();
mIsFullyTransparent = true; mIsFullyTransparent = true;
updateBackground(); updateBackground();
@ -453,6 +460,7 @@ void UBDesktopAnnotationController::windowCapture()
void UBDesktopAnnotationController::screenCapture() void UBDesktopAnnotationController::screenCapture()
{ {
onToolClicked();
mIsFullyTransparent = true; mIsFullyTransparent = true;
updateBackground(); updateBackground();
@ -539,7 +547,6 @@ void UBDesktopAnnotationController::penActionPressed()
*/ */
void UBDesktopAnnotationController::penActionReleased() void UBDesktopAnnotationController::penActionReleased()
{ {
qDebug() << "penActionReleased()";
mHoldTimerPen.stop(); mHoldTimerPen.stop();
if(mPendingPenButtonPressed) if(mPendingPenButtonPressed)
{ {
@ -594,7 +601,6 @@ void UBDesktopAnnotationController::eraserActionPressed()
*/ */
void UBDesktopAnnotationController::eraserActionReleased() void UBDesktopAnnotationController::eraserActionReleased()
{ {
qDebug() << "eraserActionReleased()";
mHoldTimerEraser.stop(); mHoldTimerEraser.stop();
if(mPendingEraserButtonPressed) if(mPendingEraserButtonPressed)
{ {
@ -651,7 +657,6 @@ void UBDesktopAnnotationController::markerActionPressed()
*/ */
void UBDesktopAnnotationController::markerActionReleased() void UBDesktopAnnotationController::markerActionReleased()
{ {
qDebug() << "markerActionReleased()";
mHoldTimerMarker.stop(); mHoldTimerMarker.stop();
if(mPendingMarkerButtonPressed) if(mPendingMarkerButtonPressed)
{ {
@ -930,3 +935,9 @@ void UBDesktopAnnotationController::refreshMask()
updateMask(true); updateMask(true);
} }
} }
void UBDesktopAnnotationController::onToolClicked(){
mDesktopEraserPalette->hide();
mDesktopMarkerPalette->hide();
mDesktopPenPalette->hide();
}

@ -111,6 +111,7 @@ class UBDesktopAnnotationController : public QObject
void onDesktopPaletteMinimize(); void onDesktopPaletteMinimize();
void onTransparentWidgetResized(); void onTransparentWidgetResized();
void refreshMask(); void refreshMask();
void onToolClicked();
private: private:
void setAssociatedPalettePosition(UBActionPalette* palette, const QString& actionName); void setAssociatedPalettePosition(UBActionPalette* palette, const QString& actionName);

Loading…
Cancel
Save