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
f25888ae
Commit
f25888ae
authored
13 years ago
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to SANKORE-324 and to SANKORE-297.
parent
11f702cb
master
bugfix
1.5.4z3
1.5.4z2
1.5.4z
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
242 additions
and
195 deletions
+242
-195
preferences.ui
resources/forms/preferences.ui
+200
-193
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+1
-0
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+30
-2
UBDisplayManager.h
src/core/UBDisplayManager.h
+6
-0
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+3
-0
UBSettings.cpp
src/core/UBSettings.cpp
+1
-0
UBSettings.h
src/core/UBSettings.h
+1
-0
No files found.
resources/forms/preferences.ui
View file @
f25888ae
This source diff could not be displayed because it is too large. You can
view the blob
instead.
This diff is collapsed.
Click to expand it.
src/core/UBApplicationController.cpp
View file @
f25888ae
...
...
@@ -141,6 +141,7 @@ void UBApplicationController::initScreenLayout()
mDisplayManager
->
setAsDisplay
(
mDisplayView
);
mDisplayManager
->
setAsPreviousDisplays
(
mPreviousViews
);
mDisplayManager
->
setAsDesktop
(
mUninoteController
->
drawingView
());
mDisplayManager
->
adjustScreens
(
-
1
);
}
...
...
This diff is collapsed.
Click to expand it.
src/core/UBDisplayManager.cpp
View file @
f25888ae
...
...
@@ -34,6 +34,7 @@ UBDisplayManager::UBDisplayManager(QObject *parent)
,
mDisplayScreenIndex
(
-
1
)
,
mControlWidget
(
0
)
,
mDisplayWidget
(
0
)
,
mDesktopWidget
(
0
)
{
mDesktop
=
qApp
->
desktop
();
...
...
@@ -55,8 +56,10 @@ void UBDisplayManager::initScreenIndexes()
if
(
screenCount
>
0
)
{
mControlScreenIndex
=
mDesktop
->
primaryScreen
();
//qDebug() << "The primary screen: " << mControlScreenIndex << mDesktop->screenGeometry(mControlScreenIndex);
if
(
UBSettings
::
settings
()
->
swapControlAndDisplayScreens
->
get
().
toBool
())
{
mControlScreenIndex
=
mControlScreenIndex
^
1
;
}
mScreenIndexesRoles
<<
Control
;
}
...
...
@@ -130,6 +133,20 @@ void UBDisplayManager::setAsControl(QWidget* pControlWidget )
}
}
void
UBDisplayManager
::
setAsDesktop
(
QWidget
*
pControlWidget
)
{
if
(
hasControl
()
&&
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
{
mDesktopWidget
=
pControlWidget
;
mDesktopWidget
->
hide
();
mDesktopWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
// mDisplayWidget->showFullScreen();
// !!!! Should be included into Windows after QT recompilation
#ifdef Q_WS_MAC
// mControlWidget->setAttribute(Qt::WA_MacNoShadow);
#endif
}
}
void
UBDisplayManager
::
setAsDisplay
(
QWidget
*
pDisplayWidget
)
{
...
...
@@ -163,6 +180,12 @@ QRect UBDisplayManager::displayGeometry()
return
mDesktop
->
screenGeometry
(
mDisplayScreenIndex
);
}
void
UBDisplayManager
::
swapScreens
(
bool
swap
)
{
adjustScreens
(
-
1
);
}
void
UBDisplayManager
::
adjustScreens
(
int
screen
)
{
Q_UNUSED
(
screen
);
...
...
@@ -189,6 +212,11 @@ void UBDisplayManager::positionScreens()
mDisplayWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mDisplayScreenIndex
));
mDisplayWidget
->
showFullScreen
();
}
if
(
mDesktopWidget
&&
mControlScreenIndex
>
-
1
)
{
mDesktopWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
// mDesktopWidget->showFullScreen();
}
else
if
(
mDisplayWidget
)
{
mDisplayWidget
->
hide
();
...
...
This diff is collapsed.
Click to expand it.
src/core/UBDisplayManager.h
View file @
f25888ae
...
...
@@ -37,6 +37,8 @@ class UBDisplayManager : public QObject
void
setAsDisplay
(
QWidget
*
pDisplayWidget
);
void
setAsDesktop
(
QWidget
*
pControlWidget
);
void
setAsPreviousDisplays
(
QList
<
UBBoardView
*>
pPreviousViews
);
bool
hasControl
()
...
...
@@ -75,6 +77,8 @@ class UBDisplayManager : public QObject
public
slots
:
void
swapScreens
(
bool
bswap
);
void
adjustScreens
(
int
screen
);
void
blackout
();
...
...
@@ -101,6 +105,8 @@ class UBDisplayManager : public QObject
QWidget
*
mDisplayWidget
;
QWidget
*
mDesktopWidget
;
QList
<
UBBoardView
*>
mPreviousDisplayWidgets
;
QList
<
UBBlackoutWidget
*>
mBlackoutWidgets
;
...
...
This diff is collapsed.
Click to expand it.
src/core/UBPreferencesController.cpp
View file @
f25888ae
...
...
@@ -116,6 +116,8 @@ void UBPreferencesController::wire()
connect
(
mPreferencesUI
->
useExternalBrowserCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
webUseExternalBrowser
,
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
)),
UBApplication
::
applicationController
->
displayManager
(),
SLOT
(
swapScreens
(
bool
)));
connect
(
mPreferencesUI
->
toolbarAtTopRadioButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarPositionChanged
(
bool
)));
connect
(
mPreferencesUI
->
toolbarAtBottomRadioButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toolbarPositionChanged
(
bool
)));
...
...
@@ -193,6 +195,7 @@ void UBPreferencesController::init()
mPreferencesUI
->
Username_textBox
->
setText
(
settings
->
communityUsername
());
mPreferencesUI
->
Password_textEdit
->
setText
(
settings
->
communityPassword
());
mPreferencesUI
->
swapControlAndDisplayScreensCheckBox
->
setChecked
(
settings
->
swapControlAndDisplayScreens
->
get
().
toBool
());
// pen tab
mPenProperties
->
fineSlider
->
setValue
(
settings
->
boardPenFineWidth
->
get
().
toDouble
()
*
sSliderRatio
);
...
...
This diff is collapsed.
Click to expand it.
src/core/UBSettings.cpp
View file @
f25888ae
...
...
@@ -373,6 +373,7 @@ void UBSettings::init()
intranetPodcastAuthor
=
new
UBSetting
(
this
,
"IntranetPodcast"
,
"Author"
,
""
);
KeyboardLocale
=
new
UBSetting
(
this
,
"Board"
,
"StartupKeyboardLocale"
,
0
);
swapControlAndDisplayScreens
=
new
UBSetting
(
this
,
"App"
,
"SwapControlAndDisplayScreens"
,
false
);
}
...
...
This diff is collapsed.
Click to expand it.
src/core/UBSettings.h
View file @
f25888ae
...
...
@@ -321,6 +321,7 @@ class UBSettings : public QObject
UBSetting
*
pageSize
;
UBSetting
*
KeyboardLocale
;
UBSetting
*
swapControlAndDisplayScreens
;
public
slots
:
...
...
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