Commit 1fc6a86b authored by Ivan Ilin's avatar Ivan Ilin

Sankore 396 444-446

parent 45ec8db8
......@@ -4,7 +4,8 @@ TEMPLATE = app
THIRD_PARTY_PATH=../Sankore-ThirdParty
CONFIG += debug_and_release \
no_include_pwd
no_include_pwd \
link_prl
VERSION_MAJ = 1
VERSION_MIN = 40
......
......@@ -337,5 +337,6 @@
<file>images/libpalette/WebSearchCategory.svg</file>
<file>images/download_close.png</file>
<file>images/download_open.png</file>
<file>images/tab_mask.png</file>
</qresource>
</RCC>
......@@ -727,7 +727,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
case eUBDockPaletteWidget_BOARD:
{
mLeftPalette->setParent(UBApplication::boardController->controlContainer());
mRightPalette->setParent(UBApplication::boardController->controlContainer());
mRightPalette->assignParent(UBApplication::boardController->controlContainer());
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
{
......@@ -752,7 +752,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
case eUBDockPaletteWidget_DESKTOP:
{
mLeftPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mRightPalette->setParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
mRightPalette->assignParent((QWidget*)UBApplication::applicationController->uninotesController()->drawingView());
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
{
......@@ -802,7 +802,7 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(false);
mRightPalette->setVisible(false);
mLeftPalette->setParent(0);
mRightPalette->setParent(0);
mRightPalette->assignParent(0);
if (UBPlatformUtils::hasVirtualKeyboard() && mKeyboardPalette != NULL)
{
......
......@@ -194,8 +194,8 @@ void UBSettings::init()
appEnableAutomaticSoftwareUpdates = new UBSetting(this, "App", "EnableAutomaticSoftwareUpdates", true);
appEnableSoftwareUpdates = new UBSetting(this, "App", "EnableSoftwareUpdates", true);
appToolBarOrientationVertical = new UBSetting(this, "App", "ToolBarOrientationVertical", false);
navigPaletteWidth = new UBSetting(this, "Board", "NavigPaletteWidth", 300);
libPaletteWidth = new UBSetting(this, "Board", "LibPaletteWidth", 300);
navigPaletteWidth = new UBSetting(this, "Board", "NavigPaletteWidth", 270);
libPaletteWidth = new UBSetting(this, "Board", "LibPaletteWidth", 270);
appIsInSoftwareUpdateProcess = new UBSetting(this, "App", "IsInSoftwareUpdateProcess", false);
appLastSessionDocumentUUID = new UBSetting(this, "App", "LastSessionDocumentUUID", "");
......
......@@ -900,7 +900,7 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
{
if(bTransparent)
{
// Here we have to generate a new mask. This method is certainly resource
// Here we have to generate a new mask This method is certainly resource
// consuming but for the moment this is the only solution that I found.
mMask = QPixmap(mTransparentDrawingView->width(), mTransparentDrawingView->height());
......@@ -922,13 +922,17 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
UBApplication::boardController->paletteManager()->mKeyboardPalette->width(), UBApplication::boardController->paletteManager()->mKeyboardPalette->height());
}
// UBApplication::boardController->paletteManager()->mDesktopRightPalette
if(UBApplication::boardController->paletteManager()->rightPalette()->isVisible())
{
p.drawRect(UBApplication::boardController->paletteManager()->rightPalette()->geometry().x(),
UBApplication::boardController->paletteManager()->rightPalette()->geometry().y(),
UBApplication::boardController->paletteManager()->rightPalette()->width(),
UBApplication::boardController->paletteManager()->rightPalette()->height());
QRect rightPalette(UBApplication::boardController->paletteManager()->rightPalette()->geometry().x(),
UBApplication::boardController->paletteManager()->rightPalette()->geometry().y(),
UBApplication::boardController->paletteManager()->rightPalette()->width(),
UBApplication::boardController->paletteManager()->rightPalette()->height());
QRect tabsPalette(UBApplication::boardController->paletteManager()->rightPalette()->getTabPaletteRect());
p.drawRect(rightPalette);
p.drawRect(tabsPalette);
}
p.end();
......
......@@ -111,7 +111,6 @@ void UBDesktopPalette::updateShowHideState(bool pShowEnabled)
mShowHideAction->setToolTip(tr("Show Board on Secondary Screen"));
else
mShowHideAction->setToolTip(tr("Show Desktop on Secondary Screen"));
}
......
......@@ -1455,7 +1455,7 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy)
QString docVersion = proxy->metaData(UBSettings::documentVersion).toString();
if (docVersion.isEmpty() || docVersion.startsWith("4.1") || docVersion.startsWith("4.2")
|| docVersion.startsWith("4.3") || docVersion.startsWith("4.4")) // TODO UB 4.7 update if necessary
|| docVersion.startsWith("4.3") || docVersion.startsWith("4.4") || docVersion.startsWith("4.5")) // TODO UB 4.7 update if necessary
{
return true;
}
......
This diff is collapsed.
......@@ -31,8 +31,8 @@
#include "UBDockPaletteWidget.h"
#define TABSIZE 50
#define CLICKTIME 1000000
#define TABSIZE 50 //Height of the tab of the palette
#define CLICKTIME 1000000 //Clicktime to expand or collapse paltte
/**
* \brief The dock positions
......@@ -51,9 +51,33 @@ typedef enum
eUBDockTabOrientation_Down /** Down tabs */
}eUBDockTabOrientation;
class UBDockPalette;
class UBTabDockPalete : public QWidget
{
Q_OBJECT
friend class UBDockPalette;
public:
UBTabDockPalete(UBDockPalette *dockPalette, QWidget *parent = 0);
~UBTabDockPalete();
protected:
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void paintEvent(QPaintEvent *event);
private:
UBDockPalette *dock;
};
class UBDockPalette : public QWidget
{
Q_OBJECT
friend class UBTabDockPalete;
public:
UBDockPalette(QWidget* parent=0, const char* name="UBDockPalette");
~UBDockPalette();
......@@ -62,10 +86,14 @@ public:
void setOrientation(eUBDockOrientation orientation);
void setTabsOrientation(eUBDockTabOrientation orientation);
void showTabWidget(int tabIndex);
QRect getTabPaletteRect();
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void assignParent(QWidget *widget);
virtual void setVisible(bool visible);
// virtual void mouseMoveEvent(QMouseEvent *event);
// virtual void mousePressEvent(QMouseEvent *event);
// virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void paintEvent(QPaintEvent *event);
virtual void enterEvent(QEvent *);
virtual void leaveEvent(QEvent *);
......@@ -77,7 +105,7 @@ public:
void connectSignals();
QVector<UBDockPaletteWidget*> GetWidgetsList() { return mRegisteredWidgets; };
QVector<UBDockPaletteWidget*> GetWidgetsList() { return mRegisteredWidgets; }
public slots:
void onShowTabWidget(const QString& widgetName);
......@@ -137,6 +165,11 @@ private:
void tabClicked(int tabIndex);
int tabSpacing();
void toggleCollapseExpand();
void moveTabs();
void resizeTabs();
private:
UBTabDockPalete *mTabPalette;
};
......
......@@ -24,11 +24,11 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):UBDockPalette(pa
{
setObjectName(name);
setOrientation(eUBDockOrientation_Left);
mLastWidth = 300;
mCollapseWidth = 180;
mLastWidth = 270;
mCollapseWidth = 150;
resize(UBSettings::settings()->navigPaletteWidth->get().toInt(), parentWidget()->height());
mpLayout->setContentsMargins(customMargin(), customMargin(), 2*border() + customMargin(), customMargin());
// mpLayout->setContentsMargins(customMargin(), customMargin(), 2*border() + customMargin(), customMargin());
}
......@@ -45,7 +45,7 @@ UBLeftPalette::~UBLeftPalette()
*/
void UBLeftPalette::updateMaxWidth()
{
setMaximumWidth(300);
setMaximumWidth(270);
}
/**
......@@ -55,5 +55,5 @@ void UBLeftPalette::updateMaxWidth()
void UBLeftPalette::resizeEvent(QResizeEvent *event)
{
UBDockPalette::resizeEvent(event);
UBSettings::settings()->navigPaletteWidth->set(width());
// UBSettings::settings()->navigPaletteWidth->set(width());
}
......@@ -26,10 +26,10 @@ UBRightPalette::UBRightPalette(QWidget *parent, const char *name):UBDockPalette(
{
setObjectName(name);
setOrientation(eUBDockOrientation_Right);
mCollapseWidth = 180;
mLastWidth = 300;
mCollapseWidth = 150;
mLastWidth = 270;
resize(UBSettings::settings()->libPaletteWidth->get().toInt(), parentWidget()->height());
mpLayout->setContentsMargins(2*border() + customMargin(), customMargin(), customMargin(), customMargin());
// mpLayout->setContentsMargins(2*border() + customMargin(), customMargin(), customMargin(), customMargin());
}
/**
......@@ -37,7 +37,6 @@ UBRightPalette::UBRightPalette(QWidget *parent, const char *name):UBDockPalette(
*/
UBRightPalette::~UBRightPalette()
{
}
/**
......
......@@ -205,6 +205,7 @@ void WBBrowserWindow::setupToolBar()
connect(mSearchToolBar, SIGNAL(search(const QUrl&)), SLOT(loadUrl(const QUrl&)));
mChaseWidget = new WBChaseWidget(this);
mWebToolBar->insertWidget(mUniboardMainWindow->actionWebBigger, mChaseWidget);
mWebToolBar->insertSeparator(mUniboardMainWindow->actionWebBigger);
connect(mUniboardMainWindow->actionHome, SIGNAL(triggered()), this , SLOT(slotHome()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment