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
56e49c1f
Commit
56e49c1f
authored
Apr 03, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed screens initialization order and logic.
parent
b36627ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
25 deletions
+13
-25
UBApplication.cpp
src/core/UBApplication.cpp
+1
-2
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+5
-4
UBApplicationController.h
src/core/UBApplicationController.h
+1
-1
UBDisplayManager.cpp
src/core/UBDisplayManager.cpp
+0
-12
UBDisplayManager.h
src/core/UBDisplayManager.h
+5
-5
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+1
-1
No files found.
src/core/UBApplication.cpp
View file @
56e49c1f
...
@@ -289,7 +289,6 @@ int UBApplication::exec(const QString& pFileToImport)
...
@@ -289,7 +289,6 @@ int UBApplication::exec(const QString& pFileToImport)
bool
bUseMultiScreen
=
UBSettings
::
settings
()
->
appUseMultiscreen
->
get
().
toBool
();
bool
bUseMultiScreen
=
UBSettings
::
settings
()
->
appUseMultiscreen
->
get
().
toBool
();
mainWindow
->
actionMultiScreen
->
setChecked
(
bUseMultiScreen
);
mainWindow
->
actionMultiScreen
->
setChecked
(
bUseMultiScreen
);
applicationController
->
useMultiScreen
(
bUseMultiScreen
);
connect
(
mainWindow
->
actionMultiScreen
,
SIGNAL
(
triggered
(
bool
)),
applicationController
,
SLOT
(
useMultiScreen
(
bool
)));
connect
(
mainWindow
->
actionMultiScreen
,
SIGNAL
(
triggered
(
bool
)),
applicationController
,
SLOT
(
useMultiScreen
(
bool
)));
connect
(
mainWindow
->
actionWidePageSize
,
SIGNAL
(
triggered
(
bool
)),
boardController
,
SLOT
(
setWidePageSize
(
bool
)));
connect
(
mainWindow
->
actionWidePageSize
,
SIGNAL
(
triggered
(
bool
)),
boardController
,
SLOT
(
setWidePageSize
(
bool
)));
connect
(
mainWindow
->
actionRegularPageSize
,
SIGNAL
(
triggered
(
bool
)),
boardController
,
SLOT
(
setRegularPageSize
(
bool
)));
connect
(
mainWindow
->
actionRegularPageSize
,
SIGNAL
(
triggered
(
bool
)),
boardController
,
SLOT
(
setRegularPageSize
(
bool
)));
...
@@ -299,7 +298,7 @@ int UBApplication::exec(const QString& pFileToImport)
...
@@ -299,7 +298,7 @@ int UBApplication::exec(const QString& pFileToImport)
connect
(
mainWindow
->
actionCopy
,
SIGNAL
(
triggered
()),
applicationController
,
SLOT
(
actionCopy
()));
connect
(
mainWindow
->
actionCopy
,
SIGNAL
(
triggered
()),
applicationController
,
SLOT
(
actionCopy
()));
connect
(
mainWindow
->
actionPaste
,
SIGNAL
(
triggered
()),
applicationController
,
SLOT
(
actionPaste
()));
connect
(
mainWindow
->
actionPaste
,
SIGNAL
(
triggered
()),
applicationController
,
SLOT
(
actionPaste
()));
applicationController
->
initScreenLayout
();
applicationController
->
initScreenLayout
(
bUseMultiScreen
);
boardController
->
setupLayout
();
boardController
->
setupLayout
();
if
(
pFileToImport
.
length
()
>
0
)
if
(
pFileToImport
.
length
()
>
0
)
...
...
src/core/UBApplicationController.cpp
View file @
56e49c1f
...
@@ -135,14 +135,15 @@ void UBApplicationController::initViewState(int horizontalPosition, int vertical
...
@@ -135,14 +135,15 @@ void UBApplicationController::initViewState(int horizontalPosition, int vertical
}
}
void
UBApplicationController
::
initScreenLayout
()
void
UBApplicationController
::
initScreenLayout
(
bool
useMultiscreen
)
{
{
mDisplayManager
->
setAsControl
(
mMainWindow
,
true
);
mDisplayManager
->
setAsControl
(
mMainWindow
);
mDisplayManager
->
setAsDisplay
(
mDisplayView
);
mDisplayManager
->
setAsDisplay
(
mDisplayView
);
mDisplayManager
->
setAsPreviousDisplays
(
mPreviousViews
);
mDisplayManager
->
setAsPreviousDisplays
(
mPreviousViews
);
mDisplayManager
->
setAsDesktop
(
mUninoteController
->
drawingView
());
mDisplayManager
->
setAsDesktop
(
mUninoteController
->
drawingView
());
mDisplayManager
->
setUseMultiScreen
(
bMultiScreen
);
mDisplayManager
->
adjustScreens
(
-
1
);
mDisplayManager
->
adjustScreens
(
-
1
);
}
}
...
@@ -343,7 +344,6 @@ void UBApplicationController::showBoard()
...
@@ -343,7 +344,6 @@ void UBApplicationController::showBoard()
mirroringEnabled
(
false
);
mirroringEnabled
(
false
);
mMainWindow
->
switchToBoardWidget
();
mMainWindow
->
switchToBoardWidget
();
mDisplayManager
->
setAsDisplay
(
mDisplayView
);
if
(
UBApplication
::
boardController
)
if
(
UBApplication
::
boardController
)
UBApplication
::
boardController
->
show
();
UBApplication
::
boardController
->
show
();
...
@@ -353,7 +353,7 @@ void UBApplicationController::showBoard()
...
@@ -353,7 +353,7 @@ void UBApplicationController::showBoard()
mUninoteController
->
hideWindow
();
mUninoteController
->
hideWindow
();
m
DisplayManager
->
adjustScreens
(
0
);
m
MainWindow
->
show
(
);
emit
mainModeChanged
(
Board
);
emit
mainModeChanged
(
Board
);
...
@@ -727,6 +727,7 @@ void UBApplicationController::importFile(const QString& pFilePath)
...
@@ -727,6 +727,7 @@ void UBApplicationController::importFile(const QString& pFilePath)
void
UBApplicationController
::
useMultiScreen
(
bool
use
)
void
UBApplicationController
::
useMultiScreen
(
bool
use
)
{
{
mDisplayManager
->
setUseMultiScreen
(
use
);
mDisplayManager
->
setUseMultiScreen
(
use
);
mDisplayManager
->
adjustScreens
(
0
);
UBSettings
::
settings
()
->
appUseMultiscreen
->
set
(
use
);
UBSettings
::
settings
()
->
appUseMultiscreen
->
set
(
use
);
}
}
...
...
src/core/UBApplicationController.h
View file @
56e49c1f
...
@@ -51,7 +51,7 @@ class UBApplicationController : public QObject
...
@@ -51,7 +51,7 @@ class UBApplicationController : public QObject
void
blackout
();
void
blackout
();
void
initScreenLayout
();
void
initScreenLayout
(
bool
useMultiscreen
);
void
closing
();
void
closing
();
...
...
src/core/UBDisplayManager.cpp
View file @
56e49c1f
...
@@ -123,11 +123,6 @@ void UBDisplayManager::setAsControl(QWidget* pControlWidget, bool init)
...
@@ -123,11 +123,6 @@ void UBDisplayManager::setAsControl(QWidget* pControlWidget, bool init)
if
(
hasControl
()
&&
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
if
(
hasControl
()
&&
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
{
{
mControlWidget
=
pControlWidget
;
mControlWidget
=
pControlWidget
;
mControlWidget
->
hide
();
mControlWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
if
(
!
init
)
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
// mControlWidget->setAttribute(Qt::WA_MacNoShadow);
// mControlWidget->setAttribute(Qt::WA_MacNoShadow);
...
@@ -140,9 +135,6 @@ void UBDisplayManager::setAsDesktop(QWidget* pControlWidget )
...
@@ -140,9 +135,6 @@ void UBDisplayManager::setAsDesktop(QWidget* pControlWidget )
if
(
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
if
(
pControlWidget
&&
(
pControlWidget
!=
mControlWidget
))
{
{
mDesktopWidget
=
pControlWidget
;
mDesktopWidget
=
pControlWidget
;
mDesktopWidget
->
hide
();
mDesktopWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mControlScreenIndex
));
// mDisplayWidget->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
// mControlWidget->setAttribute(Qt::WA_MacNoShadow);
// mControlWidget->setAttribute(Qt::WA_MacNoShadow);
...
@@ -155,9 +147,6 @@ void UBDisplayManager::setAsDisplay(QWidget* pDisplayWidget)
...
@@ -155,9 +147,6 @@ void UBDisplayManager::setAsDisplay(QWidget* pDisplayWidget)
if
(
pDisplayWidget
&&
(
pDisplayWidget
!=
mDisplayWidget
))
if
(
pDisplayWidget
&&
(
pDisplayWidget
!=
mDisplayWidget
))
{
{
mDisplayWidget
=
pDisplayWidget
;
mDisplayWidget
=
pDisplayWidget
;
mDisplayWidget
->
hide
();
mDisplayWidget
->
setGeometry
(
mDesktop
->
screenGeometry
(
mDisplayScreenIndex
));
mDisplayWidget
->
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
// mDisplayWidget->setAttribute(Qt::WA_MacNoShadow);
// mDisplayWidget->setAttribute(Qt::WA_MacNoShadow);
...
@@ -310,6 +299,5 @@ void UBDisplayManager::setRoleToScreen(DisplayRole role, int screenIndex)
...
@@ -310,6 +299,5 @@ void UBDisplayManager::setRoleToScreen(DisplayRole role, int screenIndex)
void
UBDisplayManager
::
setUseMultiScreen
(
bool
pUse
)
void
UBDisplayManager
::
setUseMultiScreen
(
bool
pUse
)
{
{
mUseMultiScreen
=
pUse
;
mUseMultiScreen
=
pUse
;
adjustScreens
(
0
);
}
}
src/core/UBDisplayManager.h
View file @
56e49c1f
...
@@ -33,13 +33,13 @@ class UBDisplayManager : public QObject
...
@@ -33,13 +33,13 @@ class UBDisplayManager : public QObject
int
numPreviousViews
();
int
numPreviousViews
();
void
set
AsControl
(
QWidget
*
pControlWidget
,
bool
init
=
false
);
void
set
ControlWidget
(
QWidget
*
pControlWidget
);
void
set
AsDisplay
(
QWidget
*
pDisplayWidget
);
void
set
DisplayWidget
(
QWidget
*
pDisplayWidget
);
void
set
AsDesktop
(
QWidget
*
pControlWidget
);
void
set
DesktopWidget
(
QWidget
*
pControlWidget
);
void
set
AsPreviousDisplay
s
(
QList
<
UBBoardView
*>
pPreviousViews
);
void
set
PreviousDisplaysWidget
s
(
QList
<
UBBoardView
*>
pPreviousViews
);
bool
hasControl
()
bool
hasControl
()
{
{
...
@@ -77,7 +77,7 @@ class UBDisplayManager : public QObject
...
@@ -77,7 +77,7 @@ class UBDisplayManager : public QObject
public
slots
:
public
slots
:
void
swap
Screens
(
bool
bswap
);
void
reinit
Screens
(
bool
bswap
);
void
adjustScreens
(
int
screen
);
void
adjustScreens
(
int
screen
);
...
...
src/core/UBPreferencesController.cpp
View file @
56e49c1f
...
@@ -118,7 +118,7 @@ void UBPreferencesController::wire()
...
@@ -118,7 +118,7 @@ void UBPreferencesController::wire()
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
(
swap
Screens
(
bool
)));
connect
(
mPreferencesUI
->
swapControlAndDisplayScreensCheckBox
,
SIGNAL
(
clicked
(
bool
)),
UBApplication
::
applicationController
->
displayManager
(),
SLOT
(
reinit
Screens
(
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
)));
...
...
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