|
|
|
@ -36,6 +36,9 @@ |
|
|
|
|
|
|
|
|
|
#include "board/UBBoardController.h" |
|
|
|
|
#include "board/UBBoardPaletteManager.h" |
|
|
|
|
#include "board/UBDrawingController.h" |
|
|
|
|
|
|
|
|
|
#include "gui/UBKeyboardPalette.h" |
|
|
|
|
|
|
|
|
|
#include "gui/UBThumbnailView.h" |
|
|
|
|
#include "gui/UBDocumentTreeWidget.h" |
|
|
|
@ -67,6 +70,7 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow) |
|
|
|
|
, mToolsPalette(0) |
|
|
|
|
, mToolsPalettePositionned(false) |
|
|
|
|
, mTrashTi(0) |
|
|
|
|
, mKeyboardPalette(0) |
|
|
|
|
{ |
|
|
|
|
setupViews(); |
|
|
|
|
setupToolbar(); |
|
|
|
@ -439,6 +443,14 @@ void UBDocumentController::setupViews() |
|
|
|
|
|
|
|
|
|
mMessageWindow = new UBMessageWindow(mDocumentUI->thumbnailWidget); |
|
|
|
|
mMessageWindow->hide(); |
|
|
|
|
|
|
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard()) |
|
|
|
|
{ |
|
|
|
|
mKeyboardPalette = UBKeyboardPalette::create(0); |
|
|
|
|
mKeyboardPalette->setParent(controlView()); |
|
|
|
|
connect(mMainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(showKeyboard(bool))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -455,9 +467,21 @@ void UBDocumentController::setupToolbar() |
|
|
|
|
connect(mMainWindow->actionDocumentTools, SIGNAL(triggered()), this, SLOT(toggleDocumentToolsPalette())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBDocumentController::showKeyboard(bool show) |
|
|
|
|
{ |
|
|
|
|
if(mKeyboardPalette) |
|
|
|
|
{ |
|
|
|
|
if(show) |
|
|
|
|
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); |
|
|
|
|
mKeyboardPalette->setVisible(show); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// mPaletteManager->showVirtualKeyboard(show);
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBDocumentController::setupPalettes() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
mToolsPalette = new UBDocumentToolsPalette(controlView()); |
|
|
|
|
|
|
|
|
|
mToolsPalette->hide(); |
|
|
|
@ -478,7 +502,7 @@ void UBDocumentController::show() |
|
|
|
|
|
|
|
|
|
selectionChanged(); |
|
|
|
|
|
|
|
|
|
if (!mToolsPalette) |
|
|
|
|
if(!mToolsPalette) |
|
|
|
|
setupPalettes(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|