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
b1124a66
Commit
b1124a66
authored
Nov 17, 2015
by
agriche
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://github.com/DIP-SEM/OpenBoard
into dev
parents
056086fa
b219655a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
92 additions
and
98 deletions
+92
-98
OpenBoard.pro
OpenBoard.pro
+18
-16
UBThumbnailAdaptor.cpp
src/adaptors/UBThumbnailAdaptor.cpp
+1
-1
UBBoardView.cpp
src/board/UBBoardView.cpp
+1
-2
UBApplication.cpp
src/core/UBApplication.cpp
+3
-37
UBApplication.h
src/core/UBApplication.h
+5
-4
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+0
-3
core.pri
src/core/core.pri
+0
-2
UBWindowCapture_mac.mm
src/desktop/UBWindowCapture_mac.mm
+2
-1
UBPlatformUtils.h
src/frameworks/UBPlatformUtils.h
+1
-0
UBPlatformUtils_linux.cpp
src/frameworks/UBPlatformUtils_linux.cpp
+5
-0
UBPlatformUtils_mac.mm
src/frameworks/UBPlatformUtils_mac.mm
+25
-6
UBPlatformUtils_win.cpp
src/frameworks/UBPlatformUtils_win.cpp
+4
-0
UBFloatingPalette.cpp
src/gui/UBFloatingPalette.cpp
+1
-1
UBKeyboardPalette_mac.mm
src/gui/UBKeyboardPalette_mac.mm
+5
-1
UBMagnifer.cpp
src/gui/UBMagnifer.cpp
+1
-1
UBRubberBand.cpp
src/gui/UBRubberBand.cpp
+3
-7
gui.pri
src/gui/gui.pri
+2
-1
UBPodcastController.cpp
src/podcast/UBPodcastController.cpp
+7
-7
podcast.pri
src/podcast/podcast.pri
+8
-8
No files found.
OpenBoard.pro
View file @
b1124a66
...
...
@@ -128,32 +128,34 @@ win32 {
macx {
LIBS += -framework Foundation
LIBS += -framework Cocoa
LIBS += -framework Carbon
LIBS += -lcrypto
CONFIG(release, debug|release):CONFIG += x86
CONFIG(release, debug|release):CONFIG += x86_64
CONFIG(debug, debug|release):CONFIG += x86_64
# [03-02-2011] We must use the 32bit version for the moment
# because the Quicktime components used by this application
# are not yet available in 64bits.
CONFIG(debug, debug|release):CONFIG += x86
# TODO Craig: switch to 64bit
QMAKE_MAC_SDK =
"/Developer/SDKs/MacOSX10.6.sdk"
QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.
5
"
QMAKE_MAC_SDK =
macosx
QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.
10
"
VERSION_RC_PATH = "$$BUILD_DIR/version_rc"
QMAKE_CXXFLAGS += -Wno-overloaded-virtual
#VERSION_RC_PATH = "$$BUILD_DIR/version_rc"
# No references to breakpad in the code =>is this still used?
# Embed version into executable for breakpad
QMAKE_LFLAGS += -sectcreate \
__DATA \
__version \
$$VERSION_RC_PATH
#
QMAKE_LFLAGS += -sectcreate \
#
__DATA \
#
__version \
#
$$VERSION_RC_PATH
QMAKE_CXXFLAGS_RELEASE += -gdwarf-2 \
-mdynamic-no-pic
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
QMAKE_LFLAGS += -fopenmp
#
QMAKE_CFLAGS += -fopenmp
#
QMAKE_CXXFLAGS += -fopenmp
#
QMAKE_LFLAGS += -fopenmp
CONTENTS_DIR = "Contents"
RESOURCES_DIR = "Contents/Resources"
...
...
@@ -364,7 +366,7 @@ macx {
system(mkdir -p $$BUILD_DIR)
system(printf \""$$OSX_VERSION"\" > $$BUILD_DIR/osx_version)
system(printf \""$$VERSION"\" > $$BUILD_DIR/version)
system(printf "%02x%02x%02x%02x" `printf $$VERSION_RC | cut -d ',' -f 1` `printf $$VERSION_RC | cut -d ',' -f 2` `printf $$VERSION_RC | cut -d ',' -f 3` `printf $$VERSION_RC | cut -d ',' -f 4` | xxd -r -p > "$$VERSION_RC_PATH")
#
system(printf "%02x%02x%02x%02x" `printf $$VERSION_RC | cut -d ',' -f 1` `printf $$VERSION_RC | cut -d ',' -f 2` `printf $$VERSION_RC | cut -d ',' -f 3` `printf $$VERSION_RC | cut -d ',' -f 4` | xxd -r -p > "$$VERSION_RC_PATH")
}
linux-g++
* {
...
...
src/adaptors/UBThumbnailAdaptor.cpp
View file @
b1124a66
...
...
@@ -98,7 +98,7 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex)
#ifdef Q_OS_LINUX
pix
->
load
(
fileName
,
0
,
Qt
::
AutoColor
);
#else
pix
->
load
(
fileName
,
0
,
Qt
::
AutoColor
,
false
);
pix
->
load
(
fileName
,
0
,
Qt
::
AutoColor
);
#endif
}
return
pix
;
...
...
src/board/UBBoardView.cpp
View file @
b1124a66
...
...
@@ -872,7 +872,6 @@ bool UBBoardView::directTabletEvent(QEvent *event)
tEvent
=
new
QTabletEvent
(
tEvent
->
type
()
,
mapFromGlobal
(
tEvent
->
pos
())
,
tEvent
->
globalPos
()
,
tEvent
->
hiResGlobalPos
()
,
tEvent
->
device
()
,
tEvent
->
pointerType
()
,
tEvent
->
pressure
()
...
...
@@ -905,7 +904,7 @@ QWidget *UBBoardView::widgetForTabletEvent(QWidget *w, const QPoint &pos)
QWidget
*
childAtPos
=
NULL
;
QList
<
QObject
*>
childs
=
w
->
child
Items
();
QList
<
QObject
*>
childs
=
w
->
child
ren
();
foreach
(
QObject
*
child
,
childs
)
{
QWidget
*
childWidget
=
qobject_cast
<
QWidget
*>
(
child
);
...
...
src/core/UBApplication.cpp
View file @
b1124a66
...
...
@@ -33,10 +33,6 @@
#include <QFontDatabase>
#include <QStyleFactory>
#if defined(Q_OS_OSX)
#include <Carbon/Carbon.h>
#endif
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
...
...
@@ -91,27 +87,6 @@ bool bIsMinimized = false;
QObject
*
UBApplication
::
staticMemoryCleaner
=
0
;
#if defined(Q_OS_OSX)
static
OSStatus
ub_appleEventProcessor
(
const
AppleEvent
*
ae
,
AppleEvent
*
event
,
long
handlerRefCon
)
{
Q_UNUSED
(
event
);
OSType
aeID
=
typeWildCard
;
OSType
aeClass
=
typeWildCard
;
AEGetAttributePtr
(
ae
,
keyEventClassAttr
,
typeType
,
0
,
&
aeClass
,
sizeof
(
aeClass
),
0
);
AEGetAttributePtr
(
ae
,
keyEventIDAttr
,
typeType
,
0
,
&
aeID
,
sizeof
(
aeID
),
0
);
if
(
aeClass
==
kCoreEventClass
&&
aeID
==
kAEReopenApplication
)
{
// User clicked on Uniboard in the Dock
((
UBApplicationController
*
)
handlerRefCon
)
->
hideDesktop
();
return
noErr
;
}
return
eventNotHandledErr
;
}
#endif
UBApplication
::
UBApplication
(
const
QString
&
id
,
int
&
argc
,
char
**
argv
)
:
QtSingleApplication
(
id
,
argc
,
argv
)
,
mPreferencesController
(
NULL
)
...
...
@@ -368,11 +343,6 @@ int UBApplication::exec(const QString& pFileToImport)
if
(
pFileToImport
.
length
()
>
0
)
UBApplication
::
applicationController
->
importFile
(
pFileToImport
);
#if defined(Q_OS_OSX)
static
AEEventHandlerUPP
ub_proc_ae_handlerUPP
=
AEEventHandlerUPP
(
ub_appleEventProcessor
);
AEInstallEventHandler
(
kCoreEventClass
,
kAEReopenApplication
,
ub_proc_ae_handlerUPP
,
SRefCon
(
UBApplication
::
applicationController
),
true
);
#endif
if
(
UBSettings
::
settings
()
->
appStartMode
->
get
().
toInt
())
applicationController
->
showDesktop
();
else
...
...
@@ -390,14 +360,14 @@ void UBApplication::onScreenCountChanged(int newCount)
mainWindow
->
actionMultiScreen
->
setEnabled
(
displayManager
.
numScreens
()
>
1
);
}
#ifdef Q_OS_OSX
void
UBApplication
::
showMinimized
()
{
#ifdef Q_OS_OSX
mainWindow
->
hide
();
bIsMinimized
=
true
;
#endif
}
#endif
void
UBApplication
::
startScript
()
{
...
...
@@ -590,11 +560,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event)
{
QFileOpenEvent
*
fileToOpenEvent
=
static_cast
<
QFileOpenEvent
*>
(
event
);
#if defined(Q_OS_OSX)
ProcessSerialNumber
psn
;
GetCurrentProcess
(
&
psn
);
SetFrontProcess
(
&
psn
);
#endif
UBPlatformUtils
::
setFrontProcess
();
applicationController
->
importFile
(
fileToOpenEvent
->
file
());
}
...
...
src/core/UBApplication.h
View file @
b1124a66
...
...
@@ -124,9 +124,9 @@ class UBApplication : public QtSingleApplication
private
slots
:
void
closing
();
#ifdef Q_OS_OSX
//#ifdef Q_OS_OSX // for some reason this is not compiled if the ifdef is uncommented
void
showMinimized
();
#endif
//
#endif
void
onScreenCountChanged
(
int
newCount
);
private
:
...
...
@@ -136,10 +136,11 @@ class UBApplication : public QtSingleApplication
bool
mIsVerbose
;
QString
checkLanguageAvailabilityForSankore
(
QString
&
language
);
protected
:
#if defined(Q_OS_
OSX
) && !defined(QT_MAC_USE_COCOA)
/*
#if defined(Q_OS_
MAC
) && !defined(QT_MAC_USE_COCOA)
bool macEventFilter(EventHandlerCallRef caller, EventRef event);
#endif
*/
UBPreferencesController
*
mPreferencesController
;
QTranslator
*
mApplicationTranslator
;
...
...
src/core/UBApplicationController.cpp
View file @
b1124a66
...
...
@@ -67,9 +67,6 @@
#include "ui_mainWindow.h"
#ifdef Q_OS_OSX
#include <Carbon/Carbon.h>
#endif
#include "core/memcheck.h"
...
...
src/core/core.pri
View file @
b1124a66
...
...
@@ -34,5 +34,3 @@ SOURCES += src/core/main.cpp \
src/core/UBOpenSankoreImporter.cpp \
src/core/UBTextTools.cpp \
src/core/UBPersistenceWorker.cpp
src/desktop/UBWindowCapture_mac.mm
View file @
b1124a66
...
...
@@ -26,9 +26,10 @@
#include "UBWindowCapture.h"
#include "UBDesktopAnnotationController.h"
#include <QDialog>
#import <Foundation/NSAutoreleasePool.h>
#import <C
arbon/Carbon
.h>
#import <C
ocoa/Cocoa
.h>
UBWindowCapture::UBWindowCapture(UBDesktopAnnotationController *parent)
...
...
src/frameworks/UBPlatformUtils.h
View file @
b1124a66
...
...
@@ -203,6 +203,7 @@ public:
static
UBKeyboardLocale
**
getKeyboardLayouts
(
int
&
nCount
);
static
QString
urlFromClipboard
();
static
QStringList
availableTranslations
();
static
void
setFrontProcess
();
#ifdef Q_OS_OSX
static
void
SetMacLocaleByIdentifier
(
const
QString
&
id
);
...
...
src/frameworks/UBPlatformUtils_linux.cpp
View file @
b1124a66
...
...
@@ -429,3 +429,8 @@ QString UBPlatformUtils::urlFromClipboard()
return
qsRet
;
}
void
UBPlatformUtils
::
setFrontProcess
()
{
}
src/frameworks/UBPlatformUtils_mac.mm
View file @
b1124a66
...
...
@@ -33,6 +33,7 @@
#include <QWidget>
#import <Foundation/NSAutoreleasePool.h>
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
#import <APELite.h>
...
...
@@ -51,7 +52,7 @@ OSStatus emptySetSystemUIMode (
return noErr;
}
void *originalSetSystemUIMode = 0;
//
void *originalSetSystemUIMode = 0;
void UBPlatformUtils::init()
{
...
...
@@ -62,7 +63,7 @@ void UBPlatformUtils::init()
// http://developer.apple.com/mac/library/documentation/Carbon/Reference/Dock_Manager/Reference/reference.html#//apple_ref/c/func/SetSystemUIMode
//
originalSetSystemUIMode = APEPatchCreate((const void *)SetSystemUIMode, (const void *)emptySetSystemUIMode);
//
originalSetSystemUIMode = APEPatchCreate((const void *)SetSystemUIMode, (const void *)emptySetSystemUIMode);
setDesktopMode(false);
...
...
@@ -92,9 +93,9 @@ void UBPlatformUtils::init()
void UBPlatformUtils::setDesktopMode(bool desktop)
{
{
/*
#ifndef OS_NEWER_THAN_OR_EQUAL_TO_1010
OSStatus (*functor)(SystemUIMode, SystemUIOptions) = (OSStatus (*)(SystemUIMode, SystemUIOptions))originalSetSystemUIMode;
//
OSStatus (*functor)(SystemUIMode, SystemUIOptions) = (OSStatus (*)(SystemUIMode, SystemUIOptions))originalSetSystemUIMode;
if (desktop)
{
...
...
@@ -105,6 +106,7 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
functor(kUIModeAllHidden, 0);
}
#endif
*/
}
...
...
@@ -533,13 +535,16 @@ void UBPlatformUtils::SetMacLocaleByIdentifier(const QString& id)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
const char * strName = id.toAscii().data();
const char * strName = id.toLatin1().data();
CFStringRef iName = CFStringCreateWithCString(NULL, strName, kCFStringEncodingISOLatin1 );
CFStringRef iName = CFStringCreateWithCString(NULL, strName, kCFStringEncodingMacRoman );
CFStringRef keys[] = { kTISPropertyInputSourceCategory, kTISPropertyInputSourceID };
CFStringRef values[] = { kTISCategoryKeyboardInputSource, iName };
CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)keys, (const void **)values, 2, NULL, NULL);
// get list of current enabled keyboard layouts. dict filters the list
CFArrayRef kbds = TISCreateInputSourceList(dict, true);
if (kbds!=NULL)
{
...
...
@@ -552,3 +557,17 @@ void UBPlatformUtils::SetMacLocaleByIdentifier(const QString& id)
}
[pool drain];
}
/**
* @brief Activate the current application
*/
void UBPlatformUtils::setFrontProcess()
{
NSRunningApplication* app = [NSRunningApplication currentApplication];
// activate the application, forcing focus on it
[app activateWithOptions: NSApplicationActivateIgnoringOtherApps];
// other option:NSApplicationActivateAllWindows. This won't steal focus from another app, e.g
// if the user is doing something else while waiting for OpenBoard to load
}
src/frameworks/UBPlatformUtils_win.cpp
View file @
b1124a66
...
...
@@ -424,3 +424,7 @@ QString UBPlatformUtils::urlFromClipboard()
// Not implemented yet
return
qsRet
;
}
void
UBPlatformUtils
::
setFrontProcess
()
{
}
src/gui/UBFloatingPalette.cpp
View file @
b1124a66
...
...
@@ -60,7 +60,7 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
#endif
#ifdef Q_OS_OSX
setAttribute
(
Qt
::
WA_MacAlwaysShowToolWindow
);
setAttribute
(
Qt
::
WA_MacNonActivatingToolWindow
);
//setAttribute(Qt::WA_MacNonActivatingToolWindow); // no longer exists
setAttribute
(
Qt
::
WA_MacNoShadow
);
#endif
}
...
...
src/gui/UBKeyboardPalette_mac.
cpp
→
src/gui/UBKeyboardPalette_mac.
mm
View file @
b1124a66
...
...
@@ -30,7 +30,9 @@
#include <stdio.h>
#include <CoreServices/CoreServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
#include <QMap>
#include <QString>
...
...
@@ -74,6 +76,7 @@ void UBKeyboardPalette::createCtrlButtons()
void UBKeyboardPalette::checkLayout()
{
TISInputSourceRef selectedLocale = TISCopyCurrentKeyboardInputSource();
CFStringRef sr = (CFStringRef) TISGetInputSourceProperty(selectedLocale,
...
...
@@ -96,6 +99,7 @@ void UBKeyboardPalette::checkLayout()
}
}
}
}
void UBKeyboardPalette::onActivated(bool)
...
...
src/gui/UBMagnifer.cpp
View file @
b1124a66
...
...
@@ -85,7 +85,7 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive)
#endif
#ifdef Q_OS_OSX
setAttribute
(
Qt
::
WA_MacAlwaysShowToolWindow
);
setAttribute
(
Qt
::
WA_MacNonActivatingToolWindow
);
//
setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute
(
Qt
::
WA_MacNoShadow
);
#endif
}
...
...
src/gui/UBRubberBand.cpp
View file @
b1124a66
...
...
@@ -31,15 +31,11 @@
#include <QStyleFactory>
#include <QStyle>
#ifdef Q_OS_OSX
#include <QtGui/QMacStyle>
#endif
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
#include "board/UBBoardView.h"
#include "core/memcheck.h"
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
UBRubberBand
::
UBRubberBand
(
Shape
s
,
QWidget
*
p
)
:
QRubberBand
(
s
,
p
)
...
...
@@ -53,7 +49,7 @@ UBRubberBand::UBRubberBand(Shape s, QWidget * p)
#ifdef Q_OS_WIN
customStyle
=
new
QWindowsXPStyle
();
#elif defined(Q_OS_OSX)
customStyle
=
new
QMacStyle
(
);
customStyle
=
QStyleFactory
::
create
(
"macintosh"
);
#elif defined(Q_OS_LINUX)
customStyle
=
QStyleFactory
::
create
(
"oxygen"
);
#endif
...
...
src/gui/gui.pri
View file @
b1124a66
...
...
@@ -85,7 +85,8 @@ SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBOpenSankoreImporterWidget.cpp \
src/gui/UBStartupHintsPalette.cpp
win32:SOURCES += src/gui/UBKeyboardPalette_win.cpp
macx:
SOURCES += src/gui/UBKeyboardPalette_mac.cpp
macx:
OBJECTIVE_SOURCES += src/gui/UBKeyboardPalette_mac.mm
linux-g++:SOURCES += src/gui/UBKeyboardPalette_linux.cpp
linux-g++-32:SOURCES += src/gui/UBKeyboardPalette_linux.cpp
linux-g++-64:SOURCES += src/gui/UBKeyboardPalette_linux.cpp
src/podcast/UBPodcastController.cpp
View file @
b1124a66
...
...
@@ -59,9 +59,9 @@
#ifdef Q_OS_WIN
#include "windowsmedia/UBWindowsMediaVideoEncoder.h"
#include "windowsmedia/UBWaveRecorder.h"
#elif defined(Q_OS_OSX)
#include "quicktime/UBQuickTimeVideoEncoder.h"
#include "quicktime/UBAudioQueueRecorder.h"
//
#elif defined(Q_OS_OSX)
//
#include "quicktime/UBQuickTimeVideoEncoder.h"
//
#include "quicktime/UBAudioQueueRecorder.h"
#endif
#include "core/memcheck.h"
...
...
@@ -305,8 +305,8 @@ void UBPodcastController::start()
#ifdef Q_OS_WIN
mVideoEncoder
=
new
UBWindowsMediaVideoEncoder
(
this
);
//deleted on stop
#elif defined(Q_OS_OSX)
mVideoEncoder
=
new
UBQuickTimeVideoEncoder
(
this
);
//deleted on stop
//
#elif defined(Q_OS_OSX)
//
mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop
#endif
if
(
mVideoEncoder
)
...
...
@@ -795,8 +795,8 @@ QStringList UBPodcastController::audioRecordingDevices()
#ifdef Q_OS_WIN
devices
=
UBWaveRecorder
::
waveInDevices
();
#elif defined(Q_OS_OSX)
devices
=
UBAudioQueueRecorder
::
waveInDevices
();
//
#elif defined(Q_OS_OSX)
//
devices = UBAudioQueueRecorder::waveInDevices();
#endif
return
devices
;
...
...
src/podcast/podcast.pri
View file @
b1124a66
...
...
@@ -22,13 +22,13 @@ win32 {
src/podcast/windowsmedia/UBWaveRecorder.h
}
macx {
#macx {
SOURCES += src/podcast/quicktime/UBQuickTimeVideoEncoder.cpp \
src/podcast/quicktime/UBQuickTimeFile.cpp \
src/podcast/quicktime/UBAudioQueueRecorder.cpp
# SOURCES += src/podcast/quicktime/UBQuickTimeVideoEncoder.cpp \
# src/podcast/quicktime/UBQuickTimeFile.cpp \
#
src/podcast/quicktime/UBAudioQueueRecorder.cpp
HEADERS += src/podcast/quicktime/UBQuickTimeVideoEncoder.h \
src/podcast/quicktime/UBQuickTimeFile.h \
src/podcast/quicktime/UBAudioQueueRecorder.h
}
\ No newline at end of file
# HEADERS += src/podcast/quicktime/UBQuickTimeVideoEncoder.h \
# src/podcast/quicktime/UBQuickTimeFile.h \
# src/podcast/quicktime/UBAudioQueueRecorder.h
#}
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