diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,12 @@ set(HAVE_QTWEBENGINEWIDGETS ${Qt5WebEngineWidgets_FOUND}) configure_file(config-ksysguard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksysguard.h ) +if (${ECM_VERSION} VERSION_GREATER "5.61.0") + option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON) + add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer") +endif() + + add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_USE_QSTRINGBUILDER) add_definitions(-DQT_NO_CAST_FROM_ASCII) diff --git a/lsofui/CMakeLists.txt b/lsofui/CMakeLists.txt --- a/lsofui/CMakeLists.txt +++ b/lsofui/CMakeLists.txt @@ -25,15 +25,6 @@ install( FILES lsof.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/ksysguard COMPONENT Devel) -# set(ksysguardlsofwidgets_PART_SRCS -# ${CMAKE_CURRENT_BINARY_DIR}/ksysguardlsofwidgets.cpp -# ) -# -# kde4_add_widget_files(ksysguardlsofwidgets_PART_SRCS ksysguardlsof.widgets) -# -# add_library(ksysguardlsofwidgets MODULE ${ksysguardlsofwidgets_PART_SRCS}) -# -# target_link_libraries(ksysguardlsofwidgets lsofui) -# -# install(TARGETS ksysguardlsofwidgets DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer ) - +if(BUILD_DESIGNERPLUGIN) + add_subdirectory(designer) +endif() diff --git a/lsofui/designer/CMakeLists.txt b/lsofui/designer/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/lsofui/designer/CMakeLists.txt @@ -0,0 +1,17 @@ +include(ECMAddQtDesignerPlugin) + +ecm_qtdesignerplugin_widget(KLsofWidget + INCLUDE_FILE "lsof.h" + GROUP "KSysGuard" +) + +ecm_add_qtdesignerplugin(ksysguardlsofwidgets + NAME KSysGuardLsofWidgets + OUTPUT_NAME ksysguardlsof5widgets + WIDGETS + KLsofWidget + LINK_LIBRARIES + lsofui + INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer" + COMPONENT Devel +) diff --git a/lsofui/ksysguardlsof.widgets b/lsofui/ksysguardlsof.widgets deleted file mode 100644 --- a/lsofui/ksysguardlsof.widgets +++ /dev/null @@ -1,8 +0,0 @@ -[Global] -PluginName=KSysGuardLsofWidgets - -[KLsofWidget] -Group=KSysGuard (KDE) -ConstructorArgs=(parent) -IncludeFile=lsof.h - diff --git a/processui/CMakeLists.txt b/processui/CMakeLists.txt --- a/processui/CMakeLists.txt +++ b/processui/CMakeLists.txt @@ -74,21 +74,15 @@ install(TARGETS processui EXPORT libksysguardLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) -#---------------------- - -# kde4_add_widget_files(ksysguardwidgets_PART_SRCS ${ksysguard_WIDGETS}) -# -# add_library(ksysguardwidgets MODULE ${ksysguardwidgets_PART_SRCS}) -# -# target_link_libraries(ksysguardwidgets ${KDE4_KDEUI_LIBS} processui) -# -# install(TARGETS ksysguardwidgets DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer ) - install( FILES ProcessModel.h ProcessFilter.h KTextEditVT.h ksysguardprocesslist.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/ksysguard/processui COMPONENT Devel ) + +if(BUILD_DESIGNERPLUGIN) + add_subdirectory(designer) +endif() diff --git a/processui/designer/CMakeLists.txt b/processui/designer/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/processui/designer/CMakeLists.txt @@ -0,0 +1,26 @@ +include(ECMAddQtDesignerPlugin) + +ecm_qtdesignerplugin_widget(KSysGuardProcessList + INCLUDE_FILE "ksysguardprocesslist.h" + TOOLTIP "A list of processes (programs) running." + WHATSTHIS "A widget for showing all the processes running along with their memory usage and other details." + GROUP "KSysGuard" +) +ecm_qtdesignerplugin_widget(KTextEditVT + INCLUDE_FILE "KTextEditVT.h" + TOOLTIP "A text box suitable for displaying output from VT console-based programs." + WHATSTHIS "A widget for displaying out from console based programs. Some VT100 style commands are interpreted (For example to change the color) as well as some non-printable characters (backspace/delete etc will delete the last character.). For example the output from 'ls --color' can be displayed." + GROUP "KSysGuard" +) + +ecm_add_qtdesignerplugin(ksysguardwidgets + NAME KSysGuardWidgets + OUTPUT_NAME ksysguard5widgets + WIDGETS + KSysGuardProcessList + KTextEditVT + LINK_LIBRARIES + KF5::ProcessUi + INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer" + COMPONENT Devel +) diff --git a/processui/ksysguard.widgets b/processui/ksysguard.widgets deleted file mode 100644 --- a/processui/ksysguard.widgets +++ /dev/null @@ -1,17 +0,0 @@ -[Global] -PluginName=KSysGuardWidgets - - -[KSysGuardProcessList] -ToolTip=A list of processes (programs) running. -WhatsThis=A widget for showing all the processes running along with their memory usage and other details. -Group=KSysGuard (KDE) -ConstructorArgs=(parent) -IncludeFile=ksysguardprocesslist.h - -[KTextEditVT] -ToolTip=A text box suitable for displaying output from VT console-based programs. -WhatsThis=A widget for displaying out from console based programs. Some VT100 style commands are interpreted (For example to change the color) as well as some non-printable characters (backspace/delete etc will delete the last character.). For example the output from 'ls --color' can be displayed. -Group=KSysGuard (KDE) -ConstructorArgs=(parent) -IncludeFile=KTextEditVT.h diff --git a/signalplotter/CMakeLists.txt b/signalplotter/CMakeLists.txt --- a/signalplotter/CMakeLists.txt +++ b/signalplotter/CMakeLists.txt @@ -27,14 +27,8 @@ install(TARGETS ksignalplotter EXPORT libksysguardLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) -#---------------------- - -# kde4_add_widget_files(ksignalplotterwidgets_PART_SRCS ${ksignalplotter_WIDGETS}) -# -# add_library(ksignalplotterwidgets MODULE ${ksignalplotterwidgets_PART_SRCS}) -# -# target_link_libraries(ksignalplotterwidgets ${KDE4_KDEUI_LIBS} ksignalplotter) -# -# install(TARGETS ksignalplotterwidgets DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer) - install(FILES ksignalplotter.h DESTINATION ${KDE_INSTALL_INCLUDEDIR}/ksysguard COMPONENT Devel) + +if(BUILD_DESIGNERPLUGIN) + add_subdirectory(designer) +endif() diff --git a/signalplotter/designer/CMakeLists.txt b/signalplotter/designer/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/signalplotter/designer/CMakeLists.txt @@ -0,0 +1,17 @@ +include(ECMAddQtDesignerPlugin) + +ecm_qtdesignerplugin_widget(KSignalPlotter + TOOLTIP "A graph plotter widget for plotting continuously incoming data" + GROUP "KSysGuard" +) + +ecm_add_qtdesignerplugin(ksignalplotterwidgets + NAME KSignalPlotterWidgets + OUTPUT_NAME ksignalplotter5widgets + WIDGETS + KSignalPlotter + LINK_LIBRARIES + ksignalplotter + INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer" + COMPONENT Devel +) diff --git a/signalplotter/ksignalplotter.widgets b/signalplotter/ksignalplotter.widgets deleted file mode 100644 --- a/signalplotter/ksignalplotter.widgets +++ /dev/null @@ -1,10 +0,0 @@ -[Global] -PluginName=KSignalPlotterWidgets - - -[KSignalPlotter] -ToolTip=A graph plotter widget for plotting continuously incoming data -Group=KSysGuard (KDE) -ConstructorArgs=(parent) -IncludeFile=ksignalplotter.h -