diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,10 @@ 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(-DQT_NO_FOREACH) if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") ecm_install_po_files_as_qm(po) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,6 +77,10 @@ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KCompletion COMPONENT Devel ) +if(BUILD_DESIGNERPLUGIN) + add_subdirectory(designer) +endif() + if(BUILD_QCH) ecm_add_qch( KF5Completion_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,28 @@ +include(ECMAddQtDesignerPlugin) + +ecm_qtdesignerplugin_widget(KComboBox + TOOLTIP "Combo Box (KF5)" + GROUP "Input (KF5)" +) +ecm_qtdesignerplugin_widget(KHistoryComboBox + TOOLTIP "A combobox for offering a history and completion (KF5)" + WHATSTHIS "A combobox which implements a history like a unix shell" + GROUP "Input (KF5)" +) +ecm_qtdesignerplugin_widget(KLineEdit + TOOLTIP "Line Edit (KF5)" + GROUP "Input (KF5)" +) + +ecm_add_qtdesignerplugin(kcompletionwidgets + NAME KCompletionWidgets + OUTPUT_NAME kcompletion5widgets + WIDGETS + KComboBox + KHistoryComboBox + KLineEdit + LINK_LIBRARIES + KF5::Completion + INSTALL_DESTINATION "${KDE_INSTALL_QTPLUGINDIR}/designer" + COMPONENT Devel +) diff --git a/src/designer/pics/kcombobox.png b/src/designer/pics/kcombobox.png new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@