|
|
@ -38,6 +38,9 @@ |
|
|
|
#include "web/browser/WBTabWidget.h" |
|
|
|
#include "web/browser/WBTabWidget.h" |
|
|
|
#include "web/browser/WBWebView.h" |
|
|
|
#include "web/browser/WBWebView.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "desktop/UBDesktopAnnotationController.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "network/UBNetworkAccessManager.h" |
|
|
|
#include "network/UBNetworkAccessManager.h" |
|
|
|
#include "network/UBServerXMLHttpRequest.h" |
|
|
|
#include "network/UBServerXMLHttpRequest.h" |
|
|
|
|
|
|
|
|
|
|
@ -76,7 +79,7 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll |
|
|
|
, mpPageNavigWidget(NULL) |
|
|
|
, mpPageNavigWidget(NULL) |
|
|
|
, mpLibWidget(NULL) |
|
|
|
, mpLibWidget(NULL) |
|
|
|
, mpCachePropWidget(NULL) |
|
|
|
, mpCachePropWidget(NULL) |
|
|
|
, mDesktopRightPalette(NULL) |
|
|
|
// , mDesktopRightPalette(NULL)
|
|
|
|
, mpTeacherBarWidget(NULL) |
|
|
|
, mpTeacherBarWidget(NULL) |
|
|
|
, mpDesktopLibWidget(NULL) |
|
|
|
, mpDesktopLibWidget(NULL) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -131,11 +134,11 @@ UBBoardPaletteManager::~UBBoardPaletteManager() |
|
|
|
delete mpDesktopLibWidget; |
|
|
|
delete mpDesktopLibWidget; |
|
|
|
mpDesktopLibWidget = NULL; |
|
|
|
mpDesktopLibWidget = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
if(NULL != mDesktopRightPalette) |
|
|
|
// if(NULL != mDesktopRightPalette)
|
|
|
|
{ |
|
|
|
// {
|
|
|
|
delete mDesktopRightPalette; |
|
|
|
// delete mDesktopRightPalette;
|
|
|
|
mDesktopRightPalette = NULL; |
|
|
|
// mDesktopRightPalette = NULL;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::initPalettesPosAtStartup() |
|
|
|
void UBBoardPaletteManager::initPalettesPosAtStartup() |
|
|
@ -153,34 +156,65 @@ void UBBoardPaletteManager::setupLayout() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void UBBoardPaletteManager::setupDockPaletteWidgets() |
|
|
|
void UBBoardPaletteManager::setupDockPaletteWidgets() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------//
|
|
|
|
|
|
|
|
// Create the widgets for the dock palettes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mpPageNavigWidget = new UBPageNavigationWidget(); |
|
|
|
|
|
|
|
mpPageNavigWidget->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpPageNavigWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mpLibWidget = new UBLibWidget(); |
|
|
|
|
|
|
|
mpLibWidget ->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
mpLibWidget ->registerMode(eUBDockPaletteWidget_DESKTOP); |
|
|
|
|
|
|
|
connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpLibWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// mpCachePropWidget = new UBCachePropertiesWidget();
|
|
|
|
|
|
|
|
// mpCachePropWidget->registerMode(eUBDockPaletteWidget_BOARD);
|
|
|
|
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpCachePropWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// mpTeacherBarWidget = new UBTeacherBarWidget();
|
|
|
|
|
|
|
|
// mpTeacherBarWidget->registerMode(eUBDockPaletteWidget_BOARD);
|
|
|
|
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpTeacherBarWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------//
|
|
|
|
|
|
|
|
// Add the dock palettes
|
|
|
|
|
|
|
|
mLeftPalette = new UBLeftPalette(mContainer); |
|
|
|
|
|
|
|
|
|
|
|
// LEFT palette widgets
|
|
|
|
// LEFT palette widgets
|
|
|
|
mLeftPalette->registerWidget(mpPageNavigWidget); |
|
|
|
mLeftPalette->registerWidget(mpPageNavigWidget); |
|
|
|
mLeftPalette->addTabWidget(mpPageNavigWidget); |
|
|
|
mLeftPalette->addTabWidget(mpPageNavigWidget); |
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->connectSignals(); |
|
|
|
mLeftPalette->connectSignals(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mRightPalette = new UBRightPalette(mContainer); |
|
|
|
|
|
|
|
|
|
|
|
// RIGHT palette widgets
|
|
|
|
// RIGHT palette widgets
|
|
|
|
mRightPalette->registerWidget(mpLibWidget); |
|
|
|
mRightPalette->registerWidget(mpLibWidget); |
|
|
|
mRightPalette->registerWidget(mpCachePropWidget); |
|
|
|
|
|
|
|
mRightPalette->addTabWidget(mpLibWidget); |
|
|
|
mRightPalette->addTabWidget(mpLibWidget); |
|
|
|
|
|
|
|
|
|
|
|
mRightPalette->registerWidget(mpTeacherBarWidget); |
|
|
|
// // ???
|
|
|
|
|
|
|
|
// mRightPalette->registerWidget(mpCachePropWidget);
|
|
|
|
|
|
|
|
// mRightPalette->addTabWidget(mpCachePropWidget);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // ???
|
|
|
|
|
|
|
|
// mRightPalette->registerWidget(mpTeacherBarWidget);
|
|
|
|
// mRightPalette->addTabWidget(mpTeacherBarWidget);
|
|
|
|
// mRightPalette->addTabWidget(mpTeacherBarWidget);
|
|
|
|
|
|
|
|
|
|
|
|
mRightPalette->connectSignals(); |
|
|
|
mRightPalette->connectSignals(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------//
|
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->showTabWidget(0); |
|
|
|
mLeftPalette->showTabWidget(0); |
|
|
|
mRightPalette->showTabWidget(0); |
|
|
|
mRightPalette->showTabWidget(0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------//
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::setupPalettes() |
|
|
|
void UBBoardPaletteManager::setupPalettes() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Add the dock palettes
|
|
|
|
|
|
|
|
mLeftPalette = new UBLeftPalette(mContainer); |
|
|
|
|
|
|
|
mRightPalette = new UBRightPalette(mContainer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Create the widgets for the dock palettes
|
|
|
|
|
|
|
|
mpPageNavigWidget = new UBPageNavigationWidget(); |
|
|
|
|
|
|
|
mpLibWidget = new UBLibWidget(); |
|
|
|
|
|
|
|
mpCachePropWidget = new UBCachePropertiesWidget(); |
|
|
|
|
|
|
|
mpTeacherBarWidget = new UBTeacherBarWidget(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setupDockPaletteWidgets(); |
|
|
|
setupDockPaletteWidgets(); |
|
|
|
|
|
|
|
|
|
|
@ -435,6 +469,8 @@ void UBBoardPaletteManager::containerResized() |
|
|
|
mKeyboardPalette->adjustSizeAndPosition(); |
|
|
|
mKeyboardPalette->adjustSizeAndPosition(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->resize(mLeftPalette->width()-1, mContainer->height()); |
|
|
|
|
|
|
|
mRightPalette->resize(mRightPalette->width()-1, mContainer->height()); |
|
|
|
mLeftPalette->resize(mLeftPalette->width(), mContainer->height()); |
|
|
|
mLeftPalette->resize(mLeftPalette->width(), mContainer->height()); |
|
|
|
mRightPalette->resize(mRightPalette->width(), mContainer->height()); |
|
|
|
mRightPalette->resize(mRightPalette->width(), mContainer->height()); |
|
|
|
} |
|
|
|
} |
|
|
@ -569,6 +605,53 @@ void UBBoardPaletteManager::addItem(const QUrl& pUrl) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch( newMode ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case eUBDockPaletteWidget_BOARD: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mLeftPalette->setParent(UBApplication::boardController->controlContainer()); |
|
|
|
|
|
|
|
mRightPalette->setParent(UBApplication::boardController->controlContainer()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->setVisible(true); |
|
|
|
|
|
|
|
mRightPalette->setVisible(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
containerResized(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case eUBDockPaletteWidget_DESKTOP: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mLeftPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); |
|
|
|
|
|
|
|
mRightPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->setVisible(false); |
|
|
|
|
|
|
|
mRightPalette->setVisible(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBApplication::applicationController->uninotesController()->TransparentWidgetResized(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mLeftPalette->setVisible(false); |
|
|
|
|
|
|
|
mRightPalette->setVisible(false); |
|
|
|
|
|
|
|
mLeftPalette->setParent(0); |
|
|
|
|
|
|
|
mRightPalette->setParent(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
emit signal_changeMode(newMode); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::slot_changeMode(eUBDockPaletteWidgetMode newMode) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
emit signal_changeMode(newMode); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::addItem(const QPixmap& pPixmap, const QPointF& pos, qreal scaleFactor, const QUrl& sourceUrl) |
|
|
|
void UBBoardPaletteManager::addItem(const QPixmap& pPixmap, const QPointF& pos, qreal scaleFactor, const QUrl& sourceUrl) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -719,6 +802,7 @@ void UBBoardPaletteManager::changeStylusPaletteOrientation(QVariant var) |
|
|
|
mStylusPalette->setVisible(bVisible); // always show stylus palette at startup
|
|
|
|
mStylusPalette->setVisible(bVisible); // always show stylus palette at startup
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
UBRightPalette* UBBoardPaletteManager::createDesktopRightPalette(QWidget* parent) |
|
|
|
UBRightPalette* UBBoardPaletteManager::createDesktopRightPalette(QWidget* parent) |
|
|
|
{ |
|
|
|
{ |
|
|
|
mpDesktopLibWidget = new UBLibWidget(); |
|
|
|
mpDesktopLibWidget = new UBLibWidget(); |
|
|
@ -729,6 +813,7 @@ UBRightPalette* UBBoardPaletteManager::createDesktopRightPalette(QWidget* parent |
|
|
|
|
|
|
|
|
|
|
|
return mDesktopRightPalette; |
|
|
|
return mDesktopRightPalette; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::connectToDocumentController() |
|
|
|
void UBBoardPaletteManager::connectToDocumentController() |
|
|
|
{ |
|
|
|
{ |
|
|
|