remove designer tool
new one will be coded post 4.12 Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
|
@ -112,12 +112,8 @@ endif()
|
||||||
set(KATIE_TYPE SHARED CACHE STRING "Build type")
|
set(KATIE_TYPE SHARED CACHE STRING "Build type")
|
||||||
|
|
||||||
# components and tools that will be build, changed depending on the requirements availability
|
# components and tools that will be build, changed depending on the requirements availability
|
||||||
# NOTE: excluding Designer and DesignerComponents as they were never used as public components,
|
|
||||||
# currently only used by the designer tool. if needed for something they can just be added here,
|
|
||||||
# Q_<component>_EXPORT must be introduced and genmap.py adjusted - the rest of the build system
|
|
||||||
# has everything in place.
|
|
||||||
set(KATIE_COMPONENTS "Core Gui Declarative Network Svg Xml Script ScriptTools Test UiTools")
|
set(KATIE_COMPONENTS "Core Gui Declarative Network Svg Xml Script ScriptTools Test UiTools")
|
||||||
set(KATIE_TOOLS "moc uic rcc designer qscript qtconfig")
|
set(KATIE_TOOLS "moc uic rcc qscript qtconfig")
|
||||||
|
|
||||||
set(KATIE_HEADERS_PATH "${CMAKE_INSTALL_FULL_INCLUDEDIR}/katie" CACHE PATH "Headers installation path")
|
set(KATIE_HEADERS_PATH "${CMAKE_INSTALL_FULL_INCLUDEDIR}/katie" CACHE PATH "Headers installation path")
|
||||||
set(KATIE_LIBRARIES_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Libraries installation path")
|
set(KATIE_LIBRARIES_PATH "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Libraries installation path")
|
||||||
|
@ -450,15 +446,12 @@ configure_file(
|
||||||
${CMAKE_BINARY_DIR}/include/qconfig.cpp
|
${CMAKE_BINARY_DIR}/include/qconfig.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(src/shared)
|
|
||||||
|
|
||||||
add_subdirectory(src/core)
|
add_subdirectory(src/core)
|
||||||
add_subdirectory(src/xml)
|
add_subdirectory(src/xml)
|
||||||
if(WITH_DBUS AND DBUS_FOUND)
|
if(WITH_DBUS AND DBUS_FOUND)
|
||||||
add_subdirectory(src/dbus)
|
add_subdirectory(src/dbus)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(src/declarative)
|
add_subdirectory(src/declarative)
|
||||||
add_subdirectory(src/designer)
|
|
||||||
add_subdirectory(src/gui)
|
add_subdirectory(src/gui)
|
||||||
add_subdirectory(src/imports)
|
add_subdirectory(src/imports)
|
||||||
add_subdirectory(src/network)
|
add_subdirectory(src/network)
|
||||||
|
@ -484,10 +477,7 @@ if(KATIE_UTILS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# the macro calls bellow are generated via the incfsck script
|
# the macro calls bellow are generated via the incfsck script
|
||||||
katie_generate_obsolete(QAbstractExtensionFactory QtDesigner extension.h)
|
|
||||||
katie_generate_obsolete(QAbstractExtensionManager QtDesigner extension.h)
|
|
||||||
katie_generate_obsolete(QAbstractFileEngineIterator QtCore qabstractfileengine.h)
|
katie_generate_obsolete(QAbstractFileEngineIterator QtCore qabstractfileengine.h)
|
||||||
katie_generate_obsolete(QAbstractFormBuilder QtDesigner abstractformbuilder.h)
|
|
||||||
katie_generate_obsolete(QAbstractGraphicsShapeItem QtGui qgraphicsitem.h)
|
katie_generate_obsolete(QAbstractGraphicsShapeItem QtGui qgraphicsitem.h)
|
||||||
katie_generate_obsolete(QAbstractListModel QtCore qabstractitemmodel.h)
|
katie_generate_obsolete(QAbstractListModel QtCore qabstractitemmodel.h)
|
||||||
katie_generate_obsolete(QAbstractTableModel QtCore qabstractitemmodel.h)
|
katie_generate_obsolete(QAbstractTableModel QtCore qabstractitemmodel.h)
|
||||||
|
@ -506,8 +496,8 @@ katie_generate_obsolete(QCloseEvent QtGui qevent.h)
|
||||||
katie_generate_obsolete(QContextMenuEvent QtGui qevent.h)
|
katie_generate_obsolete(QContextMenuEvent QtGui qevent.h)
|
||||||
katie_generate_obsolete(QContiguousCacheData QtCore qcontiguouscache.h)
|
katie_generate_obsolete(QContiguousCacheData QtCore qcontiguouscache.h)
|
||||||
katie_generate_obsolete(QContiguousCacheTypedData QtCore qcontiguouscache.h)
|
katie_generate_obsolete(QContiguousCacheTypedData QtCore qcontiguouscache.h)
|
||||||
katie_generate_obsolete(QCustomWidget QtUiTools customwidget.h)
|
|
||||||
katie_generate_obsolete(QCustomWidgetPlugin QtUiTools customwidget.h)
|
katie_generate_obsolete(QCustomWidgetPlugin QtUiTools customwidget.h)
|
||||||
|
katie_generate_obsolete(QCustomWidget QtUiTools customwidget.h)
|
||||||
katie_generate_obsolete(QDateEdit QtGui qdatetimeedit.h)
|
katie_generate_obsolete(QDateEdit QtGui qdatetimeedit.h)
|
||||||
katie_generate_obsolete(QDate QtCore qdatetime.h)
|
katie_generate_obsolete(QDate QtCore qdatetime.h)
|
||||||
katie_generate_obsolete(QDBusAbstractInterfaceBase QtDBus qdbusabstractinterface.h)
|
katie_generate_obsolete(QDBusAbstractInterfaceBase QtDBus qdbusabstractinterface.h)
|
||||||
|
@ -521,33 +511,6 @@ katie_generate_obsolete(QDeclarativeListProperty QtDeclarative qdeclarativelist.
|
||||||
katie_generate_obsolete(QDeclarativeListReference QtDeclarative qdeclarativelist.h)
|
katie_generate_obsolete(QDeclarativeListReference QtDeclarative qdeclarativelist.h)
|
||||||
katie_generate_obsolete(QDeclarativeProperties QtDeclarative qdeclarativeproperty.h)
|
katie_generate_obsolete(QDeclarativeProperties QtDeclarative qdeclarativeproperty.h)
|
||||||
katie_generate_obsolete(QDeclarativeTypeInfo QtDeclarative qdeclarativeprivate.h)
|
katie_generate_obsolete(QDeclarativeTypeInfo QtDeclarative qdeclarativeprivate.h)
|
||||||
katie_generate_obsolete(QDesignerActionEditorInterface QtDesigner abstractactioneditor.h)
|
|
||||||
katie_generate_obsolete(QDesignerComponents QtDesigner qdesigner_components.h)
|
|
||||||
katie_generate_obsolete(QDesignerContainerExtension QtDesigner container.h)
|
|
||||||
katie_generate_obsolete(QDesignerDnDItemInterface QtDesigner abstractdnditem.h)
|
|
||||||
katie_generate_obsolete(QDesignerDynamicPropertySheetExtension QtDesigner dynamicpropertysheet.h)
|
|
||||||
katie_generate_obsolete(QDesignerExtraInfoExtension QtDesigner extrainfo.h)
|
|
||||||
katie_generate_obsolete(QDesignerFormEditorInterface QtDesigner abstractformeditor.h)
|
|
||||||
katie_generate_obsolete(QDesignerFormEditorPluginInterface QtDesigner abstractformeditorplugin.h)
|
|
||||||
katie_generate_obsolete(QDesignerFormWindowCursorInterface QtDesigner abstractformwindowcursor.h)
|
|
||||||
katie_generate_obsolete(QDesignerFormWindowInterface QtDesigner abstractformwindow.h)
|
|
||||||
katie_generate_obsolete(QDesignerFormWindowManagerInterface QtDesigner abstractformwindowmanager.h)
|
|
||||||
katie_generate_obsolete(QDesignerFormWindowToolInterface QtDesigner abstractformwindowtool.h)
|
|
||||||
katie_generate_obsolete(QDesignerIconCacheInterface QtDesigner abstracticoncache.h)
|
|
||||||
katie_generate_obsolete(QDesignerIntegrationInterface QtDesigner abstractintegration.h)
|
|
||||||
katie_generate_obsolete(QDesignerLayoutDecorationExtension QtDesigner layoutdecoration.h)
|
|
||||||
katie_generate_obsolete(QDesignerMemberSheetExtension QtDesigner membersheet.h)
|
|
||||||
katie_generate_obsolete(QDesignerMetaDataBaseInterface QtDesigner abstractmetadatabase.h)
|
|
||||||
katie_generate_obsolete(QDesignerMetaDataBaseItemInterface QtDesigner abstractmetadatabase.h)
|
|
||||||
katie_generate_obsolete(QDesignerObjectInspectorInterface QtDesigner abstractobjectinspector.h)
|
|
||||||
katie_generate_obsolete(QDesignerPromotionInterface QtDesigner abstractpromotioninterface.h)
|
|
||||||
katie_generate_obsolete(QDesignerPropertyEditorInterface QtDesigner abstractpropertyeditor.h)
|
|
||||||
katie_generate_obsolete(QDesignerPropertySheetExtension QtDesigner propertysheet.h)
|
|
||||||
katie_generate_obsolete(QDesignerTaskMenuExtension QtDesigner taskmenu.h)
|
|
||||||
katie_generate_obsolete(QDesignerWidgetBoxInterface QtDesigner abstractwidgetbox.h)
|
|
||||||
katie_generate_obsolete(QDesignerWidgetDataBaseInterface QtDesigner abstractwidgetdatabase.h)
|
|
||||||
katie_generate_obsolete(QDesignerWidgetDataBaseItemInterface QtDesigner abstractwidgetdatabase.h)
|
|
||||||
katie_generate_obsolete(QDesignerWidgetFactoryInterface QtDesigner abstractwidgetfactory.h)
|
|
||||||
katie_generate_obsolete(QDomAttr QtXml qdom.h)
|
katie_generate_obsolete(QDomAttr QtXml qdom.h)
|
||||||
katie_generate_obsolete(QDomCDATASection QtXml qdom.h)
|
katie_generate_obsolete(QDomCDATASection QtXml qdom.h)
|
||||||
katie_generate_obsolete(QDomCharacterData QtXml qdom.h)
|
katie_generate_obsolete(QDomCharacterData QtXml qdom.h)
|
||||||
|
@ -575,13 +538,11 @@ katie_generate_obsolete(QDynamicPropertyChangeEvent QtCore qcoreevent.h)
|
||||||
katie_generate_obsolete(QEvent QtCore qcoreevent.h)
|
katie_generate_obsolete(QEvent QtCore qcoreevent.h)
|
||||||
katie_generate_obsolete(QEventSizeOfChecker QtTest qtestspontaneevent.h)
|
katie_generate_obsolete(QEventSizeOfChecker QtTest qtestspontaneevent.h)
|
||||||
katie_generate_obsolete(QExplicitlySharedDataPointer QtCore qsharedpointer.h)
|
katie_generate_obsolete(QExplicitlySharedDataPointer QtCore qsharedpointer.h)
|
||||||
katie_generate_obsolete(QExtensionFactory QtDesigner default_extensionfactory.h)
|
|
||||||
katie_generate_obsolete(QFileInfoList QtCore qfileinfo.h)
|
katie_generate_obsolete(QFileInfoList QtCore qfileinfo.h)
|
||||||
katie_generate_obsolete(QFlag QtCore qglobal.h)
|
katie_generate_obsolete(QFlag QtCore qglobal.h)
|
||||||
katie_generate_obsolete(QFlags QtCore qglobal.h)
|
katie_generate_obsolete(QFlags QtCore qglobal.h)
|
||||||
katie_generate_obsolete(QFocusEvent QtGui qevent.h)
|
katie_generate_obsolete(QFocusEvent QtGui qevent.h)
|
||||||
katie_generate_obsolete(QFontMetricsF QtGui qfontmetrics.h)
|
katie_generate_obsolete(QFontMetricsF QtGui qfontmetrics.h)
|
||||||
katie_generate_obsolete(QFormBuilder QtDesigner formbuilder.h)
|
|
||||||
katie_generate_obsolete(QGenericArgument QtCore qobjectdefs.h)
|
katie_generate_obsolete(QGenericArgument QtCore qobjectdefs.h)
|
||||||
katie_generate_obsolete(QGenericReturnArgument QtCore qobjectdefs.h)
|
katie_generate_obsolete(QGenericReturnArgument QtCore qobjectdefs.h)
|
||||||
katie_generate_obsolete(QGradient QtGui qbrush.h)
|
katie_generate_obsolete(QGradient QtGui qbrush.h)
|
||||||
|
|
|
@ -42,7 +42,6 @@ set(unifdef_arguments
|
||||||
-UKtScriptTools_EXPORTS
|
-UKtScriptTools_EXPORTS
|
||||||
-UKtDBus_EXPORTS
|
-UKtDBus_EXPORTS
|
||||||
-UKtUiTools_EXPORTS
|
-UKtUiTools_EXPORTS
|
||||||
-UKtDesigner_EXPORTS
|
|
||||||
)
|
)
|
||||||
|
|
||||||
message(STATUS "Optimizing header in: ${headers_directory}")
|
message(STATUS "Optimizing header in: ${headers_directory}")
|
||||||
|
|
|
@ -359,152 +359,6 @@ include/katie/QtDeclarative/qdeclarativepropertyvalueinterceptor.h
|
||||||
include/katie/QtDeclarative/qdeclarativepropertyvaluesource.h
|
include/katie/QtDeclarative/qdeclarativepropertyvaluesource.h
|
||||||
include/katie/QtDeclarative/qdeclarativescriptstring.h
|
include/katie/QtDeclarative/qdeclarativescriptstring.h
|
||||||
include/katie/QtDeclarative/qdeclarativeview.h
|
include/katie/QtDeclarative/qdeclarativeview.h
|
||||||
include/katie/QtDesigner/QAbstractExtensionFactory
|
|
||||||
include/katie/QtDesigner/QAbstractExtensionManager
|
|
||||||
include/katie/QtDesigner/QAbstractFormBuilder
|
|
||||||
include/katie/QtDesigner/QDesignerActionEditorInterface
|
|
||||||
include/katie/QtDesigner/QDesignerComponents
|
|
||||||
include/katie/QtDesigner/QDesignerContainerExtension
|
|
||||||
include/katie/QtDesigner/QDesignerDnDItemInterface
|
|
||||||
include/katie/QtDesigner/QDesignerDynamicPropertySheetExtension
|
|
||||||
include/katie/QtDesigner/QDesignerExtraInfoExtension
|
|
||||||
include/katie/QtDesigner/QDesignerFormEditorInterface
|
|
||||||
include/katie/QtDesigner/QDesignerFormEditorPluginInterface
|
|
||||||
include/katie/QtDesigner/QDesignerFormWindowCursorInterface
|
|
||||||
include/katie/QtDesigner/QDesignerFormWindowInterface
|
|
||||||
include/katie/QtDesigner/QDesignerFormWindowManagerInterface
|
|
||||||
include/katie/QtDesigner/QDesignerFormWindowToolInterface
|
|
||||||
include/katie/QtDesigner/QDesignerIconCacheInterface
|
|
||||||
include/katie/QtDesigner/QDesignerIntegrationInterface
|
|
||||||
include/katie/QtDesigner/QDesignerLayoutDecorationExtension
|
|
||||||
include/katie/QtDesigner/QDesignerMemberSheetExtension
|
|
||||||
include/katie/QtDesigner/QDesignerMetaDataBaseInterface
|
|
||||||
include/katie/QtDesigner/QDesignerMetaDataBaseItemInterface
|
|
||||||
include/katie/QtDesigner/QDesignerObjectInspectorInterface
|
|
||||||
include/katie/QtDesigner/QDesignerPromotionInterface
|
|
||||||
include/katie/QtDesigner/QDesignerPropertyEditorInterface
|
|
||||||
include/katie/QtDesigner/QDesignerPropertySheetExtension
|
|
||||||
include/katie/QtDesigner/QDesignerTaskMenuExtension
|
|
||||||
include/katie/QtDesigner/QDesignerWidgetBoxInterface
|
|
||||||
include/katie/QtDesigner/QDesignerWidgetDataBaseInterface
|
|
||||||
include/katie/QtDesigner/QDesignerWidgetDataBaseItemInterface
|
|
||||||
include/katie/QtDesigner/QDesignerWidgetFactoryInterface
|
|
||||||
include/katie/QtDesigner/QExtensionFactory
|
|
||||||
include/katie/QtDesigner/QExtensionManager
|
|
||||||
include/katie/QtDesigner/QFormBuilder
|
|
||||||
include/katie/QtDesigner/QtDesigner
|
|
||||||
include/katie/QtDesigner/abstractactioneditor.h
|
|
||||||
include/katie/QtDesigner/abstractdnditem.h
|
|
||||||
include/katie/QtDesigner/abstractformeditor.h
|
|
||||||
include/katie/QtDesigner/abstractformeditorplugin.h
|
|
||||||
include/katie/QtDesigner/abstractformwindow.h
|
|
||||||
include/katie/QtDesigner/abstractformwindowcursor.h
|
|
||||||
include/katie/QtDesigner/abstractformwindowmanager.h
|
|
||||||
include/katie/QtDesigner/abstractformwindowtool.h
|
|
||||||
include/katie/QtDesigner/abstracticoncache.h
|
|
||||||
include/katie/QtDesigner/abstractintegration.h
|
|
||||||
include/katie/QtDesigner/abstractmetadatabase.h
|
|
||||||
include/katie/QtDesigner/abstractobjectinspector.h
|
|
||||||
include/katie/QtDesigner/abstractpromotioninterface.h
|
|
||||||
include/katie/QtDesigner/abstractpropertyeditor.h
|
|
||||||
include/katie/QtDesigner/abstractwidgetbox.h
|
|
||||||
include/katie/QtDesigner/abstractwidgetdatabase.h
|
|
||||||
include/katie/QtDesigner/abstractwidgetfactory.h
|
|
||||||
include/katie/QtDesigner/container.h
|
|
||||||
include/katie/QtDesigner/customwidget.h
|
|
||||||
include/katie/QtDesigner/default_extensionfactory.h
|
|
||||||
include/katie/QtDesigner/dynamicpropertysheet.h
|
|
||||||
include/katie/QtDesigner/extension.h
|
|
||||||
include/katie/QtDesigner/extrainfo.h
|
|
||||||
include/katie/QtDesigner/formbuilder.h
|
|
||||||
include/katie/QtDesigner/layoutdecoration.h
|
|
||||||
include/katie/QtDesigner/membersheet.h
|
|
||||||
include/katie/QtDesigner/propertysheet.h
|
|
||||||
include/katie/QtDesigner/qdesigner_components.h
|
|
||||||
include/katie/QtDesigner/qdesigner_components_global.h
|
|
||||||
include/katie/QtDesigner/qdesignercustomwidgetinterface.h
|
|
||||||
include/katie/QtDesigner/qdesignerexportwidget.h
|
|
||||||
include/katie/QtDesigner/qextensionmanager.h
|
|
||||||
include/katie/QtDesigner/taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/QtDesignerComponents
|
|
||||||
include/katie/QtDesignerComponents/brushpropertymanager.h
|
|
||||||
include/katie/QtDesignerComponents/buddyeditor.h
|
|
||||||
include/katie/QtDesignerComponents/buddyeditor_global.h
|
|
||||||
include/katie/QtDesignerComponents/buddyeditor_plugin.h
|
|
||||||
include/katie/QtDesignerComponents/buddyeditor_tool.h
|
|
||||||
include/katie/QtDesignerComponents/button_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/combobox_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/containerwidget_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/default_actionprovider.h
|
|
||||||
include/katie/QtDesignerComponents/default_container.h
|
|
||||||
include/katie/QtDesignerComponents/default_layoutdecoration.h
|
|
||||||
include/katie/QtDesignerComponents/designerpropertymanager.h
|
|
||||||
include/katie/QtDesignerComponents/deviceprofiledialog.h
|
|
||||||
include/katie/QtDesignerComponents/dpi_chooser.h
|
|
||||||
include/katie/QtDesignerComponents/embeddedoptionspage.h
|
|
||||||
include/katie/QtDesignerComponents/fontpropertymanager.h
|
|
||||||
include/katie/QtDesignerComponents/formeditor.h
|
|
||||||
include/katie/QtDesignerComponents/formeditor_global.h
|
|
||||||
include/katie/QtDesignerComponents/formeditor_optionspage.h
|
|
||||||
include/katie/QtDesignerComponents/formwindow.h
|
|
||||||
include/katie/QtDesignerComponents/formwindow_dnditem.h
|
|
||||||
include/katie/QtDesignerComponents/formwindow_widgetstack.h
|
|
||||||
include/katie/QtDesignerComponents/formwindowcursor.h
|
|
||||||
include/katie/QtDesignerComponents/formwindowmanager.h
|
|
||||||
include/katie/QtDesignerComponents/formwindowsettings.h
|
|
||||||
include/katie/QtDesignerComponents/groupbox_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/iconcache.h
|
|
||||||
include/katie/QtDesignerComponents/inplace_editor.h
|
|
||||||
include/katie/QtDesignerComponents/inplace_widget_helper.h
|
|
||||||
include/katie/QtDesignerComponents/itemlisteditor.h
|
|
||||||
include/katie/QtDesignerComponents/itemview_propertysheet.h
|
|
||||||
include/katie/QtDesignerComponents/label_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/layout_propertysheet.h
|
|
||||||
include/katie/QtDesignerComponents/layouttaskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/line_propertysheet.h
|
|
||||||
include/katie/QtDesignerComponents/lineedit_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/listwidget_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/listwidgeteditor.h
|
|
||||||
include/katie/QtDesignerComponents/menutaskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/newdynamicpropertydialog.h
|
|
||||||
include/katie/QtDesignerComponents/objectinspector.h
|
|
||||||
include/katie/QtDesignerComponents/objectinspector_global.h
|
|
||||||
include/katie/QtDesignerComponents/paletteeditor.h
|
|
||||||
include/katie/QtDesignerComponents/paletteeditorbutton.h
|
|
||||||
include/katie/QtDesignerComponents/previewactiongroup.h
|
|
||||||
include/katie/QtDesignerComponents/previewframe.h
|
|
||||||
include/katie/QtDesignerComponents/previewwidget.h
|
|
||||||
include/katie/QtDesignerComponents/propertyeditor.h
|
|
||||||
include/katie/QtDesignerComponents/propertyeditor_global.h
|
|
||||||
include/katie/QtDesignerComponents/qdesigner_resource.h
|
|
||||||
include/katie/QtDesignerComponents/qdesignerundostack.h
|
|
||||||
include/katie/QtDesignerComponents/qlayoutwidget_propertysheet.h
|
|
||||||
include/katie/QtDesignerComponents/qlonglongvalidator.h
|
|
||||||
include/katie/QtDesignerComponents/qmainwindow_container.h
|
|
||||||
include/katie/QtDesignerComponents/qmdiarea_container.h
|
|
||||||
include/katie/QtDesignerComponents/qwizard_container.h
|
|
||||||
include/katie/QtDesignerComponents/spacer_propertysheet.h
|
|
||||||
include/katie/QtDesignerComponents/stringlisteditor.h
|
|
||||||
include/katie/QtDesignerComponents/stringlisteditorbutton.h
|
|
||||||
include/katie/QtDesignerComponents/tablewidget_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/tablewidgeteditor.h
|
|
||||||
include/katie/QtDesignerComponents/tabordereditor.h
|
|
||||||
include/katie/QtDesignerComponents/tabordereditor_global.h
|
|
||||||
include/katie/QtDesignerComponents/tabordereditor_plugin.h
|
|
||||||
include/katie/QtDesignerComponents/tabordereditor_tool.h
|
|
||||||
include/katie/QtDesignerComponents/taskmenu_component.h
|
|
||||||
include/katie/QtDesignerComponents/templateoptionspage.h
|
|
||||||
include/katie/QtDesignerComponents/textedit_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/tool_widgeteditor.h
|
|
||||||
include/katie/QtDesignerComponents/toolbar_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/treewidget_taskmenu.h
|
|
||||||
include/katie/QtDesignerComponents/treewidgeteditor.h
|
|
||||||
include/katie/QtDesignerComponents/widgetbox.h
|
|
||||||
include/katie/QtDesignerComponents/widgetbox_dnditem.h
|
|
||||||
include/katie/QtDesignerComponents/widgetbox_global.h
|
|
||||||
include/katie/QtDesignerComponents/widgetboxcategorylistview.h
|
|
||||||
include/katie/QtDesignerComponents/widgetboxtreewidget.h
|
|
||||||
include/katie/QtDesignerComponents/widgetselection.h
|
|
||||||
include/katie/QtGui/QAbstractAnimation
|
include/katie/QtGui/QAbstractAnimation
|
||||||
include/katie/QtGui/QAbstractButton
|
include/katie/QtGui/QAbstractButton
|
||||||
include/katie/QtGui/QAbstractGraphicsShapeItem
|
include/katie/QtGui/QAbstractGraphicsShapeItem
|
||||||
|
@ -1243,12 +1097,6 @@ lib/libKtDBus.so.4.12.0
|
||||||
lib/libKtDeclarative.so
|
lib/libKtDeclarative.so
|
||||||
lib/libKtDeclarative.so.4.12
|
lib/libKtDeclarative.so.4.12
|
||||||
lib/libKtDeclarative.so.4.12.0
|
lib/libKtDeclarative.so.4.12.0
|
||||||
lib/libKtDesigner.so
|
|
||||||
lib/libKtDesigner.so.4.12
|
|
||||||
lib/libKtDesigner.so.4.12.0
|
|
||||||
lib/libKtDesignerComponents.so
|
|
||||||
lib/libKtDesignerComponents.so.4.12
|
|
||||||
lib/libKtDesignerComponents.so.4.12.0
|
|
||||||
lib/libKtGui.so
|
lib/libKtGui.so
|
||||||
lib/libKtGui.so.4.12
|
lib/libKtGui.so.4.12
|
||||||
lib/libKtGui.so.4.12.0
|
lib/libKtGui.so.4.12.0
|
||||||
|
@ -1276,8 +1124,6 @@ lib/libKtXml.so.4.12.0
|
||||||
libdata/pkgconfig/KtCore.pc
|
libdata/pkgconfig/KtCore.pc
|
||||||
libdata/pkgconfig/KtDBus.pc
|
libdata/pkgconfig/KtDBus.pc
|
||||||
libdata/pkgconfig/KtDeclarative.pc
|
libdata/pkgconfig/KtDeclarative.pc
|
||||||
libdata/pkgconfig/KtDesigner.pc
|
|
||||||
libdata/pkgconfig/KtDesignerComponents.pc
|
|
||||||
libdata/pkgconfig/KtGui.pc
|
libdata/pkgconfig/KtGui.pc
|
||||||
libdata/pkgconfig/KtNetwork.pc
|
libdata/pkgconfig/KtNetwork.pc
|
||||||
libdata/pkgconfig/KtScript.pc
|
libdata/pkgconfig/KtScript.pc
|
||||||
|
|
|
@ -8,7 +8,6 @@ components = {
|
||||||
'Gui': 'Q_GUI_EXPORT',
|
'Gui': 'Q_GUI_EXPORT',
|
||||||
'DBus': 'Q_DBUS_EXPORT',
|
'DBus': 'Q_DBUS_EXPORT',
|
||||||
'Declarative': 'Q_DECLARATIVE_EXPORT',
|
'Declarative': 'Q_DECLARATIVE_EXPORT',
|
||||||
'Designer': 'Q_DESIGNER_EXPORT|QDESIGNER_COMPONENTS_EXPORT|QT_FORMEDITOR_EXPORT|QT_PROPERTYEDITOR_EXPORT|QT_SIGNALSLOTEDITOR_EXPORT|QT_OBJECTINSPECTOR_EXPORT|QT_WIDGETBOX_EXPORT|QT_BUDDYEDITOR_EXPORT|QT_TABORDEREDITOR_EXPORT|QT_TASKMENU_EXPORT',
|
|
||||||
'Network': 'Q_NETWORK_EXPORT',
|
'Network': 'Q_NETWORK_EXPORT',
|
||||||
'Svg': 'Q_SVG_EXPORT',
|
'Svg': 'Q_SVG_EXPORT',
|
||||||
'Xml': 'Q_XML_EXPORT',
|
'Xml': 'Q_XML_EXPORT',
|
||||||
|
|
|
@ -114,40 +114,6 @@ incmap = {
|
||||||
'QDeclarativeProperties': 'qdeclarativeproperty.h',
|
'QDeclarativeProperties': 'qdeclarativeproperty.h',
|
||||||
'QDeclarativeTypeInfo': 'qdeclarativeprivate.h',
|
'QDeclarativeTypeInfo': 'qdeclarativeprivate.h',
|
||||||
},
|
},
|
||||||
'QtDesigner': {
|
|
||||||
'QAbstractExtensionFactory': 'extension.h',
|
|
||||||
'QAbstractExtensionManager': 'extension.h',
|
|
||||||
'QAbstractFormBuilder': 'abstractformbuilder.h',
|
|
||||||
'QDesignerActionEditorInterface': 'abstractactioneditor.h',
|
|
||||||
'QDesignerComponents': 'qdesigner_components.h',
|
|
||||||
'QDesignerContainerExtension': 'container.h',
|
|
||||||
'QDesignerDnDItemInterface': 'abstractdnditem.h',
|
|
||||||
'QDesignerDynamicPropertySheetExtension': 'dynamicpropertysheet.h',
|
|
||||||
'QDesignerExtraInfoExtension': 'extrainfo.h',
|
|
||||||
'QDesignerFormEditorInterface': 'abstractformeditor.h',
|
|
||||||
'QDesignerFormEditorPluginInterface': 'abstractformeditorplugin.h',
|
|
||||||
'QDesignerFormWindowCursorInterface': 'abstractformwindowcursor.h',
|
|
||||||
'QDesignerFormWindowInterface': 'abstractformwindow.h',
|
|
||||||
'QDesignerFormWindowManagerInterface': 'abstractformwindowmanager.h',
|
|
||||||
'QDesignerFormWindowToolInterface': 'abstractformwindowtool.h',
|
|
||||||
'QDesignerIconCacheInterface': 'abstracticoncache.h',
|
|
||||||
'QDesignerIntegrationInterface': 'abstractintegration.h',
|
|
||||||
'QDesignerLayoutDecorationExtension': 'layoutdecoration.h',
|
|
||||||
'QDesignerMemberSheetExtension': 'membersheet.h',
|
|
||||||
'QDesignerMetaDataBaseInterface': 'abstractmetadatabase.h',
|
|
||||||
'QDesignerMetaDataBaseItemInterface': 'abstractmetadatabase.h',
|
|
||||||
'QDesignerObjectInspectorInterface': 'abstractobjectinspector.h',
|
|
||||||
'QDesignerPromotionInterface': 'abstractpromotioninterface.h',
|
|
||||||
'QDesignerPropertyEditorInterface': 'abstractpropertyeditor.h',
|
|
||||||
'QDesignerPropertySheetExtension': 'propertysheet.h',
|
|
||||||
'QDesignerTaskMenuExtension': 'taskmenu.h',
|
|
||||||
'QDesignerWidgetBoxInterface': 'abstractwidgetbox.h',
|
|
||||||
'QDesignerWidgetDataBaseInterface': 'abstractwidgetdatabase.h',
|
|
||||||
'QDesignerWidgetDataBaseItemInterface': 'abstractwidgetdatabase.h',
|
|
||||||
'QDesignerWidgetFactoryInterface': 'abstractwidgetfactory.h',
|
|
||||||
'QExtensionFactory': 'default_extensionfactory.h',
|
|
||||||
'QFormBuilder': 'formbuilder.h',
|
|
||||||
},
|
|
||||||
'QtGui': {
|
'QtGui': {
|
||||||
'QAbstractGraphicsShapeItem': 'qgraphicsitem.h',
|
'QAbstractGraphicsShapeItem': 'qgraphicsitem.h',
|
||||||
'QAbstractUndoItem': 'qtextdocument.h',
|
'QAbstractUndoItem': 'qtextdocument.h',
|
||||||
|
|
|
@ -7,16 +7,14 @@ classlist = [
|
||||||
"QAbstractAnimation",
|
"QAbstractAnimation",
|
||||||
"QAbstractButton",
|
"QAbstractButton",
|
||||||
"QAbstractEventDispatcher",
|
"QAbstractEventDispatcher",
|
||||||
"QAbstractExtensionFactory",
|
|
||||||
"QAbstractExtensionManager",
|
|
||||||
"QAbstractFileEngine",
|
"QAbstractFileEngine",
|
||||||
"QAbstractFileEngineIterator",
|
"QAbstractFileEngineIterator",
|
||||||
"QAbstractFormBuilder",
|
|
||||||
"QAbstractGraphicsShapeItem",
|
"QAbstractGraphicsShapeItem",
|
||||||
"QAbstractItemDelegate",
|
"QAbstractItemDelegate",
|
||||||
"QAbstractItemModel",
|
"QAbstractItemModel",
|
||||||
"QAbstractItemView",
|
"QAbstractItemView",
|
||||||
"QAbstractListModel",
|
"QAbstractListModel",
|
||||||
|
"QAbstractNetworkCache",
|
||||||
"QAbstractPageSetupDialog",
|
"QAbstractPageSetupDialog",
|
||||||
"QAbstractPrintDialog",
|
"QAbstractPrintDialog",
|
||||||
"QAbstractProxyModel",
|
"QAbstractProxyModel",
|
||||||
|
@ -27,6 +25,30 @@ classlist = [
|
||||||
"QAbstractTableModel",
|
"QAbstractTableModel",
|
||||||
"QAbstractTextDocumentLayout",
|
"QAbstractTextDocumentLayout",
|
||||||
"QAbstractUndoItem",
|
"QAbstractUndoItem",
|
||||||
|
"QAccessible",
|
||||||
|
"QAccessible2Interface",
|
||||||
|
"QAccessibleActionInterface",
|
||||||
|
"QAccessibleApplication",
|
||||||
|
"QAccessibleBridge",
|
||||||
|
"QAccessibleBridgeFactoryInterface",
|
||||||
|
"QAccessibleBridgePlugin",
|
||||||
|
"QAccessibleEditableTextInterface",
|
||||||
|
"QAccessibleEvent",
|
||||||
|
"QAccessibleFactoryInterface",
|
||||||
|
"QAccessibleImageInterface",
|
||||||
|
"QAccessibleInterface",
|
||||||
|
"QAccessibleInterfaceEx",
|
||||||
|
"QAccessibleObject",
|
||||||
|
"QAccessibleObjectEx",
|
||||||
|
"QAccessiblePlugin",
|
||||||
|
"QAccessibleSimpleEditableTextInterface",
|
||||||
|
"QAccessibleTable2CellInterface",
|
||||||
|
"QAccessibleTable2Interface",
|
||||||
|
"QAccessibleTableInterface",
|
||||||
|
"QAccessibleTextInterface",
|
||||||
|
"QAccessibleValueInterface",
|
||||||
|
"QAccessibleWidget",
|
||||||
|
"QAccessibleWidgetEx",
|
||||||
"QAction",
|
"QAction",
|
||||||
"QActionEvent",
|
"QActionEvent",
|
||||||
"QActionGroup",
|
"QActionGroup",
|
||||||
|
@ -124,33 +146,7 @@ classlist = [
|
||||||
"QDeclarativeScriptString",
|
"QDeclarativeScriptString",
|
||||||
"QDeclarativeTypeInfo",
|
"QDeclarativeTypeInfo",
|
||||||
"QDeclarativeView",
|
"QDeclarativeView",
|
||||||
"QDesignerActionEditorInterface",
|
"QDesktopServices",
|
||||||
"QDesignerComponents",
|
|
||||||
"QDesignerContainerExtension",
|
|
||||||
"QDesignerDnDItemInterface",
|
|
||||||
"QDesignerDynamicPropertySheetExtension",
|
|
||||||
"QDesignerExtraInfoExtension",
|
|
||||||
"QDesignerFormEditorInterface",
|
|
||||||
"QDesignerFormEditorPluginInterface",
|
|
||||||
"QDesignerFormWindowCursorInterface",
|
|
||||||
"QDesignerFormWindowInterface",
|
|
||||||
"QDesignerFormWindowManagerInterface",
|
|
||||||
"QDesignerFormWindowToolInterface",
|
|
||||||
"QDesignerIconCacheInterface",
|
|
||||||
"QDesignerIntegrationInterface",
|
|
||||||
"QDesignerLayoutDecorationExtension",
|
|
||||||
"QDesignerMemberSheetExtension",
|
|
||||||
"QDesignerMetaDataBaseInterface",
|
|
||||||
"QDesignerMetaDataBaseItemInterface",
|
|
||||||
"QDesignerObjectInspectorInterface",
|
|
||||||
"QDesignerPromotionInterface",
|
|
||||||
"QDesignerPropertyEditorInterface",
|
|
||||||
"QDesignerPropertySheetExtension",
|
|
||||||
"QDesignerTaskMenuExtension",
|
|
||||||
"QDesignerWidgetBoxInterface",
|
|
||||||
"QDesignerWidgetDataBaseInterface",
|
|
||||||
"QDesignerWidgetDataBaseItemInterface",
|
|
||||||
"QDesignerWidgetFactoryInterface",
|
|
||||||
"QDesktopWidget",
|
"QDesktopWidget",
|
||||||
"QDial",
|
"QDial",
|
||||||
"QDialog",
|
"QDialog",
|
||||||
|
@ -191,8 +187,6 @@ classlist = [
|
||||||
"QEventLoop",
|
"QEventLoop",
|
||||||
"QEventSizeOfChecker",
|
"QEventSizeOfChecker",
|
||||||
"QExplicitlySharedDataPointer",
|
"QExplicitlySharedDataPointer",
|
||||||
"QExtensionFactory",
|
|
||||||
"QExtensionManager",
|
|
||||||
"QFile",
|
"QFile",
|
||||||
"QFileDialog",
|
"QFileDialog",
|
||||||
"QFileIconProvider",
|
"QFileIconProvider",
|
||||||
|
@ -211,10 +205,17 @@ classlist = [
|
||||||
"QFontInfo",
|
"QFontInfo",
|
||||||
"QFontMetrics",
|
"QFontMetrics",
|
||||||
"QFontMetricsF",
|
"QFontMetricsF",
|
||||||
"QFormBuilder",
|
|
||||||
"QFormLayout",
|
"QFormLayout",
|
||||||
"QFrame",
|
"QFrame",
|
||||||
"QFSFileEngine",
|
"QFSFileEngine",
|
||||||
|
"QFtp",
|
||||||
|
"QFuture",
|
||||||
|
"QFutureInterface",
|
||||||
|
"QFutureInterfaceBase",
|
||||||
|
"QFutureIterator",
|
||||||
|
"QFutureSynchronizer",
|
||||||
|
"QFutureWatcher",
|
||||||
|
"QFutureWatcherBase",
|
||||||
"QGenericArgument",
|
"QGenericArgument",
|
||||||
"QGenericMatrix",
|
"QGenericMatrix",
|
||||||
"QGenericReturnArgument",
|
"QGenericReturnArgument",
|
||||||
|
@ -273,14 +274,23 @@ classlist = [
|
||||||
"QHostAddress",
|
"QHostAddress",
|
||||||
"QHostInfo",
|
"QHostInfo",
|
||||||
"QHoverEvent",
|
"QHoverEvent",
|
||||||
|
"QHttp",
|
||||||
|
"QHttpHeader",
|
||||||
|
"QHttpMultiPart",
|
||||||
|
"QHttpPart",
|
||||||
|
"QHttpRequestHeader",
|
||||||
|
"QHttpResponseHeader",
|
||||||
"QIcon",
|
"QIcon",
|
||||||
"QIconEngine",
|
"QIconEngine",
|
||||||
|
"QIconEngineFactoryInterface",
|
||||||
|
"QIconEngineFactoryInterfaceV2",
|
||||||
"QIconEnginePlugin",
|
"QIconEnginePlugin",
|
||||||
"QIconEnginePluginV2",
|
"QIconEnginePluginV2",
|
||||||
"QIconEngineV2",
|
"QIconEngineV2",
|
||||||
"QIdentityProxyModel",
|
"QIdentityProxyModel",
|
||||||
"QImage",
|
"QImage",
|
||||||
"QImageIOHandler",
|
"QImageIOHandler",
|
||||||
|
"QImageIOHandlerFactoryInterface",
|
||||||
"QImageIOPlugin",
|
"QImageIOPlugin",
|
||||||
"QImageReader",
|
"QImageReader",
|
||||||
"QImageWriter",
|
"QImageWriter",
|
||||||
|
@ -314,6 +324,10 @@ classlist = [
|
||||||
"QLinearGradient",
|
"QLinearGradient",
|
||||||
"QLineEdit",
|
"QLineEdit",
|
||||||
"QLineF",
|
"QLineF",
|
||||||
|
"QLinkedList",
|
||||||
|
"QLinkedListData",
|
||||||
|
"QLinkedListIterator",
|
||||||
|
"QLinkedListNode",
|
||||||
"QList",
|
"QList",
|
||||||
"QListData",
|
"QListData",
|
||||||
"QListIterator",
|
"QListIterator",
|
||||||
|
@ -357,6 +371,7 @@ classlist = [
|
||||||
"QMimeData",
|
"QMimeData",
|
||||||
"QModelIndex",
|
"QModelIndex",
|
||||||
"QModelIndexList",
|
"QModelIndexList",
|
||||||
|
"QMotifStyle",
|
||||||
"QMouseEvent",
|
"QMouseEvent",
|
||||||
"QMoveEvent",
|
"QMoveEvent",
|
||||||
"QMovie",
|
"QMovie",
|
||||||
|
@ -364,6 +379,7 @@ classlist = [
|
||||||
"QMultiMap",
|
"QMultiMap",
|
||||||
"QMutableFutureIterator",
|
"QMutableFutureIterator",
|
||||||
"QMutableHashIterator",
|
"QMutableHashIterator",
|
||||||
|
"QMutableLinkedListIterator",
|
||||||
"QMutableListIterator",
|
"QMutableListIterator",
|
||||||
"QMutableMapIterator",
|
"QMutableMapIterator",
|
||||||
"QMutableSetIterator",
|
"QMutableSetIterator",
|
||||||
|
@ -371,8 +387,15 @@ classlist = [
|
||||||
"QMutableVectorIterator",
|
"QMutableVectorIterator",
|
||||||
"QMutex",
|
"QMutex",
|
||||||
"QMutexLocker",
|
"QMutexLocker",
|
||||||
|
"QNetworkAccessManager",
|
||||||
"QNetworkAddressEntry",
|
"QNetworkAddressEntry",
|
||||||
|
"QNetworkCacheMetaData",
|
||||||
|
"QNetworkCookie",
|
||||||
|
"QNetworkCookieJar",
|
||||||
|
"QNetworkDiskCache",
|
||||||
"QNetworkInterface",
|
"QNetworkInterface",
|
||||||
|
"QNetworkReply",
|
||||||
|
"QNetworkRequest",
|
||||||
"QNoDebug",
|
"QNoDebug",
|
||||||
"QObject",
|
"QObject",
|
||||||
"QObjectCleanupHandler",
|
"QObjectCleanupHandler",
|
||||||
|
@ -398,6 +421,7 @@ classlist = [
|
||||||
"QPixmapCache",
|
"QPixmapCache",
|
||||||
"QPlainTextDocumentLayout",
|
"QPlainTextDocumentLayout",
|
||||||
"QPlainTextEdit",
|
"QPlainTextEdit",
|
||||||
|
"QPlastiqueStyle",
|
||||||
"QPlugin",
|
"QPlugin",
|
||||||
"QPluginLoader",
|
"QPluginLoader",
|
||||||
"QPoint",
|
"QPoint",
|
||||||
|
@ -482,6 +506,13 @@ classlist = [
|
||||||
"QSplitter",
|
"QSplitter",
|
||||||
"QSplitterHandle",
|
"QSplitterHandle",
|
||||||
"QSpontaneKeyEvent",
|
"QSpontaneKeyEvent",
|
||||||
|
"QSsl",
|
||||||
|
"QSslCertificate",
|
||||||
|
"QSslCipher",
|
||||||
|
"QSslConfiguration",
|
||||||
|
"QSslError",
|
||||||
|
"QSslKey",
|
||||||
|
"QSslSocket",
|
||||||
"QStack",
|
"QStack",
|
||||||
"QStackedLayout",
|
"QStackedLayout",
|
||||||
"QStackedWidget",
|
"QStackedWidget",
|
||||||
|
@ -500,6 +531,7 @@ classlist = [
|
||||||
"QStyle",
|
"QStyle",
|
||||||
"QStyledItemDelegate",
|
"QStyledItemDelegate",
|
||||||
"QStyleFactory",
|
"QStyleFactory",
|
||||||
|
"QStyleFactoryInterface",
|
||||||
"QStyleHintReturn",
|
"QStyleHintReturn",
|
||||||
"QStyleHintReturnMask",
|
"QStyleHintReturnMask",
|
||||||
"QStyleHintReturnVariant",
|
"QStyleHintReturnVariant",
|
||||||
|
@ -553,6 +585,7 @@ classlist = [
|
||||||
"QTabWidget",
|
"QTabWidget",
|
||||||
"QtAlgorithms",
|
"QtAlgorithms",
|
||||||
"QtCleanUpFunction",
|
"QtCleanUpFunction",
|
||||||
|
"QtConcurrentFilter",
|
||||||
"QtConcurrentMap",
|
"QtConcurrentMap",
|
||||||
"QtConcurrentRun",
|
"QtConcurrentRun",
|
||||||
"QtConfig",
|
"QtConfig",
|
||||||
|
@ -563,8 +596,6 @@ classlist = [
|
||||||
"QtDBus",
|
"QtDBus",
|
||||||
"QtDebug",
|
"QtDebug",
|
||||||
"QtDeclarative",
|
"QtDeclarative",
|
||||||
"QtDesigner",
|
|
||||||
"QtDesignerComponents",
|
|
||||||
"QTemporaryFile",
|
"QTemporaryFile",
|
||||||
"QtEndian",
|
"QtEndian",
|
||||||
"QTest",
|
"QTest",
|
||||||
|
@ -594,6 +625,7 @@ classlist = [
|
||||||
"QTextBrowser",
|
"QTextBrowser",
|
||||||
"QTextCharFormat",
|
"QTextCharFormat",
|
||||||
"QTextCodec",
|
"QTextCodec",
|
||||||
|
"QTextConverter",
|
||||||
"QTextCursor",
|
"QTextCursor",
|
||||||
"QTextDecoder",
|
"QTextDecoder",
|
||||||
"QTextDocument",
|
"QTextDocument",
|
||||||
|
@ -665,6 +697,8 @@ classlist = [
|
||||||
"QUnixPrintWidget",
|
"QUnixPrintWidget",
|
||||||
"QUpdateLaterEvent",
|
"QUpdateLaterEvent",
|
||||||
"QUrl",
|
"QUrl",
|
||||||
|
"QUrlInfo",
|
||||||
|
"QUuid",
|
||||||
"QValidator",
|
"QValidator",
|
||||||
"QVariant",
|
"QVariant",
|
||||||
"QVariantAnimation",
|
"QVariantAnimation",
|
||||||
|
@ -697,6 +731,7 @@ classlist = [
|
||||||
"QWindowStateChangeEvent",
|
"QWindowStateChangeEvent",
|
||||||
"QWizard",
|
"QWizard",
|
||||||
"QWizardPage",
|
"QWizardPage",
|
||||||
|
"QWorkspace",
|
||||||
"QX11EmbedContainer",
|
"QX11EmbedContainer",
|
||||||
"QX11EmbedWidget",
|
"QX11EmbedWidget",
|
||||||
"QX11Info",
|
"QX11Info",
|
||||||
|
|
|
@ -1,283 +0,0 @@
|
||||||
add_definitions(
|
|
||||||
-DKATIE_TOOLS_SUFFIX="${KATIE_TOOLS_SUFFIX}"
|
|
||||||
)
|
|
||||||
set(EXTRA_DESIGNER_LIBS
|
|
||||||
KtCore KtGui KtXml KtUiTools
|
|
||||||
)
|
|
||||||
|
|
||||||
set(DESIGNER_PUBLIC_HEADERS
|
|
||||||
QExtensionManager
|
|
||||||
)
|
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_BINARY_DIR}/include
|
|
||||||
${CMAKE_BINARY_DIR}/privateinclude
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtCore
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtGui
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtXml
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtUiTools
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtDesigner
|
|
||||||
# for widgets.table
|
|
||||||
${CMAKE_SOURCE_DIR}/src/shared
|
|
||||||
# for rcc.h
|
|
||||||
${CMAKE_SOURCE_DIR}/src/tools/rcc
|
|
||||||
# for ui4.h
|
|
||||||
${CMAKE_SOURCE_DIR}/src/tools/uic
|
|
||||||
)
|
|
||||||
|
|
||||||
set(DESIGNER_HEADERS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/extension/default_extensionfactory.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/extension/extension.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/extension/qextensionmanager.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformeditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractintrospection_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractsettings_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformeditorplugin.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractintegration.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractpropertyeditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindow.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindowtool.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindowcursor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindowmanager.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractwidgetdatabase.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractmetadatabase.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractwidgetfactory.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractobjectinspector.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractactioneditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstracticoncache.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractoptionspage_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/propertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/dynamicpropertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/membersheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/extrainfo.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractwidgetbox.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/layoutdecoration.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractdnditem.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractpromotioninterface.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractdialoggui_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractnewformwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/spacer_widget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/layoutinfo_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/layout_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/connectionedit_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/pluginmanager_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/metadatabase_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formeditorcommand_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formwindowcommand_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_command_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/morphmenu_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_command2_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_propertycommand_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formbuilder_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_taskmenu_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/formlayoutmenu_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_widget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_propertysheet_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_membersheet_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_propertyeditor_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_objectinspector_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_integration_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/invisible_widget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qlayout_widget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/sheet_delegate_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_stackedbox_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_tabwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_dockwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_toolbox_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_dnditem_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qsimpleresource_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/widgetfactory_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/widgetdatabase_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_promotion_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_introspection_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/promotionmodel_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_promotiondialog_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/iconloader_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/richtexteditor_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/plaintexteditor_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/actioneditor_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/actionrepository_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_toolbar_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_menubar_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_menu_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/actionprovider_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/orderdialog_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/newactiondialog_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/stylesheeteditor_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/csshighlighter_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/shared_enums_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/textpropertyeditor_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/propertylineedit_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/promotiontaskmenu_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/gridpanel_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/grid_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/formwindowbase_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_utils_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_widgetbox_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/signalslotdialog_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/extensionfactory_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/dialoggui_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/deviceprofile_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/zoomwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/previewmanager_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/previewconfigurationwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/codedialog_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/iconselector_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/htmlhighlighter_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_widgetitem_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_qsettings_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formwindowmanager_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/shared_settings_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/newformwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/filterwidget_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/plugindialog_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/container.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/qdesigner_components_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/qdesigner_components.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/qdesignercommon_p.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(DESIGNER_SOURCES
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/extension/default_extensionfactory.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/extension/extension.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/extension/qextensionmanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractintrospection.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformeditorplugin.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractintegration.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractpropertyeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindow.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindowtool.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindowcursor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractformwindowmanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractwidgetdatabase.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractmetadatabase.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractwidgetfactory.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractobjectinspector.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractactioneditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractwidgetbox.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/extrainfo.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractpromotioninterface.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractdialoggui.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sdk/abstractnewformwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/spacer_widget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/layoutinfo.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/layout.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/connectionedit.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/pluginmanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formwindowcommand.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formeditorcommand.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_command.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/morphmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_command2.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_propertycommand.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formbuilder.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/formlayoutmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_widget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_dockwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_propertysheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_membersheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_propertyeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_objectinspector.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_integration.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_dnditem.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qsimpleresource.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/invisible_widget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qlayout_widget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/sheet_delegate.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/metadatabase.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_stackedbox.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_tabwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_toolbox.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/widgetfactory.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/widgetdatabase.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_promotion.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_introspection.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/promotionmodel.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_promotiondialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/richtexteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/plaintexteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/actioneditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/actionrepository.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_toolbar.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_menubar.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_menu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/orderdialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/newactiondialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/stylesheeteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/csshighlighter.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/textpropertyeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/propertylineedit.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/promotiontaskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/gridpanel.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/grid.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/formwindowbase.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_utils.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_widgetbox.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/iconloader.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/signalslotdialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/dialoggui.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/deviceprofile.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/zoomwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/previewmanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/previewconfigurationwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/codedialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/iconselector.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/htmlhighlighter.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_widgetitem.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_qsettings.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/qdesigner_formwindowmanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/shared_settings.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/newformwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/filterwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/plugindialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/shared.qrc
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/addlinkdialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/orderdialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/newactiondialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/gridpanel.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/signalslotdialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/previewconfigurationwidget.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/newformwidget.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/selectsignaldialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/formlayoutrowdialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/shared/plugindialog.ui
|
|
||||||
${CMAKE_SOURCE_DIR}/src/tools/rcc/rcc.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(components)
|
|
||||||
|
|
||||||
katie_generate_misc("${DESIGNER_HEADERS}" QtDesigner)
|
|
||||||
katie_generate_public("${DESIGNER_PUBLIC_HEADERS}" QtDesigner)
|
|
||||||
katie_generate_package(KtDesigner "KtCore KtGui KtXml KtUiTools")
|
|
||||||
katie_setup_target(KtDesigner ${DESIGNER_SOURCES} ${DESIGNER_HEADERS})
|
|
||||||
|
|
||||||
add_library(KtDesigner ${KATIE_TYPE} ${KtDesigner_SOURCES}
|
|
||||||
$<TARGET_OBJECTS:sharedqtpropertybrowser>
|
|
||||||
$<TARGET_OBJECTS:sharedfindwidget>
|
|
||||||
)
|
|
||||||
target_link_libraries(KtDesigner PRIVATE ${EXTRA_DESIGNER_LIBS})
|
|
||||||
set_target_properties(KtDesigner PROPERTIES
|
|
||||||
VERSION ${KATIE_MAJOR}.${KATIE_MINOR}
|
|
||||||
SOVERSION ${KATIE_VERSION}
|
|
||||||
EXPORT_NAME Designer
|
|
||||||
)
|
|
||||||
|
|
||||||
katie_setup_object(KtDesigner sharedqtpropertybrowser sharedfindwidget)
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS KtDesigner
|
|
||||||
EXPORT KatieTargets
|
|
||||||
DESTINATION ${KATIE_LIBRARIES_PATH}
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
DIRECTORY ${CMAKE_BINARY_DIR}/include/QtDesigner
|
|
||||||
DESTINATION ${KATIE_HEADERS_PATH}
|
|
||||||
COMPONENT Devel
|
|
||||||
)
|
|
||||||
|
|
||||||
katie_optimize_headers(${KATIE_HEADERS_PATH}/QtDesigner)
|
|
|
@ -1,222 +0,0 @@
|
||||||
set(EXTRA_DESIGNERCOMPONENTS_LIBS
|
|
||||||
KtCore KtGui KtXml KtDesigner KtUiTools
|
|
||||||
)
|
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${CMAKE_BINARY_DIR}/include
|
|
||||||
${CMAKE_BINARY_DIR}/privateinclude
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtCore
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtGui
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtXml
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtUiTools
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtDesigner
|
|
||||||
${CMAKE_BINARY_DIR}/include/QtDesignerComponents
|
|
||||||
)
|
|
||||||
|
|
||||||
set(DESIGNERCOMPONENTS_HEADERS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor_plugin.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor_tool.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qdesigner_resource.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qdesignerundostack.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindow.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindow_widgetstack.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindow_dnditem.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowcursor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/widgetselection.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowmanager.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formeditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formeditor_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qlayoutwidget_propertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/layout_propertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/spacer_propertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/line_propertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/default_container.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/default_actionprovider.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qmainwindow_container.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qmdiarea_container.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qwizard_container.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/default_layoutdecoration.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/iconcache.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/tool_widgeteditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formeditor_optionspage.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/embeddedoptionspage.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowsettings.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/deviceprofiledialog.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/dpi_chooser.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/previewactiongroup.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/itemview_propertysheet.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/templateoptionspage.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/objectinspector/objectinspector.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/objectinspector/objectinspectormodel_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/objectinspector/objectinspector_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/propertyeditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/designerpropertymanager.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/paletteeditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/paletteeditorbutton.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/qtcolorbutton_p.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/stringlisteditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/stringlisteditorbutton.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/previewwidget.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/previewframe.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/newdynamicpropertydialog.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/brushpropertymanager.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/fontpropertymanager.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/propertyeditor_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/qlonglongvalidator.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor_plugin.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor_tool.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/button_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/groupbox_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/label_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/lineedit_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/listwidget_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/treewidget_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/tablewidget_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/combobox_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/textedit_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/toolbar_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/containerwidget_taskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/inplace_editor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/taskmenu_component.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/itemlisteditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/listwidgeteditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/treewidgeteditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/tablewidgeteditor.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/inplace_widget_helper.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/menutaskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/layouttaskmenu.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetboxcategorylistview.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetboxtreewidget.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetbox.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetbox_global.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetbox_dnditem.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/qdesignercomponentscommon_p.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(DESIGNERCOMPONENTS_SOURCES
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor_tool.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/buddyeditor/buddyeditor_plugin.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/deviceprofiledialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowsettings.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/templateoptionspage.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qdesigner_resource.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qdesignerundostack.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindow.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindow_widgetstack.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindow_dnditem.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowcursor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/widgetselection.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowmanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qlayoutwidget_propertysheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/layout_propertysheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/spacer_propertysheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/line_propertysheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qmainwindow_container.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qmdiarea_container.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/qwizard_container.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/default_container.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/default_layoutdecoration.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/default_actionprovider.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/tool_widgeteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/iconcache.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formeditor_optionspage.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/embeddedoptionspage.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formwindowsettings.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/deviceprofiledialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/dpi_chooser.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/previewactiongroup.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/itemview_propertysheet.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/templateoptionspage.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/formeditor/formeditor.qrc
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/objectinspector/objectinspector.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/objectinspector/objectinspectormodel.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/propertyeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/designerpropertymanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/paletteeditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/paletteeditorbutton.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/qtcolorbutton.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/stringlisteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/stringlisteditorbutton.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/previewwidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/previewframe.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/newdynamicpropertydialog.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/brushpropertymanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/fontpropertymanager.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/qlonglongvalidator.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/propertyeditor.qrc
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/paletteeditor.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/stringlisteditor.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/previewwidget.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/propertyeditor/newdynamicpropertydialog.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor_tool.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tabordereditor/tabordereditor_plugin.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/button_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/groupbox_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/label_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/lineedit_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/listwidget_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/treewidget_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/tablewidget_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/combobox_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/textedit_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/toolbar_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/containerwidget_taskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/inplace_editor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/taskmenu_component.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/itemlisteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/listwidgeteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/treewidgeteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/tablewidgeteditor.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/inplace_widget_helper.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/menutaskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/layouttaskmenu.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/itemlisteditor.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/treewidgeteditor.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/taskmenu/tablewidgeteditor.ui
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetboxcategorylistview.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetboxtreewidget.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetbox.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetbox_dnditem.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widgetbox/widgetbox.qrc
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/qdesigner_components.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
katie_generate_misc("${DESIGNERCOMPONENTS_HEADERS}" QtDesignerComponents)
|
|
||||||
katie_generate_public("${DESIGNERCOMPONENTS_PUBLIC_HEADERS}" QtDesignerComponents)
|
|
||||||
katie_generate_package(KtDesignerComponents "KtCore KtGui KtXml KtDesigner KtUiTools")
|
|
||||||
katie_setup_target(KtDesignerComponents ${DESIGNERCOMPONENTS_SOURCES} ${DESIGNERCOMPONENTS_HEADERS})
|
|
||||||
|
|
||||||
add_library(KtDesignerComponents ${KATIE_TYPE} ${KtDesignerComponents_SOURCES}
|
|
||||||
$<TARGET_OBJECTS:sharedfindwidget>
|
|
||||||
$<TARGET_OBJECTS:sharedqtpropertybrowser>
|
|
||||||
)
|
|
||||||
target_link_libraries(KtDesignerComponents PRIVATE ${EXTRA_DESIGNERCOMPONENTS_LIBS})
|
|
||||||
set_target_properties(KtDesignerComponents PROPERTIES
|
|
||||||
VERSION ${KATIE_MAJOR}.${KATIE_MINOR}
|
|
||||||
SOVERSION ${KATIE_VERSION}
|
|
||||||
EXPORT_NAME DesignerComponents
|
|
||||||
)
|
|
||||||
|
|
||||||
katie_setup_object(KtDesignerComponents sharedfindwidget sharedqtpropertybrowser)
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS KtDesignerComponents
|
|
||||||
EXPORT KatieTargets
|
|
||||||
DESTINATION ${KATIE_LIBRARIES_PATH}
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
DIRECTORY ${CMAKE_BINARY_DIR}/include/QtDesignerComponents
|
|
||||||
DESTINATION ${KATIE_HEADERS_PATH}
|
|
||||||
COMPONENT Devel
|
|
||||||
)
|
|
||||||
|
|
||||||
katie_optimize_headers(${KATIE_HEADERS_PATH}/QtDesignerComponents)
|
|
|
@ -1,427 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "buddyeditor.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformwindow.h>
|
|
||||||
#include <QtDesigner/propertysheet.h>
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
#include <QtDesigner/QExtensionManager>
|
|
||||||
|
|
||||||
#include "qdesigner_command_p.h"
|
|
||||||
#include "qdesigner_propertycommand_p.h"
|
|
||||||
#include "qdesigner_utils_p.h"
|
|
||||||
#include "qlayout_widget_p.h"
|
|
||||||
#include <connectionedit_p.h>
|
|
||||||
#include <metadatabase_p.h>
|
|
||||||
|
|
||||||
#include <QtCore/qdebug.h>
|
|
||||||
#include <QtGui/QLabel>
|
|
||||||
#include <QtGui/QMenu>
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtGui/QApplication>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
static const char *buddyPropertyC = "buddy";
|
|
||||||
|
|
||||||
static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form)
|
|
||||||
{
|
|
||||||
if (qobject_cast<const QLayoutWidget*>(w) || qobject_cast<const QLabel*>(w))
|
|
||||||
return false;
|
|
||||||
if (w == form->mainContainer() || w->isHidden() )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
QExtensionManager *ext = form->core()->extensionManager();
|
|
||||||
if (QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(ext, w)) {
|
|
||||||
const int index = sheet->indexOf(QLatin1String("focusPolicy"));
|
|
||||||
if (index != -1) {
|
|
||||||
bool ok = false;
|
|
||||||
const Qt::FocusPolicy q = static_cast<Qt::FocusPolicy>(qdesigner_internal::Utils::valueOf(sheet->property(index), &ok));
|
|
||||||
// Refuse No-focus unless the widget is promoted.
|
|
||||||
return (ok && q != Qt::NoFocus) || qdesigner_internal::isPromoted(form->core(), w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString buddy(QLabel *label, QDesignerFormEditorInterface *core)
|
|
||||||
{
|
|
||||||
QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), label);
|
|
||||||
if (sheet == 0)
|
|
||||||
return QString();
|
|
||||||
const int prop_idx = sheet->indexOf(QLatin1String(buddyPropertyC));
|
|
||||||
if (prop_idx == -1)
|
|
||||||
return QString();
|
|
||||||
return sheet->property(prop_idx).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef QList<QLabel*> LabelList;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
** BuddyEditor
|
|
||||||
*/
|
|
||||||
|
|
||||||
BuddyEditor::BuddyEditor(QDesignerFormWindowInterface *form, QWidget *parent) :
|
|
||||||
ConnectionEdit(parent, form),
|
|
||||||
m_formWindow(form),
|
|
||||||
m_updating(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QWidget *BuddyEditor::widgetAt(const QPoint &pos) const
|
|
||||||
{
|
|
||||||
QWidget *w = ConnectionEdit::widgetAt(pos);
|
|
||||||
|
|
||||||
while (w != 0 && !m_formWindow->isManaged(w))
|
|
||||||
w = w->parentWidget();
|
|
||||||
if (!w)
|
|
||||||
return w;
|
|
||||||
|
|
||||||
if (state() == Editing) {
|
|
||||||
QLabel *label = qobject_cast<QLabel*>(w);
|
|
||||||
if (label == 0)
|
|
||||||
return 0;
|
|
||||||
const int cnt = connectionCount();
|
|
||||||
for (int i = 0; i < cnt; ++i) {
|
|
||||||
Connection *con = connection(i);
|
|
||||||
if (con->widget(EndPoint::Source) == w)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!canBeBuddy(w, m_formWindow))
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return w;
|
|
||||||
}
|
|
||||||
|
|
||||||
Connection *BuddyEditor::createConnection(QWidget *source, QWidget *destination)
|
|
||||||
{
|
|
||||||
return new Connection(this, source, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormWindowInterface *BuddyEditor::formWindow() const
|
|
||||||
{
|
|
||||||
return m_formWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::updateBackground()
|
|
||||||
{
|
|
||||||
if (m_updating || background() == 0)
|
|
||||||
return;
|
|
||||||
ConnectionEdit::updateBackground();
|
|
||||||
|
|
||||||
m_updating = true;
|
|
||||||
QList<Connection *> newList;
|
|
||||||
const LabelList label_list = background()->findChildren<QLabel*>();
|
|
||||||
foreach (QLabel *label, label_list) {
|
|
||||||
const QString buddy_name = buddy(label, m_formWindow->core());
|
|
||||||
if (buddy_name.isEmpty())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
const QList<QWidget *> targets = background()->findChildren<QWidget*>(buddy_name);
|
|
||||||
if (targets.isEmpty())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
QWidget *target = 0;
|
|
||||||
|
|
||||||
QListIterator<QWidget *> it(targets);
|
|
||||||
while (it.hasNext()) {
|
|
||||||
QWidget *widget = it.next();
|
|
||||||
if (widget && !widget->isHidden()) {
|
|
||||||
target = widget;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (target == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Connection *con = new Connection(this);
|
|
||||||
con->setEndPoint(EndPoint::Source, label, widgetRect(label).center());
|
|
||||||
con->setEndPoint(EndPoint::Target, target, widgetRect(target).center());
|
|
||||||
newList.append(con);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<Connection *> toRemove;
|
|
||||||
|
|
||||||
const int c = connectionCount();
|
|
||||||
for (int i = 0; i < c; i++) {
|
|
||||||
Connection *con = connection(i);
|
|
||||||
QObject *source = con->object(EndPoint::Source);
|
|
||||||
QObject *target = con->object(EndPoint::Target);
|
|
||||||
bool found = false;
|
|
||||||
QListIterator<Connection *> it(newList);
|
|
||||||
while (it.hasNext()) {
|
|
||||||
Connection *newConn = it.next();
|
|
||||||
if (newConn->object(EndPoint::Source) == source && newConn->object(EndPoint::Target) == target) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (found == false)
|
|
||||||
toRemove.append(con);
|
|
||||||
}
|
|
||||||
if (!toRemove.isEmpty()) {
|
|
||||||
DeleteConnectionsCommand command(this, toRemove);
|
|
||||||
command.redo();
|
|
||||||
foreach (Connection *con, toRemove)
|
|
||||||
delete takeConnection(con);
|
|
||||||
}
|
|
||||||
|
|
||||||
QListIterator<Connection *> it(newList);
|
|
||||||
while (it.hasNext()) {
|
|
||||||
Connection *newConn = it.next();
|
|
||||||
|
|
||||||
bool found = false;
|
|
||||||
const int c = connectionCount();
|
|
||||||
for (int i = 0; i < c; i++) {
|
|
||||||
Connection *con = connection(i);
|
|
||||||
if (con->object(EndPoint::Source) == newConn->object(EndPoint::Source) &&
|
|
||||||
con->object(EndPoint::Target) == newConn->object(EndPoint::Target)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (found == false) {
|
|
||||||
AddConnectionCommand command(this, newConn);
|
|
||||||
command.redo();
|
|
||||||
} else {
|
|
||||||
delete newConn;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_updating = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::setBackground(QWidget *background)
|
|
||||||
{
|
|
||||||
clear();
|
|
||||||
ConnectionEdit::setBackground(background);
|
|
||||||
|
|
||||||
const LabelList label_list = background->findChildren<QLabel*>();
|
|
||||||
foreach (QLabel *label, label_list) {
|
|
||||||
const QString buddy_name = buddy(label, m_formWindow->core());
|
|
||||||
if (buddy_name.isEmpty())
|
|
||||||
continue;
|
|
||||||
QWidget *target = background->findChild<QWidget*>(buddy_name);
|
|
||||||
if (target == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Connection *con = new Connection(this);
|
|
||||||
con->setEndPoint(EndPoint::Source, label, widgetRect(label).center());
|
|
||||||
con->setEndPoint(EndPoint::Target, target, widgetRect(target).center());
|
|
||||||
addConnection(con);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static QUndoCommand *createBuddyCommand(QDesignerFormWindowInterface *fw, QLabel *label, QWidget *buddy)
|
|
||||||
{
|
|
||||||
SetPropertyCommand *command = new SetPropertyCommand(fw);
|
|
||||||
command->init(label, QLatin1String(buddyPropertyC), buddy->objectName());
|
|
||||||
command->setText(BuddyEditor::tr("Add buddy"));
|
|
||||||
return command;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::endConnection(QWidget *target, const QPoint &pos)
|
|
||||||
{
|
|
||||||
Connection *tmp_con = newlyAddedConnection();
|
|
||||||
Q_ASSERT(tmp_con != 0);
|
|
||||||
|
|
||||||
tmp_con->setEndPoint(EndPoint::Target, target, pos);
|
|
||||||
|
|
||||||
QWidget *source = tmp_con->widget(EndPoint::Source);
|
|
||||||
Q_ASSERT(source != 0);
|
|
||||||
Q_ASSERT(target != 0);
|
|
||||||
setEnabled(false);
|
|
||||||
Connection *new_con = createConnection(source, target);
|
|
||||||
setEnabled(true);
|
|
||||||
if (new_con != 0) {
|
|
||||||
new_con->setEndPoint(EndPoint::Source, source, tmp_con->endPointPos(EndPoint::Source));
|
|
||||||
new_con->setEndPoint(EndPoint::Target, target, tmp_con->endPointPos(EndPoint::Target));
|
|
||||||
|
|
||||||
selectNone();
|
|
||||||
addConnection(new_con);
|
|
||||||
QLabel *source = qobject_cast<QLabel*>(new_con->widget(EndPoint::Source));
|
|
||||||
QWidget *target = new_con->widget(EndPoint::Target);
|
|
||||||
if (source) {
|
|
||||||
undoStack()->push(createBuddyCommand(m_formWindow, source, target));
|
|
||||||
} else {
|
|
||||||
qDebug("BuddyEditor::endConnection(): not a label");
|
|
||||||
}
|
|
||||||
setSelected(new_con, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
clearNewlyAddedConnection();
|
|
||||||
findObjectsUnderMouse(mapFromGlobal(QCursor::pos()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::widgetRemoved(QWidget *widget)
|
|
||||||
{
|
|
||||||
QList<QWidget*> child_list = widget->findChildren<QWidget*>();
|
|
||||||
child_list.prepend(widget);
|
|
||||||
|
|
||||||
ConnectionSet remove_set;
|
|
||||||
foreach (QWidget *w, child_list) {
|
|
||||||
const ConnectionList &cl = connectionList();
|
|
||||||
foreach (Connection *con, cl) {
|
|
||||||
if (con->widget(EndPoint::Source) == w || con->widget(EndPoint::Target) == w)
|
|
||||||
remove_set.insert(con, con);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!remove_set.isEmpty()) {
|
|
||||||
undoStack()->beginMacro(tr("Remove buddies"));
|
|
||||||
foreach (Connection *con, remove_set) {
|
|
||||||
setSelected(con, false);
|
|
||||||
con->update();
|
|
||||||
QWidget *source = con->widget(EndPoint::Source);
|
|
||||||
if (qobject_cast<QLabel*>(source) == 0) {
|
|
||||||
qDebug("BuddyConnection::widgetRemoved(): not a label");
|
|
||||||
} else {
|
|
||||||
ResetPropertyCommand *command = new ResetPropertyCommand(formWindow());
|
|
||||||
command->init(source, QLatin1String(buddyPropertyC));
|
|
||||||
undoStack()->push(command);
|
|
||||||
}
|
|
||||||
delete takeConnection(con);
|
|
||||||
}
|
|
||||||
undoStack()->endMacro();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::deleteSelected()
|
|
||||||
{
|
|
||||||
const ConnectionSet selectedConnections = selection(); // want copy for unselect
|
|
||||||
if (selectedConnections.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
undoStack()->beginMacro(tr("Remove %1 buddies").arg(selectedConnections.size()));
|
|
||||||
foreach (Connection *con, selectedConnections) {
|
|
||||||
setSelected(con, false);
|
|
||||||
con->update();
|
|
||||||
QWidget *source = con->widget(EndPoint::Source);
|
|
||||||
if (qobject_cast<QLabel*>(source) == 0) {
|
|
||||||
qDebug("BuddyConnection::deleteSelected(): not a label");
|
|
||||||
} else {
|
|
||||||
ResetPropertyCommand *command = new ResetPropertyCommand(formWindow());
|
|
||||||
command->init(source, QLatin1String(buddyPropertyC));
|
|
||||||
undoStack()->push(command);
|
|
||||||
}
|
|
||||||
delete takeConnection(con);
|
|
||||||
}
|
|
||||||
undoStack()->endMacro();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::autoBuddy()
|
|
||||||
{
|
|
||||||
// Any labels?
|
|
||||||
LabelList labelList = background()->findChildren<QLabel*>();
|
|
||||||
if (labelList.empty())
|
|
||||||
return;
|
|
||||||
// Find already used buddies
|
|
||||||
QWidgetList usedBuddies;
|
|
||||||
const ConnectionList &beforeConnections = connectionList();
|
|
||||||
foreach (const Connection *c, beforeConnections)
|
|
||||||
usedBuddies.push_back(c->widget(EndPoint::Target));
|
|
||||||
// Find potential new buddies, keep lists in sync
|
|
||||||
QWidgetList buddies;
|
|
||||||
for (LabelList::iterator it = labelList.begin(); it != labelList.end(); ) {
|
|
||||||
QLabel *label = *it;
|
|
||||||
QWidget *newBuddy = 0;
|
|
||||||
if (m_formWindow->isManaged(label)) {
|
|
||||||
const QString buddy_name = buddy(label, m_formWindow->core());
|
|
||||||
if (buddy_name.isEmpty())
|
|
||||||
newBuddy = findBuddy(label, usedBuddies);
|
|
||||||
}
|
|
||||||
if (newBuddy) {
|
|
||||||
buddies.push_back(newBuddy);
|
|
||||||
usedBuddies.push_back(newBuddy);
|
|
||||||
++it;
|
|
||||||
} else {
|
|
||||||
it = labelList.erase(it);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Add the list in one go.
|
|
||||||
if (labelList.empty())
|
|
||||||
return;
|
|
||||||
const int count = labelList.size();
|
|
||||||
Q_ASSERT(count == buddies.size());
|
|
||||||
undoStack()->beginMacro(tr("Add %1 buddies").arg(count));
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
undoStack()->push(createBuddyCommand(m_formWindow, labelList.at(i), buddies.at(i)));
|
|
||||||
undoStack()->endMacro();
|
|
||||||
// Now select all new ones
|
|
||||||
const ConnectionList &connections = connectionList();
|
|
||||||
foreach (Connection *con, connections)
|
|
||||||
setSelected(con, buddies.contains(con->widget(EndPoint::Target)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Geometrically find a potential buddy for label by checking neighbouring children of parent
|
|
||||||
QWidget *BuddyEditor::findBuddy(QLabel *l, const QWidgetList &existingBuddies) const
|
|
||||||
{
|
|
||||||
enum { DeltaX = 5 };
|
|
||||||
const QWidget *parent = l->parentWidget();
|
|
||||||
// Try to find next managed neighbour on horizontal line
|
|
||||||
const QRect geom = l->geometry();
|
|
||||||
const int y = geom.center().y();
|
|
||||||
QWidget *neighbour = 0;
|
|
||||||
switch (l->layoutDirection()) {
|
|
||||||
case Qt::LayoutDirectionAuto:
|
|
||||||
case Qt::LeftToRight: { // Walk right to find next managed neighbour
|
|
||||||
const int xEnd = parent->size().width();
|
|
||||||
for (int x = geom.right() + 1; x < xEnd; x += DeltaX)
|
|
||||||
if (QWidget *c = parent->childAt (x, y))
|
|
||||||
if (m_formWindow->isManaged(c)) {
|
|
||||||
neighbour = c;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case Qt::RightToLeft: // Walk left to find next managed neighbour
|
|
||||||
for (int x = geom.x() - 1; x >= 0; x -= DeltaX)
|
|
||||||
if (QWidget *c = parent->childAt (x, y))
|
|
||||||
if (m_formWindow->isManaged(c)) {
|
|
||||||
neighbour = c;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (neighbour && !existingBuddies.contains(neighbour) && canBeBuddy(neighbour, m_formWindow))
|
|
||||||
return neighbour;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditor::createContextMenu(QMenu &menu)
|
|
||||||
{
|
|
||||||
QAction *autoAction = menu.addAction(tr("Set automatically"));
|
|
||||||
connect(autoAction, SIGNAL(triggered()), this, SLOT(autoBuddy()));
|
|
||||||
menu.addSeparator();
|
|
||||||
ConnectionEdit::createContextMenu(menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_buddyeditor.h"
|
|
|
@ -1,72 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef BUDDYEDITOR_H
|
|
||||||
#define BUDDYEDITOR_H
|
|
||||||
|
|
||||||
#include "buddyeditor_global.h"
|
|
||||||
|
|
||||||
#include <connectionedit_p.h>
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
#include <QtCore/QSet>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormWindowInterface;
|
|
||||||
|
|
||||||
class QLabel;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class QT_BUDDYEDITOR_EXPORT BuddyEditor : public ConnectionEdit
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
BuddyEditor(QDesignerFormWindowInterface *form, QWidget *parent);
|
|
||||||
|
|
||||||
QDesignerFormWindowInterface *formWindow() const;
|
|
||||||
virtual void setBackground(QWidget *background);
|
|
||||||
virtual void deleteSelected();
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
virtual void updateBackground();
|
|
||||||
virtual void widgetRemoved(QWidget *w);
|
|
||||||
void autoBuddy();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual QWidget *widgetAt(const QPoint &pos) const;
|
|
||||||
virtual Connection *createConnection(QWidget *source, QWidget *destination);
|
|
||||||
virtual void endConnection(QWidget *target, const QPoint &pos);
|
|
||||||
virtual void createContextMenu(QMenu &menu);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *findBuddy(QLabel *l, const QWidgetList &existingBuddies) const;
|
|
||||||
|
|
||||||
QPointer<QDesignerFormWindowInterface> m_formWindow;
|
|
||||||
bool m_updating;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,29 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef BUDDYEDITOR_GLOBAL_H
|
|
||||||
#define BUDDYEDITOR_GLOBAL_H
|
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
|
||||||
|
|
||||||
#define QT_BUDDYEDITOR_EXPORT
|
|
||||||
|
|
||||||
#endif // BUDDYEDITOR_GLOBAL_H
|
|
|
@ -1,30 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
|
||||||
|
|
||||||
#include "buddyeditor_plugin.h"
|
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
|
||||||
|
|
||||||
using namespace qdesigner_internal;
|
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(BuddyEditorPlugin)
|
|
|
@ -1,114 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
|
|
||||||
#include "buddyeditor_plugin.h"
|
|
||||||
#include "buddyeditor_tool.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformwindow.h>
|
|
||||||
#include <QtDesigner/abstractformwindowmanager.h>
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
using namespace qdesigner_internal;
|
|
||||||
|
|
||||||
BuddyEditorPlugin::BuddyEditorPlugin()
|
|
||||||
: m_initialized(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
BuddyEditorPlugin::~BuddyEditorPlugin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BuddyEditorPlugin::isInitialized() const
|
|
||||||
{
|
|
||||||
return m_initialized;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditorPlugin::initialize(QDesignerFormEditorInterface *core)
|
|
||||||
{
|
|
||||||
Q_ASSERT(!isInitialized());
|
|
||||||
|
|
||||||
m_action = new QAction(tr("Edit Buddies"), this);
|
|
||||||
m_action->setObjectName(QLatin1String("__qt_edit_buddies_action"));
|
|
||||||
QIcon buddyIcon = QIcon::fromTheme(QLatin1String("designer-edit-buddy"),
|
|
||||||
QIcon(core->resourceLocation() + QLatin1String("/buddytool.png")));
|
|
||||||
m_action->setIcon(buddyIcon);
|
|
||||||
m_action->setEnabled(false);
|
|
||||||
|
|
||||||
setParent(core);
|
|
||||||
m_core = core;
|
|
||||||
m_initialized = true;
|
|
||||||
|
|
||||||
connect(core->formWindowManager(), SIGNAL(formWindowAdded(QDesignerFormWindowInterface*)),
|
|
||||||
this, SLOT(addFormWindow(QDesignerFormWindowInterface*)));
|
|
||||||
|
|
||||||
connect(core->formWindowManager(), SIGNAL(formWindowRemoved(QDesignerFormWindowInterface*)),
|
|
||||||
this, SLOT(removeFormWindow(QDesignerFormWindowInterface*)));
|
|
||||||
|
|
||||||
connect(core->formWindowManager(), SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface*)),
|
|
||||||
this, SLOT(activeFormWindowChanged(QDesignerFormWindowInterface*)));
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormEditorInterface *BuddyEditorPlugin::core() const
|
|
||||||
{
|
|
||||||
return m_core;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditorPlugin::addFormWindow(QDesignerFormWindowInterface *formWindow)
|
|
||||||
{
|
|
||||||
Q_ASSERT(formWindow != 0);
|
|
||||||
Q_ASSERT(m_tools.contains(formWindow) == false);
|
|
||||||
|
|
||||||
BuddyEditorTool *tool = new BuddyEditorTool(formWindow, this);
|
|
||||||
m_tools[formWindow] = tool;
|
|
||||||
connect(m_action, SIGNAL(triggered()), tool->action(), SLOT(trigger()));
|
|
||||||
formWindow->registerTool(tool);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditorPlugin::removeFormWindow(QDesignerFormWindowInterface *formWindow)
|
|
||||||
{
|
|
||||||
Q_ASSERT(formWindow != 0);
|
|
||||||
Q_ASSERT(m_tools.contains(formWindow) == true);
|
|
||||||
|
|
||||||
BuddyEditorTool *tool = m_tools.value(formWindow);
|
|
||||||
m_tools.remove(formWindow);
|
|
||||||
disconnect(m_action, SIGNAL(triggered()), tool->action(), SLOT(trigger()));
|
|
||||||
// ### FIXME disable the tool
|
|
||||||
|
|
||||||
delete tool;
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *BuddyEditorPlugin::action() const
|
|
||||||
{
|
|
||||||
return m_action;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditorPlugin::activeFormWindowChanged(QDesignerFormWindowInterface *formWindow)
|
|
||||||
{
|
|
||||||
m_action->setEnabled(formWindow != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_buddyeditor_plugin.h"
|
|
|
@ -1,73 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef BUDDYEDITOR_PLUGIN_H
|
|
||||||
#define BUDDYEDITOR_PLUGIN_H
|
|
||||||
|
|
||||||
#include "buddyeditor_global.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformeditorplugin.h>
|
|
||||||
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
#include <QtCore/QHash>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormWindowInterface;
|
|
||||||
class QAction;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class BuddyEditorTool;
|
|
||||||
|
|
||||||
class QT_BUDDYEDITOR_EXPORT BuddyEditorPlugin: public QObject, public QDesignerFormEditorPluginInterface
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerFormEditorPluginInterface)
|
|
||||||
public:
|
|
||||||
BuddyEditorPlugin();
|
|
||||||
virtual ~BuddyEditorPlugin();
|
|
||||||
|
|
||||||
virtual bool isInitialized() const;
|
|
||||||
virtual void initialize(QDesignerFormEditorInterface *core);
|
|
||||||
QAction *action() const;
|
|
||||||
|
|
||||||
virtual QDesignerFormEditorInterface *core() const;
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void activeFormWindowChanged(QDesignerFormWindowInterface *formWindow);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void addFormWindow(QDesignerFormWindowInterface *formWindow);
|
|
||||||
void removeFormWindow(QDesignerFormWindowInterface *formWindow);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QPointer<QDesignerFormEditorInterface> m_core;
|
|
||||||
QHash<QDesignerFormWindowInterface*, BuddyEditorTool*> m_tools;
|
|
||||||
bool m_initialized;
|
|
||||||
QAction *m_action;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // BUDDYEDITOR_PLUGIN_H
|
|
|
@ -1,92 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "buddyeditor_tool.h"
|
|
||||||
#include "buddyeditor.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformwindow.h>
|
|
||||||
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
using namespace qdesigner_internal;
|
|
||||||
|
|
||||||
BuddyEditorTool::BuddyEditorTool(QDesignerFormWindowInterface *formWindow, QObject *parent)
|
|
||||||
: QDesignerFormWindowToolInterface(parent),
|
|
||||||
m_formWindow(formWindow),
|
|
||||||
m_action(new QAction(tr("Edit Buddies"), this))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
BuddyEditorTool::~BuddyEditorTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormEditorInterface *BuddyEditorTool::core() const
|
|
||||||
{
|
|
||||||
return m_formWindow->core();
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormWindowInterface *BuddyEditorTool::formWindow() const
|
|
||||||
{
|
|
||||||
return m_formWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BuddyEditorTool::handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event)
|
|
||||||
{
|
|
||||||
Q_UNUSED(widget);
|
|
||||||
Q_UNUSED(managedWidget);
|
|
||||||
Q_UNUSED(event);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *BuddyEditorTool::editor() const
|
|
||||||
{
|
|
||||||
if (!m_editor) {
|
|
||||||
Q_ASSERT(formWindow() != 0);
|
|
||||||
m_editor = new BuddyEditor(formWindow(), 0);
|
|
||||||
connect(formWindow(), SIGNAL(mainContainerChanged(QWidget*)), m_editor, SLOT(setBackground(QWidget*)));
|
|
||||||
connect(formWindow(), SIGNAL(changed()),
|
|
||||||
m_editor, SLOT(updateBackground()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_editor;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditorTool::activated()
|
|
||||||
{
|
|
||||||
m_editor->enableUpdateBackground(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BuddyEditorTool::deactivated()
|
|
||||||
{
|
|
||||||
m_editor->enableUpdateBackground(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *BuddyEditorTool::action() const
|
|
||||||
{
|
|
||||||
return m_action;
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_buddyeditor_tool.h"
|
|
|
@ -1,69 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef BUDDYEDITOR_TOOL_H
|
|
||||||
#define BUDDYEDITOR_TOOL_H
|
|
||||||
|
|
||||||
#include "buddyeditor_global.h"
|
|
||||||
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformwindowtool.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormEditorInterface;
|
|
||||||
class QDesignerFormWindowInterface;
|
|
||||||
class QAction;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class BuddyEditor;
|
|
||||||
|
|
||||||
class QT_BUDDYEDITOR_EXPORT BuddyEditorTool: public QDesignerFormWindowToolInterface
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit BuddyEditorTool(QDesignerFormWindowInterface *formWindow, QObject *parent = nullptr);
|
|
||||||
virtual ~BuddyEditorTool();
|
|
||||||
|
|
||||||
virtual QDesignerFormEditorInterface *core() const;
|
|
||||||
virtual QDesignerFormWindowInterface *formWindow() const;
|
|
||||||
|
|
||||||
virtual QWidget *editor() const;
|
|
||||||
virtual QAction *action() const;
|
|
||||||
|
|
||||||
virtual void activated();
|
|
||||||
virtual void deactivated();
|
|
||||||
|
|
||||||
virtual bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QDesignerFormWindowInterface *m_formWindow;
|
|
||||||
mutable QPointer<BuddyEditor> m_editor;
|
|
||||||
QAction *m_action;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // BUDDYEDITOR_TOOL_H
|
|
|
@ -1,188 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "default_actionprovider.h"
|
|
||||||
#include "invisible_widget_p.h"
|
|
||||||
#include "qdesigner_toolbar_p.h"
|
|
||||||
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtGui/QApplication>
|
|
||||||
#include <QtCore/QRect>
|
|
||||||
#include <QtCore/QDebug>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// ------------ ActionProviderBase:
|
|
||||||
// Draws the drag indicator when dragging an action over a widget
|
|
||||||
// that receives action Dnd, such as ToolBar, Menu or MenuBar.
|
|
||||||
ActionProviderBase::ActionProviderBase(QWidget *widget) :
|
|
||||||
m_indicator(new InvisibleWidget(widget))
|
|
||||||
{
|
|
||||||
Q_ASSERT(widget != 0);
|
|
||||||
|
|
||||||
m_indicator->setAutoFillBackground(true);
|
|
||||||
m_indicator->setBackgroundRole(QPalette::Window);
|
|
||||||
|
|
||||||
QPalette p;
|
|
||||||
p.setColor(m_indicator->backgroundRole(), Qt::red);
|
|
||||||
m_indicator->setPalette(p);
|
|
||||||
m_indicator->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
enum { indicatorSize = 2 };
|
|
||||||
|
|
||||||
// Position an indicator horizontally over the rectangle, indicating
|
|
||||||
// 'Insert before' (left or right according to layout direction)
|
|
||||||
static inline QRect horizontalIndicatorRect(const QRect &rect, Qt::LayoutDirection layoutDirection)
|
|
||||||
{
|
|
||||||
// Position right?
|
|
||||||
QRect rc = QRect(rect.x(), 0, indicatorSize, rect.height() - 1);
|
|
||||||
if (layoutDirection == Qt::RightToLeft)
|
|
||||||
rc.moveLeft(rc.x() + rect.width() - indicatorSize);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Position an indicator vertically over the rectangle, indicating 'Insert before' (top)
|
|
||||||
static inline QRect verticalIndicatorRect(const QRect &rect)
|
|
||||||
{
|
|
||||||
return QRect(0, rect.top(), rect.width() - 1, indicatorSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine the geometry of the indicator by retrieving
|
|
||||||
// the action under mouse and positioning the bar within its geometry.
|
|
||||||
QRect ActionProviderBase::indicatorGeometry(const QPoint &pos, Qt::LayoutDirection layoutDirection) const
|
|
||||||
{
|
|
||||||
QAction *action = actionAt(pos);
|
|
||||||
if (!action)
|
|
||||||
return QRect();
|
|
||||||
QRect rc = actionGeometry(action);
|
|
||||||
return orientation() == Qt::Horizontal ? horizontalIndicatorRect(rc, layoutDirection) : verticalIndicatorRect(rc);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adjust the indicator while dragging. (-1,1) is called to finish a DND operation
|
|
||||||
void ActionProviderBase::adjustIndicator(const QPoint &pos)
|
|
||||||
{
|
|
||||||
if (pos == QPoint(-1, -1)) {
|
|
||||||
m_indicator->hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const QRect ig = indicatorGeometry(pos, m_indicator->layoutDirection());
|
|
||||||
if (ig.isValid()) {
|
|
||||||
m_indicator->setGeometry(ig);
|
|
||||||
QPalette p = m_indicator->palette();
|
|
||||||
if (p.color(m_indicator->backgroundRole()) != Qt::red) {
|
|
||||||
p.setColor(m_indicator->backgroundRole(), Qt::red);
|
|
||||||
m_indicator->setPalette(p);
|
|
||||||
}
|
|
||||||
m_indicator->show();
|
|
||||||
m_indicator->raise();
|
|
||||||
} else {
|
|
||||||
m_indicator->hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------- QToolBarActionProvider
|
|
||||||
QToolBarActionProvider::QToolBarActionProvider(QToolBar *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
ActionProviderBase(widget),
|
|
||||||
m_widget(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect QToolBarActionProvider::actionGeometry(QAction *action) const
|
|
||||||
{
|
|
||||||
return m_widget->actionGeometry(action);
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *QToolBarActionProvider::actionAt(const QPoint &pos) const
|
|
||||||
{
|
|
||||||
return ToolBarEventFilter::actionAt(m_widget, pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt::Orientation QToolBarActionProvider::orientation() const
|
|
||||||
{
|
|
||||||
return m_widget->orientation();
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect QToolBarActionProvider::indicatorGeometry(const QPoint &pos, Qt::LayoutDirection layoutDirection) const
|
|
||||||
{
|
|
||||||
const QRect actionRect = ActionProviderBase::indicatorGeometry(pos, layoutDirection);
|
|
||||||
if (actionRect.isValid())
|
|
||||||
return actionRect;
|
|
||||||
// Toolbar differs in that is has no dummy placeholder to 'insert before'
|
|
||||||
// when intending to append. Check the free area.
|
|
||||||
const QRect freeArea = ToolBarEventFilter::freeArea(m_widget);
|
|
||||||
if (!freeArea.contains(pos))
|
|
||||||
return QRect();
|
|
||||||
return orientation() == Qt::Horizontal ? horizontalIndicatorRect(freeArea, layoutDirection) : verticalIndicatorRect(freeArea);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------- QMenuBarActionProvider
|
|
||||||
QMenuBarActionProvider::QMenuBarActionProvider(QMenuBar *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
ActionProviderBase(widget),
|
|
||||||
m_widget(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect QMenuBarActionProvider::actionGeometry(QAction *action) const
|
|
||||||
{
|
|
||||||
return m_widget->actionGeometry(action);
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *QMenuBarActionProvider::actionAt(const QPoint &pos) const
|
|
||||||
{
|
|
||||||
return m_widget->actionAt(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt::Orientation QMenuBarActionProvider::orientation() const
|
|
||||||
{
|
|
||||||
return Qt::Horizontal;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------- QMenuActionProvider
|
|
||||||
QMenuActionProvider::QMenuActionProvider(QMenu *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
ActionProviderBase(widget),
|
|
||||||
m_widget(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect QMenuActionProvider::actionGeometry(QAction *action) const
|
|
||||||
{
|
|
||||||
return m_widget->actionGeometry(action);
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *QMenuActionProvider::actionAt(const QPoint &pos) const
|
|
||||||
{
|
|
||||||
return m_widget->actionAt(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt::Orientation QMenuActionProvider::orientation() const
|
|
||||||
{
|
|
||||||
return Qt::Vertical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_default_actionprovider.h"
|
|
|
@ -1,111 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef DEFAULT_ACTIONPROVIDER_H
|
|
||||||
#define DEFAULT_ACTIONPROVIDER_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
#include "actionprovider_p.h"
|
|
||||||
#include <extensionfactory_p.h>
|
|
||||||
|
|
||||||
#include <QtGui/QMenu>
|
|
||||||
#include <QtGui/QMenuBar>
|
|
||||||
#include <QtGui/QToolBar>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class FormWindow;
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT ActionProviderBase: public QDesignerActionProviderExtension
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
explicit ActionProviderBase(QWidget *widget);
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual void adjustIndicator(const QPoint &pos);
|
|
||||||
virtual Qt::Orientation orientation() const = 0;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual QRect indicatorGeometry(const QPoint &pos, Qt::LayoutDirection layoutDirection) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *m_indicator;
|
|
||||||
};
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT QToolBarActionProvider: public QObject, public ActionProviderBase
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerActionProviderExtension)
|
|
||||||
public:
|
|
||||||
explicit QToolBarActionProvider(QToolBar *widget, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
virtual QRect actionGeometry(QAction *action) const;
|
|
||||||
virtual QAction *actionAt(const QPoint &pos) const;
|
|
||||||
Qt::Orientation orientation() const;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual QRect indicatorGeometry(const QPoint &pos, Qt::LayoutDirection layoutDirection) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QToolBar *m_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT QMenuBarActionProvider: public QObject, public ActionProviderBase
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerActionProviderExtension)
|
|
||||||
public:
|
|
||||||
explicit QMenuBarActionProvider(QMenuBar *widget, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
virtual QRect actionGeometry(QAction *action) const;
|
|
||||||
virtual QAction *actionAt(const QPoint &pos) const;
|
|
||||||
Qt::Orientation orientation() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QMenuBar *m_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT QMenuActionProvider: public QObject, public ActionProviderBase
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerActionProviderExtension)
|
|
||||||
public:
|
|
||||||
explicit QMenuActionProvider(QMenu *widget, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
virtual QRect actionGeometry(QAction *action) const;
|
|
||||||
virtual QAction *actionAt(const QPoint &pos) const;
|
|
||||||
Qt::Orientation orientation() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QMenu *m_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef ExtensionFactory<QDesignerActionProviderExtension, QToolBar, QToolBarActionProvider> QToolBarActionProviderFactory;
|
|
||||||
typedef ExtensionFactory<QDesignerActionProviderExtension, QMenuBar, QMenuBarActionProvider> QMenuBarActionProviderFactory;
|
|
||||||
typedef ExtensionFactory<QDesignerActionProviderExtension, QMenu, QMenuActionProvider> QMenuActionProviderFactory;
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // DEFAULT_ACTIONPROVIDER_H
|
|
|
@ -1,154 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "default_container.h"
|
|
||||||
#include <QtCore/QDebug>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
static inline void setCurrentContainerIndex(int index, Container *container)
|
|
||||||
{
|
|
||||||
const bool blocked = container->signalsBlocked();
|
|
||||||
container->blockSignals(true);
|
|
||||||
container->setCurrentIndex(index);
|
|
||||||
container->blockSignals(blocked);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void ensureNoParent(QWidget *widget)
|
|
||||||
{
|
|
||||||
if (widget->parentWidget())
|
|
||||||
widget->setParent(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *PageLabel = "Page";
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// --------- QStackedWidgetContainer
|
|
||||||
QStackedWidgetContainer::QStackedWidgetContainer(QStackedWidget *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
m_widget(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QStackedWidgetContainer::setCurrentIndex(int index)
|
|
||||||
{
|
|
||||||
setCurrentContainerIndex(index, m_widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QStackedWidgetContainer::addWidget(QWidget *widget)
|
|
||||||
{
|
|
||||||
ensureNoParent(widget);
|
|
||||||
m_widget->addWidget(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QStackedWidgetContainer::insertWidget(int index, QWidget *widget)
|
|
||||||
{
|
|
||||||
ensureNoParent(widget);
|
|
||||||
m_widget->insertWidget(index, widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QStackedWidgetContainer::remove(int index)
|
|
||||||
{
|
|
||||||
m_widget->removeWidget(widget(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
// --------- QTabWidgetContainer
|
|
||||||
QTabWidgetContainer::QTabWidgetContainer(QTabWidget *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
m_widget(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QTabWidgetContainer::setCurrentIndex(int index)
|
|
||||||
{
|
|
||||||
setCurrentContainerIndex(index, m_widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QTabWidgetContainer::addWidget(QWidget *widget)
|
|
||||||
{
|
|
||||||
ensureNoParent(widget);
|
|
||||||
m_widget->addTab(widget, QString::fromUtf8(PageLabel));
|
|
||||||
}
|
|
||||||
|
|
||||||
void QTabWidgetContainer::insertWidget(int index, QWidget *widget)
|
|
||||||
{
|
|
||||||
ensureNoParent(widget);
|
|
||||||
m_widget->insertTab(index, widget, QString::fromUtf8(PageLabel));
|
|
||||||
}
|
|
||||||
|
|
||||||
void QTabWidgetContainer::remove(int index)
|
|
||||||
{
|
|
||||||
m_widget->removeTab(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------- QToolBoxContainer
|
|
||||||
QToolBoxContainer::QToolBoxContainer(QToolBox *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
m_widget(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QToolBoxContainer::setCurrentIndex(int index)
|
|
||||||
{
|
|
||||||
setCurrentContainerIndex(index, m_widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QToolBoxContainer::addWidget(QWidget *widget)
|
|
||||||
{
|
|
||||||
ensureNoParent(widget);
|
|
||||||
m_widget->addItem(widget, QString::fromUtf8(PageLabel));
|
|
||||||
}
|
|
||||||
|
|
||||||
void QToolBoxContainer::insertWidget(int index, QWidget *widget)
|
|
||||||
{
|
|
||||||
ensureNoParent(widget);
|
|
||||||
m_widget->insertItem(index, widget, QString::fromUtf8(PageLabel));
|
|
||||||
}
|
|
||||||
|
|
||||||
void QToolBoxContainer::remove(int index)
|
|
||||||
{
|
|
||||||
m_widget->removeItem(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------- QScrollAreaContainer
|
|
||||||
// We pass on active=true only if there are no children yet.
|
|
||||||
// If there are children, it is a legacy custom widget QScrollArea that has an internal,
|
|
||||||
// unmanaged child, in which case we deactivate the extension (otherwise we crash).
|
|
||||||
// The child will then not show up in the task menu
|
|
||||||
|
|
||||||
QScrollAreaContainer::QScrollAreaContainer(QScrollArea *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
SingleChildContainer<QScrollArea>(widget, widget->widget() == 0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
// ------------------- QDockWidgetContainer
|
|
||||||
QDockWidgetContainer::QDockWidgetContainer(QDockWidget *widget, QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
SingleChildContainer<QDockWidget>(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_default_container.h"
|
|
|
@ -1,193 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef DEFAULT_CONTAINER_H
|
|
||||||
#define DEFAULT_CONTAINER_H
|
|
||||||
|
|
||||||
#include <QtDesigner/container.h>
|
|
||||||
#include <QtDesigner/extension.h>
|
|
||||||
#include <extensionfactory_p.h>
|
|
||||||
|
|
||||||
#include <QtGui/QStackedWidget>
|
|
||||||
#include <QtGui/QTabWidget>
|
|
||||||
#include <QtGui/QToolBox>
|
|
||||||
#include <QtGui/QScrollArea>
|
|
||||||
#include <QtGui/QDockWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// ------------ QStackedWidgetContainer
|
|
||||||
class QStackedWidgetContainer: public QObject, public QDesignerContainerExtension
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerContainerExtension)
|
|
||||||
public:
|
|
||||||
explicit QStackedWidgetContainer(QStackedWidget *widget, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
virtual int count() const { return m_widget->count(); }
|
|
||||||
virtual QWidget *widget(int index) const { return m_widget->widget(index); }
|
|
||||||
|
|
||||||
virtual int currentIndex() const { return m_widget->currentIndex(); }
|
|
||||||
virtual void setCurrentIndex(int index);
|
|
||||||
|
|
||||||
virtual void addWidget(QWidget *widget);
|
|
||||||
virtual void insertWidget(int index, QWidget *widget);
|
|
||||||
virtual void remove(int index);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QStackedWidget *m_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
// ------------ QTabWidgetContainer
|
|
||||||
class QTabWidgetContainer: public QObject, public QDesignerContainerExtension
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerContainerExtension)
|
|
||||||
public:
|
|
||||||
explicit QTabWidgetContainer(QTabWidget *widget, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
virtual int count() const { return m_widget->count(); }
|
|
||||||
virtual QWidget *widget(int index) const { return m_widget->widget(index); }
|
|
||||||
|
|
||||||
virtual int currentIndex() const { return m_widget->currentIndex(); }
|
|
||||||
virtual void setCurrentIndex(int index);
|
|
||||||
|
|
||||||
virtual void addWidget(QWidget *widget);
|
|
||||||
virtual void insertWidget(int index, QWidget *widget);
|
|
||||||
virtual void remove(int index);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QTabWidget *m_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
// ------------ QToolBoxContainer
|
|
||||||
class QToolBoxContainer: public QObject, public QDesignerContainerExtension
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerContainerExtension)
|
|
||||||
public:
|
|
||||||
explicit QToolBoxContainer(QToolBox *widget, QObject *parent = nullptr);
|
|
||||||
|
|
||||||
virtual int count() const { return m_widget->count(); }
|
|
||||||
virtual QWidget *widget(int index) const { return m_widget->widget(index); }
|
|
||||||
|
|
||||||
virtual int currentIndex() const { return m_widget->currentIndex(); }
|
|
||||||
virtual void setCurrentIndex(int index);
|
|
||||||
|
|
||||||
virtual void addWidget(QWidget *widget);
|
|
||||||
virtual void insertWidget(int index, QWidget *widget);
|
|
||||||
virtual void remove(int index);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QToolBox *m_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
// ------------ SingleChildContainer:
|
|
||||||
// Template for containers that have a single child widget using widget()/setWidget().
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
class SingleChildContainer: public QDesignerContainerExtension
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
explicit SingleChildContainer(Container *widget, bool active = true);
|
|
||||||
public:
|
|
||||||
virtual int count() const;
|
|
||||||
virtual QWidget *widget(int index) const;
|
|
||||||
virtual int currentIndex() const;
|
|
||||||
virtual void setCurrentIndex(int /*index*/) {}
|
|
||||||
virtual void addWidget(QWidget *widget);
|
|
||||||
virtual void insertWidget(int index, QWidget *widget);
|
|
||||||
virtual void remove(int /*index*/) {}
|
|
||||||
|
|
||||||
private:
|
|
||||||
const bool m_active;
|
|
||||||
Container *m_container;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
SingleChildContainer<Container>::SingleChildContainer(Container *widget, bool active) :
|
|
||||||
m_active(active),
|
|
||||||
m_container(widget)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
int SingleChildContainer<Container>::count() const
|
|
||||||
{
|
|
||||||
return m_active && m_container->widget() ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
QWidget *SingleChildContainer<Container>::widget(int /* index */) const
|
|
||||||
{
|
|
||||||
return m_container->widget();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
int SingleChildContainer<Container>::currentIndex() const
|
|
||||||
{
|
|
||||||
return m_active && m_container->widget() ? 0 : -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
void SingleChildContainer<Container>::addWidget(QWidget *widget)
|
|
||||||
{
|
|
||||||
Q_ASSERT(m_container->widget() == 0);
|
|
||||||
widget->setParent(m_container);
|
|
||||||
m_container->setWidget(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Container>
|
|
||||||
void SingleChildContainer<Container>::insertWidget(int /* index */, QWidget *widget)
|
|
||||||
{
|
|
||||||
addWidget(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------ QScrollAreaContainer
|
|
||||||
class QScrollAreaContainer: public QObject, public SingleChildContainer<QScrollArea>
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerContainerExtension)
|
|
||||||
public:
|
|
||||||
explicit QScrollAreaContainer(QScrollArea *widget, QObject *parent = nullptr);
|
|
||||||
};
|
|
||||||
|
|
||||||
// --------------- QDockWidgetContainer
|
|
||||||
class QDockWidgetContainer: public QObject, public SingleChildContainer<QDockWidget>
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QDesignerContainerExtension)
|
|
||||||
public:
|
|
||||||
explicit QDockWidgetContainer(QDockWidget *widget, QObject *parent = nullptr);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef ExtensionFactory<QDesignerContainerExtension, QStackedWidget, QStackedWidgetContainer> QDesignerStackedWidgetContainerFactory;
|
|
||||||
typedef ExtensionFactory<QDesignerContainerExtension, QTabWidget, QTabWidgetContainer> QDesignerTabWidgetContainerFactory;
|
|
||||||
typedef ExtensionFactory<QDesignerContainerExtension, QToolBox, QToolBoxContainer> QDesignerToolBoxContainerFactory;
|
|
||||||
typedef ExtensionFactory<QDesignerContainerExtension, QScrollArea, QScrollAreaContainer> QScrollAreaContainerFactory;
|
|
||||||
typedef ExtensionFactory<QDesignerContainerExtension, QDockWidget, QDockWidgetContainer> QDockWidgetContainerFactory;
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // DEFAULT_CONTAINER_H
|
|
|
@ -1,60 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "default_layoutdecoration.h"
|
|
||||||
#include "qlayout_widget_p.h"
|
|
||||||
|
|
||||||
#include <layoutinfo_p.h>
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractmetadatabase.h>
|
|
||||||
#include <QtDesigner/abstractformwindow.h>
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// ---- QDesignerLayoutDecorationFactory ----
|
|
||||||
QDesignerLayoutDecorationFactory::QDesignerLayoutDecorationFactory(QExtensionManager *parent)
|
|
||||||
: QExtensionFactory(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QObject *QDesignerLayoutDecorationFactory::createExtension(QObject *object, const QString &iid, QObject *parent) const
|
|
||||||
{
|
|
||||||
if (!object->isWidgetType() || iid != Q_TYPEID(QDesignerLayoutDecorationExtension))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
QWidget *widget = qobject_cast<QWidget*>(object);
|
|
||||||
|
|
||||||
if (const QLayoutWidget *layoutWidget = qobject_cast<const QLayoutWidget*>(widget))
|
|
||||||
return QLayoutSupport::createLayoutSupport(layoutWidget->formWindow(), widget, parent);
|
|
||||||
|
|
||||||
if (QDesignerFormWindowInterface *fw = QDesignerFormWindowInterface::findFormWindow(widget))
|
|
||||||
if (LayoutInfo::managedLayout(fw->core(), widget))
|
|
||||||
return QLayoutSupport::createLayoutSupport(fw, widget, parent);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_default_layoutdecoration.h"
|
|
|
@ -1,49 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef DEFAULT_LAYOUTDECORATION_H
|
|
||||||
#define DEFAULT_LAYOUTDECORATION_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
#include <QtDesigner/layoutdecoration.h>
|
|
||||||
#include <QtDesigner/default_extensionfactory.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormWindowInterface;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
class QDesignerLayoutDecorationFactory: public QExtensionFactory
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACES(QAbstractExtensionFactory)
|
|
||||||
public:
|
|
||||||
explicit QDesignerLayoutDecorationFactory(QExtensionManager *parent = 0);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // DEFAULT_LAYOUTDECORATION_H
|
|
|
@ -1,180 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "deviceprofiledialog.h"
|
|
||||||
#include "ui_deviceprofiledialog.h"
|
|
||||||
|
|
||||||
#include <abstractdialoggui_p.h>
|
|
||||||
#include <deviceprofile_p.h>
|
|
||||||
|
|
||||||
#include <QtGui/QDialogButtonBox>
|
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
#include <QtGui/QPushButton>
|
|
||||||
#include <QtGui/QStyleFactory>
|
|
||||||
#include <QtGui/QFontDatabase>
|
|
||||||
|
|
||||||
#include <QtCore/QFileInfo>
|
|
||||||
#include <QtCore/QFile>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
static const char *profileExtensionC = "qdp";
|
|
||||||
|
|
||||||
static inline QString fileFilter()
|
|
||||||
{
|
|
||||||
return qdesigner_internal::DeviceProfileDialog::tr("Device Profiles (*.%1)").arg(QLatin1String(profileExtensionC));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Populate a combo with a sequence of integers, also set them as data.
|
|
||||||
static inline void populateNumericCombo(const QList<int> &numbers, QComboBox *cb)
|
|
||||||
{
|
|
||||||
cb->setEditable(false);
|
|
||||||
foreach (const int num, numbers) {
|
|
||||||
cb->addItem(QString::number(num), QVariant(num));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
DeviceProfileDialog::DeviceProfileDialog(QDesignerDialogGuiInterface *dlgGui, QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
m_ui(new Ui_DeviceProfileDialog),
|
|
||||||
m_dlgGui(dlgGui)
|
|
||||||
{
|
|
||||||
setModal(true);
|
|
||||||
m_ui->setupUi(this);
|
|
||||||
|
|
||||||
populateNumericCombo(QFontDatabase::standardSizes(), m_ui->m_systemFontSizeCombo);
|
|
||||||
|
|
||||||
// Styles
|
|
||||||
const QStringList styles = QStyleFactory::keys();
|
|
||||||
m_ui->m_styleCombo->addItem(tr("Default"), QVariant(QString()));
|
|
||||||
const QStringList::const_iterator cend = styles.constEnd();
|
|
||||||
for (QStringList::const_iterator it = styles.constBegin(); it != cend; ++it)
|
|
||||||
m_ui->m_styleCombo->addItem(*it, *it);
|
|
||||||
|
|
||||||
connect(m_ui->m_nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(nameChanged(QString)));
|
|
||||||
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
|
||||||
connect(m_ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept()));
|
|
||||||
// Note that Load/Save emit accepted() of the button box..
|
|
||||||
connect(m_ui->buttonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(save()));
|
|
||||||
connect(m_ui->buttonBox->button(QDialogButtonBox::Open), SIGNAL(clicked()), this, SLOT(open()));
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceProfileDialog::~DeviceProfileDialog()
|
|
||||||
{
|
|
||||||
delete m_ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
DeviceProfile DeviceProfileDialog::deviceProfile() const
|
|
||||||
{
|
|
||||||
DeviceProfile rc;
|
|
||||||
rc.setName(m_ui->m_nameLineEdit->text());
|
|
||||||
rc.setFontFamily(m_ui->m_systemFontComboBox->currentFont().family());
|
|
||||||
rc.setFontPointSize(m_ui->m_systemFontSizeCombo->itemData(m_ui->m_systemFontSizeCombo->currentIndex()).toInt());
|
|
||||||
|
|
||||||
int dpiX, dpiY;
|
|
||||||
m_ui->m_dpiChooser->getDPI(&dpiX, &dpiY);
|
|
||||||
rc.setDpiX(dpiX);
|
|
||||||
rc.setDpiY(dpiY);
|
|
||||||
|
|
||||||
rc.setStyle(m_ui->m_styleCombo->itemData(m_ui->m_styleCombo->currentIndex()).toString());
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceProfileDialog::setDeviceProfile(const DeviceProfile &s)
|
|
||||||
{
|
|
||||||
m_ui->m_nameLineEdit->setText(s.name());
|
|
||||||
m_ui->m_systemFontComboBox->setCurrentFont(QFont(s.fontFamily()));
|
|
||||||
const int fontSizeIndex = m_ui->m_systemFontSizeCombo->findData(QVariant(s.fontPointSize()));
|
|
||||||
m_ui->m_systemFontSizeCombo->setCurrentIndex(fontSizeIndex != -1 ? fontSizeIndex : 0);
|
|
||||||
m_ui->m_dpiChooser->setDPI(s.dpiX(), s.dpiY());
|
|
||||||
const int styleIndex = m_ui->m_styleCombo->findData(s.style());
|
|
||||||
m_ui->m_styleCombo->setCurrentIndex(styleIndex != -1 ? styleIndex : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceProfileDialog::setOkButtonEnabled(bool v)
|
|
||||||
{
|
|
||||||
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(v);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DeviceProfileDialog::showDialog(const QStringList &existingNames)
|
|
||||||
{
|
|
||||||
m_existingNames = existingNames;
|
|
||||||
m_ui->m_nameLineEdit->setFocus(Qt::OtherFocusReason);
|
|
||||||
nameChanged(m_ui->m_nameLineEdit->text());
|
|
||||||
return exec() == Accepted;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceProfileDialog::nameChanged(const QString &name)
|
|
||||||
{
|
|
||||||
const bool invalid = name.isEmpty() || m_existingNames.indexOf(name) != -1;
|
|
||||||
setOkButtonEnabled(!invalid);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceProfileDialog::save()
|
|
||||||
{
|
|
||||||
QString fn = m_dlgGui->getSaveFileName(this, tr("Save Profile"), QString(), fileFilter());
|
|
||||||
if (fn.isEmpty())
|
|
||||||
return;
|
|
||||||
if (QFileInfo(fn).completeSuffix().isEmpty()) {
|
|
||||||
fn += QLatin1Char('.');
|
|
||||||
fn += QLatin1String(profileExtensionC);
|
|
||||||
}
|
|
||||||
|
|
||||||
QFile file(fn);
|
|
||||||
if (!file.open(QIODevice::WriteOnly|QIODevice::Text)) {
|
|
||||||
critical(tr("Save Profile - Error"), tr("Unable to open the file '%1' for writing: %2").arg(fn, file.errorString()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
file.write(deviceProfile().toXml().toUtf8());
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceProfileDialog::open()
|
|
||||||
{
|
|
||||||
const QString fn = m_dlgGui->getOpenFileName(this, tr("Open profile"), QString(), fileFilter());
|
|
||||||
if (fn.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
QFile file(fn);
|
|
||||||
if (!file.open(QIODevice::ReadOnly|QIODevice::Text)) {
|
|
||||||
critical(tr("Open Profile - Error"), tr("Unable to open the file '%1' for reading: %2").arg(fn, file.errorString()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QString errorMessage;
|
|
||||||
DeviceProfile newSettings;
|
|
||||||
if (!newSettings.fromXml(QString::fromUtf8(file.readAll()), &errorMessage)) {
|
|
||||||
critical(tr("Open Profile - Error"), tr("'%1' is not a valid profile: %2").arg(fn, errorMessage));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setDeviceProfile(newSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DeviceProfileDialog::critical(const QString &title, const QString &msg)
|
|
||||||
{
|
|
||||||
m_dlgGui->message(this, QDesignerDialogGuiInterface::OtherMessage, QMessageBox::Critical, title, msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#include "moc_deviceprofiledialog.h"
|
|
|
@ -1,81 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
//
|
|
||||||
// W A R N I N G
|
|
||||||
// -------------
|
|
||||||
//
|
|
||||||
// This file is not part of the Katie API. It exists for the convenience
|
|
||||||
// of Katie Designer. This header
|
|
||||||
// file may change from version to version without notice, or even be removed.
|
|
||||||
//
|
|
||||||
// We mean it.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef SYSTEMSETTINGSDIALOG_H
|
|
||||||
#define SYSTEMSETTINGSDIALOG_H
|
|
||||||
|
|
||||||
#include <QtGui/QDialog>
|
|
||||||
#include <QtCore/QStringList>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class Ui_DeviceProfileDialog;
|
|
||||||
class QDesignerDialogGuiInterface;
|
|
||||||
|
|
||||||
class QDialogButtonBox;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class DeviceProfile;
|
|
||||||
|
|
||||||
/* DeviceProfileDialog: Widget to edit system settings for embedded design */
|
|
||||||
|
|
||||||
class DeviceProfileDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_DISABLE_COPY(DeviceProfileDialog)
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit DeviceProfileDialog(QDesignerDialogGuiInterface *dlgGui, QWidget *parent = nullptr);
|
|
||||||
~DeviceProfileDialog();
|
|
||||||
|
|
||||||
DeviceProfile deviceProfile() const;
|
|
||||||
void setDeviceProfile(const DeviceProfile &s);
|
|
||||||
|
|
||||||
bool showDialog(const QStringList &existingNames);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void setOkButtonEnabled(bool);
|
|
||||||
void nameChanged(const QString &name);
|
|
||||||
void save();
|
|
||||||
void open();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void critical(const QString &title, const QString &msg);
|
|
||||||
Ui_DeviceProfileDialog *m_ui;
|
|
||||||
QDesignerDialogGuiInterface *m_dlgGui;
|
|
||||||
QStringList m_existingNames;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // SYSTEMSETTINGSDIALOG_H
|
|
|
@ -1,107 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>DeviceProfileDialog</class>
|
|
||||||
<widget class="QDialog" name="dialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>348</width>
|
|
||||||
<height>209</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="SystemSettingsWidget" native="true">
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="m_systemFontFamilyLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Family</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>m_systemFontComboBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QFontComboBox" name="m_systemFontComboBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="m_systemFontSizeLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Point Size</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>m_systemFontSizeCombo</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QComboBox" name="m_systemFontSizeCombo"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="m_styleLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Style</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>m_styleCombo</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="m_styleCombo"/>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="m_systemDPILabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device DPI</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="qdesigner_internal::DPI_Chooser" name="m_dpiChooser" native="true"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="m_nameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="m_nameLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Open|QDialogButtonBox::Save</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>qdesigner_internal::DPI_Chooser</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>dpi_chooser.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>m_nameLineEdit</tabstop>
|
|
||||||
<tabstop>m_systemFontComboBox</tabstop>
|
|
||||||
<tabstop>m_systemFontSizeCombo</tabstop>
|
|
||||||
<tabstop>m_styleCombo</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
|
@ -1,188 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "dpi_chooser.h"
|
|
||||||
|
|
||||||
#include <deviceprofile_p.h>
|
|
||||||
|
|
||||||
#include <QtGui/QComboBox>
|
|
||||||
#include <QtGui/QSpinBox>
|
|
||||||
#include <QtGui/QLabel>
|
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
#include <QtGui/QHBoxLayout>
|
|
||||||
#include <QtGui/QPushButton>
|
|
||||||
#include <QtGui/QCheckBox>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
enum { minDPI = 50, maxDPI = 400 };
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// Entry struct for predefined values
|
|
||||||
struct DPI_Entry {
|
|
||||||
int dpiX;
|
|
||||||
int dpiY;
|
|
||||||
const char *description;
|
|
||||||
};
|
|
||||||
|
|
||||||
const struct DPI_Entry dpiEntries[] = {
|
|
||||||
//: Embedded device standard screen resolution
|
|
||||||
{ 96, 96, QT_TRANSLATE_NOOP("DPI_Chooser", "Standard (96 x 96)") },
|
|
||||||
//: Embedded device screen resolution
|
|
||||||
{ 179, 185, QT_TRANSLATE_NOOP("DPI_Chooser", "Greenphone (179 x 185)") },
|
|
||||||
//: Embedded device high definition screen resolution
|
|
||||||
{ 192, 192, QT_TRANSLATE_NOOP("DPI_Chooser", "High (192 x 192)") }
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(const struct qdesigner_internal::DPI_Entry*)
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// ------------- DPI_Chooser
|
|
||||||
|
|
||||||
DPI_Chooser::DPI_Chooser(QWidget *parent) :
|
|
||||||
QWidget(parent),
|
|
||||||
m_systemEntry(new DPI_Entry),
|
|
||||||
m_predefinedCombo(new QComboBox),
|
|
||||||
m_dpiXSpinBox(new QSpinBox),
|
|
||||||
m_dpiYSpinBox(new QSpinBox)
|
|
||||||
{
|
|
||||||
// Predefined settings: System
|
|
||||||
DeviceProfile::systemResolution(&(m_systemEntry->dpiX), &(m_systemEntry->dpiY));
|
|
||||||
m_systemEntry->description = 0;
|
|
||||||
const struct DPI_Entry *systemEntry = m_systemEntry;
|
|
||||||
//: System resolution
|
|
||||||
m_predefinedCombo->addItem(tr("System (%1 x %2)").arg(m_systemEntry->dpiX).arg(m_systemEntry->dpiY), QVariant::fromValue(systemEntry));
|
|
||||||
// Devices. Exclude the system values as not to duplicate the entries
|
|
||||||
const int predefinedCount = sizeof(dpiEntries)/sizeof(DPI_Entry);
|
|
||||||
const struct DPI_Entry *ecend = dpiEntries + predefinedCount;
|
|
||||||
for (const struct DPI_Entry *it = dpiEntries; it < ecend; ++it)
|
|
||||||
if (it->dpiX != m_systemEntry->dpiX || it->dpiY != m_systemEntry->dpiY)
|
|
||||||
m_predefinedCombo->addItem(tr(it->description), QVariant::fromValue(it));
|
|
||||||
m_predefinedCombo->addItem(tr("User defined"));
|
|
||||||
|
|
||||||
setFocusProxy(m_predefinedCombo);
|
|
||||||
m_predefinedCombo->setEditable(false);
|
|
||||||
m_predefinedCombo->setCurrentIndex(0);
|
|
||||||
connect(m_predefinedCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(syncSpinBoxes()));
|
|
||||||
// top row with predefined settings
|
|
||||||
QVBoxLayout *vBoxLayout = new QVBoxLayout;
|
|
||||||
vBoxLayout->setMargin(0);
|
|
||||||
vBoxLayout->addWidget(m_predefinedCombo);
|
|
||||||
// Spin box row
|
|
||||||
QHBoxLayout *hBoxLayout = new QHBoxLayout;
|
|
||||||
hBoxLayout->setMargin(0);
|
|
||||||
|
|
||||||
m_dpiXSpinBox->setMinimum(minDPI);
|
|
||||||
m_dpiXSpinBox->setMaximum(maxDPI);
|
|
||||||
hBoxLayout->addWidget(m_dpiXSpinBox);
|
|
||||||
//: DPI X/Y separator
|
|
||||||
hBoxLayout->addWidget(new QLabel(tr(" x ")));
|
|
||||||
|
|
||||||
m_dpiYSpinBox->setMinimum(minDPI);
|
|
||||||
m_dpiYSpinBox->setMaximum(maxDPI);
|
|
||||||
hBoxLayout->addWidget(m_dpiYSpinBox);
|
|
||||||
|
|
||||||
hBoxLayout->addStretch();
|
|
||||||
vBoxLayout->addLayout(hBoxLayout);
|
|
||||||
setLayout(vBoxLayout);
|
|
||||||
|
|
||||||
syncSpinBoxes();
|
|
||||||
}
|
|
||||||
|
|
||||||
DPI_Chooser::~DPI_Chooser()
|
|
||||||
{
|
|
||||||
delete m_systemEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DPI_Chooser::getDPI(int *dpiX, int *dpiY) const
|
|
||||||
{
|
|
||||||
*dpiX = m_dpiXSpinBox->value();
|
|
||||||
*dpiY = m_dpiYSpinBox->value();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DPI_Chooser::setDPI(int dpiX, int dpiY)
|
|
||||||
{
|
|
||||||
// Default to system if it is something weird
|
|
||||||
const bool valid = dpiX >= minDPI && dpiX <= maxDPI && dpiY >= minDPI && dpiY <= maxDPI;
|
|
||||||
if (!valid) {
|
|
||||||
m_predefinedCombo->setCurrentIndex(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Try to find the values among the predefined settings
|
|
||||||
const int count = m_predefinedCombo->count();
|
|
||||||
int predefinedIndex = -1;
|
|
||||||
for (int i = 0; i < count; i++) {
|
|
||||||
const QVariant data = m_predefinedCombo->itemData(i);
|
|
||||||
if (data.type() != QVariant::Invalid) {
|
|
||||||
const struct DPI_Entry *entry = qvariant_cast<const struct DPI_Entry *>(data);
|
|
||||||
if (entry->dpiX == dpiX && entry->dpiY == dpiY) {
|
|
||||||
predefinedIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (predefinedIndex != -1) {
|
|
||||||
m_predefinedCombo->setCurrentIndex(predefinedIndex); // triggers syncSpinBoxes()
|
|
||||||
} else {
|
|
||||||
setUserDefinedValues(dpiX, dpiY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DPI_Chooser::setUserDefinedValues(int dpiX, int dpiY)
|
|
||||||
{
|
|
||||||
const bool blocked = m_predefinedCombo->blockSignals(true);
|
|
||||||
m_predefinedCombo->setCurrentIndex(m_predefinedCombo->count() - 1);
|
|
||||||
m_predefinedCombo->blockSignals(blocked);
|
|
||||||
|
|
||||||
m_dpiXSpinBox->setEnabled(true);
|
|
||||||
m_dpiYSpinBox->setEnabled(true);
|
|
||||||
m_dpiXSpinBox->setValue(dpiX);
|
|
||||||
m_dpiYSpinBox->setValue(dpiY);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DPI_Chooser::syncSpinBoxes()
|
|
||||||
{
|
|
||||||
const int predefIdx = m_predefinedCombo->currentIndex();
|
|
||||||
const QVariant data = m_predefinedCombo->itemData(predefIdx);
|
|
||||||
|
|
||||||
// Predefined mode in which spin boxes are disabled or user defined?
|
|
||||||
const bool userSetting = data.type() == QVariant::Invalid;
|
|
||||||
m_dpiXSpinBox->setEnabled(userSetting);
|
|
||||||
m_dpiYSpinBox->setEnabled(userSetting);
|
|
||||||
|
|
||||||
if (!userSetting) {
|
|
||||||
const struct DPI_Entry *entry = qvariant_cast<const struct DPI_Entry *>(data);
|
|
||||||
m_dpiXSpinBox->setValue(entry->dpiX);
|
|
||||||
m_dpiYSpinBox->setValue(entry->dpiY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_dpi_chooser.h"
|
|
|
@ -1,74 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
//
|
|
||||||
// W A R N I N G
|
|
||||||
// -------------
|
|
||||||
//
|
|
||||||
// This file is not part of the Katie API. It exists for the convenience
|
|
||||||
// of Katie Designer. This header
|
|
||||||
// file may change from version to version without notice, or even be removed.
|
|
||||||
//
|
|
||||||
// We mean it.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef DPICHOOSER_H
|
|
||||||
#define DPICHOOSER_H
|
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QSpinBox;
|
|
||||||
class QComboBox;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
struct DPI_Entry;
|
|
||||||
|
|
||||||
/* Let the user choose a DPI settings */
|
|
||||||
class DPI_Chooser : public QWidget {
|
|
||||||
Q_DISABLE_COPY(DPI_Chooser)
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit DPI_Chooser(QWidget *parent = nullptr);
|
|
||||||
~DPI_Chooser();
|
|
||||||
|
|
||||||
void getDPI(int *dpiX, int *dpiY) const;
|
|
||||||
void setDPI(int dpiX, int dpiY);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void syncSpinBoxes();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void setUserDefinedValues(int dpiX, int dpiY);
|
|
||||||
|
|
||||||
struct DPI_Entry *m_systemEntry;
|
|
||||||
QComboBox *m_predefinedCombo;
|
|
||||||
QSpinBox *m_dpiXSpinBox;
|
|
||||||
QSpinBox *m_dpiYSpinBox;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // DPICHOOSER_H
|
|
|
@ -1,433 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "embeddedoptionspage.h"
|
|
||||||
#include "deviceprofiledialog.h"
|
|
||||||
#include "widgetfactory_p.h"
|
|
||||||
#include "formwindowmanager.h"
|
|
||||||
|
|
||||||
#include <deviceprofile_p.h>
|
|
||||||
#include <iconloader_p.h>
|
|
||||||
#include <shared_settings_p.h>
|
|
||||||
#include <abstractdialoggui_p.h>
|
|
||||||
#include <formwindowbase_p.h>
|
|
||||||
|
|
||||||
|
|
||||||
// SDK
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
#include <QtDesigner/abstractformwindowmanager.h>
|
|
||||||
|
|
||||||
#include <QtGui/QLabel>
|
|
||||||
#include <QtGui/QHBoxLayout>
|
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
#include <QtGui/QApplication>
|
|
||||||
#include <QtGui/QComboBox>
|
|
||||||
#include <QtGui/QToolButton>
|
|
||||||
#include <QtGui/QMessageBox>
|
|
||||||
#include <QtGui/QGroupBox>
|
|
||||||
|
|
||||||
#include <QtCore/QSet>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
typedef QList<DeviceProfile> DeviceProfileList;
|
|
||||||
|
|
||||||
enum { profileComboIndexOffset = 1 };
|
|
||||||
|
|
||||||
// Sort by name. Used by template, do not make it static!
|
|
||||||
bool deviceProfileLessThan(const DeviceProfile &d1, const DeviceProfile &d2)
|
|
||||||
{
|
|
||||||
return d1.name().toLower() < d2.name().toLower();
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool ask(QWidget *parent,
|
|
||||||
QDesignerDialogGuiInterface *dlgui,
|
|
||||||
const QString &title,
|
|
||||||
const QString &what)
|
|
||||||
{
|
|
||||||
return dlgui->message(parent, QDesignerDialogGuiInterface::OtherMessage,
|
|
||||||
QMessageBox::Question, title, what,
|
|
||||||
QMessageBox::Yes|QMessageBox::No, QMessageBox::No) == QMessageBox::Yes;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------ EmbeddedOptionsControlPrivate
|
|
||||||
class EmbeddedOptionsControlPrivate {
|
|
||||||
Q_DISABLE_COPY(EmbeddedOptionsControlPrivate)
|
|
||||||
public:
|
|
||||||
EmbeddedOptionsControlPrivate(QDesignerFormEditorInterface *core);
|
|
||||||
void init(EmbeddedOptionsControl *q);
|
|
||||||
|
|
||||||
bool isDirty() const { return m_dirty; }
|
|
||||||
|
|
||||||
void loadSettings();
|
|
||||||
void saveSettings();
|
|
||||||
void slotAdd();
|
|
||||||
void slotEdit();
|
|
||||||
void slotDelete();
|
|
||||||
void slotProfileIndexChanged(int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QStringList existingProfileNames() const;
|
|
||||||
void sortAndPopulateProfileCombo();
|
|
||||||
void updateState();
|
|
||||||
void updateDescriptionLabel();
|
|
||||||
|
|
||||||
QDesignerFormEditorInterface *m_core;
|
|
||||||
QComboBox *m_profileCombo;
|
|
||||||
QToolButton *m_addButton;
|
|
||||||
QToolButton *m_editButton;
|
|
||||||
QToolButton *m_deleteButton;
|
|
||||||
QLabel *m_descriptionLabel;
|
|
||||||
|
|
||||||
DeviceProfileList m_sortedProfiles;
|
|
||||||
EmbeddedOptionsControl *m_q;
|
|
||||||
bool m_dirty;
|
|
||||||
QSet<QString> m_usedProfiles;
|
|
||||||
};
|
|
||||||
|
|
||||||
EmbeddedOptionsControlPrivate::EmbeddedOptionsControlPrivate(QDesignerFormEditorInterface *core) :
|
|
||||||
m_core(core),
|
|
||||||
m_profileCombo(new QComboBox),
|
|
||||||
m_addButton(new QToolButton),
|
|
||||||
m_editButton(new QToolButton),
|
|
||||||
m_deleteButton(new QToolButton),
|
|
||||||
m_descriptionLabel(new QLabel),
|
|
||||||
m_q(0),
|
|
||||||
m_dirty(false)
|
|
||||||
{
|
|
||||||
m_descriptionLabel->setMinimumHeight(80);
|
|
||||||
// Determine used profiles to lock them
|
|
||||||
const QDesignerFormWindowManagerInterface *fwm = core->formWindowManager();
|
|
||||||
if (const int fwCount = fwm->formWindowCount()) {
|
|
||||||
for (int i = 0; i < fwCount; i++)
|
|
||||||
if (const FormWindowBase *fwb = qobject_cast<const FormWindowBase *>(fwm->formWindow(i))) {
|
|
||||||
const QString deviceProfileName = fwb->deviceProfileName();
|
|
||||||
if (!deviceProfileName.isEmpty())
|
|
||||||
m_usedProfiles.insert(deviceProfileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::init(EmbeddedOptionsControl *q)
|
|
||||||
{
|
|
||||||
m_q = q;
|
|
||||||
QVBoxLayout *vLayout = new QVBoxLayout;
|
|
||||||
QHBoxLayout *hLayout = new QHBoxLayout;
|
|
||||||
m_profileCombo->setMinimumWidth(200);
|
|
||||||
m_profileCombo->setEditable(false);
|
|
||||||
hLayout->addWidget(m_profileCombo);
|
|
||||||
m_profileCombo->addItem(EmbeddedOptionsControl::tr("None"));
|
|
||||||
EmbeddedOptionsControl::connect(m_profileCombo, SIGNAL(currentIndexChanged(int)), m_q, SLOT(slotProfileIndexChanged(int)));
|
|
||||||
|
|
||||||
m_addButton->setIcon(createIconSet(QString::fromUtf8("plus.png")));
|
|
||||||
m_addButton->setToolTip(EmbeddedOptionsControl::tr("Add a profile"));
|
|
||||||
EmbeddedOptionsControl::connect(m_addButton, SIGNAL(clicked()), m_q, SLOT(slotAdd()));
|
|
||||||
hLayout->addWidget(m_addButton);
|
|
||||||
|
|
||||||
EmbeddedOptionsControl::connect(m_editButton, SIGNAL(clicked()), m_q, SLOT(slotEdit()));
|
|
||||||
m_editButton->setIcon(createIconSet(QString::fromUtf8("edit.png")));
|
|
||||||
m_editButton->setToolTip(EmbeddedOptionsControl::tr("Edit the selected profile"));
|
|
||||||
hLayout->addWidget(m_editButton);
|
|
||||||
|
|
||||||
m_deleteButton->setIcon(createIconSet(QString::fromUtf8("minus.png")));
|
|
||||||
m_deleteButton->setToolTip(EmbeddedOptionsControl::tr("Delete the selected profile"));
|
|
||||||
EmbeddedOptionsControl::connect(m_deleteButton, SIGNAL(clicked()), m_q, SLOT(slotDelete()));
|
|
||||||
hLayout->addWidget(m_deleteButton);
|
|
||||||
|
|
||||||
hLayout->addStretch();
|
|
||||||
vLayout->addLayout(hLayout);
|
|
||||||
vLayout->addWidget(m_descriptionLabel);
|
|
||||||
m_q->setLayout(vLayout);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList EmbeddedOptionsControlPrivate::existingProfileNames() const
|
|
||||||
{
|
|
||||||
QStringList rc;
|
|
||||||
const DeviceProfileList::const_iterator dcend = m_sortedProfiles.constEnd();
|
|
||||||
for (DeviceProfileList::const_iterator it = m_sortedProfiles.constBegin(); it != dcend; ++it)
|
|
||||||
rc.push_back(it->name());
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::slotAdd()
|
|
||||||
{
|
|
||||||
DeviceProfileDialog dlg(m_core->dialogGui(), m_q);
|
|
||||||
dlg.setWindowTitle(EmbeddedOptionsControl::tr("Add Profile"));
|
|
||||||
// Create a new profile with a new, unique name
|
|
||||||
DeviceProfile settings;
|
|
||||||
settings.fromSystem();
|
|
||||||
dlg.setDeviceProfile(settings);
|
|
||||||
|
|
||||||
const QStringList names = existingProfileNames();
|
|
||||||
const QString newNamePrefix = EmbeddedOptionsControl::tr("New profile");
|
|
||||||
QString newName = newNamePrefix;
|
|
||||||
for (int i = 2; names.contains(newName); i++) {
|
|
||||||
newName = newNamePrefix;
|
|
||||||
newName += QString::number(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.setName(newName);
|
|
||||||
dlg.setDeviceProfile(settings);
|
|
||||||
if (dlg.showDialog(names)) {
|
|
||||||
const DeviceProfile newProfile = dlg.deviceProfile();
|
|
||||||
m_sortedProfiles.push_back(newProfile);
|
|
||||||
// Maintain sorted order
|
|
||||||
sortAndPopulateProfileCombo();
|
|
||||||
const int index = m_profileCombo->findText(newProfile.name());
|
|
||||||
m_profileCombo->setCurrentIndex(index);
|
|
||||||
m_dirty = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::slotEdit()
|
|
||||||
{
|
|
||||||
const int index = m_profileCombo->currentIndex() - profileComboIndexOffset;
|
|
||||||
if (index < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Edit the profile, compile a list of existing names
|
|
||||||
// excluding current one. re-insert if changed,
|
|
||||||
// re-sort if name changed.
|
|
||||||
const DeviceProfile oldProfile = m_sortedProfiles.at(index);
|
|
||||||
const QString oldName = oldProfile.name();
|
|
||||||
QStringList names = existingProfileNames();
|
|
||||||
names.removeAll(oldName);
|
|
||||||
|
|
||||||
DeviceProfileDialog dlg(m_core->dialogGui(), m_q);
|
|
||||||
dlg.setWindowTitle(EmbeddedOptionsControl::tr("Edit Profile"));
|
|
||||||
dlg.setDeviceProfile(oldProfile);
|
|
||||||
if (dlg.showDialog(names)) {
|
|
||||||
const DeviceProfile newProfile = dlg.deviceProfile();
|
|
||||||
if (newProfile != oldProfile) {
|
|
||||||
m_dirty = true;
|
|
||||||
m_sortedProfiles[index] = newProfile;
|
|
||||||
if (newProfile.name() != oldName) {
|
|
||||||
sortAndPopulateProfileCombo();
|
|
||||||
const int index = m_profileCombo->findText(newProfile.name());
|
|
||||||
m_profileCombo->setCurrentIndex(index);
|
|
||||||
} else {
|
|
||||||
updateDescriptionLabel();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::slotDelete()
|
|
||||||
{
|
|
||||||
const int index = m_profileCombo->currentIndex() - profileComboIndexOffset;
|
|
||||||
if (index < 0)
|
|
||||||
return;
|
|
||||||
const QString name = m_sortedProfiles.at(index).name();
|
|
||||||
if (ask(m_q, m_core->dialogGui(),
|
|
||||||
EmbeddedOptionsControl::tr("Delete Profile"),
|
|
||||||
EmbeddedOptionsControl::tr("Would you like to delete the profile '%1'?").arg(name))) {
|
|
||||||
m_profileCombo->setCurrentIndex(0);
|
|
||||||
m_sortedProfiles.removeAt(index);
|
|
||||||
m_profileCombo->removeItem(index + profileComboIndexOffset);
|
|
||||||
m_dirty = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::sortAndPopulateProfileCombo()
|
|
||||||
{
|
|
||||||
// Clear items until only "None" is left
|
|
||||||
for (int i = m_profileCombo->count() - 1; i > 0; i--)
|
|
||||||
m_profileCombo->removeItem(i);
|
|
||||||
if (!m_sortedProfiles.empty()) {
|
|
||||||
qSort(m_sortedProfiles.begin(), m_sortedProfiles.end(), deviceProfileLessThan);
|
|
||||||
m_profileCombo->addItems(existingProfileNames());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::loadSettings()
|
|
||||||
{
|
|
||||||
const QDesignerSharedSettings settings(m_core);
|
|
||||||
m_sortedProfiles = settings.deviceProfiles();
|
|
||||||
sortAndPopulateProfileCombo();
|
|
||||||
// Index: 0 is "None"
|
|
||||||
const int settingsIndex = settings.currentDeviceProfileIndex();
|
|
||||||
const int profileIndex = settingsIndex >= 0 && settingsIndex < m_sortedProfiles.size() ? settingsIndex + profileComboIndexOffset : 0;
|
|
||||||
m_profileCombo->setCurrentIndex(profileIndex);
|
|
||||||
updateState();
|
|
||||||
m_dirty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::saveSettings()
|
|
||||||
{
|
|
||||||
QDesignerSharedSettings settings(m_core);
|
|
||||||
settings.setDeviceProfiles(m_sortedProfiles);
|
|
||||||
// Index: 0 is "None"
|
|
||||||
settings.setCurrentDeviceProfileIndex(m_profileCombo->currentIndex() - profileComboIndexOffset);
|
|
||||||
m_dirty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//: Format embedded device profile description
|
|
||||||
static const char *descriptionFormat = QT_TRANSLATE_NOOP("EmbeddedOptionsControl",
|
|
||||||
"<html>"
|
|
||||||
"<table>"
|
|
||||||
"<tr><td><b>Font</b></td><td>%1, %2</td></tr>"
|
|
||||||
"<tr><td><b>Style</b></td><td>%3</td></tr>"
|
|
||||||
"<tr><td><b>Resolution</b></td><td>%4 x %5</td></tr>"
|
|
||||||
"</table>"
|
|
||||||
"</html>");
|
|
||||||
|
|
||||||
static inline QString description(const DeviceProfile& p)
|
|
||||||
{
|
|
||||||
QString styleName = p.style();
|
|
||||||
if (styleName.isEmpty())
|
|
||||||
styleName = EmbeddedOptionsControl::tr("Default");
|
|
||||||
return EmbeddedOptionsControl::tr(descriptionFormat).
|
|
||||||
arg(p.fontFamily()).arg(p.fontPointSize()).arg(styleName).arg(p.dpiX()).arg(p.dpiY());
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::updateDescriptionLabel()
|
|
||||||
{
|
|
||||||
const int profileIndex = m_profileCombo->currentIndex() - profileComboIndexOffset;
|
|
||||||
if (profileIndex >= 0) {
|
|
||||||
m_descriptionLabel->setText(description(m_sortedProfiles.at(profileIndex)));
|
|
||||||
} else {
|
|
||||||
m_descriptionLabel->clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::updateState()
|
|
||||||
{
|
|
||||||
const int profileIndex = m_profileCombo->currentIndex() - profileComboIndexOffset;
|
|
||||||
// Allow for changing/deleting only if it is not in use
|
|
||||||
bool modifyEnabled = false;
|
|
||||||
if (profileIndex >= 0)
|
|
||||||
modifyEnabled = !m_usedProfiles.contains(m_sortedProfiles.at(profileIndex).name());
|
|
||||||
m_editButton->setEnabled(modifyEnabled);
|
|
||||||
m_deleteButton->setEnabled(modifyEnabled);
|
|
||||||
updateDescriptionLabel();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControlPrivate::slotProfileIndexChanged(int)
|
|
||||||
{
|
|
||||||
updateState();
|
|
||||||
m_dirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------- EmbeddedOptionsControl
|
|
||||||
EmbeddedOptionsControl::EmbeddedOptionsControl(QDesignerFormEditorInterface *core, QWidget *parent) :
|
|
||||||
QWidget(parent),
|
|
||||||
m_d(new EmbeddedOptionsControlPrivate(core))
|
|
||||||
{
|
|
||||||
m_d->init(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
EmbeddedOptionsControl::~EmbeddedOptionsControl()
|
|
||||||
{
|
|
||||||
delete m_d;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControl::slotAdd()
|
|
||||||
{
|
|
||||||
m_d->slotAdd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControl::slotEdit()
|
|
||||||
{
|
|
||||||
m_d->slotEdit();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControl::slotDelete()
|
|
||||||
{
|
|
||||||
m_d->slotDelete();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControl::loadSettings()
|
|
||||||
{
|
|
||||||
m_d->loadSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControl::saveSettings()
|
|
||||||
{
|
|
||||||
m_d->saveSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsControl::slotProfileIndexChanged(int i)
|
|
||||||
{
|
|
||||||
m_d->slotProfileIndexChanged(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EmbeddedOptionsControl::isDirty() const
|
|
||||||
{
|
|
||||||
return m_d->isDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
// EmbeddedOptionsPage:
|
|
||||||
EmbeddedOptionsPage::EmbeddedOptionsPage(QDesignerFormEditorInterface *core) :
|
|
||||||
m_core(core)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QString EmbeddedOptionsPage::name() const
|
|
||||||
{
|
|
||||||
//: Tab in preferences dialog
|
|
||||||
return QCoreApplication::translate("EmbeddedOptionsPage", "Embedded Design");
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *EmbeddedOptionsPage::createPage(QWidget *parent)
|
|
||||||
{
|
|
||||||
QWidget *optionsWidget = new QWidget(parent);
|
|
||||||
|
|
||||||
QVBoxLayout *optionsVLayout = new QVBoxLayout();
|
|
||||||
|
|
||||||
//: EmbeddedOptionsControl group box"
|
|
||||||
QGroupBox *gb = new QGroupBox(QCoreApplication::translate("EmbeddedOptionsPage", "Device Profiles"));
|
|
||||||
QVBoxLayout *gbVLayout = new QVBoxLayout();
|
|
||||||
m_embeddedOptionsControl = new EmbeddedOptionsControl(m_core);
|
|
||||||
m_embeddedOptionsControl->loadSettings();
|
|
||||||
gbVLayout->addWidget(m_embeddedOptionsControl);
|
|
||||||
gb->setLayout(gbVLayout);
|
|
||||||
optionsVLayout->addWidget(gb);
|
|
||||||
|
|
||||||
optionsVLayout->addStretch(1);
|
|
||||||
|
|
||||||
// Outer layout to give it horizontal stretch
|
|
||||||
QHBoxLayout *optionsHLayout = new QHBoxLayout();
|
|
||||||
optionsHLayout->addLayout(optionsVLayout);
|
|
||||||
optionsHLayout->addStretch(1);
|
|
||||||
optionsWidget->setLayout(optionsHLayout);
|
|
||||||
return optionsWidget;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsPage::apply()
|
|
||||||
{
|
|
||||||
if (!m_embeddedOptionsControl || !m_embeddedOptionsControl->isDirty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_embeddedOptionsControl->saveSettings();
|
|
||||||
if (FormWindowManager *fw = qobject_cast<qdesigner_internal::FormWindowManager *>(m_core->formWindowManager()))
|
|
||||||
fw->deviceProfilesChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EmbeddedOptionsPage::finish()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_embeddedoptionspage.h"
|
|
|
@ -1,84 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef EMBEDDEDOPTIONSPAGE_H
|
|
||||||
#define EMBEDDEDOPTIONSPAGE_H
|
|
||||||
|
|
||||||
#include "abstractoptionspage_p.h"
|
|
||||||
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
#include <QtGui/QWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormEditorInterface;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class EmbeddedOptionsControlPrivate;
|
|
||||||
|
|
||||||
/* EmbeddedOptions Control. Presents the user with a list of embedded
|
|
||||||
* device profiles he can modify/add/delete. */
|
|
||||||
class EmbeddedOptionsControl : public QWidget {
|
|
||||||
Q_DISABLE_COPY(EmbeddedOptionsControl)
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit EmbeddedOptionsControl(QDesignerFormEditorInterface *core, QWidget *parent = nullptr);
|
|
||||||
~EmbeddedOptionsControl();
|
|
||||||
|
|
||||||
bool isDirty() const;
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void loadSettings();
|
|
||||||
void saveSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotAdd();
|
|
||||||
void slotEdit();
|
|
||||||
void slotDelete();
|
|
||||||
void slotProfileIndexChanged(int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
EmbeddedOptionsControlPrivate *m_d;
|
|
||||||
};
|
|
||||||
|
|
||||||
// EmbeddedOptionsPage
|
|
||||||
class EmbeddedOptionsPage : public QDesignerOptionsPageInterface
|
|
||||||
{
|
|
||||||
Q_DISABLE_COPY(EmbeddedOptionsPage)
|
|
||||||
public:
|
|
||||||
explicit EmbeddedOptionsPage(QDesignerFormEditorInterface *core);
|
|
||||||
|
|
||||||
QString name() const;
|
|
||||||
QWidget *createPage(QWidget *parent);
|
|
||||||
virtual void finish();
|
|
||||||
virtual void apply();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QDesignerFormEditorInterface *m_core;
|
|
||||||
QPointer<EmbeddedOptionsControl> m_embeddedOptionsControl;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // EMBEDDEDOPTIONSPAGE_H
|
|
|
@ -1,148 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "formeditor.h"
|
|
||||||
#include "formeditor_optionspage.h"
|
|
||||||
#include "embeddedoptionspage.h"
|
|
||||||
#include "templateoptionspage.h"
|
|
||||||
#include "metadatabase_p.h"
|
|
||||||
#include "widgetdatabase_p.h"
|
|
||||||
#include "widgetfactory_p.h"
|
|
||||||
#include "formwindowmanager.h"
|
|
||||||
#include "qmainwindow_container.h"
|
|
||||||
#include "qmdiarea_container.h"
|
|
||||||
#include "qwizard_container.h"
|
|
||||||
#include "default_container.h"
|
|
||||||
#include "default_layoutdecoration.h"
|
|
||||||
#include "default_actionprovider.h"
|
|
||||||
#include "qlayoutwidget_propertysheet.h"
|
|
||||||
#include "spacer_propertysheet.h"
|
|
||||||
#include "line_propertysheet.h"
|
|
||||||
#include "layout_propertysheet.h"
|
|
||||||
#include "qdesigner_stackedbox_p.h"
|
|
||||||
#include "qdesigner_toolbox_p.h"
|
|
||||||
#include "qdesigner_tabwidget_p.h"
|
|
||||||
#include "iconcache.h"
|
|
||||||
#include "qdesigner_integration_p.h"
|
|
||||||
#include "itemview_propertysheet.h"
|
|
||||||
|
|
||||||
// sdk
|
|
||||||
#include <QtDesigner/QExtensionManager>
|
|
||||||
|
|
||||||
// shared
|
|
||||||
#include <pluginmanager_p.h>
|
|
||||||
#include "qdesigner_taskmenu_p.h"
|
|
||||||
#include "qdesigner_membersheet_p.h"
|
|
||||||
#include "qdesigner_promotion_p.h"
|
|
||||||
#include <dialoggui_p.h>
|
|
||||||
#include "qdesigner_introspection_p.h"
|
|
||||||
#include "qdesigner_qsettings_p.h"
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
FormEditor::FormEditor(QObject *parent)
|
|
||||||
: QDesignerFormEditorInterface(parent)
|
|
||||||
{
|
|
||||||
setIntrospection(new QDesignerIntrospection);
|
|
||||||
setDialogGui(new DialogGui);
|
|
||||||
QDesignerPluginManager *pluginManager = new QDesignerPluginManager(this);
|
|
||||||
setPluginManager(pluginManager);
|
|
||||||
|
|
||||||
WidgetDataBase *widgetDatabase = new WidgetDataBase(this, this);
|
|
||||||
setWidgetDataBase(widgetDatabase);
|
|
||||||
|
|
||||||
MetaDataBase *metaDataBase = new MetaDataBase(this, this);
|
|
||||||
setMetaDataBase(metaDataBase);
|
|
||||||
|
|
||||||
WidgetFactory *widgetFactory = new WidgetFactory(this, this);
|
|
||||||
setWidgetFactory(widgetFactory);
|
|
||||||
|
|
||||||
FormWindowManager *formWindowManager = new FormWindowManager(this, this);
|
|
||||||
setFormManager(formWindowManager);
|
|
||||||
connect(formWindowManager, SIGNAL(formWindowAdded(QDesignerFormWindowInterface*)), widgetFactory, SLOT(formWindowAdded(QDesignerFormWindowInterface*)));
|
|
||||||
connect(formWindowManager, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface*)), widgetFactory, SLOT(activeFormWindowChanged(QDesignerFormWindowInterface*)));
|
|
||||||
|
|
||||||
QExtensionManager *mgr = new QExtensionManager(this);
|
|
||||||
const QString containerExtensionId = Q_TYPEID(QDesignerContainerExtension);
|
|
||||||
|
|
||||||
QDesignerStackedWidgetContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QDesignerTabWidgetContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QDesignerToolBoxContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QMainWindowContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QDockWidgetContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QScrollAreaContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QMdiAreaContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
QWizardContainerFactory::registerExtension(mgr, containerExtensionId);
|
|
||||||
|
|
||||||
mgr->registerExtensions(new QDesignerLayoutDecorationFactory(mgr),
|
|
||||||
Q_TYPEID(QDesignerLayoutDecorationExtension));
|
|
||||||
|
|
||||||
const QString actionProviderExtensionId = Q_TYPEID(QDesignerActionProviderExtension);
|
|
||||||
QToolBarActionProviderFactory::registerExtension(mgr, actionProviderExtensionId);
|
|
||||||
QMenuBarActionProviderFactory::registerExtension(mgr, actionProviderExtensionId);
|
|
||||||
QMenuActionProviderFactory::registerExtension(mgr, actionProviderExtensionId);
|
|
||||||
|
|
||||||
QDesignerDefaultPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QLayoutWidgetPropertySheetFactory::registerExtension(mgr);
|
|
||||||
SpacerPropertySheetFactory::registerExtension(mgr);
|
|
||||||
LinePropertySheetFactory::registerExtension(mgr);
|
|
||||||
LayoutPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QStackedWidgetPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QToolBoxWidgetPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QTabWidgetPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QMdiAreaPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QWizardPagePropertySheetFactory::registerExtension(mgr);
|
|
||||||
QWizardPropertySheetFactory::registerExtension(mgr);
|
|
||||||
|
|
||||||
QTreeViewPropertySheetFactory::registerExtension(mgr);
|
|
||||||
QTableViewPropertySheetFactory::registerExtension(mgr);
|
|
||||||
|
|
||||||
const QString internalTaskMenuId = QLatin1String("QDesignerInternalTaskMenuExtension");
|
|
||||||
QDesignerTaskMenuFactory::registerExtension(mgr, internalTaskMenuId);
|
|
||||||
|
|
||||||
mgr->registerExtensions(new QDesignerMemberSheetFactory(mgr),
|
|
||||||
Q_TYPEID(QDesignerMemberSheetExtension));
|
|
||||||
|
|
||||||
setExtensionManager(mgr);
|
|
||||||
|
|
||||||
setIconCache(new IconCache(this));
|
|
||||||
|
|
||||||
setPromotion(new QDesignerPromotion(this));
|
|
||||||
|
|
||||||
QList<QDesignerOptionsPageInterface*> optionsPages;
|
|
||||||
optionsPages << new TemplateOptionsPage(this) << new FormEditorOptionsPage(this) << new EmbeddedOptionsPage(this);
|
|
||||||
setOptionsPages(optionsPages);
|
|
||||||
|
|
||||||
setSettingsManager(new QDesignerQSettings());
|
|
||||||
}
|
|
||||||
|
|
||||||
FormEditor::~FormEditor()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#include "moc_formeditor.h"
|
|
||||||
#include <qrc_formeditor.cpp>
|
|
|
@ -1,47 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMEDITOR_H
|
|
||||||
#define FORMEDITOR_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QObject;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT FormEditor: public QDesignerFormEditorInterface
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
FormEditor(QObject *parent = nullptr);
|
|
||||||
virtual ~FormEditor();
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMEDITOR_H
|
|
|
@ -1,111 +0,0 @@
|
||||||
<!DOCTYPE RCC><RCC version="1.0">
|
|
||||||
<qresource prefix="/trolltech/formeditor">
|
|
||||||
<file>images/submenu.png</file>
|
|
||||||
<file>images/emptyicon.png</file>
|
|
||||||
<file>images/filenew-16.png</file>
|
|
||||||
<file>images/fileopen-16.png</file>
|
|
||||||
<file>images/editdelete-16.png</file>
|
|
||||||
<file>images/plus-16.png</file>
|
|
||||||
<file>images/minus-16.png</file>
|
|
||||||
<file>images/prefix-add.png</file>
|
|
||||||
<file>images/downplus.png</file>
|
|
||||||
<file>images/leveldown.png</file>
|
|
||||||
<file>images/levelup.png</file>
|
|
||||||
<file>images/katie.png</file>
|
|
||||||
<file>images/resetproperty.png</file>
|
|
||||||
<file>images/cleartext.png</file>
|
|
||||||
<file>images/sort.png</file>
|
|
||||||
<file>images/edit.png</file>
|
|
||||||
<file>images/reload.png</file>
|
|
||||||
<file>images/configure.png</file>
|
|
||||||
<file>images/color.png</file>
|
|
||||||
<file>images/dropdownbutton.png</file>
|
|
||||||
<file>images/widgets/calendarwidget.png</file>
|
|
||||||
<file>images/widgets/checkbox.png</file>
|
|
||||||
<file>images/widgets/columnview.png</file>
|
|
||||||
<file>images/widgets/combobox.png</file>
|
|
||||||
<file>images/widgets/commandlinkbutton.png</file>
|
|
||||||
<file>images/widgets/dateedit.png</file>
|
|
||||||
<file>images/widgets/datetimeedit.png</file>
|
|
||||||
<file>images/widgets/dial.png</file>
|
|
||||||
<file>images/widgets/dialogbuttonbox.png</file>
|
|
||||||
<file>images/widgets/dockwidget.png</file>
|
|
||||||
<file>images/widgets/doublespinbox.png</file>
|
|
||||||
<file>images/widgets/fontcombobox.png</file>
|
|
||||||
<file>images/widgets/frame.png</file>
|
|
||||||
<file>images/widgets/graphicsview.png</file>
|
|
||||||
<file>images/widgets/groupbox.png</file>
|
|
||||||
<file>images/widgets/hscrollbar.png</file>
|
|
||||||
<file>images/widgets/hslider.png</file>
|
|
||||||
<file>images/widgets/hsplit.png</file>
|
|
||||||
<file>images/widgets/label.png</file>
|
|
||||||
<file>images/widgets/lcdnumber.png</file>
|
|
||||||
<file>images/widgets/line.png</file>
|
|
||||||
<file>images/widgets/lineedit.png</file>
|
|
||||||
<file>images/widgets/listbox.png</file>
|
|
||||||
<file>images/widgets/listview.png</file>
|
|
||||||
<file>images/widgets/mdiarea.png</file>
|
|
||||||
<file>images/widgets/plaintextedit.png</file>
|
|
||||||
<file>images/widgets/progress.png</file>
|
|
||||||
<file>images/widgets/pushbutton.png</file>
|
|
||||||
<file>images/widgets/radiobutton.png</file>
|
|
||||||
<file>images/widgets/scrollarea.png</file>
|
|
||||||
<file>images/widgets/spacer.png</file>
|
|
||||||
<file>images/widgets/spinbox.png</file>
|
|
||||||
<file>images/widgets/table.png</file>
|
|
||||||
<file>images/widgets/tabwidget.png</file>
|
|
||||||
<file>images/widgets/textedit.png</file>
|
|
||||||
<file>images/widgets/timeedit.png</file>
|
|
||||||
<file>images/widgets/toolbox.png</file>
|
|
||||||
<file>images/widgets/toolbutton.png</file>
|
|
||||||
<file>images/widgets/vline.png</file>
|
|
||||||
<file>images/widgets/vscrollbar.png</file>
|
|
||||||
<file>images/widgets/vslider.png</file>
|
|
||||||
<file>images/widgets/vspacer.png</file>
|
|
||||||
<file>images/widgets/widget.png</file>
|
|
||||||
<file>images/widgets/widgetstack.png</file>
|
|
||||||
<file>images/widgets/wizard.png</file>
|
|
||||||
<file>images/win/adjustsize.png</file>
|
|
||||||
<file>images/win/widgettool.png</file>
|
|
||||||
<file>images/win/signalslottool.png</file>
|
|
||||||
<file>images/win/tabordertool.png</file>
|
|
||||||
<file>images/win/buddytool.png</file>
|
|
||||||
<file>images/win/editbreaklayout.png</file>
|
|
||||||
<file>images/win/editcopy.png</file>
|
|
||||||
<file>images/win/editcut.png</file>
|
|
||||||
<file>images/win/editdelete.png</file>
|
|
||||||
<file>images/win/editgrid.png</file>
|
|
||||||
<file>images/win/editform.png</file>
|
|
||||||
<file>images/win/edithlayout.png</file>
|
|
||||||
<file>images/win/edithlayoutsplit.png</file>
|
|
||||||
<file>images/win/editlower.png</file>
|
|
||||||
<file>images/win/editpaste.png</file>
|
|
||||||
<file>images/win/editraise.png</file>
|
|
||||||
<file>images/win/editvlayout.png</file>
|
|
||||||
<file>images/win/editvlayoutsplit.png</file>
|
|
||||||
<file>images/win/filenew.png</file>
|
|
||||||
<file>images/win/insertimage.png</file>
|
|
||||||
<file>images/win/undo.png</file>
|
|
||||||
<file>images/win/redo.png</file>
|
|
||||||
<file>images/win/fileopen.png</file>
|
|
||||||
<file>images/win/filesave.png</file>
|
|
||||||
<file>images/win/resourceeditortool.png</file>
|
|
||||||
<file>images/win/plus.png</file>
|
|
||||||
<file>images/win/minus.png</file>
|
|
||||||
<file>images/win/textanchor.png</file>
|
|
||||||
<file>images/win/textbold.png</file>
|
|
||||||
<file>images/win/textitalic.png</file>
|
|
||||||
<file>images/win/textunder.png</file>
|
|
||||||
<file>images/win/textleft.png</file>
|
|
||||||
<file>images/win/textcenter.png</file>
|
|
||||||
<file>images/win/textright.png</file>
|
|
||||||
<file>images/win/textjustify.png</file>
|
|
||||||
<file>images/win/textsuperscript.png</file>
|
|
||||||
<file>images/win/textsubscript.png</file>
|
|
||||||
<file>images/win/simplifyrichtext.png</file>
|
|
||||||
<file>images/win/back.png</file>
|
|
||||||
<file>images/win/forward.png</file>
|
|
||||||
<file>images/win/down.png</file>
|
|
||||||
<file>images/win/up.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
|
@ -1,29 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMEDITOR_GLOBAL_H
|
|
||||||
#define FORMEDITOR_GLOBAL_H
|
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
|
||||||
|
|
||||||
#define QT_FORMEDITOR_EXPORT
|
|
||||||
|
|
||||||
#endif // FORMEDITOR_GLOBAL_H
|
|
|
@ -1,171 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "formeditor_optionspage.h"
|
|
||||||
|
|
||||||
// shared
|
|
||||||
#include "formwindowbase_p.h"
|
|
||||||
#include "gridpanel_p.h"
|
|
||||||
#include "grid_p.h"
|
|
||||||
#include "previewconfigurationwidget_p.h"
|
|
||||||
#include "shared_settings_p.h"
|
|
||||||
#include "zoomwidget_p.h"
|
|
||||||
|
|
||||||
// SDK
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
#include <QtDesigner/abstractformwindowmanager.h>
|
|
||||||
|
|
||||||
#include <QtCore/QString>
|
|
||||||
#include <QtCore/QCoreApplication>
|
|
||||||
#include <QtGui/QGroupBox>
|
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
#include <QtGui/QFormLayout>
|
|
||||||
#include <QtGui/QComboBox>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
typedef QList<int> IntList;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// Zoom, currently for preview only
|
|
||||||
class ZoomSettingsWidget : public QGroupBox {
|
|
||||||
Q_DISABLE_COPY(ZoomSettingsWidget)
|
|
||||||
public:
|
|
||||||
explicit ZoomSettingsWidget(QWidget *parent = nullptr);
|
|
||||||
|
|
||||||
void fromSettings(const QDesignerSharedSettings &s);
|
|
||||||
void toSettings(QDesignerSharedSettings &s) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QComboBox *m_zoomCombo;
|
|
||||||
};
|
|
||||||
|
|
||||||
ZoomSettingsWidget::ZoomSettingsWidget(QWidget *parent) :
|
|
||||||
QGroupBox(parent),
|
|
||||||
m_zoomCombo(new QComboBox)
|
|
||||||
{
|
|
||||||
m_zoomCombo->setEditable(false);
|
|
||||||
const IntList zoomValues = ZoomMenu::zoomValues();
|
|
||||||
const IntList::const_iterator cend = zoomValues.constEnd();
|
|
||||||
|
|
||||||
for (IntList::const_iterator it = zoomValues.constBegin(); it != cend; ++it) {
|
|
||||||
//: Zoom percentage
|
|
||||||
m_zoomCombo->addItem(QCoreApplication::translate("FormEditorOptionsPage", "%1 %").arg(*it), QVariant(*it));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Layout
|
|
||||||
setCheckable(true);
|
|
||||||
setTitle(QCoreApplication::translate("FormEditorOptionsPage", "Preview Zoom"));
|
|
||||||
QFormLayout *lt = new QFormLayout;
|
|
||||||
lt->addRow(QCoreApplication::translate("FormEditorOptionsPage", "Default Zoom"), m_zoomCombo);
|
|
||||||
setLayout(lt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZoomSettingsWidget::fromSettings(const QDesignerSharedSettings &s)
|
|
||||||
{
|
|
||||||
setChecked(s.zoomEnabled());
|
|
||||||
const int idx = m_zoomCombo->findData(QVariant(s.zoom()));
|
|
||||||
m_zoomCombo->setCurrentIndex(qMax(0, idx));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZoomSettingsWidget::toSettings(QDesignerSharedSettings &s) const
|
|
||||||
{
|
|
||||||
s.setZoomEnabled(isChecked());
|
|
||||||
const int zoom = m_zoomCombo->itemData(m_zoomCombo->currentIndex()).toInt();
|
|
||||||
s.setZoom(zoom);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FormEditorOptionsPage:
|
|
||||||
FormEditorOptionsPage::FormEditorOptionsPage(QDesignerFormEditorInterface *core)
|
|
||||||
: m_core(core)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QString FormEditorOptionsPage::name() const
|
|
||||||
{
|
|
||||||
//: Tab in preferences dialog
|
|
||||||
return QCoreApplication::translate("FormEditorOptionsPage", "Forms");
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *FormEditorOptionsPage::createPage(QWidget *parent)
|
|
||||||
{
|
|
||||||
QWidget *optionsWidget = new QWidget(parent);
|
|
||||||
|
|
||||||
const QDesignerSharedSettings settings(m_core);
|
|
||||||
m_previewConf = new PreviewConfigurationWidget(m_core);
|
|
||||||
m_zoomSettingsWidget = new ZoomSettingsWidget;
|
|
||||||
m_zoomSettingsWidget->fromSettings(settings);
|
|
||||||
|
|
||||||
m_defaultGridConf = new GridPanel();
|
|
||||||
m_defaultGridConf->setTitle(QCoreApplication::translate("FormEditorOptionsPage", "Default Grid"));
|
|
||||||
m_defaultGridConf->setGrid(settings.defaultGrid());
|
|
||||||
|
|
||||||
QVBoxLayout *optionsVLayout = new QVBoxLayout();
|
|
||||||
optionsVLayout->addWidget(m_defaultGridConf);
|
|
||||||
optionsVLayout->addWidget(m_previewConf);
|
|
||||||
optionsVLayout->addWidget(m_zoomSettingsWidget);
|
|
||||||
optionsVLayout->addStretch(1);
|
|
||||||
|
|
||||||
// Outer layout to give it horizontal stretch
|
|
||||||
QHBoxLayout *optionsHLayout = new QHBoxLayout();
|
|
||||||
optionsHLayout->addLayout(optionsVLayout);
|
|
||||||
optionsHLayout->addStretch(1);
|
|
||||||
optionsWidget->setLayout(optionsHLayout);
|
|
||||||
|
|
||||||
return optionsWidget;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormEditorOptionsPage::apply()
|
|
||||||
{
|
|
||||||
QDesignerSharedSettings settings(m_core);
|
|
||||||
if (m_defaultGridConf) {
|
|
||||||
const Grid defaultGrid = m_defaultGridConf->grid();
|
|
||||||
settings.setDefaultGrid(defaultGrid);
|
|
||||||
|
|
||||||
FormWindowBase::setDefaultDesignerGrid(defaultGrid);
|
|
||||||
// Update grid settings in all existing form windows
|
|
||||||
QDesignerFormWindowManagerInterface *fwm = m_core->formWindowManager();
|
|
||||||
if (const int numWindows = fwm->formWindowCount()) {
|
|
||||||
for (int i = 0; i < numWindows; i++)
|
|
||||||
if (qdesigner_internal::FormWindowBase *fwb
|
|
||||||
= qobject_cast<qdesigner_internal::FormWindowBase *>( fwm->formWindow(i)))
|
|
||||||
if (!fwb->hasFormGrid())
|
|
||||||
fwb->setDesignerGrid(defaultGrid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (m_previewConf) {
|
|
||||||
m_previewConf->saveState();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_zoomSettingsWidget)
|
|
||||||
m_zoomSettingsWidget->toSettings(settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormEditorOptionsPage::finish()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
|
@ -1,60 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMEDITOR_OPTIONSPAGE_H
|
|
||||||
#define FORMEDITOR_OPTIONSPAGE_H
|
|
||||||
|
|
||||||
#include "abstractoptionspage_p.h"
|
|
||||||
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormEditorInterface;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class PreviewConfigurationWidget;
|
|
||||||
class GridPanel;
|
|
||||||
class ZoomSettingsWidget;
|
|
||||||
|
|
||||||
class FormEditorOptionsPage : public QDesignerOptionsPageInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit FormEditorOptionsPage(QDesignerFormEditorInterface *core);
|
|
||||||
|
|
||||||
QString name() const;
|
|
||||||
QWidget *createPage(QWidget *parent);
|
|
||||||
virtual void apply();
|
|
||||||
virtual void finish();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QDesignerFormEditorInterface *m_core;
|
|
||||||
QPointer<PreviewConfigurationWidget> m_previewConf;
|
|
||||||
QPointer<GridPanel> m_defaultGridConf;
|
|
||||||
QPointer<ZoomSettingsWidget> m_zoomSettingsWidget;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMEDITOR_OPTIONSPAGE_H
|
|
|
@ -1,350 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMWINDOW_H
|
|
||||||
#define FORMWINDOW_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
#include "qdesignerundostack.h"
|
|
||||||
#include <formwindowbase_p.h>
|
|
||||||
|
|
||||||
// Qt
|
|
||||||
#include <QtCore/QHash>
|
|
||||||
#include <QtCore/QList>
|
|
||||||
#include <QtCore/QMap>
|
|
||||||
#include <QtCore/QSet>
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerDnDItemInterface;
|
|
||||||
class QDesignerTaskMenuExtension;
|
|
||||||
class DomConnections;
|
|
||||||
|
|
||||||
class QWidget;
|
|
||||||
class QAction;
|
|
||||||
class QLabel;
|
|
||||||
class QTimer;
|
|
||||||
class QAction;
|
|
||||||
class QMenu;
|
|
||||||
class QRubberBand;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class FormEditor;
|
|
||||||
class FormWindowCursor;
|
|
||||||
class WidgetEditorTool;
|
|
||||||
class FormWindowWidgetStack;
|
|
||||||
class FormWindowManager;
|
|
||||||
class FormWindowDnDItem;
|
|
||||||
class SetPropertyCommand;
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT FormWindow: public FormWindowBase
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit FormWindow(FormEditor *core, QWidget *parent = nullptr, Qt::WindowFlags flags = 0);
|
|
||||||
virtual ~FormWindow();
|
|
||||||
|
|
||||||
virtual QDesignerFormEditorInterface *core() const;
|
|
||||||
|
|
||||||
virtual QDesignerFormWindowCursorInterface *cursor() const;
|
|
||||||
|
|
||||||
// Overwritten: FormWindowBase
|
|
||||||
virtual QWidget *formContainer() const;
|
|
||||||
|
|
||||||
virtual int toolCount() const;
|
|
||||||
virtual int currentTool() const;
|
|
||||||
virtual void setCurrentTool(int index);
|
|
||||||
virtual QDesignerFormWindowToolInterface *tool(int index) const;
|
|
||||||
virtual void registerTool(QDesignerFormWindowToolInterface *tool);
|
|
||||||
|
|
||||||
virtual QString author() const;
|
|
||||||
virtual void setAuthor(const QString &author);
|
|
||||||
|
|
||||||
virtual QString comment() const;
|
|
||||||
virtual void setComment(const QString &comment);
|
|
||||||
|
|
||||||
virtual void layoutDefault(int *margin, int *spacing);
|
|
||||||
virtual void setLayoutDefault(int margin, int spacing);
|
|
||||||
|
|
||||||
virtual void layoutFunction(QString *margin, QString *spacing);
|
|
||||||
virtual void setLayoutFunction(const QString &margin, const QString &spacing);
|
|
||||||
|
|
||||||
virtual QString exportMacro() const;
|
|
||||||
virtual void setExportMacro(const QString &exportMacro);
|
|
||||||
|
|
||||||
virtual QStringList includeHints() const;
|
|
||||||
virtual void setIncludeHints(const QStringList &includeHints);
|
|
||||||
|
|
||||||
virtual QString fileName() const;
|
|
||||||
virtual void setFileName(const QString &fileName);
|
|
||||||
|
|
||||||
virtual QString contents() const;
|
|
||||||
virtual void setContents(const QString &contents);
|
|
||||||
virtual void setContents(QIODevice *dev);
|
|
||||||
|
|
||||||
virtual QDir absoluteDir() const;
|
|
||||||
|
|
||||||
virtual void simplifySelection(QWidgetList *sel) const;
|
|
||||||
|
|
||||||
virtual void ensureUniqueObjectName(QObject *object);
|
|
||||||
|
|
||||||
virtual QWidget *mainContainer() const;
|
|
||||||
void setMainContainer(QWidget *mainContainer);
|
|
||||||
bool isMainContainer(const QWidget *w) const;
|
|
||||||
|
|
||||||
QWidget *currentWidget() const;
|
|
||||||
|
|
||||||
bool hasInsertedChildren(QWidget *w) const;
|
|
||||||
|
|
||||||
QList<QWidget *> selectedWidgets() const;
|
|
||||||
void clearSelection(bool changePropertyDisplay=true);
|
|
||||||
bool isWidgetSelected(QWidget *w) const;
|
|
||||||
void selectWidget(QWidget *w, bool select=true);
|
|
||||||
|
|
||||||
void selectWidgets();
|
|
||||||
void repaintSelection();
|
|
||||||
void updateSelection(QWidget *w);
|
|
||||||
void updateChildSelections(QWidget *w);
|
|
||||||
void raiseChildSelections(QWidget *w);
|
|
||||||
void raiseSelection(QWidget *w);
|
|
||||||
|
|
||||||
inline const QList<QWidget *>& widgets() const { return m_widgets; }
|
|
||||||
inline int widgetCount() const { return m_widgets.count(); }
|
|
||||||
inline QWidget *widgetAt(int index) const { return m_widgets.at(index); }
|
|
||||||
|
|
||||||
QList<QWidget *> widgets(QWidget *widget) const;
|
|
||||||
|
|
||||||
QWidget *createWidget(DomUI *ui, const QRect &rect, QWidget *target);
|
|
||||||
|
|
||||||
bool isManaged(QWidget *w) const;
|
|
||||||
|
|
||||||
void manageWidget(QWidget *w);
|
|
||||||
void unmanageWidget(QWidget *w);
|
|
||||||
|
|
||||||
virtual QUndoStack *commandHistory() const;
|
|
||||||
void beginCommand(const QString &description);
|
|
||||||
void endCommand();
|
|
||||||
|
|
||||||
virtual bool blockSelectionChanged(bool blocked);
|
|
||||||
virtual void emitSelectionChanged();
|
|
||||||
|
|
||||||
bool unify(QObject *w, QString &s, bool changeIt);
|
|
||||||
|
|
||||||
bool isDirty() const;
|
|
||||||
void setDirty(bool dirty);
|
|
||||||
|
|
||||||
static FormWindow *findFormWindow(QWidget *w);
|
|
||||||
|
|
||||||
virtual QWidget *containerAt(const QPoint &pos);
|
|
||||||
virtual QWidget *widgetAt(const QPoint &pos);
|
|
||||||
virtual void highlightWidget(QWidget *w, const QPoint &pos,
|
|
||||||
HighlightMode mode = Highlight);
|
|
||||||
|
|
||||||
void updateOrderIndicators();
|
|
||||||
|
|
||||||
bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event);
|
|
||||||
|
|
||||||
QStringList resourceFiles() const;
|
|
||||||
void addResourceFile(const QString &path);
|
|
||||||
void removeResourceFile(const QString &path);
|
|
||||||
|
|
||||||
void resizeWidget(QWidget *widget, const QRect &geometry);
|
|
||||||
|
|
||||||
bool dropDockWidget(QDesignerDnDItemInterface *item, const QPoint &global_mouse_pos);
|
|
||||||
bool dropWidgets(const QList<QDesignerDnDItemInterface*> &item_list, QWidget *target,
|
|
||||||
const QPoint &global_mouse_pos);
|
|
||||||
|
|
||||||
virtual QWidget *findContainer(QWidget *w, bool excludeLayout) const;
|
|
||||||
// for WidgetSelection only.
|
|
||||||
QWidget *designerWidget(QWidget *w) const;
|
|
||||||
|
|
||||||
// Initialize and return a popup menu for a managed widget
|
|
||||||
QMenu *initializePopupMenu(QWidget *managedWidget);
|
|
||||||
|
|
||||||
virtual void paste(PasteMode pasteMode);
|
|
||||||
virtual QEditorFormBuilder *createFormBuilder();
|
|
||||||
|
|
||||||
bool eventFilter(QObject *watched, QEvent *event);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void contextMenuRequested(QMenu *menu, QWidget *widget);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void deleteWidgets();
|
|
||||||
void raiseWidgets();
|
|
||||||
void lowerWidgets();
|
|
||||||
void copy();
|
|
||||||
void cut();
|
|
||||||
void paste();
|
|
||||||
void selectAll();
|
|
||||||
|
|
||||||
void createLayout(int type, QWidget *container = 0);
|
|
||||||
void morphLayout(QWidget *container, int newType);
|
|
||||||
void breakLayout(QWidget *w);
|
|
||||||
|
|
||||||
void editContents();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual QMenu *createPopupMenu(QWidget *w);
|
|
||||||
virtual void resizeEvent(QResizeEvent *e);
|
|
||||||
|
|
||||||
void insertWidget(QWidget *w, const QRect &rect, QWidget *target, bool already_in_form = false);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void selectionChangedTimerDone();
|
|
||||||
void checkSelection();
|
|
||||||
void checkSelectionNow();
|
|
||||||
void slotSelectWidget(QAction *);
|
|
||||||
|
|
||||||
private:
|
|
||||||
enum MouseState {
|
|
||||||
NoMouseState,
|
|
||||||
// Double click received
|
|
||||||
MouseDoubleClicked,
|
|
||||||
// Drawing selection rubber band rectangle
|
|
||||||
MouseDrawRubber,
|
|
||||||
// Started a move operation
|
|
||||||
MouseMoveDrag,
|
|
||||||
// Click on a widget whose parent is selected. Defer selection to release
|
|
||||||
MouseDeferredSelection
|
|
||||||
};
|
|
||||||
MouseState m_mouseState;
|
|
||||||
QPointer<QWidget> m_lastClickedWidget;
|
|
||||||
|
|
||||||
void init();
|
|
||||||
void initializeCoreTools();
|
|
||||||
|
|
||||||
int getValue(const QRect &rect, int key, bool size) const;
|
|
||||||
int calcValue(int val, bool forward, bool snap, int snapOffset) const;
|
|
||||||
void handleClickSelection(QWidget *managedWidget, unsigned mouseFlags);
|
|
||||||
|
|
||||||
bool frameNeeded(QWidget *w) const;
|
|
||||||
|
|
||||||
enum RectType { Insert, Rubber };
|
|
||||||
|
|
||||||
void startRectDraw(const QPoint &global, QWidget *, RectType t);
|
|
||||||
void continueRectDraw(const QPoint &global, QWidget *, RectType t);
|
|
||||||
void endRectDraw();
|
|
||||||
|
|
||||||
QWidget *containerAt(const QPoint &pos, QWidget *notParentOf);
|
|
||||||
|
|
||||||
void checkPreviewGeometry(QRect &r);
|
|
||||||
|
|
||||||
bool handleContextMenu(QWidget *widget, QWidget *managedWidget, QContextMenuEvent *e);
|
|
||||||
bool handleMouseButtonDblClickEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e);
|
|
||||||
bool handleMousePressEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e);
|
|
||||||
bool handleMouseMoveEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e);
|
|
||||||
bool handleMouseReleaseEvent(QWidget *widget, QWidget *managedWidget, QMouseEvent *e);
|
|
||||||
bool handleKeyPressEvent(QWidget *widget, QWidget *managedWidget, QKeyEvent *e);
|
|
||||||
bool handleKeyReleaseEvent(QWidget *widget, QWidget *managedWidget, QKeyEvent *e);
|
|
||||||
|
|
||||||
bool isCentralWidget(QWidget *w) const;
|
|
||||||
|
|
||||||
bool setCurrentWidget(QWidget *currentWidget);
|
|
||||||
bool trySelectWidget(QWidget *w, bool select);
|
|
||||||
|
|
||||||
void dragWidgetWithinForm(QWidget *widget, const QRect &targetGeometry, QWidget *targetContainer);
|
|
||||||
|
|
||||||
void setCursorToAll(const QCursor &c, QWidget *start);
|
|
||||||
|
|
||||||
QPoint mapToForm(const QWidget *w, const QPoint &pos) const;
|
|
||||||
bool canBeBuddy(QWidget *w) const;
|
|
||||||
|
|
||||||
QWidget *findTargetContainer(QWidget *widget) const;
|
|
||||||
|
|
||||||
void clearMainContainer();
|
|
||||||
|
|
||||||
static int widgetDepth(const QWidget *w);
|
|
||||||
static bool isChildOf(const QWidget *c, const QWidget *p);
|
|
||||||
|
|
||||||
void editWidgets();
|
|
||||||
|
|
||||||
void updateWidgets();
|
|
||||||
|
|
||||||
void handleArrowKeyEvent(int key, Qt::KeyboardModifiers modifiers);
|
|
||||||
|
|
||||||
void layoutSelection(int type);
|
|
||||||
void layoutContainer(QWidget *w, int type);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *innerContainer(QWidget *outerContainer) const;
|
|
||||||
QWidget *containerForPaste() const;
|
|
||||||
QAction *createSelectAncestorSubMenu(QWidget *w);
|
|
||||||
void selectSingleWidget(QWidget *w);
|
|
||||||
|
|
||||||
FormEditor *m_core;
|
|
||||||
FormWindowCursor *m_cursor;
|
|
||||||
QWidget *m_mainContainer;
|
|
||||||
QWidget *m_currentWidget;
|
|
||||||
|
|
||||||
bool m_blockSelectionChanged;
|
|
||||||
|
|
||||||
QPoint m_rectAnchor;
|
|
||||||
QRect m_currRect;
|
|
||||||
|
|
||||||
QWidgetList m_widgets;
|
|
||||||
QSet<QWidget*> m_insertedWidgets;
|
|
||||||
|
|
||||||
class Selection;
|
|
||||||
Selection *m_selection;
|
|
||||||
|
|
||||||
QPoint m_startPos;
|
|
||||||
|
|
||||||
QDesignerUndoStack m_undoStack;
|
|
||||||
|
|
||||||
QString m_fileName;
|
|
||||||
|
|
||||||
typedef QPair<QPalette ,bool> PaletteAndFill;
|
|
||||||
typedef QMap<QWidget*, PaletteAndFill> WidgetPaletteMap;
|
|
||||||
WidgetPaletteMap m_palettesBeforeHighlight;
|
|
||||||
|
|
||||||
QRubberBand *m_rubberBand;
|
|
||||||
|
|
||||||
QTimer *m_selectionChangedTimer;
|
|
||||||
QTimer *m_checkSelectionTimer;
|
|
||||||
QTimer *m_geometryChangedTimer;
|
|
||||||
|
|
||||||
FormWindowWidgetStack *m_widgetStack;
|
|
||||||
WidgetEditorTool *m_widgetEditor;
|
|
||||||
|
|
||||||
QStringList m_resourceFiles;
|
|
||||||
|
|
||||||
QString m_comment;
|
|
||||||
QString m_author;
|
|
||||||
int m_defaultMargin, m_defaultSpacing;
|
|
||||||
QString m_marginFunction, m_spacingFunction;
|
|
||||||
QString m_exportMacro;
|
|
||||||
QStringList m_includeHints;
|
|
||||||
|
|
||||||
QPoint m_contextMenuPosition;
|
|
||||||
|
|
||||||
private:
|
|
||||||
friend class WidgetEditorTool;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMWINDOW_H
|
|
|
@ -1,79 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "formwindow_dnditem.h"
|
|
||||||
#include "formwindow.h"
|
|
||||||
|
|
||||||
#include <ui4.h>
|
|
||||||
#include "qdesigner_resource.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstractformeditor.h>
|
|
||||||
|
|
||||||
#include <QtGui/QLabel>
|
|
||||||
#include <QtGui/QPixmap>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
using namespace qdesigner_internal;
|
|
||||||
|
|
||||||
static QWidget *decorationFromWidget(QWidget *w)
|
|
||||||
{
|
|
||||||
QLabel *label = new QLabel(0, Qt::ToolTip);
|
|
||||||
QPixmap pm = QPixmap::grabWidget(w);
|
|
||||||
label->setPixmap(pm);
|
|
||||||
label->resize(pm.size());
|
|
||||||
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DomUI *widgetToDom(QWidget *widget, FormWindow *form)
|
|
||||||
{
|
|
||||||
QDesignerResource builder(form);
|
|
||||||
builder.setSaveRelative(false);
|
|
||||||
return builder.copy(FormBuilderClipboard(widget));
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowDnDItem::FormWindowDnDItem(QDesignerDnDItemInterface::DropType type, FormWindow *form,
|
|
||||||
QWidget *widget, const QPoint &global_mouse_pos)
|
|
||||||
: QDesignerDnDItem(type, form)
|
|
||||||
{
|
|
||||||
QWidget *decoration = decorationFromWidget(widget);
|
|
||||||
QPoint pos = widget->mapToGlobal(QPoint(0, 0));
|
|
||||||
decoration->move(pos);
|
|
||||||
|
|
||||||
init(0, widget, decoration, global_mouse_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
DomUI *FormWindowDnDItem::domUi() const
|
|
||||||
{
|
|
||||||
DomUI *result = QDesignerDnDItem::domUi();
|
|
||||||
if (result != 0)
|
|
||||||
return result;
|
|
||||||
FormWindow *form = qobject_cast<FormWindow*>(source());
|
|
||||||
if (widget() == 0 || form == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
result = widgetToDom(widget(), form);
|
|
||||||
const_cast<FormWindowDnDItem*>(this)->setDomUi(result);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
|
@ -1,45 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMWINDOW_DNDITEM_H
|
|
||||||
#define FORMWINDOW_DNDITEM_H
|
|
||||||
|
|
||||||
#include "qdesigner_dnditem_p.h"
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class FormWindow;
|
|
||||||
|
|
||||||
class FormWindowDnDItem : public QDesignerDnDItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
FormWindowDnDItem(QDesignerDnDItemInterface::DropType type, FormWindow *form,
|
|
||||||
QWidget *widget, const QPoint &global_mouse_pos);
|
|
||||||
virtual DomUI *domUi() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMWINDOW_DNDITEM_H
|
|
|
@ -1,198 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "formwindow_widgetstack.h"
|
|
||||||
#include <QtDesigner/abstractformwindowtool.h>
|
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
|
||||||
#include <QtGui/qevent.h>
|
|
||||||
#include <QtGui/QAction>
|
|
||||||
#include <QtGui/QStackedLayout>
|
|
||||||
#include <QtGui/QVBoxLayout>
|
|
||||||
|
|
||||||
#include <QtCore/qdebug.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
using namespace qdesigner_internal;
|
|
||||||
|
|
||||||
FormWindowWidgetStack::FormWindowWidgetStack(QObject *parent) :
|
|
||||||
QObject(parent),
|
|
||||||
m_formContainer(new QWidget),
|
|
||||||
m_formContainerLayout(new QStackedLayout),
|
|
||||||
m_layout(new QStackedLayout)
|
|
||||||
{
|
|
||||||
m_layout->setMargin(0);
|
|
||||||
m_layout->setSpacing(0);
|
|
||||||
m_layout->setStackingMode(QStackedLayout::StackAll);
|
|
||||||
|
|
||||||
// We choose a QStackedLayout as immediate layout for
|
|
||||||
// the form windows as it ignores the sizePolicy of
|
|
||||||
// its child (for example, Fixed would cause undesired side effects).
|
|
||||||
m_formContainerLayout->setMargin(0);
|
|
||||||
m_formContainer->setObjectName(QLatin1String("formContainer"));
|
|
||||||
m_formContainer->setLayout(m_formContainerLayout);
|
|
||||||
m_formContainerLayout->setStackingMode(QStackedLayout::StackAll);
|
|
||||||
// System settings might have different background colors, autofill them
|
|
||||||
// (affects for example mainwindow status bars)
|
|
||||||
m_formContainer->setAutoFillBackground(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowWidgetStack::~FormWindowWidgetStack()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int FormWindowWidgetStack::count() const
|
|
||||||
{
|
|
||||||
return m_tools.count();
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormWindowToolInterface *FormWindowWidgetStack::currentTool() const
|
|
||||||
{
|
|
||||||
return tool(currentIndex());
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowWidgetStack::setCurrentTool(int index)
|
|
||||||
{
|
|
||||||
const int cnt = count();
|
|
||||||
if (index < 0 || index >= cnt) {
|
|
||||||
qDebug("FormWindowWidgetStack::setCurrentTool(): invalid index: %d", index);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const int cur = currentIndex();
|
|
||||||
if (index == cur)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (cur != -1)
|
|
||||||
m_tools.at(cur)->deactivated();
|
|
||||||
|
|
||||||
|
|
||||||
m_layout->setCurrentIndex(index);
|
|
||||||
// Show the widget editor and the current tool
|
|
||||||
for (int i = 0; i < cnt; i++)
|
|
||||||
m_tools.at(i)->editor()->setVisible(i == 0 || i == index);
|
|
||||||
|
|
||||||
QDesignerFormWindowToolInterface *tool = m_tools.at(index);
|
|
||||||
tool->activated();
|
|
||||||
|
|
||||||
emit currentToolChanged(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowWidgetStack::setSenderAsCurrentTool()
|
|
||||||
{
|
|
||||||
QDesignerFormWindowToolInterface *tool = 0;
|
|
||||||
QAction *action = qobject_cast<QAction*>(sender());
|
|
||||||
if (action == 0) {
|
|
||||||
qDebug("FormWindowWidgetStack::setSenderAsCurrentTool(): sender is not a QAction");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (QDesignerFormWindowToolInterface *t, m_tools) {
|
|
||||||
if (action == t->action()) {
|
|
||||||
tool = t;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tool == 0) {
|
|
||||||
qDebug("FormWindowWidgetStack::setSenderAsCurrentTool(): unknown tool");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setCurrentTool(tool);
|
|
||||||
}
|
|
||||||
|
|
||||||
int FormWindowWidgetStack::indexOf(QDesignerFormWindowToolInterface *tool) const
|
|
||||||
{
|
|
||||||
return m_tools.indexOf(tool);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowWidgetStack::setCurrentTool(QDesignerFormWindowToolInterface *tool)
|
|
||||||
{
|
|
||||||
int index = indexOf(tool);
|
|
||||||
if (index == -1) {
|
|
||||||
qDebug("FormWindowWidgetStack::setCurrentTool(): unknown tool");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setCurrentTool(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowWidgetStack::setMainContainer(QWidget *w)
|
|
||||||
{
|
|
||||||
// This code is triggered once by the formwindow and
|
|
||||||
// by integrations doing "revert to saved". Anything changing?
|
|
||||||
const int previousCount = m_formContainerLayout->count();
|
|
||||||
QWidget *previousMainContainer = previousCount ? m_formContainerLayout->itemAt(0)->widget() : static_cast<QWidget*>(0);
|
|
||||||
if (previousMainContainer == w)
|
|
||||||
return;
|
|
||||||
// Swap
|
|
||||||
if (previousCount)
|
|
||||||
delete m_formContainerLayout->takeAt(0);
|
|
||||||
if (w)
|
|
||||||
m_formContainerLayout->addWidget(w);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowWidgetStack::addTool(QDesignerFormWindowToolInterface *tool)
|
|
||||||
{
|
|
||||||
if (QWidget *w = tool->editor()) {
|
|
||||||
w->setVisible(m_layout->count() == 0); // Initially only form editor is visible
|
|
||||||
m_layout->addWidget(w);
|
|
||||||
} else {
|
|
||||||
// The form editor might not have a tool initially, use dummy. Assert on anything else
|
|
||||||
Q_ASSERT(m_tools.empty());
|
|
||||||
m_layout->addWidget(m_formContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_tools.append(tool);
|
|
||||||
|
|
||||||
connect(tool->action(), SIGNAL(triggered()), this, SLOT(setSenderAsCurrentTool()));
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormWindowToolInterface *FormWindowWidgetStack::tool(int index) const
|
|
||||||
{
|
|
||||||
if (index < 0 || index >= count())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return m_tools.at(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
int FormWindowWidgetStack::currentIndex() const
|
|
||||||
{
|
|
||||||
return m_layout->currentIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *FormWindowWidgetStack::defaultEditor() const
|
|
||||||
{
|
|
||||||
if (m_tools.isEmpty())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return m_tools.at(0)->editor();
|
|
||||||
}
|
|
||||||
|
|
||||||
QLayout *FormWindowWidgetStack::layout() const
|
|
||||||
{
|
|
||||||
return m_layout;
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_formwindow_widgetstack.h"
|
|
|
@ -1,82 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMWINDOW_WIDGETSTACK_H
|
|
||||||
#define FORMWINDOW_WIDGETSTACK_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QDesignerFormWindowToolInterface;
|
|
||||||
|
|
||||||
class QStackedLayout;
|
|
||||||
class QWidget;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT FormWindowWidgetStack: public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
FormWindowWidgetStack(QObject *parent = nullptr);
|
|
||||||
virtual ~FormWindowWidgetStack();
|
|
||||||
|
|
||||||
QLayout *layout() const;
|
|
||||||
|
|
||||||
int count() const;
|
|
||||||
QDesignerFormWindowToolInterface *tool(int index) const;
|
|
||||||
QDesignerFormWindowToolInterface *currentTool() const;
|
|
||||||
int currentIndex() const;
|
|
||||||
int indexOf(QDesignerFormWindowToolInterface *tool) const;
|
|
||||||
|
|
||||||
void setMainContainer(QWidget *w = 0);
|
|
||||||
|
|
||||||
// Return the widget containing the form which can be used to apply embedded design settings to.
|
|
||||||
// These settings should not affect the other editing tools.
|
|
||||||
QWidget *formContainer() const { return m_formContainer; }
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void currentToolChanged(int index);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void addTool(QDesignerFormWindowToolInterface *tool);
|
|
||||||
void setCurrentTool(QDesignerFormWindowToolInterface *tool);
|
|
||||||
void setCurrentTool(int index);
|
|
||||||
void setSenderAsCurrentTool();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QWidget *defaultEditor() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QList<QDesignerFormWindowToolInterface*> m_tools;
|
|
||||||
QWidget *m_formContainer;
|
|
||||||
QStackedLayout *m_formContainerLayout;
|
|
||||||
QStackedLayout *m_layout;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMWINDOW_WIDGETSTACK_H
|
|
|
@ -1,192 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "formwindowcursor.h"
|
|
||||||
#include "formwindow.h"
|
|
||||||
|
|
||||||
// sdk
|
|
||||||
#include <QtDesigner/propertysheet.h>
|
|
||||||
#include <QtDesigner/QExtensionManager>
|
|
||||||
#include "qdesigner_propertycommand_p.h"
|
|
||||||
|
|
||||||
#include <QtCore/qdebug.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
FormWindowCursor::FormWindowCursor(FormWindow *fw, QObject *parent)
|
|
||||||
: QObject(parent),
|
|
||||||
m_formWindow(fw)
|
|
||||||
{
|
|
||||||
update();
|
|
||||||
connect(fw, SIGNAL(changed()), this, SLOT(update()));
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowCursor::~FormWindowCursor()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QDesignerFormWindowInterface *FormWindowCursor::formWindow() const
|
|
||||||
{
|
|
||||||
return m_formWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FormWindowCursor::movePosition(MoveOperation op, MoveMode mode)
|
|
||||||
{
|
|
||||||
if (widgetCount() == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
int iterator = position();
|
|
||||||
|
|
||||||
if (mode == MoveAnchor)
|
|
||||||
m_formWindow->clearSelection(false);
|
|
||||||
|
|
||||||
switch (op) {
|
|
||||||
case Next:
|
|
||||||
++iterator;
|
|
||||||
if (iterator >= widgetCount())
|
|
||||||
iterator = 0;
|
|
||||||
|
|
||||||
m_formWindow->selectWidget(m_formWindow->widgetAt(iterator), true);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case Prev:
|
|
||||||
--iterator;
|
|
||||||
if (iterator < 0)
|
|
||||||
iterator = widgetCount() - 1;
|
|
||||||
|
|
||||||
if (iterator < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
m_formWindow->selectWidget(m_formWindow->widgetAt(iterator), true);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int FormWindowCursor::position() const
|
|
||||||
{
|
|
||||||
const int index = m_formWindow->widgets().indexOf(current());
|
|
||||||
return index == -1 ? 0 : index;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowCursor::setPosition(int pos, MoveMode mode)
|
|
||||||
{
|
|
||||||
if (!widgetCount())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mode == MoveAnchor)
|
|
||||||
m_formWindow->clearSelection(false);
|
|
||||||
|
|
||||||
if (pos >= widgetCount())
|
|
||||||
pos = 0;
|
|
||||||
|
|
||||||
m_formWindow->selectWidget(m_formWindow->widgetAt(pos), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *FormWindowCursor::current() const
|
|
||||||
{
|
|
||||||
return m_formWindow->currentWidget();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FormWindowCursor::hasSelection() const
|
|
||||||
{
|
|
||||||
return !m_formWindow->selectedWidgets().isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
int FormWindowCursor::selectedWidgetCount() const
|
|
||||||
{
|
|
||||||
int N = m_formWindow->selectedWidgets().count();
|
|
||||||
return N ? N : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *FormWindowCursor::selectedWidget(int index) const
|
|
||||||
{
|
|
||||||
return hasSelection()
|
|
||||||
? m_formWindow->selectedWidgets().at(index)
|
|
||||||
: m_formWindow->mainContainer();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowCursor::update()
|
|
||||||
{
|
|
||||||
// ### todo
|
|
||||||
}
|
|
||||||
|
|
||||||
int FormWindowCursor::widgetCount() const
|
|
||||||
{
|
|
||||||
return m_formWindow->widgetCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *FormWindowCursor::widget(int index) const
|
|
||||||
{
|
|
||||||
return m_formWindow->widgetAt(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowCursor::setProperty(const QString &name, const QVariant &value)
|
|
||||||
{
|
|
||||||
|
|
||||||
// build selection
|
|
||||||
const int N = selectedWidgetCount();
|
|
||||||
Q_ASSERT(N);
|
|
||||||
|
|
||||||
SetPropertyCommand::ObjectList selection;
|
|
||||||
for (int i=0; i<N; ++i)
|
|
||||||
selection.push_back(selectedWidget(i));
|
|
||||||
|
|
||||||
|
|
||||||
SetPropertyCommand* setPropertyCommand = new SetPropertyCommand(m_formWindow);
|
|
||||||
if (setPropertyCommand->init(selection, name, value, current())) {
|
|
||||||
m_formWindow->commandHistory()->push(setPropertyCommand);
|
|
||||||
} else {
|
|
||||||
delete setPropertyCommand;
|
|
||||||
qDebug() << "Unable to set property " << name << '.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowCursor::setWidgetProperty(QWidget *widget, const QString &name, const QVariant &value)
|
|
||||||
{
|
|
||||||
SetPropertyCommand *cmd = new SetPropertyCommand(m_formWindow);
|
|
||||||
if (cmd->init(widget, name, value)) {
|
|
||||||
m_formWindow->commandHistory()->push(cmd);
|
|
||||||
} else {
|
|
||||||
delete cmd;
|
|
||||||
qDebug() << "Unable to set property " << name << '.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowCursor::resetWidgetProperty(QWidget *widget, const QString &name)
|
|
||||||
{
|
|
||||||
ResetPropertyCommand *cmd = new ResetPropertyCommand(m_formWindow);
|
|
||||||
if (cmd->init(widget, name)) {
|
|
||||||
m_formWindow->commandHistory()->push(cmd);
|
|
||||||
} else {
|
|
||||||
delete cmd;
|
|
||||||
qDebug() << "Unable to reset property " << name << '.';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_formwindowcursor.h"
|
|
|
@ -1,73 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMWINDOWCURSOR_H
|
|
||||||
#define FORMWINDOWCURSOR_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
#include "formwindow.h"
|
|
||||||
#include <QtDesigner/abstractformwindowcursor.h>
|
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT FormWindowCursor: public QObject, public QDesignerFormWindowCursorInterface
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit FormWindowCursor(FormWindow *fw, QObject *parent = nullptr);
|
|
||||||
virtual ~FormWindowCursor();
|
|
||||||
|
|
||||||
virtual QDesignerFormWindowInterface *formWindow() const;
|
|
||||||
|
|
||||||
virtual bool movePosition(MoveOperation op, MoveMode mode);
|
|
||||||
|
|
||||||
virtual int position() const;
|
|
||||||
virtual void setPosition(int pos, MoveMode mode);
|
|
||||||
|
|
||||||
virtual QWidget *current() const;
|
|
||||||
|
|
||||||
virtual int widgetCount() const;
|
|
||||||
virtual QWidget *widget(int index) const;
|
|
||||||
|
|
||||||
virtual bool hasSelection() const;
|
|
||||||
virtual int selectedWidgetCount() const;
|
|
||||||
virtual QWidget *selectedWidget(int index) const;
|
|
||||||
|
|
||||||
virtual void setProperty(const QString &name, const QVariant &value);
|
|
||||||
virtual void setWidgetProperty(QWidget *widget, const QString &name, const QVariant &value);
|
|
||||||
virtual void resetWidgetProperty(QWidget *widget, const QString &name);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void update();
|
|
||||||
|
|
||||||
private:
|
|
||||||
FormWindow *m_formWindow;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMWINDOWCURSOR_H
|
|
|
@ -1,182 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMWINDOWMANAGER_H
|
|
||||||
#define FORMWINDOWMANAGER_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
#include "qdesigner_formwindowmanager_p.h"
|
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtCore/QList>
|
|
||||||
#include <QtCore/QPointer>
|
|
||||||
#include <QtCore/QMap>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class QAction;
|
|
||||||
class QActionGroup;
|
|
||||||
class QUndoGroup;
|
|
||||||
class QDesignerFormEditorInterface;
|
|
||||||
class QDesignerWidgetBoxInterface;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class FormWindow;
|
|
||||||
class PreviewManager;
|
|
||||||
class PreviewActionGroup;
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT FormWindowManager
|
|
||||||
: public QDesignerFormWindowManager
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit FormWindowManager(QDesignerFormEditorInterface *core, QObject *parent = nullptr);
|
|
||||||
virtual ~FormWindowManager();
|
|
||||||
|
|
||||||
virtual QDesignerFormEditorInterface *core() const;
|
|
||||||
|
|
||||||
inline QAction *actionCut() const { return m_actionCut; }
|
|
||||||
inline QAction *actionCopy() const { return m_actionCopy; }
|
|
||||||
inline QAction *actionPaste() const { return m_actionPaste; }
|
|
||||||
inline QAction *actionDelete() const { return m_actionDelete; }
|
|
||||||
inline QAction *actionSelectAll() const { return m_actionSelectAll; }
|
|
||||||
inline QAction *actionLower() const { return m_actionLower; }
|
|
||||||
inline QAction *actionRaise() const { return m_actionRaise; }
|
|
||||||
#ifndef QT_NO_UNDOGROUP
|
|
||||||
QAction *actionUndo() const;
|
|
||||||
QAction *actionRedo() const;
|
|
||||||
#endif // QT_NO_UNDOGROUP
|
|
||||||
|
|
||||||
inline QAction *actionHorizontalLayout() const { return m_actionHorizontalLayout; }
|
|
||||||
inline QAction *actionVerticalLayout() const { return m_actionVerticalLayout; }
|
|
||||||
inline QAction *actionSplitHorizontal() const { return m_actionSplitHorizontal; }
|
|
||||||
inline QAction *actionSplitVertical() const { return m_actionSplitVertical; }
|
|
||||||
inline QAction *actionGridLayout() const { return m_actionGridLayout; }
|
|
||||||
inline QAction *actionBreakLayout() const { return m_actionBreakLayout; }
|
|
||||||
inline QAction *actionAdjustSize() const { return m_actionAdjustSize; }
|
|
||||||
|
|
||||||
inline QAction *actionDefaultPreview() const { return m_actionDefaultPreview; }
|
|
||||||
QActionGroup *actionGroupPreviewInStyle() const;
|
|
||||||
virtual QAction *actionShowFormWindowSettingsDialog() const;
|
|
||||||
|
|
||||||
QDesignerFormWindowInterface *activeFormWindow() const;
|
|
||||||
|
|
||||||
int formWindowCount() const;
|
|
||||||
QDesignerFormWindowInterface *formWindow(int index) const;
|
|
||||||
|
|
||||||
QDesignerFormWindowInterface *createFormWindow(QWidget *parentWidget = 0, Qt::WindowFlags flags = 0);
|
|
||||||
|
|
||||||
QPixmap createPreviewPixmap(QString *errorMessage);
|
|
||||||
|
|
||||||
bool eventFilter(QObject *o, QEvent *e);
|
|
||||||
|
|
||||||
void dragItems(const QList<QDesignerDnDItemInterface*> &item_list);
|
|
||||||
|
|
||||||
#ifndef QT_NO_UNDOGROUP
|
|
||||||
QUndoGroup *undoGroup() const;
|
|
||||||
#endif // QT_NO_UNDOGROUP
|
|
||||||
|
|
||||||
virtual PreviewManager *previewManager() const { return m_previewManager; }
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void addFormWindow(QDesignerFormWindowInterface *formWindow);
|
|
||||||
void removeFormWindow(QDesignerFormWindowInterface *formWindow);
|
|
||||||
void setActiveFormWindow(QDesignerFormWindowInterface *formWindow);
|
|
||||||
void closeAllPreviews();
|
|
||||||
void deviceProfilesChanged();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotActionCutActivated();
|
|
||||||
void slotActionCopyActivated();
|
|
||||||
void slotActionPasteActivated();
|
|
||||||
void slotActionDeleteActivated();
|
|
||||||
void slotActionSelectAllActivated();
|
|
||||||
void slotActionLowerActivated();
|
|
||||||
void slotActionRaiseActivated();
|
|
||||||
void createLayout();
|
|
||||||
void slotActionBreakLayoutActivated();
|
|
||||||
void slotActionAdjustSizeActivated();
|
|
||||||
void slotActionSimplifyLayoutActivated();
|
|
||||||
void slotActionDefaultPreviewActivated();
|
|
||||||
void slotActionGroupPreviewInStyle(const QString &style, int deviceProfileIndex);
|
|
||||||
void slotActionShowFormWindowSettingsDialog();
|
|
||||||
|
|
||||||
void slotUpdateActions();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void setupActions();
|
|
||||||
FormWindow *findFormWindow(QWidget *w);
|
|
||||||
QWidget *findManagedWidget(FormWindow *fw, QWidget *w);
|
|
||||||
|
|
||||||
private:
|
|
||||||
enum CreateLayoutContext { LayoutContainer, LayoutSelection, MorphLayout };
|
|
||||||
|
|
||||||
QDesignerFormEditorInterface *m_core;
|
|
||||||
FormWindow *m_activeFormWindow;
|
|
||||||
QList<FormWindow*> m_formWindows;
|
|
||||||
|
|
||||||
PreviewManager *m_previewManager;
|
|
||||||
|
|
||||||
/* Context of the layout actions and base for morphing layouts. Determined
|
|
||||||
* in slotUpdateActions() and used later on in the action slots. */
|
|
||||||
CreateLayoutContext m_createLayoutContext;
|
|
||||||
QWidget *m_morphLayoutContainer;
|
|
||||||
|
|
||||||
// edit actions
|
|
||||||
QAction *m_actionCut;
|
|
||||||
QAction *m_actionCopy;
|
|
||||||
QAction *m_actionPaste;
|
|
||||||
QAction *m_actionSelectAll;
|
|
||||||
QAction *m_actionDelete;
|
|
||||||
QAction *m_actionLower;
|
|
||||||
QAction *m_actionRaise;
|
|
||||||
// layout actions
|
|
||||||
QAction *m_actionHorizontalLayout;
|
|
||||||
QAction *m_actionVerticalLayout;
|
|
||||||
QAction *m_actionSplitHorizontal;
|
|
||||||
QAction *m_actionSplitVertical;
|
|
||||||
QAction *m_actionGridLayout;
|
|
||||||
QAction *m_actionBreakLayout;
|
|
||||||
QAction *m_actionAdjustSize;
|
|
||||||
// preview actions
|
|
||||||
QAction *m_actionDefaultPreview;
|
|
||||||
mutable PreviewActionGroup *m_actionGroupPreviewInStyle;
|
|
||||||
QAction *m_actionShowFormWindowSettingsDialog;
|
|
||||||
|
|
||||||
QMap<QWidget *,bool> getUnsortedLayoutsToBeBroken(bool firstOnly) const;
|
|
||||||
bool hasLayoutsToBeBroken() const;
|
|
||||||
QWidgetList layoutsToBeBroken(QWidget *w) const;
|
|
||||||
QWidgetList layoutsToBeBroken() const;
|
|
||||||
|
|
||||||
#ifndef QT_NO_UNDOGROUP
|
|
||||||
QAction *m_actionUndo;
|
|
||||||
QAction *m_actionRedo;
|
|
||||||
|
|
||||||
QUndoGroup *m_undoGroup;
|
|
||||||
#endif // QT_NO_UNDOGROUP
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMWINDOWMANAGER_H
|
|
|
@ -1,248 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "formwindowsettings.h"
|
|
||||||
#include "ui_formwindowsettings.h"
|
|
||||||
|
|
||||||
#include <formwindowbase_p.h>
|
|
||||||
#include <grid_p.h>
|
|
||||||
|
|
||||||
#include <QtGui/QStyle>
|
|
||||||
|
|
||||||
#include <QtCore/QRegExp>
|
|
||||||
#include <QtCore/QDebug>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
// Data structure containing form dialog data providing comparison
|
|
||||||
struct FormWindowData {
|
|
||||||
FormWindowData();
|
|
||||||
|
|
||||||
bool equals(const FormWindowData&) const;
|
|
||||||
|
|
||||||
void fromFormWindow(FormWindowBase* fw);
|
|
||||||
void applyToFormWindow(FormWindowBase* fw) const;
|
|
||||||
|
|
||||||
bool layoutDefaultEnabled;
|
|
||||||
int defaultMargin;
|
|
||||||
int defaultSpacing;
|
|
||||||
|
|
||||||
bool layoutFunctionsEnabled;
|
|
||||||
QString marginFunction;
|
|
||||||
QString spacingFunction;
|
|
||||||
|
|
||||||
QString author;
|
|
||||||
|
|
||||||
QStringList includeHints;
|
|
||||||
|
|
||||||
bool hasFormGrid;
|
|
||||||
Grid grid;
|
|
||||||
};
|
|
||||||
|
|
||||||
inline bool operator==(const FormWindowData &fd1, const FormWindowData &fd2) { return fd1.equals(fd2); }
|
|
||||||
inline bool operator!=(const FormWindowData &fd1, const FormWindowData &fd2) { return !fd1.equals(fd2); }
|
|
||||||
|
|
||||||
QDebug operator<<(QDebug str, const FormWindowData &d)
|
|
||||||
{
|
|
||||||
str.nospace() << "LayoutDefault=" << d.layoutDefaultEnabled << ',' << d.defaultMargin
|
|
||||||
<< ',' << d.defaultSpacing << " LayoutFunctions=" << d.layoutFunctionsEnabled << ','
|
|
||||||
<< d.marginFunction << ',' << d.spacingFunction << " Author=" << d.author
|
|
||||||
<< " Hints=" << d.includeHints << " Grid=" << d.hasFormGrid
|
|
||||||
<< d.grid.deltaX() << d.grid.deltaY() << '\n';
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowData::FormWindowData() :
|
|
||||||
layoutDefaultEnabled(false),
|
|
||||||
defaultMargin(0),
|
|
||||||
defaultSpacing(0),
|
|
||||||
layoutFunctionsEnabled(false),
|
|
||||||
hasFormGrid(false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FormWindowData::equals(const FormWindowData &rhs) const
|
|
||||||
{
|
|
||||||
return layoutDefaultEnabled == rhs.layoutDefaultEnabled &&
|
|
||||||
defaultMargin == rhs.defaultMargin &&
|
|
||||||
defaultSpacing == rhs.defaultSpacing &&
|
|
||||||
layoutFunctionsEnabled == rhs.layoutFunctionsEnabled &&
|
|
||||||
marginFunction == rhs.marginFunction &&
|
|
||||||
spacingFunction == rhs.spacingFunction &&
|
|
||||||
author == rhs.author &&
|
|
||||||
includeHints == rhs.includeHints &&
|
|
||||||
hasFormGrid == rhs.hasFormGrid &&
|
|
||||||
grid == rhs.grid;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowData::fromFormWindow(FormWindowBase* fw)
|
|
||||||
{
|
|
||||||
defaultMargin = defaultSpacing = INT_MIN;
|
|
||||||
fw->layoutDefault(&defaultMargin, &defaultSpacing);
|
|
||||||
|
|
||||||
QStyle *style = fw->formContainer()->style();
|
|
||||||
layoutDefaultEnabled = defaultMargin != INT_MIN || defaultMargin != INT_MIN;
|
|
||||||
if (defaultMargin == INT_MIN)
|
|
||||||
defaultMargin = style->pixelMetric(QStyle::PM_DefaultChildMargin, 0);
|
|
||||||
if (defaultSpacing == INT_MIN)
|
|
||||||
defaultSpacing = style->pixelMetric(QStyle::PM_DefaultLayoutSpacing, 0);
|
|
||||||
|
|
||||||
|
|
||||||
marginFunction.clear();
|
|
||||||
spacingFunction.clear();
|
|
||||||
fw->layoutFunction(&marginFunction, &spacingFunction);
|
|
||||||
layoutFunctionsEnabled = !marginFunction.isEmpty() || !spacingFunction.isEmpty();
|
|
||||||
|
|
||||||
author = fw->author();
|
|
||||||
|
|
||||||
includeHints = fw->includeHints();
|
|
||||||
includeHints.removeAll(QString());
|
|
||||||
|
|
||||||
hasFormGrid = fw->hasFormGrid();
|
|
||||||
grid = hasFormGrid ? fw->designerGrid() : FormWindowBase::defaultDesignerGrid();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowData::applyToFormWindow(FormWindowBase* fw) const
|
|
||||||
{
|
|
||||||
fw->setAuthor(author);
|
|
||||||
|
|
||||||
if (layoutDefaultEnabled) {
|
|
||||||
fw->setLayoutDefault(defaultMargin, defaultSpacing);
|
|
||||||
} else {
|
|
||||||
fw->setLayoutDefault(INT_MIN, INT_MIN);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (layoutFunctionsEnabled) {
|
|
||||||
fw->setLayoutFunction(marginFunction, spacingFunction);
|
|
||||||
} else {
|
|
||||||
fw->setLayoutFunction(QString(), QString());
|
|
||||||
}
|
|
||||||
|
|
||||||
fw->setIncludeHints(includeHints);
|
|
||||||
|
|
||||||
const bool hadFormGrid = fw->hasFormGrid();
|
|
||||||
fw->setHasFormGrid(hasFormGrid);
|
|
||||||
if (hasFormGrid || hadFormGrid != hasFormGrid)
|
|
||||||
fw->setDesignerGrid(hasFormGrid ? grid : FormWindowBase::defaultDesignerGrid());
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------- FormWindowSettings
|
|
||||||
|
|
||||||
FormWindowSettings::FormWindowSettings(QDesignerFormWindowInterface *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
m_ui(new Ui_FormWindowSettings),
|
|
||||||
m_formWindow(qobject_cast<FormWindowBase*>(parent)),
|
|
||||||
m_oldData(new FormWindowData)
|
|
||||||
{
|
|
||||||
Q_ASSERT(m_formWindow);
|
|
||||||
|
|
||||||
m_ui->setupUi(this);
|
|
||||||
m_ui->gridPanel->setCheckable(true);
|
|
||||||
m_ui->gridPanel->setResetButtonVisible(false);
|
|
||||||
|
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
||||||
|
|
||||||
QString deviceProfileName = m_formWindow->deviceProfileName();
|
|
||||||
if (deviceProfileName.isEmpty())
|
|
||||||
deviceProfileName = tr("None");
|
|
||||||
m_ui->deviceProfileLabel->setText(tr("Device Profile: %1").arg(deviceProfileName));
|
|
||||||
|
|
||||||
m_oldData->fromFormWindow(m_formWindow);
|
|
||||||
setData(*m_oldData);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowSettings::~FormWindowSettings()
|
|
||||||
{
|
|
||||||
delete m_oldData;
|
|
||||||
delete m_ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowData FormWindowSettings::data() const
|
|
||||||
{
|
|
||||||
FormWindowData rc;
|
|
||||||
rc.author = m_ui->authorLineEdit->text();
|
|
||||||
|
|
||||||
rc.layoutDefaultEnabled = m_ui->layoutDefaultGroupBox->isChecked();
|
|
||||||
rc.defaultMargin = m_ui->defaultMarginSpinBox->value();
|
|
||||||
rc.defaultSpacing = m_ui->defaultSpacingSpinBox->value();
|
|
||||||
|
|
||||||
rc.layoutFunctionsEnabled = m_ui->layoutFunctionGroupBox->isChecked();
|
|
||||||
rc.marginFunction = m_ui->marginFunctionLineEdit->text();
|
|
||||||
rc.spacingFunction = m_ui->spacingFunctionLineEdit->text();
|
|
||||||
|
|
||||||
const QString hints = m_ui->includeHintsTextEdit->toPlainText();
|
|
||||||
if (!hints.isEmpty()) {
|
|
||||||
rc.includeHints = hints.split(QString(QLatin1Char('\n')));
|
|
||||||
// Purge out any lines consisting of blanks only
|
|
||||||
const QRegExp blankLine = QRegExp(QLatin1String("^\\s*$"));
|
|
||||||
Q_ASSERT(blankLine.isValid());
|
|
||||||
for (QStringList::iterator it = rc.includeHints.begin(); it != rc.includeHints.end(); )
|
|
||||||
if (blankLine.exactMatch(*it)) {
|
|
||||||
it = rc.includeHints.erase(it);
|
|
||||||
} else {
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
rc.includeHints.removeAll(QString());
|
|
||||||
}
|
|
||||||
|
|
||||||
rc.hasFormGrid = m_ui->gridPanel->isChecked();
|
|
||||||
rc.grid = m_ui->gridPanel->grid();
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowSettings::setData(const FormWindowData &data)
|
|
||||||
{
|
|
||||||
m_ui->layoutDefaultGroupBox->setChecked(data.layoutDefaultEnabled);
|
|
||||||
m_ui->defaultMarginSpinBox->setValue(data.defaultMargin);
|
|
||||||
m_ui->defaultSpacingSpinBox->setValue(data.defaultSpacing);
|
|
||||||
|
|
||||||
m_ui->layoutFunctionGroupBox->setChecked(data.layoutFunctionsEnabled);
|
|
||||||
m_ui->marginFunctionLineEdit->setText(data.marginFunction);
|
|
||||||
m_ui->spacingFunctionLineEdit->setText(data.spacingFunction);
|
|
||||||
|
|
||||||
m_ui->authorLineEdit->setText(data.author);
|
|
||||||
|
|
||||||
if (data.includeHints.empty()) {
|
|
||||||
m_ui->includeHintsTextEdit->clear();
|
|
||||||
} else {
|
|
||||||
m_ui->includeHintsTextEdit->setText(data.includeHints.join(QLatin1String("\n")));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_ui->gridPanel->setChecked(data.hasFormGrid);
|
|
||||||
m_ui->gridPanel->setGrid(data.grid);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWindowSettings::accept()
|
|
||||||
{
|
|
||||||
// Anything changed? -> Apply and set dirty
|
|
||||||
const FormWindowData newData = data();
|
|
||||||
if (newData != *m_oldData) {
|
|
||||||
newData.applyToFormWindow(m_formWindow);
|
|
||||||
m_formWindow->setDirty(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QDialog::accept();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_formwindowsettings.h"
|
|
|
@ -1,63 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef FORMWINDOWSETTINGS_H
|
|
||||||
#define FORMWINDOWSETTINGS_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
class Ui_FormWindowSettings;
|
|
||||||
|
|
||||||
class QDesignerFormWindowInterface;
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
struct FormWindowData;
|
|
||||||
class FormWindowBase;
|
|
||||||
|
|
||||||
/* Dialog to edit the settings of a QDesignerFormWindowInterface.
|
|
||||||
* It sets the dirty flag on the form window if something was changed. */
|
|
||||||
|
|
||||||
class FormWindowSettings: public QDialog
|
|
||||||
{
|
|
||||||
Q_DISABLE_COPY(FormWindowSettings)
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit FormWindowSettings(QDesignerFormWindowInterface *formWindow);
|
|
||||||
virtual ~FormWindowSettings();
|
|
||||||
|
|
||||||
virtual void accept();
|
|
||||||
|
|
||||||
private:
|
|
||||||
FormWindowData data() const;
|
|
||||||
void setData(const FormWindowData&);
|
|
||||||
|
|
||||||
Ui_FormWindowSettings *m_ui;
|
|
||||||
FormWindowBase *m_formWindow;
|
|
||||||
FormWindowData *m_oldData;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // FORMWINDOWSETTINGS_H
|
|
|
@ -1,229 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<comment>*********************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
*********************************************************************</comment>
|
|
||||||
<class>FormWindowSettings</class>
|
|
||||||
<widget class="QDialog" name="FormWindowSettings">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>470</width>
|
|
||||||
<height>466</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout">
|
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="layoutDefaultGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Layout &Default</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Spacing:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>defaultSpacingSpinBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Margin:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>defaultMarginSpinBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QSpinBox" name="defaultSpacingSpinBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="defaultMarginSpinBox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="layoutFunctionGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>&Layout Function</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="spacingFunctionLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="marginFunctionLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ma&rgin:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>marginFunctionLineEdit</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_3_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Spa&cing:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>spacingFunctionLineEdit</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="2">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="2">
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" rowspan="2">
|
|
||||||
<widget class="QGroupBox" name="includeHintsGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>&Include Hints</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextEdit" name="includeHintsTextEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="qdesigner_internal::GridPanel" name="gridPanel">
|
|
||||||
<property name="title">
|
|
||||||
<string>Grid</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QGroupBox" name="embeddedGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Embedded Design</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="deviceProfileLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QGroupBox" name="authorGroupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>&Author</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="authorLineEdit"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>qdesigner_internal::GridPanel</class>
|
|
||||||
<extends>QGroupBox</extends>
|
|
||||||
<header location="global">gridpanel_p.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>authorLineEdit</tabstop>
|
|
||||||
<tabstop>defaultMarginSpinBox</tabstop>
|
|
||||||
<tabstop>defaultSpacingSpinBox</tabstop>
|
|
||||||
<tabstop>marginFunctionLineEdit</tabstop>
|
|
||||||
<tabstop>spacingFunctionLineEdit</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
|
@ -1,102 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "iconcache.h"
|
|
||||||
#include <QtGui/QPixmap>
|
|
||||||
#include <QtGui/QIcon>
|
|
||||||
#include <QtCore/QDebug>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
using namespace qdesigner_internal;
|
|
||||||
|
|
||||||
IconCache::IconCache(QObject *parent)
|
|
||||||
: QDesignerIconCacheInterface(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QIcon IconCache::nameToIcon(const QString &path, const QString &resourcePath)
|
|
||||||
{
|
|
||||||
Q_UNUSED(path)
|
|
||||||
Q_UNUSED(resourcePath)
|
|
||||||
qWarning() << "IconCache::nameToIcon(): IconCache is obsoleted";
|
|
||||||
return QIcon();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString IconCache::iconToFilePath(const QIcon &pm) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(pm)
|
|
||||||
qWarning() << "IconCache::iconToFilePath(): IconCache is obsoleted";
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString IconCache::iconToQrcPath(const QIcon &pm) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(pm)
|
|
||||||
qWarning() << "IconCache::iconToQrcPath(): IconCache is obsoleted";
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
QPixmap IconCache::nameToPixmap(const QString &path, const QString &resourcePath)
|
|
||||||
{
|
|
||||||
Q_UNUSED(path)
|
|
||||||
Q_UNUSED(resourcePath)
|
|
||||||
qWarning() << "IconCache::nameToPixmap(): IconCache is obsoleted";
|
|
||||||
return QPixmap();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString IconCache::pixmapToFilePath(const QPixmap &pm) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(pm)
|
|
||||||
qWarning() << "IconCache::pixmapToFilePath(): IconCache is obsoleted";
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString IconCache::pixmapToQrcPath(const QPixmap &pm) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(pm)
|
|
||||||
qWarning() << "IconCache::pixmapToQrcPath(): IconCache is obsoleted";
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<QPixmap> IconCache::pixmapList() const
|
|
||||||
{
|
|
||||||
qWarning() << "IconCache::pixmapList(): IconCache is obsoleted";
|
|
||||||
return QList<QPixmap>();
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<QIcon> IconCache::iconList() const
|
|
||||||
{
|
|
||||||
qWarning() << "IconCache::iconList(): IconCache is obsoleted";
|
|
||||||
return QList<QIcon>();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString IconCache::resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &wd) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(filePath)
|
|
||||||
Q_UNUSED(qrcPath)
|
|
||||||
Q_UNUSED(wd)
|
|
||||||
qWarning() << "IconCache::resolveQrcPath(): IconCache is obsoleted";
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
#include "moc_iconcache.h"
|
|
|
@ -1,58 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Copyright (C) 2016 Ivailo Monev
|
|
||||||
**
|
|
||||||
** This file is part of the Katie Designer of the Katie Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** This file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef ICONCACHE_H
|
|
||||||
#define ICONCACHE_H
|
|
||||||
|
|
||||||
#include "formeditor_global.h"
|
|
||||||
|
|
||||||
#include <QtDesigner/abstracticoncache.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
namespace qdesigner_internal {
|
|
||||||
|
|
||||||
class QT_FORMEDITOR_EXPORT IconCache : public QDesignerIconCacheInterface
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit IconCache(QObject *parent);
|
|
||||||
|
|
||||||
virtual QIcon nameToIcon(const QString &path, const QString &resourcePath = QString());
|
|
||||||
virtual QString iconToFilePath(const QIcon &pm) const;
|
|
||||||
virtual QString iconToQrcPath(const QIcon &pm) const;
|
|
||||||
virtual QPixmap nameToPixmap(const QString &path, const QString &resourcePath = QString());
|
|
||||||
virtual QString pixmapToFilePath(const QPixmap &pm) const;
|
|
||||||
virtual QString pixmapToQrcPath(const QPixmap &pm) const;
|
|
||||||
|
|
||||||
virtual QList<QPixmap> pixmapList() const;
|
|
||||||
virtual QList<QIcon> iconList() const;
|
|
||||||
|
|
||||||
virtual QString resolveQrcPath(const QString &filePath, const QString &qrcPath, const QString &workingDirectory = QString()) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace qdesigner_internal
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // ICONCACHE_H
|
|
Before Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 1,016 B |
Before Width: | Height: | Size: 562 B |
Before Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 929 B |
Before Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 454 B |
Before Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 383 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 563 B |
Before Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 968 B |
Before Width: | Height: | Size: 817 B |
Before Width: | Height: | Size: 518 B |
Before Width: | Height: | Size: 853 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 1,003 B |
Before Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 749 B |
Before Width: | Height: | Size: 966 B |
Before Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 702 B |
Before Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 953 B |
Before Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 797 B |
Before Width: | Height: | Size: 756 B |
Before Width: | Height: | Size: 643 B |
Before Width: | Height: | Size: 807 B |
Before Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 408 B |
Before Width: | Height: | Size: 586 B |