Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit eb0928df authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add an option to use Qt's Windows tablet support, instead of ours

In the interest of experiment, it's enabled for the daily builds.
parent f4a41941
......@@ -306,6 +306,12 @@ find_package(Qt5 ${MIN_QT_VERSION}
Concurrent
)
if (WIN32)
option(USE_QT_TABLET_WINDOWS "Do not use Krita's forked Wintab and Windows Ink support on Windows, but leave everything to Qt." OFF)
add_feature_info("Use Qt's Windows Tablet Support" USE_QT_TABLET_WINDOWS "Do not use Krita's forked Wintab and Windows Ink support on Windows, but leave everything to Qt.")
configure_file(config_use_qt_tablet_windows.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_use_qt_tablet_windows.h)
endif ()
include (MacroAddFileDependencies)
include (MacroBoolTo01)
include (MacroEnsureOutOfSourceBuild)
......
......@@ -747,6 +747,7 @@ echo "%CMAKE_EXE%" "%KRITA_SRC_DIR%\." ^
-DHAVE_MEMORY_LEAK_TRACKER=OFF ^
-DFOUNDATION_BUILD=ON ^
-DHAVE_HDR=ON ^
-DUSE_QT_TABLET_WINDOWS=ON ^
-Wno-dev ^
-G "MinGW Makefiles" ^
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%
......
#cmakedefine USE_QT_TABLET_WINDOWS !
......@@ -58,10 +58,15 @@
#include <KisUsageLogger.h>
#include <kis_image_config.h>
#include
#if defined Q_OS_WIN
#include "config_use_qt_tablet_windows.h"
#include <windows.h>
#ifndef USE_QT_TABLET_WINDOWS
#include <kis_tablet_support_win.h>
#include <kis_tablet_support_win8.h>
#endif
#include <QLibrary>
#endif
......@@ -411,7 +416,7 @@ extern "C" int main(int argc, char **argv)
}
}
#endif
#ifndef USE_QT_TABLET_WINDOWS
{
if (cfg.useWin8PointerInput() && !KisTabletSupportWin8::isAvailable()) {
cfg.setUseWin8PointerInput(false);
......@@ -450,6 +455,7 @@ extern "C" int main(int argc, char **argv)
}
}
}
#endif
#endif
if (!app.start(args)) {
......
......@@ -393,13 +393,18 @@ set(kritaui_LIB_SRCS
)
if(WIN32)
set(kritaui_LIB_SRCS
${kritaui_LIB_SRCS}
qtlockedfile/qtlockedfile_win.cpp
)
if (USE_QT_TABLET_WINDOWS)
set(kritaui_LIB_SRCS
${kritaui_LIB_SRCS}
input/wintab/kis_tablet_support_win.cpp
input/wintab/kis_screen_size_choice_dialog.cpp
qtlockedfile/qtlockedfile_win.cpp
input/wintab/kis_tablet_support_win8.cpp
)
endif()
endif()
set(kritaui_LIB_SRCS
......@@ -522,6 +527,12 @@ ki18n_wrap_ui(kritaui_LIB_SRCS
)
if(WIN32 AND USE_QT_TABLET_WINDOWS)
ki18n_wrap_ui(kritaui_LIB_SRCS
input/wintab/kis_screen_size_choice_dialog.ui
)
endif()
add_library(kritaui SHARED ${kritaui_HEADERS_MOC} ${kritaui_LIB_SRCS} )
generate_export_header(kritaui BASE_NAME kritaui)
......
......@@ -88,7 +88,10 @@
#include "input/wintab/drawpile_tablettester/tablettester.h"
#ifdef Q_OS_WIN
# include <kis_tablet_support_win8.h>
#include "config_use_qt_tablet_windows.h"
# ifndef USE_QT_TABLET_WINDOWS
# include <kis_tablet_support_win8.h>
# endif
#endif
struct BackupSuffixValidator : public QValidator {
......@@ -704,6 +707,7 @@ void TabletSettingsTab::setDefault()
m_page->pressureCurve->setCurve(curve);
#ifdef Q_OS_WIN
#ifndef USE_QT_TABLET_WINDOWS
if (KisTabletSupportWin8::isAvailable()) {
KisConfig cfg(true);
m_page->radioWintab->setChecked(!cfg.useWin8PointerInput(true));
......@@ -712,6 +716,9 @@ void TabletSettingsTab::setDefault()
m_page->radioWintab->setChecked(true);
m_page->radioWin8PointerInput->setChecked(false);
}
#else
m_page->grpTabletApi->setVisible(false);
#endif
#endif
}
......@@ -732,6 +739,7 @@ TabletSettingsTab::TabletSettingsTab(QWidget* parent, const char* name): QWidget
m_page->pressureCurve->setCurve(curve);
#ifdef Q_OS_WIN
#ifndef USE_QT_TABLET_WINDOWS
if (KisTabletSupportWin8::isAvailable()) {
m_page->radioWintab->setChecked(!cfg.useWin8PointerInput());
m_page->radioWin8PointerInput->setChecked(cfg.useWin8PointerInput());
......@@ -740,6 +748,9 @@ TabletSettingsTab::TabletSettingsTab(QWidget* parent, const char* name): QWidget
m_page->radioWin8PointerInput->setChecked(false);
m_page->grpTabletApi->setVisible(false);
}
#else
m_page->grpTabletApi->setVisible(false);
#endif
#else
m_page->grpTabletApi->setVisible(false);
#endif
......@@ -1556,9 +1567,11 @@ bool KisDlgPreferences::editPreferences()
// Tablet settings
cfg.setPressureTabletCurve( dialog->m_tabletSettings->m_page->pressureCurve->curve().toString() );
#ifdef Q_OS_WIN
#ifndef USE_QT_TABLET_WINDOWS
if (KisTabletSupportWin8::isAvailable()) {
cfg.setUseWin8PointerInput(dialog->m_tabletSettings->m_page->radioWin8PointerInput->isChecked());
}
#endif
#endif
dialog->m_performanceSettings->save();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment