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
c6c0120a
Commit
c6c0120a
authored
Dec 06, 2017
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added grid tab on preferences to handle grid color and opacity parameters
parent
0d66ec25
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
656 additions
and
250 deletions
+656
-250
OpenBoard.config
resources/etc/OpenBoard.config
+3
-1
brushProperties.ui
resources/forms/brushProperties.ui
+137
-176
preferences.ui
resources/forms/preferences.ui
+365
-63
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+117
-0
UBPreferencesController.h
src/core/UBPreferencesController.h
+6
-2
UBSetting.cpp
src/core/UBSetting.cpp
+16
-6
UBSettings.cpp
src/core/UBSettings.cpp
+9
-2
UBSettings.h
src/core/UBSettings.h
+3
-0
No files found.
resources/etc/OpenBoard.config
View file @
c6c0120a
...
@@ -25,12 +25,14 @@ UseSystemOnScreenKeyboard=true
...
@@ -25,12 +25,14 @@ UseSystemOnScreenKeyboard=true
[
Board
]
[
Board
]
AutoSaveIntervalInMinutes
=
3
AutoSaveIntervalInMinutes
=
3
CrossColorDarkBackground
=
#C8
C0C0C0
CrossColorDarkBackground
=
#C8
2C2C2C
CrossColorLightBackground
=
#A5E1FF
CrossColorLightBackground
=
#A5E1FF
DarkBackground
=
0
DarkBackground
=
0
DefaultPageSize
=@
Size
(
1280
960
)
DefaultPageSize
=@
Size
(
1280
960
)
EraserCircleWidthIndex
=
1
EraserCircleWidthIndex
=
1
FeatureSliderPosition
=
40
FeatureSliderPosition
=
40
GridDarkBackgroundColors
=
#FFFFFF, #FF3400, #66C0FF, #81FF5C, #FFFF00, #B68360, #FF497E, #8D69FF, #C82C2C2C
GridLightBackgroundColors
=
#000000, #FF0000, #004080, #008000, #FFDD00, #C87400, #800040, #008080, #5F2D0A, #A5E1FF
InterpolateMarkerStrokes
=
true
InterpolateMarkerStrokes
=
true
InterpolatePenStrokes
=
true
InterpolatePenStrokes
=
true
KeyboardPaletteKeyBtnSize
=
16
x16
KeyboardPaletteKeyBtnSize
=
16
x16
...
...
resources/forms/brushProperties.ui
View file @
c6c0120a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<enum>
QFrame::Plain
</enum>
<enum>
QFrame::Plain
</enum>
</property>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"
5"
column=
"0"
colspan=
"3
"
>
<item
row=
"
6"
column=
"1"
colspan=
"4
"
>
<widget
class=
"QFrame"
name=
"pressureFrame"
>
<widget
class=
"QFrame"
name=
"pressureFrame"
>
<property
name=
"frameShape"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
<enum>
QFrame::NoFrame
</enum>
...
@@ -70,24 +70,78 @@
...
@@ -70,24 +70,78 @@
</layout>
</layout>
</widget>
</widget>
</item>
</item>
<item
row=
"0"
column=
"1"
>
<item
row=
"2"
column=
"1"
colspan=
"4"
>
<spacer
name=
"nSpacer"
>
<widget
class=
"QFrame"
name=
"opacityFrame"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<spacer
name=
"wSpacer_2"
>
<property
name=
"orientation"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertic
al
</enum>
<enum>
Qt::Horizont
al
</enum>
</property>
</property>
<property
name=
"sizeType"
>
<property
name=
"sizeHint"
stdset=
"0"
>
<enum>
QSizePolicy::Fixed
</enum>
<size>
<width>
154
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"opacityLabel"
>
<property
name=
"text"
>
<string>
Opacity
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"opacitySlider"
>
<property
name=
"minimum"
>
<number>
20
</number>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"value"
>
<number>
50
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
</property>
<property
name=
"tickInterval"
>
<number>
20
</number>
</property>
</widget>
</item>
<item>
<spacer
name=
"eSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<size>
<width>
20
</width>
<width>
156
</width>
<height>
4
0
</height>
<height>
2
0
</height>
</size>
</size>
</property>
</property>
</spacer>
</spacer>
</item>
</item>
<item
row=
"1"
column=
"1"
>
</layout>
</widget>
</item>
<item
row=
"1"
column=
"1"
colspan=
"4"
>
<widget
class=
"QFrame"
name=
"colorFrame"
>
<widget
class=
"QFrame"
name=
"colorFrame"
>
<property
name=
"layoutDirection"
>
<enum>
Qt::LeftToRight
</enum>
</property>
<property
name=
"frameShape"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
<enum>
QFrame::NoFrame
</enum>
</property>
</property>
...
@@ -146,6 +200,19 @@
...
@@ -146,6 +200,19 @@
</layout>
</layout>
</widget>
</widget>
</item>
</item>
<item>
<spacer
name=
"horizontalSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<item>
<widget
class=
"QFrame"
name=
"darkBackgroundFrame"
>
<widget
class=
"QFrame"
name=
"darkBackgroundFrame"
>
<property
name=
"frameShape"
>
<property
name=
"frameShape"
>
...
@@ -197,74 +264,7 @@
...
@@ -197,74 +264,7 @@
</layout>
</layout>
</widget>
</widget>
</item>
</item>
<item
row=
"2"
column=
"0"
colspan=
"3"
>
<item
row=
"4"
column=
"1"
colspan=
"4"
>
<widget
class=
"QFrame"
name=
"opacityFrame"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<spacer
name=
"wSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
154
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"opacityLabel"
>
<property
name=
"text"
>
<string>
Opacity
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"opacitySlider"
>
<property
name=
"minimum"
>
<number>
20
</number>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"value"
>
<number>
50
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
</property>
<property
name=
"tickInterval"
>
<number>
20
</number>
</property>
</widget>
</item>
<item>
<spacer
name=
"eSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
156
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item
row=
"4"
column=
"0"
colspan=
"3"
>
<widget
class=
"QGroupBox"
name=
"lineWidthGroupBox"
>
<widget
class=
"QGroupBox"
name=
"lineWidthGroupBox"
>
<property
name=
"sizePolicy"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Preferred"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Preferred"
>
...
@@ -458,7 +458,7 @@
...
@@ -458,7 +458,7 @@
</layout>
</layout>
</widget>
</widget>
</item>
</item>
<item
row=
"3"
column=
"
1
"
>
<item
row=
"3"
column=
"
2
"
>
<spacer
name=
"cSpacer"
>
<spacer
name=
"cSpacer"
>
<property
name=
"orientation"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
<enum>
Qt::Vertical
</enum>
...
@@ -471,33 +471,7 @@
...
@@ -471,33 +471,7 @@
</property>
</property>
</spacer>
</spacer>
</item>
</item>
<item
row=
"1"
column=
"0"
>
<item
row=
"5"
column=
"1"
>
<spacer
name=
"nwSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
0
</width>
<height>
0
</height>
</size>
</property>
</spacer>
</item>
<item
row=
"1"
column=
"2"
>
<spacer
name=
"neSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
0
</width>
<height>
0
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QFrame"
name=
"circleFrame"
>
<widget
class=
"QFrame"
name=
"circleFrame"
>
<property
name=
"frameShape"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
<enum>
QFrame::NoFrame
</enum>
...
@@ -518,19 +492,6 @@
...
@@ -518,19 +492,6 @@
<property
name=
"bottomMargin"
>
<property
name=
"bottomMargin"
>
<number>
0
</number>
<number>
0
</number>
</property>
</property>
<item>
<spacer
name=
"cspacerleft"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<item>
<widget
class=
"QCheckBox"
name=
"circleCheckBox"
>
<widget
class=
"QCheckBox"
name=
"circleCheckBox"
>
<property
name=
"sizePolicy"
>
<property
name=
"sizePolicy"
>
...
@@ -554,7 +515,10 @@
...
@@ -554,7 +515,10 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
</layout>
</widget>
</item>
<item
row=
"5"
column=
"3"
>
<spacer
name=
"cspacerright"
>
<spacer
name=
"cspacerright"
>
<property
name=
"orientation"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
<enum>
Qt::Horizontal
</enum>
...
@@ -569,20 +533,17 @@
...
@@ -569,20 +533,17 @@
</item>
</item>
</layout>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidgets>
<customwidget>
<customwidget>
<class>
UBC
ircleFrame
</class>
<class>
UBC
olorPicker
</class>
<extends>
QFrame
</extends>
<extends>
QFrame
</extends>
<header>
gui/UBC
ircleFrame
.h
</header>
<header>
gui/UBC
olorPicker
.h
</header>
<container>
1
</container>
<container>
1
</container>
</customwidget>
</customwidget>
<customwidget>
<customwidget>
<class>
UBC
olorPicker
</class>
<class>
UBC
ircleFrame
</class>
<extends>
QFrame
</extends>
<extends>
QFrame
</extends>
<header>
gui/UBC
olorPicker
.h
</header>
<header>
gui/UBC
ircleFrame
.h
</header>
<container>
1
</container>
<container>
1
</container>
</customwidget>
</customwidget>
</customwidgets>
</customwidgets>
...
...
resources/forms/preferences.ui
View file @
c6c0120a
...
@@ -14,6 +14,64 @@
...
@@ -14,6 +14,64 @@
<string>
Preferences
</string>
<string>
Preferences
</string>
</property>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QFrame"
name=
"frame"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QPushButton"
name=
"defaultSettingsButton"
>
<property
name=
"text"
>
<string>
Default Settings
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"bottomHSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QPushButton"
name=
"closeButton"
>
<property
name=
"text"
>
<string>
Close
</string>
</property>
<property
name=
"default"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item
row=
"0"
column=
"0"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"versionLabel"
>
<widget
class=
"QLabel"
name=
"versionLabel"
>
<property
name=
"text"
>
<property
name=
"text"
>
...
@@ -24,7 +82,7 @@
...
@@ -24,7 +82,7 @@
<item
row=
"1"
column=
"0"
>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QTabWidget"
name=
"mainTabWidget"
>
<widget
class=
"QTabWidget"
name=
"mainTabWidget"
>
<property
name=
"currentIndex"
>
<property
name=
"currentIndex"
>
<number>
6
</number>
<number>
1
</number>
</property>
</property>
<widget
class=
"QWidget"
name=
"displayTab"
>
<widget
class=
"QWidget"
name=
"displayTab"
>
<attribute
name=
"title"
>
<attribute
name=
"title"
>
...
@@ -477,6 +535,300 @@
...
@@ -477,6 +535,300 @@
</item>
</item>
</layout>
</layout>
</widget>
</widget>
<widget
class=
"QWidget"
name=
"gridTab"
>
<attribute
name=
"title"
>
<string>
Grid
</string>
</attribute>
<widget
class=
"QFrame"
name=
"gridFrame"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"geometry"
>
<rect>
<x>
-1
</x>
<y>
-1
</y>
<width>
741
</width>
<height>
591
</height>
</rect>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<widget
class=
"QFrame"
name=
"frame_2"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
741
</width>
<height>
611
</height>
</rect>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<widget
class=
"QFrame"
name=
"crossColorDarkBackgroundFrame"
>
<property
name=
"geometry"
>
<rect>
<x>
260
</x>
<y>
30
</y>
<width>
221
</width>
<height>
50
</height>
</rect>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"crossColorDarkBackgroundLayout"
>
<item>
<widget
class=
"QLabel"
name=
"crossColorDarkBackgroundLabel"
>
<property
name=
"text"
>
<string>
On Dark Background
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_8"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"UBColorPicker"
name=
"crossColorDarkBackgroundColorPicker"
>
<property
name=
"minimumSize"
>
<size>
<width>
32
</width>
<height>
32
</height>
</size>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QFrame"
name=
"darkBackgroundOpacityFrame"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
90
</y>
<width>
741
</width>
<height>
52
</height>
</rect>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_8"
>
<item>
<spacer
name=
"wSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
154
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"darkBackgroundOpacityLabel"
>
<property
name=
"text"
>
<string>
Opacity
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"darkBackgroundOpacitySlider"
>
<property
name=
"minimum"
>
<number>
20
</number>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"value"
>
<number>
50
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
</property>
<property
name=
"tickInterval"
>
<number>
20
</number>
</property>
</widget>
</item>
<item>
<spacer
name=
"eSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
156
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget
class=
"QFrame"
name=
"crossColorLightBackgroundFrame"
>
<property
name=
"geometry"
>
<rect>
<x>
260
</x>
<y>
150
</y>
<width>
221
</width>
<height>
51
</height>
</rect>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"crossColorLightBackgroundLayout"
>
<item>
<widget
class=
"QLabel"
name=
"crossColorLightBackgroundLabel"
>
<property
name=
"text"
>
<string>
On Light Background
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_7"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"UBColorPicker"
name=
"crossColorLightBackgroundColorPicker"
>
<property
name=
"minimumSize"
>
<size>
<width>
32
</width>
<height>
32
</height>
</size>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QFrame"
name=
"lightBackgroundOpacityFrame"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
210
</y>
<width>
741
</width>
<height>
52
</height>
</rect>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_10"
>
<item>
<spacer
name=
"wSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
154
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QLabel"
name=
"lightBackgroundOpacityLabel"
>
<property
name=
"text"
>
<string>
Opacity
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"lightBackgroundOpacitySlider"
>
<property
name=
"minimum"
>
<number>
20
</number>
</property>
<property
name=
"maximum"
>
<number>
100
</number>
</property>
<property
name=
"value"
>
<number>
50
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"tickPosition"
>
<enum>
QSlider::TicksAbove
</enum>
</property>
<property
name=
"tickInterval"
>
<number>
20
</number>
</property>
</widget>
</item>
<item>
<spacer
name=
"eSpacer_3"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
156
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</widget>
</widget>
<widget
class=
"QWidget"
name=
"penTab"
>
<widget
class=
"QWidget"
name=
"penTab"
>
<attribute
name=
"title"
>
<attribute
name=
"title"
>
<string>
Pen
</string>
<string>
Pen
</string>
...
@@ -2657,7 +3009,7 @@ Public License instead of this License. But first, please read
...
@@ -2657,7 +3009,7 @@ Public License instead of this License. But first, please read
<string
notr=
"true"
>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<string
notr=
"true"
>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
p, li { white-space: pre-wrap; }
p, li { white-space: pre-wrap; }
<
/style
><
/head
><
body style=
"
font-family:'
Sans Serif'; font-size:9
pt; font-weight:400; font-style:normal;
">
<
/style
><
/head
><
body style=
"
font-family:'
Ubuntu'; font-size:11
pt; font-weight:400; font-style:normal;
">
<
p style=
"
margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:12pt; font-weight:600;
">
Translations
<
/span
><
/p
>
<
p style=
"
margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:12pt; font-weight:600;
">
Translations
<
/span
><
/p
>
<
p style=
"
margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
"><
br /
><
/span
><
/p
>
<
p style=
"
margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
"><
br /
><
/span
><
/p
>
<
p style=
"
margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
A special thanks to:
<
/span
><
/p
>
<
p style=
"
margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
A special thanks to:
<
/span
><
/p
>
...
@@ -2751,7 +3103,7 @@ p, li { white-space: pre-wrap; }
...
@@ -2751,7 +3103,7 @@ p, li { white-space: pre-wrap; }
<string
notr=
"true"
>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<string
notr=
"true"
>
<
!DOCTYPE HTML PUBLIC
"
-//W3C//DTD HTML 4.0//EN
"
"
http://www.w3.org/TR/REC-html40/strict.dtd
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
<
html
><
head
><
meta name=
"
qrichtext
"
content=
"
1
"
/
><
style type=
"
text/css
">
p, li { white-space: pre-wrap; }
p, li { white-space: pre-wrap; }
<
/style
><
/head
><
body style=
"
font-family:'
Sans Serif'; font-size:9
pt; font-weight:400; font-style:normal;
">
<
/style
><
/head
><
body style=
"
font-family:'
Ubuntu'; font-size:11
pt; font-weight:400; font-style:normal;
">
<
table border=
"
0
"
style=
"
-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;
">
<
table border=
"
0
"
style=
"
-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;
">
<
tr
>
<
tr
>
<
td style=
"
border: none;
">
<
td style=
"
border: none;
">
...
@@ -2770,8 +3122,8 @@ p, li { white-space: pre-wrap; }
...
@@ -2770,8 +3122,8 @@ p, li { white-space: pre-wrap; }
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
Case Postale 241
<
/span
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
Case Postale 241
<
/span
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
1211 Genève 8
<
/span
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
1211 Genève 8
<
/span
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
Switzerland
<
/span
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
Switzerland
<
/span
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
a href=
"
http://www.openboard.ch
"><
span style=
"
font-family:'.Helvetica Neue DeskInterface';
font-size:11pt;
text-decoration: underline; color:#0000ff;
">
openboard.ch
<
/span
><
/a
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
a href=
"
http://www.openboard.ch
"><
span style=
"
font-family:'.Helvetica Neue DeskInterface'; text-decoration: underline; color:#0000ff;
">
openboard.ch
<
/span
><
/a
><
/p
>
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Helvetica Neue DeskInterface';
font-size:11pt;
text-decoration: underline; color:#0000ff;
"><
br /
><
/p
>
<
p style=
"
-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Helvetica Neue DeskInterface'; text-decoration: underline; color:#0000ff;
"><
br /
><
/p
>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
email:
<
/span
><
a href=
"
mailto:sem.logistique@edu.ge.ch
"><
span style=
"
font-family:'Cantarell'; font-size:10pt; text-decoration: underline; color:#0000ff;
">
sem.logistique@edu.ge.ch
<
/span
><
/a
><
/p
><
/td
><
/tr
><
/table
><
/body
><
/html
>
</string>
<
p style=
"
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;
"><
span style=
"
font-family:'Cantarell'; font-size:10pt;
">
email:
<
/span
><
a href=
"
mailto:sem.logistique@edu.ge.ch
"><
span style=
"
font-family:'Cantarell'; font-size:10pt; text-decoration: underline; color:#0000ff;
">
sem.logistique@edu.ge.ch
<
/span
><
/a
><
/p
><
/td
><
/tr
><
/table
><
/body
><
/html
>
</string>
</property>
</property>
<property
name=
"openExternalLinks"
>
<property
name=
"openExternalLinks"
>
...
@@ -2859,66 +3211,16 @@ p, li { white-space: pre-wrap; }
...
@@ -2859,66 +3211,16 @@ p, li { white-space: pre-wrap; }
</widget>
</widget>
</widget>
</widget>
</item>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QFrame"
name=
"frame"
>
<property
name=
"frameShape"
>
<enum>
QFrame::NoFrame
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QPushButton"
name=
"defaultSettingsButton"
>
<property
name=
"text"
>
<string>
Default Settings
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"bottomHSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QPushButton"
name=
"closeButton"
>
<property
name=
"text"
>
<string>
Close
</string>
</property>
<property
name=
"default"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</layout>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>
UBColorPicker
</class>
<extends>
QFrame
</extends>
<header>
gui/UBColorPicker.h
</header>
<container>
1
</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstops>
<tabstop>
mainTabWidget
</tabstop>
<tabstop>
mainTabWidget
</tabstop>
<tabstop>
useExternalBrowserCheckBox
</tabstop>
<tabstop>
useExternalBrowserCheckBox
</tabstop>
...
...
src/core/UBPreferencesController.cpp
View file @
c6c0120a
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "core/UBDisplayManager.h"
#include "core/UBDisplayManager.h"
#include "board/UBBoardController.h"
#include "board/UBBoardController.h"
#include "domain/UBGraphicsScene.h"
#include "board/UBDrawingController.h"
#include "board/UBDrawingController.h"
#include "podcast/UBPodcastController.h"
#include "podcast/UBPodcastController.h"
...
@@ -76,6 +77,8 @@ UBPreferencesController::UBPreferencesController(QWidget *parent)
...
@@ -76,6 +77,8 @@ UBPreferencesController::UBPreferencesController(QWidget *parent)
,
mPreferencesUI
(
0
)
,
mPreferencesUI
(
0
)
,
mPenProperties
(
0
)
,
mPenProperties
(
0
)
,
mMarkerProperties
(
0
)
,
mMarkerProperties
(
0
)
,
mDarkBackgroundGridColorPicker
(
0
)
,
mLightBackgroundGridColorPicker
(
0
)
{
{
mDesktop
=
qApp
->
desktop
();
mDesktop
=
qApp
->
desktop
();
mPreferencesWindow
=
new
UBPreferencesDialog
(
this
,
parent
,
Qt
::
Dialog
);
mPreferencesWindow
=
new
UBPreferencesDialog
(
this
,
parent
,
Qt
::
Dialog
);
...
@@ -97,6 +100,10 @@ UBPreferencesController::~UBPreferencesController()
...
@@ -97,6 +100,10 @@ UBPreferencesController::~UBPreferencesController()
delete
mPenProperties
;
delete
mPenProperties
;
delete
mMarkerProperties
;
delete
mMarkerProperties
;
delete
mDarkBackgroundGridColorPicker
;
delete
mLightBackgroundGridColorPicker
;
}
}
void
UBPreferencesController
::
adjustScreens
(
int
screen
)
void
UBPreferencesController
::
adjustScreens
(
int
screen
)
...
@@ -149,6 +156,43 @@ void UBPreferencesController::wire()
...
@@ -149,6 +156,43 @@ void UBPreferencesController::wire()
connect
(
mPreferencesUI
->
verticalChoice
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarOrientationVertical
(
bool
)));
connect
(
mPreferencesUI
->
verticalChoice
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarOrientationVertical
(
bool
)));
connect
(
mPreferencesUI
->
toolbarDisplayTextCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
appToolBarDisplayText
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
toolbarDisplayTextCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
appToolBarDisplayText
,
SLOT
(
setBool
(
bool
)));
//grid tab
//On light background
QList
<
QColor
>
gridLightBackgroundColors
=
settings
->
boardGridLightBackgroundColors
->
colors
();
QColor
selectedCrossColorLightBackground
(
settings
->
boardCrossColorLightBackground
->
get
().
toString
());
mLightBackgroundGridColorPicker
=
new
UBColorPicker
(
mPreferencesUI
->
crossColorLightBackgroundFrame
);
mLightBackgroundGridColorPicker
->
setObjectName
(
QString
::
fromUtf8
(
"crossColorLightBackgroundFrame"
));
mLightBackgroundGridColorPicker
->
setMinimumSize
(
QSize
(
32
,
32
));
mLightBackgroundGridColorPicker
->
setFrameShape
(
QFrame
::
StyledPanel
);
mLightBackgroundGridColorPicker
->
setFrameShadow
(
QFrame
::
Raised
);
mPreferencesUI
->
crossColorLightBackgroundLayout
->
addWidget
(
mLightBackgroundGridColorPicker
);
mLightBackgroundGridColorPicker
->
setColors
(
gridLightBackgroundColors
);
mLightBackgroundGridColorPicker
->
setSelectedColorIndex
(
gridLightBackgroundColors
.
indexOf
(
selectedCrossColorLightBackground
));
mPreferencesUI
->
lightBackgroundOpacitySlider
->
setValue
(
selectedCrossColorLightBackground
.
alpha
()
*
100
/
255
);
QObject
::
connect
(
mLightBackgroundGridColorPicker
,
SIGNAL
(
colorSelected
(
const
QColor
&
)),
this
,
SLOT
(
setCrossColorOnLightBackground
(
const
QColor
&
)));
connect
(
mPreferencesUI
->
lightBackgroundOpacitySlider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
lightBackgroundCrossOpacityValueChanged
(
int
)));
//On dark background
QList
<
QColor
>
gridDarkBackgroundColors
=
settings
->
boardGridDarkBackgroundColors
->
colors
();
QColor
selectedCrossColorDarkBackground
(
settings
->
boardCrossColorDarkBackground
->
get
().
toString
());
mDarkBackgroundGridColorPicker
=
new
UBColorPicker
(
mPreferencesUI
->
crossColorDarkBackgroundFrame
);
mDarkBackgroundGridColorPicker
->
setObjectName
(
QString
::
fromUtf8
(
"crossColorDarkBackgroundFrame"
));
mDarkBackgroundGridColorPicker
->
setMinimumSize
(
QSize
(
32
,
32
));
mDarkBackgroundGridColorPicker
->
setFrameShape
(
QFrame
::
StyledPanel
);
mDarkBackgroundGridColorPicker
->
setFrameShadow
(
QFrame
::
Raised
);
mPreferencesUI
->
crossColorDarkBackgroundLayout
->
addWidget
(
mDarkBackgroundGridColorPicker
);
mDarkBackgroundGridColorPicker
->
setColors
(
gridDarkBackgroundColors
);
mDarkBackgroundGridColorPicker
->
setSelectedColorIndex
(
gridDarkBackgroundColors
.
indexOf
(
selectedCrossColorDarkBackground
));
mPreferencesUI
->
darkBackgroundOpacitySlider
->
setValue
(
selectedCrossColorDarkBackground
.
alpha
()
*
100
/
255
);
QObject
::
connect
(
mDarkBackgroundGridColorPicker
,
SIGNAL
(
colorSelected
(
const
QColor
&
)),
this
,
SLOT
(
setCrossColorOnDarkBackground
(
const
QColor
&
)));
connect
(
mPreferencesUI
->
darkBackgroundOpacitySlider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
darkBackgroundCrossOpacityValueChanged
(
int
)));
// pen
// pen
QList
<
QColor
>
penLightBackgroundColors
=
settings
->
boardPenLightBackgroundColors
->
colors
();
QList
<
QColor
>
penLightBackgroundColors
=
settings
->
boardPenLightBackgroundColors
->
colors
();
QList
<
QColor
>
penDarkBackgroundColors
=
settings
->
boardPenDarkBackgroundColors
->
colors
();
QList
<
QColor
>
penDarkBackgroundColors
=
settings
->
boardPenDarkBackgroundColors
->
colors
();
...
@@ -340,6 +384,54 @@ void UBPreferencesController::defaultSettings()
...
@@ -340,6 +384,54 @@ void UBPreferencesController::defaultSettings()
}
}
void
UBPreferencesController
::
darkBackgroundCrossOpacityValueChanged
(
int
value
)
{
UBSettings
*
settings
=
UBSettings
::
settings
();
int
opacity
=
value
*
255
/
100
;
QList
<
QColor
>
gridDarkBackgroundColors
=
settings
->
boardGridDarkBackgroundColors
->
colors
();
int
index
=
mDarkBackgroundGridColorPicker
->
selectedColorIndex
();
QColor
currentColor
=
gridDarkBackgroundColors
.
at
(
index
);
currentColor
.
setAlpha
(
opacity
);
gridDarkBackgroundColors
.
replace
(
index
,
currentColor
);
mDarkBackgroundGridColorPicker
->
setColors
(
gridDarkBackgroundColors
);
settings
->
boardGridDarkBackgroundColors
->
setColor
(
index
,
currentColor
);
UBSettings
::
settings
()
->
boardCrossColorDarkBackground
->
set
(
currentColor
.
name
(
QColor
::
HexArgb
));
if
(
UBApplication
::
boardController
&&
UBApplication
::
boardController
->
activeScene
())
{
foreach
(
QGraphicsView
*
view
,
UBApplication
::
boardController
->
activeScene
()
->
views
())
view
->
resetCachedContent
();
}
}
void
UBPreferencesController
::
lightBackgroundCrossOpacityValueChanged
(
int
value
)
{
UBSettings
*
settings
=
UBSettings
::
settings
();
int
opacity
=
value
*
255
/
100
;
QList
<
QColor
>
gridLightBackgroundColors
=
settings
->
boardGridLightBackgroundColors
->
colors
();
int
index
=
mLightBackgroundGridColorPicker
->
selectedColorIndex
();
QColor
currentColor
=
gridLightBackgroundColors
.
at
(
index
);
currentColor
.
setAlpha
(
opacity
);
gridLightBackgroundColors
.
replace
(
index
,
currentColor
);
mLightBackgroundGridColorPicker
->
setColors
(
gridLightBackgroundColors
);
settings
->
boardGridLightBackgroundColors
->
setColor
(
index
,
currentColor
);
UBSettings
::
settings
()
->
boardCrossColorLightBackground
->
set
(
currentColor
.
name
(
QColor
::
HexArgb
));
if
(
UBApplication
::
boardController
&&
UBApplication
::
boardController
->
activeScene
())
{
foreach
(
QGraphicsView
*
view
,
UBApplication
::
boardController
->
activeScene
()
->
views
())
view
->
resetCachedContent
();
}
}
void
UBPreferencesController
::
penPreviewFromSizeChanged
(
int
value
)
void
UBPreferencesController
::
penPreviewFromSizeChanged
(
int
value
)
{
{
UBSettings
::
settings
()
->
setPenPreviewFromSize
(
value
);
UBSettings
::
settings
()
->
setPenPreviewFromSize
(
value
);
...
@@ -446,6 +538,31 @@ void UBPreferencesController::colorSelected(const QColor& color)
...
@@ -446,6 +538,31 @@ void UBPreferencesController::colorSelected(const QColor& color)
}
}
void
UBPreferencesController
::
setCrossColorOnDarkBackground
(
const
QColor
&
color
)
{
UBSettings
::
settings
()
->
boardCrossColorDarkBackground
->
set
(
color
.
name
(
QColor
::
HexArgb
));
mPreferencesUI
->
darkBackgroundOpacitySlider
->
setValue
(
color
.
alpha
()
*
100
/
255
);
if
(
UBApplication
::
boardController
&&
UBApplication
::
boardController
->
activeScene
())
{
foreach
(
QGraphicsView
*
view
,
UBApplication
::
boardController
->
activeScene
()
->
views
())
view
->
resetCachedContent
();
}
}
void
UBPreferencesController
::
setCrossColorOnLightBackground
(
const
QColor
&
color
)
{
UBSettings
::
settings
()
->
boardCrossColorLightBackground
->
set
(
color
.
name
(
QColor
::
HexArgb
));
mPreferencesUI
->
lightBackgroundOpacitySlider
->
setValue
(
color
.
alpha
()
*
100
/
255
);
if
(
UBApplication
::
boardController
&&
UBApplication
::
boardController
->
activeScene
())
{
foreach
(
QGraphicsView
*
view
,
UBApplication
::
boardController
->
activeScene
()
->
views
())
view
->
resetCachedContent
();
}
}
void
UBPreferencesController
::
toolbarPositionChanged
(
bool
checked
)
void
UBPreferencesController
::
toolbarPositionChanged
(
bool
checked
)
{
{
...
...
src/core/UBPreferencesController.h
View file @
c6c0120a
...
@@ -47,7 +47,6 @@ namespace Ui
...
@@ -47,7 +47,6 @@ namespace Ui
class
UBBrushPropertiesFrame
;
class
UBBrushPropertiesFrame
;
class
UBPreferencesDialog
:
public
QDialog
class
UBPreferencesDialog
:
public
QDialog
{
{
Q_OBJECT
;
Q_OBJECT
;
...
@@ -84,15 +83,21 @@ class UBPreferencesController : public QObject
...
@@ -84,15 +83,21 @@ class UBPreferencesController : public QObject
Ui
::
preferencesDialog
*
mPreferencesUI
;
Ui
::
preferencesDialog
*
mPreferencesUI
;
UBBrushPropertiesFrame
*
mPenProperties
;
UBBrushPropertiesFrame
*
mPenProperties
;
UBBrushPropertiesFrame
*
mMarkerProperties
;
UBBrushPropertiesFrame
*
mMarkerProperties
;
UBColorPicker
*
mDarkBackgroundGridColorPicker
;
UBColorPicker
*
mLightBackgroundGridColorPicker
;
protected
slots
:
protected
slots
:
void
close
();
void
close
();
void
defaultSettings
();
void
defaultSettings
();
void
penPreviewFromSizeChanged
(
int
value
);
void
penPreviewFromSizeChanged
(
int
value
);
void
darkBackgroundCrossOpacityValueChanged
(
int
value
);
void
lightBackgroundCrossOpacityValueChanged
(
int
value
);
void
widthSliderChanged
(
int
value
);
void
widthSliderChanged
(
int
value
);
void
opacitySliderChanged
(
int
value
);
void
opacitySliderChanged
(
int
value
);
void
colorSelected
(
const
QColor
&
);
void
colorSelected
(
const
QColor
&
);
void
setCrossColorOnDarkBackground
(
const
QColor
&
color
);
void
setCrossColorOnLightBackground
(
const
QColor
&
color
);
void
toolbarPositionChanged
(
bool
checked
);
void
toolbarPositionChanged
(
bool
checked
);
void
toolbarOrientationVertical
(
bool
checked
);
void
toolbarOrientationVertical
(
bool
checked
);
void
toolbarOrientationHorizontal
(
bool
checked
);
void
toolbarOrientationHorizontal
(
bool
checked
);
...
@@ -122,5 +127,4 @@ class UBBrushPropertiesFrame : public Ui::brushProperties
...
@@ -122,5 +127,4 @@ class UBBrushPropertiesFrame : public Ui::brushProperties
};
};
#endif
/* UBPREFERENCESCONTROLLER_H_ */
#endif
/* UBPREFERENCESCONTROLLER_H_ */
src/core/UBSetting.cpp
View file @
c6c0120a
...
@@ -105,13 +105,16 @@ UBColorListSetting::UBColorListSetting(UBSettings* owner, const QString& pDomain
...
@@ -105,13 +105,16 @@ UBColorListSetting::UBColorListSetting(UBSettings* owner, const QString& pDomain
:
UBSetting
(
owner
,
pDomain
,
pKey
,
pDefaultValue
)
:
UBSetting
(
owner
,
pDomain
,
pKey
,
pDefaultValue
)
,
mAlpha
(
pAlpha
)
,
mAlpha
(
pAlpha
)
{
{
foreach
(
QString
s
,
get
().
toStringList
())
foreach
(
QString
s
,
get
().
toStringList
())
{
{
QColor
color
;
QColor
color
;
color
.
setNamedColor
(
s
);
color
.
setNamedColor
(
s
);
if
(
mAlpha
>=
0
)
color
.
setAlphaF
(
mAlpha
);
color
.
setAlphaF
(
mAlpha
);
mColors
.
append
(
color
);
mColors
.
append
(
color
);
}
}
}
}
UBColorListSetting
::~
UBColorListSetting
()
UBColorListSetting
::~
UBColorListSetting
()
...
@@ -129,7 +132,9 @@ QVariant UBColorListSetting::reset()
...
@@ -129,7 +132,9 @@ QVariant UBColorListSetting::reset()
{
{
QColor
color
;
QColor
color
;
color
.
setNamedColor
(
s
);
color
.
setNamedColor
(
s
);
if
(
mAlpha
>=
0
)
color
.
setAlphaF
(
mAlpha
);
color
.
setAlphaF
(
mAlpha
);
mColors
.
append
(
color
);
mColors
.
append
(
color
);
}
}
...
@@ -146,10 +151,15 @@ QList<QColor> UBColorListSetting::colors() const
...
@@ -146,10 +151,15 @@ QList<QColor> UBColorListSetting::colors() const
void
UBColorListSetting
::
setColor
(
int
pIndex
,
const
QColor
&
color
)
void
UBColorListSetting
::
setColor
(
int
pIndex
,
const
QColor
&
color
)
{
{
QStringList
list
=
get
().
toStringList
();
QStringList
list
=
get
().
toStringList
();
list
.
replace
(
pIndex
,
color
.
name
());
list
.
replace
(
pIndex
,
color
.
name
(
QColor
::
HexArgb
));
if
(
mAlpha
>=
0
)
{
QColor
c
=
color
;
QColor
c
=
color
;
c
.
setAlphaF
(
mAlpha
);
c
.
setAlphaF
(
mAlpha
);
mColors
.
replace
(
pIndex
,
c
);
mColors
.
replace
(
pIndex
,
c
);
}
else
mColors
.
replace
(
pIndex
,
color
);
set
(
list
);
set
(
list
);
}
}
...
...
src/core/UBSettings.cpp
View file @
c6c0120a
...
@@ -286,10 +286,17 @@ void UBSettings::init()
...
@@ -286,10 +286,17 @@ void UBSettings::init()
pageSize
=
new
UBSetting
(
this
,
"Board"
,
"DefaultPageSize"
,
documentSizes
.
value
(
DocumentSizeRatio
::
Ratio4_3
));
pageSize
=
new
UBSetting
(
this
,
"Board"
,
"DefaultPageSize"
,
documentSizes
.
value
(
DocumentSizeRatio
::
Ratio4_3
));
boardCrossColorDarkBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorDarkBackground"
,
"#C82C2C2C"
);
boardCrossColorDarkBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorDarkBackground"
,
"#C8C0C0C0"
);
boardCrossColorLightBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorLightBackground"
,
"#A5E1FF"
);
boardCrossColorLightBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorLightBackground"
,
"#A5E1FF"
);
QStringList
gridLightBackgroundColors
;
gridLightBackgroundColors
<<
"#FFFFFF"
<<
"#FF3400"
<<
"#66C0FF"
<<
"#81FF5C"
<<
"#FFFF00"
<<
"#B68360"
<<
"#FF497E"
<<
"#8D69FF"
<<
"#C82C2C2C"
;
boardGridLightBackgroundColors
=
new
UBColorListSetting
(
this
,
"Board"
,
"GridLightBackgroundColors"
,
gridLightBackgroundColors
,
-
1.0
);
QStringList
gridDarkBackgroundColors
;
gridDarkBackgroundColors
<<
"#000000"
<<
"#FF0000"
<<
"#004080"
<<
"#008000"
<<
"#FFDD00"
<<
"#C87400"
<<
"#800040"
<<
"#008080"
<<
"#A5E1FF"
;
boardGridDarkBackgroundColors
=
new
UBColorListSetting
(
this
,
"Board"
,
"GridDarkBackgroundColors"
,
gridDarkBackgroundColors
,
-
1.0
);
QStringList
penLightBackgroundColors
;
QStringList
penLightBackgroundColors
;
penLightBackgroundColors
<<
"#000000"
<<
"#FF0000"
<<
"#004080"
<<
"#008000"
<<
"#FFDD00"
<<
"#C87400"
<<
"#800040"
<<
"#008080"
<<
"#5F2D0A"
<<
"#FFFFFF"
;
penLightBackgroundColors
<<
"#000000"
<<
"#FF0000"
<<
"#004080"
<<
"#008000"
<<
"#FFDD00"
<<
"#C87400"
<<
"#800040"
<<
"#008080"
<<
"#5F2D0A"
<<
"#FFFFFF"
;
boardPenLightBackgroundColors
=
new
UBColorListSetting
(
this
,
"Board"
,
"PenLightBackgroundColors"
,
penLightBackgroundColors
,
1.0
);
boardPenLightBackgroundColors
=
new
UBColorListSetting
(
this
,
"Board"
,
"PenLightBackgroundColors"
,
penLightBackgroundColors
,
1.0
);
...
...
src/core/UBSettings.h
View file @
c6c0120a
...
@@ -294,6 +294,9 @@ class UBSettings : public QObject
...
@@ -294,6 +294,9 @@ class UBSettings : public QObject
UBSetting
*
boardCrossColorDarkBackground
;
UBSetting
*
boardCrossColorDarkBackground
;
UBSetting
*
boardCrossColorLightBackground
;
UBSetting
*
boardCrossColorLightBackground
;
UBColorListSetting
*
boardGridLightBackgroundColors
;
UBColorListSetting
*
boardGridDarkBackgroundColors
;
UBColorListSetting
*
boardPenLightBackgroundColors
;
UBColorListSetting
*
boardPenLightBackgroundColors
;
UBColorListSetting
*
boardPenLightBackgroundSelectedColors
;
UBColorListSetting
*
boardPenLightBackgroundSelectedColors
;
...
...
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