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
383fd02a
Commit
383fd02a
authored
Jun 30, 2011
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some cleaning (code and warning)
parent
5e1e41a1
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
269 additions
and
274 deletions
+269
-274
UBDocumentPublisher.h
src/adaptors/publishing/UBDocumentPublisher.h
+2
-3
UBDrawingController.cpp
src/board/UBDrawingController.cpp
+3
-2
UBDrawingController.h
src/board/UBDrawingController.h
+1
-1
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+2
-1
UBApplicationController.h
src/core/UBApplicationController.h
+1
-2
UBSceneCache.h
src/core/UBSceneCache.h
+1
-1
UBPlatformUtils_linux.cpp
src/frameworks/UBPlatformUtils_linux.cpp
+5
-0
UBFloatingPalette.cpp
src/gui/UBFloatingPalette.cpp
+2
-2
UBFloatingPalette.h
src/gui/UBFloatingPalette.h
+3
-3
UBKeyboardPalette.cpp
src/gui/UBKeyboardPalette.cpp
+247
-247
UBKeyboardPalette_linux.cpp
src/gui/UBKeyboardPalette_linux.cpp
+1
-1
UBLibNavigatorWidget.cpp
src/gui/UBLibNavigatorWidget.cpp
+1
-11
No files found.
src/adaptors/publishing/UBDocumentPublisher.h
View file @
383fd02a
...
@@ -42,6 +42,8 @@ private slots:
...
@@ -42,6 +42,8 @@ private slots:
private
:
private
:
UBDocumentProxy
*
mSourceDocument
;
UBDocumentProxy
*
mPublishingDocument
;
void
init
();
void
init
();
void
sendUbw
();
void
sendUbw
();
QString
getBase64Of
(
QString
stringToEncode
);
QString
getBase64Of
(
QString
stringToEncode
);
...
@@ -58,8 +60,5 @@ private:
...
@@ -58,8 +60,5 @@ private:
void
buildUbwFile
();
void
buildUbwFile
();
QString
mTmpZipFile
;
QString
mTmpZipFile
;
UBDocumentProxy
*
mSourceDocument
;
UBDocumentProxy
*
mPublishingDocument
;
};
};
#endif // UBDOCUMENTPUBLISHER_H
#endif // UBDOCUMENTPUBLISHER_H
src/board/UBDrawingController.cpp
View file @
383fd02a
...
@@ -27,9 +27,10 @@ UBDrawingController* UBDrawingController::drawingController()
...
@@ -27,9 +27,10 @@ UBDrawingController* UBDrawingController::drawingController()
UBDrawingController
::
UBDrawingController
(
QObject
*
parent
)
UBDrawingController
::
UBDrawingController
(
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
,
mActiveRuler
(
NULL
)
,
mStylusTool
((
UBStylusTool
::
Enum
)
-
1
)
,
mStylusTool
((
UBStylusTool
::
Enum
)
-
1
)
,
mLatestDrawingTool
((
UBStylusTool
::
Enum
)
-
1
)
,
mLatestDrawingTool
((
UBStylusTool
::
Enum
)
-
1
)
,
mActiveRuler
(
NULL
)
{
{
connect
(
UBSettings
::
settings
(),
SIGNAL
(
colorContextChanged
()),
this
,
SIGNAL
(
colorPaletteChanged
()));
connect
(
UBSettings
::
settings
(),
SIGNAL
(
colorContextChanged
()),
this
,
SIGNAL
(
colorPaletteChanged
()));
...
...
src/board/UBDrawingController.h
View file @
383fd02a
src/core/UBApplicationController.cpp
View file @
383fd02a
...
@@ -50,12 +50,13 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, UBBo
...
@@ -50,12 +50,13 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, UBBo
,
mControlView
(
pControlView
)
,
mControlView
(
pControlView
)
,
mDisplayView
(
pDisplayView
)
,
mDisplayView
(
pDisplayView
)
,
mMirror
(
0
)
,
mMirror
(
0
)
,
mFtp
(
0
)
,
mMainMode
(
Board
)
,
mMainMode
(
Board
)
,
mDisplayManager
(
0
)
,
mDisplayManager
(
0
)
,
mAutomaticCheckForUpdates
(
false
)
,
mAutomaticCheckForUpdates
(
false
)
,
mCheckingForUpdates
(
false
)
,
mCheckingForUpdates
(
false
)
,
mIsShowingDesktop
(
false
)
,
mIsShowingDesktop
(
false
)
,
mFtp
(
0
)
{
{
mDisplayManager
=
new
UBDisplayManager
(
this
);
mDisplayManager
=
new
UBDisplayManager
(
this
);
...
...
src/core/UBApplicationController.h
View file @
383fd02a
...
@@ -24,8 +24,7 @@ class UBApplicationController : public QObject
...
@@ -24,8 +24,7 @@ class UBApplicationController : public QObject
public
:
public
:
UBApplicationController
(
UBBoardView
*
pControlView
,
UBBoardView
*
pDisplayView
,
UBApplicationController
(
UBBoardView
*
pControlView
,
UBBoardView
*
pDisplayView
,
UBMainWindow
*
pMainWindow
,
QObject
*
parent
=
0
);
UBMainWindow
*
pMainWindow
,
QObject
*
parent
=
0
);
virtual
~
UBApplicationController
();
virtual
~
UBApplicationController
();
int
initialHScroll
()
{
return
mInitialHScroll
;
}
int
initialHScroll
()
{
return
mInitialHScroll
;
}
...
...
src/core/UBSceneCache.h
View file @
383fd02a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
class
UBDocumentProxy
;
class
UBDocumentProxy
;
class
UBGraphicsScene
;
class
UBGraphicsScene
;
class
UBGraphicsScene
::
SceneViewState
;
class
UBGraphicsScene
;
class
UBSceneCacheID
class
UBSceneCacheID
{
{
...
...
src/frameworks/UBPlatformUtils_linux.cpp
View file @
383fd02a
...
@@ -56,6 +56,8 @@ QString UBPlatformUtils::preferredLanguage()
...
@@ -56,6 +56,8 @@ QString UBPlatformUtils::preferredLanguage()
void
UBPlatformUtils
::
runInstaller
(
const
QString
&
installerFilePath
)
void
UBPlatformUtils
::
runInstaller
(
const
QString
&
installerFilePath
)
{
{
// TODO UB 4.x - auto update & installer are deactivated on Linux
// TODO UB 4.x - auto update & installer are deactivated on Linux
Q_UNUSED
(
installerFilePath
);
}
}
void
UBPlatformUtils
::
bringPreviousProcessToFront
()
void
UBPlatformUtils
::
bringPreviousProcessToFront
()
...
@@ -77,6 +79,8 @@ QString UBPlatformUtils::computerName()
...
@@ -77,6 +79,8 @@ QString UBPlatformUtils::computerName()
void
UBPlatformUtils
::
setWindowNonActivableFlag
(
QWidget
*
widget
,
bool
nonAcivable
)
void
UBPlatformUtils
::
setWindowNonActivableFlag
(
QWidget
*
widget
,
bool
nonAcivable
)
{
{
Q_UNUSED
(
widget
);
Q_UNUSED
(
nonAcivable
);
}
}
...
@@ -84,6 +88,7 @@ void UBPlatformUtils::setWindowNonActivableFlag(QWidget* widget, bool nonAcivabl
...
@@ -84,6 +88,7 @@ void UBPlatformUtils::setWindowNonActivableFlag(QWidget* widget, bool nonAcivabl
void
UBPlatformUtils
::
setDesktopMode
(
bool
desktop
)
void
UBPlatformUtils
::
setDesktopMode
(
bool
desktop
)
{
{
// NOOP
// NOOP
Q_UNUSED
(
desktop
);
}
}
const
KEYBT
ENGLISH_LOCALE
[]
=
{
const
KEYBT
ENGLISH_LOCALE
[]
=
{
...
...
src/gui/UBFloatingPalette.cpp
View file @
383fd02a
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
UBFloatingPalette
::
UBFloatingPalette
(
Qt
::
Corner
position
,
QWidget
*
parent
)
UBFloatingPalette
::
UBFloatingPalette
(
Qt
::
Corner
position
,
QWidget
*
parent
)
:
QWidget
(
parent
,
parent
?
Qt
::
Widget
:
Qt
::
Tool
|
(
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
X11BypassWindowManagerHint
))
:
QWidget
(
parent
,
parent
?
Qt
::
Widget
:
Qt
::
Tool
|
(
Qt
::
FramelessWindowHint
|
Qt
::
WindowStaysOnTopHint
|
Qt
::
X11BypassWindowManagerHint
))
,
mIsMoving
(
false
)
,
mCustomPosition
(
false
)
,
mCustomPosition
(
false
)
,
mIsMoving
(
false
)
,
mCanBeMinimized
(
false
)
,
mCanBeMinimized
(
false
)
,
mMinimizedLocation
(
eMinimizedLocation_None
)
,
mMinimizedLocation
(
eMinimizedLocation_None
)
,
mDefaultPosition
(
position
)
,
mDefaultPosition
(
position
)
...
...
src/gui/UBFloatingPalette.h
View file @
383fd02a
src/gui/UBKeyboardPalette.cpp
View file @
383fd02a
...
@@ -32,7 +32,7 @@ UBKeyboardPalette::UBKeyboardPalette(QWidget *parent)
...
@@ -32,7 +32,7 @@ UBKeyboardPalette::UBKeyboardPalette(QWidget *parent)
btnWidth
=
btnHeight
=
16
;
btnWidth
=
btnHeight
=
16
;
buttons
=
new
UBKeyButton
*
[
47
];
buttons
=
new
UBKeyButton
*
[
47
];
for
(
int
i
=
0
;
i
<
47
;
i
++
)
for
(
int
i
=
0
;
i
<
47
;
i
++
)
{
{
buttons
[
i
]
=
new
UBKeyButton
(
this
);
buttons
[
i
]
=
new
UBKeyButton
(
this
);
}
}
...
@@ -102,7 +102,7 @@ void UBKeyboardPalette::setInput(const UBKeyboardLocale* locale)
...
@@ -102,7 +102,7 @@ void UBKeyboardPalette::setInput(const UBKeyboardLocale* locale)
{
{
if
(
locale
!=
NULL
)
if
(
locale
!=
NULL
)
{
{
for
(
int
i
=
0
;
i
<
47
;
i
++
)
for
(
int
i
=
0
;
i
<
47
;
i
++
)
buttons
[
i
]
->
setKeyBt
((
*
locale
)[
i
]);
buttons
[
i
]
->
setKeyBt
((
*
locale
)[
i
]);
}
}
else
else
...
@@ -113,17 +113,17 @@ void UBKeyboardPalette::setInput(const UBKeyboardLocale* locale)
...
@@ -113,17 +113,17 @@ void UBKeyboardPalette::setInput(const UBKeyboardLocale* locale)
UBKeyboardPalette
::~
UBKeyboardPalette
()
UBKeyboardPalette
::~
UBKeyboardPalette
()
{
{
for
(
int
i
=
0
;
i
<
47
;
i
++
)
for
(
int
i
=
0
;
i
<
47
;
i
++
)
delete
buttons
[
i
];
delete
buttons
[
i
];
delete
[]
buttons
;
delete
[]
buttons
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
for
(
int
i
=
0
;
i
<
8
;
i
++
)
delete
ctrlButtons
[
i
];
delete
ctrlButtons
[
i
];
delete
[]
ctrlButtons
;
delete
[]
ctrlButtons
;
if
(
locales
!=
NULL
)
if
(
locales
!=
NULL
)
{
{
for
(
int
i
=
0
;
i
<
nLocalesCount
;
i
++
)
for
(
int
i
=
0
;
i
<
nLocalesCount
;
i
++
)
delete
locales
[
i
];
delete
locales
[
i
];
delete
[]
locales
;
delete
[]
locales
;
}
}
...
@@ -247,7 +247,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
...
@@ -247,7 +247,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
ltop
=
(
r
.
height
()
-
(
bth
*
5
+
4
))
/
2
;
ltop
=
(
r
.
height
()
-
(
bth
*
5
+
4
))
/
2
;
int
off
=
lleft
;;
int
off
=
lleft
;;
for
(
int
i
=
0
;
i
<
13
;
i
++
)
for
(
int
i
=
0
;
i
<
13
;
i
++
)
{
{
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
buttons
[
i
]
->
setGeometry
(
cr
);
buttons
[
i
]
->
setGeometry
(
cr
);
...
@@ -262,7 +262,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
...
@@ -262,7 +262,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
off
=
(
r
.
width
()
-
lwidth
)
/
2
;
off
=
(
r
.
width
()
-
lwidth
)
/
2
;
ctrlButtons
[
1
]
->
setGeometry
(
off
,
ltop
,
btw
*
1.3
,
bth
);
ctrlButtons
[
1
]
->
setGeometry
(
off
,
ltop
,
btw
*
1.3
,
bth
);
off
+=
btw
*
1.3
+
1
;
off
+=
btw
*
1.3
+
1
;
for
(
int
i
=
0
;
i
<
12
;
i
++
)
for
(
int
i
=
0
;
i
<
12
;
i
++
)
{
{
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
buttons
[
13
+
i
]
->
setGeometry
(
cr
);
buttons
[
13
+
i
]
->
setGeometry
(
cr
);
...
@@ -272,7 +272,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
...
@@ -272,7 +272,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
ltop
+=
bth
+
1
;
ltop
+=
bth
+
1
;
lwidth
=
12
*
btw
+
12
+
btw
*
2
;
lwidth
=
12
*
btw
+
12
+
btw
*
2
;
off
=
(
r
.
width
()
-
lwidth
)
/
2
;
off
=
(
r
.
width
()
-
lwidth
)
/
2
;
for
(
int
i
=
0
;
i
<
12
;
i
++
)
for
(
int
i
=
0
;
i
<
12
;
i
++
)
{
{
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
buttons
[
13
+
12
+
i
]
->
setGeometry
(
cr
);
buttons
[
13
+
12
+
i
]
->
setGeometry
(
cr
);
...
@@ -285,7 +285,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
...
@@ -285,7 +285,7 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
off
=
(
r
.
width
()
-
lwidth
)
/
2
;
off
=
(
r
.
width
()
-
lwidth
)
/
2
;
ctrlButtons
[
3
]
->
setGeometry
(
off
,
ltop
,
btw
,
bth
);
ctrlButtons
[
3
]
->
setGeometry
(
off
,
ltop
,
btw
,
bth
);
off
+=
btw
+
1
;
off
+=
btw
+
1
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
{
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
QRect
cr
(
off
,
ltop
,
btw
,
bth
);
buttons
[
13
+
12
+
12
+
i
]
->
setGeometry
(
cr
);
buttons
[
13
+
12
+
12
+
i
]
->
setGeometry
(
cr
);
...
@@ -309,9 +309,9 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
...
@@ -309,9 +309,9 @@ void UBKeyboardPalette::paintEvent( QPaintEvent* event)
UBKeyboardButton
::
UBKeyboardButton
(
UBKeyboardPalette
*
parent
)
UBKeyboardButton
::
UBKeyboardButton
(
UBKeyboardPalette
*
parent
)
:
QWidget
(
parent
),
:
QWidget
(
parent
),
keyboard
(
parent
),
bFocused
(
false
),
bFocused
(
false
),
bPressed
(
false
),
bPressed
(
false
)
keyboard
(
parent
)
{
{
setCursor
(
Qt
::
PointingHandCursor
);
setCursor
(
Qt
::
PointingHandCursor
);
}
}
...
@@ -361,8 +361,8 @@ void UBKeyboardButton::mouseReleaseEvent ( QMouseEvent * )
...
@@ -361,8 +361,8 @@ void UBKeyboardButton::mouseReleaseEvent ( QMouseEvent * )
}
}
UBKeyButton
::
UBKeyButton
(
UBKeyboardPalette
*
parent
)
UBKeyButton
::
UBKeyButton
(
UBKeyboardPalette
*
parent
)
:
UBKeyboardButton
(
parent
),
:
UBKeyboardButton
(
parent
),
keybt
(
0
)
keybt
(
0
)
{}
{}
UBKeyButton
::~
UBKeyButton
()
UBKeyButton
::~
UBKeyButton
()
...
@@ -390,9 +390,9 @@ void UBKeyButton::paintContent(QPainter& painter)
...
@@ -390,9 +390,9 @@ void UBKeyButton::paintContent(QPainter& painter)
UBCntrlButton
::
UBCntrlButton
(
UBKeyboardPalette
*
parent
,
const
QString
&
_label
,
int
_code
)
UBCntrlButton
::
UBCntrlButton
(
UBKeyboardPalette
*
parent
,
const
QString
&
_label
,
int
_code
)
:
UBKeyboardButton
(
parent
),
:
UBKeyboardButton
(
parent
),
label
(
_label
),
label
(
_label
),
code
(
_code
)
code
(
_code
)
{}
{}
UBCntrlButton
::~
UBCntrlButton
()
UBCntrlButton
::~
UBCntrlButton
()
...
@@ -412,7 +412,7 @@ void UBCntrlButton::paintContent(QPainter& painter)
...
@@ -412,7 +412,7 @@ void UBCntrlButton::paintContent(QPainter& painter)
}
}
UBCapsLockButton
::
UBCapsLockButton
(
UBKeyboardPalette
*
parent
)
UBCapsLockButton
::
UBCapsLockButton
(
UBKeyboardPalette
*
parent
)
:
UBKeyboardButton
(
parent
)
:
UBKeyboardButton
(
parent
)
{}
{}
UBCapsLockButton
::~
UBCapsLockButton
()
UBCapsLockButton
::~
UBCapsLockButton
()
...
@@ -434,11 +434,11 @@ void UBCapsLockButton::paintContent(QPainter& painter)
...
@@ -434,11 +434,11 @@ void UBCapsLockButton::paintContent(QPainter& painter)
UBLocaleButton
::
UBLocaleButton
(
UBKeyboardPalette
*
parent
)
UBLocaleButton
::
UBLocaleButton
(
UBKeyboardPalette
*
parent
)
:
UBKeyboardButton
(
parent
)
:
UBKeyboardButton
(
parent
)
{
{
localeMenu
=
new
QMenu
(
this
);
localeMenu
=
new
QMenu
(
this
);
for
(
int
i
=
0
;
i
<
parent
->
nLocalesCount
;
i
++
)
for
(
int
i
=
0
;
i
<
parent
->
nLocalesCount
;
i
++
)
{
{
QAction
*
action
=
(
parent
->
locales
[
i
]
->
icon
!=
NULL
)
?
QAction
*
action
=
(
parent
->
locales
[
i
]
->
icon
!=
NULL
)
?
localeMenu
->
addAction
(
*
parent
->
locales
[
i
]
->
icon
,
parent
->
locales
[
i
]
->
fullName
)
localeMenu
->
addAction
(
*
parent
->
locales
[
i
]
->
icon
,
parent
->
locales
[
i
]
->
fullName
)
...
...
src/gui/UBKeyboardPalette_linux.cpp
View file @
383fd02a
...
@@ -41,7 +41,7 @@ void x11SendKey(Display *display, int keyCode, int modifiers)
...
@@ -41,7 +41,7 @@ void x11SendKey(Display *display, int keyCode, int modifiers)
// Get the root window for the current display.
// Get the root window for the current display.
Window
winRoot
=
XDefaultRootWindow
(
display
);
Window
winRoot
=
XDefaultRootWindow
(
display
);
if
(
winRoot
==
NULL
)
if
(
winRoot
==
0
)
return
;
return
;
// Find the window which has the current keyboard focus.
// Find the window which has the current keyboard focus.
...
...
src/gui/UBLibNavigatorWidget.cpp
View file @
383fd02a
...
@@ -69,16 +69,6 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW
...
@@ -69,16 +69,6 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW
*/
*/
UBLibNavigatorWidget
::~
UBLibNavigatorWidget
()
UBLibNavigatorWidget
::~
UBLibNavigatorWidget
()
{
{
//if(NULL != mLayout)
//{
// delete mLayout;
// mLayout = NULL;
//}
//if(NULL != mLibWidget)
//{
// delete mLibWidget;
// mLibWidget = NULL;
//}
if
(
NULL
!=
mPathViewer
)
if
(
NULL
!=
mPathViewer
)
{
{
delete
mPathViewer
;
delete
mPathViewer
;
...
@@ -99,7 +89,7 @@ UBLibNavigatorWidget::~UBLibNavigatorWidget()
...
@@ -99,7 +89,7 @@ UBLibNavigatorWidget::~UBLibNavigatorWidget()
void
UBLibNavigatorWidget
::
dropMe
(
const
QMimeData
*
_data
)
void
UBLibNavigatorWidget
::
dropMe
(
const
QMimeData
*
_data
)
{
{
// Forward the mime data to the library widget
// Forward the mime data to the library widget
Q_UNUSED
(
_data
);
}
}
/**
/**
...
...
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