|
|
@ -61,14 +61,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
mTransparentDrawingView = new UBBoardView(UBApplication::boardController, 0); // deleted in UBDesktopAnnotationController::destructor
|
|
|
|
mTransparentDrawingView = new UBBoardView(UBApplication::boardController, 0); // deleted in UBDesktopAnnotationController::destructor
|
|
|
|
|
|
|
|
|
|
|
|
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); |
|
|
|
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); |
|
|
|
|
|
|
|
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); |
|
|
|
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window); |
|
|
|
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window); |
|
|
|
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); |
|
|
|
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); |
|
|
|
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); |
|
|
|
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); |
|
|
|
|
|
|
|
|
|
|
|
mTransparentDrawingView->setMouseTracking(true); |
|
|
|
mTransparentDrawingView->setMouseTracking(true); |
|
|
|
|
|
|
|
|
|
|
|
UBPlatformUtils::disableShadow(mTransparentDrawingView); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mTransparentDrawingView->setAcceptDrops(false); |
|
|
|
mTransparentDrawingView->setAcceptDrops(false); |
|
|
|
|
|
|
|
|
|
|
|
QString backgroundStyle = "QWidget {background-color: rgba(127, 127, 127, 0)}"; |
|
|
|
QString backgroundStyle = "QWidget {background-color: rgba(127, 127, 127, 0)}"; |
|
|
@ -78,10 +77,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
mTransparentDrawingView->setScene(mTransparentDrawingScene); |
|
|
|
mTransparentDrawingView->setScene(mTransparentDrawingScene); |
|
|
|
|
|
|
|
|
|
|
|
mLibPalette = new UBLibPalette(mTransparentDrawingView); |
|
|
|
mLibPalette = new UBLibPalette(mTransparentDrawingView); |
|
|
|
UBPlatformUtils::disableShadow(mLibPalette); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); |
|
|
|
mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); |
|
|
|
UBPlatformUtils::disableShadow(mDesktopPalette); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(showKeyboard(bool)));
|
|
|
@ -100,17 +97,13 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) |
|
|
|
|
|
|
|
|
|
|
|
// Add the desktop associated palettes
|
|
|
|
// Add the desktop associated palettes
|
|
|
|
mDesktopToolsPalette = new UBDesktopToolsPalette(mTransparentDrawingView); |
|
|
|
mDesktopToolsPalette = new UBDesktopToolsPalette(mTransparentDrawingView); |
|
|
|
UBPlatformUtils::disableShadow(mDesktopToolsPalette); |
|
|
|
|
|
|
|
mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView); |
|
|
|
mDesktopPenPalette = new UBDesktopPenPalette(mTransparentDrawingView); |
|
|
|
UBPlatformUtils::disableShadow(mDesktopPenPalette); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized())); |
|
|
|
connect(mDesktopPalette, SIGNAL(maximized()), mDesktopPenPalette, SLOT(onParentMaximized())); |
|
|
|
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), mDesktopPenPalette, SLOT(onParentMinimized())); |
|
|
|
connect(mDesktopPalette, SIGNAL(minimizeStart(eMinimizedLocation)), mDesktopPenPalette, SLOT(onParentMinimized())); |
|
|
|
|
|
|
|
|
|
|
|
mDesktopMarkerPalette = new UBDesktopMarkerPalette(mTransparentDrawingView); |
|
|
|
mDesktopMarkerPalette = new UBDesktopMarkerPalette(mTransparentDrawingView); |
|
|
|
UBPlatformUtils::disableShadow(mDesktopMarkerPalette); |
|
|
|
|
|
|
|
mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView); |
|
|
|
mDesktopEraserPalette = new UBDesktopEraserPalette(mTransparentDrawingView); |
|
|
|
UBPlatformUtils::disableShadow(mDesktopEraserPalette); |
|
|
|
|
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard()) |
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
mKeyboardPalette = UBKeyboardPalette::create(mTransparentDrawingView); |
|
|
|
mKeyboardPalette = UBKeyboardPalette::create(mTransparentDrawingView); |
|
|
@ -331,8 +324,6 @@ void UBDesktopAnnotationController::showWindow() |
|
|
|
UBDrawingController::drawingController()->setStylusTool(mDesktopStylusTool); |
|
|
|
UBDrawingController::drawingController()->setStylusTool(mDesktopStylusTool); |
|
|
|
|
|
|
|
|
|
|
|
mTransparentDrawingView->showFullScreen(); |
|
|
|
mTransparentDrawingView->showFullScreen(); |
|
|
|
UBPlatformUtils::disableShadow(mTransparentDrawingView); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBPlatformUtils::setDesktopMode(true); |
|
|
|
UBPlatformUtils::setDesktopMode(true); |
|
|
|
|
|
|
|
|
|
|
|