|
|
@ -45,7 +45,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
, mDesktopPenPalette(NULL) |
|
|
|
, mDesktopPenPalette(NULL) |
|
|
|
, mDesktopMarkerPalette(NULL) |
|
|
|
, mDesktopMarkerPalette(NULL) |
|
|
|
, mDesktopEraserPalette(NULL) |
|
|
|
, mDesktopEraserPalette(NULL) |
|
|
|
, mKeyboardPalette(NULL) |
|
|
|
|
|
|
|
, mLibPalette(NULL) |
|
|
|
, mLibPalette(NULL) |
|
|
|
, mWindowPositionInitialized(0) |
|
|
|
, mWindowPositionInitialized(0) |
|
|
|
, mIsFullyTransparent(false) |
|
|
|
, mIsFullyTransparent(false) |
|
|
@ -81,8 +80,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); |
|
|
|
mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); |
|
|
|
|
|
|
|
|
|
|
|
connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(goToUniboard())); |
|
|
|
connect(mDesktopPalette, SIGNAL(uniboardClick()), this, SLOT(goToUniboard())); |
|
|
|
//connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(showKeyboard(bool)));
|
|
|
|
|
|
|
|
connect(mDesktopPalette, SIGNAL(showVirtualKeyboard(bool)), this, SLOT(showKeyboard(bool))); |
|
|
|
|
|
|
|
connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(customCapture())); |
|
|
|
connect(mDesktopPalette, SIGNAL(customClick()), this, SLOT(customCapture())); |
|
|
|
connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(windowCapture())); |
|
|
|
connect(mDesktopPalette, SIGNAL(windowClick()), this, SLOT(windowCapture())); |
|
|
|
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture())); |
|
|
|
connect(mDesktopPalette, SIGNAL(screenClick()), this, SLOT(screenCapture())); |
|
|
@ -104,19 +101,12 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
|
|
|
|
|
|
|
|
mDesktopMarkerPalette = new UBDesktopMarkerPalette(mTransparentDrawingView); |
|
|
|
mDesktopMarkerPalette = new UBDesktopMarkerPalette(mTransparentDrawingView); |
|
|
|
mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView); |
|
|
|
mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView); |
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mKeyboardPalette = UBKeyboardPalette::create(mTransparentDrawingView); |
|
|
|
|
|
|
|
connect(mKeyboardPalette, SIGNAL(keyboardActivated(bool)), mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopToolsPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopToolsPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopPenPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopMarkerPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopMarkerPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopEraserPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
mDesktopEraserPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
if (mKeyboardPalette) |
|
|
|
|
|
|
|
mKeyboardPalette->setBackgroundBrush(UBSettings::settings()->opaquePaletteColor); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mDesktopToolsPalette->setVisible(UBApplication::mainWindow->actionDesktopTools->isChecked()); |
|
|
|
mDesktopToolsPalette->setVisible(UBApplication::mainWindow->actionDesktopTools->isChecked()); |
|
|
|
|
|
|
|
|
|
|
@ -129,7 +119,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
mDesktopPenPalette->setVisible(false); |
|
|
|
mDesktopPenPalette->setVisible(false); |
|
|
|
mDesktopMarkerPalette->setVisible(false); |
|
|
|
mDesktopMarkerPalette->setVisible(false); |
|
|
|
mDesktopEraserPalette->setVisible(false); |
|
|
|
mDesktopEraserPalette->setVisible(false); |
|
|
|
if (mKeyboardPalette) mKeyboardPalette->setVisible(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(UBApplication::mainWindow->actionDesktopTools, SIGNAL(triggered(bool)), this, SLOT(desktopToolsActionToogled(bool))); |
|
|
|
connect(UBApplication::mainWindow->actionDesktopTools, SIGNAL(triggered(bool)), this, SLOT(desktopToolsActionToogled(bool))); |
|
|
|
connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations())); |
|
|
|
connect(UBApplication::mainWindow->actionEraseDesktopAnnotations, SIGNAL(triggered()), this, SLOT(eraseDesktopAnnotations())); |
|
|
@ -161,11 +150,6 @@ UBDesktopAnnotationController::~UBDesktopAnnotationController() |
|
|
|
delete mDesktopEraserPalette; |
|
|
|
delete mDesktopEraserPalette; |
|
|
|
mDesktopEraserPalette = NULL; |
|
|
|
mDesktopEraserPalette = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
if (NULL != mKeyboardPalette) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mKeyboardPalette; |
|
|
|
|
|
|
|
mKeyboardPalette = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(NULL != mLibPalette) |
|
|
|
if(NULL != mLibPalette) |
|
|
|
{ |
|
|
|
{ |
|
|
|
delete mLibPalette; |
|
|
|
delete mLibPalette; |
|
|
@ -309,11 +293,6 @@ void UBDesktopAnnotationController::showWindow() |
|
|
|
//mDesktopPalette->move((desktopRect.right() - (mDesktopPalette->width() + 20)), desktopRect.top() + 150);
|
|
|
|
//mDesktopPalette->move((desktopRect.right() - (mDesktopPalette->width() + 20)), desktopRect.top() + 150);
|
|
|
|
mDesktopPalette->move(5, desktopRect.top() + 150); |
|
|
|
mDesktopPalette->move(5, desktopRect.top() + 150); |
|
|
|
|
|
|
|
|
|
|
|
mKeyboardPalette->move(desktopRect.left() + (desktopRect.width() - mKeyboardPalette->width())/2, |
|
|
|
|
|
|
|
desktopRect.top() + desktopRect.height() - mKeyboardPalette->height()); |
|
|
|
|
|
|
|
mKeyboardPalette->adjustSizeAndPosition(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mWindowPositionInitialized = true; |
|
|
|
mWindowPositionInitialized = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -389,15 +368,6 @@ void UBDesktopAnnotationController::goToUniboard() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBDesktopAnnotationController::showKeyboard(bool v) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (mKeyboardPalette!=NULL) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mKeyboardPalette->setVisible(v); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBDesktopAnnotationController::customCapture() |
|
|
|
void UBDesktopAnnotationController::customCapture() |
|
|
|
{ |
|
|
|
{ |
|
|
|
mIsFullyTransparent = true; |
|
|
|
mIsFullyTransparent = true; |
|
|
|