Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Anatoly Mihalchenko 13 years ago
commit 7f92409fb5
  1. 2
      Sankore_3.1.pro
  2. 24
      src/board/UBBoardPaletteManager.cpp
  3. 11
      src/board/UBBoardPaletteManager.h
  4. 5
      src/desktop/UBDesktopAnnotationController.cpp
  5. 1
      src/gui/UBDockPalette.cpp
  6. 7
      src/gui/UBMainWindow.cpp

@ -7,7 +7,7 @@ CONFIG += debug_and_release \
no_include_pwd
VERSION_MAJ = 1
VERSION_MIN = 26
VERSION_MIN = 28
VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error
VERSION_PATCH = 00

@ -76,6 +76,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
, mpPageNavigWidget(NULL)
, mpLibWidget(NULL)
, mpCachePropWidget(NULL)
, mDesktopRightPalette(NULL)
, mpDesktopLibWidget(NULL)
{
setupPalettes();
connectPalettes();
@ -117,6 +119,17 @@ UBBoardPaletteManager::~UBBoardPaletteManager()
delete mStylusPalette;
mStylusPalette = NULL;
}
if(NULL != mpDesktopLibWidget)
{
delete mpDesktopLibWidget;
mpDesktopLibWidget = NULL;
}
if(NULL != mDesktopRightPalette)
{
delete mDesktopRightPalette;
mDesktopRightPalette = NULL;
}
}
void UBBoardPaletteManager::initPalettesPosAtStartup()
@ -693,3 +706,14 @@ void UBBoardPaletteManager::changeStylusPaletteOrientation(QVariant var)
connect(mStylusPalette, SIGNAL(stylusToolDoubleClicked(int)), UBApplication::boardController, SLOT(stylusToolDoubleClicked(int)));
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();
UBKeyboardPalette *mKeyboardPalette;
UBRightPalette* createDesktopRightPalette(QWidget* parent);
public slots:
@ -78,6 +79,11 @@ class UBBoardPaletteManager : public QObject
/** The right dock palette */
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 *mToolsPalette;
UBActionPalette* mAddItemPalette;
@ -108,6 +114,11 @@ class UBBoardPaletteManager : public QObject
/** The cache properties widget */
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:
void changeBackground();

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

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

@ -31,6 +31,13 @@ UBMainWindow::UBMainWindow(QWidget *parent, Qt::WindowFlags flags)
{
Ui::MainWindow::setupUi(this);
//Setting tooltip colors staticly, since they look not quite well on different color themes
QPalette toolTipPalette;
toolTipPalette.setColor(QPalette::ToolTipBase, QColor("#FFFFDC"));
toolTipPalette.setColor(QPalette::ToolTipText, Qt::black);
QToolTip::setPalette(toolTipPalette);
QWidget* centralWidget = new QWidget(this);
mStackedLayout = new QStackedLayout(centralWidget);
setCentralWidget(centralWidget);

Loading…
Cancel
Save