@ -67,7 +67,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
{
{
mTransparentDrawingView = new UBBoardView ( UBApplication : : boardController , static_cast < QWidget * > ( 0 ) , true ) ; // deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView = new UBBoardView ( UBApplication : : boardController , static_cast < QWidget * > ( 0 ) , true ) ; // deleted in UBDesktopAnnotationController::destructor
mTransparentDrawingView - > setAttribute ( Qt : : WA_TranslucentBackground , true ) ;
mTransparentDrawingView - > setAttribute ( Qt : : WA_TranslucentBackground , true ) ;
# ifdef Q_WS_MAC
# ifdef Q_WS_MAC
mTransparentDrawingView - > setAttribute ( Qt : : WA_MacNoShadow , true ) ;
mTransparentDrawingView - > setAttribute ( Qt : : WA_MacNoShadow , true ) ;
@ -102,9 +101,15 @@ 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 ( UBApplication : : mainWindow - > actionPointer , SIGNAL ( triggered ( ) ) , this , SLOT ( onToolClicked ( ) ) ) ;
connect ( UBApplication : : mainWindow - > actionSelector , SIGNAL ( triggered ( ) ) , 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 +387,7 @@ void UBDesktopAnnotationController::hideWindow()
void UBDesktopAnnotationController : : goToUniboard ( )
void UBDesktopAnnotationController : : goToUniboard ( )
{
{
onToolClicked ( ) ;
hideWindow ( ) ;
hideWindow ( ) ;
UBPlatformUtils : : setDesktopMode ( false ) ;
UBPlatformUtils : : setDesktopMode ( false ) ;
@ -397,6 +403,7 @@ void UBDesktopAnnotationController::goToUniboard()
void UBDesktopAnnotationController : : customCapture ( )
void UBDesktopAnnotationController : : customCapture ( )
{
{
onToolClicked ( ) ;
mIsFullyTransparent = true ;
mIsFullyTransparent = true ;
updateBackground ( ) ;
updateBackground ( ) ;
@ -424,6 +431,7 @@ void UBDesktopAnnotationController::customCapture()
void UBDesktopAnnotationController : : windowCapture ( )
void UBDesktopAnnotationController : : windowCapture ( )
{
{
onToolClicked ( ) ;
mIsFullyTransparent = true ;
mIsFullyTransparent = true ;
updateBackground ( ) ;
updateBackground ( ) ;
@ -453,6 +461,7 @@ void UBDesktopAnnotationController::windowCapture()
void UBDesktopAnnotationController : : screenCapture ( )
void UBDesktopAnnotationController : : screenCapture ( )
{
{
onToolClicked ( ) ;
mIsFullyTransparent = true ;
mIsFullyTransparent = true ;
updateBackground ( ) ;
updateBackground ( ) ;
@ -539,7 +548,6 @@ void UBDesktopAnnotationController::penActionPressed()
*/
*/
void UBDesktopAnnotationController : : penActionReleased ( )
void UBDesktopAnnotationController : : penActionReleased ( )
{
{
qDebug ( ) < < " penActionReleased() " ;
mHoldTimerPen . stop ( ) ;
mHoldTimerPen . stop ( ) ;
if ( mPendingPenButtonPressed )
if ( mPendingPenButtonPressed )
{
{
@ -594,7 +602,6 @@ void UBDesktopAnnotationController::eraserActionPressed()
*/
*/
void UBDesktopAnnotationController : : eraserActionReleased ( )
void UBDesktopAnnotationController : : eraserActionReleased ( )
{
{
qDebug ( ) < < " eraserActionReleased() " ;
mHoldTimerEraser . stop ( ) ;
mHoldTimerEraser . stop ( ) ;
if ( mPendingEraserButtonPressed )
if ( mPendingEraserButtonPressed )
{
{
@ -651,7 +658,6 @@ void UBDesktopAnnotationController::markerActionPressed()
*/
*/
void UBDesktopAnnotationController : : markerActionReleased ( )
void UBDesktopAnnotationController : : markerActionReleased ( )
{
{
qDebug ( ) < < " markerActionReleased() " ;
mHoldTimerMarker . stop ( ) ;
mHoldTimerMarker . stop ( ) ;
if ( mPendingMarkerButtonPressed )
if ( mPendingMarkerButtonPressed )
{
{
@ -930,3 +936,9 @@ void UBDesktopAnnotationController::refreshMask()
updateMask ( true ) ;
updateMask ( true ) ;
}
}
}
}
void UBDesktopAnnotationController : : onToolClicked ( ) {
mDesktopEraserPalette - > hide ( ) ;
mDesktopMarkerPalette - > hide ( ) ;
mDesktopPenPalette - > hide ( ) ;
}