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
ce8c7bee
Commit
ce8c7bee
authored
Jan 10, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http://188.165.53.52/jira/browse/SANKORE-450
parent
21e57fbc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
12 deletions
+20
-12
UBMetadataDcSubsetAdaptor.cpp
src/adaptors/UBMetadataDcSubsetAdaptor.cpp
+1
-1
UBBoardController.cpp
src/board/UBBoardController.cpp
+2
-0
UBSetting.cpp
src/core/UBSetting.cpp
+6
-2
UBSettings.cpp
src/core/UBSettings.cpp
+6
-6
UBSettings.h
src/core/UBSettings.h
+3
-1
UBDocumentProxy.cpp
src/document/UBDocumentProxy.cpp
+2
-2
No files found.
src/adaptors/UBMetadataDcSubsetAdaptor.cpp
View file @
ce8c7bee
...
...
@@ -185,7 +185,7 @@ QMap<QString, QVariant> UBMetadataDcSubsetAdaptor::load(QString pPath)
if
(
width
==
1024
&&
height
==
768
)
// move from 1024/768 to 1280/960
{
docSize
=
UBSettings
::
settings
()
->
defaultDocumentSize
;
docSize
=
UBSettings
::
settings
()
->
pageSize
->
get
().
toSize
()
;
}
metadata
.
insert
(
UBSettings
::
documentSize
,
QVariant
(
docSize
));
...
...
src/board/UBBoardController.cpp
View file @
ce8c7bee
...
...
@@ -1591,6 +1591,8 @@ void UBBoardController::setPageSize(QSize newSize)
updatePageSizeState
();
adjustDisplayViews
();
mActiveDocument
->
setMetaData
(
UBSettings
::
documentUpdatedAt
,
UBStringUtils
::
toUtcIsoDateTime
(
QDateTime
::
currentDateTime
()));
UBSettings
::
settings
()
->
pageSize
->
set
(
newSize
);
}
}
...
...
src/core/UBSetting.cpp
View file @
ce8c7bee
...
...
@@ -29,8 +29,12 @@ UBSetting::UBSetting(UBSettings* parent) :
UBSetting
::
UBSetting
(
UBSettings
*
owner
,
const
QString
&
pDomain
,
const
QString
&
pKey
,
const
QVariant
&
pDefaultValue
)
:
QObject
(
owner
),
mOwner
(
owner
),
mDomain
(
pDomain
),
mKey
(
pKey
),
mPath
(
pDomain
+
"/"
+
pKey
),
mDefaultValue
(
pDefaultValue
)
QObject
(
owner
),
mOwner
(
owner
),
mDomain
(
pDomain
),
mKey
(
pKey
),
mPath
(
pDomain
+
"/"
+
pKey
),
mDefaultValue
(
pDefaultValue
)
{
//NOOP
}
...
...
src/core/UBSettings.cpp
View file @
ce8c7bee
...
...
@@ -188,6 +188,9 @@ void UBSettings::init()
softwareHomeUrl
=
productWebUrl
->
get
().
toString
();
documentSizes
.
insert
(
DocumentSizeRatio
::
Ratio4_3
,
QSize
(
1280
,
960
));
// 1.33
documentSizes
.
insert
(
DocumentSizeRatio
::
Ratio16_9
,
QSize
((
960
/
9
*
16
),
960
));
// 1.77
appToolBarPositionedAtTop
=
new
UBSetting
(
this
,
"App"
,
"ToolBarPositionedAtTop"
,
true
);
appToolBarDisplayText
=
new
UBSetting
(
this
,
"App"
,
"ToolBarDisplayText"
,
true
);
appEnableAutomaticSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableAutomaticSoftwareUpdates"
,
true
);
...
...
@@ -216,6 +219,8 @@ void UBSettings::init()
boardKeyboardPaletteKeyBtnSize
=
new
UBSetting
(
this
,
"Board"
,
"KeyboardPaletteKeyBtnSize"
,
"16x16"
);
ValidateKeyboardPaletteKeyBtnSize
();
pageSize
=
new
UBSetting
(
this
,
"Board"
,
"DefaultPageSize"
,
documentSizes
.
value
(
DocumentSizeRatio
::
Ratio4_3
));
QStringList
penLightBackgroundColors
;
penLightBackgroundColors
<<
"#000000"
<<
"#FF0000"
<<
"#004080"
<<
"#008000"
<<
"#C87400"
<<
"#800040"
<<
"#008080"
<<
"#5F2D0A"
;
boardPenLightBackgroundColors
=
new
UBColorListSetting
(
this
,
"Board"
,
"PenLightBackgroundColors"
,
penLightBackgroundColors
,
1.0
);
...
...
@@ -310,11 +315,6 @@ void UBSettings::init()
boardShowToolsPalette
=
new
UBSetting
(
this
,
"Board"
,
"ShowToolsPalette"
,
"false"
);
documentSizes
.
insert
(
DocumentSizeRatio
::
Ratio4_3
,
QSize
(
1280
,
960
));
// 1.33
documentSizes
.
insert
(
DocumentSizeRatio
::
Ratio16_9
,
QSize
((
960
/
9
*
16
),
960
));
// 1.77
defaultDocumentSize
=
documentSizes
.
value
(
DocumentSizeRatio
::
Ratio4_3
);
svgViewBoxMargin
=
new
UBSetting
(
this
,
"SVG"
,
"ViewBoxMargin"
,
"50"
);
pdfMargin
=
new
UBSetting
(
this
,
"PDF"
,
"Margin"
,
"20"
);
...
...
@@ -371,7 +371,7 @@ QVariant UBSettings::value ( const QString & key, const QVariant & defaultValue)
{
sAppSettings
->
setValue
(
key
,
defaultValue
);
}
return
mUserSettings
->
value
(
key
,
sAppSettings
->
value
(
key
,
defaultValue
));
}
...
...
src/core/UBSettings.h
View file @
ce8c7bee
...
...
@@ -266,7 +266,7 @@ class UBSettings : public QObject
QMap
<
DocumentSizeRatio
::
Enum
,
QSize
>
documentSizes
;
QSize
defaultDocumentSize
;
//
QSize defaultDocumentSize;
UBSetting
*
svgViewBoxMargin
;
UBSetting
*
pdfMargin
;
...
...
@@ -311,6 +311,8 @@ class UBSettings : public QObject
UBSetting
*
communityUser
;
UBSetting
*
communityPsw
;
UBSetting
*
pageSize
;
/*
static int navigPaletteWidth;
static int libPaletteWidth;
...
...
src/document/UBDocumentProxy.cpp
View file @
ce8c7bee
...
...
@@ -48,7 +48,7 @@ void UBDocumentProxy::init()
setUuid
(
QUuid
::
createUuid
());
setDefaultDocumentSize
(
UBSettings
::
settings
()
->
defaultDocumentSize
);
setDefaultDocumentSize
(
UBSettings
::
settings
()
->
pageSize
->
get
().
toSize
()
);
}
...
...
@@ -162,7 +162,7 @@ QSize UBDocumentProxy::defaultDocumentSize() const
if
(
mMetaDatas
.
contains
(
UBSettings
::
documentSize
))
return
metaData
(
UBSettings
::
documentSize
).
toSize
();
else
return
UBSettings
::
settings
()
->
defaultDocumentSize
;
return
UBSettings
::
settings
()
->
pageSize
->
get
().
toSize
()
;
}
void
UBDocumentProxy
::
setDefaultDocumentSize
(
QSize
pSize
)
...
...
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