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
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
...
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
825
</width>
<height>
7
1
8
</height>
<height>
7
4
8
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -82,7 +82,7 @@
<item
row=
"1"
column=
"0"
>
<widget
class=
"QTabWidget"
name=
"mainTabWidget"
>
<property
name=
"currentIndex"
>
<number>
7
</number>
<number>
0
</number>
</property>
<widget
class=
"QWidget"
name=
"displayTab"
>
<attribute
name=
"title"
>
...
...
@@ -148,8 +148,21 @@
</layout>
</widget>
</item>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"toolbarGroupBox"
>
<item
row=
"14"
column=
"0"
>
<spacer
name=
"modeSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"15"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"modeGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
...
...
@@ -157,36 +170,56 @@
</sizepolicy>
</property>
<property
name=
"title"
>
<string>
Toolbar
</string>
<string>
Mode
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_9"
>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_10"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_15"
>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"horizontalSpacer_5"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Preferred
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"0"
column=
"1"
rowspan=
"2"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_16"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"Q
RadioButton"
name=
"toolbarAtTopRadioButton
"
>
<widget
class=
"Q
Label"
name=
"modeLabel
"
>
<property
name=
"text"
>
<string>
Positioned at the Top (recommended for tablets)
</string>
<string>
Mode to start in:
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QRadioButton"
name=
"toolbarAtBottomRadioButton"
>
<property
name=
"text"
>
<string>
Positioned at the Bottom (recommended for white boards)
</string>
</property>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"startModeComboBox"
>
<item>
<property
name=
"text"
>
<string>
Board
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Desktop
</string>
</property>
</item>
</widget>
</item>
<item
row=
"
2"
column=
"0
"
>
<spacer
name=
"
verticalSpacer
"
>
<item
row=
"
0"
column=
"2
"
>
<spacer
name=
"
horizontalSpacer_6
"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
2
0
</width>
<width>
4
0
</width>
<height>
20
</height>
</size>
</property>
...
...
@@ -194,45 +227,6 @@
</item>
</layout>
</item>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"toolbarLSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Preferred
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"toolbarRSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"toolbarDisplayTextCheckBox"
>
<property
name=
"text"
>
<string>
Display Text Under Button
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -338,75 +332,6 @@
</layout>
</widget>
</item>
<item
row=
"15"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"modeGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"title"
>
<string>
Mode
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_15"
>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"horizontalSpacer_5"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Preferred
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"0"
column=
"1"
rowspan=
"2"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_16"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"modeLabel"
>
<property
name=
"text"
>
<string>
Mode to start in:
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"startModeComboBox"
>
<item>
<property
name=
"text"
>
<string>
Board
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Desktop
</string>
</property>
</item>
</widget>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"horizontalSpacer_6"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item
row=
"13"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"keyboardGroupBox"
>
<property
name=
"sizePolicy"
>
...
...
@@ -472,14 +397,11 @@
</layout>
</widget>
</item>
<item
row=
"
9
"
column=
"0"
>
<spacer
name=
"
keyboardSpacer
"
>
<item
row=
"
7
"
column=
"0"
>
<spacer
name=
"
verticalSpacer_3
"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
...
...
@@ -488,20 +410,95 @@
</property>
</spacer>
</item>
<item
row=
"3"
column=
"0"
>
<spacer
name=
"toolbarSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"toolbarGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
<property
name=
"title"
>
<string>
Toolbar
</string>
</property>
</spacer>
<layout
class=
"QGridLayout"
name=
"gridLayout_9"
>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_10"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QRadioButton"
name=
"toolbarAtTopRadioButton"
>
<property
name=
"text"
>
<string>
Positioned at the Top (recommended for tablets)
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QRadioButton"
name=
"toolbarAtBottomRadioButton"
>
<property
name=
"text"
>
<string>
Positioned at the Bottom (recommended for white boards)
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"toolbarLSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Preferred
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"toolbarRSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"toolbarDisplayTextCheckBox"
>
<property
name=
"text"
>
<string>
Display Text Under Button
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"1
6
"
column=
"0"
>
<item
row=
"1
7
"
column=
"0"
>
<spacer
name=
"verticalSpacer_7"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
@@ -514,11 +511,14 @@
</property>
</spacer>
</item>
<item
row=
"
7
"
column=
"0"
>
<spacer
name=
"
verticalSpacer_3
"
>
<item
row=
"
9
"
column=
"0"
>
<spacer
name=
"
keyboardSpacer
"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Expanding
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
...
...
@@ -527,8 +527,8 @@
</property>
</spacer>
</item>
<item
row=
"
14
"
column=
"0"
>
<spacer
name=
"
mode
Spacer"
>
<item
row=
"
3
"
column=
"0"
>
<spacer
name=
"
toolbar
Spacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
...
...
@@ -540,6 +540,54 @@
</property>
</spacer>
</item>
<item
row=
"16"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"documentsGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"title"
>
<string>
Documents Mode
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_19"
>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_18"
>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"showDateColumnOnAlphabeticalSort"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Display date column on alphabetical sort
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"horizontalSpacer_9"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"gridTab"
>
...
...
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