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

Sankore 396 444-446

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