diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,9 @@ option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") +option(BUILD_DESIGNERPLUGIN "Build plugin for Qt Designer" ON) +add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Build plugin for Qt Designer") + add_definitions(-DTRANSLATION_DOMAIN=\"ktextwidgets5\") add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00) if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -90,6 +90,10 @@ ) install( FILES kregexpeditor/kregexpeditor.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR} ) +if (BUILD_DESIGNERPLUGIN) + add_subdirectory(designer) +endif() + if (BUILD_QCH) ecm_add_qch( KF5TextWidgets_QCH diff --git a/src/designer/CMakeLists.txt b/src/designer/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/src/designer/CMakeLists.txt @@ -0,0 +1,34 @@ +include(ECMAddQtDesignerPlugin) + +ecm_qtdesignerplugin_widget(KRichTextEdit + TOOLTIP "Rich Text Editor (KF5)" + GROUP "Input (KF5)" +) +ecm_qtdesignerplugin_widget(KRichTextWidget + TOOLTIP "Rich Text Widget (KF5)" + GROUP "Input (KF5)" +) +ecm_qtdesignerplugin_widget(KTextEdit + TOOLTIP "Improved QTextEdit (KF5)" + WHATSTHIS "An improved version of the QTextEdit with mail or system browser invocation support" + GROUP "Input (KF5)" +) +ecm_qtdesignerplugin_widget(KPluralHandlingSpinBox + TOOLTIP "A QSpinBox with plural handling for the suffix (KF5)" + WHATSTHIS "A QSpinBox with plural handling for the suffix" + GROUP "Input (KF5)" +) + +ecm_add_qtdesignerplugin(ktextwidgetswidgets + NAME KTextWidgetsWidgets + OUTPUT_NAME ktextwidgets5widgets + WIDGETS + KRichTextEdit + KRichTextWidget + KTextEdit + KPluralHandlingSpinBox + LINK_LIBRARIES + KF5::TextWidgets + INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer" + COMPONENT Devel +) diff --git a/src/designer/pics/ktextedit.png b/src/designer/pics/ktextedit.png new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@