Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
6037d9aa
Commit
6037d9aa
authored
Feb 15, 2013
by
Ilia Ryabokon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'OEFUniboard' of github.com:stayonshadow/PrivateBoard into OEFUniboard
parents
09c1ba37
2447d1e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
59 deletions
+43
-59
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+3
-17
UBBoardPaletteManager.h
src/board/UBBoardPaletteManager.h
+3
-7
UBLeftPalette.cpp
src/gui/UBLeftPalette.cpp
+37
-35
No files found.
src/board/UBBoardPaletteManager.cpp
View file @
6037d9aa
...
@@ -103,8 +103,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
...
@@ -103,8 +103,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
UBBoardPaletteManager
::~
UBBoardPaletteManager
()
UBBoardPaletteManager
::~
UBBoardPaletteManager
()
{
{
// mAddedItemPalette is delete automatically because of is parent
// mAddedItemPalette is delete automatically because of is parent
// that changes depending on the mode
// that changes depending on the mode
// mMainWindow->centralWidget is the parent of mStylusPalette
// mMainWindow->centralWidget is the parent of mStylusPalette
// do not delete this here.
// do not delete this here.
...
@@ -150,22 +150,13 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
...
@@ -150,22 +150,13 @@ void UBBoardPaletteManager::setupDockPaletteWidgets()
}
}
mLeftPalette
->
connectSignals
();
mLeftPalette
->
connectSignals
();
mLeftPalette
->
showTabWidget
(
0
);
mRightPalette
=
new
UBRightPalette
(
mContainer
);
mRightPalette
=
new
UBRightPalette
(
mContainer
);
// RIGHT palette widgets
// RIGHT palette widgets
#ifndef USE_WEB_WIDGET
mpFeaturesWidget
=
new
UBFeaturesWidget
();
mpFeaturesWidget
=
new
UBFeaturesWidget
();
mRightPalette
->
registerWidget
(
mpFeaturesWidget
);
mRightPalette
->
registerWidget
(
mpFeaturesWidget
);
mRightPalette
->
addTab
(
mpFeaturesWidget
);
mRightPalette
->
addTab
(
mpFeaturesWidget
);
#endif
//Do not show deprecated lib widget to prevent collisions. Uncomment to return lib widget
#ifdef USE_WEB_WIDGET
mRightPalette
->
registerWidget
(
mpLibWidget
);
mRightPalette
->
addTab
(
mpLibWidget
);
#endif
// The cache widget will be visible only if a cache is put on the page
// The cache widget will be visible only if a cache is put on the page
mRightPalette
->
registerWidget
(
mpCachePropWidget
);
mRightPalette
->
registerWidget
(
mpCachePropWidget
);
...
@@ -890,14 +881,9 @@ void UBBoardPaletteManager::addItemToLibrary()
...
@@ -890,14 +881,9 @@ void UBBoardPaletteManager::addItemToLibrary()
}
}
QImage
image
=
mPixmap
.
toImage
();
QImage
image
=
mPixmap
.
toImage
();
#ifdef USE_WEB_WIDGET
mpLibWidget
->
libNavigator
()
->
libraryWidget
()
->
libraryController
()
->
importImageOnLibrary
(
image
);
#else
QDateTime
now
=
QDateTime
::
currentDateTime
();
QDateTime
now
=
QDateTime
::
currentDateTime
();
QString
capturedName
=
tr
(
"CapturedImage"
)
+
"-"
+
now
.
toString
(
"dd-MM-yyyy hh-mm-ss"
)
+
".png"
;
QString
capturedName
=
tr
(
"CapturedImage"
)
+
"-"
+
now
.
toString
(
"dd-MM-yyyy hh-mm-ss"
)
+
".png"
;
mpFeaturesWidget
->
importImage
(
image
,
capturedName
);
mpFeaturesWidget
->
importImage
(
image
,
capturedName
);
#endif
}
}
else
else
{
{
...
...
src/board/UBBoardPaletteManager.h
View file @
6037d9aa
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include <QtGui>
#include <QtGui>
#include <QtWebKit>
#include <QtWebKit>
#include "gui/UBLeftPalette.h"
#include "gui/UBLeftPalette.h"
#include "gui/UBRightPalette.h"
#include "gui/UBRightPalette.h"
#include "gui/UBPageNavigationWidget.h"
#include "gui/UBPageNavigationWidget.h"
...
@@ -49,10 +49,6 @@ class UBMainWindow;
...
@@ -49,10 +49,6 @@ class UBMainWindow;
class
UBApplicationController
;
class
UBApplicationController
;
class
UBDockTeacherGuideWidget
;
class
UBDockTeacherGuideWidget
;
// Uncomment this to use old-styles lib paletter
// #define USE_WEB_WIDGET
class
UBBoardPaletteManager
:
public
QObject
class
UBBoardPaletteManager
:
public
QObject
{
{
Q_OBJECT
Q_OBJECT
...
@@ -143,11 +139,11 @@ class UBBoardPaletteManager : public QObject
...
@@ -143,11 +139,11 @@ class UBBoardPaletteManager : public QObject
/** The page navigator widget */
/** The page navigator widget */
UBPageNavigationWidget
*
mpPageNavigWidget
;
UBPageNavigationWidget
*
mpPageNavigWidget
;
/** The cache properties widget */
/** The cache properties widget */
UBCachePropertiesWidget
*
mpCachePropWidget
;
UBCachePropertiesWidget
*
mpCachePropWidget
;
UBFeaturesWidget
*
mpFeaturesWidget
;
UBFeaturesWidget
*
mpFeaturesWidget
;
/** The download widget */
/** The download widget */
UBDockDownloadWidget
*
mpDownloadWidget
;
UBDockDownloadWidget
*
mpDownloadWidget
;
...
...
src/gui/UBLeftPalette.cpp
View file @
6037d9aa
...
@@ -38,18 +38,18 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):
...
@@ -38,18 +38,18 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):
bool
isCollapsed
=
false
;
bool
isCollapsed
=
false
;
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
get
().
toInt
();
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
get
().
toInt
();
isCollapsed
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
get
().
toBool
();
isCollapsed
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
get
().
toBool
();
}
}
else
{
else
{
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
get
().
toInt
();
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
get
().
toInt
();
isCollapsed
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
();
isCollapsed
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
();
}
}
if
(
isCollapsed
)
if
(
isCollapsed
)
resize
(
0
,
parentWidget
()
->
height
());
resize
(
0
,
parentWidget
()
->
height
());
else
else
resize
(
mLastWidth
,
parentWidget
()
->
height
());
resize
(
mLastWidth
,
parentWidget
()
->
height
());
}
}
/**
/**
...
@@ -63,9 +63,11 @@ UBLeftPalette::~UBLeftPalette()
...
@@ -63,9 +63,11 @@ UBLeftPalette::~UBLeftPalette()
void
UBLeftPalette
::
onDocumentSet
(
UBDocumentProxy
*
documentProxy
)
void
UBLeftPalette
::
onDocumentSet
(
UBDocumentProxy
*
documentProxy
)
{
{
//This is necessary to force the teacher guide to be showed in priority each time a document is set
// //This is necessary to force the teacher guide to be showed in priority each time a document is set
if
(
documentProxy
&&
UBSettings
::
settings
()
->
teacherGuidePageZeroActivated
->
get
().
toBool
())
// if(documentProxy && UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool())
mLastOpenedTabForMode
.
insert
(
eUBDockPaletteWidget_BOARD
,
1
);
// the tab zero is forced
mLastOpenedTabForMode
.
insert
(
eUBDockPaletteWidget_BOARD
,
0
);
}
}
/**
/**
...
@@ -82,36 +84,36 @@ void UBLeftPalette::updateMaxWidth()
...
@@ -82,36 +84,36 @@ void UBLeftPalette::updateMaxWidth()
*/
*/
void
UBLeftPalette
::
resizeEvent
(
QResizeEvent
*
event
)
void
UBLeftPalette
::
resizeEvent
(
QResizeEvent
*
event
)
{
{
int
newWidth
=
width
();
int
newWidth
=
width
();
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
if
(
newWidth
>
mCollapseWidth
)
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
set
(
newWidth
==
0
);
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
set
(
newWidth
==
0
);
}
}
else
{
else
{
if
(
newWidth
>
mCollapseWidth
)
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
set
(
newWidth
==
0
);
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
set
(
newWidth
==
0
);
}
}
UBDockPalette
::
resizeEvent
(
event
);
UBDockPalette
::
resizeEvent
(
event
);
}
}
bool
UBLeftPalette
::
switchMode
(
eUBDockPaletteWidgetMode
mode
)
bool
UBLeftPalette
::
switchMode
(
eUBDockPaletteWidgetMode
mode
)
{
{
int
newModeWidth
;
int
newModeWidth
;
if
(
mode
==
eUBDockPaletteWidget_BOARD
){
if
(
mode
==
eUBDockPaletteWidget_BOARD
){
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
get
().
toInt
();
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
get
().
toInt
();
newModeWidth
=
mLastWidth
;
newModeWidth
=
mLastWidth
;
if
(
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
get
().
toBool
())
if
(
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
get
().
toBool
())
newModeWidth
=
0
;
newModeWidth
=
0
;
}
}
else
{
else
{
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
get
().
toInt
();
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
get
().
toInt
();
newModeWidth
=
mLastWidth
;
newModeWidth
=
mLastWidth
;
if
(
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
())
if
(
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
())
newModeWidth
=
0
;
newModeWidth
=
0
;
}
}
resize
(
newModeWidth
,
height
());
resize
(
newModeWidth
,
height
());
return
UBDockPalette
::
switchMode
(
mode
);
return
UBDockPalette
::
switchMode
(
mode
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment