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
1e78d64d
Commit
1e78d64d
authored
Jul 03, 2019
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a preference in the display tab to show/hide the date column on alphabetical sort
parent
8ef272db
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
238 additions
and
153 deletions
+238
-153
OpenBoard.config
resources/etc/OpenBoard.config
+1
-0
preferences.ui
resources/forms/preferences.ui
+198
-150
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+8
-0
UBSettings.cpp
src/core/UBSettings.cpp
+2
-0
UBSettings.h
src/core/UBSettings.h
+2
-0
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+26
-3
UBDocumentController.h
src/document/UBDocumentController.h
+1
-0
No files found.
resources/etc/OpenBoard.config
View file @
1e78d64d
...
...
@@ -92,6 +92,7 @@ SortKind=0
SortOrder
=
0
SplitterLeftSize
=
200
SplitterRightSize
=
800
ShowDateColumnOnAlphabeticalSort
=
false
[
IntranetPodcast
]
Author
=
...
...
resources/forms/preferences.ui
View file @
1e78d64d
This diff is collapsed.
Click to expand it.
src/core/UBPreferencesController.cpp
View file @
1e78d64d
...
...
@@ -39,6 +39,7 @@
#include "core/UBDisplayManager.h"
#include "board/UBBoardController.h"
#include "document/UBDocumentController.h"
#include "domain/UBGraphicsScene.h"
#include "board/UBDrawingController.h"
#include "podcast/UBPodcastController.h"
...
...
@@ -137,6 +138,9 @@ void UBPreferencesController::wire()
connect
(
mPreferencesUI
->
useSystemOSKCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
useSystemOnScreenKeyboard
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
useSystemOSKCheckBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
systemOSKCheckBoxToggled
(
bool
)));
connect
(
mPreferencesUI
->
showDateColumnOnAlphabeticalSort
,
SIGNAL
(
clicked
(
bool
)),
settings
->
showDateColumnOnAlphabeticalSort
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
showDateColumnOnAlphabeticalSort
,
SIGNAL
(
clicked
(
bool
)),
UBApplication
::
documentController
,
SLOT
(
refreshDateColumns
()));
connect
(
mPreferencesUI
->
keyboardPaletteKeyButtonSize
,
SIGNAL
(
currentIndexChanged
(
const
QString
&
)),
settings
->
boardKeyboardPaletteKeyBtnSize
,
SLOT
(
setString
(
const
QString
&
)));
connect
(
mPreferencesUI
->
startModeComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
settings
->
appStartMode
,
SLOT
(
setInt
(
int
)));
...
...
@@ -274,6 +278,8 @@ void UBPreferencesController::init()
mPreferencesUI
->
useSystemOSKCheckBox
->
setChecked
(
settings
->
useSystemOnScreenKeyboard
->
get
().
toBool
());
this
->
systemOSKCheckBoxToggled
(
mPreferencesUI
->
useSystemOSKCheckBox
->
isChecked
());
mPreferencesUI
->
showDateColumnOnAlphabeticalSort
->
setChecked
(
settings
->
showDateColumnOnAlphabeticalSort
->
get
().
toBool
());
mPreferencesUI
->
startModeComboBox
->
setCurrentIndex
(
settings
->
appStartMode
->
get
().
toInt
());
mPreferencesUI
->
useExternalBrowserCheckBox
->
setChecked
(
settings
->
webUseExternalBrowser
->
get
().
toBool
());
...
...
@@ -338,6 +344,8 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI
->
startModeComboBox
->
setCurrentIndex
(
0
);
mPreferencesUI
->
useSystemOSKCheckBox
->
setChecked
(
settings
->
useSystemOnScreenKeyboard
->
reset
().
toBool
());
mPreferencesUI
->
showDateColumnOnAlphabeticalSort
->
setChecked
(
settings
->
showDateColumnOnAlphabeticalSort
->
reset
().
toBool
());
UBApplication
::
documentController
->
refreshDateColumns
();
}
else
if
(
mPreferencesUI
->
mainTabWidget
->
currentWidget
()
==
mPreferencesUI
->
penTab
)
{
...
...
src/core/UBSettings.cpp
View file @
1e78d64d
...
...
@@ -458,6 +458,8 @@ void UBSettings::init()
useSystemOnScreenKeyboard
=
new
UBSetting
(
this
,
"App"
,
"UseSystemOnScreenKeyboard"
,
true
);
showDateColumnOnAlphabeticalSort
=
new
UBSetting
(
this
,
"Document"
,
"ShowDateColumnOnAlphabeticalSort"
,
false
);
cleanNonPersistentSettings
();
checkNewSettings
();
}
...
...
src/core/UBSettings.h
View file @
1e78d64d
...
...
@@ -413,6 +413,8 @@ class UBSettings : public QObject
UBSetting
*
useSystemOnScreenKeyboard
;
UBSetting
*
showDateColumnOnAlphabeticalSort
;
UBSetting
*
magnifierDrawingMode
;
UBSetting
*
autoSaveInterval
;
...
...
src/document/UBDocumentController.cpp
View file @
1e78d64d
...
...
@@ -1989,9 +1989,7 @@ void UBDocumentController::setupViews()
// sort documents according to preferences
int
sortKind
=
UBSettings
::
settings
()
->
documentSortKind
->
get
().
toInt
();
int
sortOrder
=
UBSettings
::
settings
()
->
documentSortOrder
->
get
().
toInt
();
sortDocuments
(
sortKind
,
sortOrder
);
int
sortOrder
=
UBSettings
::
settings
()
->
documentSortOrder
->
get
().
toInt
();
// update icon and button
mDocumentUI
->
sortKind
->
setCurrentIndex
(
sortKind
);
...
...
@@ -2020,6 +2018,8 @@ void UBDocumentController::setupViews()
//mDocumentUI->documentTreeView->hideColumn(1);
mDocumentUI
->
documentTreeView
->
hideColumn
(
2
);
sortDocuments
(
sortKind
,
sortOrder
);
connect
(
mDocumentUI
->
sortKind
,
SIGNAL
(
activated
(
int
)),
this
,
SLOT
(
onSortKindChanged
(
int
)));
connect
(
mDocumentUI
->
sortOrder
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
onSortOrderChanged
(
bool
)));
...
...
@@ -2055,6 +2055,24 @@ void UBDocumentController::setupViews()
}
//N/C - NNE - 20140403
void
UBDocumentController
::
refreshDateColumns
()
{
if
(
UBSettings
::
settings
()
->
documentSortKind
->
get
().
toInt
()
==
UBDocumentController
::
Alphabetical
)
{
if
(
!
UBSettings
::
settings
()
->
showDateColumnOnAlphabeticalSort
->
get
().
toBool
())
{
mDocumentUI
->
documentTreeView
->
hideColumn
(
1
);
mDocumentUI
->
documentTreeView
->
hideColumn
(
2
);
}
else
{
mDocumentUI
->
documentTreeView
->
showColumn
(
1
);
mDocumentUI
->
documentTreeView
->
hideColumn
(
2
);
}
}
}
void
UBDocumentController
::
sortDocuments
(
int
kind
,
int
order
)
{
Qt
::
SortOrder
sortOrder
=
Qt
::
AscendingOrder
;
...
...
@@ -2074,6 +2092,11 @@ void UBDocumentController::sortDocuments(int kind, int order)
}
else
{
mSortFilterProxyModel
->
setSortRole
(
Qt
::
DisplayRole
);
mSortFilterProxyModel
->
sort
(
0
,
sortOrder
);
if
(
!
UBSettings
::
settings
()
->
showDateColumnOnAlphabeticalSort
->
get
().
toBool
())
{
mDocumentUI
->
documentTreeView
->
hideColumn
(
1
);
mDocumentUI
->
documentTreeView
->
hideColumn
(
2
);
}
}
}
...
...
src/document/UBDocumentController.h
View file @
1e78d64d
...
...
@@ -429,6 +429,7 @@ class UBDocumentController : public UBDocumentContainer
public
slots
:
void
createNewDocument
();
void
refreshDateColumns
();
//issue 1629 - NNE - 20131105
void
createNewDocumentInUntitledFolder
();
...
...
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