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
823115bd
Commit
823115bd
authored
6 years ago
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added an option to swap first and second display screens
parent
159ec508
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
210 additions
and
135 deletions
+210
-135
OpenBoard.config
resources/etc/OpenBoard.config
+1
-0
preferences.ui
resources/forms/preferences.ui
+136
-129
UBBoardController.h
src/board/UBBoardController.h
+1
-2
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+1
-1
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+59
-2
UBDisplayManager.h
src/core/UBDisplayManager.h
+2
-0
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+8
-1
UBSettings.cpp
src/core/UBSettings.cpp
+1
-0
UBSettings.h
src/core/UBSettings.h
+1
-0
No files found.
resources/etc/OpenBoard.config
View file @
823115bd
[
App
]
[
App
]
AngleTolerance
=
4
AngleTolerance
=
4
HideCheckForSoftwareUpdate
=
false
HideCheckForSoftwareUpdate
=
false
HideSwapDisplayScreens
=
true
EnableAutomaticSoftwareUpdates
=
true
EnableAutomaticSoftwareUpdates
=
true
EnableSoftwareUpdates
=
true
EnableSoftwareUpdates
=
true
EnableStartupHints
=
true
EnableStartupHints
=
true
...
...
This diff is collapsed.
Click to expand it.
resources/forms/preferences.ui
View file @
823115bd
This diff is collapsed.
Click to expand it.
src/board/UBBoardController.h
View file @
823115bd
...
@@ -237,7 +237,7 @@ class UBBoardController : public UBDocumentContainer
...
@@ -237,7 +237,7 @@ class UBBoardController : public UBDocumentContainer
UBGraphicsMediaItem
*
addVideo
(
const
QUrl
&
pUrl
,
bool
startPlay
,
const
QPointF
&
pos
,
bool
bUseSource
=
false
);
UBGraphicsMediaItem
*
addVideo
(
const
QUrl
&
pUrl
,
bool
startPlay
,
const
QPointF
&
pos
,
bool
bUseSource
=
false
);
UBGraphicsMediaItem
*
addAudio
(
const
QUrl
&
pUrl
,
bool
startPlay
,
const
QPointF
&
pos
,
bool
bUseSource
=
false
);
UBGraphicsMediaItem
*
addAudio
(
const
QUrl
&
pUrl
,
bool
startPlay
,
const
QPointF
&
pos
,
bool
bUseSource
=
false
);
UBGraphicsWidgetItem
*
addW3cWidget
(
const
QUrl
&
pUrl
,
const
QPointF
&
pos
);
UBGraphicsWidgetItem
*
addW3cWidget
(
const
QUrl
&
pUrl
,
const
QPointF
&
pos
);
void
adjustDisplayViews
();
void
cut
();
void
cut
();
void
copy
();
void
copy
();
void
paste
();
void
paste
();
...
@@ -289,7 +289,6 @@ class UBBoardController : public UBDocumentContainer
...
@@ -289,7 +289,6 @@ class UBBoardController : public UBDocumentContainer
void
initBackgroundGridSize
();
void
initBackgroundGridSize
();
void
updatePageSizeState
();
void
updatePageSizeState
();
void
saveViewState
();
void
saveViewState
();
void
adjustDisplayViews
();
int
autosaveTimeoutFromSettings
();
int
autosaveTimeoutFromSettings
();
UBMainWindow
*
mMainWindow
;
UBMainWindow
*
mMainWindow
;
...
...
This diff is collapsed.
Click to expand it.
src/core/UBApplicationController.cpp
View file @
823115bd
...
@@ -98,7 +98,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView,
...
@@ -98,7 +98,7 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView,
connect
(
mDisplayManager
,
SIGNAL
(
screenLayoutChanged
()),
this
,
SLOT
(
screenLayoutChanged
()));
connect
(
mDisplayManager
,
SIGNAL
(
screenLayoutChanged
()),
this
,
SLOT
(
screenLayoutChanged
()));
connect
(
mDisplayManager
,
SIGNAL
(
screenLayoutChanged
()),
mUninoteController
,
SLOT
(
screenLayoutChanged
()));
connect
(
mDisplayManager
,
SIGNAL
(
screenLayoutChanged
()),
mUninoteController
,
SLOT
(
screenLayoutChanged
()));
connect
(
mDisplayManager
,
SIGNAL
(
screenLayoutChanged
()),
UBApplication
::
webController
,
SLOT
(
screenLayoutChanged
()));
connect
(
mDisplayManager
,
SIGNAL
(
screenLayoutChanged
()),
UBApplication
::
webController
,
SLOT
(
screenLayoutChanged
()));
connect
(
mDisplayManager
,
SIGNAL
(
adjustDisplayViewsRequired
()),
UBApplication
::
boardController
,
SLOT
(
adjustDisplayViews
()));
connect
(
mUninoteController
,
SIGNAL
(
imageCaptured
(
const
QPixmap
&
,
bool
)),
this
,
SLOT
(
addCapturedPixmap
(
const
QPixmap
&
,
bool
)));
connect
(
mUninoteController
,
SIGNAL
(
imageCaptured
(
const
QPixmap
&
,
bool
)),
this
,
SLOT
(
addCapturedPixmap
(
const
QPixmap
&
,
bool
)));
connect
(
mUninoteController
,
SIGNAL
(
restoreUniboard
()),
this
,
SLOT
(
hideDesktop
()));
connect
(
mUninoteController
,
SIGNAL
(
restoreUniboard
()),
this
,
SLOT
(
hideDesktop
()));
...
...
This diff is collapsed.
Click to expand it.
src/core/UBDisplayManager.cpp
View file @
823115bd
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
* along with OpenBoard. If not, see <http://www.gnu.org/licenses/>.
* along with OpenBoard. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include "UBDisplayManager.h"
#include "UBDisplayManager.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBPlatformUtils.h"
...
@@ -109,6 +107,65 @@ void UBDisplayManager::initScreenIndexes()
...
@@ -109,6 +107,65 @@ void UBDisplayManager::initScreenIndexes()
}
}
}
}
void
UBDisplayManager
::
swapDisplayScreens
(
bool
swap
)
{
int
screenCount
=
numScreens
();
mScreenIndexesRoles
.
clear
();
if
(
screenCount
>
0
)
{
mControlScreenIndex
=
mDesktop
->
primaryScreen
();
if
(
screenCount
>
1
&&
UBSettings
::
settings
()
->
swapControlAndDisplayScreens
->
get
().
toBool
())
{
mControlScreenIndex
=
mControlScreenIndex
^
1
;
}
mScreenIndexesRoles
<<
Control
;
}
else
{
mControlScreenIndex
=
-
1
;
}
if
(
screenCount
>
1
&&
mUseMultiScreen
)
{
mDisplayScreenIndex
=
mControlScreenIndex
!=
0
?
0
:
1
;
mScreenIndexesRoles
<<
Display
;
}
else
{
mDisplayScreenIndex
=
-
1
;
}
mPreviousScreenIndexes
.
clear
();
if
(
screenCount
>
2
)
{
for
(
int
i
=
2
;
i
<
screenCount
;
i
++
)
{
if
(
mControlScreenIndex
==
i
)
mPreviousScreenIndexes
.
append
(
1
);
else
mPreviousScreenIndexes
.
append
(
i
);
}
}
if
(
swap
)
{
// As it s a really specific ask and we don't have much time to handle it correctly
// this code handles only the swap between the main display screen and the first previous one
int
displayScreenIndex
=
mDisplayScreenIndex
;
mDisplayScreenIndex
=
mPreviousScreenIndexes
.
at
(
0
);
mPreviousScreenIndexes
.
clear
();
mPreviousScreenIndexes
.
append
(
displayScreenIndex
);
}
positionScreens
();
emit
screenLayoutChanged
();
emit
adjustDisplayViewsRequired
();
}
UBDisplayManager
::~
UBDisplayManager
()
UBDisplayManager
::~
UBDisplayManager
()
{
{
...
...
This diff is collapsed.
Click to expand it.
src/core/UBDisplayManager.h
View file @
823115bd
...
@@ -91,6 +91,7 @@ class UBDisplayManager : public QObject
...
@@ -91,6 +91,7 @@ class UBDisplayManager : public QObject
signals
:
signals
:
void
screenLayoutChanged
();
void
screenLayoutChanged
();
void
adjustDisplayViewsRequired
();
public
slots
:
public
slots
:
...
@@ -104,6 +105,7 @@ class UBDisplayManager : public QObject
...
@@ -104,6 +105,7 @@ class UBDisplayManager : public QObject
void
setRoleToScreen
(
DisplayRole
role
,
int
screenIndex
);
void
setRoleToScreen
(
DisplayRole
role
,
int
screenIndex
);
void
swapDisplayScreens
(
bool
swap
);
private
:
private
:
void
positionScreens
();
void
positionScreens
();
...
...
This diff is collapsed.
Click to expand it.
src/core/UBPreferencesController.cpp
View file @
823115bd
...
@@ -140,11 +140,18 @@ void UBPreferencesController::wire()
...
@@ -140,11 +140,18 @@ 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
(
int
)),
settings
->
appStartMode
,
SLOT
(
setInt
(
int
)));
connect
(
mPreferencesUI
->
startModeComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
settings
->
appStartMode
,
SLOT
(
setInt
(
int
)));
connect
(
mPreferencesUI
->
useExternalBrowserCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webUseExternalBrowser
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
useExternalBrowserCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webUseExternalBrowser
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
displayBrowserPageCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webShowPageImmediatelyOnMirroredScreen
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
displayBrowserPageCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webShowPageImmediatelyOnMirroredScreen
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
swapControlAndDisplayScreensCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
swapControlAndDisplayScreens
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
swapControlAndDisplayScreensCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
swapControlAndDisplayScreens
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
swapControlAndDisplayScreensCheckBox
,
SIGNAL
(
clicked
(
bool
)),
UBApplication
::
applicationController
->
displayManager
(),
SLOT
(
reinitScreens
(
bool
)));
connect
(
mPreferencesUI
->
swapControlAndDisplayScreensCheckBox
,
SIGNAL
(
clicked
(
bool
)),
UBApplication
::
applicationController
->
displayManager
(),
SLOT
(
reinitScreens
(
bool
)));
if
(
settings
->
appHideSwapDisplayScreens
->
get
().
toBool
())
{
mPreferencesUI
->
swapDisplayScreensCheckBox
->
hide
();
}
else
{
connect
(
mPreferencesUI
->
swapDisplayScreensCheckBox
,
SIGNAL
(
clicked
(
bool
)),
UBApplication
::
applicationController
->
displayManager
(),
SLOT
(
swapDisplayScreens
(
bool
)));
}
connect
(
mPreferencesUI
->
toolbarAtTopRadioButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarPositionChanged
(
bool
)));
connect
(
mPreferencesUI
->
toolbarAtTopRadioButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarPositionChanged
(
bool
)));
connect
(
mPreferencesUI
->
toolbarAtBottomRadioButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarPositionChanged
(
bool
)));
connect
(
mPreferencesUI
->
toolbarAtBottomRadioButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarPositionChanged
(
bool
)));
...
...
This diff is collapsed.
Click to expand it.
src/core/UBSettings.cpp
View file @
823115bd
...
@@ -236,6 +236,7 @@ void UBSettings::init()
...
@@ -236,6 +236,7 @@ void UBSettings::init()
appEnableAutomaticSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableAutomaticSoftwareUpdates"
,
false
);
appEnableAutomaticSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableAutomaticSoftwareUpdates"
,
false
);
appSoftwareUpdateURL
=
new
UBSetting
(
this
,
"App"
,
"SoftwareUpdateURL"
,
"http://www.openboard.ch/update.json"
);
appSoftwareUpdateURL
=
new
UBSetting
(
this
,
"App"
,
"SoftwareUpdateURL"
,
"http://www.openboard.ch/update.json"
);
appHideCheckForSoftwareUpdate
=
new
UBSetting
(
this
,
"App"
,
"HideCheckForSoftwareUpdate"
,
false
);
appHideCheckForSoftwareUpdate
=
new
UBSetting
(
this
,
"App"
,
"HideCheckForSoftwareUpdate"
,
false
);
appHideSwapDisplayScreens
=
new
UBSetting
(
this
,
"App"
,
"HideSwapDisplayScreens"
,
true
);
appToolBarOrientationVertical
=
new
UBSetting
(
this
,
"App"
,
"ToolBarOrientationVertical"
,
false
);
appToolBarOrientationVertical
=
new
UBSetting
(
this
,
"App"
,
"ToolBarOrientationVertical"
,
false
);
appPreferredLanguage
=
new
UBSetting
(
this
,
"App"
,
"PreferredLanguage"
,
""
);
appPreferredLanguage
=
new
UBSetting
(
this
,
"App"
,
"PreferredLanguage"
,
""
);
...
...
This diff is collapsed.
Click to expand it.
src/core/UBSettings.h
View file @
823115bd
...
@@ -252,6 +252,7 @@ class UBSettings : public QObject
...
@@ -252,6 +252,7 @@ class UBSettings : public QObject
UBSetting
*
appEnableAutomaticSoftwareUpdates
;
UBSetting
*
appEnableAutomaticSoftwareUpdates
;
UBSetting
*
appSoftwareUpdateURL
;
UBSetting
*
appSoftwareUpdateURL
;
UBSetting
*
appHideCheckForSoftwareUpdate
;
UBSetting
*
appHideCheckForSoftwareUpdate
;
UBSetting
*
appHideSwapDisplayScreens
;
UBSetting
*
appToolBarOrientationVertical
;
UBSetting
*
appToolBarOrientationVertical
;
UBSetting
*
appPreferredLanguage
;
UBSetting
*
appPreferredLanguage
;
...
...
This diff is collapsed.
Click to expand it.
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