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
d822dc73
Commit
d822dc73
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
0180df1b
51467d47
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
477 additions
and
476 deletions
+477
-476
UBSettings.cpp
src/core/UBSettings.cpp
+2
-0
UBSettings.h
src/core/UBSettings.h
+2
-0
UBDockPalette.cpp
src/gui/UBDockPalette.cpp
+456
-468
UBLeftPalette.cpp
src/gui/UBLeftPalette.cpp
+8
-2
UBNavigatorPalette.cpp
src/gui/UBNavigatorPalette.cpp
+0
-2
UBRightPalette.cpp
src/gui/UBRightPalette.cpp
+9
-4
No files found.
src/core/UBSettings.cpp
View file @
d822dc73
...
...
@@ -206,7 +206,9 @@ void UBSettings::init()
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
);
appIsInSoftwareUpdateProcess
=
new
UBSetting
(
this
,
"App"
,
"IsInSoftwareUpdateProcess"
,
false
);
appLastSessionDocumentUUID
=
new
UBSetting
(
this
,
"App"
,
"LastSessionDocumentUUID"
,
""
);
...
...
src/core/UBSettings.h
View file @
d822dc73
...
...
@@ -316,7 +316,9 @@ class UBSettings : public QObject
UBSetting
*
navigPaletteWidth
;
UBSetting
*
rightLibPaletteWidth
;
UBSetting
*
rightLibPaletteIsCollapsed
;
UBSetting
*
leftLibPaletteWidth
;
UBSetting
*
leftLibPaletteIsCollapsed
;
UBSetting
*
communityUser
;
UBSetting
*
communityPsw
;
...
...
src/gui/UBDockPalette.cpp
View file @
d822dc73
...
...
@@ -29,20 +29,20 @@
* \brief The constructor
*/
UBDockPalette
::
UBDockPalette
(
eUBDockPaletteType
paletteType
,
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
,
Qt
::
FramelessWindowHint
|
Qt
::
X11BypassWindowManagerHint
)
,
mOrientation
(
eUBDockOrientation_Left
)
,
mPreferredWidth
(
100
)
,
mPreferredHeight
(
100
)
,
mCanResize
(
false
)
,
mResized
(
false
)
,
mCollapseWidth
(
150
)
,
mLastWidth
(
-
1
)
,
mHTab
(
0
)
,
mpStackWidget
(
NULL
)
,
mpLayout
(
NULL
)
,
mCurrentTab
(
0
)
,
mPaletteType
(
paletteType
)
,
mTabPalette
(
new
UBTabDockPalette
(
this
,
parent
))
:
QWidget
(
parent
,
Qt
::
FramelessWindowHint
|
Qt
::
X11BypassWindowManagerHint
)
,
mOrientation
(
eUBDockOrientation_Left
)
,
mPreferredWidth
(
100
)
,
mPreferredHeight
(
100
)
,
mCanResize
(
false
)
,
mResized
(
false
)
,
mCollapseWidth
(
150
)
,
mLastWidth
(
-
1
)
,
mHTab
(
0
)
,
mpStackWidget
(
NULL
)
,
mpLayout
(
NULL
)
,
mCurrentTab
(
0
)
,
mPaletteType
(
paletteType
)
,
mTabPalette
(
new
UBTabDockPalette
(
this
,
parent
))
{
setObjectName
(
name
);
...
...
@@ -302,12 +302,6 @@ void UBDockPalette::showTabWidget(int tabIndex)
mpStackWidget
->
setCurrentIndex
(
tabIndex
);
mCurrentTab
=
tabIndex
;
// Expand it if collapsed
if
(
mLastWidth
!=
-
1
)
{
toggleCollapseExpand
();
}
// Update the current tab index
if
(
NULL
!=
(
dynamic_cast
<
UBDockPaletteWidget
*>
(
mpStackWidget
->
widget
(
tabIndex
)))){
mCrntTabWidget
=
dynamic_cast
<
UBDockPaletteWidget
*>
(
mpStackWidget
->
widget
(
tabIndex
))
->
name
();
...
...
@@ -320,17 +314,11 @@ void UBDockPalette::showTabWidget(int tabIndex)
*/
void
UBDockPalette
::
toggleCollapseExpand
()
{
if
(
mLastWidth
==
-
1
)
{
// The palette must be collapsed
if
(
width
()
<
mCollapseWidth
)
resize
(
mLastWidth
,
height
());
else
{
mLastWidth
=
width
();
resize
(
0
,
height
());
}
else
{
// The palette will be expanded
resize
(
mLastWidth
,
height
());
mLastWidth
=
-
1
;
resize
(
0
,
height
());
}
}
...
...
@@ -498,7 +486,7 @@ void UBDockPalette::moveTabs()
}
else
{
mHTab
=
height
()
-
border
()
-
mTabWidgets
.
size
()
*
TABSIZE
-
(
mTabWidgets
.
size
()
-
1
)
*
tabSpacing
();
}
// }
// }
QPoint
origin
(
width
(),
mHTab
+
mTabPalette
->
mVerticalOffset
);
...
...
@@ -575,9 +563,9 @@ bool UBDockPalette::switchMode(eUBDockPaletteWidgetMode mode)
UBTabDockPalette
::
UBTabDockPalette
(
UBDockPalette
*
dockPalette
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
dock
(
dockPalette
)
,
mVerticalOffset
(
0
)
,
mFlotable
(
false
)
,
dock
(
dockPalette
)
,
mVerticalOffset
(
0
)
,
mFlotable
(
false
)
{
int
numTabs
=
dock
->
mTabWidgets
.
size
();
resize
(
2
*
dock
->
border
(),
(
numTabs
*
TABSIZE
)
+
qMax
(
numTabs
-
1
,
0
)
*
dock
->
tabSpacing
());
...
...
@@ -703,7 +691,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event)
p
.
setX
(
p
.
x
()
+
dock
->
width
());
if
(
p
.
x
()
<
dock
->
collapseWidth
()
&&
p
.
x
()
>=
dock
->
minimumWidth
())
{
dock
->
resize
(
0
,
dock
->
height
());
dock
->
mLastWidth
=
dock
->
collapseWidth
()
+
1
;
//
dock->mLastWidth = dock->collapseWidth() + 1;
dock
->
mResized
=
true
;
}
else
if
(
p
.
x
()
<=
dock
->
maximumWidth
()
&&
p
.
x
()
>=
dock
->
minimumWidth
())
{
dock
->
resize
(
p
.
x
(),
dock
->
height
());
...
...
@@ -715,7 +703,7 @@ void UBTabDockPalette::mouseMoveEvent(QMouseEvent *event)
p
.
setX
(
p
.
x
()
-
2
*
dock
->
border
());
if
((
dock
->
x
()
+
p
.
x
()
>
dock
->
parentWidget
()
->
width
()
-
dock
->
collapseWidth
())
&&
(
dock
->
x
()
+
p
.
x
()
<
dock
->
parentWidget
()
->
width
()))
{
dock
->
resize
(
0
,
dock
->
height
());
dock
->
mLastWidth
=
dock
->
collapseWidth
()
+
1
;
//
dock->mLastWidth = dock->collapseWidth() + 1;
dock
->
mResized
=
true
;
}
else
if
((
dock
->
x
()
+
p
.
x
()
>=
dock
->
parentWidget
()
->
width
()
-
dock
->
maximumWidth
())
&&
(
dock
->
x
()
+
p
.
x
()
<=
dock
->
parentWidget
()
->
width
()
-
dock
->
minimumWidth
()))
{
dock
->
resize
(
dock
->
parentWidget
()
->
width
()
-
(
dock
->
x
()
+
p
.
x
()),
dock
->
height
());
...
...
src/gui/UBLeftPalette.cpp
View file @
d822dc73
...
...
@@ -29,6 +29,9 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):
mLastWidth
=
UBSettings
::
settings
()
->
leftLibPaletteWidth
->
get
().
toInt
();
mCollapseWidth
=
150
;
if
(
UBSettings
::
settings
()
->
leftLibPaletteIsCollapsed
->
get
().
toBool
())
resize
(
0
,
parentWidget
()
->
height
());
else
resize
(
mLastWidth
,
parentWidget
()
->
height
());
}
...
...
@@ -54,6 +57,9 @@ void UBLeftPalette::updateMaxWidth()
*/
void
UBLeftPalette
::
resizeEvent
(
QResizeEvent
*
event
)
{
UBSettings
::
settings
()
->
leftLibPaletteWidth
->
set
(
width
());
int
newWidth
=
width
();
if
(
newWidth
>
mCollapseWidth
)
UBSettings
::
settings
()
->
leftLibPaletteWidth
->
set
(
newWidth
);
UBSettings
::
settings
()
->
leftLibPaletteIsCollapsed
->
set
(
newWidth
==
0
);
UBDockPalette
::
resizeEvent
(
event
);
}
src/gui/UBNavigatorPalette.cpp
View file @
d822dc73
...
...
@@ -33,8 +33,6 @@ UBNavigatorPalette::UBNavigatorPalette(QWidget *parent, const char *name):
{
setOrientation
(
eUBDockOrientation_Left
);
setMaximumWidth
(
300
);
//mCollapsedIcon = QPixmap(":images/pages_open.png");
//mIcon = QPixmap(":images/pages_close.png");
resize
(
UBSettings
::
settings
()
->
navigPaletteWidth
->
get
().
toInt
(),
height
());
mLastWidth
=
300
;
...
...
src/gui/UBRightPalette.cpp
View file @
d822dc73
...
...
@@ -27,10 +27,12 @@ UBRightPalette::UBRightPalette(QWidget *parent, const char *name):
{
setObjectName
(
name
);
setOrientation
(
eUBDockOrientation_Right
);
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteWidth
->
get
().
toInt
();
mCollapseWidth
=
150
;
mLastWidth
=
UBSettings
::
settings
()
->
rightLibPaletteWidth
->
get
().
toInt
();
if
(
UBSettings
::
settings
()
->
rightLibPaletteIsCollapsed
->
get
().
toBool
())
resize
(
0
,
parentWidget
()
->
height
());
else
resize
(
mLastWidth
,
parentWidget
()
->
height
());
}
...
...
@@ -59,8 +61,11 @@ 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
);
UBSettings
::
settings
()
->
rightLibPaletteWidth
->
set
(
width
());
emit
resized
();
}
...
...
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