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
568b9559
Commit
568b9559
authored
Jul 25, 2018
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new parameters SortKind and SortOrder in config (WIP)
parent
b608118f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
6 deletions
+23
-6
OpenBoard.config
resources/etc/OpenBoard.config
+2
-0
documents.ui
resources/forms/documents.ui
+3
-3
UBSettings.cpp
src/core/UBSettings.cpp
+6
-1
UBSettings.h
src/core/UBSettings.h
+4
-0
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+8
-2
No files found.
resources/etc/OpenBoard.config
View file @
568b9559
...
...
@@ -88,6 +88,8 @@ Username=
[
Document
]
EmptyGroupNames
=@
Invalid
()
ThumbnailWidth
=
150
SortKind
=
0
SortOrder
=
0
[
IntranetPodcast
]
Author
=
...
...
resources/forms/documents.ui
View file @
568b9559
...
...
@@ -92,17 +92,17 @@
</property>
<item>
<property
name=
"text"
>
<string>
Alphabetical order
</string>
<string>
Creation date
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Creation
date
</string>
<string>
Update
date
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Update date
</string>
<string>
Alphabetical order
</string>
</property>
</item>
</widget>
...
...
src/core/UBSettings.cpp
View file @
568b9559
...
...
@@ -104,6 +104,9 @@ QPointer<QSettings> UBSettings::sAppSettings = 0;
const
int
UBSettings
::
maxThumbnailWidth
=
400
;
const
int
UBSettings
::
defaultThumbnailWidth
=
150
;
const
int
UBSettings
::
defaultSortKind
=
0
;
const
int
UBSettings
::
defaultSortOrder
=
0
;
const
int
UBSettings
::
defaultLibraryIconSize
=
80
;
const
int
UBSettings
::
defaultGipWidth
=
150
;
...
...
@@ -425,7 +428,9 @@ void UBSettings::init()
// removed in version 4.4.b.2
mUserSettings
->
remove
(
"Podcast/RecordMicrophone"
);
documentThumbnailWidth
=
new
UBSetting
(
this
,
"Document"
,
"ThumbnailWidth"
,
UBSettings
::
defaultThumbnailWidth
);
documentThumbnailWidth
=
new
UBSetting
(
this
,
"Document"
,
"ThumbnailWidth"
,
UBSettings
::
defaultThumbnailWidth
);
documentSortKind
=
new
UBSetting
(
this
,
"Document"
,
"SortKind"
,
UBSettings
::
defaultSortKind
);
documentSortOrder
=
new
UBSetting
(
this
,
"Document"
,
"SortOrder"
,
UBSettings
::
defaultSortOrder
);
libraryShowDetailsForLocalItems
=
new
UBSetting
(
this
,
"Library"
,
"ShowDetailsForLocalItems"
,
false
);
...
...
src/core/UBSettings.h
View file @
568b9559
...
...
@@ -215,6 +215,8 @@ class UBSettings : public QObject
static
const
int
maxThumbnailWidth
;
static
const
int
defaultThumbnailWidth
;
static
const
int
defaultSortKind
;
static
const
int
defaultSortOrder
;
static
const
int
defaultLibraryIconSize
;
static
const
int
defaultImageWidth
;
...
...
@@ -372,6 +374,8 @@ class UBSettings : public QObject
UBSetting
*
favoritesNativeToolUris
;
UBSetting
*
documentThumbnailWidth
;
UBSetting
*
documentSortKind
;
UBSetting
*
documentSortOrder
;
UBSetting
*
imageThumbnailWidth
;
UBSetting
*
videoThumbnailWidth
;
UBSetting
*
shapeThumbnailWidth
;
...
...
src/document/UBDocumentController.cpp
View file @
568b9559
...
...
@@ -1979,7 +1979,13 @@ void UBDocumentController::setupViews()
mSortFilterProxyModel
->
setSourceModel
(
model
);
sortDocuments
(
UBDocumentController
::
Alphabetical
,
UBDocumentController
::
ASC
);
int
sortKind
=
UBSettings
::
settings
()
->
documentSortKind
->
get
().
toInt
();
int
sortOrder
=
UBSettings
::
settings
()
->
documentSortOrder
->
get
().
toInt
();
mUserHasChangedSortOrder
=
true
;
sortDocuments
(
sortKind
,
sortOrder
);
mDocumentUI
->
sortKind
->
setCurrentIndex
(
sortKind
);
mDocumentUI
->
sortOrder
->
setCurrentIndex
(
sortOrder
);
mDocumentUI
->
documentTreeView
->
setModel
(
mSortFilterProxyModel
);
...
...
@@ -1995,7 +2001,7 @@ void UBDocumentController::setupViews()
//set sizes (left and right sides of the splitter) for the splitter here because it cannot be done in the form editor.
const
int
leftSplitterSize
=
100
;
const
int
rightSplitterSize
=
16
00
;
const
int
rightSplitterSize
=
9
00
;
QList
<
int
>
splitterSizes
=
{
leftSplitterSize
,
rightSplitterSize
};
mDocumentUI
->
splitter
->
setSizes
(
splitterSizes
);
...
...
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