|
|
@ -173,24 +173,18 @@ void UBBoardPaletteManager::setupDockPaletteWidgets() |
|
|
|
// Create the widgets for the dock palettes
|
|
|
|
// Create the widgets for the dock palettes
|
|
|
|
|
|
|
|
|
|
|
|
mpPageNavigWidget = new UBPageNavigationWidget(); |
|
|
|
mpPageNavigWidget = new UBPageNavigationWidget(); |
|
|
|
mpPageNavigWidget->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpPageNavigWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpPageNavigWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
|
|
|
|
|
|
|
|
mpLibWidget = new UBLibWidget(); |
|
|
|
mpLibWidget = new UBLibWidget(); |
|
|
|
mpLibWidget ->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
mpLibWidget ->registerMode(eUBDockPaletteWidget_DESKTOP); |
|
|
|
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpLibWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpLibWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
|
|
|
|
|
|
|
|
mpCachePropWidget = new UBCachePropertiesWidget(); |
|
|
|
mpCachePropWidget = new UBCachePropertiesWidget(); |
|
|
|
mpCachePropWidget->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpCachePropWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpCachePropWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
|
|
|
|
|
|
|
|
mpTeacherBarWidget = new UBTeacherBarWidget(); |
|
|
|
mpTeacherBarWidget = new UBTeacherBarWidget(); |
|
|
|
mpTeacherBarWidget->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpTeacherBarWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
// connect(this, SIGNAL(signal_changeMode(eUBDockPaletteWidgetMode)), mpTeacherBarWidget, SLOT(slot_changeMode(eUBDockPaletteWidgetMode)));
|
|
|
|
|
|
|
|
|
|
|
|
mpDownloadWidget = new UBDockDownloadWidget(); |
|
|
|
mpDownloadWidget = new UBDockDownloadWidget(); |
|
|
|
mpDownloadWidget->registerMode(eUBDockPaletteWidget_BOARD); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add the dock palettes
|
|
|
|
// Add the dock palettes
|
|
|
|
mLeftPalette = new UBLeftPalette(mContainer); |
|
|
|
mLeftPalette = new UBLeftPalette(mContainer); |
|
|
@ -689,38 +683,10 @@ void UBBoardPaletteManager::addItem(const QUrl& pUrl) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::processPalettersWidget(UBDockPalette *paletter, eUBDockPaletteWidgetMode mode) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//-------------------------------//
|
|
|
|
|
|
|
|
// get full right palette widgets list, parse it, show all widgets for BOARD mode, and hide all other
|
|
|
|
|
|
|
|
QVector<UBDockPaletteWidget*> widgetsList = paletter->GetWidgetsList(); |
|
|
|
|
|
|
|
for(int i = 0; i < widgetsList.size(); i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
UBDockPaletteWidget* pNextWidget = widgetsList.at(i); |
|
|
|
|
|
|
|
if( pNextWidget != NULL ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( pNextWidget->GetRegisteredModes().contains(mode) )
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
paletter->addTab(pNextWidget); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
paletter->removeTab(pNextWidget->name()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//-------------------------------//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(widgetsList.size() > 0) |
|
|
|
|
|
|
|
paletter->showTabWidget(0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paletter->update(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool isInit) |
|
|
|
void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool isInit) |
|
|
|
{ |
|
|
|
{ |
|
|
|
processPalettersWidget(mRightPalette, newMode); |
|
|
|
bool rightPaletteVisible = mRightPalette->switchMode(newMode); |
|
|
|
processPalettersWidget(mLeftPalette, newMode); |
|
|
|
bool leftPaletteVisible = mLeftPalette->switchMode(newMode); |
|
|
|
|
|
|
|
|
|
|
|
switch( newMode ) |
|
|
|
switch( newMode ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -741,9 +707,10 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is |
|
|
|
mKeyboardPalette->setParent(UBApplication::boardController->controlContainer()); |
|
|
|
mKeyboardPalette->setParent(UBApplication::boardController->controlContainer()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->setVisible(true); |
|
|
|
mLeftPalette->setVisible(leftPaletteVisible); |
|
|
|
mRightPalette->setVisible(true); |
|
|
|
mRightPalette->setVisible(rightPaletteVisible); |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
|
|
|
|
if (rightPaletteVisible) |
|
|
|
mRightPalette->setAdditionalVOffset(0); |
|
|
|
mRightPalette->setAdditionalVOffset(0); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
@ -773,9 +740,10 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is |
|
|
|
mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); |
|
|
|
mKeyboardPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mLeftPalette->setVisible(false); |
|
|
|
mLeftPalette->setVisible(leftPaletteVisible); |
|
|
|
mRightPalette->setVisible(true); |
|
|
|
mRightPalette->setVisible(rightPaletteVisible); |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
|
|
|
|
if (rightPaletteVisible) |
|
|
|
mRightPalette->setAdditionalVOffset(30); |
|
|
|
mRightPalette->setAdditionalVOffset(30); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
@ -805,8 +773,8 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
{ |
|
|
|
{ |
|
|
|
mLeftPalette->setVisible(false); |
|
|
|
mLeftPalette->setVisible(leftPaletteVisible); |
|
|
|
mRightPalette->setVisible(false); |
|
|
|
mRightPalette->setVisible(rightPaletteVisible); |
|
|
|
mLeftPalette->setParent(0); |
|
|
|
mLeftPalette->setParent(0); |
|
|
|
mRightPalette->assignParent(0); |
|
|
|
mRightPalette->assignParent(0); |
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL) |
|
|
|
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL) |
|
|
|