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
ab0658ee
Commit
ab0658ee
authored
Jun 20, 2011
by
Cédric Luthi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt keyboard palette using widget attribute WA_MacNonActivatingToolWindow
Only have one instance of the virtual keyboard palette.
parent
e90d2d33
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
39 deletions
+7
-39
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+1
-1
UBDesktopAnnotationController.cpp
src/desktop/UBDesktopAnnotationController.cpp
+0
-30
UBDesktopAnnotationController.h
src/desktop/UBDesktopAnnotationController.h
+0
-2
UBFloatingPalette.cpp
src/gui/UBFloatingPalette.cpp
+4
-2
UBFloatingPalette.h
src/gui/UBFloatingPalette.h
+1
-1
UBKeyboardPalette.cpp
src/gui/UBKeyboardPalette.cpp
+1
-3
No files found.
src/board/UBBoardPaletteManager.cpp
View file @
ab0658ee
...
@@ -123,7 +123,7 @@ void UBBoardPaletteManager::setupPalettes()
...
@@ -123,7 +123,7 @@ void UBBoardPaletteManager::setupPalettes()
mStylusPalette
->
show
();
// always show stylus palette at startup
mStylusPalette
->
show
();
// always show stylus palette at startup
if
(
UBPlatformUtils
::
hasVirtualKeyboard
())
if
(
UBPlatformUtils
::
hasVirtualKeyboard
())
mKeyboardPalette
=
UBKeyboardPalette
::
create
(
mContainer
);
mKeyboardPalette
=
UBKeyboardPalette
::
create
(
0
);
mZoomPalette
=
new
UBZoomPalette
(
mContainer
);
mZoomPalette
=
new
UBZoomPalette
(
mContainer
);
...
...
src/desktop/UBDesktopAnnotationController.cpp
View file @
ab0658ee
...
@@ -45,7 +45,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
...
@@ -45,7 +45,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
,
mDesktopPenPalette
(
NULL
)
,
mDesktopPenPalette
(
NULL
)
,
mDesktopMarkerPalette
(
NULL
)
,
mDesktopMarkerPalette
(
NULL
)
,
mDesktopEraserPalette
(
NULL
)
,
mDesktopEraserPalette
(
NULL
)
,
mKeyboardPalette
(
NULL
)
,
mLibPalette
(
NULL
)
,
mLibPalette
(
NULL
)
,
mWindowPositionInitialized
(
0
)
,
mWindowPositionInitialized
(
0
)
,
mIsFullyTransparent
(
false
)
,
mIsFullyTransparent
(
false
)
...
@@ -81,8 +80,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
...
@@ -81,8 +80,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mDesktopPalette
=
new
UBDesktopPalette
(
mTransparentDrawingView
);
mDesktopPalette
=
new
UBDesktopPalette
(
mTransparentDrawingView
);
connect
(
mDesktopPalette
,
SIGNAL
(
uniboardClick
()),
this
,
SLOT
(
goToUniboard
()));
connect
(
mDesktopPalette
,
SIGNAL
(
uniboardClick
()),
this
,
SLOT
(
goToUniboard
()));
//connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(showKeyboard(bool)));
connect
(
mDesktopPalette
,
SIGNAL
(
showVirtualKeyboard
(
bool
)),
this
,
SLOT
(
showKeyboard
(
bool
)));
connect
(
mDesktopPalette
,
SIGNAL
(
customClick
()),
this
,
SLOT
(
customCapture
()));
connect
(
mDesktopPalette
,
SIGNAL
(
customClick
()),
this
,
SLOT
(
customCapture
()));
connect
(
mDesktopPalette
,
SIGNAL
(
windowClick
()),
this
,
SLOT
(
windowCapture
()));
connect
(
mDesktopPalette
,
SIGNAL
(
windowClick
()),
this
,
SLOT
(
windowCapture
()));
connect
(
mDesktopPalette
,
SIGNAL
(
screenClick
()),
this
,
SLOT
(
screenCapture
()));
connect
(
mDesktopPalette
,
SIGNAL
(
screenClick
()),
this
,
SLOT
(
screenCapture
()));
...
@@ -104,19 +101,12 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
...
@@ -104,19 +101,12 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mDesktopMarkerPalette
=
new
UBDesktopMarkerPalette
(
mTransparentDrawingView
);
mDesktopMarkerPalette
=
new
UBDesktopMarkerPalette
(
mTransparentDrawingView
);
mDesktopEraserPalette
=
new
UBDesktopEraserPalette
(
mTransparentDrawingView
);
mDesktopEraserPalette
=
new
UBDesktopEraserPalette
(
mTransparentDrawingView
);
if
(
UBPlatformUtils
::
hasVirtualKeyboard
())
{
mKeyboardPalette
=
UBKeyboardPalette
::
create
(
mTransparentDrawingView
);
connect
(
mKeyboardPalette
,
SIGNAL
(
keyboardActivated
(
bool
)),
mTransparentDrawingView
,
SLOT
(
virtualKeyboardActivated
(
bool
)));
}
mDesktopPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopToolsPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopToolsPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopPenPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopPenPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopMarkerPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopMarkerPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopEraserPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopEraserPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
if
(
mKeyboardPalette
)
mKeyboardPalette
->
setBackgroundBrush
(
UBSettings
::
settings
()
->
opaquePaletteColor
);
mDesktopToolsPalette
->
setVisible
(
UBApplication
::
mainWindow
->
actionDesktopTools
->
isChecked
());
mDesktopToolsPalette
->
setVisible
(
UBApplication
::
mainWindow
->
actionDesktopTools
->
isChecked
());
...
@@ -129,7 +119,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
...
@@ -129,7 +119,6 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent)
mDesktopPenPalette
->
setVisible
(
false
);
mDesktopPenPalette
->
setVisible
(
false
);
mDesktopMarkerPalette
->
setVisible
(
false
);
mDesktopMarkerPalette
->
setVisible
(
false
);
mDesktopEraserPalette
->
setVisible
(
false
);
mDesktopEraserPalette
->
setVisible
(
false
);
if
(
mKeyboardPalette
)
mKeyboardPalette
->
setVisible
(
false
);
connect
(
UBApplication
::
mainWindow
->
actionDesktopTools
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
desktopToolsActionToogled
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionDesktopTools
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
desktopToolsActionToogled
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionEraseDesktopAnnotations
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
eraseDesktopAnnotations
()));
connect
(
UBApplication
::
mainWindow
->
actionEraseDesktopAnnotations
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
eraseDesktopAnnotations
()));
...
@@ -161,11 +150,6 @@ UBDesktopAnnotationController::~UBDesktopAnnotationController()
...
@@ -161,11 +150,6 @@ UBDesktopAnnotationController::~UBDesktopAnnotationController()
delete
mDesktopEraserPalette
;
delete
mDesktopEraserPalette
;
mDesktopEraserPalette
=
NULL
;
mDesktopEraserPalette
=
NULL
;
}
}
if
(
NULL
!=
mKeyboardPalette
)
{
delete
mKeyboardPalette
;
mKeyboardPalette
=
NULL
;
}
if
(
NULL
!=
mLibPalette
)
if
(
NULL
!=
mLibPalette
)
{
{
delete
mLibPalette
;
delete
mLibPalette
;
...
@@ -309,11 +293,6 @@ void UBDesktopAnnotationController::showWindow()
...
@@ -309,11 +293,6 @@ void UBDesktopAnnotationController::showWindow()
//mDesktopPalette->move((desktopRect.right() - (mDesktopPalette->width() + 20)), desktopRect.top() + 150);
//mDesktopPalette->move((desktopRect.right() - (mDesktopPalette->width() + 20)), desktopRect.top() + 150);
mDesktopPalette
->
move
(
5
,
desktopRect
.
top
()
+
150
);
mDesktopPalette
->
move
(
5
,
desktopRect
.
top
()
+
150
);
mKeyboardPalette
->
move
(
desktopRect
.
left
()
+
(
desktopRect
.
width
()
-
mKeyboardPalette
->
width
())
/
2
,
desktopRect
.
top
()
+
desktopRect
.
height
()
-
mKeyboardPalette
->
height
());
mKeyboardPalette
->
adjustSizeAndPosition
();
mWindowPositionInitialized
=
true
;
mWindowPositionInitialized
=
true
;
}
}
...
@@ -389,15 +368,6 @@ void UBDesktopAnnotationController::goToUniboard()
...
@@ -389,15 +368,6 @@ void UBDesktopAnnotationController::goToUniboard()
}
}
void
UBDesktopAnnotationController
::
showKeyboard
(
bool
v
)
{
if
(
mKeyboardPalette
!=
NULL
)
{
mKeyboardPalette
->
setVisible
(
v
);
}
}
void
UBDesktopAnnotationController
::
customCapture
()
void
UBDesktopAnnotationController
::
customCapture
()
{
{
mIsFullyTransparent
=
true
;
mIsFullyTransparent
=
true
;
...
...
src/desktop/UBDesktopAnnotationController.h
View file @
ab0658ee
...
@@ -52,7 +52,6 @@ class UBDesktopAnnotationController : public QObject
...
@@ -52,7 +52,6 @@ class UBDesktopAnnotationController : public QObject
void
screenLayoutChanged
();
void
screenLayoutChanged
();
void
goToUniboard
();
void
goToUniboard
();
void
showKeyboard
(
bool
v
);
void
customCapture
();
void
customCapture
();
void
windowCapture
();
void
windowCapture
();
void
screenCapture
();
void
screenCapture
();
...
@@ -103,7 +102,6 @@ class UBDesktopAnnotationController : public QObject
...
@@ -103,7 +102,6 @@ class UBDesktopAnnotationController : public QObject
UBDesktopPenPalette
*
mDesktopPenPalette
;
UBDesktopPenPalette
*
mDesktopPenPalette
;
UBDesktopMarkerPalette
*
mDesktopMarkerPalette
;
UBDesktopMarkerPalette
*
mDesktopMarkerPalette
;
UBDesktopEraserPalette
*
mDesktopEraserPalette
;
UBDesktopEraserPalette
*
mDesktopEraserPalette
;
UBKeyboardPalette
*
mKeyboardPalette
;
UBLibPalette
*
mLibPalette
;
UBLibPalette
*
mLibPalette
;
...
...
src/gui/UBFloatingPalette.cpp
View file @
ab0658ee
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
UBFloatingPalette
::
UBFloatingPalette
(
Qt
::
Corner
position
,
QWidget
*
parent
)
UBFloatingPalette
::
UBFloatingPalette
(
Qt
::
Corner
position
,
QWidget
*
parent
)
:
QWidget
(
parent
,
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
X11BypassWindowManagerHint
)
:
QWidget
(
parent
,
parent
?
Qt
::
Widget
:
Qt
::
Tool
|
(
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
X11BypassWindowManagerHint
)
)
,
mIsMoving
(
false
)
,
mIsMoving
(
false
)
,
mCustomPosition
(
false
)
,
mCustomPosition
(
false
)
,
mCanBeMinimized
(
false
)
,
mCanBeMinimized
(
false
)
...
@@ -27,7 +27,9 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
...
@@ -27,7 +27,9 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
{
{
// standalone window
// standalone window
setAttribute
(
Qt
::
WA_TranslucentBackground
);
setAttribute
(
Qt
::
WA_TranslucentBackground
);
UBPlatformUtils
::
disableShadow
(
this
);
setAttribute
(
Qt
::
WA_MacAlwaysShowToolWindow
);
setAttribute
(
Qt
::
WA_MacNonActivatingToolWindow
);
setAttribute
(
Qt
::
WA_MacNoShadow
);
}
}
mBackgroundBrush
=
QBrush
(
UBSettings
::
paletteColor
);
mBackgroundBrush
=
QBrush
(
UBSettings
::
paletteColor
);
...
...
src/gui/UBFloatingPalette.h
View file @
ab0658ee
...
@@ -59,6 +59,7 @@ class UBFloatingPalette : public QWidget
...
@@ -59,6 +59,7 @@ class UBFloatingPalette : public QWidget
static
const
int
sLayoutSpacing
=
15
;
static
const
int
sLayoutSpacing
=
15
;
void
moveInsideParent
(
const
QPoint
&
position
);
void
moveInsideParent
(
const
QPoint
&
position
);
bool
mCustomPosition
;
bool
mCustomPosition
;
bool
mIsMoving
;
private
:
private
:
void
removeAllAssociatedPalette
();
void
removeAllAssociatedPalette
();
...
@@ -66,7 +67,6 @@ class UBFloatingPalette : public QWidget
...
@@ -66,7 +67,6 @@ class UBFloatingPalette : public QWidget
QList
<
UBFloatingPalette
*>
mAssociatedPalette
;
QList
<
UBFloatingPalette
*>
mAssociatedPalette
;
QPoint
mDragPosition
;
QPoint
mDragPosition
;
bool
mIsMoving
;
bool
mCanBeMinimized
;
bool
mCanBeMinimized
;
eMinimizedLocation
mMinimizedLocation
;
eMinimizedLocation
mMinimizedLocation
;
Qt
::
Corner
mDefaultPosition
;
Qt
::
Corner
mDefaultPosition
;
...
...
src/gui/UBKeyboardPalette.cpp
View file @
ab0658ee
...
@@ -195,9 +195,7 @@ void UBKeyboardPalette::enterEvent ( QEvent * )
...
@@ -195,9 +195,7 @@ void UBKeyboardPalette::enterEvent ( QEvent * )
void
UBKeyboardPalette
::
leaveEvent
(
QEvent
*
)
void
UBKeyboardPalette
::
leaveEvent
(
QEvent
*
)
{
{
if
(
languagePopupActive
)
if
(
languagePopupActive
||
!
keyboardActive
||
mIsMoving
)
return
;
if
(
!
keyboardActive
)
return
;
return
;
keyboardActive
=
false
;
keyboardActive
=
false
;
...
...
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