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

Add simple input driver interface, support 3D Mouse devices #2130

Merged
merged 152 commits into from Oct 13, 2018
Merged
Show file tree
Hide file tree
Changes from 144 commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
a93c8b2
Add support for Space Navigator devices using both HIDAPI and libspnav.
Sep 28, 2016
78a79de
Extract events and use QThread to remove c++11 dependency.
t-paul Oct 15, 2017
5310d9c
Separate HIDAPI and SpaceNav drivers.
t-paul Oct 15, 2017
10be7f1
Try to open drivers sequentially.
t-paul Jul 18, 2015
a55540a
Add Joystick input driver.
t-paul Sep 28, 2016
725f2cc
Add DBus input driver.
t-paul Oct 8, 2016
8d3c158
Make all input drivers compile time optional.
t-paul Sep 28, 2016
a619ae0
Add more USB IDs.
t-paul Jul 18, 2015
ce14d34
Fix MXE compilation.
t-paul Jul 18, 2015
a7d0e32
Use included HIDAPI for building on MXE/Windows.
t-paul Jul 18, 2015
69ccd9d
Add HIDAPI decoder for Space Mouse Wireless.
t-paul Jul 19, 2015
9368354
Add new rotation code to prevent gimbal lock.
fnordsh Jul 19, 2015
cff51ad
Throttle input events when reading from spacenavd.
t-paul Jul 19, 2015
9b2ed34
Allow simple re-open after the active driver closes.
t-paul Jul 19, 2015
f8d975c
Extract events and use QThread to remove c++11 dependency.
t-paul Oct 15, 2017
ffa8fbe
Fix isOpen() method to actually return the status.
t-paul Jul 25, 2015
55c8f71
Add event mapping to prepare for configuration options.
t-paul Oct 15, 2017
bebc6d5
Make axis and button mapping configurable.
t-paul Jul 26, 2015
474c824
Initialize name even if the driver is not opened.
t-paul Aug 2, 2015
227ec62
Add default config settings for buttons and axis.
t-paul Aug 2, 2015
6bff301
Add another USB ID for Space Mouse Wireless (256f:c62f).
t-paul Aug 2, 2015
6ebb10a
Convert Space Mouse Wireless decoder to use generic axis events.
t-paul Aug 2, 2015
a03eb11
Add Space Mouse Pro USB IDs.
t-paul Aug 6, 2015
9203466
Add basic configuration GUI for axis and button mapping.
t-paul Oct 15, 2017
37d3ffc
Clean up the labels for the InputButtons incl. setting meaningful names.
MichaelPFrey Oct 14, 2017
5028b79
Add files generated by qdbusxml2cpp.
t-paul Oct 15, 2017
94dda28
Remove reference to obsolete header.
t-paul Oct 15, 2017
cd742cb
add button 0 and button 9 (/dev/input/js0 numbers the first button 0,…
MichaelPFrey Oct 15, 2017
2ed4ced
Merge pull request #2131 from MichaelPFrey/inputdriver5-numbering
t-paul Oct 15, 2017
b80c818
UI and backend code for Viewport relative translation
MichaelPFrey Oct 21, 2017
97a79ef
Merge pull request #2143 from MichaelPFrey/inputdriver5-ViewPortRelative
t-paul Oct 22, 2017
8e16fef
using for loops instead of copy&paste code
MichaelPFrey Oct 26, 2017
aebfc79
C++11 for as suggested in the pull request
MichaelPFrey Oct 27, 2017
eb8ff94
tab to space indentation. Check for "0" and "nullptr" simplified.
MichaelPFrey Oct 27, 2017
4f12522
std::string name -> const std::string &name as per pull-request
MichaelPFrey Oct 27, 2017
9129e70
actions is QString
MichaelPFrey Oct 27, 2017
7550496
== operator instead of compare
MichaelPFrey Oct 27, 2017
9ebec71
Make Inputdriver5 an experimental Feature (#2148)
MichaelPFrey Oct 28, 2017
534a9a6
Merge pull request #2149 from MichaelPFrey/inputdriver5-for
t-paul Oct 28, 2017
2c549b2
Show the pressed button in the preference UI (#2154)
MichaelPFrey Oct 28, 2017
e141283
Use constants for array sizes in the inputdriver (#2155)
MichaelPFrey Oct 29, 2017
a7c762e
HidApiInputDriver, hidapi_decode_axis1 is now using the InputEventAxi…
MichaelPFrey Oct 30, 2017
a7fe8f3
Buttons now working with SpaceExplorer under Linux
MichaelPFrey Oct 31, 2017
3576fae
Add trim and deadzone handling (#2156)
MichaelPFrey Oct 31, 2017
6af09f4
Merge pull request #2160 from MichaelPFrey/inputdriver5-map
t-paul Oct 31, 2017
34047fc
Add trim and deadzone to UI (#2168)
MichaelPFrey Oct 31, 2017
ed1e3fb
Merge pull request #2166 from MichaelPFrey/inputdriver5-ButtonDecode1
t-paul Nov 20, 2017
438998a
Add axis gain (#2201)
MichaelPFrey Nov 20, 2017
4aa05f4
using a stepping between 0 and 1 as indicator for double
MichaelPFrey Nov 21, 2017
281d34a
use the step to set the stepping of the spin box
MichaelPFrey Nov 21, 2017
c7a25d7
clean up
MichaelPFrey Nov 21, 2017
d5d9e2c
Split the Preference UI of the Input Driver from the Main Preference …
MichaelPFrey Dec 28, 2017
c73a404
Add QGamepad based input driver.
t-paul Dec 29, 2017
ff65824
Merge branch 'inputdriver5' into inputdriver5-debugPref
MichaelPFrey Dec 29, 2017
12a6062
Merge pull request #2203 from MichaelPFrey/inputdriver5-debugPref
t-paul Dec 29, 2017
1432fbe
add a link to the HIDAPI to "Tools & Libraries used" in the AboutDial…
MichaelPFrey Dec 29, 2017
32c412b
Merge pull request #2235 from MichaelPFrey/inputdriver5-about
t-paul Dec 29, 2017
8a6cb47
Moved input/InputDriver.h from QGLView.h to MainWindow.h (#2236)
MichaelPFrey Dec 30, 2017
6ef7fa6
Fix Qt version check.
t-paul Dec 30, 2017
78a0286
Use std::unique_ptr<> for active gamepad.
t-paul Dec 30, 2017
1729668
Always show InputDriverManager status in LibraryInfo (#2238)
MichaelPFrey Dec 30, 2017
44790e4
Merge pull request #2234 from openscad/qt-gamepad-driver
t-paul Dec 30, 2017
beac630
UI code for feature 'Add option to enable/disable specific drivers' r…
MichaelPFrey Dec 31, 2017
f75ecd2
back end code
MichaelPFrey Dec 31, 2017
7c9a6b7
NotEnabledDuringBuild ToolTip
MichaelPFrey Dec 31, 2017
02d5dfd
inputdriver5 C++11: Use override to mark overridden virtual functions…
MichaelPFrey Jan 1, 2018
747c6b8
Use override to mark overridden virtual functions
MichaelPFrey Jan 1, 2018
74d8429
use the Tooltip to describe what the driver is intended for
MichaelPFrey Jan 2, 2018
7d77b60
initComboBox and initDoubleSpinBox might as well also set the value (…
MichaelPFrey Jan 3, 2018
d8785bd
Merge pull request #2244 from MichaelPFrey/inputdriver5-cpp11
t-paul Jan 3, 2018
54c71ac
Merge branch 'master' into inputdriver5
t-paul Jan 3, 2018
456eb74
Merge branch 'master' into inputdriver5
t-paul Jan 3, 2018
ce4d12d
Merge branch 'inputdriver5' into inputdriver5-select
MichaelPFrey Jan 4, 2018
0111cf6
use italic to show the user that the change has been registered
MichaelPFrey Jan 4, 2018
12c21fa
Map all buttons (#2248).
MichaelPFrey Jan 4, 2018
2ae30f4
moved the DriverDescriptions into the header
MichaelPFrey Jan 5, 2018
ca42e21
ignore the mousewheel on the comboboxes
MichaelPFrey Jan 5, 2018
cd5e652
description comment for WheelIgnorer
MichaelPFrey Jan 5, 2018
67c0228
Toggle Perspective
MichaelPFrey Jan 7, 2018
d6e7a3b
do not overwrite the preferences with the default
MichaelPFrey Jan 7, 2018
3ffee31
make the string translateable, add icon
MichaelPFrey Jan 7, 2018
5a63759
create the "axisValues" using a for loop and snprintf
MichaelPFrey Jan 9, 2018
50a785e
automatically generate the actions for the combox (including translat…
MichaelPFrey Jan 9, 2018
1836216
add the parent hierarchy
MichaelPFrey Jan 9, 2018
be24387
buttonValues is now not needed anymore
MichaelPFrey Jan 9, 2018
9c872c5
use a struct to store the actions, use the struct to also store the icon
MichaelPFrey Jan 9, 2018
29a239a
back-end code for setting the joystick number
MichaelPFrey Jan 13, 2018
ee4cf9b
spaceNavDominantAxisOnly option
MichaelPFrey Jan 14, 2018
6b85c08
snprintf -> boost::format
MichaelPFrey Jan 23, 2018
fa3c707
debug and modernize
MichaelPFrey Jan 23, 2018
b53ee06
typo
MichaelPFrey Jan 24, 2018
27753c2
use "auto" for the types to increase readability
MichaelPFrey Jan 27, 2018
d53c67d
Revert "Always show InputDriverManager status in LibraryInfo (#2238)"
t-paul Jan 28, 2018
29e9964
Merge pull request #2242 from MichaelPFrey/inputdriver5-select
t-paul Jan 28, 2018
1445452
Merge branch 'MichaelPFrey-inputdriver5-mousewheel' into inputdriver5
t-paul Jan 28, 2018
12204f6
Merge pull request #2254 from MichaelPFrey/toggle
t-paul Jan 28, 2018
e6f47d5
Merge pull request #2255 from MichaelPFrey/inputdriver5-comp
t-paul Jan 28, 2018
f899236
Merge pull request #2260 from MichaelPFrey/inputdriver5-forAxes
t-paul Jan 28, 2018
2ccd86f
New icons to better represent the function (#2263).
MichaelPFrey Jan 28, 2018
6d6bb0b
DBus interface debugged (#2267)
MichaelPFrey Jan 28, 2018
7254209
Merge branch 'inputdriver5' into inputdriver5-buttonCombo
MichaelPFrey Jan 28, 2018
fd37dcf
Merge branch 'inputdriver5-jsN' of https://github.com/MichaelPFrey/op…
t-paul Jan 28, 2018
281e212
the action registration has to be in the InputDriverManager
MichaelPFrey Jan 28, 2018
f46773a
enable setting for the individual inputdrivers fixed
MichaelPFrey Jan 28, 2018
bc24de5
Merge pull request #2272 from MichaelPFrey/enableFixed
t-paul Jan 28, 2018
13f6d79
Add input core to CMake build (no drivers available yet).
t-paul Jan 29, 2018
1d7e4a4
adjust the alignment of the combobox items with an empty icon
MichaelPFrey Jan 30, 2018
240d55b
better description for Toggle Perspective, use the arrow character in…
MichaelPFrey Jan 30, 2018
ee7faff
store the not automatically generated actions in the settings
MichaelPFrey Jan 30, 2018
8ace96b
Merge pull request #2261 from MichaelPFrey/inputdriver5-buttonCombo
t-paul Jan 30, 2018
0dac37b
more elegant way to make the WheelIgnorer aware of its parent (#2275)
MichaelPFrey Jan 31, 2018
77be873
add getTranslation methode
MichaelPFrey Feb 3, 2018
4389b73
add getRotation
MichaelPFrey Feb 3, 2018
2d0a587
add settings and ui code for view port relative rotation
MichaelPFrey Feb 3, 2018
929b906
use qglview->rotate2 for view port relativ rotation
MichaelPFrey Feb 3, 2018
f103ca6
Route input events through the axis mapper.
t-paul Feb 3, 2018
f15b398
expose rotate2 via dbus
MichaelPFrey Feb 4, 2018
2febceb
implement getRotation in the dbus driver
MichaelPFrey Feb 4, 2018
0fece6d
implement getTranslation in the dbus driver
MichaelPFrey Feb 4, 2018
fb8ccb1
std::array<double, 3> -> QList<double>
MichaelPFrey Feb 4, 2018
6182e53
#include <array> not necessary anymore
MichaelPFrey Feb 4, 2018
81d51ce
Add method to get the names of supported actions (#2279)
MichaelPFrey Feb 4, 2018
2a29cfd
Add DBus input driver to cmake build. (#2273)
t-paul Feb 4, 2018
32f290d
Add view port relative rotation (#2280)
MichaelPFrey Feb 4, 2018
7e9fd0d
Merge branch 'inputdriver5' into dbus-cam-state
MichaelPFrey Feb 4, 2018
8ef2564
rotate2 -> rotateByVector
MichaelPFrey Feb 5, 2018
b825754
move the description to the XML file
MichaelPFrey Feb 5, 2018
690c31d
Add spacenav driver to cmake (#2287)
justbuchanan Feb 9, 2018
8ca88a1
Fix compilation with Qt4.
t-paul Mar 1, 2018
fd87c4f
using nullptr instead of 0
MichaelPFrey Mar 30, 2018
5b60bad
moving declaration and initialization onto the same line
MichaelPFrey Mar 30, 2018
7eaa049
use auto for the type where obvious from context
MichaelPFrey Mar 30, 2018
fb3706a
0 -> nullptr
MichaelPFrey Mar 30, 2018
e00951b
setting is not beeing used anymore
MichaelPFrey Mar 30, 2018
c206b57
Merge pull request #2361 from MichaelPFrey/inputdriver5-cleaning
t-paul Mar 30, 2018
25bcd66
Merge pull request #2281 from MichaelPFrey/dbus-cam-state
t-paul Aug 19, 2018
e77d6c3
Merge pull request #2282 from MichaelPFrey/dbus-rotate2
t-paul Aug 19, 2018
1df39af
Merge branch 'master' into inputdriver5
t-paul Aug 19, 2018
6c1071d
Merge remote-tracking branch 'origin/master' into inputdriver5
t-paul Oct 7, 2018
cd549c4
Fix merge issues.
t-paul Oct 8, 2018
e72ed5a
Fix "catching polymorphic type by value".
t-paul Oct 13, 2018
5493472
Fix compile warnings.
t-paul Oct 13, 2018
059b1f4
Add const/override.
t-paul Oct 13, 2018
03cdf77
Make actions list private.
t-paul Oct 13, 2018
b179ca4
Cleanup.
t-paul Oct 13, 2018
3140893
Remove unnecessary casts.
t-paul Oct 13, 2018
89e956b
Extract event definitions to separate header file.
t-paul Oct 13, 2018
ad4495e
Add const.
t-paul Oct 13, 2018
ed130d5
Fix struct naming, small cleanups.
t-paul Oct 13, 2018
896880a
More C++11 cleanup.
t-paul Oct 13, 2018
0760923
Merge branch 'master' into inputdriver5
kintel Oct 13, 2018
33c52e5
Some more cleanup
kintel Oct 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -38,6 +38,10 @@ testdata/scad/misc/use-tests.scad
/*.h
/*.dump
/*.pl
/lexer_lex.cpp
/parser_yacc.cpp
/openscad_adaptor.cpp
/openscad_interface.cpp
/OpenSCAD.app
/openscad.appdata.xml
/openscad.pro.user
Expand Down
33 changes: 32 additions & 1 deletion CMakeLists.txt
Expand Up @@ -132,6 +132,17 @@ if(NOT HEADLESS)
message(STATUS "QScintilla: ${QT5QSCINTILLA_VERSION_STRING}")
add_definitions(-DUSE_SCINTILLA_EDITOR)
add_definitions(-DENABLE_MDI)

find_package(Qt5DBus QUIET)
if (Qt5DBus_FOUND)
message(STATUS "DBus input driver enabled")
add_definitions(-DENABLE_DBUS)
set(INPUT_DRIVER_DBUS_SOURCES src/input/DBusInputDriver.cc)
qt5_add_dbus_interface(INPUT_DRIVER_DBUS_SOURCES org.openscad.OpenSCAD.xml openscad_interface)
qt5_add_dbus_adaptor(INPUT_DRIVER_DBUS_SOURCES org.openscad.OpenSCAD.xml input/DBusInputDriver.h DBusInputDriver openscad_adaptor)
else()
message(STATUS "DBus input driver disabled as the QtDBus module could not be found.")
endif()

# add_definitions(${Qt5Widgets_DEFINITIONS})
# add_definitions(${Qt5OpenGL_DEFINITIONS})
Expand Down Expand Up @@ -358,12 +369,16 @@ set(OFFSCREEN_SOURCES
src/render.cc
src/OpenCSGRenderer.cc)

set(INPUT_DRIVER_SOURCES
${INPUT_DRIVER_DBUS_SOURCES})

set(GUI_SOURCES
src/mainwin.cc
src/OpenSCADApp.cc
src/EventFilter.h
src/WindowManager.cc
src/Preferences.cc
src/SettingsWriter.cc
src/FontListDialog.cc
src/FontListTableView.cc
src/LibraryInfoDialog.cc
Expand Down Expand Up @@ -396,6 +411,13 @@ set(GUI_SOURCES
src/parameter/parametertext.cpp
src/parameter/parametervector.cpp
src/parameter/parametervirtualwidget.cpp
src/input/AxisConfigWidget.cc
src/input/ButtonConfigWidget.cc
src/input/InputDriver.cc
src/input/InputDriverManager.cc
src/input/InputEventMapper.cc
src/input/WheelIgnorer.cc
${INPUT_DRIVER_SOURCES}
)

# header-only code
Expand Down Expand Up @@ -432,6 +454,11 @@ endif()

set(RESOURCE_FILES icons/OpenSCAD.icns)

if(ENABLE_SPNAV)
t-paul marked this conversation as resolved.
Show resolved Hide resolved
add_definitions(-DENABLE_SPNAV)
list(APPEND Sources src/input/SpaceNavInputDriver.cc)
endif()

add_executable(OpenSCAD ${Sources} ${RESOURCE_FILES})

# FIXME: snapshot, ICON = icons/icon-nightly.icns
Expand All @@ -451,6 +478,10 @@ elseif(UNIX)
)
endif()

if(ENABLE_SPNAV)
target_link_libraries(OpenSCAD spnav)
endif()

set(COMMON_LIBRARIES
${CGAL_LIBRARY}
${GMP_LIBRARIES}
Expand All @@ -469,6 +500,6 @@ set(COMMON_LIBRARIES

target_link_libraries(OpenSCAD ${COMMON_LIBRARIES})
if(NOT HEADLESS)
target_link_libraries(OpenSCAD Qt5::Core Qt5::Widgets Qt5::OpenGL Qt5::Concurrent ${QT5QSCINTILLA_LIBRARY})
target_link_libraries(OpenSCAD Qt5::Core Qt5::Widgets Qt5::OpenGL Qt5::Concurrent ${QT5QSCINTILLA_LIBRARY} ${Qt5DBus_LIBRARIES})
endif()

53 changes: 53 additions & 0 deletions features/hidapi.prf
@@ -0,0 +1,53 @@
# Detect hidapi, then use this priority list to determine
# which library to use:
#
# Priority
# 1. HIDAPI_INCLUDEPATH / HIDAPI_LIBPATH (qmake parameter, not checked it given on commandline)
# 2. OPENSCAD_LIBRARIES (environment variable)
# 3. system's standard include paths from pkg-config

# read environment variables
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
HIDAPI_DIR = $$(HIDAPIDIR)

!isEmpty(OPENSCAD_LIBRARIES_DIR) {
isEmpty(HIDAPI_INCLUDEPATH) {
exists($$OPENSCAD_LIBRARIES_DIR/include/hidapi) {
HIDAPI_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include/hidapi
HIDAPI_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
}
}
}

win*: {
# Use included HIDAPI on MXE/Windows build.
HIDAPI_CFLAGS = -I../src/hidapi
HIDAPI_LIBS = -lsetupapi
HEADERS += src/hidapi/hidapi.h
SOURCES += src/hidapi/hid.c
} else {
isEmpty(HIDAPI_INCLUDEPATH) {
HIDAPI_CFLAGS = $$system("pkg-config --silence-errors --cflags hidapi-libusb")
} else {
HIDAPI_CFLAGS = -I$$HIDAPI_INCLUDEPATH
}

isEmpty(HIDAPI_LIBPATH) {
HIDAPI_LIBS = $$system("pkg-config --silence-errors --libs hidapi-libusb")
} else {
macx: {
HIDAPI_LIBS = -L$$HIDAPI_LIBPATH -lhidapi -framework IOKit -framework CoreFoundation
} else {
HIDAPI_LIBS = -L$$HIDAPI_LIBPATH -lhidapi-libusb
}
}
}

!isEmpty(HIDAPI_CFLAGS) {
QMAKE_CXXFLAGS += $$HIDAPI_CFLAGS
LIBS += $$HIDAPI_LIBS
DEFINES += ENABLE_HIDAPI

HEADERS += src/input/HidApiInputDriver.h
SOURCES += src/input/HidApiInputDriver.cc
}
46 changes: 46 additions & 0 deletions features/spnav.prf
@@ -0,0 +1,46 @@
# Detect spnav, then use this priority list to determine
# which library to use:
#
# Priority
# 1. SPNAV_INCLUDEPATH / SPNAV_LIBPATH (qmake parameter, not checked it given on commandline)
# 2. OPENSCAD_LIBRARIES (environment variable)
# 3. system's standard include paths from pkg-config

# read environment variables
OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES)
SPNAV_DIR = $$(SPNAVDIR)

!isEmpty(OPENSCAD_LIBRARIES_DIR) {
isEmpty(SPNAV_INCLUDEPATH) {
exists($$OPENSCAD_LIBRARIES_DIR/include/spnav.h) {
SPNAV_INCLUDEPATH = $$OPENSCAD_LIBRARIES_DIR/include
SPNAV_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib
}
}
}

!win*: {
isEmpty(SPNAV_INCLUDEPATH) {
exists(/usr/include/spnav.h) {
SPNAV_INCLUDEPATH = /usr/include
SPNAV_LIBPATH = /usr/lib
}
exists(/usr/local/include/spnav.h) {
SPNAV_INCLUDEPATH = /usr/local/include
SPNAV_LIBPATH = /usr/local/lib
}
exists(/opt/include/spnav.h) {
SPNAV_INCLUDEPATH = /opt/include
SPNAV_LIBPATH = /opt/lib
}
}
}

!isEmpty(SPNAV_INCLUDEPATH) {
QMAKE_CXXFLAGS += -I$$SPNAV_INCLUDEPATH
LIBS += -L$$SPNAV_LIBPATH -lspnav
DEFINES += ENABLE_SPNAV

HEADERS += src/input/SpaceNavInputDriver.h
SOURCES += src/input/SpaceNavInputDriver.cc
}
12 changes: 12 additions & 0 deletions icons/license.txt
Expand Up @@ -2,6 +2,18 @@ Taken from http://tango.freedesktop.org/Tango_Icon_Library, version 0.8.90 / pub

- prefsFeatures.png (converted from preferences-system.svg)

https://openclipart.org/detail/35425/tango-desktop-peripherals / Tango Icon Library / public domain:

- prefsInput.png

https://commons.wikimedia.org/wiki/File:Input-gaming.svg / Tango Icon Library / public domain:

- prefsInputAxis.png (Button removed)

https://commons.wikimedia.org/wiki/File:Input-keyboard.svg / Tango Icon Library / public domain:

- prefsInputButtons.png

https://openclipart.org/detail/2281/information-icons-set-by-kuba / public domain:

- information-icons-error.png
Expand Down
Binary file added icons/prefsInput.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/prefsInputAxis.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/prefsInputButtons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions info.pri
@@ -0,0 +1,38 @@
message("Configuration")
message("=============")
message("")

contains(CONFIG, debug) {
message("Debug mode: enabled")
} else {
message("Debug mode: disabled")
}

contains(DEFINES, ENABLE_EXPERIMENTAL) {
message("Experimental features: enabled")
} else {
message("Experimental features: disabled")
}

message("")
message("Input Drivers")
contains(DEFINES, ENABLE_HIDAPI) {
message("- HID API Driver (enabled)")
} else {
message("- HID API Driver (disabled)")
}
contains(DEFINES, ENABLE_SPNAV) {
message("- Space Navigator Library Driver (enabled)")
} else {
message("- Space Navigator Library Driver (disabled)")
}
contains(DEFINES, ENABLE_JOYSTICK) {
message("- Joystick Driver (enabled)")
} else {
message("- Joystick Driver (disabled)")
}
contains(DEFINES, ENABLE_DBUS) {
message("- DBus Remote Driver (enabled)")
} else {
message("- DBus Remote Driver (disabled)")
}
60 changes: 55 additions & 5 deletions openscad.pro
Expand Up @@ -16,7 +16,7 @@
# resource folder. E.g. using SUFFIX=-nightly will name the
# resulting binary openscad-nightly.
#
# Please see the 'Building' sections of the OpenSCAD user manual
# Please see the 'Building' sections of the OpenSCAD user manual
# for updated tips & workarounds.
#
# https://en.wikibooks.org/wiki/OpenSCAD_User_Manual
Expand Down Expand Up @@ -178,6 +178,8 @@ CONFIG += fontconfig
CONFIG += gettext
CONFIG += libxml2
CONFIG += libzip
CONFIG += hidapi
CONFIG += spnav

#Uncomment the following line to enable the QScintilla editor
!nogui {
Expand Down Expand Up @@ -225,7 +227,9 @@ FORMS += src/MainWindow.ui \
src/launchingscreen.ui \
src/LibraryInfoDialog.ui \
src/parameter/ParameterWidget.ui \
src/parameter/ParameterEntryWidget.ui
src/parameter/ParameterEntryWidget.ui \
src/input/ButtonConfigWidget.ui \
src/input/AxisConfigWidget.ui

# AST nodes
FLEXSOURCES += src/lexer.l
Expand Down Expand Up @@ -268,6 +272,7 @@ HEADERS += src/version_check.h \
src/OpenSCADApp.h \
src/WindowManager.h \
src/Preferences.h \
src/SettingsWriter.h \
src/OpenCSGWarningDialog.h \
src/AboutDialog.h \
src/FontListDialog.h \
Expand Down Expand Up @@ -369,7 +374,13 @@ HEADERS += src/version_check.h \
src/parameter/parameterset.h \
src/parameter/ignoreWheelWhenNotFocused.h \
src/QWordSearchField.h \
src/QSettingsCached.h
src/QSettingsCached.h \
src/input/InputDriver.h \
src/input/InputEventMapper.h \
src/input/InputDriverManager.h \
src/input/AxisConfigWidget.h \
src/input/ButtonConfigWidget.h \
src/input/WheelIgnorer.h

SOURCES += \
src/libsvg/libsvg.cc \
Expand All @@ -386,7 +397,9 @@ SOURCES += \
src/libsvg/transformation.cc \
src/libsvg/util.cc \
\
src/version_check.cc \
src/version_check.cc

SOURCES += \
src/ProgressWidget.cc \
src/linalg.cc \
src/Camera.cc \
Expand Down Expand Up @@ -448,6 +461,7 @@ SOURCES += \
src/rendersettings.cc \
src/highlighter.cc \
src/Preferences.cc \
src/SettingsWriter.cc \
src/OpenCSGWarningDialog.cc \
src/editor.cc \
src/GLView.cc \
Expand Down Expand Up @@ -510,8 +524,14 @@ SOURCES += \
src/parameter/parametervirtualwidget.cpp \
src/parameter/ignoreWheelWhenNotFocused.cpp \
src/QWordSearchField.cc\
src/QSettingsCached.cc \
\
src/QSettingsCached.cc
src/input/InputDriver.cc \
src/input/InputEventMapper.cc \
src/input/InputDriverManager.cc \
src/input/AxisConfigWidget.cc \
src/input/ButtonConfigWidget.cc \
src/input/WheelIgnorer.cc

# CGAL
HEADERS += src/ext/CGAL/convex_hull_3_bugfix.h \
Expand Down Expand Up @@ -545,6 +565,32 @@ HEADERS += src/ext/libtess2/Include/tesselator.h \
src/ext/libtess2/Source/sweep.h \
src/ext/libtess2/Source/tess.h

unix:!macx {
QT += dbus
DEFINES += ENABLE_DBUS
DBUS_ADAPTORS += org.openscad.OpenSCAD.xml
DBUS_INTERFACES += org.openscad.OpenSCAD.xml

HEADERS += src/input/DBusInputDriver.h
SOURCES += src/input/DBusInputDriver.cc
}

unix:!macx {
DEFINES += ENABLE_JOYSTICK

HEADERS += src/input/JoystickInputDriver.h
SOURCES += src/input/JoystickInputDriver.cc
}

!lessThan(QT_MAJOR_VERSION, 5) {
qtHaveModule(gamepad) {
QT += gamepad
DEFINES += ENABLE_QGAMEPAD
HEADERS += src/input/QGamepadInputDriver.h
SOURCES += src/input/QGamepadInputDriver.cc
}
}

unix:!macx {
SOURCES += src/imageutils-lodepng.cc
SOURCES += src/OffscreenContextGLX.cc
Expand Down Expand Up @@ -666,5 +712,9 @@ man.path = $$PREFIX/share/man/man1
man.extra = cp -f doc/openscad.1 \"\$(INSTALL_ROOT)$${man.path}/$${FULLNAME}.1\"
INSTALLS += man

info: {
include(info.pri)
}

DISTFILES += \
sounds/complete.wav
3 changes: 3 additions & 0 deletions openscad.qrc
@@ -1,5 +1,8 @@
<RCC>
<qresource prefix="/">
<file>icons/prefsInput.png</file>
<file>icons/prefsInputAxis.png</file>
<file>icons/prefsInputButtons.png</file>
<file>images/zoom-text-in-white.png</file>
<file>images/zoom-text-in.png</file>
<file>images/zoom-text-out-white.png</file>
Expand Down