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
e304b03f
Commit
e304b03f
authored
Mar 16, 2012
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SANKORE-69
Launch Sankore on desktop mode
parent
48bce1d8
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1160 additions
and
1056 deletions
+1160
-1056
preferences.ui
resources/forms/preferences.ui
+1128
-1046
UBBoardController.cpp
src/board/UBBoardController.cpp
+8
-6
UBApplication.cpp
src/core/UBApplication.cpp
+3
-0
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+3
-2
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+3
-1
UBDisplayManager.h
src/core/UBDisplayManager.h
+1
-1
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+10
-0
UBSettings.cpp
src/core/UBSettings.cpp
+2
-0
UBSettings.h
src/core/UBSettings.h
+2
-0
No files found.
resources/forms/preferences.ui
View file @
e304b03f
...
@@ -292,66 +292,8 @@
...
@@ -292,66 +292,8 @@
</property>
</property>
</spacer>
</spacer>
</item>
</item>
<item
row=
"12"
column=
"0"
>
<item
row=
"14"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"keyboardGroupBox"
>
<spacer
name=
"modeSpacer"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"title"
>
<string>
Virtual Keyboard
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_13"
>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"horizontalSpacer"
>
<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_11"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Keyboard button size:
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"keyboardPaletteKeyButtonSize"
/>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"horizontalSpacer_2"
>
<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"
>
<spacer
name=
"verticalSpacer_2"
>
<property
name=
"orientation"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
<enum>
Qt::Vertical
</enum>
</property>
</property>
...
@@ -566,6 +508,146 @@
...
@@ -566,6 +508,146 @@
</layout>
</layout>
</widget>
</widget>
</item>
</item>
<item
row=
"12"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"keyboardGroupBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"title"
>
<string>
Virtual Keyboard
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_13"
>
<item
row=
"0"
column=
"0"
>
<spacer
name=
"horizontalSpacer"
>
<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_11"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_2"
>
<property
name=
"text"
>
<string>
Keyboard button size:
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"keyboardPaletteKeyButtonSize"
/>
</item>
<item
row=
"0"
column=
"2"
>
<spacer
name=
"horizontalSpacer_2"
>
<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=
"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=
"16"
column=
"0"
>
<spacer
name=
"verticalSpacer_7"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</layout>
</widget>
</widget>
<widget
class=
"QWidget"
name=
"penTab"
>
<widget
class=
"QWidget"
name=
"penTab"
>
...
...
src/board/UBBoardController.cpp
View file @
e304b03f
...
@@ -365,7 +365,7 @@ void UBBoardController::connectToolbar()
...
@@ -365,7 +365,7 @@ void UBBoardController::connectToolbar()
void
UBBoardController
::
startScript
()
void
UBBoardController
::
startScript
()
{
{
freezeW3CWidgets
(
tru
e
);
freezeW3CWidgets
(
fals
e
);
}
}
void
UBBoardController
::
stopScript
()
void
UBBoardController
::
stopScript
()
...
@@ -453,6 +453,7 @@ void UBBoardController::addScene()
...
@@ -453,6 +453,7 @@ void UBBoardController::addScene()
setActiveDocumentScene
(
mActiveDocument
,
mActiveSceneIndex
+
1
);
setActiveDocumentScene
(
mActiveDocument
,
mActiveSceneIndex
+
1
);
QApplication
::
restoreOverrideCursor
();
QApplication
::
restoreOverrideCursor
();
centerOn
();
}
}
...
@@ -2162,13 +2163,14 @@ void UBBoardController::freezeW3CWidget(QGraphicsItem *item, bool freeze)
...
@@ -2162,13 +2163,14 @@ void UBBoardController::freezeW3CWidget(QGraphicsItem *item, bool freeze)
{
{
if
(
item
->
type
()
==
UBGraphicsW3CWidgetItem
::
Type
)
if
(
item
->
type
()
==
UBGraphicsW3CWidgetItem
::
Type
)
{
{
QString
scriptString
;
if
(
freeze
)
scriptString
=
"setfreezed(true);"
;
else
scriptString
=
"setfreezed(false);"
;
UBGraphicsW3CWidgetItem
*
item_casted
=
dynamic_cast
<
UBGraphicsW3CWidgetItem
*>
(
item
);
UBGraphicsW3CWidgetItem
*
item_casted
=
dynamic_cast
<
UBGraphicsW3CWidgetItem
*>
(
item
);
if
(
0
==
item_casted
)
if
(
0
==
item_casted
)
return
;
return
;
item_casted
->
widgetWebView
()
->
page
()
->
mainFrame
()
->
evaluateJavaScript
(
scriptString
);
if
(
freeze
)
{
item_casted
->
widgetWebView
()
->
page
()
->
mainFrame
()
->
setContent
(
UBW3CWidget
::
freezedWidgetPage
().
toAscii
());
}
else
item_casted
->
widgetWebView
()
->
loadMainHtml
();
}
}
}
}
src/core/UBApplication.cpp
View file @
e304b03f
...
@@ -310,6 +310,9 @@ int UBApplication::exec(const QString& pFileToImport)
...
@@ -310,6 +310,9 @@ int UBApplication::exec(const QString& pFileToImport)
static
AEEventHandlerUPP
ub_proc_ae_handlerUPP
=
AEEventHandlerUPP
(
ub_appleEventProcessor
);
static
AEEventHandlerUPP
ub_proc_ae_handlerUPP
=
AEEventHandlerUPP
(
ub_appleEventProcessor
);
AEInstallEventHandler
(
kCoreEventClass
,
kAEReopenApplication
,
ub_proc_ae_handlerUPP
,
SRefCon
(
UBApplication
::
applicationController
),
true
);
AEInstallEventHandler
(
kCoreEventClass
,
kAEReopenApplication
,
ub_proc_ae_handlerUPP
,
SRefCon
(
UBApplication
::
applicationController
),
true
);
#endif
#endif
if
(
UBSettings
::
settings
()
->
appStartMode
->
get
()
==
"Desktop"
)
applicationController
->
showDesktop
();
else
applicationController
->
showBoard
();
if
(
UBSettings
::
settings
()
->
appIsInSoftwareUpdateProcess
->
get
().
toBool
())
if
(
UBSettings
::
settings
()
->
appIsInSoftwareUpdateProcess
->
get
().
toBool
())
...
...
src/core/UBApplicationController.cpp
View file @
e304b03f
...
@@ -137,7 +137,7 @@ void UBApplicationController::initViewState(int horizontalPosition, int vertical
...
@@ -137,7 +137,7 @@ void UBApplicationController::initViewState(int horizontalPosition, int vertical
void
UBApplicationController
::
initScreenLayout
()
void
UBApplicationController
::
initScreenLayout
()
{
{
mDisplayManager
->
setAsControl
(
mMainWindow
);
mDisplayManager
->
setAsControl
(
mMainWindow
,
true
);
mDisplayManager
->
setAsDisplay
(
mDisplayView
);
mDisplayManager
->
setAsDisplay
(
mDisplayView
);
mDisplayManager
->
setAsPreviousDisplays
(
mPreviousViews
);
mDisplayManager
->
setAsPreviousDisplays
(
mPreviousViews
);
...
@@ -352,7 +352,8 @@ void UBApplicationController::showBoard()
...
@@ -352,7 +352,8 @@ void UBApplicationController::showBoard()
UBPlatformUtils
::
setDesktopMode
(
false
);
UBPlatformUtils
::
setDesktopMode
(
false
);
mUninoteController
->
hideWindow
();
mUninoteController
->
hideWindow
();
mMainWindow
->
show
();
mDisplayManager
->
adjustScreens
(
0
);
emit
mainModeChanged
(
Board
);
emit
mainModeChanged
(
Board
);
}
}
...
...
src/core/UBDisplayManager.cpp
View file @
e304b03f
...
@@ -118,13 +118,15 @@ int UBDisplayManager::numPreviousViews()
...
@@ -118,13 +118,15 @@ int UBDisplayManager::numPreviousViews()
}
}
void
UBDisplayManager
::
setAsControl
(
QWidget
*
pControlWidget
)
void
UBDisplayManager
::
setAsControl
(
QWidget
*
pControlWidget
,
bool
init
)
{
{
if
(
hasControl
()
&&
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
if
(
hasControl
()
&&
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
{
{
mControlWidget
=
pControlWidget
;
mControlWidget
=
pControlWidget
;
mControlWidget
->
hide
();
mControlWidget
->
hide
();
mControlWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
mControlWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
if
(
!
init
)
mControlWidget
->
showFullScreen
();
mControlWidget
->
showFullScreen
();
// !!!! Should be included into Windows after QT recompilation
// !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC
#ifdef Q_WS_MAC
...
...
src/core/UBDisplayManager.h
View file @
e304b03f
...
@@ -33,7 +33,7 @@ class UBDisplayManager : public QObject
...
@@ -33,7 +33,7 @@ class UBDisplayManager : public QObject
int
numPreviousViews
();
int
numPreviousViews
();
void
setAsControl
(
QWidget
*
pControlWidget
);
void
setAsControl
(
QWidget
*
pControlWidget
,
bool
init
=
false
);
void
setAsDisplay
(
QWidget
*
pDisplayWidget
);
void
setAsDisplay
(
QWidget
*
pDisplayWidget
);
...
...
src/core/UBPreferencesController.cpp
View file @
e304b03f
...
@@ -112,6 +112,7 @@ void UBPreferencesController::wire()
...
@@ -112,6 +112,7 @@ void UBPreferencesController::wire()
connect
(
mPreferencesUI
->
keyboardPaletteKeyButtonSize
,
SIGNAL
(
currentIndexChanged
(
const
QString
&
)),
settings
->
boardKeyboardPaletteKeyBtnSize
,
SLOT
(
setString
(
const
QString
&
)));
connect
(
mPreferencesUI
->
keyboardPaletteKeyButtonSize
,
SIGNAL
(
currentIndexChanged
(
const
QString
&
)),
settings
->
boardKeyboardPaletteKeyBtnSize
,
SLOT
(
setString
(
const
QString
&
)));
connect
(
mPreferencesUI
->
startModeComboBox
,
SIGNAL
(
currentIndexChanged
(
const
QString
&
)),
settings
->
appStartMode
,
SLOT
(
setString
(
const
QString
&
)));
connect
(
mPreferencesUI
->
useExternalBrowserCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webUseExternalBrowser
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
useExternalBrowserCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webUseExternalBrowser
,
SLOT
(
setBool
(
bool
)));
...
@@ -180,6 +181,14 @@ void UBPreferencesController::init()
...
@@ -180,6 +181,14 @@ void UBPreferencesController::init()
break
;
break
;
}
}
for
(
int
i
=
0
;
i
<
mPreferencesUI
->
startModeComboBox
->
count
();
i
++
)
if
(
mPreferencesUI
->
startModeComboBox
->
itemText
(
i
)
==
settings
->
appStartMode
->
get
().
toString
())
{
mPreferencesUI
->
startModeComboBox
->
setCurrentIndex
(
i
);
break
;
}
mPreferencesUI
->
useExternalBrowserCheckBox
->
setChecked
(
settings
->
webUseExternalBrowser
->
get
().
toBool
());
mPreferencesUI
->
useExternalBrowserCheckBox
->
setChecked
(
settings
->
webUseExternalBrowser
->
get
().
toBool
());
mPreferencesUI
->
displayBrowserPageCheckBox
->
setChecked
(
settings
->
webShowPageImmediatelyOnMirroredScreen
->
get
().
toBool
());
mPreferencesUI
->
displayBrowserPageCheckBox
->
setChecked
(
settings
->
webShowPageImmediatelyOnMirroredScreen
->
get
().
toBool
());
mPreferencesUI
->
webHomePage
->
setText
(
settings
->
webHomePage
->
get
().
toString
());
mPreferencesUI
->
webHomePage
->
setText
(
settings
->
webHomePage
->
get
().
toString
());
...
@@ -293,6 +302,7 @@ void UBPreferencesController::defaultSettings()
...
@@ -293,6 +302,7 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI
->
toolbarDisplayTextCheckBox
->
setChecked
(
defaultValue
);
mPreferencesUI
->
toolbarDisplayTextCheckBox
->
setChecked
(
defaultValue
);
mPreferencesUI
->
verticalChoice
->
setChecked
(
settings
->
appToolBarOrientationVertical
->
reset
().
toBool
());
mPreferencesUI
->
verticalChoice
->
setChecked
(
settings
->
appToolBarOrientationVertical
->
reset
().
toBool
());
mPreferencesUI
->
horizontalChoice
->
setChecked
(
!
settings
->
appToolBarOrientationVertical
->
reset
().
toBool
());
mPreferencesUI
->
horizontalChoice
->
setChecked
(
!
settings
->
appToolBarOrientationVertical
->
reset
().
toBool
());
mPreferencesUI
->
startModeComboBox
->
setCurrentIndex
(
0
);
}
}
else
if
(
mPreferencesUI
->
mainTabWidget
->
currentWidget
()
==
mPreferencesUI
->
penTab
)
else
if
(
mPreferencesUI
->
mainTabWidget
->
currentWidget
()
==
mPreferencesUI
->
penTab
)
{
{
...
...
src/core/UBSettings.cpp
View file @
e304b03f
...
@@ -212,6 +212,8 @@ void UBSettings::init()
...
@@ -212,6 +212,8 @@ void UBSettings::init()
appLastSessionPageIndex
=
new
UBSetting
(
this
,
"App"
,
"LastSessionPageIndex"
,
0
);
appLastSessionPageIndex
=
new
UBSetting
(
this
,
"App"
,
"LastSessionPageIndex"
,
0
);
appUseMultiscreen
=
new
UBSetting
(
this
,
"App"
,
"UseMusliscreenMode"
,
true
);
appUseMultiscreen
=
new
UBSetting
(
this
,
"App"
,
"UseMusliscreenMode"
,
true
);
appStartMode
=
new
UBSetting
(
this
,
"App"
,
"StartMode"
,
""
);
boardPenFineWidth
=
new
UBSetting
(
this
,
"Board"
,
"PenFineWidth"
,
1.5
);
boardPenFineWidth
=
new
UBSetting
(
this
,
"Board"
,
"PenFineWidth"
,
1.5
);
boardPenMediumWidth
=
new
UBSetting
(
this
,
"Board"
,
"PenMediumWidth"
,
3.0
);
boardPenMediumWidth
=
new
UBSetting
(
this
,
"Board"
,
"PenMediumWidth"
,
3.0
);
boardPenStrongWidth
=
new
UBSetting
(
this
,
"Board"
,
"PenStrongWidth"
,
8.0
);
boardPenStrongWidth
=
new
UBSetting
(
this
,
"Board"
,
"PenStrongWidth"
,
8.0
);
...
...
src/core/UBSettings.h
View file @
e304b03f
...
@@ -229,6 +229,8 @@ class UBSettings : public QObject
...
@@ -229,6 +229,8 @@ class UBSettings : public QObject
UBSetting
*
boardKeyboardPaletteKeyBtnSize
;
UBSetting
*
boardKeyboardPaletteKeyBtnSize
;
UBSetting
*
appStartMode
;
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