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
81ec03fe
Commit
81ec03fe
authored
May 23, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Sankore-1.40' of github.com:Sankore/Sankore-3.1 into Sankore-1.40
parents
ad18a5f4
b42afc9e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
111 additions
and
33 deletions
+111
-33
UBBoardView.cpp
src/board/UBBoardView.cpp
+1
-0
UBSettings.cpp
src/core/UBSettings.cpp
+8
-5
UBSettings.h
src/core/UBSettings.h
+8
-5
UBGraphicsVideoItem.cpp
src/domain/UBGraphicsVideoItem.cpp
+3
-0
UBDockPalette.cpp
src/gui/UBDockPalette.cpp
+2
-1
UBDockPalette.h
src/gui/UBDockPalette.h
+3
-2
UBLeftPalette.cpp
src/gui/UBLeftPalette.cpp
+41
-6
UBLeftPalette.h
src/gui/UBLeftPalette.h
+2
-0
UBNavigatorPalette.cpp
src/gui/UBNavigatorPalette.cpp
+1
-7
UBRightPalette.cpp
src/gui/UBRightPalette.cpp
+40
-7
UBRightPalette.h
src/gui/UBRightPalette.h
+2
-0
No files found.
src/board/UBBoardView.cpp
View file @
81ec03fe
...
...
@@ -426,6 +426,7 @@ UBBoardView::mousePressEvent (QMouseEvent *event)
if
(
!
movingItem
||
movingItem
->
isSelected
()
||
movingItem
->
data
(
UBGraphicsItemData
::
ItemLocked
).
toBool
()
||
movingItem
->
type
()
==
UBGraphicsDelegateFrame
::
Type
||
movingItem
->
type
()
==
DelegateButton
::
Type
||
movingItem
->
type
()
==
UBGraphicsCompass
::
Type
...
...
src/core/UBSettings.cpp
View file @
81ec03fe
...
...
@@ -204,11 +204,14 @@ 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"
,
270
);
rightLibPaletteWidth
=
new
UBSetting
(
this
,
"Board"
,
"RightLibPaletteWidth"
,
270
);
rightLibPaletteIsCollapsed
=
new
UBSetting
(
this
,
"Board"
,
"RightLibPaletteIsCollapsed"
,
false
);
leftLibPaletteWidth
=
new
UBSetting
(
this
,
"Board"
,
"LeftLibPaletteWidth"
,
270
);
leftLibPaletteIsCollapsed
=
new
UBSetting
(
this
,
"Board"
,
"LeftLibPaletteIsCollapsed"
,
false
);
rightLibPaletteBoardModeWidth
=
new
UBSetting
(
this
,
"Board"
,
"RightLibPaletteBoardModeWidth"
,
270
);
rightLibPaletteBoardModeIsCollapsed
=
new
UBSetting
(
this
,
"Board"
,
"RightLibPaletteBoardModeIsCollapsed"
,
false
);
rightLibPaletteDesktopModeWidth
=
new
UBSetting
(
this
,
"Board"
,
"RightLibPaletteDesktopModeWidth"
,
270
);
rightLibPaletteDesktopModeIsCollapsed
=
new
UBSetting
(
this
,
"Board"
,
"RightLibPaletteDesktopModeIsCollapsed"
,
false
);
leftLibPaletteBoardModeWidth
=
new
UBSetting
(
this
,
"Board"
,
"LeftLibPaletteBoardModeWidth"
,
270
);
leftLibPaletteBoardModeIsCollapsed
=
new
UBSetting
(
this
,
"Board"
,
"LeftLibPaletteBoardModeIsCollapsed"
,
false
);
leftLibPaletteDesktopModeWidth
=
new
UBSetting
(
this
,
"Board"
,
"LeftLibPaletteDesktopModeWidth"
,
270
);
leftLibPaletteDesktopModeIsCollapsed
=
new
UBSetting
(
this
,
"Board"
,
"LeftLibPaletteDesktopModeIsCollapsed"
,
false
);
appIsInSoftwareUpdateProcess
=
new
UBSetting
(
this
,
"App"
,
"IsInSoftwareUpdateProcess"
,
false
);
appLastSessionDocumentUUID
=
new
UBSetting
(
this
,
"App"
,
"LastSessionDocumentUUID"
,
""
);
...
...
src/core/UBSettings.h
View file @
81ec03fe
...
...
@@ -314,11 +314,14 @@ class UBSettings : public QObject
UBSetting
*
gipThumbnailWidth
;
UBSetting
*
soundThumbnailWidth
;
UBSetting
*
navigPaletteWidth
;
UBSetting
*
rightLibPaletteWidth
;
UBSetting
*
rightLibPaletteIsCollapsed
;
UBSetting
*
leftLibPaletteWidth
;
UBSetting
*
leftLibPaletteIsCollapsed
;
UBSetting
*
rightLibPaletteBoardModeWidth
;
UBSetting
*
rightLibPaletteBoardModeIsCollapsed
;
UBSetting
*
rightLibPaletteDesktopModeWidth
;
UBSetting
*
rightLibPaletteDesktopModeIsCollapsed
;
UBSetting
*
leftLibPaletteBoardModeWidth
;
UBSetting
*
leftLibPaletteBoardModeIsCollapsed
;
UBSetting
*
leftLibPaletteDesktopModeWidth
;
UBSetting
*
leftLibPaletteDesktopModeIsCollapsed
;
UBSetting
*
communityUser
;
UBSetting
*
communityPsw
;
...
...
src/domain/UBGraphicsVideoItem.cpp
View file @
81ec03fe
...
...
@@ -120,6 +120,9 @@ void UBGraphicsVideoItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsVideoItem
::
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
mDelegate
->
delegated
()
->
data
(
UBGraphicsItemData
::
ItemLocked
).
toBool
())
return
;
if
(
mShouldMove
&&
(
event
->
buttons
()
&
Qt
::
LeftButton
))
{
QPointF
offset
=
event
->
scenePos
()
-
mMousePressPos
;
...
...
src/gui/UBDockPalette.cpp
View file @
81ec03fe
...
...
@@ -531,9 +531,10 @@ void UBDockPalette::setVisible(bool visible)
bool
UBDockPalette
::
switchMode
(
eUBDockPaletteWidgetMode
mode
)
{
mCurrentMode
=
mode
;
bool
hasVisibleElements
=
false
;
//-------------------------------//
// get full
right
palette widgets list, parse it, show all widgets for BOARD mode, and hide all other
// get full palette widgets list, parse it, show all widgets for BOARD mode, and hide all other
for
(
int
i
=
0
;
i
<
mRegisteredWidgets
.
size
();
i
++
)
{
UBDockPaletteWidget
*
pNextWidget
=
mRegisteredWidgets
.
at
(
i
);
...
...
src/gui/UBDockPalette.h
View file @
81ec03fe
...
...
@@ -79,8 +79,7 @@ private:
typedef
enum
{
eUBDockPaletteType_LEFT
,
eUBDockPaletteType_RIGHT
,
eUBDockPaletteType_NAVIGATOR
,
eUBDockPaletteType_RIGHT
}
eUBDockPaletteType
;
...
...
@@ -116,6 +115,8 @@ public:
bool
switchMode
(
eUBDockPaletteWidgetMode
mode
);
eUBDockPaletteWidgetMode
mCurrentMode
;
QVector
<
UBDockPaletteWidget
*>
GetWidgetsList
()
{
return
mRegisteredWidgets
;
}
public
:
...
...
src/gui/UBLeftPalette.cpp
View file @
81ec03fe
...
...
@@ -25,11 +25,19 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):
{
setObjectName
(
name
);
setOrientation
(
eUBDockOrientation_Left
);
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteWidth
->
get
().
toInt
();
mCollapseWidth
=
150
;
if
(
UBSettings
::
settings
()
->
leftLibPaletteIsCollapsed
->
get
().
toBool
())
bool
isCollapsed
=
false
;
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
get
().
toInt
();
isCollapsed
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
get
().
toBool
();
}
else
{
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
get
().
toInt
();
isCollapsed
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
();
}
if
(
isCollapsed
)
resize
(
0
,
parentWidget
()
->
height
());
else
resize
(
mLastWidth
,
parentWidget
()
->
height
());
...
...
@@ -58,8 +66,35 @@ void UBLeftPalette::updateMaxWidth()
void
UBLeftPalette
::
resizeEvent
(
QResizeEvent
*
event
)
{
int
newWidth
=
width
();
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
leftLibPaletteWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteIsCollapsed
->
set
(
newWidth
==
0
);
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
set
(
newWidth
==
0
);
}
else
{
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
set
(
newWidth
==
0
);
}
UBDockPalette
::
resizeEvent
(
event
);
}
bool
UBLeftPalette
::
switchMode
(
eUBDockPaletteWidgetMode
mode
)
{
int
newModeWidth
;
if
(
mode
==
eUBDockPaletteWidget_BOARD
){
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteBoardModeWidth
->
get
().
toInt
();
newModeWidth
=
mLastWidth
;
if
(
UBSettings
::
settings
()
->
leftLibPaletteBoardModeIsCollapsed
->
get
().
toBool
())
newModeWidth
=
0
;
}
else
{
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeWidth
->
get
().
toInt
();
newModeWidth
=
mLastWidth
;
if
(
UBSettings
::
settings
()
->
leftLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
())
newModeWidth
=
0
;
}
resize
(
newModeWidth
,
height
());
return
UBDockPalette
::
switchMode
(
mode
);
}
src/gui/UBLeftPalette.h
View file @
81ec03fe
...
...
@@ -23,6 +23,8 @@ public:
UBLeftPalette
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBLeftPalette"
);
~
UBLeftPalette
();
bool
switchMode
(
eUBDockPaletteWidgetMode
mode
);
protected
:
void
updateMaxWidth
();
void
resizeEvent
(
QResizeEvent
*
event
);
...
...
src/gui/UBNavigatorPalette.cpp
View file @
81ec03fe
...
...
@@ -24,18 +24,13 @@
* @param name as the object name
*/
UBNavigatorPalette
::
UBNavigatorPalette
(
QWidget
*
parent
,
const
char
*
name
)
:
UBDockPalette
(
eUBDockPaletteType_NAVIGATOR
,
parent
,
name
)
UBDockPalette
(
eUBDockPaletteType_LEFT
,
parent
,
name
)
,
mNavigator
(
NULL
)
,
mLayout
(
NULL
)
,
mHLayout
(
NULL
)
,
mPageNbr
(
NULL
)
,
mClock
(
NULL
)
{
setOrientation
(
eUBDockOrientation_Left
);
setMaximumWidth
(
300
);
resize
(
UBSettings
::
settings
()
->
navigPaletteWidth
->
get
().
toInt
(),
height
());
mLastWidth
=
300
;
// Build the gui
mLayout
=
new
QVBoxLayout
(
this
);
mLayout
->
setContentsMargins
(
customMargin
(),
customMargin
(),
2
*
border
()
+
customMargin
(),
customMargin
());
...
...
@@ -150,7 +145,6 @@ void UBNavigatorPalette::resizeEvent(QResizeEvent *event)
{
mNavigator
->
setMinimumHeight
(
height
()
-
2
*
border
());
}
UBSettings
::
settings
()
->
navigPaletteWidth
->
set
(
width
());
}
void
UBNavigatorPalette
::
timerEvent
(
QTimerEvent
*
event
)
...
...
src/gui/UBRightPalette.cpp
View file @
81ec03fe
...
...
@@ -28,9 +28,16 @@ UBRightPalette::UBRightPalette(QWidget *parent, const char *name):
setObjectName
(
name
);
setOrientation
(
eUBDockOrientation_Right
);
mCollapseWidth
=
150
;
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteWidth
->
get
().
toInt
();
if
(
UBSettings
::
settings
()
->
rightLibPaletteIsCollapsed
->
get
().
toBool
())
bool
isCollapsed
=
false
;
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteBoardModeWidth
->
get
().
toInt
();
isCollapsed
=
UBSettings
::
settings
()
->
rightLibPaletteBoardModeIsCollapsed
->
get
().
toBool
();
}
else
{
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteDesktopModeWidth
->
get
().
toInt
();
isCollapsed
=
UBSettings
::
settings
()
->
rightLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
();
}
if
(
isCollapsed
)
resize
(
0
,
parentWidget
()
->
height
());
else
resize
(
mLastWidth
,
parentWidget
()
->
height
());
...
...
@@ -62,10 +69,17 @@ void UBRightPalette::mouseMoveEvent(QMouseEvent *event)
void
UBRightPalette
::
resizeEvent
(
QResizeEvent
*
event
)
{
int
newWidth
=
width
();
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
rightLibPaletteWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
rightLibPaletteIsCollapsed
->
set
(
newWidth
==
0
);
UBDockPalette
::
resizeEvent
(
event
);
if
(
mCurrentMode
==
eUBDockPaletteWidget_BOARD
){
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
rightLibPaletteBoardModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
rightLibPaletteBoardModeIsCollapsed
->
set
(
newWidth
==
0
);
}
else
{
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
rightLibPaletteDesktopModeWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
rightLibPaletteDesktopModeIsCollapsed
->
set
(
newWidth
==
0
);
}
UBDockPalette
::
resizeEvent
(
event
);
emit
resized
();
}
...
...
@@ -78,3 +92,22 @@ void UBRightPalette::updateMaxWidth()
setMaximumHeight
(
parentWidget
()
->
height
());
setMinimumHeight
(
parentWidget
()
->
height
());
}
bool
UBRightPalette
::
switchMode
(
eUBDockPaletteWidgetMode
mode
)
{
int
newModeWidth
;
if
(
mode
==
eUBDockPaletteWidget_BOARD
){
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteBoardModeWidth
->
get
().
toInt
();
newModeWidth
=
mLastWidth
;
if
(
UBSettings
::
settings
()
->
rightLibPaletteBoardModeIsCollapsed
->
get
().
toBool
())
newModeWidth
=
0
;
}
else
{
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteDesktopModeWidth
->
get
().
toInt
();
newModeWidth
=
mLastWidth
;
if
(
UBSettings
::
settings
()
->
rightLibPaletteDesktopModeIsCollapsed
->
get
().
toBool
())
newModeWidth
=
0
;
}
resize
(
newModeWidth
,
height
());
return
UBDockPalette
::
switchMode
(
mode
);
}
src/gui/UBRightPalette.h
View file @
81ec03fe
...
...
@@ -23,6 +23,7 @@ class UBRightPalette : public UBDockPalette
public
:
UBRightPalette
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBRightPalette"
);
~
UBRightPalette
();
bool
switchMode
(
eUBDockPaletteWidgetMode
mode
);
signals
:
void
resized
();
...
...
@@ -31,6 +32,7 @@ protected:
void
updateMaxWidth
();
void
mouseMoveEvent
(
QMouseEvent
*
event
);
void
resizeEvent
(
QResizeEvent
*
event
);
};
#endif // UBRIGHTPALETTE_H
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