Resolved issue 255

preferencesAboutTextFull
shibakaneki 13 years ago
parent 1fead3ef9f
commit cd976fef77
  1. 24
      src/board/UBBoardPaletteManager.cpp
  2. 11
      src/board/UBBoardPaletteManager.h
  3. 5
      src/desktop/UBDesktopAnnotationController.cpp
  4. 3
      src/gui/UBDockPalette.cpp

@ -76,6 +76,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
, mpPageNavigWidget(NULL) , mpPageNavigWidget(NULL)
, mpLibWidget(NULL) , mpLibWidget(NULL)
, mpCachePropWidget(NULL) , mpCachePropWidget(NULL)
, mDesktopRightPalette(NULL)
, mpDesktopLibWidget(NULL)
{ {
setupPalettes(); setupPalettes();
connectPalettes(); connectPalettes();
@ -117,6 +119,17 @@ UBBoardPaletteManager::~UBBoardPaletteManager()
delete mStylusPalette; delete mStylusPalette;
mStylusPalette = NULL; mStylusPalette = NULL;
} }
if(NULL != mpDesktopLibWidget)
{
delete mpDesktopLibWidget;
mpDesktopLibWidget = NULL;
}
if(NULL != mDesktopRightPalette)
{
delete mDesktopRightPalette;
mDesktopRightPalette = NULL;
}
} }
void UBBoardPaletteManager::initPalettesPosAtStartup() void UBBoardPaletteManager::initPalettesPosAtStartup()
@ -693,3 +706,14 @@ void UBBoardPaletteManager::changeStylusPaletteOrientation(QVariant var)
connect(mStylusPalette, SIGNAL(stylusToolDoubleClicked(int)), UBApplication::boardController, SLOT(stylusToolDoubleClicked(int))); connect(mStylusPalette, SIGNAL(stylusToolDoubleClicked(int)), UBApplication::boardController, SLOT(stylusToolDoubleClicked(int)));
mStylusPalette->setVisible(bVisible); // always show stylus palette at startup mStylusPalette->setVisible(bVisible); // always show stylus palette at startup
} }
UBRightPalette* UBBoardPaletteManager::createDesktopRightPalette(QWidget* parent)
{
mpDesktopLibWidget = new UBLibWidget();
mDesktopRightPalette = new UBRightPalette(parent);
mDesktopRightPalette->registerWidget(mpDesktopLibWidget);
mDesktopRightPalette->addTabWidget(mpDesktopLibWidget);
mDesktopRightPalette->connectSignals();
return mDesktopRightPalette;
}

@ -51,6 +51,7 @@ class UBBoardPaletteManager : public QObject
void initPalettesPosAtStartup(); void initPalettesPosAtStartup();
UBKeyboardPalette *mKeyboardPalette; UBKeyboardPalette *mKeyboardPalette;
UBRightPalette* createDesktopRightPalette(QWidget* parent);
public slots: public slots:
@ -78,6 +79,11 @@ class UBBoardPaletteManager : public QObject
/** The right dock palette */ /** The right dock palette */
UBRightPalette* mRightPalette; UBRightPalette* mRightPalette;
// HACK: here we duplicate the right palette for the desktop mode
// we MUST refactor the architecture in order to use only one
// right palette!
UBRightPalette* mDesktopRightPalette;
UBActionPalette *mBackgroundsPalette; UBActionPalette *mBackgroundsPalette;
UBActionPalette *mToolsPalette; UBActionPalette *mToolsPalette;
UBActionPalette* mAddItemPalette; UBActionPalette* mAddItemPalette;
@ -108,6 +114,11 @@ class UBBoardPaletteManager : public QObject
/** The cache properties widget */ /** The cache properties widget */
UBCachePropertiesWidget* mpCachePropWidget; UBCachePropertiesWidget* mpCachePropWidget;
// HACK: here we duplicate the lib widget for the desktop mode
// we MUST refactor the architecture in order to use only one
// lib widget!
UBLibWidget* mpDesktopLibWidget;
private slots: private slots:
void changeBackground(); void changeBackground();

@ -31,6 +31,7 @@
#include "board/UBBoardView.h" #include "board/UBBoardView.h"
#include "board/UBDrawingController.h" #include "board/UBDrawingController.h"
#include "board/UBBoardController.h" #include "board/UBBoardController.h"
#include "board/UBBoardPaletteManager.h"
#include "domain/UBGraphicsScene.h" #include "domain/UBGraphicsScene.h"
@ -87,7 +88,8 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mTransparentDrawingScene = new UBGraphicsScene(0); mTransparentDrawingScene = new UBGraphicsScene(0);
mTransparentDrawingView->setScene(mTransparentDrawingScene); mTransparentDrawingView->setScene(mTransparentDrawingScene);
mRightPalette = new UBRightPalette(mTransparentDrawingView); mRightPalette = UBApplication::boardController->paletteManager()->createDesktopRightPalette(mTransparentDrawingView);
//mRightPalette = new UBRightPalette(mTransparentDrawingView);
mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView); mDesktopPalette = new UBDesktopPalette(mTransparentDrawingView);
@ -810,6 +812,7 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
} }
if(mRightPalette->isVisible()) if(mRightPalette->isVisible())
{ {
qDebug() << ">>>>>> Drawing the mask for the right palette";
p.drawRect(mRightPalette->geometry().x(), mRightPalette->geometry().y(), mRightPalette->width(), mRightPalette->height()); p.drawRect(mRightPalette->geometry().x(), mRightPalette->geometry().y(), mRightPalette->width(), mRightPalette->height());
} }

@ -167,6 +167,9 @@ void UBDockPalette::mouseMoveEvent(QMouseEvent *event)
resize(parentWidget()->width() - (this->x() + p.x()), height()); resize(parentWidget()->width() - (this->x() + p.x()), height());
mResized = true; mResized = true;
} }
qDebug() << ">>>>> UBRightPalette x=" << this->x() << ", y=" << this->y();
break; break;
case eUBDockOrientation_Top: case eUBDockOrientation_Top:
case eUBDockOrientation_Bottom: case eUBDockOrientation_Bottom:

Loading…
Cancel
Save