Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace TUIO subproject with Qt's TuioTouch plugin (Qt >= 5.6) #211

Merged
merged 1 commit into from
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ CMakeLists.txt.user*
build/
Deflect/
Servus/
TUIO/
VirtualKeyboard/
ZeroEQ/
1 change: 0 additions & 1 deletion .gitsubprojects
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- mode: cmake -*-
git_subproject(ZeroEQ https://github.com/HBPVIS/ZeroEQ.git 1e66ee3)
git_subproject(Deflect https://github.com/BlueBrain/Deflect.git cc4c732)
git_subproject(TUIO https://github.com/BlueBrain/TUIO.git 52afa43)
git_subproject(VirtualKeyboard https://github.com/BlueBrain/QtFreeVirtualKeyboard.git d026536)
19 changes: 5 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Raphael Dumusc <raphael.dumusc@epfl.ch>

cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(Tide VERSION 1.4.0)
project(Tide VERSION 1.5.0)
set(Tide_VERSION_ABI 1)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/common)
Expand Down Expand Up @@ -33,6 +33,9 @@ common_find_package(MPI REQUIRED)
common_find_package(Qt5Concurrent REQUIRED)
common_find_package(Qt5Core REQUIRED)
common_find_package(Qt5Gui REQUIRED COMPONENTS Private)
if(NOT TARGET Qt5::QTuioTouchPlugin)
message(WARNING "Qt5::QTuioTouchPlugin not found, touch may be unavailable")
endif()
common_find_package(Qt5Network REQUIRED)
common_find_package(Qt5Qml REQUIRED)
common_find_package(Qt5Quick 5.4 REQUIRED)
Expand All @@ -54,6 +57,7 @@ common_find_package(RSVG MODULE librsvg-2.0 2.36.2)
common_find_package(Threads REQUIRED)
common_find_package(TIFF)
common_find_package(VirtualKeyboard)
common_find_package(X11) # for webbrowser and swap sync unit tests

common_find_package(FFMPEG)
if(FFMPEG_FOUND)
Expand All @@ -71,16 +75,6 @@ else()
endif()
endif()

common_find_package(TUIO 1.4 SYSTEM)
if(TUIO_FOUND)
option(TIDE_ENABLE_TUIO_TOUCH_LISTENER "Enable TUIO touch listener for multi-touch events" ON)
endif()
if(TIDE_ENABLE_TUIO_TOUCH_LISTENER)
common_find_package(X11 REQUIRED)
else()
common_find_package(X11) # for webbrowser unit tests
endif()

common_find_package(ZeroEQ)
if(TARGET ZeroEQHTTP)
option(TIDE_ENABLE_REST_INTERFACE "Enable REST interface using ZeroEQ" ON)
Expand All @@ -107,9 +101,6 @@ if(Deflect_IS_SUBPROJECT)
set(_deflect_deb qtbase5-dev libturbojpeg)
set(TIDE_PACKAGE_REPLACES desktopstreamer)
endif()
if(TUIO_IS_SUBPROJECT)
set(TIDE_PACKAGE_CONFLICTS liboscpack-dev liboscpack1)
endif()
if(ZeroEQ_IS_SUBPROJECT)
set(_cppnetlib_deb libboost-atomic-dev libboost-chrono-dev
libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev
Expand Down
11 changes: 8 additions & 3 deletions apps/TideMaster/main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*********************************************************************/
/* Copyright (c) 2011 - 2012, The University of Texas at Austin. */
/* Copyright (c) 2011-2012, The University of Texas at Austin. */
/* Copyright (c) 2013-2017, EPFL/Blue Brain Project */
/* Raphael.Dumusc@epfl.ch */
/* Daniel.Nachbaur@epfl.ch */
/* Raphael.Dumusc@epfl.ch */
/* Daniel.Nachbaur@epfl.ch */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
Expand Down Expand Up @@ -59,6 +59,11 @@ int main(int argc, char* argv[])

// Load virtualkeyboard input context plugin
qputenv("QT_IM_MODULE", QByteArray("virtualkeyboard"));
// For TuioTouch plugin in headless mode
qputenv("QT_TUIOTOUCH_DELIVER_WITHOUT_FOCUS", QByteArray("1"));
// WAR bug in TuioTouch plugin with http_proxy in Qt 5.8.0 [QTBUG-58706]
if (QString(qVersion()) == "5.8.0")
qputenv("http_proxy", QByteArray());

{
MPIChannelPtr worldChannel(new MPIChannel(argc, argv));
Expand Down
4 changes: 3 additions & 1 deletion apps/tide
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ try:
forker_host = host # forker goes at the end of the hostlist

export_display = EXPORT_ENV_VAR.format('DISPLAY', display)
export_tuio = EXPORT_ENV_VAR.format('QT_QPA_GENERIC_PLUGINS', 'TuioTouch')
environment = '%s %s %s' % (MPI_SPECIAL_FLAGS, export_display, node_host)
mastercmd = '%s -np 1 %s%s %s' % (environment, VGLRUN_BIN, TIDEMASTER_BIN, TIDE_PARAMS)
masterexec = '%s%s %s' % (VGLRUN_BIN, TIDEMASTER_BIN, TIDE_PARAMS)
mastercmd = '%s %s -np 1 %s' % (export_tuio, environment, masterexec)
runcommands.append(mastercmd)

# add a separate 'forker' process on the same host as the master process
Expand Down
1 change: 0 additions & 1 deletion doc/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ cloned by CMake during the configure step. They come with their own additional
requirements:
* Deflect: streaming of contents and applications
- libjpeg-turbo
* TUIO: multitouch interface
* VirtualKeyboard: on-screen virtual keyboard (Qml)
* ZeroEQ: http / REST interface (technically optional, but needed to operate
the on-screen Launcher panel)
Expand Down
7 changes: 7 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog {#changelog}
============

# Release 1.5 (git master)

* [211](https://github.com/BlueBrain/Tide/pull/211):
Qt's TuioTouch plugin replaces BlueBrain's TUIO subproject. Note: when not in
headless mode, the touch points can only be delivered when the main window's
Qml item has active focus.

# Release 1.4 (09-11-2017)

* [203](https://github.com/BlueBrain/Tide/pull/203):
Expand Down
2 changes: 1 addition & 1 deletion doc/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ stereo3d: side by side
Tide listens on the following ports:

* TCP port 1701 - incoming Deflect connections.
* UDP port 3333 - TUIO messages (if compiled with TUIO multitouch support).
* UDP port 3333 - TUIO messages (if using TuioTouch Qt plugin).
* TCP port 8888 - REST interface (if compiled with ZeroEQ support),
configurable.

Expand Down
1 change: 0 additions & 1 deletion tide/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#cmakedefine01 TIDE_ENABLE_PDF_SUPPORT
#cmakedefine01 TIDE_ENABLE_PLANAR_CONTROLLER
#cmakedefine01 TIDE_ENABLE_REST_INTERFACE
#cmakedefine01 TIDE_ENABLE_TUIO_TOUCH_LISTENER
#cmakedefine01 TIDE_ENABLE_WEBBROWSER_SUPPORT
#cmakedefine01 TIDE_IGNORE_MPI_THREADSAFETY

Expand Down
5 changes: 0 additions & 5 deletions tide/core/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,3 @@ void tiffMessageLoggerErr(const char* module, const char* fmt, va_list ap)
vsnprintf(log_string, MAX_LOG_LENGTH, fmt, ap);
put_log(LOG_ERROR, LOG_TIFF, "%s: '%s'", module, log_string);
}

void tuioMessageLogger(const int level, const std::string& message)
{
put_log(level, LOG_TUIO, message.c_str());
}
3 changes: 0 additions & 3 deletions tide/core/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
#define LOG_REST "REST"
#define LOG_STREAM "STREAM"
#define LOG_TIFF "TIFF"
#define LOG_TUIO "TUIO"

extern std::string logger_id;
extern void put_log(const int level, const std::string& facility,
Expand All @@ -78,8 +77,6 @@ extern void tiffMessageLoggerWarn(const char* module, const char* fmt,
extern void tiffMessageLoggerErr(const char* module, const char* fmt,
va_list ap);

extern void tuioMessageLogger(int level, const std::string& message);

#ifdef _WIN32
#define print_log(l, facility, fmt, ...) \
put_log(l, facility, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__)
Expand Down
6 changes: 0 additions & 6 deletions tide/master/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ if(TIDE_ENABLE_PDF_SUPPORT)
)
endif()

if(TIDE_ENABLE_TUIO_TOUCH_LISTENER)
list(APPEND TIDEMASTER_HEADERS MultitouchListener.h)
list(APPEND TIDEMASTER_SOURCES MultitouchListener.cpp)
list(APPEND TIDEMASTER_LINK_LIBRARIES TUIO ${X11_LIBRARIES})
endif()

if(TIDE_ENABLE_PLANAR_CONTROLLER)
list(APPEND TIDEMASTER_HEADERS PlanarController.h)
list(APPEND TIDEMASTER_SOURCES PlanarController.cpp)
Expand Down
Loading