From e345c1df0674c95c322e93b84abcbaa64252f289 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 14:49:03 +0100 Subject: [PATCH 01/28] migrate studio to qt5 migrate studio core plugin to qt5 --- CMakeModules/nel.cmake | 2 +- studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt | 11 +++++------ studio/src/CMakeLists.txt | 9 ++++----- studio/src/extension_system/iplugin.h | 1 + studio/src/extension_system/plugin_spec.cpp | 2 +- studio/src/main.cpp | 9 ++++----- studio/src/plugins/bnp_manager/CMakeLists.txt | 6 +++--- studio/src/plugins/core/CMakeLists.txt | 8 ++++---- studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp | 5 +++-- studio/src/plugins/core/Nel3DWidget/nel3d_widget.h | 5 ++++- studio/src/plugins/core/context_manager.cpp | 4 ++-- studio/src/plugins/core/core.json | 6 ++++++ studio/src/plugins/core/core_plugin.cpp | 12 +++++------- studio/src/plugins/core/core_plugin.h | 1 + studio/src/plugins/core/general_settings_page.cpp | 10 +++++----- studio/src/plugins/core/main_window.cpp | 7 +++++-- studio/src/plugins/core/main_window.h | 6 +++--- studio/src/plugins/core/menu_manager.h | 6 +++--- studio/src/plugins/core/plugin_view_dialog.cpp | 4 ++-- .../src/plugins/core/search_paths_settings_page.cpp | 4 ++-- studio/src/plugins/core/settings_dialog.cpp | 4 ++-- studio/src/plugins/disp_sheet_id/CMakeLists.txt | 4 ++-- studio/src/plugins/example/CMakeLists.txt | 4 ++-- studio/src/plugins/georges_editor/CMakeLists.txt | 6 +++--- studio/src/plugins/gui_editor/CMakeLists.txt | 6 +++--- studio/src/plugins/landscape_editor/CMakeLists.txt | 6 +++--- studio/src/plugins/log/CMakeLists.txt | 4 ++-- studio/src/plugins/mission_compiler/CMakeLists.txt | 6 +++--- studio/src/plugins/object_viewer/CMakeLists.txt | 6 +++--- studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt | 2 +- studio/src/plugins/tile_editor/CMakeLists.txt | 6 +++--- .../src/plugins/translation_manager/CMakeLists.txt | 4 ++-- studio/src/plugins/world_editor/CMakeLists.txt | 6 +++--- 33 files changed, 96 insertions(+), 86 deletions(-) create mode 100644 studio/src/plugins/core/core.json diff --git a/CMakeModules/nel.cmake b/CMakeModules/nel.cmake index ecc3f5b52c..af3869a6c0 100644 --- a/CMakeModules/nel.cmake +++ b/CMakeModules/nel.cmake @@ -234,7 +234,7 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.: ENDMACRO(CHECK_OUT_OF_SOURCE) MACRO(NL_SETUP_DEFAULT_OPTIONS) - IF(WITH_QT) + IF(WITH_QT5) OPTION(WITH_STUDIO "Build Core Studio" OFF ) ENDIF() diff --git a/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt b/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt index fa834dabfc..a77c4a7d25 100644 --- a/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt +++ b/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt @@ -1,5 +1,4 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES}) -INCLUDE(${QT_USE_FILE}) FILE(GLOB SRC *.cpp *.h) @@ -16,16 +15,16 @@ SET(QT_PROPERTY_EDITOR_RCS qtpropertybrowser.qrc) SET(QT_USE_QTGUI TRUE) -QT4_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS}) -QT4_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR}) +QT5_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS}) +QT5_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR}) SOURCE_GROUP(QtResources FILES ${QT_PROPERTY_EDITOR_RCS}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${QT_PROPERTY_EDITOR_MOC_SRC}) SOURCE_GROUP("Qt Property Editor Source" FILES ${SRC}) -qt4_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc) -qt4_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) -qt4_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc) +qt5_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc) +qt5_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) +qt5_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc) # Need to remove these so that they are not linked as they are inline included. LIST(REMOVE_ITEM QT_PROPERTY_EDITOR_MOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 6083805f82..efbd6a476b 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -1,7 +1,6 @@ ADD_SUBDIRECTORY(3rdparty) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES}) -INCLUDE( ${QT_USE_FILE} ) CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY) @@ -31,10 +30,10 @@ IF(WIN32) SET(STUDIO_RC studio.rc) ENDIF() -QT4_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS}) -QT4_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS}) -QT4_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} ) -QT4_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS}) +QT5_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS}) +QT5_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS}) +QT5_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} ) +QT5_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS}) SOURCE_GROUP(QtResources FILES ${STUDIO_RCS} ${STUDIO_PLUGIN_UIS} ) SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${STUDIO_MOC_SRCS} ${STUDIO_RC_SRCS}) diff --git a/studio/src/extension_system/iplugin.h b/studio/src/extension_system/iplugin.h index 01f337df1d..ba41cec3bd 100644 --- a/studio/src/extension_system/iplugin.h +++ b/studio/src/extension_system/iplugin.h @@ -100,6 +100,7 @@ class IPlugin }; //namespace ExtensionSystem +#define IPlugin_iid "dev.ryzom.com.ObjectViewerQt.IPlugin/0.9.2" Q_DECLARE_INTERFACE(ExtensionSystem::IPlugin, "dev.ryzom.com.ObjectViewerQt.IPlugin/0.9.2") #endif // IPLUGIN_H diff --git a/studio/src/extension_system/plugin_spec.cpp b/studio/src/extension_system/plugin_spec.cpp index 53250cebeb..85c61245c5 100644 --- a/studio/src/extension_system/plugin_spec.cpp +++ b/studio/src/extension_system/plugin_spec.cpp @@ -429,7 +429,7 @@ void PluginSpec::kill() bool b = loader->unload(); if( !b ) { - nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toAscii().data() ); + nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toLatin1().data() ); } //delete m_plugin; diff --git a/studio/src/main.cpp b/studio/src/main.cpp index 787e579306..22629e039b 100644 --- a/studio/src/main.cpp +++ b/studio/src/main.cpp @@ -39,11 +39,11 @@ #include #include #include -#include -#include +#include +#include //#include -#include -#include +#include +#include #include "startup_settings_dlg.h" #include "splash_screen.h" @@ -142,7 +142,6 @@ int main(int argc, char **argv) nlinfo("Welcome to NeL Object Viewer Qt!"); } - QApplication::setGraphicsSystem("raster"); #ifdef NL_OS_WINDOWS QApplication app(__argc, __argv); #else // NL_OS_WINDOWS diff --git a/studio/src/plugins/bnp_manager/CMakeLists.txt b/studio/src/plugins/bnp_manager/CMakeLists.txt index 883d10fd28..29830e5e16 100644 --- a/studio/src/plugins/bnp_manager/CMakeLists.txt +++ b/studio/src/plugins/bnp_manager/CMakeLists.txt @@ -23,9 +23,9 @@ SET(OVQT_PLUGIN_BNP_MANAGER_RCS bnp_manager.qrc) SET(QT_USE_QTGUI TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_BNP_MANAGER_RC_SRCS ${OVQT_PLUGIN_BNP_MANAGER_RCS}) -QT4_WRAP_CPP(OVQT_PLUG_BNP_MANAGER_MOC_SRC ${OVQT_PLUG_BNP_MANAGER_HDR}) -QT4_WRAP_UI(OVQT_PLUG_BNP_MANAGER_UI_HDRS ${OVQT_PLUG_BNP_MANAGER_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_BNP_MANAGER_RC_SRCS ${OVQT_PLUGIN_BNP_MANAGER_RCS}) +QT5_WRAP_CPP(OVQT_PLUG_BNP_MANAGER_MOC_SRC ${OVQT_PLUG_BNP_MANAGER_HDR}) +QT5_WRAP_UI(OVQT_PLUG_BNP_MANAGER_UI_HDRS ${OVQT_PLUG_BNP_MANAGER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_BNP_MANAGER_UIS} ${OVQT_PLUGIN_BNP_MANAGER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_BNP_MANAGER_UI_HDRS}) diff --git a/studio/src/plugins/core/CMakeLists.txt b/studio/src/plugins/core/CMakeLists.txt index fefecf5aca..6f8294fb38 100644 --- a/studio/src/plugins/core/CMakeLists.txt +++ b/studio/src/plugins/core/CMakeLists.txt @@ -44,9 +44,9 @@ ENDIF() SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS}) -QT4_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR}) -QT4_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS}) +QT5_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS}) +QT5_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR}) +QT5_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_CORE_PLUGIN_UIS} ${OVQT_CORE_PLUGIN_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_CORE_PLUGIN_UI_HDRS}) @@ -62,7 +62,7 @@ NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core") NL_ADD_RUNTIME_FLAGS(studio_plugin_core) NL_ADD_LIB_SUFFIX(studio_plugin_core) -ADD_DEFINITIONS(-DCORE_LIBRARY -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) +ADD_DEFINITIONS(-DCORE_LIBRARY -DQT_PLUGIN -DQT_SHARED -DMESA_GL_NO_X11_HEADERS ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) diff --git a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp index 80e5a8db84..1905e3c7ef 100644 --- a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp +++ b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp @@ -17,6 +17,9 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +// needs to be included before x11 due to some collisions +#include + #include "nel3d_widget.h" #include "nel/3d/u_driver.h" #include "nel/3d/text_context.h" @@ -28,8 +31,6 @@ #include #endif -#include - Nel3DWidget::Nel3DWidget( QWidget *parent ) : NEL3DWIDGET( parent ) { diff --git a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h index 27b6dd84cf..3f72942a2e 100644 --- a/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h +++ b/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h @@ -36,9 +36,12 @@ #define NEL3DWIDGET QGLWidget #endif - #include "../core_global.h" +#ifdef NL_OS_UNIX +#include +#endif + namespace NL3D { class UDriver; diff --git a/studio/src/plugins/core/context_manager.cpp b/studio/src/plugins/core/context_manager.cpp index a44cb41e4b..a3124e1cdb 100644 --- a/studio/src/plugins/core/context_manager.cpp +++ b/studio/src/plugins/core/context_manager.cpp @@ -27,8 +27,8 @@ #include // Qt includes -#include -#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/core.json b/studio/src/plugins/core/core.json new file mode 100644 index 0000000000..d453d851c9 --- /dev/null +++ b/studio/src/plugins/core/core.json @@ -0,0 +1,6 @@ +{ + "Name" : "Core", + "Version" : "0.8", + "Vendor": "Ryzom Core", + "Description": "Core plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/core/core_plugin.cpp b/studio/src/plugins/core/core_plugin.cpp index 1d7ebf47c2..7693fc95f7 100644 --- a/studio/src/plugins/core/core_plugin.cpp +++ b/studio/src/plugins/core/core_plugin.cpp @@ -31,11 +31,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include using namespace Core; @@ -103,5 +103,3 @@ void CorePlugin::addAutoReleasedObject(QObject *obj) m_plugMan->addObject(obj); m_autoReleaseObjects.prepend(obj); } - -Q_EXPORT_PLUGIN(CorePlugin) diff --git a/studio/src/plugins/core/core_plugin.h b/studio/src/plugins/core/core_plugin.h index aeddb967bd..c673165bf5 100644 --- a/studio/src/plugins/core/core_plugin.h +++ b/studio/src/plugins/core/core_plugin.h @@ -44,6 +44,7 @@ namespace Core class CorePlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "core.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/core/general_settings_page.cpp b/studio/src/plugins/core/general_settings_page.cpp index af2ede1b79..a46bc49da2 100644 --- a/studio/src/plugins/core/general_settings_page.cpp +++ b/studio/src/plugins/core/general_settings_page.cpp @@ -29,11 +29,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/studio/src/plugins/core/main_window.cpp b/studio/src/plugins/core/main_window.cpp index 95b3e2320e..3939a1dadc 100644 --- a/studio/src/plugins/core/main_window.cpp +++ b/studio/src/plugins/core/main_window.cpp @@ -33,8 +33,11 @@ // Qt includes #include -#include -#include +#include +#include +#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/main_window.h b/studio/src/plugins/core/main_window.h index ba31aece4e..706e67a348 100644 --- a/studio/src/plugins/core/main_window.h +++ b/studio/src/plugins/core/main_window.h @@ -28,9 +28,9 @@ // STL includes // Qt includes -#include -#include -#include +#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/menu_manager.h b/studio/src/plugins/core/menu_manager.h index afcc88facf..4f2c3a1beb 100644 --- a/studio/src/plugins/core/menu_manager.h +++ b/studio/src/plugins/core/menu_manager.h @@ -28,9 +28,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace Core { diff --git a/studio/src/plugins/core/plugin_view_dialog.cpp b/studio/src/plugins/core/plugin_view_dialog.cpp index 76cbc828e4..e1d43bd3c8 100644 --- a/studio/src/plugins/core/plugin_view_dialog.cpp +++ b/studio/src/plugins/core/plugin_view_dialog.cpp @@ -26,8 +26,8 @@ // Qt includes #include #include -#include -#include +#include +#include #include #include diff --git a/studio/src/plugins/core/search_paths_settings_page.cpp b/studio/src/plugins/core/search_paths_settings_page.cpp index 918b58a7c7..df4f1547ec 100644 --- a/studio/src/plugins/core/search_paths_settings_page.cpp +++ b/studio/src/plugins/core/search_paths_settings_page.cpp @@ -28,8 +28,8 @@ // Qt includes #include -#include -#include +#include +#include #if !defined NL_OS_WINDOWS #include "core_config.h" diff --git a/studio/src/plugins/core/settings_dialog.cpp b/studio/src/plugins/core/settings_dialog.cpp index b0cc329646..39c2432fb1 100644 --- a/studio/src/plugins/core/settings_dialog.cpp +++ b/studio/src/plugins/core/settings_dialog.cpp @@ -23,8 +23,8 @@ #include "ioptions_page.h" // Qt includes -#include -#include +#include +#include struct PageData { diff --git a/studio/src/plugins/disp_sheet_id/CMakeLists.txt b/studio/src/plugins/disp_sheet_id/CMakeLists.txt index ffccb97b35..bdedf5dc79 100644 --- a/studio/src/plugins/disp_sheet_id/CMakeLists.txt +++ b/studio/src/plugins/disp_sheet_id/CMakeLists.txt @@ -17,8 +17,8 @@ SET(OVQT_DISP_SHEET_ID_PLUGIN_UIS SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC ${OVQT_DISP_SHEET_ID_PLUGIN_HDR}) -QT4_WRAP_UI(OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS ${OVQT_DISP_SHEET_ID_PLUGIN_UIS}) +QT5_WRAP_CPP(OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC ${OVQT_DISP_SHEET_ID_PLUGIN_HDR}) +QT5_WRAP_UI(OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS ${OVQT_DISP_SHEET_ID_PLUGIN_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC}) diff --git a/studio/src/plugins/example/CMakeLists.txt b/studio/src/plugins/example/CMakeLists.txt index 6b7e86962b..5c35f32bcd 100644 --- a/studio/src/plugins/example/CMakeLists.txt +++ b/studio/src/plugins/example/CMakeLists.txt @@ -18,8 +18,8 @@ SET(OVQT_PLUG_EXAMPLE_UIS example_settings_page.ui) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_EXAMPLE_MOC_SRC ${OVQT_PLUG_EXAMPLE_HDR}) -QT4_WRAP_UI(OVQT_PLUG_EXAMPLE_UI_HDRS ${OVQT_PLUG_EXAMPLE_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_EXAMPLE_MOC_SRC ${OVQT_PLUG_EXAMPLE_HDR}) +QT5_WRAP_UI(OVQT_PLUG_EXAMPLE_UI_HDRS ${OVQT_PLUG_EXAMPLE_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_EXAMPLE_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_EXAMPLE_UI_HDRS}) diff --git a/studio/src/plugins/georges_editor/CMakeLists.txt b/studio/src/plugins/georges_editor/CMakeLists.txt index abe7eb3edd..b49b6d1d35 100644 --- a/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/studio/src/plugins/georges_editor/CMakeLists.txt @@ -38,9 +38,9 @@ SET(OVQT_PLUGIN_GEORGES_EDITOR_RCS georges_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS ${OVQT_PLUGIN_GEORGES_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUG_GEORGES_EDITOR_MOC_SRC ${OVQT_PLUG_GEORGES_EDITOR_HDR}) -QT4_WRAP_UI( OVQT_PLUG_GEORGES_EDITOR_UI_HDRS ${OVQT_PLUG_GEORGES_EDITOR_UIS} ) +QT5_ADD_RESOURCES(OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS ${OVQT_PLUGIN_GEORGES_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUG_GEORGES_EDITOR_MOC_SRC ${OVQT_PLUG_GEORGES_EDITOR_HDR}) +QT5_WRAP_UI( OVQT_PLUG_GEORGES_EDITOR_UI_HDRS ${OVQT_PLUG_GEORGES_EDITOR_UIS} ) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_GEORGES_EDITOR_UIS} ${OVQT_PLUGIN_GEORGES_EDITOR_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS}) diff --git a/studio/src/plugins/gui_editor/CMakeLists.txt b/studio/src/plugins/gui_editor/CMakeLists.txt index cdcd196127..9eb188eded 100644 --- a/studio/src/plugins/gui_editor/CMakeLists.txt +++ b/studio/src/plugins/gui_editor/CMakeLists.txt @@ -64,9 +64,9 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_GUI_EDITOR_RC_SRCS ${OVQT_PLUGIN_GUI_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUGIN_GUI_EDITOR_MOC_SRC ${OVQT_PLUGIN_GUI_EDITOR_HDR}) -QT4_WRAP_UI(OVQT_PLUGIN_GUI_EDITOR_UI_HDRS ${OVQT_PLUGIN_GUI_EDITOR_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_GUI_EDITOR_RC_SRCS ${OVQT_PLUGIN_GUI_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUGIN_GUI_EDITOR_MOC_SRC ${OVQT_PLUGIN_GUI_EDITOR_HDR}) +QT5_WRAP_UI(OVQT_PLUGIN_GUI_EDITOR_UI_HDRS ${OVQT_PLUGIN_GUI_EDITOR_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUGIN_GUI_EDITOR_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUGIN_GUI_EDITOR_UI_HDRS}) diff --git a/studio/src/plugins/landscape_editor/CMakeLists.txt b/studio/src/plugins/landscape_editor/CMakeLists.txt index fe5a558307..c917f23ef6 100644 --- a/studio/src/plugins/landscape_editor/CMakeLists.txt +++ b/studio/src/plugins/landscape_editor/CMakeLists.txt @@ -30,9 +30,9 @@ SET(OVQT_PLUGIN_LANDSCAPE_EDITOR_RCS landscape_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_LANDSCAPE_EDITOR_RC_SRCS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUGIN_LANDSCAPE_EDITOR_MOC_SRC ${OVQT_PLUGIN_LANDSCAPE_EDITOR_HDR}) -QT4_WRAP_UI(OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_LANDSCAPE_EDITOR_RC_SRCS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUGIN_LANDSCAPE_EDITOR_MOC_SRC ${OVQT_PLUGIN_LANDSCAPE_EDITOR_HDR}) +QT5_WRAP_UI(OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS}) diff --git a/studio/src/plugins/log/CMakeLists.txt b/studio/src/plugins/log/CMakeLists.txt index 9b042a3f3d..bb2b81d5ea 100644 --- a/studio/src/plugins/log/CMakeLists.txt +++ b/studio/src/plugins/log/CMakeLists.txt @@ -14,8 +14,8 @@ SET(OVQT_PLUG_LOG_UIS log_form.ui SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_LOG_MOC_SRC ${OVQT_PLUG_LOG_HDR}) -QT4_WRAP_UI( OVQT_PLUG_LOG_UI_HDRS ${OVQT_PLUG_LOG_UIS} ) +QT5_WRAP_CPP(OVQT_PLUG_LOG_MOC_SRC ${OVQT_PLUG_LOG_HDR}) +QT5_WRAP_UI( OVQT_PLUG_LOG_UI_HDRS ${OVQT_PLUG_LOG_UIS} ) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_LOG_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_LOG_UI_HDRS}) diff --git a/studio/src/plugins/mission_compiler/CMakeLists.txt b/studio/src/plugins/mission_compiler/CMakeLists.txt index a3748d559d..7a5a3da4d0 100644 --- a/studio/src/plugins/mission_compiler/CMakeLists.txt +++ b/studio/src/plugins/mission_compiler/CMakeLists.txt @@ -19,9 +19,9 @@ SET(OVQT_PLUG_MISSION_COMPILER_RCS mission_compiler.qrc) SET(QT_USE_QTGUI TRUE) -QT4_WRAP_CPP(OVQT_PLUG_MISSION_COMPILER_MOC_SRC ${OVQT_PLUG_MISSION_COMPILER_HDR}) -QT4_ADD_RESOURCES( OVQT_PLUG_MISSION_COMPILER_RC_SRCS ${OVQT_PLUG_MISSION_COMPILER_RCS}) -QT4_WRAP_UI(OVQT_PLUG_MISSION_COMPILER_UI_HDRS ${OVQT_PLUG_MISSION_COMPILER_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_MISSION_COMPILER_MOC_SRC ${OVQT_PLUG_MISSION_COMPILER_HDR}) +QT5_ADD_RESOURCES( OVQT_PLUG_MISSION_COMPILER_RC_SRCS ${OVQT_PLUG_MISSION_COMPILER_RCS}) +QT5_WRAP_UI(OVQT_PLUG_MISSION_COMPILER_UI_HDRS ${OVQT_PLUG_MISSION_COMPILER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_MISSION_COMPILER_UIS} ${OVQT_PLUG_MISSION_COMPILER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) diff --git a/studio/src/plugins/object_viewer/CMakeLists.txt b/studio/src/plugins/object_viewer/CMakeLists.txt index 4cc41d1574..ed2be87f8c 100644 --- a/studio/src/plugins/object_viewer/CMakeLists.txt +++ b/studio/src/plugins/object_viewer/CMakeLists.txt @@ -149,9 +149,9 @@ SET(OBJECT_VIEWER_PLUGIN_RCS object_viewer.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OBJECT_VIEWER_PLUGIN_RC_SRCS ${OBJECT_VIEWER_PLUGIN_RCS}) -QT4_WRAP_CPP(OBJECT_VIEWER_PLUGIN_MOC_SRC ${OBJECT_VIEWER_PLUGIN_QT_HDR}) -QT4_WRAP_UI(OBJECT_VIEWER_PLUGIN_UI_HDRS ${OBJECT_VIEWER_PLUGIN_UIS}) +QT5_ADD_RESOURCES(OBJECT_VIEWER_PLUGIN_RC_SRCS ${OBJECT_VIEWER_PLUGIN_RCS}) +QT5_WRAP_CPP(OBJECT_VIEWER_PLUGIN_MOC_SRC ${OBJECT_VIEWER_PLUGIN_QT_HDR}) +QT5_WRAP_UI(OBJECT_VIEWER_PLUGIN_UI_HDRS ${OBJECT_VIEWER_PLUGIN_UIS}) SOURCE_GROUP(QtResources FILES ${OBJECT_VIEWER_PLUGIN_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OBJECT_VIEWER_PLUGIN_UI_HDRS}) diff --git a/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt index 07e16b4fcf..607d1c5295 100644 --- a/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ b/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -12,7 +12,7 @@ SET(OVQT_PLUG_SHEET_BUILDER_HDR sheetbuilderconfgdialog.h sheetbuilderdialog.h o SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_SHEET_BUILDER_MOC_SRC ${OVQT_PLUG_SHEET_BUILDER_HDR}) +QT5_WRAP_CPP(OVQT_PLUG_SHEET_BUILDER_MOC_SRC ${OVQT_PLUG_SHEET_BUILDER_HDR}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC}) SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC}) diff --git a/studio/src/plugins/tile_editor/CMakeLists.txt b/studio/src/plugins/tile_editor/CMakeLists.txt index 85d6ea737d..f8e5645c0b 100644 --- a/studio/src/plugins/tile_editor/CMakeLists.txt +++ b/studio/src/plugins/tile_editor/CMakeLists.txt @@ -22,9 +22,9 @@ SET(OVQT_PLUG_TILE_EDITOR_RCS tile_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_TILE_EDITOR_PLUGIN_MOC_SRC ${OVQT_TILE_EDITOR_PLUGIN_HDR}) -QT4_ADD_RESOURCES( OVQT_PLUG_TILE_EDITOR_RC_SRCS ${OVQT_PLUG_TILE_EDITOR_RCS}) -QT4_WRAP_UI(OVQT_TILE_EDITOR_PLUGIN_UI_HDRS ${OVQT_TILE_EDITOR_PLUGIN_UIS}) +QT5_WRAP_CPP(OVQT_TILE_EDITOR_PLUGIN_MOC_SRC ${OVQT_TILE_EDITOR_PLUGIN_HDR}) +QT5_ADD_RESOURCES( OVQT_PLUG_TILE_EDITOR_RC_SRCS ${OVQT_PLUG_TILE_EDITOR_RCS}) +QT5_WRAP_UI(OVQT_TILE_EDITOR_PLUGIN_UI_HDRS ${OVQT_TILE_EDITOR_PLUGIN_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_TILE_EDITOR_PLUGIN_UI_HDRS}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_TILE_EDITOR_PLUGIN_MOC_SRC} ${OVQT_PLUG_TILE_EDITOR_RC_SRCS}) diff --git a/studio/src/plugins/translation_manager/CMakeLists.txt b/studio/src/plugins/translation_manager/CMakeLists.txt index 62b60f9304..059f4d5556 100644 --- a/studio/src/plugins/translation_manager/CMakeLists.txt +++ b/studio/src/plugins/translation_manager/CMakeLists.txt @@ -29,8 +29,8 @@ SET(OVQT_PLUG_TRANSLATION_MANAGER_RCS ftp_selection.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTNETWORK TRUE) -QT4_WRAP_CPP(OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC ${OVQT_PLUG_TRANSLATION_MANAGER_HDR}) -QT4_WRAP_UI(OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC ${OVQT_PLUG_TRANSLATION_MANAGER_HDR}) +QT5_WRAP_UI(OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_TRANSLATION_MANAGER_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) diff --git a/studio/src/plugins/world_editor/CMakeLists.txt b/studio/src/plugins/world_editor/CMakeLists.txt index 8b4586a1f8..15f22710a2 100644 --- a/studio/src/plugins/world_editor/CMakeLists.txt +++ b/studio/src/plugins/world_editor/CMakeLists.txt @@ -36,9 +36,9 @@ SET(OVQT_PLUGIN_WORLD_EDITOR_RCS world_editor.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_ADD_RESOURCES(OVQT_PLUGIN_WORLD_EDITOR_RC_SRCS ${OVQT_PLUGIN_WORLD_EDITOR_RCS}) -QT4_WRAP_CPP(OVQT_PLUGIN_WORLD_EDITOR_MOC_SRC ${OVQT_PLUGIN_WORLD_EDITOR_HDR}) -QT4_WRAP_UI(OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS ${OVQT_PLUGIN_WORLD_EDITOR_UIS}) +QT5_ADD_RESOURCES(OVQT_PLUGIN_WORLD_EDITOR_RC_SRCS ${OVQT_PLUGIN_WORLD_EDITOR_RCS}) +QT5_WRAP_CPP(OVQT_PLUGIN_WORLD_EDITOR_MOC_SRC ${OVQT_PLUGIN_WORLD_EDITOR_HDR}) +QT5_WRAP_UI(OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS ${OVQT_PLUGIN_WORLD_EDITOR_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUGIN_WORLD_EDITOR_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS}) From 0469951203ab7b1e80b4cf128bbcc30609b9fc00 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 15:12:15 +0100 Subject: [PATCH 02/28] migrate studio bnp manager plugin to qt5 add studio plugins as dependency to studio to make them load --- studio/src/CMakeLists.txt | 1 + studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp | 1 - studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h | 1 - studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp | 5 ++--- studio/src/plugins/bnp_manager/bnp_filelist_dialog.h | 1 - studio/src/plugins/bnp_manager/bnp_filesystem_model.h | 2 +- studio/src/plugins/bnp_manager/bnp_manager.json | 6 ++++++ studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp | 4 +--- studio/src/plugins/bnp_manager/bnp_manager_plugin.h | 1 + studio/src/plugins/bnp_manager/bnp_manager_window.h | 8 ++++---- 10 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 studio/src/plugins/bnp_manager/bnp_manager.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index efbd6a476b..7d95985b19 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -55,5 +55,6 @@ NL_DEFAULT_PROPS(studio "Tools: Studio") NL_ADD_RUNTIME_FLAGS(studio) ADD_SUBDIRECTORY(plugins) +add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp index 1ddb25df1e..702e2ca1d3 100644 --- a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp +++ b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp @@ -20,7 +20,6 @@ #include "bnp_proxy_model.h" // Qt includes -#include // NeL includes #include diff --git a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h index a4ca1850e1..9abcb65937 100644 --- a/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h +++ b/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h @@ -18,7 +18,6 @@ #define BNP_DIRTREE_DIALOG_H // Qt includes -#include // STL includes diff --git a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp index 1efa6aab06..2175b6445e 100644 --- a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp +++ b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp @@ -19,7 +19,6 @@ #include "bnp_file.h" // Qt includes -#include // NeL includes #include @@ -60,8 +59,8 @@ void BnpFileListDialog::setupTable(int nbrows) labels << tr("Filename") << tr("Size"); m_ui.tableWidget->setHorizontalHeaderLabels(labels); - m_ui.tableWidget->horizontalHeader()->setResizeMode(0, QHeaderView::Interactive); - m_ui.tableWidget->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch ); + m_ui.tableWidget->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Interactive); + m_ui.tableWidget->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch ); m_ui.tableWidget->verticalHeader()->hide(); // set vertical size a little bit smaller diff --git a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h index fa1dff7c85..b9201f165f 100644 --- a/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h +++ b/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h @@ -18,7 +18,6 @@ #define BNP_FILELIST_DIALOG_H // Qt includes -#include // STL includes #include diff --git a/studio/src/plugins/bnp_manager/bnp_filesystem_model.h b/studio/src/plugins/bnp_manager/bnp_filesystem_model.h index dabd33bd68..abf92e7ebf 100644 --- a/studio/src/plugins/bnp_manager/bnp_filesystem_model.h +++ b/studio/src/plugins/bnp_manager/bnp_filesystem_model.h @@ -17,7 +17,7 @@ #ifndef BNP_FILESYSTEM_MODEL_H #define BNP_FILESYSTEM_MODEL_H -#include +#include namespace BNPManager { diff --git a/studio/src/plugins/bnp_manager/bnp_manager.json b/studio/src/plugins/bnp_manager/bnp_manager.json new file mode 100644 index 0000000000..69f124b567 --- /dev/null +++ b/studio/src/plugins/bnp_manager/bnp_manager.json @@ -0,0 +1,6 @@ +{ + "Name" : "BNPManager", + "Version" : "0.1", + "Vendor": "Krolock", + "Description": "Edit BNP Files" +} \ No newline at end of file diff --git a/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp b/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp index 8941410d82..36954670f5 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp +++ b/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp @@ -30,7 +30,7 @@ // Qt includes #include -#include +#include namespace BNPManager { @@ -91,5 +91,3 @@ void BNPManagerPlugin::addAutoReleasedObject(QObject *obj) m_BnpManagerWindow->open(); }*/ } - -Q_EXPORT_PLUGIN(BNPManager::BNPManagerPlugin) diff --git a/studio/src/plugins/bnp_manager/bnp_manager_plugin.h b/studio/src/plugins/bnp_manager/bnp_manager_plugin.h index 4736a4b99f..922c131a9d 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_plugin.h +++ b/studio/src/plugins/bnp_manager/bnp_manager_plugin.h @@ -47,6 +47,7 @@ class m_BnpManagerWindow; class BNPManagerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "bnp_manager.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/bnp_manager/bnp_manager_window.h b/studio/src/plugins/bnp_manager/bnp_manager_window.h index 887394b00d..4b6d160cb4 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_window.h +++ b/studio/src/plugins/bnp_manager/bnp_manager_window.h @@ -21,10 +21,10 @@ //#include "ui_bnp_manager_window.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace BNPManager From b28e9b82d2f4c4e9e7db3419fdb494b7e9cfeab9 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 15:20:34 +0100 Subject: [PATCH 03/28] migrate studio display sheet id plugin to qt5 --- studio/src/CMakeLists.txt | 2 +- studio/src/plugins/bnp_manager/bnp_manager_plugin.h | 2 +- .../{bnp_manager.json => plugin-metadata.json} | 0 studio/src/plugins/core/core_plugin.h | 2 +- .../plugins/core/{core.json => plugin-metadata.json} | 0 .../plugins/disp_sheet_id/disp_sheet_id_plugin.cpp | 12 +++++------- .../src/plugins/disp_sheet_id/disp_sheet_id_plugin.h | 1 + .../src/plugins/disp_sheet_id/plugin-metadata.json | 6 ++++++ studio/src/plugins/disp_sheet_id/sheet_id_view.cpp | 4 ++-- studio/src/plugins/disp_sheet_id/sheet_id_view.h | 2 +- 10 files changed, 18 insertions(+), 13 deletions(-) rename studio/src/plugins/bnp_manager/{bnp_manager.json => plugin-metadata.json} (100%) rename studio/src/plugins/core/{core.json => plugin-metadata.json} (100%) create mode 100644 studio/src/plugins/disp_sheet_id/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 7d95985b19..f821740b38 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -55,6 +55,6 @@ NL_DEFAULT_PROPS(studio "Tools: Studio") NL_ADD_RUNTIME_FLAGS(studio) ADD_SUBDIRECTORY(plugins) -add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core) +add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core studio_plugin_disp_sheet_id) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/plugins/bnp_manager/bnp_manager_plugin.h b/studio/src/plugins/bnp_manager/bnp_manager_plugin.h index 922c131a9d..df9c40203f 100644 --- a/studio/src/plugins/bnp_manager/bnp_manager_plugin.h +++ b/studio/src/plugins/bnp_manager/bnp_manager_plugin.h @@ -47,7 +47,7 @@ class m_BnpManagerWindow; class BNPManagerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID IPlugin_iid FILE "bnp_manager.json") + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/bnp_manager/bnp_manager.json b/studio/src/plugins/bnp_manager/plugin-metadata.json similarity index 100% rename from studio/src/plugins/bnp_manager/bnp_manager.json rename to studio/src/plugins/bnp_manager/plugin-metadata.json diff --git a/studio/src/plugins/core/core_plugin.h b/studio/src/plugins/core/core_plugin.h index c673165bf5..04feead5e6 100644 --- a/studio/src/plugins/core/core_plugin.h +++ b/studio/src/plugins/core/core_plugin.h @@ -44,7 +44,7 @@ namespace Core class CorePlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID IPlugin_iid FILE "core.json") + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/core/core.json b/studio/src/plugins/core/plugin-metadata.json similarity index 100% rename from studio/src/plugins/core/core.json rename to studio/src/plugins/core/plugin-metadata.json diff --git a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp index 7a5b110a6f..f5e3b0785a 100644 --- a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp +++ b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp @@ -26,11 +26,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // NeL includes #include "nel/misc/debug.h" @@ -87,5 +87,3 @@ void DispSheetIdPlugin::setNelContext(NLMISC::INelContext *nelContext) #endif // NL_OS_WINDOWS m_LibContext = new NLMISC::CLibraryContext(*nelContext); } - -Q_EXPORT_PLUGIN(DispSheetIdPlugin) diff --git a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h index a340637777..1c6105662a 100644 --- a/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h +++ b/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h @@ -38,6 +38,7 @@ namespace SheetIdViewPlugin class DispSheetIdPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/disp_sheet_id/plugin-metadata.json b/studio/src/plugins/disp_sheet_id/plugin-metadata.json new file mode 100644 index 0000000000..5a3b538d85 --- /dev/null +++ b/studio/src/plugins/disp_sheet_id/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "DisplaySheetId", + "Version" : "1.0", + "Vendor": "pemeon", + "Description": "Display sheet id." +} \ No newline at end of file diff --git a/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp b/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp index e27ef94059..6cd9f61afb 100644 --- a/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp +++ b/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp @@ -21,8 +21,8 @@ #include "nel/misc/path.h" -#include -#include +#include +#include class CPred { diff --git a/studio/src/plugins/disp_sheet_id/sheet_id_view.h b/studio/src/plugins/disp_sheet_id/sheet_id_view.h index ac5022328e..d28f4b06a1 100644 --- a/studio/src/plugins/disp_sheet_id/sheet_id_view.h +++ b/studio/src/plugins/disp_sheet_id/sheet_id_view.h @@ -25,7 +25,7 @@ #include "nel/misc/types_nl.h" #include "nel/misc/sheet_id.h" -#include +#include class SheetIdView : public QDialog { From b4bfea3f5cc59266c4af35f0af38394ba0c39b23 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 15:54:22 +0100 Subject: [PATCH 04/28] migrate studio example plugin to qt5 --- studio/src/CMakeLists.txt | 7 ++++++- studio/src/plugins/example/example_plugin.cpp | 20 +++++++++---------- studio/src/plugins/example/example_plugin.h | 1 + .../plugins/example/example_settings_page.cpp | 2 +- .../src/plugins/example/plugin-metadata.json | 6 ++++++ studio/src/plugins/example/qnel_widget.cpp | 8 ++++---- studio/src/plugins/example/qnel_widget.h | 3 ++- studio/src/plugins/example/simple_viewer.cpp | 6 +++--- studio/src/plugins/example/simple_viewer.h | 2 +- 9 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 studio/src/plugins/example/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index f821740b38..221bf8a8cd 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -55,6 +55,11 @@ NL_DEFAULT_PROPS(studio "Tools: Studio") NL_ADD_RUNTIME_FLAGS(studio) ADD_SUBDIRECTORY(plugins) -add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core studio_plugin_disp_sheet_id) +add_dependencies(studio + studio_plugin_bnp_manager + studio_plugin_core + studio_plugin_disp_sheet_id + studio_plugin_example +) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/plugins/example/example_plugin.cpp b/studio/src/plugins/example/example_plugin.cpp index cf13867c73..00dfbdbe7f 100644 --- a/studio/src/plugins/example/example_plugin.cpp +++ b/studio/src/plugins/example/example_plugin.cpp @@ -1,3 +1,13 @@ +// Qt includes +#include +#include +#include +#include +#include +#include +#include +#include + // Project includes #include "example_plugin.h" #include "example_settings_page.h" @@ -12,14 +22,6 @@ // NeL includes #include "nel/misc/debug.h" -// Qt includes -#include -#include -#include -#include -#include -#include - namespace Plugin { @@ -79,5 +81,3 @@ void ExamplePlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(Plugin::ExamplePlugin) \ No newline at end of file diff --git a/studio/src/plugins/example/example_plugin.h b/studio/src/plugins/example/example_plugin.h index bfb400651e..c2dbbc021d 100644 --- a/studio/src/plugins/example/example_plugin.h +++ b/studio/src/plugins/example/example_plugin.h @@ -24,6 +24,7 @@ namespace Plugin class ExamplePlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: ExamplePlugin(); diff --git a/studio/src/plugins/example/example_settings_page.cpp b/studio/src/plugins/example/example_settings_page.cpp index 8b12aea0b7..48820b6fb2 100644 --- a/studio/src/plugins/example/example_settings_page.cpp +++ b/studio/src/plugins/example/example_settings_page.cpp @@ -20,7 +20,7 @@ #include "example_settings_page.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/example/plugin-metadata.json b/studio/src/plugins/example/plugin-metadata.json new file mode 100644 index 0000000000..3ffefbc7b7 --- /dev/null +++ b/studio/src/plugins/example/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "ExamplePlugin", + "Version" : "0.2", + "Vendor": "dnk-88", + "Description": "Example ovqt plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/example/qnel_widget.cpp b/studio/src/plugins/example/qnel_widget.cpp index d0821eb6ba..341d1dba4f 100644 --- a/studio/src/plugins/example/qnel_widget.cpp +++ b/studio/src/plugins/example/qnel_widget.cpp @@ -17,14 +17,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "qnel_widget.h" - -// STL includes - // Qt includes #include #include +#include "qnel_widget.h" + +// STL includes + // NeL includes #include #include diff --git a/studio/src/plugins/example/qnel_widget.h b/studio/src/plugins/example/qnel_widget.h index 795a0b7a75..48c6513b77 100644 --- a/studio/src/plugins/example/qnel_widget.h +++ b/studio/src/plugins/example/qnel_widget.h @@ -27,7 +27,7 @@ // Qt includes #include -#include +#include class QAction; @@ -38,6 +38,7 @@ typedef QWidget QNeLWidget; typedef QWidget QNeLWidget; #elif defined(NL_OS_UNIX) typedef QGLWidget QNeLWidget; +#include #endif // NL_OS_UNIX namespace NL3D diff --git a/studio/src/plugins/example/simple_viewer.cpp b/studio/src/plugins/example/simple_viewer.cpp index 89a5e88c8b..8b39eba83d 100644 --- a/studio/src/plugins/example/simple_viewer.cpp +++ b/studio/src/plugins/example/simple_viewer.cpp @@ -20,9 +20,9 @@ #include "simple_viewer.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes diff --git a/studio/src/plugins/example/simple_viewer.h b/studio/src/plugins/example/simple_viewer.h index d1a2a19e0a..b6bd3e0c3b 100644 --- a/studio/src/plugins/example/simple_viewer.h +++ b/studio/src/plugins/example/simple_viewer.h @@ -27,7 +27,7 @@ // Qt includes #include -#include +#include class QWidget; namespace Plugin From d5cb6759b44264f7e69c888343dc3acb0b309ea8 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 18:30:29 +0100 Subject: [PATCH 05/28] migrate studio georges editor plugin to qt5 --- CMakeModules/FindQtPropertyBrowser.cmake | 43 +++++++++++++++++++ studio/src/CMakeLists.txt | 3 +- .../src/plugins/georges_editor/CMakeLists.txt | 6 ++- studio/src/plugins/georges_editor/actions.cpp | 4 +- studio/src/plugins/georges_editor/actions.h | 2 +- .../plugins/georges_editor/browser_ctrl.cpp | 4 +- .../georges_editor/browser_ctrl_pvt.cpp | 7 +-- .../plugins/georges_editor/browser_ctrl_pvt.h | 1 + .../georges_editor/dfn_browser_ctrl.cpp | 8 ++-- .../filepath_property_manager.h | 2 +- .../georges_editor/georges_dfn_dialog.cpp | 2 + .../georges_editor/georges_dirtree_dialog.cpp | 2 +- .../georges_editor/georges_dirtree_dialog.h | 2 +- .../georges_editor/georges_dock_widget.cpp | 2 + .../georges_editor/georges_editor_form.cpp | 1 + .../georges_editor/georges_editor_form.h | 2 +- .../georges_editor/georges_editor_plugin.cpp | 2 - .../georges_editor/georges_editor_plugin.h | 1 + .../georges_editor/georges_filesystem_model.h | 2 +- .../georges_treeview_dialog.cpp | 17 ++++---- .../georges_editor/georges_treeview_dialog.h | 6 +-- .../georges_editor/georges_typ_dialog.cpp | 3 ++ .../georges_editor/georgesform_model.h | 1 + .../georges_editor/plugin-metadata.json | 6 +++ .../georges_editor/typ_browser_ctrl.cpp | 8 ++-- 25 files changed, 100 insertions(+), 37 deletions(-) create mode 100644 CMakeModules/FindQtPropertyBrowser.cmake create mode 100644 studio/src/plugins/georges_editor/plugin-metadata.json diff --git a/CMakeModules/FindQtPropertyBrowser.cmake b/CMakeModules/FindQtPropertyBrowser.cmake new file mode 100644 index 0000000000..27b0fefd9b --- /dev/null +++ b/CMakeModules/FindQtPropertyBrowser.cmake @@ -0,0 +1,43 @@ +# Locate QtPropertyBrowser library +# This module defines +# QtPropertyBrowser_FOUND, if false, do not try to link to QtPropertyBrowser +# QtPropertyBrowser_LIBRARY +# QtPropertyBrowser_INCLUDE_DIR, where to find qtpropertybrowser.h +# QtPropertyBrowser_DIR - Can be set to QtPropertyBrowser install path or Windows build path + +find_path(QtPropertyBrowser_INCLUDE_DIR qtpropertybrowser.h + HINTS ${QTPROPERTYBROWSER_DIR} + PATH_SUFFIXES include QtPropertyBrowser qtpropertybrowser + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt +) + +find_library(QtPropertyBrowser_LIBRARY + NAMES QtPropertyBrowser qtpropertybrowser + HINTS ${QTPROPERTYBROWSER_DIR} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt +) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set QtPropertyBrowser_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(QtPropertyBrowser DEFAULT_MSG QtPropertyBrowser_LIBRARY QtPropertyBrowser_INCLUDE_DIR) + +mark_as_advanced(QtPropertyBrowser_INCLUDE_DIR QtPropertyBrowser_LIBRARY) + diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 221bf8a8cd..930cfda5ca 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -1,4 +1,4 @@ -ADD_SUBDIRECTORY(3rdparty) +#ADD_SUBDIRECTORY(3rdparty) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES}) @@ -60,6 +60,7 @@ add_dependencies(studio studio_plugin_core studio_plugin_disp_sheet_id studio_plugin_example + studio_plugin_georges_editor ) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/plugins/georges_editor/CMakeLists.txt b/studio/src/plugins/georges_editor/CMakeLists.txt index b49b6d1d35..c4925bccdf 100644 --- a/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/studio/src/plugins/georges_editor/CMakeLists.txt @@ -1,8 +1,10 @@ +FIND_PACKAGE(QtPropertyBrowser REQUIRED) + INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} ${LIBXML2_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser) + ${QtPropertyBrowser_INCLUDE_DIR}) FILE(GLOB SRC *.cpp *.h) SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h @@ -50,7 +52,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) ADD_LIBRARY(studio_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS}) -TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qt_property_browser ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges ${QtPropertyBrowser_LIBRARY} ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) NL_DEFAULT_PROPS(studio_plugin_georges_editor "Tools: Studio Plugin: Georges Editor") NL_ADD_RUNTIME_FLAGS(studio_plugin_georges_editor) diff --git a/studio/src/plugins/georges_editor/actions.cpp b/studio/src/plugins/georges_editor/actions.cpp index 54819dc18d..82e6d345b9 100644 --- a/studio/src/plugins/georges_editor/actions.cpp +++ b/studio/src/plugins/georges_editor/actions.cpp @@ -98,8 +98,8 @@ namespace GeorgesQt value = m_oldValue; - array->Elements[m_item->structId()].Name = value.toAscii().data(); - m_item->setName(value.toAscii().data()); + array->Elements[m_item->structId()].Name = value.toLatin1().data(); + m_item->setName(value.toLatin1().data()); m_model->emitDataChanged(m_model->index(m_item->row(), 0, m_item)); } diff --git a/studio/src/plugins/georges_editor/actions.h b/studio/src/plugins/georges_editor/actions.h index 019316e583..3231c3beee 100644 --- a/studio/src/plugins/georges_editor/actions.h +++ b/studio/src/plugins/georges_editor/actions.h @@ -20,7 +20,7 @@ #ifndef ACTIONS_H #define ACTIONS_H -#include +#include #include namespace GeorgesQt diff --git a/studio/src/plugins/georges_editor/browser_ctrl.cpp b/studio/src/plugins/georges_editor/browser_ctrl.cpp index 4d93556f42..f632814e43 100644 --- a/studio/src/plugins/georges_editor/browser_ctrl.cpp +++ b/studio/src/plugins/georges_editor/browser_ctrl.cpp @@ -20,8 +20,8 @@ #include "browser_ctrl.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" +#include +#include #include "filepath_property_manager.h" #include diff --git a/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp b/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp index 3abf3f9881..62f9084fd6 100644 --- a/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp +++ b/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp @@ -19,9 +19,10 @@ // along with this program. If not, see . #include "browser_ctrl_pvt.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" +#include +#include #include +#include #include "formitem.h" #include "nel/georges/form.h" @@ -517,7 +518,7 @@ void BrowserCtrlPvt::onArrayValueChanged( QtProperty *p, const QVariant &value ) void BrowserCtrlPvt::onAtomValueChanged( QtProperty *p, const QVariant &value ) { NLGEORGES::CFormElmAtom *atom = static_cast< NLGEORGES::CFormElmAtom* >( getCurrentNode() ); - atom->setValue( value.toString().toUtf8() ); + atom->setValue( value.toString().toUtf8().constData() ); Q_EMIT modified(); Q_EMIT valueChanged( m_currentNode.name, value.toString() ); diff --git a/studio/src/plugins/georges_editor/browser_ctrl_pvt.h b/studio/src/plugins/georges_editor/browser_ctrl_pvt.h index 704e63b0c2..d0ec984ab8 100644 --- a/studio/src/plugins/georges_editor/browser_ctrl_pvt.h +++ b/studio/src/plugins/georges_editor/browser_ctrl_pvt.h @@ -19,6 +19,7 @@ #define BROWSER_CTRL_PVT_H #include +#include namespace NLGEORGES { diff --git a/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp b/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp index ed992f7d36..d71909ce0e 100644 --- a/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp +++ b/studio/src/plugins/georges_editor/dfn_browser_ctrl.cpp @@ -16,10 +16,10 @@ // along with this program. If not, see . #include "dfn_browser_ctrl.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" -#include "3rdparty/qtpropertybrowser/qteditorfactory.h" -#include "3rdparty/qtpropertybrowser/qtpropertymanager.h" +#include +#include +#include +#include #include "filepath_property_manager.h" diff --git a/studio/src/plugins/georges_editor/filepath_property_manager.h b/studio/src/plugins/georges_editor/filepath_property_manager.h index 88cc9c31c0..c3700fe3ba 100644 --- a/studio/src/plugins/georges_editor/filepath_property_manager.h +++ b/studio/src/plugins/georges_editor/filepath_property_manager.h @@ -21,7 +21,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT #include -#include <3rdparty/qtpropertybrowser/qtpropertymanager.h> +#include /////////////////////////////////////////////////////////////////////// Manager ///////////////////////////////////////////////////////////////// diff --git a/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp b/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp index 7b0b180567..b86176beaf 100644 --- a/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_dfn_dialog.cpp @@ -18,6 +18,7 @@ #include "georges_dfn_dialog.h" #include #include +#include #include "georges.h" #include "dfn_browser_ctrl.h" @@ -25,6 +26,7 @@ #include "nel/misc/file.h" #include "nel/misc/o_xml.h" #include "nel/misc/path.h" +#include "nel/georges/form_dfn.h" class GeorgesDFNDialogPvt { diff --git a/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp b/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp index 9599aa3737..6a0c9b348a 100644 --- a/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp @@ -23,7 +23,7 @@ #include "georges_dirtree_dialog.h" // Qt includes -#include +#include #include // NeL includes diff --git a/studio/src/plugins/georges_editor/georges_dirtree_dialog.h b/studio/src/plugins/georges_editor/georges_dirtree_dialog.h index 106f69a012..974a555cde 100644 --- a/studio/src/plugins/georges_editor/georges_dirtree_dialog.h +++ b/studio/src/plugins/georges_editor/georges_dirtree_dialog.h @@ -21,7 +21,7 @@ #define GEORGES_DIRTREE_DIALOG_H // Qt includes -#include +#include // STL includes diff --git a/studio/src/plugins/georges_editor/georges_dock_widget.cpp b/studio/src/plugins/georges_editor/georges_dock_widget.cpp index f301db0f88..30697af0f0 100644 --- a/studio/src/plugins/georges_editor/georges_dock_widget.cpp +++ b/studio/src/plugins/georges_editor/georges_dock_widget.cpp @@ -17,6 +17,8 @@ #include "georges_dock_widget.h" #include +#include +#include GeorgesDockWidget::GeorgesDockWidget( QWidget *parent ) : QDockWidget( parent ) diff --git a/studio/src/plugins/georges_editor/georges_editor_form.cpp b/studio/src/plugins/georges_editor/georges_editor_form.cpp index 89d8dfd197..56cf439088 100644 --- a/studio/src/plugins/georges_editor/georges_editor_form.cpp +++ b/studio/src/plugins/georges_editor/georges_editor_form.cpp @@ -41,6 +41,7 @@ #include #include #include +#include namespace GeorgesQt { diff --git a/studio/src/plugins/georges_editor/georges_editor_form.h b/studio/src/plugins/georges_editor/georges_editor_form.h index a1d33e65eb..c90bd86200 100644 --- a/studio/src/plugins/georges_editor/georges_editor_form.h +++ b/studio/src/plugins/georges_editor/georges_editor_form.h @@ -25,7 +25,7 @@ #include "ui_georges_editor_form.h" // Qt includes -#include +#include class GeorgesDockWidget; diff --git a/studio/src/plugins/georges_editor/georges_editor_plugin.cpp b/studio/src/plugins/georges_editor/georges_editor_plugin.cpp index 8fa764a5ad..6de11d7a1f 100644 --- a/studio/src/plugins/georges_editor/georges_editor_plugin.cpp +++ b/studio/src/plugins/georges_editor/georges_editor_plugin.cpp @@ -109,5 +109,3 @@ QWidget *GeorgesEditorContext::widget() } } - -Q_EXPORT_PLUGIN(GeorgesQt::GeorgesEditorPlugin) \ No newline at end of file diff --git a/studio/src/plugins/georges_editor/georges_editor_plugin.h b/studio/src/plugins/georges_editor/georges_editor_plugin.h index 960cb943bb..2b39267e91 100644 --- a/studio/src/plugins/georges_editor/georges_editor_plugin.h +++ b/studio/src/plugins/georges_editor/georges_editor_plugin.h @@ -48,6 +48,7 @@ class GeorgesEditorForm; class GeorgesEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/georges_editor/georges_filesystem_model.h b/studio/src/plugins/georges_editor/georges_filesystem_model.h index 7d1e16cb14..43bb23e4d9 100644 --- a/studio/src/plugins/georges_editor/georges_filesystem_model.h +++ b/studio/src/plugins/georges_editor/georges_filesystem_model.h @@ -17,7 +17,7 @@ #ifndef GEORGES_FILESYSTEM_MODEL_H #define GEORGES_FILESYSTEM_MODEL_H -#include +#include #include namespace GeorgesQt diff --git a/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp b/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp index b6b6a8f92b..48ac5b3ef1 100644 --- a/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp @@ -22,11 +22,12 @@ #include "georges_treeview_dialog.h" // Qt includes -#include +#include #include #include #include #include +#include // NeL includes #include @@ -73,7 +74,7 @@ namespace GeorgesQt m_ui.setupUi(this); m_header = new ExpandableHeaderView(Qt::Horizontal, m_ui.treeView); m_ui.treeView->setHeader(m_header); - m_ui.treeView->header()->setResizeMode(QHeaderView::ResizeToContents); + m_ui.treeView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); m_ui.treeView->header()->setStretchLastSection(true); m_form = 0; @@ -126,7 +127,7 @@ namespace GeorgesQt NLGEORGES::CForm* CGeorgesTreeViewDialog::getFormByName(const QString formName) { - return (NLGEORGES::CForm *)m_georges->loadForm(formName.toAscii().data()); + return (NLGEORGES::CForm *)m_georges->loadForm(formName.toLatin1().data()); //else //{ // CForm *form = 0; @@ -171,7 +172,7 @@ namespace GeorgesQt m_form = form; // Retrieve a copy of the root definition. - NLGEORGES::CFormDfn *formDfn = dynamic_cast(m_georges->loadFormDfn(dfnName.toAscii().data())); + NLGEORGES::CFormDfn *formDfn = dynamic_cast(m_georges->loadFormDfn(dfnName.toLatin1().data())); // Next we'll use the root node to build a new form. NLGEORGES::CFormElmStruct *fes = dynamic_cast(getRootNode(0)); @@ -274,7 +275,7 @@ namespace GeorgesQt void CGeorgesTreeViewDialog::addParentForm(QString parentFormNm) { // Try to load the form - NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toAscii().data()); + NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toLatin1().data()); NLGEORGES::CForm *parentForm = dynamic_cast(uParentForm); NLGEORGES::CForm *mainForm = static_cast(m_form); @@ -288,11 +289,11 @@ namespace GeorgesQt if (parentForm->Elements.FormDfn == mainForm->Elements.FormDfn) { // This is the parent form selector - if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toAscii().data(), parentForm)) - nlwarning("Failed to add parent form: %s", parentFormNm.toAscii().data()); + if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toLatin1().data(), parentForm)) + nlwarning("Failed to add parent form: %s", parentFormNm.toLatin1().data()); else { - nlinfo("Successfullyadded parent form: %s", parentFormNm.toAscii().data()); + nlinfo("Successfullyadded parent form: %s", parentFormNm.toLatin1().data()); model->addParentForm(parentFormNm); } } diff --git a/studio/src/plugins/georges_editor/georges_treeview_dialog.h b/studio/src/plugins/georges_editor/georges_treeview_dialog.h index eea41c3872..122f56d6e0 100644 --- a/studio/src/plugins/georges_editor/georges_treeview_dialog.h +++ b/studio/src/plugins/georges_editor/georges_treeview_dialog.h @@ -26,9 +26,9 @@ #include "expandable_headerview.h" // Qt includes -#include -#include -#include +#include +#include +#include // STL includes diff --git a/studio/src/plugins/georges_editor/georges_typ_dialog.cpp b/studio/src/plugins/georges_editor/georges_typ_dialog.cpp index 666793c257..b0b2e11fbb 100644 --- a/studio/src/plugins/georges_editor/georges_typ_dialog.cpp +++ b/studio/src/plugins/georges_editor/georges_typ_dialog.cpp @@ -21,10 +21,13 @@ #include #include +#include #include "nel/misc/file.h" #include "nel/misc/o_xml.h" #include "nel/misc/path.h" +#include "nel/georges/u_type.h" +#include "nel/georges/type.h" class GeorgesTypDialogPvt { diff --git a/studio/src/plugins/georges_editor/georgesform_model.h b/studio/src/plugins/georges_editor/georgesform_model.h index 42bf9fad8f..291ab1e768 100644 --- a/studio/src/plugins/georges_editor/georgesform_model.h +++ b/studio/src/plugins/georges_editor/georgesform_model.h @@ -35,6 +35,7 @@ namespace NLGEORGES { class UForm; class CFormElmStruct; class CFormDfn; + class CFormElm; class CFormElmArray; } diff --git a/studio/src/plugins/georges_editor/plugin-metadata.json b/studio/src/plugins/georges_editor/plugin-metadata.json new file mode 100644 index 0000000000..defc0b3b8e --- /dev/null +++ b/studio/src/plugins/georges_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "GeorgesEditor", + "Version" : "0.4", + "Vendor": "aquiles", + "Description": "Tool to create and edit sheets or forms." +} \ No newline at end of file diff --git a/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp b/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp index 906135daea..14affe1b94 100644 --- a/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp +++ b/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp @@ -17,10 +17,10 @@ #include "typ_browser_ctrl.h" -#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" -#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" -#include "3rdparty/qtpropertybrowser/qtpropertymanager.h" -#include "3rdparty/qtpropertybrowser/qteditorfactory.h" +#include +#include +#include +#include #include "nel/georges/type.h" From 4a51dd1d7687768baa1b7d4cd94b3fa937fc323f Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 19:11:06 +0100 Subject: [PATCH 06/28] migrate studio landscape editor plugin to qt5 unfinished migration of studio world editor plugin to qt5 --- studio/src/CMakeLists.txt | 1 + .../src/plugins/landscape_editor/builder_zone.cpp | 4 ++-- studio/src/plugins/landscape_editor/builder_zone.h | 6 +++--- .../plugins/landscape_editor/builder_zone_base.cpp | 4 ++-- .../plugins/landscape_editor/builder_zone_base.h | 4 ++-- .../plugins/landscape_editor/landscape_actions.h | 6 +++--- .../landscape_editor/landscape_editor_plugin.cpp | 1 - .../landscape_editor/landscape_editor_plugin.h | 3 ++- .../landscape_editor/landscape_editor_window.cpp | 8 ++++---- .../landscape_editor/landscape_editor_window.h | 8 ++++---- .../plugins/landscape_editor/landscape_scene.cpp | 14 +++++++++----- .../src/plugins/landscape_editor/landscape_scene.h | 4 ++-- .../landscape_editor/landscape_scene_base.cpp | 6 +++--- .../landscape_editor/landscape_scene_base.h | 4 ++-- .../src/plugins/landscape_editor/landscape_view.h | 4 ++-- .../plugins/landscape_editor/list_zones_model.cpp | 2 +- .../plugins/landscape_editor/list_zones_model.h | 2 +- .../plugins/landscape_editor/list_zones_widget.cpp | 2 +- .../plugins/landscape_editor/pixmap_database.cpp | 8 ++++---- .../src/plugins/landscape_editor/pixmap_database.h | 2 +- .../plugins/landscape_editor/plugin-metadata.json | 6 ++++++ .../landscape_editor/project_settings_dialog.cpp | 4 ++-- .../plugins/landscape_editor/snapshot_dialog.cpp | 2 +- .../landscape_editor/zone_region_editor.cpp | 2 +- studio/src/plugins/world_editor/CMakeLists.txt | 4 ++-- .../world_editor/const_string_array_property.h | 2 +- .../src/plugins/world_editor/plugin-metadata.json | 6 ++++++ .../src/plugins/world_editor/primitives_view.cpp | 4 ++-- studio/src/plugins/world_editor/primitives_view.h | 8 ++++---- .../world_editor/project_settings_dialog.cpp | 4 ++-- .../plugins/world_editor/world_editor_actions.h | 8 ++++---- .../plugins/world_editor/world_editor_plugin.cpp | 2 -- .../src/plugins/world_editor/world_editor_plugin.h | 3 ++- .../plugins/world_editor/world_editor_scene.cpp | 6 +++--- .../src/plugins/world_editor/world_editor_scene.h | 2 +- .../world_editor/world_editor_scene_item.cpp | 2 +- .../plugins/world_editor/world_editor_scene_item.h | 10 +++++----- .../world_editor/world_editor_settings_page.cpp | 2 +- .../plugins/world_editor/world_editor_window.cpp | 6 +++--- .../src/plugins/world_editor/world_editor_window.h | 4 ++-- 40 files changed, 98 insertions(+), 82 deletions(-) create mode 100644 studio/src/plugins/landscape_editor/plugin-metadata.json create mode 100644 studio/src/plugins/world_editor/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 930cfda5ca..e6896d22c4 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -61,6 +61,7 @@ add_dependencies(studio studio_plugin_disp_sheet_id studio_plugin_example studio_plugin_georges_editor + studio_plugin_landscape_editor ) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/plugins/landscape_editor/builder_zone.cpp b/studio/src/plugins/landscape_editor/builder_zone.cpp index 8ed5121a49..b569f1485d 100644 --- a/studio/src/plugins/landscape_editor/builder_zone.cpp +++ b/studio/src/plugins/landscape_editor/builder_zone.cpp @@ -27,8 +27,8 @@ // Qt includes #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/builder_zone.h b/studio/src/plugins/landscape_editor/builder_zone.h index 7fde90e28f..fbf309a2bc 100644 --- a/studio/src/plugins/landscape_editor/builder_zone.h +++ b/studio/src/plugins/landscape_editor/builder_zone.h @@ -39,9 +39,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/builder_zone_base.cpp b/studio/src/plugins/landscape_editor/builder_zone_base.cpp index 0c0fd49cb2..416db4b122 100644 --- a/studio/src/plugins/landscape_editor/builder_zone_base.cpp +++ b/studio/src/plugins/landscape_editor/builder_zone_base.cpp @@ -28,8 +28,8 @@ // Qt includes #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/builder_zone_base.h b/studio/src/plugins/landscape_editor/builder_zone_base.h index 9e53551b5d..e2f7ebaba7 100644 --- a/studio/src/plugins/landscape_editor/builder_zone_base.h +++ b/studio/src/plugins/landscape_editor/builder_zone_base.h @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_actions.h b/studio/src/plugins/landscape_editor/landscape_actions.h index 9579417d08..523277c9ff 100644 --- a/studio/src/plugins/landscape_editor/landscape_actions.h +++ b/studio/src/plugins/landscape_editor/landscape_actions.h @@ -27,9 +27,9 @@ // NeL includes // Qt includes -#include -#include -#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp b/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp index b9078d0592..d28c303b5e 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp +++ b/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp @@ -103,4 +103,3 @@ QWidget *LandscapeEditorContext::widget() } } -Q_EXPORT_PLUGIN(LandscapeEditor::LandscapeEditorPlugin) diff --git a/studio/src/plugins/landscape_editor/landscape_editor_plugin.h b/studio/src/plugins/landscape_editor/landscape_editor_plugin.h index 5af2e64366..a4a4e695c2 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_plugin.h +++ b/studio/src/plugins/landscape_editor/landscape_editor_plugin.h @@ -27,7 +27,7 @@ // Qt includes #include -#include +#include namespace NLMISC { @@ -41,6 +41,7 @@ class LandscapeEditorWindow; class LandscapeEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/landscape_editor/landscape_editor_window.cpp b/studio/src/plugins/landscape_editor/landscape_editor_window.cpp index a7be907012..3a1b86ed1b 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_window.cpp +++ b/studio/src/plugins/landscape_editor/landscape_editor_window.cpp @@ -35,10 +35,10 @@ // Qt includes #include -#include -#include -#include -#include +#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_editor_window.h b/studio/src/plugins/landscape_editor/landscape_editor_window.h index b1ddd81ae7..a4d2c691ca 100644 --- a/studio/src/plugins/landscape_editor/landscape_editor_window.h +++ b/studio/src/plugins/landscape_editor/landscape_editor_window.h @@ -21,10 +21,10 @@ #include "ui_landscape_editor_window.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_scene.cpp b/studio/src/plugins/landscape_editor/landscape_scene.cpp index f877935b54..8aa3e5c851 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene.cpp +++ b/studio/src/plugins/landscape_editor/landscape_scene.cpp @@ -22,9 +22,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include namespace LandscapeEditor @@ -218,7 +218,9 @@ QGraphicsRectItem *LandscapeScene::createLayerBlackout(const NLLIGO::CZoneRegion void LandscapeScene::deleteItemZone(const ZonePosition &zonePos) { - QGraphicsItem *item = itemAt(zonePos.x * m_cellSize, abs(zonePos.y) * m_cellSize); + // ignore transform + QTransform viewportTransform; + QGraphicsItem *item = itemAt(zonePos.x * m_cellSize, abs(zonePos.y) * m_cellSize, viewportTransform); if ((item != 0) && (item->data(ZONE_NAME).toString() != QString(LAYER_BLACKOUT_NAME))) { removeItem(item); @@ -370,7 +372,9 @@ void LandscapeScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) bool LandscapeScene::checkUnderZone(const int posX, const int posY) { - QGraphicsItem *item = itemAt((posX * m_cellSize), abs(posY) * m_cellSize); + // ignore transform + QTransform viewportTransform; + QGraphicsItem *item = itemAt((posX * m_cellSize), abs(posY) * m_cellSize, viewportTransform); if (item != 0) { //if (item->data(ZONE_NAME) == QString(LAYER_BLACKOUT_NAME)) diff --git a/studio/src/plugins/landscape_editor/landscape_scene.h b/studio/src/plugins/landscape_editor/landscape_scene.h index 9d77fe7c47..0ad17ba10b 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene.h +++ b/studio/src/plugins/landscape_editor/landscape_scene.h @@ -29,8 +29,8 @@ #include // Qt includes -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_scene_base.cpp b/studio/src/plugins/landscape_editor/landscape_scene_base.cpp index d6d9b1d7ac..28c4334373 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene_base.cpp +++ b/studio/src/plugins/landscape_editor/landscape_scene_base.cpp @@ -22,9 +22,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/landscape_editor/landscape_scene_base.h b/studio/src/plugins/landscape_editor/landscape_scene_base.h index 2f13583ce8..82a23751e6 100644 --- a/studio/src/plugins/landscape_editor/landscape_scene_base.h +++ b/studio/src/plugins/landscape_editor/landscape_scene_base.h @@ -26,8 +26,8 @@ #include // Qt includes -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/landscape_view.h b/studio/src/plugins/landscape_editor/landscape_view.h index 2b20bf7490..9acf486e60 100644 --- a/studio/src/plugins/landscape_editor/landscape_view.h +++ b/studio/src/plugins/landscape_editor/landscape_view.h @@ -21,8 +21,8 @@ #include "landscape_editor_global.h" // Qt includes -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/list_zones_model.cpp b/studio/src/plugins/landscape_editor/list_zones_model.cpp index c0bfdba68b..ded79006f9 100644 --- a/studio/src/plugins/landscape_editor/list_zones_model.cpp +++ b/studio/src/plugins/landscape_editor/list_zones_model.cpp @@ -30,7 +30,7 @@ // Qt includes #include -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/list_zones_model.h b/studio/src/plugins/landscape_editor/list_zones_model.h index f8a85c03c4..4222799731 100644 --- a/studio/src/plugins/landscape_editor/list_zones_model.h +++ b/studio/src/plugins/landscape_editor/list_zones_model.h @@ -28,7 +28,7 @@ // Qt includes #include #include -#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/landscape_editor/list_zones_widget.cpp b/studio/src/plugins/landscape_editor/list_zones_widget.cpp index 389aa98d9c..fd67e0474c 100644 --- a/studio/src/plugins/landscape_editor/list_zones_widget.cpp +++ b/studio/src/plugins/landscape_editor/list_zones_widget.cpp @@ -32,7 +32,7 @@ #include // Qt includes -#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/landscape_editor/pixmap_database.cpp b/studio/src/plugins/landscape_editor/pixmap_database.cpp index 0f5426209b..72a1cb4fb3 100644 --- a/studio/src/plugins/landscape_editor/pixmap_database.cpp +++ b/studio/src/plugins/landscape_editor/pixmap_database.cpp @@ -27,10 +27,10 @@ // Qt includes #include -#include -#include -#include -#include +#include +#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/pixmap_database.h b/studio/src/plugins/landscape_editor/pixmap_database.h index c4c67aacff..08c315b880 100644 --- a/studio/src/plugins/landscape_editor/pixmap_database.h +++ b/studio/src/plugins/landscape_editor/pixmap_database.h @@ -26,7 +26,7 @@ // Qt includes #include #include -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/plugin-metadata.json b/studio/src/plugins/landscape_editor/plugin-metadata.json new file mode 100644 index 0000000000..b95ac5484e --- /dev/null +++ b/studio/src/plugins/landscape_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "LandscapeEditor", + "Version" : "0.8", + "Vendor": "GSoC2011_dnk-88", + "Description": "Landscape editor ovqt plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/landscape_editor/project_settings_dialog.cpp b/studio/src/plugins/landscape_editor/project_settings_dialog.cpp index 5bc8eeda9f..6d2f188750 100644 --- a/studio/src/plugins/landscape_editor/project_settings_dialog.cpp +++ b/studio/src/plugins/landscape_editor/project_settings_dialog.cpp @@ -26,8 +26,8 @@ // Qt includes #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/snapshot_dialog.cpp b/studio/src/plugins/landscape_editor/snapshot_dialog.cpp index b13ba791dc..386b9ae496 100644 --- a/studio/src/plugins/landscape_editor/snapshot_dialog.cpp +++ b/studio/src/plugins/landscape_editor/snapshot_dialog.cpp @@ -26,7 +26,7 @@ // Qt includes #include -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/landscape_editor/zone_region_editor.cpp b/studio/src/plugins/landscape_editor/zone_region_editor.cpp index d295fdf317..ff0807585b 100644 --- a/studio/src/plugins/landscape_editor/zone_region_editor.cpp +++ b/studio/src/plugins/landscape_editor/zone_region_editor.cpp @@ -27,7 +27,7 @@ #include // Qt includes -#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/world_editor/CMakeLists.txt b/studio/src/plugins/world_editor/CMakeLists.txt index 15f22710a2..772637070b 100644 --- a/studio/src/plugins/world_editor/CMakeLists.txt +++ b/studio/src/plugins/world_editor/CMakeLists.txt @@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} ${LIBXML2_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser + ${QtPropertyBrowser_INCLUDE_DIR} ) FILE(GLOB SRC *.cpp *.h) @@ -57,7 +57,7 @@ TARGET_LINK_LIBRARIES( studio_plugin_world_editor studio_plugin_landscape_editor nelmisc nel3d - qt_property_browser + ${QtPropertyBrowser_LIBRARY} ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${LIBXML2_LIBRARIES} diff --git a/studio/src/plugins/world_editor/const_string_array_property.h b/studio/src/plugins/world_editor/const_string_array_property.h index 78070ef576..e14642f218 100644 --- a/studio/src/plugins/world_editor/const_string_array_property.h +++ b/studio/src/plugins/world_editor/const_string_array_property.h @@ -23,7 +23,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT -#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include #include #include diff --git a/studio/src/plugins/world_editor/plugin-metadata.json b/studio/src/plugins/world_editor/plugin-metadata.json new file mode 100644 index 0000000000..a5089798c6 --- /dev/null +++ b/studio/src/plugins/world_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "WorldEditor", + "Version" : "0.6", + "Vendor": "GSoC2011_dnk-88", + "Description": "Landscape editor ovqt plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/world_editor/primitives_view.cpp b/studio/src/plugins/world_editor/primitives_view.cpp index 0f54af5f42..82d581f5dd 100644 --- a/studio/src/plugins/world_editor/primitives_view.cpp +++ b/studio/src/plugins/world_editor/primitives_view.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/primitives_view.h b/studio/src/plugins/world_editor/primitives_view.h index 0a1745360e..6c6b2f8ec2 100644 --- a/studio/src/plugins/world_editor/primitives_view.h +++ b/studio/src/plugins/world_editor/primitives_view.h @@ -25,13 +25,13 @@ #include // Qt includes -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include namespace LandscapeEditor { diff --git a/studio/src/plugins/world_editor/project_settings_dialog.cpp b/studio/src/plugins/world_editor/project_settings_dialog.cpp index 80bede1582..40ba276e68 100644 --- a/studio/src/plugins/world_editor/project_settings_dialog.cpp +++ b/studio/src/plugins/world_editor/project_settings_dialog.cpp @@ -27,8 +27,8 @@ // Qt includes #include -#include -#include +#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/world_editor_actions.h b/studio/src/plugins/world_editor/world_editor_actions.h index 4ac39ed90c..4a602207d8 100644 --- a/studio/src/plugins/world_editor/world_editor_actions.h +++ b/studio/src/plugins/world_editor/world_editor_actions.h @@ -26,10 +26,10 @@ // NeL includes // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include #include namespace LandscapeEditor diff --git a/studio/src/plugins/world_editor/world_editor_plugin.cpp b/studio/src/plugins/world_editor/world_editor_plugin.cpp index 45548fc004..072dbcd321 100644 --- a/studio/src/plugins/world_editor/world_editor_plugin.cpp +++ b/studio/src/plugins/world_editor/world_editor_plugin.cpp @@ -140,5 +140,3 @@ QWidget *WorldEditorContext::widget() } } - -Q_EXPORT_PLUGIN(WorldEditor::WorldEditorPlugin) diff --git a/studio/src/plugins/world_editor/world_editor_plugin.h b/studio/src/plugins/world_editor/world_editor_plugin.h index 8788c3d3f4..7c46aab749 100644 --- a/studio/src/plugins/world_editor/world_editor_plugin.h +++ b/studio/src/plugins/world_editor/world_editor_plugin.h @@ -32,7 +32,7 @@ // Qt includes #include -#include +#include namespace NLMISC { @@ -46,6 +46,7 @@ class WorldEditorWindow; class WorldEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/world_editor/world_editor_scene.cpp b/studio/src/plugins/world_editor/world_editor_scene.cpp index d86a2d57c4..56cf39a8ae 100644 --- a/studio/src/plugins/world_editor/world_editor_scene.cpp +++ b/studio/src/plugins/world_editor/world_editor_scene.cpp @@ -23,9 +23,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include #include namespace WorldEditor diff --git a/studio/src/plugins/world_editor/world_editor_scene.h b/studio/src/plugins/world_editor/world_editor_scene.h index f88b82c096..74403f1501 100644 --- a/studio/src/plugins/world_editor/world_editor_scene.h +++ b/studio/src/plugins/world_editor/world_editor_scene.h @@ -25,7 +25,7 @@ // NeL includes // Qt includes -#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/world_editor_scene_item.cpp b/studio/src/plugins/world_editor/world_editor_scene_item.cpp index b94e48a0fa..73e6fcec1b 100644 --- a/studio/src/plugins/world_editor/world_editor_scene_item.cpp +++ b/studio/src/plugins/world_editor/world_editor_scene_item.cpp @@ -21,7 +21,7 @@ #include // Qt includes -#include +#include #include #include #include diff --git a/studio/src/plugins/world_editor/world_editor_scene_item.h b/studio/src/plugins/world_editor/world_editor_scene_item.h index 0579ef32a2..80cde1e9fb 100644 --- a/studio/src/plugins/world_editor/world_editor_scene_item.h +++ b/studio/src/plugins/world_editor/world_editor_scene_item.h @@ -24,11 +24,11 @@ // Qt includes #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace WorldEditor { diff --git a/studio/src/plugins/world_editor/world_editor_settings_page.cpp b/studio/src/plugins/world_editor/world_editor_settings_page.cpp index dc15dc83a5..e56cfcea92 100644 --- a/studio/src/plugins/world_editor/world_editor_settings_page.cpp +++ b/studio/src/plugins/world_editor/world_editor_settings_page.cpp @@ -23,7 +23,7 @@ #include "../core/icore.h" // Qt includes -#include +#include #include // NeL includes diff --git a/studio/src/plugins/world_editor/world_editor_window.cpp b/studio/src/plugins/world_editor/world_editor_window.cpp index 0dcd8c9320..f851c51a20 100644 --- a/studio/src/plugins/world_editor/world_editor_window.cpp +++ b/studio/src/plugins/world_editor/world_editor_window.cpp @@ -39,9 +39,9 @@ // Qt includes #include -#include -#include -#include +#include +#include +#include #include namespace WorldEditor diff --git a/studio/src/plugins/world_editor/world_editor_window.h b/studio/src/plugins/world_editor/world_editor_window.h index 3abd8bd43f..135ae851c0 100644 --- a/studio/src/plugins/world_editor/world_editor_window.h +++ b/studio/src/plugins/world_editor/world_editor_window.h @@ -24,8 +24,8 @@ #include "ui_world_editor_window.h" // Qt includes -#include -#include +#include +#include #include #include #include From fac2b3f9d7d3621e7f4a0dc253a264b13ab16c54 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Thu, 28 Dec 2023 21:51:50 +0100 Subject: [PATCH 07/28] add link to qt5 version of QtPropertyBrowser --- studio/src/3rdparty/qtpropertybrowser/README.TXT | 2 ++ 1 file changed, 2 insertions(+) diff --git a/studio/src/3rdparty/qtpropertybrowser/README.TXT b/studio/src/3rdparty/qtpropertybrowser/README.TXT index d9452cfc1d..9b923ba2c4 100644 --- a/studio/src/3rdparty/qtpropertybrowser/README.TXT +++ b/studio/src/3rdparty/qtpropertybrowser/README.TXT @@ -17,3 +17,5 @@ ready-made implementations of the browser widget: QtTreePropertyBrowser, QtButtonPropertyBrowser and QtGroupBoxPropertyBrowser. +also see: +https://github.com/greenjava/QtPropertyBrowser \ No newline at end of file From dadafc3945e99b969bc7c8c04fdb5459a19930bd Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 1 Jan 2024 17:41:37 +0100 Subject: [PATCH 08/28] add extension to qtpropertybrowser library --- studio/src/CMakeLists.txt | 3 + .../src/libqtpropertybrowser/CMakeLists.txt | 28 ++++ .../libqtpropertybrowser/QtTextEditWidget.cpp | 126 ++++++++++++++++++ .../libqtpropertybrowser/QtTextEditWidget.h | 42 ++++++ .../QtTextEditorFactory.cpp | 106 +++++++++++++++ .../QtTextEditorFactory.h | 43 ++++++ .../QtTextPropertyManager.cpp | 27 ++++ .../QtTextPropertyManager.h | 25 ++++ 8 files changed, 400 insertions(+) create mode 100644 studio/src/libqtpropertybrowser/CMakeLists.txt create mode 100644 studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp create mode 100644 studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.h create mode 100644 studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp create mode 100644 studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h create mode 100644 studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp create mode 100644 studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index e6896d22c4..4c8d591f45 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -54,7 +54,9 @@ ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${QT_DEFINITIONS}) NL_DEFAULT_PROPS(studio "Tools: Studio") NL_ADD_RUNTIME_FLAGS(studio) +ADD_SUBDIRECTORY(libqtpropertybrowser) ADD_SUBDIRECTORY(plugins) + add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core @@ -62,6 +64,7 @@ add_dependencies(studio studio_plugin_example studio_plugin_georges_editor studio_plugin_landscape_editor + studio_plugin_world_editor ) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/libqtpropertybrowser/CMakeLists.txt b/studio/src/libqtpropertybrowser/CMakeLists.txt new file mode 100644 index 0000000000..b31761bacb --- /dev/null +++ b/studio/src/libqtpropertybrowser/CMakeLists.txt @@ -0,0 +1,28 @@ +FIND_PACKAGE(QtPropertyBrowser REQUIRED) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_AUTOMOC ON) + +FILE(GLOB SRC libqtpropertybrowser/*.cpp) + +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(qtpropertybrowser ${SRC}) + +ADD_LIBRARY(qtpropertybrowser::qtpropertybrowser ALIAS qtpropertybrowser) + +TARGET_LINK_LIBRARIES(qtpropertybrowser $${QT_LIBRARIES} {QtPropertyBrowser_LIBRARY}) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} + ${QT_INCLUDES} + ${QtPropertyBrowser_INCLUDE_DIR} +) + +TARGET_INCLUDE_DIRECTORIES(qtpropertybrowser + INTERFACE + $ + $ +) diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp new file mode 100644 index 0000000000..6832787cc2 --- /dev/null +++ b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp @@ -0,0 +1,126 @@ +#include +#include +#include +#include +#include + +#include + +#if defined(Q_CC_MSVC) +# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ +#endif + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + + +QtTextEditWidget::QtTextEditWidget(QWidget *parent) : + QWidget(parent), + m_lineEdit(new QLineEdit), + m_defaultButton(new QToolButton), + m_button(new QToolButton) +{ + QHBoxLayout *lt = new QHBoxLayout(this); + lt->setContentsMargins(0, 0, 0, 0); + lt->setSpacing(0); + lt->addWidget(m_lineEdit); + m_lineEdit->setReadOnly(true); + + m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored); + m_button->setFixedWidth(20); + m_button->setText(tr("...")); + m_button->installEventFilter(this); + + setFocusProxy(m_button); + setFocusPolicy(m_button->focusPolicy()); + + m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); + m_defaultButton->setMaximumWidth(16); + + connect(m_button, SIGNAL(clicked()), this, SLOT(buttonClicked())); + connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); + lt->addWidget(m_button); + lt->addWidget(m_defaultButton); + m_defaultButton->setEnabled(false); +} + +void QtTextEditWidget::setValue(const QString &value) +{ + if (m_lineEdit->text() != value) + m_lineEdit->setText(value); +} + +void QtTextEditWidget::setStateResetButton(bool enabled) +{ + m_defaultButton->setEnabled(enabled); +} + +void QtTextEditWidget::buttonClicked() +{ + QGridLayout *gridLayout; + QPlainTextEdit *plainTextEdit; + QDialogButtonBox *buttonBox; + QDialog *dialog; + + dialog = new QDialog(this); + dialog->resize(400, 300); + gridLayout = new QGridLayout(dialog); + plainTextEdit = new QPlainTextEdit(dialog); + + gridLayout->addWidget(plainTextEdit, 0, 0, 1, 1); + + buttonBox = new QDialogButtonBox(dialog); + buttonBox->setOrientation(Qt::Horizontal); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + gridLayout->addWidget(buttonBox, 1, 0, 1, 1); + + QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); + QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); + + plainTextEdit->textCursor().insertText(m_lineEdit->text()); + + dialog->setModal(true); + dialog->show(); + int result = dialog->exec(); + + if (result == QDialog::Accepted) + { + QString newText = plainTextEdit->document()->toPlainText(); + + setValue(newText); + if (plainTextEdit->document()->isModified()) + Q_EMIT valueChanged(newText); + } + + delete dialog; +} + +bool QtTextEditWidget::eventFilter(QObject *obj, QEvent *ev) +{ + if (obj == m_button) { + switch (ev->type()) { + case QEvent::KeyPress: + case QEvent::KeyRelease: { // Prevent the QToolButton from handling Enter/Escape meant control the delegate + switch (static_cast(ev)->key()) { + case Qt::Key_Escape: + case Qt::Key_Enter: + case Qt::Key_Return: + ev->ignore(); + return true; + default: + break; + } + } + break; + default: + break; + } + } + return QWidget::eventFilter(obj, ev); +} + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.h b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.h new file mode 100644 index 0000000000..cfcd666194 --- /dev/null +++ b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.h @@ -0,0 +1,42 @@ +#ifndef LIBQTPROPERTYMANAGER_TEXT_EDIT_WIDGET_H +#define LIBQTPROPERTYMANAGER_TEXT_EDIT_WIDGET_H + +#include +#include +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QtTextEditWidget : public QWidget +{ + Q_OBJECT + +public: + QtTextEditWidget(QWidget *parent); + + bool eventFilter(QObject *obj, QEvent *ev); + +public Q_SLOTS: + void setValue(const QString &value); + void setStateResetButton(bool enabled); + +private Q_SLOTS: + void buttonClicked(); + +Q_SIGNALS: + void valueChanged(const QString &value); + void resetProperty(); + +private: + QLineEdit *m_lineEdit; + QToolButton *m_defaultButton; + QToolButton *m_button; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif // LIBQTPROPERTYMANAGER_TEXT_EDIT_WIDGET_H diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp new file mode 100644 index 0000000000..898eff4288 --- /dev/null +++ b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp @@ -0,0 +1,106 @@ +#include +#include + +#if defined(Q_CC_MSVC) +#pragma warning(disable : 4786) /* MS VS 6: truncating debug info after 255 characters */ +#endif + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +QtTextEditorFactory::QtTextEditorFactory(QObject *parent) + : QtAbstractEditorFactory(parent) +{ +} + +QtTextEditorFactory::~QtTextEditorFactory() +{ + qDeleteAll(editorToProperty.keys()); +} + +QWidget *QtTextEditorFactory::createEditor(QtTextPropertyManager *manager, QtProperty *property, QWidget *parent) +{ + auto *editor = new Editor(parent); + auto it = createdEditors.find(property); + if (it == createdEditors.end()) + { + it = createdEditors.insert(property, EditorList()); + } + it.value().append(editor); + editorToProperty.insert(editor, property); + + editor->setValue(manager->value(property)); + editor->setStateResetButton(property->isModified()); + + connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); + connect(editor, SIGNAL(valueChanged(QString)), this, SLOT(slotSetValue(QString))); + connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + return editor; +} + +void QtTextEditorFactory::connectPropertyManager(QtTextPropertyManager *manager) +{ + connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); +} + +void QtTextEditorFactory::disconnectPropertyManager(QtTextPropertyManager *manager) +{ + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); +} + +void QtTextEditorFactory::slotPropertyChanged(QtProperty *property, const QString &value) +{ + const PropertyToEditorListMap::iterator it = createdEditors.find(property); + if (it == createdEditors.end()) + { + return; + } + QListIterator itEditor(it.value()); + + while (itEditor.hasNext()) + { + QtTextEditWidget *editor = itEditor.next(); + editor->setValue(value); + editor->setStateResetButton(property->isModified()); + } +} + +void QtTextEditorFactory::slotSetValue(const QString &value) +{ + QObject *object = sender(); + const EditorToPropertyMap::ConstIterator ecend = editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) + { + QtProperty *property = itEditor.value(); + QtTextPropertyManager *manager = propertyManager(property); + if (!manager) + return; + manager->setValue(property, value); + return; + } +} + +void QtTextEditorFactory::slotResetProperty() +{ + QObject *object = sender(); + const EditorToPropertyMap::ConstIterator ecend = editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) + { + QtProperty *property = itEditor.value(); + QtTextPropertyManager *manager = propertyManager(property); + if (!manager) + return; + // not supported anymore + // manager->emitResetProperty(property); + return; + } +} + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h new file mode 100644 index 0000000000..b13729da4a --- /dev/null +++ b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h @@ -0,0 +1,43 @@ +#ifndef LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H +#define LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H + +#include +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QtTextEditorFactory : public QtAbstractEditorFactory +{ + Q_OBJECT + +public: + typedef QtTextEditWidget Editor; + typedef QList EditorList; + typedef QMap PropertyToEditorListMap; + typedef QMap EditorToPropertyMap; + + QtTextEditorFactory(QObject *parent = nullptr); + ~QtTextEditorFactory() override; + +protected: + QWidget *createEditor(QtTextPropertyManager *manager, QtProperty *property, QWidget *parent) override; + void connectPropertyManager(QtTextPropertyManager *manager) override; + void disconnectPropertyManager(QtTextPropertyManager *manager) override; + +private Q_SLOTS: + void slotPropertyChanged(QtProperty *property, const QString &value); + void slotSetValue(const QString &value); + void slotResetProperty(); + +private: + PropertyToEditorListMap createdEditors; + EditorToPropertyMap editorToProperty; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif // LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp new file mode 100644 index 0000000000..cb40b8c104 --- /dev/null +++ b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp @@ -0,0 +1,27 @@ +#include + +#if defined(Q_CC_MSVC) +# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ +#endif + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +QString QtTextPropertyManager::valueText(const QtProperty *property) const +{ + QString text = QtStringPropertyManager::valueText(property); + for (int i = 0; i < text.size(); i++) + { + if (text.at(i) == '\n') + { + QStringRef ret(&text, 0, i); + return ret.toString() + " ..."; + } + } + return text; +} + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h new file mode 100644 index 0000000000..a0abc1d1ee --- /dev/null +++ b/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h @@ -0,0 +1,25 @@ +#ifndef LIBQTPROPERTYMANAGER_TEXT_PROPERTY_MANAGER_H +#define LIBQTPROPERTYMANAGER_TEXT_PROPERTY_MANAGER_H + +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + + +class QT_QTPROPERTYBROWSER_EXPORT QtTextPropertyManager : public QtStringPropertyManager +{ + Q_OBJECT +public: + QtTextPropertyManager(QObject *parent = 0):QtStringPropertyManager(parent) {} + +protected: + virtual QString valueText(const QtProperty *property) const; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif // LIBQTPROPERTYMANAGER_TEXT_PROPERTY_MANAGER_H From f7e0142e8fa522fe3138c3aed1916f13d8d1b81a Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 1 Jan 2024 18:21:46 +0100 Subject: [PATCH 09/28] migrate studio world editor plugin to qt5 add extension library to qtporpertybrowser instead of changing it's source to make updating the library easier --- studio/src/libqtpropertybrowser/CMakeLists.txt | 2 +- studio/src/plugins/georges_editor/CMakeLists.txt | 2 +- studio/src/plugins/world_editor/CMakeLists.txt | 1 + studio/src/plugins/world_editor/property_editor_widget.cpp | 3 +++ studio/src/plugins/world_editor/property_editor_widget.h | 6 +++--- studio/src/splash_screen.cpp | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/studio/src/libqtpropertybrowser/CMakeLists.txt b/studio/src/libqtpropertybrowser/CMakeLists.txt index b31761bacb..de0cf85e6a 100644 --- a/studio/src/libqtpropertybrowser/CMakeLists.txt +++ b/studio/src/libqtpropertybrowser/CMakeLists.txt @@ -13,7 +13,7 @@ ADD_LIBRARY(qtpropertybrowser ${SRC}) ADD_LIBRARY(qtpropertybrowser::qtpropertybrowser ALIAS qtpropertybrowser) -TARGET_LINK_LIBRARIES(qtpropertybrowser $${QT_LIBRARIES} {QtPropertyBrowser_LIBRARY}) +TARGET_LINK_LIBRARIES(qtpropertybrowser ${QT_LIBRARIES} ${QtPropertyBrowser_LIBRARY}) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/studio/src/plugins/georges_editor/CMakeLists.txt b/studio/src/plugins/georges_editor/CMakeLists.txt index c4925bccdf..7e9ce571ea 100644 --- a/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/studio/src/plugins/georges_editor/CMakeLists.txt @@ -52,7 +52,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) ADD_LIBRARY(studio_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS}) -TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges ${QtPropertyBrowser_LIBRARY} ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qtpropertybrowser ${QtPropertyBrowser_LIBRARY} ${QT_LIBRARIES} ${LIBXML2_LIBRARIES}) NL_DEFAULT_PROPS(studio_plugin_georges_editor "Tools: Studio Plugin: Georges Editor") NL_ADD_RUNTIME_FLAGS(studio_plugin_georges_editor) diff --git a/studio/src/plugins/world_editor/CMakeLists.txt b/studio/src/plugins/world_editor/CMakeLists.txt index 772637070b..7f7e8ec27b 100644 --- a/studio/src/plugins/world_editor/CMakeLists.txt +++ b/studio/src/plugins/world_editor/CMakeLists.txt @@ -57,6 +57,7 @@ TARGET_LINK_LIBRARIES( studio_plugin_world_editor studio_plugin_landscape_editor nelmisc nel3d + qtpropertybrowser ${QtPropertyBrowser_LIBRARY} ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} diff --git a/studio/src/plugins/world_editor/property_editor_widget.cpp b/studio/src/plugins/world_editor/property_editor_widget.cpp index 1356413fb4..b65ed6f514 100644 --- a/studio/src/plugins/world_editor/property_editor_widget.cpp +++ b/studio/src/plugins/world_editor/property_editor_widget.cpp @@ -31,7 +31,10 @@ // Qt includes #include +#include #include +#include +#include #include "const_string_array_property.h" diff --git a/studio/src/plugins/world_editor/property_editor_widget.h b/studio/src/plugins/world_editor/property_editor_widget.h index 8a695efa3b..b1b82aa46c 100644 --- a/studio/src/plugins/world_editor/property_editor_widget.h +++ b/studio/src/plugins/world_editor/property_editor_widget.h @@ -28,9 +28,9 @@ // 3rdparty -#include "qtvariantproperty.h" -#include "qtpropertymanager.h" -#include "qteditorfactory.h" +#include +#include +#include // NeL includes diff --git a/studio/src/splash_screen.cpp b/studio/src/splash_screen.cpp index 6d8360b9f0..67c9dbc1ad 100644 --- a/studio/src/splash_screen.cpp +++ b/studio/src/splash_screen.cpp @@ -85,7 +85,7 @@ void SplashScreen::drawContents( QPainter *painter ) if( progressBarEnabled ) { - QStyleOptionProgressBarV2 pbStyle; + QStyleOptionProgressBar pbStyle; pbStyle.initFrom( this ); pbStyle.state = QStyle::State_Enabled; pbStyle.textVisible = false; From e7acc73e48a5a4cb6481dddf0c87f4342823d466 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 1 Jan 2024 19:05:47 +0100 Subject: [PATCH 10/28] add github workflow --- .github/workflows/build-client.yml | 102 ++++++++++++++++++ .github/workflows/cmake-multi-platform.yml | 115 +++++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 .github/workflows/build-client.yml create mode 100644 .github/workflows/cmake-multi-platform.yml diff --git a/.github/workflows/build-client.yml b/.github/workflows/build-client.yml new file mode 100644 index 0000000000..f6e48e4beb --- /dev/null +++ b/.github/workflows/build-client.yml @@ -0,0 +1,102 @@ +name: build client on multiple platforms + +on: + push: + branches: [ "core4", "feature/*" ] + pull_request: + branches: [ "core4" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: true + + matrix: + os: [ubuntu-latest, ubuntu-20.04, windows-latest, windows-2019, macos-latest, macos-11] + include: + - os: windows-latest + cmake_options: -DWITH_DRIVER_DIRECT3D=ON -DWITH_DRIVER_XAUDIO2=ON + - os: windows-2019 + cmake_options: -DWITH_DRIVER_DIRECT3D=ON -DWITH_DRIVER_XAUDIO2=ON + - os: ubuntu-latest + - os: ubuntu-20.04 + - os: macos-latest + cmake_options: -DWITH_LIBXML2_ICONV=OFF -GXcode + - os: macos-11 + cmake_options: -DWITH_LIBXML2_ICONV=OFF -GXcode + + steps: + - uses: actions/checkout@v3 + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + echo "hunter-dir=${{ github.workspace }}/.hunter" >> "$GITHUB_OUTPUT" + echo "cmake-version=3.27.9" >> "$GITHUB_OUTPUT" + echo "cmake-install-dir=/opt/cmake-3.27.9" >> "$GITHUB_OUTPUT" + + - name: Dependencies Linux + if: runner.os == 'Linux' + run: | + sudo apt update + sudo apt install --yes \ + libasound2-dev \ + libgl1-mesa-dev \ + libjack-dev \ + libpulse-dev \ + libxrandr-dev \ + libxrender-dev \ + libxxf86vm-dev + wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ steps.strings.outputs.cmake-version }}/cmake-${{ steps.strings.outputs.cmake-version }}-linux-x86_64.sh + sudo mkdir ${{ steps.strings.outputs.cmake-install-dir }} + sudo sh /tmp/cmake.sh --skip-license --prefix=${{ steps.strings.outputs.cmake-install-dir }} + sudo ln --symbolic --force ${{ steps.strings.outputs.cmake-install-dir }}/bin/cmake /usr/local/bin/cmake + + - name: Cache Hunter Dependencies + uses: actions/cache@v3.3.2 + with: + path: ${{ steps.strings.outputs.hunter-dir }} + key: ${{ matrix.os }}-hunter-cache + + - name: Cache Chocolatey Dependencies + if: runner.os == 'Windows' + uses: actions/cache@v3.3.2 + with: + path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey + key: ${{ runner.os }}-chocolatey-cache + + - name: Dependencies Windows + if: runner.os == 'Windows' + run: > + choco install directx-sdk + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake --version; + cmake -B ${{ steps.strings.outputs.build-output-dir }} + ${{ matrix.cmake_options }} + -DCMAKE_CONFIGURATION_TYPES=Release + -DFINAL_VERSION=OFF + -DHUNTER_CONFIGURATION_TYPES=Release + -DHUNTER_ENABLED=ON + -DHUNTER_ROOT=${{ steps.strings.outputs.hunter-dir }} + -DWITH_DRIVER_OPENAL=ON + -DWITH_DRIVER_OPENGL=ON + -DWITH_INSTALL_LIBRARIES=OFF + -DWITH_NEL_SAMPLES=OFF + -DWITH_NEL_TESTS=OFF + -DWITH_NEL_TOOLS=OFF + -DWITH_RYZOM_CLIENT=ON + -DWITH_RYZOM_SERVER=OFF + -DWITH_RYZOM_TOOLS=OFF + -S ${{ github.workspace }} + + - name: Build + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml new file mode 100644 index 0000000000..2fa7229bee --- /dev/null +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,115 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: [ "core4", "feature/*" ] + pull_request: + branches: [ "core4" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: true + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # 3. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ubuntu-latest] + build_type: [Release] + c_compiler: [gcc, clang-15] + include: + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-latest + c_compiler: clang-15 + cpp_compiler: clang++-15 + + steps: + - uses: actions/checkout@v3 + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Dependencies + run: > + sudo apt update; + sudo apt install --yes + autoconf + automake + bison + clang-15 + freeglut3-dev + libavcodec-dev + libavdevice-dev + libavformat-dev + libcpptest-dev + libcurl4-openssl-dev + libfreetype6-dev + libgif-dev + libgsf-1-dev + libjpeg-dev + liblua5.2-dev + libluabind-dev + liblzma-dev + libmysqlclient-dev + libogg-dev + libopenal-dev + libpng-dev + libpostproc-dev + libsquish-dev + libssl-dev + libswscale-dev + libvorbis-dev + libxml2-dev + qtbase5-dev + qttools5-dev + qttools5-dev-tools + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + ${{ matrix.cmake_options }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DWITH_STATIC=ON + -DWITH_NEL_TESTS=ON + -DWITH_NEL_SAMPLES=ON + -DWITH_LUA51=OFF + -DWITH_LUA52=ON + -DWITH_RYZOM=ON + -DWITH_RYZOM_SERVER=ON + -DWITH_RYZOM_CLIENT=ON + -DWITH_RYZOM_TOOLS=ON + -DWITH_NEL_TOOLS=ON + -DWITH_NELNS=ON + -DWITH_NELNS_LOGIN_SYSTEM=ON + -DWITH_NELNS_SERVER=ON + -DWITH_QT5=ON + -DWITH_LIBGSF=ON + -S ${{ github.workspace }} + + - name: Build + # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + + - name: Test + working-directory: ${{ steps.strings.outputs.build-output-dir }} + # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest --build-config ${{ matrix.build_type }} From df83668596559ff155785e47efe6866b355d38d0 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 1 Jan 2024 21:19:06 +0100 Subject: [PATCH 11/28] don't fail fast to be able to determine succeeding jobs --- .github/workflows/build-client.yml | 2 +- .github/workflows/cmake-multi-platform.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-client.yml b/.github/workflows/build-client.yml index f6e48e4beb..f1c689cfe4 100644 --- a/.github/workflows/build-client.yml +++ b/.github/workflows/build-client.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: - fail-fast: true + fail-fast: false matrix: os: [ubuntu-latest, ubuntu-20.04, windows-latest, windows-2019, macos-latest, macos-11] diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 2fa7229bee..58f0f9c926 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -14,7 +14,7 @@ jobs: strategy: # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. - fail-fast: true + fail-fast: false # Set up a matrix to run the following 3 configurations: # 1. From 2d792e89cebf46e141d7a883cfb937ebd019a4c9 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 18:31:24 +0100 Subject: [PATCH 12/28] migrate studio log plugin to qt5 --- studio/src/CMakeLists.txt | 1 + studio/src/plugins/log/log_plugin.cpp | 15 +++++++-------- studio/src/plugins/log/log_plugin.h | 3 ++- studio/src/plugins/log/log_settings_page.cpp | 4 ++-- studio/src/plugins/log/plugin-metadata.json | 6 ++++++ 5 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 studio/src/plugins/log/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 4c8d591f45..3fb319e48b 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -61,6 +61,7 @@ add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core studio_plugin_disp_sheet_id + studio_plugin_log studio_plugin_example studio_plugin_georges_editor studio_plugin_landscape_editor diff --git a/studio/src/plugins/log/log_plugin.cpp b/studio/src/plugins/log/log_plugin.cpp index b5cdec4be3..34c4b1290d 100644 --- a/studio/src/plugins/log/log_plugin.cpp +++ b/studio/src/plugins/log/log_plugin.cpp @@ -30,13 +30,13 @@ #include "../../extension_system/iplugin_spec.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -202,4 +202,3 @@ namespace Plugin } } } -Q_EXPORT_PLUGIN(Plugin::CLogPlugin) diff --git a/studio/src/plugins/log/log_plugin.h b/studio/src/plugins/log/log_plugin.h index 9e4f644194..247300df69 100644 --- a/studio/src/plugins/log/log_plugin.h +++ b/studio/src/plugins/log/log_plugin.h @@ -52,7 +52,8 @@ namespace Plugin class CLogPlugin : public QDockWidget, public ExtensionSystem::IPlugin { Q_OBJECT - Q_INTERFACES(ExtensionSystem::IPlugin) + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") + Q_INTERFACES(ExtensionSystem::IPlugin) public: CLogPlugin(QWidget *parent = 0); ~CLogPlugin(); diff --git a/studio/src/plugins/log/log_settings_page.cpp b/studio/src/plugins/log/log_settings_page.cpp index 3fd336097a..2414cc6868 100644 --- a/studio/src/plugins/log/log_settings_page.cpp +++ b/studio/src/plugins/log/log_settings_page.cpp @@ -29,8 +29,8 @@ // NeL includes // Qt includes -#include -#include +#include +#include namespace ExtensionSystem { diff --git a/studio/src/plugins/log/plugin-metadata.json b/studio/src/plugins/log/plugin-metadata.json new file mode 100644 index 0000000000..c65a6101c9 --- /dev/null +++ b/studio/src/plugins/log/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "LogPlugin", + "Version" : "1.1", + "Vendor": "aquiles", + "Description": "DockWidget to display all log messages from NeL." +} \ No newline at end of file From a3df035c4777e22348ff41832a91db6d920a4089 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 18:38:34 +0100 Subject: [PATCH 13/28] migrate studio plugin mission compiler to qt5 --- studio/src/CMakeLists.txt | 1 + .../mission_compiler_main_window.cpp | 4 ++-- .../mission_compiler_main_window.h | 2 +- .../mission_compiler/mission_compiler_plugin.cpp | 14 ++++++-------- .../mission_compiler/mission_compiler_plugin.h | 1 + .../mission_compiler_settings_page.cpp | 8 ++++---- .../plugins/mission_compiler/plugin-metadata.json | 6 ++++++ .../plugins/mission_compiler/validation_file.cpp | 2 +- 8 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 studio/src/plugins/mission_compiler/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 3fb319e48b..222d6a1c60 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -63,6 +63,7 @@ add_dependencies(studio studio_plugin_disp_sheet_id studio_plugin_log studio_plugin_example + studio_plugin_mission_compiler studio_plugin_georges_editor studio_plugin_landscape_editor studio_plugin_world_editor diff --git a/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp index a8088adedb..3b647b2c54 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -242,7 +242,7 @@ void MissionCompilerMainWindow::compileMission(bool publish) NLLIGO::CPrimitives primDoc; NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = &primDoc; - NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toAscii().data(), false), m_ligoConfig); + NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toLatin1().data(), false), m_ligoConfig); NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = NULL; try @@ -354,7 +354,7 @@ void MissionCompilerMainWindow::handleValidation() TMissionContainer missions; NLLIGO::CPrimitives primDoc; NLLIGO::CPrimitiveContext::instance().CurrentPrimitive = &primDoc; - NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toAscii().data(), false), m_ligoConfig); + NLLIGO::loadXmlPrimitiveFile(primDoc, NLMISC::CPath::lookup(filename.toLatin1().data(), false), m_ligoConfig); parsePrimForMissions(primDoc.RootNode, missions); // Parse missions to check modification diff --git a/studio/src/plugins/mission_compiler/mission_compiler_main_window.h b/studio/src/plugins/mission_compiler/mission_compiler_main_window.h index 3d59e206a9..8142185ee0 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_main_window.h +++ b/studio/src/plugins/mission_compiler/mission_compiler_main_window.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp b/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp index 46e51f36d1..5ed32d3c7c 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp +++ b/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp @@ -10,12 +10,12 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "mission_compiler_settings_page.h" @@ -75,5 +75,3 @@ void MissionCompilerPlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(MissionCompiler::MissionCompilerPlugin) \ No newline at end of file diff --git a/studio/src/plugins/mission_compiler/mission_compiler_plugin.h b/studio/src/plugins/mission_compiler/mission_compiler_plugin.h index cc2cac47c0..c0bcfff32c 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_plugin.h +++ b/studio/src/plugins/mission_compiler/mission_compiler_plugin.h @@ -30,6 +30,7 @@ namespace MissionCompiler class MissionCompilerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp b/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp index 1701c04716..71f512cc68 100644 --- a/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp +++ b/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp @@ -31,10 +31,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace MissionCompiler { diff --git a/studio/src/plugins/mission_compiler/plugin-metadata.json b/studio/src/plugins/mission_compiler/plugin-metadata.json new file mode 100644 index 0000000000..9ca3a586f0 --- /dev/null +++ b/studio/src/plugins/mission_compiler/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "MissionCompiler", + "Version" : "0.1", + "Vendor": "Ryzom Core", + "Description": "Mission Compiler Plugin" +} \ No newline at end of file diff --git a/studio/src/plugins/mission_compiler/validation_file.cpp b/studio/src/plugins/mission_compiler/validation_file.cpp index c284f50cd7..a08a25d2fa 100644 --- a/studio/src/plugins/mission_compiler/validation_file.cpp +++ b/studio/src/plugins/mission_compiler/validation_file.cpp @@ -54,7 +54,7 @@ void CValidationFile::saveMissionValidationFile(std::string filename) nlwarning("Can't find index file '%s' in search path, no mission will be valid", filename.c_str()); return; } - FILE* file = nlfopen(pathName, "w"); + FILE* file = NLMISC::nlfopen(pathName, "w"); nlassert(file!=NULL); // AuthorizedStates From 3e987c2edd3ada2a8c1a4f7d807b0b11e2a74b49 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 20:44:04 +0100 Subject: [PATCH 14/28] migrate studio object viewer plugin to qt5 --- studio/src/CMakeLists.txt | 1 + .../object_viewer/graphics_settings_page.cpp | 4 ++-- .../object_viewer/graphics_viewport.cpp | 12 +++++------ .../src/plugins/object_viewer/main_window.cpp | 4 +++- .../src/plugins/object_viewer/main_window.h | 6 +++--- .../object_viewer/object_viewer_plugin.cpp | 2 -- .../object_viewer/object_viewer_plugin.h | 1 + .../particle_system/attrib_widget.cpp | 2 +- .../particle_system/attrib_widget.h | 2 +- .../particle_system/bin_op_dialog.h | 12 +++++------ .../particle_system/curve_dialog.h | 8 ++++---- .../particle_system/direction_widget.cpp | 6 +++--- .../particle_system/emitter_page.cpp | 2 +- .../particle_system/follow_path_dialog.h | 12 +++++------ .../particle_system/located_page.cpp | 4 ++-- .../particle_system/mesh_widget.cpp | 6 +++--- .../particle_system/morph_mesh_dialog.cpp | 2 +- .../particle_system/particle_force_page.cpp | 2 +- .../particle_link_skeleton_dialog.cpp | 2 +- .../particle_property_dialog.h | 10 +++++----- .../particle_system/particle_sound_page.cpp | 10 +++++----- .../particle_system/particle_system_page.cpp | 8 ++++---- .../particle_texture_widget.cpp | 4 ++-- .../particle_workspace_dialog.cpp | 8 ++++---- .../particle_workspace_page.cpp | 6 +++--- .../particle_system/spinner_dialog.h | 6 +++--- .../particle_system/value_blender_dialog.h | 10 +++++----- .../value_from_emitter_dialog.h | 8 ++++---- .../particle_system/value_gradient_dialog.cpp | 2 +- .../particle_system/value_gradient_dialog.h | 20 +++++++++---------- .../object_viewer/plugin-metadata.json | 6 ++++++ .../scene/animation_set_dialog.cpp | 2 +- .../object_viewer/scene/camera_control.h | 14 ++++++------- .../object_viewer/scene/setup_fog_dialog.cpp | 6 +++--- .../scene/skeleton_scale_dialog.cpp | 4 ++-- .../scene/slot_manager_dialog.cpp | 2 +- .../object_viewer/scene/slot_manager_dialog.h | 5 +++-- .../object_viewer/sound_settings_page.cpp | 6 +++--- .../plugins/object_viewer/sound_system.cpp | 6 +++--- .../vegetable/vegetable_appearance_page.cpp | 6 +++--- .../vegetable/vegetable_density_page.cpp | 4 ++-- .../vegetable/vegetable_dialog.cpp | 4 ++-- .../vegetable/vegetable_editor.cpp | 10 +++++----- .../object_viewer/vegetable_settings_page.cpp | 8 ++++---- .../widgets/color_edit_widget.cpp | 6 +++--- .../object_viewer/widgets/hoverpoints.cpp | 2 ++ .../object_viewer/widgets/hoverpoints.h | 3 ++- 47 files changed, 144 insertions(+), 132 deletions(-) create mode 100644 studio/src/plugins/object_viewer/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 222d6a1c60..505ce7323f 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -64,6 +64,7 @@ add_dependencies(studio studio_plugin_log studio_plugin_example studio_plugin_mission_compiler + studio_plugin_object_viewer studio_plugin_georges_editor studio_plugin_landscape_editor studio_plugin_world_editor diff --git a/studio/src/plugins/object_viewer/graphics_settings_page.cpp b/studio/src/plugins/object_viewer/graphics_settings_page.cpp index 870af9bf22..4053b452c1 100644 --- a/studio/src/plugins/object_viewer/graphics_settings_page.cpp +++ b/studio/src/plugins/object_viewer/graphics_settings_page.cpp @@ -25,8 +25,8 @@ #include "modules.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/graphics_viewport.cpp b/studio/src/plugins/object_viewer/graphics_viewport.cpp index 0cec0be104..cb7240f651 100644 --- a/studio/src/plugins/object_viewer/graphics_viewport.cpp +++ b/studio/src/plugins/object_viewer/graphics_viewport.cpp @@ -17,18 +17,18 @@ */ +// Qt includes +#include +#include +#include +#include + #include "stdpch.h" #include "graphics_viewport.h" #include "../core/Nel3DWidget/nel3d_widget.h" // STL includes -// Qt includes -#include -#include -#include -#include - // NeL includes #include diff --git a/studio/src/plugins/object_viewer/main_window.cpp b/studio/src/plugins/object_viewer/main_window.cpp index dc0c221ccf..7e121bafeb 100644 --- a/studio/src/plugins/object_viewer/main_window.cpp +++ b/studio/src/plugins/object_viewer/main_window.cpp @@ -23,7 +23,9 @@ // STL includes // Qt includes -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/main_window.h b/studio/src/plugins/object_viewer/main_window.h index dff4d9b4b8..f7b0ead8d7 100644 --- a/studio/src/plugins/object_viewer/main_window.h +++ b/studio/src/plugins/object_viewer/main_window.h @@ -23,9 +23,9 @@ // STL includes // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/object_viewer_plugin.cpp b/studio/src/plugins/object_viewer/object_viewer_plugin.cpp index a4c9481402..14a7d1a844 100644 --- a/studio/src/plugins/object_viewer/object_viewer_plugin.cpp +++ b/studio/src/plugins/object_viewer/object_viewer_plugin.cpp @@ -84,5 +84,3 @@ QWidget *CObjectViewerContext::widget() } } - -Q_EXPORT_PLUGIN(NLQT::ObjectViewerPlugin) \ No newline at end of file diff --git a/studio/src/plugins/object_viewer/object_viewer_plugin.h b/studio/src/plugins/object_viewer/object_viewer_plugin.h index 5018501bf2..311a2af8f7 100644 --- a/studio/src/plugins/object_viewer/object_viewer_plugin.h +++ b/studio/src/plugins/object_viewer/object_viewer_plugin.h @@ -28,6 +28,7 @@ namespace NLQT class ObjectViewerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp b/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp index e00d07cecf..32096cc920 100644 --- a/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp @@ -21,7 +21,7 @@ #include "attrib_widget.h" // Qt includes -#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/attrib_widget.h b/studio/src/plugins/object_viewer/particle_system/attrib_widget.h index da308aba79..cc2a62d01c 100644 --- a/studio/src/plugins/object_viewer/particle_system/attrib_widget.h +++ b/studio/src/plugins/object_viewer/particle_system/attrib_widget.h @@ -24,7 +24,7 @@ #include "ui_attrib_form.h" // Qt includes -#include +#include // STL includes diff --git a/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h b/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h index 3180e5d849..4c44fa9166 100644 --- a/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h @@ -24,12 +24,12 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // NeL includes #include "nel/3d/ps_attrib_maker_bin_op.h" diff --git a/studio/src/plugins/object_viewer/particle_system/curve_dialog.h b/studio/src/plugins/object_viewer/particle_system/curve_dialog.h index 29a1baec5d..2f5fc3ba05 100644 --- a/studio/src/plugins/object_viewer/particle_system/curve_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/curve_dialog.h @@ -27,10 +27,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // Project includes #include "hoverpoints.h" diff --git a/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp b/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp index 2bef5e9b5e..d122c0513c 100644 --- a/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp @@ -21,9 +21,9 @@ #include "direction_widget.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp b/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp index fe81a245af..67f68e437e 100644 --- a/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp @@ -21,7 +21,7 @@ #include "emitter_page.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h b/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h index cf7040d4d8..92c528fb95 100644 --- a/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h @@ -20,12 +20,12 @@ #ifndef FOLLOW_PATH_DIALOG_H #define FOLLOW_PATH_DIALOG_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace NL3D { diff --git a/studio/src/plugins/object_viewer/particle_system/located_page.cpp b/studio/src/plugins/object_viewer/particle_system/located_page.cpp index adc38dbee8..0d950edf25 100644 --- a/studio/src/plugins/object_viewer/particle_system/located_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/located_page.cpp @@ -21,8 +21,8 @@ #include "located_page.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp b/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp index e92ca7e203..aa66d7f1f2 100644 --- a/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp @@ -20,9 +20,9 @@ #include "stdpch.h" // Qt include -#include -#include -#include +#include +#include +#include // NeL include #include diff --git a/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp index 20e19b5397..7825edb5d0 100644 --- a/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp @@ -21,7 +21,7 @@ #include "morph_mesh_dialog.h" // Qt include -#include +#include // NeL includes #include "nel/3d/ps_mesh.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp index 2f9135e3da..bc67409e8b 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp @@ -21,7 +21,7 @@ #include "particle_force_page.h" // Qt includes -#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp index ba5a8efaab..6f500b4136 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp @@ -21,7 +21,7 @@ #include "particle_link_skeleton_dialog.h" // Qt includes -#include +#include // Project includes #include "modules.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h b/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h index dc7e5dfe88..ad6a8c4db4 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h @@ -21,11 +21,11 @@ #define PARTICLE_PROPERTY_DIALOG_H // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // NeL includes #include "nel/misc/smart_ptr.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp index ee9e77466a..dcbdc589ac 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp @@ -21,7 +21,7 @@ #include "particle_sound_page.h" // Qt includes -#include +#include // NeL includes #include "nel/3d/ps_located.h" @@ -86,7 +86,7 @@ void CSoundPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBindab _ui.pitchWidget->setWorkspaceNode(_Node); _ui.pitchWidget->updateUi(); - _ui.soundNameLineEdit->setText(QString(_Sound->getSoundName().toString().c_str())); + _ui.soundNameLineEdit->setText(QString(_Sound->getSoundName()->c_str())); _ui.spawnCheckBox->setChecked(_Sound->getSpawn()); _ui.muteCheckBox->setChecked(_Sound->getMute()); @@ -95,7 +95,7 @@ void CSoundPage::setEditedItem(CWorkspaceNode *ownerNode, NL3D::CPSLocatedBindab void CSoundPage::browse() { - std::vector names; + std::vector names; NLSOUND::UAudioMixer *audioMixer = Modules::sound().getAudioMixer(); @@ -108,7 +108,7 @@ void CSoundPage::browse() QStringList items; items << tr(""); for(size_t i = 0; i < names.size(); ++i) - items << QString(names[i].toString().c_str()); + items << QString(names[i]->c_str()); bool ok; QString item = QInputDialog::getItem(this, tr("Select your sound"), @@ -162,7 +162,7 @@ void CSoundPage::setKeepPitch(bool state) void CSoundPage::setSoundName(const QString &text) { - _Sound->setSoundName(NLMISC::CSheetId(text.toUtf8().constData())); + _Sound->setSoundName(NLMISC::CStringMapper::map(text.toUtf8().constData())); } void CSoundPage::setEmissionPercent(float value) diff --git a/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp index 7cdf0895b5..9fcc4824fc 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp @@ -21,10 +21,10 @@ #include "particle_system_page.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp b/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp index 82e171f19d..e0c77d551c 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp @@ -21,8 +21,8 @@ #include "particle_texture_widget.h" // Qt include -#include -#include +#include +#include // NeL includes #include "nel/3d/texture_file.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp index 4c92a5fc45..029f33e833 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp @@ -33,10 +33,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // Project includes #include "dup_ps.h" diff --git a/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp b/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp index 62ffb6d3b3..af886b9842 100644 --- a/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp +++ b/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp @@ -21,9 +21,9 @@ #include "particle_workspace_page.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h b/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h index 4d5839a5a1..298e5fe7ac 100644 --- a/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h @@ -21,9 +21,9 @@ #define SPINNER_DIALOG_H // Qt includes -#include -#include -#include +#include +#include +#include // Nel include #include "nel/3d/ps_plane_basis_maker.h" diff --git a/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h b/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h index 764160916a..f586290394 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h @@ -23,11 +23,11 @@ #include // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // STL includes diff --git a/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h b/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h index 2600e0bb8f..df2ef6a8c5 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h @@ -23,10 +23,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // NeL include #include "nel/3d/ps_attrib_maker.h" diff --git a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp index 5754b181e6..a6cc6329eb 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp +++ b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp @@ -23,7 +23,7 @@ #include "value_gradient_dialog.h" // Qt include -#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h index afa67e8431..f17edf4826 100644 --- a/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h +++ b/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h @@ -29,16 +29,16 @@ #include "particle_node.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/plugin-metadata.json b/studio/src/plugins/object_viewer/plugin-metadata.json new file mode 100644 index 0000000000..ef4345b8c3 --- /dev/null +++ b/studio/src/plugins/object_viewer/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "ObjectViewer", + "Version" : "0.8", + "Vendor": "Ryzom Core", + "Description": "Object Viewer plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp b/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp index f2d5e65671..0a73a5ccca 100644 --- a/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp @@ -21,7 +21,7 @@ #include "animation_set_dialog.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/scene/camera_control.h b/studio/src/plugins/object_viewer/scene/camera_control.h index 50d10a2303..97281b9048 100644 --- a/studio/src/plugins/object_viewer/scene/camera_control.h +++ b/studio/src/plugins/object_viewer/scene/camera_control.h @@ -23,13 +23,13 @@ // STL includes // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp b/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp index 2e3184367d..30d4d8bcbf 100644 --- a/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp @@ -25,9 +25,9 @@ #include "modules.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp b/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp index 8145c0bcc4..c8daa71ef3 100644 --- a/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp @@ -21,8 +21,8 @@ #include "skeleton_scale_dialog.h" // Qt include -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp index f846bdf4a6..0230f32901 100644 --- a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp +++ b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp @@ -21,7 +21,7 @@ #include "slot_manager_dialog.h" // Qt includes -#include +#include // NeL includes diff --git a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h index a25d4121a9..0f71838ae1 100644 --- a/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h +++ b/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h @@ -23,8 +23,9 @@ #include #include "ui_slot_form.h" -#include -#include +#include +#include +#include #include "nel/3d/channel_mixer.h" diff --git a/studio/src/plugins/object_viewer/sound_settings_page.cpp b/studio/src/plugins/object_viewer/sound_settings_page.cpp index 02815919b7..90dfc902af 100644 --- a/studio/src/plugins/object_viewer/sound_settings_page.cpp +++ b/studio/src/plugins/object_viewer/sound_settings_page.cpp @@ -25,9 +25,9 @@ #include "modules.h" // Qt includes -#include -#include -#include +#include +#include +#include namespace NLQT { diff --git a/studio/src/plugins/object_viewer/sound_system.cpp b/studio/src/plugins/object_viewer/sound_system.cpp index 702e963f09..fcc39c15df 100644 --- a/studio/src/plugins/object_viewer/sound_system.cpp +++ b/studio/src/plugins/object_viewer/sound_system.cpp @@ -99,7 +99,7 @@ void CSoundSystem::init() _AudioMixer->getDevices(devices); NLSOUND::UAudioMixer::CInitInfo audioInfo; audioInfo.AutoLoadSample = settings->value(Constants::SOUND_AUTO_LOAD_SAMPLE, true).toBool(); - audioInfo.EnableOccludeObstruct = settings->value(Constants::SOUND_ENABLE_OCCLUDE_OBSTRUCT, true).toBool(); + audioInfo.EnableOcclusionObstruction = settings->value(Constants::SOUND_ENABLE_OCCLUDE_OBSTRUCT, true).toBool(); audioInfo.EnableReverb = settings->value(Constants::SOUND_ENABLE_REVERB, true).toBool(); audioInfo.ManualRolloff = settings->value(Constants::SOUND_MANUAL_ROLL_OFF, true).toBool(); audioInfo.ForceSoftware = settings->value(Constants::SOUND_FORCE_SOFTWARE, false).toBool(); @@ -162,7 +162,7 @@ void CSoundSystem::play(const std::string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), true); + NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CStringMapper::map(soundName), true); if (src) { // FIXME: Use relative positioning, and set pos to 0,0,0 @@ -182,7 +182,7 @@ NLSOUND::USource *CSoundSystem::create(const std::string &soundName) { if (_AudioMixer) { - NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CSheetId(soundName, "sound"), false); + NLSOUND::USource *src = _AudioMixer->createSource(NLMISC::CStringMapper::map(soundName), false); if (src) { // FIXME: Use relative positioning, and set pos to 0,0,0 diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp index 0366bc11f9..e453c664e0 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp @@ -21,9 +21,9 @@ #include "vegetable_appearance_page.h" // Qt includes -#include -#include -#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp index ba70b4c9fd..5d516b115e 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp @@ -21,8 +21,8 @@ #include "vegetable_density_page.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp index 2fc621411c..e726bbe78f 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp @@ -21,8 +21,8 @@ #include "vegetable_dialog.h" // Qt includes -#include -#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp b/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp index 73b6396477..3dfce2209d 100644 --- a/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp +++ b/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp @@ -25,11 +25,11 @@ #include "../core/icore.h" // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // NeL includes #include diff --git a/studio/src/plugins/object_viewer/vegetable_settings_page.cpp b/studio/src/plugins/object_viewer/vegetable_settings_page.cpp index cdf0ce4be8..6ace4ad6a8 100644 --- a/studio/src/plugins/object_viewer/vegetable_settings_page.cpp +++ b/studio/src/plugins/object_viewer/vegetable_settings_page.cpp @@ -25,10 +25,10 @@ #include "modules.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace NLQT { diff --git a/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp b/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp index 65d9db58d5..9b9ff993c8 100644 --- a/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp +++ b/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp @@ -21,9 +21,9 @@ #include "color_edit_widget.h" // Qt includes -#include -#include -#include +#include +#include +#include // Nel includes #include diff --git a/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp b/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp index 184053ab9d..c3f3ec7ade 100644 --- a/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp +++ b/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp @@ -20,6 +20,8 @@ #include "stdpch.h" #include "hoverpoints.h" +#include + #define printf HoverPoints::HoverPoints(QWidget *widget, PointShape shape) diff --git a/studio/src/plugins/object_viewer/widgets/hoverpoints.h b/studio/src/plugins/object_viewer/widgets/hoverpoints.h index f6a6e8b764..b4e2fbf222 100644 --- a/studio/src/plugins/object_viewer/widgets/hoverpoints.h +++ b/studio/src/plugins/object_viewer/widgets/hoverpoints.h @@ -20,7 +20,8 @@ #ifndef HOVERPOINTS_H #define HOVERPOINTS_H -#include +#include +#include QT_FORWARD_DECLARE_CLASS(QBypassWidget) From 8d545150f68bcd5d4295f5fcbc102234e89ce967 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 20:57:05 +0100 Subject: [PATCH 15/28] migrate studio sheet builder plugin to qt5 --- studio/src/CMakeLists.txt | 7 ++++--- .../ovqt_sheet_builder/ovqt_sheet_builder.cpp | 14 ++++++-------- .../ovqt_sheet_builder/ovqt_sheet_builder.h | 3 ++- .../ovqt_sheet_builder/plugin-metadata.json | 6 ++++++ .../src/plugins/ovqt_sheet_builder/sheetbuilder.h | 3 ++- 5 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 505ce7323f..e0df3a04fe 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -61,12 +61,13 @@ add_dependencies(studio studio_plugin_bnp_manager studio_plugin_core studio_plugin_disp_sheet_id - studio_plugin_log studio_plugin_example - studio_plugin_mission_compiler - studio_plugin_object_viewer studio_plugin_georges_editor studio_plugin_landscape_editor + studio_plugin_log + studio_plugin_mission_compiler + studio_plugin_object_viewer + studio_plugin_sheet_builder studio_plugin_world_editor ) diff --git a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp index ecb7c8d316..3c1c72af6c 100644 --- a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp +++ b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp @@ -30,12 +30,12 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include using namespace Plugin; @@ -90,5 +90,3 @@ void SheetBuilderPlugin::setNelContext(NLMISC::INelContext *nelContext) #endif // NL_OS_WINDOWS m_LibContext = new NLMISC::CLibraryContext(*nelContext); } - -Q_EXPORT_PLUGIN(SheetBuilderPlugin) diff --git a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h index 2a1328caf5..f9841acbef 100644 --- a/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h +++ b/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h @@ -25,7 +25,7 @@ #include "nel/misc/app_context.h" -#include +#include namespace NLMISC { @@ -38,6 +38,7 @@ namespace Plugin class SheetBuilderPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: SheetBuilderPlugin(); diff --git a/studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json b/studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json new file mode 100644 index 0000000000..4756ee852a --- /dev/null +++ b/studio/src/plugins/ovqt_sheet_builder/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "SheetBuilder", + "Version" : "1.0", + "Vendor": "kharvd", + "Description": "make_sheet_id equivalent" +} \ No newline at end of file diff --git a/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h b/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h index f976513f7d..e8eabc995b 100644 --- a/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h +++ b/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h @@ -145,7 +145,8 @@ void readFormId( string &outputFileName ) map::iterator itFT = FileTypeToId.find(fileType); if( itFT == FileTypeToId.end() ) { - FileTypeToId.insert( make_pair(fileType,fid.FormIDInfos.Type) ); + uint8 type ( fid.FormIDInfos.Type); + FileTypeToId.insert( make_pair(fileType,type) ); } } else From ff4dcd04fd5ce50debe91bc18e50ff2b26ab0e18 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 21:39:25 +0100 Subject: [PATCH 16/28] migrate studio gui editor plugin to qt5 --- studio/src/CMakeLists.txt | 1 + studio/src/plugins/gui_editor/CMakeLists.txt | 2 +- studio/src/plugins/gui_editor/action_property_manager.h | 2 +- studio/src/plugins/gui_editor/gui_editor_plugin.cpp | 2 -- studio/src/plugins/gui_editor/gui_editor_plugin.h | 1 + studio/src/plugins/gui_editor/gui_editor_window.cpp | 6 +++--- studio/src/plugins/gui_editor/gui_editor_window.h | 2 +- studio/src/plugins/gui_editor/plugin-metadata.json | 6 ++++++ studio/src/plugins/gui_editor/property_browser_ctrl.cpp | 8 ++++---- studio/src/plugins/gui_editor/texture_property_manager.h | 2 +- 10 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 studio/src/plugins/gui_editor/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index e0df3a04fe..242fdc2ea0 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -63,6 +63,7 @@ add_dependencies(studio studio_plugin_disp_sheet_id studio_plugin_example studio_plugin_georges_editor + studio_plugin_gui_editor studio_plugin_landscape_editor studio_plugin_log studio_plugin_mission_compiler diff --git a/studio/src/plugins/gui_editor/CMakeLists.txt b/studio/src/plugins/gui_editor/CMakeLists.txt index 9eb188eded..cdeb310963 100644 --- a/studio/src/plugins/gui_editor/CMakeLists.txt +++ b/studio/src/plugins/gui_editor/CMakeLists.txt @@ -89,7 +89,7 @@ TARGET_LINK_LIBRARIES( nelgui ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} - qt_property_browser + ${QtPropertyBrowser_LIBRARY} ) NL_DEFAULT_PROPS(studio_plugin_gui_editor "Tools: Studio Plugin: GUI Editor") diff --git a/studio/src/plugins/gui_editor/action_property_manager.h b/studio/src/plugins/gui_editor/action_property_manager.h index 9bc187dd92..2b77995d86 100644 --- a/studio/src/plugins/gui_editor/action_property_manager.h +++ b/studio/src/plugins/gui_editor/action_property_manager.h @@ -23,7 +23,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT -#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include #include /////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// diff --git a/studio/src/plugins/gui_editor/gui_editor_plugin.cpp b/studio/src/plugins/gui_editor/gui_editor_plugin.cpp index a75190fa39..488570fe4f 100644 --- a/studio/src/plugins/gui_editor/gui_editor_plugin.cpp +++ b/studio/src/plugins/gui_editor/gui_editor_plugin.cpp @@ -84,5 +84,3 @@ namespace GUIEditor } } - -Q_EXPORT_PLUGIN(GUIEditor::GUIEditorPlugin) \ No newline at end of file diff --git a/studio/src/plugins/gui_editor/gui_editor_plugin.h b/studio/src/plugins/gui_editor/gui_editor_plugin.h index 30d4f3f452..800d108c2a 100644 --- a/studio/src/plugins/gui_editor/gui_editor_plugin.h +++ b/studio/src/plugins/gui_editor/gui_editor_plugin.h @@ -46,6 +46,7 @@ namespace GUIEditor class GUIEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: virtual ~GUIEditorPlugin(); diff --git a/studio/src/plugins/gui_editor/gui_editor_window.cpp b/studio/src/plugins/gui_editor/gui_editor_window.cpp index 74ff0791ae..b722a7336d 100644 --- a/studio/src/plugins/gui_editor/gui_editor_window.cpp +++ b/studio/src/plugins/gui_editor/gui_editor_window.cpp @@ -27,11 +27,11 @@ #include -#include -#include +#include +#include #include #include -#include "../../3rdparty/qtpropertybrowser/QtTreePropertyBrowser" +#include #include "widget_properties.h" #include "widget_info_tree.h" diff --git a/studio/src/plugins/gui_editor/gui_editor_window.h b/studio/src/plugins/gui_editor/gui_editor_window.h index 57ac32020e..1eab073c71 100644 --- a/studio/src/plugins/gui_editor/gui_editor_window.h +++ b/studio/src/plugins/gui_editor/gui_editor_window.h @@ -21,7 +21,7 @@ #define GUI_EDITOR_WINDOW_H #include "ui_gui_editor_window.h" -#include +#include #include #include #include "widget_info.h" diff --git a/studio/src/plugins/gui_editor/plugin-metadata.json b/studio/src/plugins/gui_editor/plugin-metadata.json new file mode 100644 index 0000000000..abbd16327e --- /dev/null +++ b/studio/src/plugins/gui_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "GUI Editor", + "Version" : "0.0.1", + "Vendor": "Ryzom Core", + "Description": "GUI Editor plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/gui_editor/property_browser_ctrl.cpp b/studio/src/plugins/gui_editor/property_browser_ctrl.cpp index b8a38ad930..8461ddc8c8 100644 --- a/studio/src/plugins/gui_editor/property_browser_ctrl.cpp +++ b/studio/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -19,10 +19,10 @@ #include "property_browser_ctrl.h" -#include "../../3rdparty/qtpropertybrowser/QtVariantPropertyManager" -#include "../../3rdparty/qtpropertybrowser/QtEnumPropertyManager" -#include "../../3rdparty/qtpropertybrowser/QtTreePropertyBrowser" -#include "../../3rdparty/qtpropertybrowser/QtEnumEditorFactory" +#include +#include +#include +#include #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" #include diff --git a/studio/src/plugins/gui_editor/texture_property_manager.h b/studio/src/plugins/gui_editor/texture_property_manager.h index 9af7de8c4e..2355f7e47b 100644 --- a/studio/src/plugins/gui_editor/texture_property_manager.h +++ b/studio/src/plugins/gui_editor/texture_property_manager.h @@ -23,7 +23,7 @@ #define QT_QTPROPERTYBROWSER_IMPORT -#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include #include /////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// From 6a24b550854b061386c058c6805a17d946085e28 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 21:47:21 +0100 Subject: [PATCH 17/28] migrate studio tile editor plugin to qt5 --- studio/src/CMakeLists.txt | 1 + .../src/plugins/tile_editor/plugin-metadata.json | 6 ++++++ .../tile_editor/tile_editor_main_window.cpp | 6 +++--- .../plugins/tile_editor/tile_editor_main_window.h | 2 +- .../src/plugins/tile_editor/tile_editor_plugin.cpp | 14 ++++++-------- .../src/plugins/tile_editor/tile_editor_plugin.h | 1 + .../src/plugins/tile_editor/tile_item_delegate.cpp | 1 + .../src/plugins/tile_editor/tile_item_delegate.h | 2 +- 8 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 studio/src/plugins/tile_editor/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 242fdc2ea0..bc217089dd 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -69,6 +69,7 @@ add_dependencies(studio studio_plugin_mission_compiler studio_plugin_object_viewer studio_plugin_sheet_builder + studio_plugin_tile_editor studio_plugin_world_editor ) diff --git a/studio/src/plugins/tile_editor/plugin-metadata.json b/studio/src/plugins/tile_editor/plugin-metadata.json new file mode 100644 index 0000000000..2712d52404 --- /dev/null +++ b/studio/src/plugins/tile_editor/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "TileEditor", + "Version" : "1.0", + "Vendor": "Ryzom Core", + "Description": "Tile bank editing plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/tile_editor/tile_editor_main_window.cpp b/studio/src/plugins/tile_editor/tile_editor_main_window.cpp index d0dd5faa47..e698952c0f 100644 --- a/studio/src/plugins/tile_editor/tile_editor_main_window.cpp +++ b/studio/src/plugins/tile_editor/tile_editor_main_window.cpp @@ -22,9 +22,9 @@ #include "nel/misc/path.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/studio/src/plugins/tile_editor/tile_editor_main_window.h b/studio/src/plugins/tile_editor/tile_editor_main_window.h index 628bf3d495..f2e0ce6138 100644 --- a/studio/src/plugins/tile_editor/tile_editor_main_window.h +++ b/studio/src/plugins/tile_editor/tile_editor_main_window.h @@ -26,7 +26,7 @@ #include "nel/misc/types_nl.h" #include "nel/misc/sheet_id.h" -#include +#include #include namespace Ui { diff --git a/studio/src/plugins/tile_editor/tile_editor_plugin.cpp b/studio/src/plugins/tile_editor/tile_editor_plugin.cpp index ac1bc225e3..0c5cce9867 100644 --- a/studio/src/plugins/tile_editor/tile_editor_plugin.cpp +++ b/studio/src/plugins/tile_editor/tile_editor_plugin.cpp @@ -26,12 +26,12 @@ #include "../core/core_constants.h" // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // NeL includes #include "nel/misc/debug.h" @@ -78,5 +78,3 @@ void TileEditorPlugin::addAutoReleasedObject(QObject *obj) m_plugMan->addObject(obj); m_autoReleaseObjects.prepend(obj); } - -Q_EXPORT_PLUGIN(TileEditorPlugin) diff --git a/studio/src/plugins/tile_editor/tile_editor_plugin.h b/studio/src/plugins/tile_editor/tile_editor_plugin.h index 20a20111e3..c5fe65ed5b 100644 --- a/studio/src/plugins/tile_editor/tile_editor_plugin.h +++ b/studio/src/plugins/tile_editor/tile_editor_plugin.h @@ -41,6 +41,7 @@ namespace TileEditorPluginQt class TileEditorPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: diff --git a/studio/src/plugins/tile_editor/tile_item_delegate.cpp b/studio/src/plugins/tile_editor/tile_item_delegate.cpp index a3f50e691a..26654e9838 100644 --- a/studio/src/plugins/tile_editor/tile_item_delegate.cpp +++ b/studio/src/plugins/tile_editor/tile_item_delegate.cpp @@ -18,6 +18,7 @@ // along with this program. If not, see . #include +#include #include diff --git a/studio/src/plugins/tile_editor/tile_item_delegate.h b/studio/src/plugins/tile_editor/tile_item_delegate.h index 00bd521c0f..ac9d7632be 100644 --- a/studio/src/plugins/tile_editor/tile_item_delegate.h +++ b/studio/src/plugins/tile_editor/tile_item_delegate.h @@ -20,7 +20,7 @@ #ifndef TILE_ITEM_DELEGATE_H #define TILE_ITEM_DELEGATE_H -#include +#include #include #include From ad9f5a2b8e9eef487d7209cc4478147c68356e6c Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 22:19:54 +0100 Subject: [PATCH 18/28] partially migrate studio translation manager plugin to qt5 --- studio/src/CMakeLists.txt | 1 + .../translation_manager/editor_phrase.cpp | 16 +++++++------- .../translation_manager/editor_phrase.h | 22 +++++++++---------- .../translation_manager/editor_worksheet.cpp | 14 ++++++------ .../translation_manager/editor_worksheet.h | 14 ++++++------ .../translation_manager/ftp_selection.cpp | 6 ++--- .../translation_manager/ftp_selection.h | 14 ++++++------ .../translation_manager/plugin-metadata.json | 6 +++++ .../translation_manager/source_selection.cpp | 2 +- .../translation_manager/source_selection.h | 8 +++---- .../translation_manager_editor.h | 12 +++++----- .../translation_manager_main_window.h | 16 +++++++------- .../translation_manager_plugin.cpp | 16 ++++++-------- .../translation_manager_plugin.h | 5 +++-- .../translation_manager_settings_page.cpp | 8 +++---- 15 files changed, 83 insertions(+), 77 deletions(-) create mode 100644 studio/src/plugins/translation_manager/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index bc217089dd..9e7f07ace7 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -70,6 +70,7 @@ add_dependencies(studio studio_plugin_object_viewer studio_plugin_sheet_builder studio_plugin_tile_editor +# studio_plugin_translation_manager # requires QFtp which is removed in qt5 studio_plugin_world_editor ) diff --git a/studio/src/plugins/translation_manager/editor_phrase.cpp b/studio/src/plugins/translation_manager/editor_phrase.cpp index 510255828d..8ea09f0229 100644 --- a/studio/src/plugins/translation_manager/editor_phrase.cpp +++ b/studio/src/plugins/translation_manager/editor_phrase.cpp @@ -23,14 +23,14 @@ #include "nel/misc/diff_tool.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace std; diff --git a/studio/src/plugins/translation_manager/editor_phrase.h b/studio/src/plugins/translation_manager/editor_phrase.h index 404a17d515..63eee91257 100644 --- a/studio/src/plugins/translation_manager/editor_phrase.h +++ b/studio/src/plugins/translation_manager/editor_phrase.h @@ -24,17 +24,17 @@ #include "translation_manager_editor.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace TranslationManager diff --git a/studio/src/plugins/translation_manager/editor_worksheet.cpp b/studio/src/plugins/translation_manager/editor_worksheet.cpp index 4ea127527a..4c3164a5c6 100644 --- a/studio/src/plugins/translation_manager/editor_worksheet.cpp +++ b/studio/src/plugins/translation_manager/editor_worksheet.cpp @@ -23,13 +23,13 @@ #include "translation_manager_constants.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include using namespace std; diff --git a/studio/src/plugins/translation_manager/editor_worksheet.h b/studio/src/plugins/translation_manager/editor_worksheet.h index 498f51564f..ed3b6c2a87 100644 --- a/studio/src/plugins/translation_manager/editor_worksheet.h +++ b/studio/src/plugins/translation_manager/editor_worksheet.h @@ -32,13 +32,13 @@ #include "nel/ligo/ligo_config.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace TranslationManager diff --git a/studio/src/plugins/translation_manager/ftp_selection.cpp b/studio/src/plugins/translation_manager/ftp_selection.cpp index ddaad8745a..de016b9d31 100644 --- a/studio/src/plugins/translation_manager/ftp_selection.cpp +++ b/studio/src/plugins/translation_manager/ftp_selection.cpp @@ -19,8 +19,8 @@ #include "ftp_selection.h" -#include -#include +#include +#include namespace TranslationManager { @@ -49,7 +49,7 @@ CFtpSelection::CFtpSelection(QWidget *parent): QDialog(parent) // Connection with the FTP Server. We retrieve the file list. void CFtpSelection::ConnectButtonClicked() { - conn = new QFtp(this); + conn = new QNetworkAccessManager(this); connect(conn, SIGNAL(commandFinished(int,bool)), this, SLOT(FtpCommandFinished(int,bool))); connect(conn, SIGNAL(listInfo(QUrlInfo)), this, SLOT(AddToList(QUrlInfo))); diff --git a/studio/src/plugins/translation_manager/ftp_selection.h b/studio/src/plugins/translation_manager/ftp_selection.h index 9f8af85ddd..f5825c941f 100644 --- a/studio/src/plugins/translation_manager/ftp_selection.h +++ b/studio/src/plugins/translation_manager/ftp_selection.h @@ -10,12 +10,12 @@ #include "ui_ftp_selection.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include namespace TranslationManager @@ -41,7 +41,7 @@ private Q_SLOTS: private: Ui::FtpSelectionDialog _ui; - QFtp *conn; + QNetworkAccessManager *conn; QHash isDirectory; QString currentPath; }; diff --git a/studio/src/plugins/translation_manager/plugin-metadata.json b/studio/src/plugins/translation_manager/plugin-metadata.json new file mode 100644 index 0000000000..dbd62bb14f --- /dev/null +++ b/studio/src/plugins/translation_manager/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "TranslationManager", + "Version" : "0.8", + "Vendor": "Ryzom Core", + "Description": "Translation Manager plugin." +} \ No newline at end of file diff --git a/studio/src/plugins/translation_manager/source_selection.cpp b/studio/src/plugins/translation_manager/source_selection.cpp index 043d82b3d8..bf06745135 100644 --- a/studio/src/plugins/translation_manager/source_selection.cpp +++ b/studio/src/plugins/translation_manager/source_selection.cpp @@ -21,7 +21,7 @@ #include "source_selection.h" -#include +#include namespace TranslationManager { diff --git a/studio/src/plugins/translation_manager/source_selection.h b/studio/src/plugins/translation_manager/source_selection.h index 5d7c7b4601..29de4f1d8f 100644 --- a/studio/src/plugins/translation_manager/source_selection.h +++ b/studio/src/plugins/translation_manager/source_selection.h @@ -22,10 +22,10 @@ #include "ui_source_selection.h" -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/studio/src/plugins/translation_manager/translation_manager_editor.h b/studio/src/plugins/translation_manager/translation_manager_editor.h index 1141f43fdb..c94c95c49f 100644 --- a/studio/src/plugins/translation_manager/translation_manager_editor.h +++ b/studio/src/plugins/translation_manager/translation_manager_editor.h @@ -21,12 +21,12 @@ #ifndef TRANSLATION_MANAGER_EDITOR_H #define TRANSLATION_MANAGER_EDITOR_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace TranslationManager { diff --git a/studio/src/plugins/translation_manager/translation_manager_main_window.h b/studio/src/plugins/translation_manager/translation_manager_main_window.h index d278a02b97..506dc4a1f1 100644 --- a/studio/src/plugins/translation_manager/translation_manager_main_window.h +++ b/studio/src/plugins/translation_manager/translation_manager_main_window.h @@ -32,14 +32,14 @@ #include "../core/icore_listener.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // STL includes #include diff --git a/studio/src/plugins/translation_manager/translation_manager_plugin.cpp b/studio/src/plugins/translation_manager/translation_manager_plugin.cpp index 1e4db0c18b..945d212c85 100644 --- a/studio/src/plugins/translation_manager/translation_manager_plugin.cpp +++ b/studio/src/plugins/translation_manager/translation_manager_plugin.cpp @@ -34,13 +34,13 @@ #include "nel/misc/debug.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace TranslationManager { @@ -92,5 +92,3 @@ void TranslationManagerPlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(TranslationManager::TranslationManagerPlugin) \ No newline at end of file diff --git a/studio/src/plugins/translation_manager/translation_manager_plugin.h b/studio/src/plugins/translation_manager/translation_manager_plugin.h index 0b3fb1f1e4..4c81e20abb 100644 --- a/studio/src/plugins/translation_manager/translation_manager_plugin.h +++ b/studio/src/plugins/translation_manager/translation_manager_plugin.h @@ -30,8 +30,8 @@ #include "nel/misc/app_context.h" // Qt includes -#include -#include +#include +#include using namespace std; @@ -53,6 +53,7 @@ class CTranslationManagerContext; class TranslationManagerPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: virtual ~TranslationManagerPlugin(); diff --git a/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp b/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp index 54fcd473c3..2c0cae2920 100644 --- a/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp +++ b/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp @@ -23,10 +23,10 @@ #include "../core/icore.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include namespace TranslationManager { From c453324d0fc523ed511589abe999cd5881f8504d Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 14 Jan 2024 22:39:49 +0100 Subject: [PATCH 19/28] partially migrate zone painter manager plugin to qt5 --- studio/src/CMakeLists.txt | 1 + studio/src/plugins/zone_painter/CMakeLists.txt | 6 +++--- studio/src/plugins/zone_painter/plugin-metadata.json | 6 ++++++ studio/src/plugins/zone_painter/qnel_widget.h | 4 ++-- studio/src/plugins/zone_painter/zone_painter_main_window.h | 2 +- studio/src/plugins/zone_painter/zone_painter_plugin.cpp | 2 -- studio/src/plugins/zone_painter/zone_painter_plugin.h | 1 + 7 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 studio/src/plugins/zone_painter/plugin-metadata.json diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index 9e7f07ace7..b7831cc925 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -72,6 +72,7 @@ add_dependencies(studio studio_plugin_tile_editor # studio_plugin_translation_manager # requires QFtp which is removed in qt5 studio_plugin_world_editor +# studio_plugin_zone_painter ) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/studio/src/plugins/zone_painter/CMakeLists.txt b/studio/src/plugins/zone_painter/CMakeLists.txt index fef437ec09..783f8a6202 100644 --- a/studio/src/plugins/zone_painter/CMakeLists.txt +++ b/studio/src/plugins/zone_painter/CMakeLists.txt @@ -21,9 +21,9 @@ SET(OVQT_PLUG_ZONE_PAINTER_RCS zone_painter.qrc) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) -QT4_WRAP_CPP(OVQT_PLUG_ZONE_PAINTER_MOC_SRC ${OVQT_PLUG_ZONE_PAINTER_HDR}) -QT4_ADD_RESOURCES( OVQT_PLUG_ZONE_PAINTER_RC_SRCS ${OVQT_PLUG_ZONE_PAINTER_RCS}) -QT4_WRAP_UI(OVQT_PLUG_ZONE_PAINTER_UI_HDRS ${OVQT_PLUG_ZONE_PAINTER_UIS}) +QT5_WRAP_CPP(OVQT_PLUG_ZONE_PAINTER_MOC_SRC ${OVQT_PLUG_ZONE_PAINTER_HDR}) +QT5_ADD_RESOURCES( OVQT_PLUG_ZONE_PAINTER_RC_SRCS ${OVQT_PLUG_ZONE_PAINTER_RCS}) +QT5_WRAP_UI(OVQT_PLUG_ZONE_PAINTER_UI_HDRS ${OVQT_PLUG_ZONE_PAINTER_UIS}) SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_ZONE_PAINTER_UIS} ${OVQT_PLUG_ZONE_PAINTER_RCS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_ZONE_PAINTER_UI_HDRS}) diff --git a/studio/src/plugins/zone_painter/plugin-metadata.json b/studio/src/plugins/zone_painter/plugin-metadata.json new file mode 100644 index 0000000000..5eccd229c8 --- /dev/null +++ b/studio/src/plugins/zone_painter/plugin-metadata.json @@ -0,0 +1,6 @@ +{ + "Name" : "ZonePainter", + "Version" : "0.0", + "Vendor": "Ryzom Core", + "Description": "Zone Painter Plugin" +} \ No newline at end of file diff --git a/studio/src/plugins/zone_painter/qnel_widget.h b/studio/src/plugins/zone_painter/qnel_widget.h index 77ecf6da36..79a2f0171f 100644 --- a/studio/src/plugins/zone_painter/qnel_widget.h +++ b/studio/src/plugins/zone_painter/qnel_widget.h @@ -27,8 +27,8 @@ #include // Qt includes -#include -#include +#include +#include class QAction; diff --git a/studio/src/plugins/zone_painter/zone_painter_main_window.h b/studio/src/plugins/zone_painter/zone_painter_main_window.h index caa4433e42..56ac90d58e 100644 --- a/studio/src/plugins/zone_painter/zone_painter_main_window.h +++ b/studio/src/plugins/zone_painter/zone_painter_main_window.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include namespace NLQT { class QNLWidget; diff --git a/studio/src/plugins/zone_painter/zone_painter_plugin.cpp b/studio/src/plugins/zone_painter/zone_painter_plugin.cpp index 085a18634d..c8faa28fd9 100644 --- a/studio/src/plugins/zone_painter/zone_painter_plugin.cpp +++ b/studio/src/plugins/zone_painter/zone_painter_plugin.cpp @@ -85,5 +85,3 @@ void ZonePainterPlugin::addAutoReleasedObject(QObject *obj) } } - -Q_EXPORT_PLUGIN(Plugin::ZonePainterPlugin) \ No newline at end of file diff --git a/studio/src/plugins/zone_painter/zone_painter_plugin.h b/studio/src/plugins/zone_painter/zone_painter_plugin.h index a3def41bac..47140b4089 100644 --- a/studio/src/plugins/zone_painter/zone_painter_plugin.h +++ b/studio/src/plugins/zone_painter/zone_painter_plugin.h @@ -45,6 +45,7 @@ namespace Plugin class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID IPlugin_iid FILE "plugin-metadata.json") Q_INTERFACES(ExtensionSystem::IPlugin) public: From aa852e9df3ffdf967100b138b9d0e0419492d97e Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 17:59:21 +0100 Subject: [PATCH 20/28] update qtpropertybrowser lib and use it rename text extension to qtpropertybrowser --- studio/src/3rdparty/CMakeLists.txt | 2 + studio/src/3rdparty/README.md | 2 + .../3rdparty/qtpropertybrowser/CMakeLists.txt | 175 +- .../qtpropertybrowser/LGPL_EXCEPTION.txt | 10 - .../3rdparty/qtpropertybrowser/LICENSE.GPL3 | 674 -------- .../3rdparty/qtpropertybrowser/LICENSE.LGPL | 504 ------ .../src/3rdparty/qtpropertybrowser/README.TXT | 21 - .../src/3rdparty/qtpropertybrowser/README.md | 73 + .../cmake/FindQtPropertyBrowser.cmake | 43 + .../qtpropertybrowser/doxygen/Doxyfile.in | 1521 +++++++++++++++++ .../qtpropertybrowser/doxygen/doxygen.cmake | 17 + .../examples/demo/CMakeLists.txt | 32 + .../qtpropertybrowser/examples/demo/demo.qrc | 8 + .../examples/demo/images/down.png | Bin 0 -> 594 bytes .../examples/demo/images/left.png | Bin 0 -> 678 bytes .../examples/demo/images/right.png | Bin 0 -> 655 bytes .../examples/demo/images/up.png | Bin 0 -> 692 bytes .../qtpropertybrowser/examples/demo/main.cpp | 216 +++ .../images/resetproperty.png | Bin 169 -> 0 bytes .../{ => include}/QtAbstractEditorFactoryBase | 0 .../{ => include}/QtAbstractPropertyBrowser | 0 .../{ => include}/QtAbstractPropertyManager | 0 .../{ => include}/QtBoolPropertyManager | 0 .../{ => include}/QtBrowserItem | 0 .../{ => include}/QtButtonPropertyBrowser | 0 .../{ => include}/QtCharEditorFactory | 0 .../{ => include}/QtCharPropertyManager | 0 .../{ => include}/QtCheckBoxFactory | 0 .../{ => include}/QtColorEditorFactory | 0 .../{ => include}/QtColorPropertyManager | 0 .../{ => include}/QtCursorEditorFactory | 0 .../{ => include}/QtCursorPropertyManager | 0 .../{ => include}/QtDateEditFactory | 0 .../{ => include}/QtDatePropertyManager | 0 .../{ => include}/QtDateTimeEditFactory | 0 .../{ => include}/QtDateTimePropertyManager | 0 .../{ => include}/QtDoublePropertyManager | 0 .../{ => include}/QtDoubleSpinBoxFactory | 0 .../{ => include}/QtEnumEditorFactory | 0 .../{ => include}/QtEnumPropertyManager | 0 .../{ => include}/QtFlagPropertyManager | 0 .../{ => include}/QtFontEditorFactory | 0 .../{ => include}/QtFontPropertyManager | 0 .../{ => include}/QtGroupBoxPropertyBrowser | 0 .../{ => include}/QtGroupPropertyManager | 0 .../{ => include}/QtIntPropertyManager | 0 .../{ => include}/QtKeySequenceEditorFactory | 0 .../QtKeySequencePropertyManager | 0 .../{ => include}/QtLineEditFactory | 0 .../{ => include}/QtLocalePropertyManager | 0 .../{ => include}/QtPointFPropertyManager | 0 .../{ => include}/QtPointPropertyManager | 0 .../{ => include}/QtProperty | 0 .../{ => include}/QtRectFPropertyManager | 0 .../{ => include}/QtRectPropertyManager | 0 .../{ => include}/QtScrollBarFactory | 0 .../{ => include}/QtSizeFPropertyManager | 0 .../{ => include}/QtSizePolicyPropertyManager | 0 .../{ => include}/QtSizePropertyManager | 0 .../{ => include}/QtSliderFactory | 0 .../{ => include}/QtSpinBoxFactory | 0 .../{ => include}/QtStringPropertyManager | 0 .../{ => include}/QtTimeEditFactory | 0 .../{ => include}/QtTimePropertyManager | 0 .../{ => include}/QtTreePropertyBrowser | 0 .../{ => include}/QtVariantEditorFactory | 0 .../{ => include}/QtVariantProperty | 0 .../{ => include}/QtVariantPropertyManager | 0 .../qtbuttonpropertybrowser.h | 135 -- .../qtgroupboxpropertybrowser.h | 126 -- .../qtpropertybrowser/qtpropertybrowser.pri | 30 - .../qtpropertybrowser/qtpropertybrowser.qrc | 5 +- .../qtpropertybrowserutils.cpp | 492 ------ .../qtpropertybrowserutils_p.h | 211 --- .../qtpropertybrowser/qttreepropertybrowser.h | 184 -- .../{ => src}/qtbuttonpropertybrowser.cpp | 116 +- .../src/qtbuttonpropertybrowser.h | 78 + .../{ => src}/qteditorfactory.cpp | 990 +++-------- .../{ => src}/qteditorfactory.h | 183 +- .../{ => src}/qtgroupboxpropertybrowser.cpp | 114 +- .../src/qtgroupboxpropertybrowser.h | 69 + .../{ => src}/qtpropertybrowser.cpp | 345 ++-- .../{ => src}/qtpropertybrowser.h | 140 +- .../src/qtpropertybrowserutils.cpp | 296 ++++ .../src/qtpropertybrowserutils_p.h | 126 ++ .../{ => src}/qtpropertymanager.cpp | 654 ++++--- .../{ => src}/qtpropertymanager.h | 199 +-- .../{ => src}/qttreepropertybrowser.cpp | 137 +- .../src/qttreepropertybrowser.h | 127 ++ .../{ => src}/qtvariantproperty.cpp | 948 +++++----- .../{ => src}/qtvariantproperty.h | 115 +- studio/src/CMakeLists.txt | 2 +- .../libqtpropertybrowser-text/CMakeLists.txt | 30 + .../QtTextEditWidget.cpp | 2 +- .../QtTextEditWidget.h | 0 .../QtTextEditorFactory.cpp | 3 +- .../QtTextEditorFactory.h | 4 +- .../QtTextPropertyManager.cpp | 2 +- .../QtTextPropertyManager.h | 6 +- .../src/libqtpropertybrowser/CMakeLists.txt | 28 - .../src/plugins/world_editor/CMakeLists.txt | 4 +- .../world_editor/property_editor_widget.cpp | 2 +- .../world_editor/property_editor_widget.h | 2 +- 103 files changed, 4143 insertions(+), 5060 deletions(-) create mode 100644 studio/src/3rdparty/README.md delete mode 100644 studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt delete mode 100644 studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 delete mode 100644 studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL delete mode 100644 studio/src/3rdparty/qtpropertybrowser/README.TXT create mode 100644 studio/src/3rdparty/qtpropertybrowser/README.md create mode 100644 studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake create mode 100644 studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in create mode 100644 studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/down.png create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/left.png create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/right.png create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/up.png create mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/main.cpp delete mode 100644 studio/src/3rdparty/qtpropertybrowser/images/resetproperty.png rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtAbstractEditorFactoryBase (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtAbstractPropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtAbstractPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtBoolPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtBrowserItem (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtButtonPropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtCharEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtCharPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtCheckBoxFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtColorEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtColorPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtCursorEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtCursorPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtDateEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtDatePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtDateTimeEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtDateTimePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtDoublePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtDoubleSpinBoxFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtEnumEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtEnumPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtFlagPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtFontEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtFontPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtGroupBoxPropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtGroupPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtIntPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtKeySequenceEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtKeySequencePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtLineEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtLocalePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtPointFPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtPointPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtProperty (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtRectFPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtRectPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtScrollBarFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtSizeFPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtSizePolicyPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtSizePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtSliderFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtSpinBoxFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtStringPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtTimeEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtTimePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtTreePropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtVariantEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtVariantProperty (100%) rename studio/src/3rdparty/qtpropertybrowser/{ => include}/QtVariantPropertyManager (100%) delete mode 100644 studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h delete mode 100644 studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h delete mode 100644 studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri delete mode 100644 studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp delete mode 100644 studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h delete mode 100644 studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtbuttonpropertybrowser.cpp (81%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qteditorfactory.cpp (68%) rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qteditorfactory.h (62%) rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtgroupboxpropertybrowser.cpp (78%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtpropertybrowser.cpp (87%) rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtpropertybrowser.h (62%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp create mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtpropertymanager.cpp (93%) rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtpropertymanager.h (75%) rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qttreepropertybrowser.cpp (86%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtvariantproperty.cpp (75%) rename studio/src/3rdparty/qtpropertybrowser/{ => src}/qtvariantproperty.h (59%) create mode 100644 studio/src/libqtpropertybrowser-text/CMakeLists.txt rename studio/src/{libqtpropertybrowser/libqtpropertybrowser => libqtpropertybrowser-text/libqtpropertybrowser-text}/QtTextEditWidget.cpp (98%) rename studio/src/{libqtpropertybrowser/libqtpropertybrowser => libqtpropertybrowser-text/libqtpropertybrowser-text}/QtTextEditWidget.h (100%) rename studio/src/{libqtpropertybrowser/libqtpropertybrowser => libqtpropertybrowser-text/libqtpropertybrowser-text}/QtTextEditorFactory.cpp (96%) rename studio/src/{libqtpropertybrowser/libqtpropertybrowser => libqtpropertybrowser-text/libqtpropertybrowser-text}/QtTextEditorFactory.h (90%) rename studio/src/{libqtpropertybrowser/libqtpropertybrowser => libqtpropertybrowser-text/libqtpropertybrowser-text}/QtTextPropertyManager.cpp (89%) rename studio/src/{libqtpropertybrowser/libqtpropertybrowser => libqtpropertybrowser-text/libqtpropertybrowser-text}/QtTextPropertyManager.h (71%) delete mode 100644 studio/src/libqtpropertybrowser/CMakeLists.txt diff --git a/studio/src/3rdparty/CMakeLists.txt b/studio/src/3rdparty/CMakeLists.txt index 2caaa1be78..8d87f50b7c 100644 --- a/studio/src/3rdparty/CMakeLists.txt +++ b/studio/src/3rdparty/CMakeLists.txt @@ -1 +1,3 @@ ADD_SUBDIRECTORY(qtpropertybrowser) + +SET(QtPropertyBrowser_LIBRARY "QtPropertyBrowser") diff --git a/studio/src/3rdparty/README.md b/studio/src/3rdparty/README.md new file mode 100644 index 0000000000..033680332c --- /dev/null +++ b/studio/src/3rdparty/README.md @@ -0,0 +1,2 @@ +also see: +https://github.com/greenjava/QtPropertyBrowser \ No newline at end of file diff --git a/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt b/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt index a77c4a7d25..2194f24927 100644 --- a/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt +++ b/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt @@ -1,99 +1,76 @@ -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES}) - -FILE(GLOB SRC *.cpp *.h) - -SET(QT_PROPERTY_EDITOR_HDR qtpropertybrowser.h - qtpropertymanager.h - qteditorfactory.h - qtvariantproperty.h - qttreepropertybrowser.h - qtbuttonpropertybrowser.h - qtgroupboxpropertybrowser.h - qtpropertybrowserutils_p.h) - -SET(QT_PROPERTY_EDITOR_RCS qtpropertybrowser.qrc) - -SET(QT_USE_QTGUI TRUE) - -QT5_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS}) -QT5_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR}) - -SOURCE_GROUP(QtResources FILES ${QT_PROPERTY_EDITOR_RCS}) -SOURCE_GROUP(QtGeneratedMocSrc FILES ${QT_PROPERTY_EDITOR_MOC_SRC}) -SOURCE_GROUP("Qt Property Editor Source" FILES ${SRC}) - -qt5_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc) -qt5_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) -qt5_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc) - -# Need to remove these so that they are not linked as they are inline included. -LIST(REMOVE_ITEM QT_PROPERTY_EDITOR_MOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx - ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx - ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx - ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx - ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx - ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx - ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) - -# We need to add new depencencies on removed files because we need them to be still generated -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtbuttonpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx) -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qteditorfactory.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx) -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtgroupboxpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx) -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx) -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertymanager.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx) -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qttreepropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx) -SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) - -#set( -# qtpropertyeditor_HEADERS_ONLY_MOC -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cpp -# ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc -# ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc -# ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc -#) -# -#set_source_files_properties( -# ${qtpropertyeditor_HEADERS_ONLY_MOC} -# PROPERTIES -# HEADER_FILE_ONLY true -#) -# - -#set( -# qtpropertyeditor_HEADERS_MOC -# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowserutils_p.cpp -#) - -#set( -# qtpropertyeditor_MOC -# ${qtpropertyeditor_HEADERS_MOC} -# ${qtpropertyeditor_HEADERS_ONLY_MOC} -#) - -ADD_LIBRARY(qt_property_browser SHARED ${SRC} - ${QT_PROPERTY_EDITOR_MOC_SRC} - ${QT_PROPERTY_EDITOR_RC_SRCS} - ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc - ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc - ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) - -TARGET_LINK_LIBRARIES(qt_property_browser ${QT_LIBRARIES}) - -ADD_DEFINITIONS(${QT_DEFINITIONS}) -ADD_DEFINITIONS(-DQT_DLL) -ADD_DEFINITIONS(-DQT_QTPROPERTYBROWSER_EXPORT) -ADD_DEFINITIONS(-DQT_PLUGIN) -#ADD_DEFINITIONS(-DQT_NO_DEBUG) -ADD_DEFINITIONS(-DQT_SHARED) - -NL_DEFAULT_PROPS(qt_property_browser "3rdParty: Qt Property Browser 2.5") -NL_ADD_RUNTIME_FLAGS(qt_property_browser) -NL_ADD_LIB_SUFFIX(qt_property_browser) - -INSTALL(TARGETS qt_property_browser LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) +cmake_minimum_required(VERSION 2.9) +project(QtPropertyBrowser) + +find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED) + +set(SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtbuttonpropertybrowser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qteditorfactory.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtgroupboxpropertybrowser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowserutils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertymanager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qttreepropertybrowser.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtvariantproperty.cpp +) +set(HEADER_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtbuttonpropertybrowser.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qteditorfactory.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtgroupboxpropertybrowser.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowser.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowserutils_p.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertymanager.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qttreepropertybrowser.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/qtvariantproperty.h +) + +set(QRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.qrc) + +source_group("Header Files" FILES ${HEADER_FILES}) +source_group("Source Files" FILES ${SOURCE_FILES}) + +set(CMAKE_AUTORCC ON) + +option(BUILD_SHARED_LIBS "Build shared library." ON) +option(BUILD_EXAMPLES "Build examples." OFF) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +add_library(QtPropertyBrowser ${HEADER_FILES} ${SOURCE_FILES} ${QRC_FILES}) + +target_include_directories(QtPropertyBrowser PUBLIC + ${Qt5Core_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} +) + +target_link_libraries(QtPropertyBrowser PUBLIC + ${Qt5Core_LIBRARIES} + ${Qt5Gui_LIBRARIES} + ${Qt5Widgets_LIBRARIES} +) + +set_target_properties(QtPropertyBrowser PROPERTIES AUTOMOC TRUE) + +if(BUILD_EXAMPLES) + add_subdirectory(examples/demo) +endif() + +include(GenerateExportHeader) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +generate_export_header(QtPropertyBrowser) + +install(TARGETS QtPropertyBrowser + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) +install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtPropertyBrowser) +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindQtPropertyBrowser.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qtpropertybrowser_export.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtPropertyBrowser) + + +option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF) +if(BUILD_DOCUMENTATION) + include(doxygen/doxygen.cmake) +endif() diff --git a/studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt b/studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt deleted file mode 100644 index 0b56ff1efe..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt +++ /dev/null @@ -1,10 +0,0 @@ -Nokia Qt LGPL Exception version 1.0 - -As a special exception to the GNU Lesser General Public License -version 2.1, the object code form of a "work that uses the Library" -may incorporate material from a header file that is part of the -Library. You may distribute such object code under terms of your -choice, provided that the incorporated material (i) does not exceed -more than 5% of the total size of the Library; and (ii) is limited to -numerical parameters, data structure layouts, accessors, macros, -inline functions and templates. diff --git a/studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 b/studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 deleted file mode 100644 index 94a9ed024d..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL b/studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL deleted file mode 100644 index 5ab7695ab8..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/studio/src/3rdparty/qtpropertybrowser/README.TXT b/studio/src/3rdparty/qtpropertybrowser/README.TXT deleted file mode 100644 index 9b923ba2c4..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/README.TXT +++ /dev/null @@ -1,21 +0,0 @@ -Property Browser v2.5 - -A property browser framework enabling the user to edit a set of -properties. - -The framework provides a browser widget that displays the given -properties with labels and corresponding editing widgets (e.g. -line edits or comboboxes). The various types of editing widgets -are provided by the framework's editor factories: For each -property type, the framework provides a property manager (e.g. -QtIntPropertyManager and QtStringPropertyManager) which can be -associated with the preferred editor factory (e.g. -QtSpinBoxFactory and QtLineEditFactory). The framework also -provides a variant based property type with corresponding variant -manager and factory. Finally, the framework provides three -ready-made implementations of the browser widget: -QtTreePropertyBrowser, QtButtonPropertyBrowser and -QtGroupBoxPropertyBrowser. - -also see: -https://github.com/greenjava/QtPropertyBrowser \ No newline at end of file diff --git a/studio/src/3rdparty/qtpropertybrowser/README.md b/studio/src/3rdparty/qtpropertybrowser/README.md new file mode 100644 index 0000000000..86ab41f326 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/README.md @@ -0,0 +1,73 @@ +Qt Solutions Component: Property Browser +======================================== + +*A property browser framework enabling the user to edit a set of properties.* + +The framework provides a browser widget that displays the given properties with labels and corresponding editing widgets (e.g.;line edits or comboboxes). +The various types of editing widgets are provided by the framework's editor factories: +For each property type, the framework provides a property manager (e.g. QtIntPropertyManager and QtStringPropertyManager) which can be associated with the preferred editor factory (e.g. QtSpinBoxFactory and QtLineEditFactory). +The framework also provides a variant based property type with corresponding variant manager and factory. +Finally, the framework provides three ready-made implementations of the browser widget: +QtTreePropertyBrowser, QtButtonPropertyBrowser and QtGroupBoxPropertyBrowser. + +Version history: +---------------- + +2.1: + +- QtTreePropertyBrowser - tooltip of property applied to first column, while second column shows the value text of property in its tooltip +- QtAbstractPropertyManager - initializeProperty() and uninitializeProperty() without const modifier now +- QtTreePropertyBrowser and QtGroupBoxPropertyBrowser - internal margin set to 0 +- QtProperty - setEnabled() and isEnabled() methods added +- QtTreePropertyBrowser - "rootIsDecorated", "indentation" and "headerVisible" properties added +- QtProperty - hasValue() method added, useful for group properties + + +2.2: + +- FocusOut event now filtered out in case of Qt::ActiveWindowFocusReason reason. In that case editor is not closed when its sub dialog is executed +- Removed bug in color icon generation +- Decimals attribute added to "double" property type +- PointF, SizeF and RectF types supported +- Proper translation calls for tree property browser +- QtProperty - ensure inserted subproperty is different from "this" property +- QtBrowserItem class introduced, useful for identifying browser's gui elements +- Possibility to control expanded state of QtTreePropertyBrowser's items from code +- QtTreePropertyBrowser - "resizeMode" and "splitterPosition" properties added +- QtGroupBoxPropertyBrowser - fixed crash in case of deleting the editor factory and then deleting the manager +- "Decoration" example added - it shows how to add new responsibilities to the existing managers and editor factories + +2.3: + +- Various bugfixes and improvements +- QtProperty - setModified() and isModified() methods added +- QtTreePropertyBrowser - disabling an item closes its editor +- KeySequence, Char, Locale and Cursor types supported +- Support for icons in enum type added +- Kerning subproperty exposed in Font type +- New property browser class added - QtButtonPropertyBrowser with drop down button as a grouping element + +2.4: + +- Fixed memory leak of QtProperty +- QtTreePropertyBrowser - group items are rendered better +- QtTreePropertyBrowser - propertiesWithoutValueMarked and alternatingRowColors features added +- QtTreePropertyBrowser - possibility of coloring properties added +- QtTreePropertyBrowser - keyboard navigation improved +- New factories providing popup dialogs added: QtColorEditorFactory and QtFontEditorFactory +- Single step attribute added to: QtIntPropertyManager and QtDoublePropertyManager + +2.5: + +- "Object Controller" example added. It implements a similar widget to the property editor in QDesigner +- Compile with QT_NO_CURSOR +- Expand root item with single click on the '+' icon +- QtRectPropertyManager and QtRectFPropertyManager - by default constraint is null rect meaning no constraint is applied + +2.6: + +- QtGroupPropertyBrowser - don't force the layout to show the whole labels' contents for read only properties, show tooltips for them in addition. +- QtTreePropertyBrowser - fixed painting of the editor for color property type when style sheet is used (QTSOLBUG-64). +- Make it possible to change the style of the checkboxes with a stylesheet (QTSOLBUG-61). +- Change the minimum size of a combobox so that it can show at least one character and an icon. +- Make it possible to properly style custom embedded editors (e.g. the color editor provided with the solution). diff --git a/studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake b/studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake new file mode 100644 index 0000000000..c51b206da3 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake @@ -0,0 +1,43 @@ +# Locate QtPropertyBrowser library +# This module defines +# QTPROPERTYBROWSER_FOUND, if false, do not try to link to QtPropertyBrowser +# QTPROPERTYBROWSER_LIBRARY +# QTPROPERTYBROWSER_INCLUDE_DIR, where to find qtpropertybrowser.h +# QTPROPERTYBROWSER_DIR - Can be set to QtPropertyBrowser install path or Windows build path + +find_path(QTPROPERTYBROWSER_INCLUDE_DIR qtpropertybrowser.h + HINTS ${QTPROPERTYBROWSER_DIR} + PATH_SUFFIXES include QtPropertyBrowser + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt +) + +find_library(QTPROPERTYBROWSER_LIBRARY + NAMES QtPropertyBrowser + HINTS ${QTPROPERTYBROWSER_DIR} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt +) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set QTPROPERTYBROWSER_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(QTPROPERTYBROWSER DEFAULT_MSG QTPROPERTYBROWSER_LIBRARY QTPROPERTYBROWSER_INCLUDE_DIR) + +mark_as_advanced(QTPROPERTYBROWSER_INCLUDE_DIR QTPROPERTYBROWSER_LIBRARY) + diff --git a/studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in b/studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in new file mode 100644 index 0000000000..cd6a011b6c --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in @@ -0,0 +1,1521 @@ +# Doxyfile 1.5.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = QtPropertyBrowser + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/Doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/mrproject". Separate the files or directories +# with spaces. + +INPUT = @CMAKE_CURRENT_SOURCE_DIR@ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = YES + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = */.svn/* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. + +GENERATE_TREEVIEW = HIERARCHIES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = @INCLUDE_DIRS@ + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES #====== +#CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = NO + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES #====== +#CLASS_GRAPH = NO + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES #====== +#COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES #====== +#GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES #====== +#TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES #====== +#INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES #====== +#INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = YES #====== +#CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES #====== +#CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES #====== +#GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES #====== +#DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = ################################################# + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Options related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake b/studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake new file mode 100644 index 0000000000..ef7d1255aa --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake @@ -0,0 +1,17 @@ +# Generates doxygen. +find_package(Doxygen) +if(NOT DOXYGEN_FOUND) + message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly") +endif() + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) + +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxygen/html/index.html + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in + COMMENT "Generating API documentation with Doxygen") + +add_custom_target(doc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxygen/html/index.html ) + +install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Doxygen DESTINATION ${CMAKE_INSTALL_PREFIX}/doc ) diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt b/studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt new file mode 100644 index 0000000000..64bb1c1a3b --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 2.9) +project(Demo) + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) + +find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED) +find_package(QtPropertyBrowser REQUIRED) + +set(SOURCE_FILES main.cpp) +set(QRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/demo.qrc) + +set(CMAKE_AUTORCC ON) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +add_executable(Demo ${SOURCE_FILES} ${QRC_FILES}) +target_link_libraries(Demo + ${QTPROPERTYBROWSER_LIBRARY} + ${Qt5Core_LIBRARIES} + ${Qt5Gui_LIBRARIES} + ${Qt5Widgets_LIBRARIES} +) + +target_include_directories(Demo PUBLIC + ${QTPROPERTYBROWSER_INCLUDE_DIR} + ${Qt5Core_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} +) diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc b/studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc new file mode 100644 index 0000000000..c6be0cefb3 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc @@ -0,0 +1,8 @@ + + + images/up.png + images/down.png + images/right.png + images/left.png + + diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/down.png b/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/down.png new file mode 100644 index 0000000000000000000000000000000000000000..29d1d4439a139c662aecca94b6f43a465cfb9cc6 GIT binary patch literal 594 zcmV-Y0j z)Xz`TU>wKswOeUBH_Vo3LZ*V4p&U4v;LVFDq!ObUNJtQHC_UYOy}c$4_Z z287Mpy&>Gkk3$;%;XTGD)-SARcb^V+y#l_lys$a@k{nD+qgKLE+C6xLudGK{sd70w zcE71nDjtqr6rQslcH!s21HbzIZLG4Ku(F%O+U^xp_O4>4nBl-LJ{^?W2788E7ww3c$dW3qz>Ki(HSZqJlD~5#;x#SD}gQ7 zgv0(;bxhbL9Yezjn5K`uZiTiRwq2=|ckJ6DkxX7Tsy45p8>IMse%D zf;Vqf6vh<#P(J!fv{R}3IKcTOvuzkL=(>--JPth;j^KP+u2DCF7oBg1O2Gjh4J~2iFzHobR$W9+ed&iz#gEmW3Y&v zZ*1~MdipzQPYUyy_~Z-G`o@qna0>{{%>1pCHZ|9c3=DO#|4^B1;VbnCc=)W9ww8m4 z5Dx_AeopgXzy^VPz%mf{RiNioWwhsV2m3k#e&uEe!zFx$pqOEPVH#0TK(sQx&BWn* zqx`Q2i^!>#*2L)b+g-FLjck4v377E{R4Ncv5S+PyuQ8$#$gRtDp0Op+s|WHmRvNvJ7zd!z7-kcBSVc z_~L*!C{+>EtN7Fen^`C#i@?y-J4A)lg+B1=;Kz4Z%7e*Tj#t0Sg%}Y4<*J=$W`T(0 zfIE{D;0dX|{tEQ*qfOrK&&#Me!Yy0cg-^T%RZ`vE@$xZX5m<3Tf(V+A=3BoNF8s|n z{9Yjiya48^fXk86pr+z#@Tn<20mDERSTVEWKfT8e{7KYRtIBHHAITZSk@xgqT>t<8 M07*qoM6N<$f+VOsGXMYp literal 0 HcmV?d00001 diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/right.png b/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/right.png new file mode 100644 index 0000000000000000000000000000000000000000..34b91f09fa3aa8e0b329edc97054c11defba8016 GIT binary patch literal 655 zcmV;A0&x9_P)cJAZUz`NyfQlF14XgvfeqKhRM8=g$nIpi07v2Pm$T0PG z+s5t5ev&IuzPy9iGfJ_*Szxjq-U_S#@di#sMFxj0Y^u zs2IrSA-xLzn@Xv~L10-`OD_1{xQ}!;h8VCMGZhEg7)ve(nH0=Nlth##z-1t-sznz( zI^knI8`}k}=1Q^8xg4a|;6+&Z7-tr^27CjyRJH7a$AX8**swS%Z2U-ZpmSmP5GMj$ z1y+C!prEQ%7kpz7mY14W%oynFgWlfyOj9X{G^0Np=uW$J^8**~h`aaUdlDkgAkhJB z2loJbfPHrEakyVc$6#mx5^=)7buY9XEP!Q$7GNCj4jnzl`B(FVY;?m5b-|rNMD_xg pfC->zKW))&VdLne22{OJfIn@@R^)Beh^qhq002ovPDHLkV1l$X9{d0R literal 0 HcmV?d00001 diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/up.png b/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/up.png new file mode 100644 index 0000000000000000000000000000000000000000..e4373122171599c88b78c884b927c6a8b4a90c6a GIT binary patch literal 692 zcmV;l0!#ggP)p2raNh0iv$(l~TMx4kdC6q9nEA|`**D{}k#dX8|6LB>7#;)I^Ped=4Hzs5}YJfl=IMqVOwV3TOn<`fg+FtutHTOl+p4ItW@S@UCRT$s#e2Vdg=lo5D}~>p3$197_jRp z=YhPc7Gm8z$3=Kf7AcnG)$Gyx5pjP)J5;=W_SftyqWmZ>V+N`!8lA3I}LdVVyM axbX+reAIe(fQ}9T0000 +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + QWidget *w = new QWidget(); + + QtBoolPropertyManager *boolManager = new QtBoolPropertyManager(w); + QtIntPropertyManager *intManager = new QtIntPropertyManager(w); + QtStringPropertyManager *stringManager = new QtStringPropertyManager(w); + QtSizePropertyManager *sizeManager = new QtSizePropertyManager(w); + QtRectPropertyManager *rectManager = new QtRectPropertyManager(w); + QtSizePolicyPropertyManager *sizePolicyManager = new QtSizePolicyPropertyManager(w); + QtEnumPropertyManager *enumManager = new QtEnumPropertyManager(w); + QtGroupPropertyManager *groupManager = new QtGroupPropertyManager(w); + + QtProperty *item0 = groupManager->addProperty("QObject"); + + QtProperty *item1 = stringManager->addProperty("objectName"); + item0->addSubProperty(item1); + + QtProperty *item2 = boolManager->addProperty("enabled"); + item0->addSubProperty(item2); + + QtProperty *item3 = rectManager->addProperty("geometry"); + item0->addSubProperty(item3); + + QtProperty *item4 = sizePolicyManager->addProperty("sizePolicy"); + item0->addSubProperty(item4); + + QtProperty *item5 = sizeManager->addProperty("sizeIncrement"); + item0->addSubProperty(item5); + + QtProperty *item7 = boolManager->addProperty("mouseTracking"); + item0->addSubProperty(item7); + + QtProperty *item8 = enumManager->addProperty("direction"); + QStringList enumNames; + enumNames << "Up" << "Right" << "Down" << "Left"; + enumManager->setEnumNames(item8, enumNames); + QMap enumIcons; + enumIcons[0] = QIcon(":/demo/images/up.png"); + enumIcons[1] = QIcon(":/demo/images/right.png"); + enumIcons[2] = QIcon(":/demo/images/down.png"); + enumIcons[3] = QIcon(":/demo/images/left.png"); + enumManager->setEnumIcons(item8, enumIcons); + item0->addSubProperty(item8); + + QtProperty *item9 = intManager->addProperty("value"); + intManager->setRange(item9, -100, 100); + item0->addSubProperty(item9); + + QtCheckBoxFactory *checkBoxFactory = new QtCheckBoxFactory(w); + QtSpinBoxFactory *spinBoxFactory = new QtSpinBoxFactory(w); + QtSliderFactory *sliderFactory = new QtSliderFactory(w); + QtScrollBarFactory *scrollBarFactory = new QtScrollBarFactory(w); + QtLineEditFactory *lineEditFactory = new QtLineEditFactory(w); + QtEnumEditorFactory *comboBoxFactory = new QtEnumEditorFactory(w); + + QtAbstractPropertyBrowser *editor1 = new QtTreePropertyBrowser(); + editor1->setFactoryForManager(boolManager, checkBoxFactory); + editor1->setFactoryForManager(intManager, spinBoxFactory); + editor1->setFactoryForManager(stringManager, lineEditFactory); + editor1->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); + editor1->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); + editor1->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), spinBoxFactory); + editor1->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); + editor1->setFactoryForManager(enumManager, comboBoxFactory); + + editor1->addProperty(item0); + + QtAbstractPropertyBrowser *editor2 = new QtTreePropertyBrowser(); + editor2->addProperty(item0); + + QtAbstractPropertyBrowser *editor3 = new QtGroupBoxPropertyBrowser(); + editor3->setFactoryForManager(boolManager, checkBoxFactory); + editor3->setFactoryForManager(intManager, spinBoxFactory); + editor3->setFactoryForManager(stringManager, lineEditFactory); + editor3->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); + editor3->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); + editor3->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), spinBoxFactory); + editor3->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); + editor3->setFactoryForManager(enumManager, comboBoxFactory); + + editor3->addProperty(item0); + + QScrollArea *scroll3 = new QScrollArea(); + scroll3->setWidgetResizable(true); + scroll3->setWidget(editor3); + + QtAbstractPropertyBrowser *editor4 = new QtGroupBoxPropertyBrowser(); + editor4->setFactoryForManager(boolManager, checkBoxFactory); + editor4->setFactoryForManager(intManager, scrollBarFactory); + editor4->setFactoryForManager(stringManager, lineEditFactory); + editor4->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); + editor4->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); + editor4->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), sliderFactory); + editor4->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); + editor4->setFactoryForManager(enumManager, comboBoxFactory); + + editor4->addProperty(item0); + + QScrollArea *scroll4 = new QScrollArea(); + scroll4->setWidgetResizable(true); + scroll4->setWidget(editor4); + + QtAbstractPropertyBrowser *editor5 = new QtButtonPropertyBrowser(); + editor5->setFactoryForManager(boolManager, checkBoxFactory); + editor5->setFactoryForManager(intManager, scrollBarFactory); + editor5->setFactoryForManager(stringManager, lineEditFactory); + editor5->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); + editor5->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); + editor5->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), sliderFactory); + editor5->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); + editor5->setFactoryForManager(enumManager, comboBoxFactory); + + editor5->addProperty(item0); + + QScrollArea *scroll5 = new QScrollArea(); + scroll5->setWidgetResizable(true); + scroll5->setWidget(editor5); + + QGridLayout *layout = new QGridLayout(w); + QLabel *label1 = new QLabel("Editable Tree Property Browser"); + QLabel *label2 = new QLabel("Read Only Tree Property Browser, editor factories are not set"); + QLabel *label3 = new QLabel("Group Box Property Browser"); + QLabel *label4 = new QLabel("Group Box Property Browser with different editor factories"); + QLabel *label5 = new QLabel("Button Property Browser"); + label1->setWordWrap(true); + label2->setWordWrap(true); + label3->setWordWrap(true); + label4->setWordWrap(true); + label5->setWordWrap(true); + label1->setFrameShadow(QFrame::Sunken); + label2->setFrameShadow(QFrame::Sunken); + label3->setFrameShadow(QFrame::Sunken); + label4->setFrameShadow(QFrame::Sunken); + label5->setFrameShadow(QFrame::Sunken); + label1->setFrameShape(QFrame::Panel); + label2->setFrameShape(QFrame::Panel); + label3->setFrameShape(QFrame::Panel); + label4->setFrameShape(QFrame::Panel); + label5->setFrameShape(QFrame::Panel); + label1->setAlignment(Qt::AlignCenter); + label2->setAlignment(Qt::AlignCenter); + label3->setAlignment(Qt::AlignCenter); + label4->setAlignment(Qt::AlignCenter); + label5->setAlignment(Qt::AlignCenter); + + layout->addWidget(label1, 0, 0); + layout->addWidget(label2, 0, 1); + layout->addWidget(label3, 0, 2); + layout->addWidget(label4, 0, 3); + layout->addWidget(label5, 0, 4); + layout->addWidget(editor1, 1, 0); + layout->addWidget(editor2, 1, 1); + layout->addWidget(scroll3, 1, 2); + layout->addWidget(scroll4, 1, 3); + layout->addWidget(scroll5, 1, 4); + w->show(); + + int ret = app.exec(); + delete w; + return ret; +} diff --git a/studio/src/3rdparty/qtpropertybrowser/images/resetproperty.png b/studio/src/3rdparty/qtpropertybrowser/images/resetproperty.png deleted file mode 100644 index 9048252ec2a51e7ee3461b72ba31fcabb2f10027..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)M!VDz;D$H~RQtAOdA+G=b|DVXfKoI@;pQ;7a z!c!9D7tA1OVDFM#)bRFI`d!AXvO1u+s;7%%2#0KP!Un;Fgaq5gCk{*~e&)l-9KQS# jBO6=3qr$;M$qWpMPuN;S?ziRvH86O(`njxgN@xNAXMir1 diff --git a/studio/src/3rdparty/qtpropertybrowser/QtAbstractEditorFactoryBase b/studio/src/3rdparty/qtpropertybrowser/include/QtAbstractEditorFactoryBase similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtAbstractEditorFactoryBase rename to studio/src/3rdparty/qtpropertybrowser/include/QtAbstractEditorFactoryBase diff --git a/studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtBoolPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtBoolPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtBoolPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtBoolPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtBrowserItem b/studio/src/3rdparty/qtpropertybrowser/include/QtBrowserItem similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtBrowserItem rename to studio/src/3rdparty/qtpropertybrowser/include/QtBrowserItem diff --git a/studio/src/3rdparty/qtpropertybrowser/QtButtonPropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/include/QtButtonPropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtButtonPropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/include/QtButtonPropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/QtCharEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtCharEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtCharEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtCharEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtCharPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtCharPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtCharPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtCharPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtCheckBoxFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtCheckBoxFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtCheckBoxFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtCheckBoxFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtColorEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtColorEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtColorEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtColorEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtColorPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtColorPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtColorPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtColorPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtCursorEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtCursorEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtCursorEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtCursorEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtCursorPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtCursorPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtCursorPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtCursorPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtDateEditFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtDateEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtDateEditFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtDateEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtDatePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtDatePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtDatePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtDatePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtDateTimeEditFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtDateTimeEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtDateTimeEditFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtDateTimeEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtDateTimePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtDateTimePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtDateTimePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtDateTimePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtDoublePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtDoublePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtDoublePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtDoublePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtDoubleSpinBoxFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtDoubleSpinBoxFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtDoubleSpinBoxFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtDoubleSpinBoxFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtEnumEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtEnumEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtEnumEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtEnumEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtEnumPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtEnumPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtEnumPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtEnumPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtFlagPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtFlagPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtFlagPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtFlagPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtFontEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtFontEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtFontEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtFontEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtFontPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtFontPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtFontPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtFontPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtGroupBoxPropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/include/QtGroupBoxPropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtGroupBoxPropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/include/QtGroupBoxPropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/QtGroupPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtGroupPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtGroupPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtGroupPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtIntPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtIntPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtIntPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtIntPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtKeySequenceEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtKeySequenceEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtKeySequenceEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtKeySequenceEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtKeySequencePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtKeySequencePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtKeySequencePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtKeySequencePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtLineEditFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtLineEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtLineEditFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtLineEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtLocalePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtLocalePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtLocalePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtLocalePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtPointFPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtPointFPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtPointFPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtPointFPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtPointPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtPointPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtPointPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtPointPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtProperty b/studio/src/3rdparty/qtpropertybrowser/include/QtProperty similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtProperty rename to studio/src/3rdparty/qtpropertybrowser/include/QtProperty diff --git a/studio/src/3rdparty/qtpropertybrowser/QtRectFPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtRectFPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtRectFPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtRectFPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtRectPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtRectPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtRectPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtRectPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtScrollBarFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtScrollBarFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtScrollBarFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtScrollBarFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtSizeFPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtSizeFPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtSizeFPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtSizeFPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtSizePolicyPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtSizePolicyPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtSizePolicyPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtSizePolicyPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtSizePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtSizePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtSizePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtSizePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtSliderFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtSliderFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtSliderFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtSliderFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtSpinBoxFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtSpinBoxFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtSpinBoxFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtSpinBoxFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtStringPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtStringPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtStringPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtStringPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtTimeEditFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtTimeEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtTimeEditFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtTimeEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtTimePropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtTimePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtTimePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtTimePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/QtTreePropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/include/QtTreePropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtTreePropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/include/QtTreePropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/QtVariantEditorFactory b/studio/src/3rdparty/qtpropertybrowser/include/QtVariantEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtVariantEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/include/QtVariantEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/QtVariantProperty b/studio/src/3rdparty/qtpropertybrowser/include/QtVariantProperty similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtVariantProperty rename to studio/src/3rdparty/qtpropertybrowser/include/QtVariantProperty diff --git a/studio/src/3rdparty/qtpropertybrowser/QtVariantPropertyManager b/studio/src/3rdparty/qtpropertybrowser/include/QtVariantPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/QtVariantPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/include/QtVariantPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h deleted file mode 100644 index 518e047e86..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTBUTTONPROPERTYBROWSER_H -#define QTBUTTONPROPERTYBROWSER_H - -#include "qtpropertybrowser.h" - -#if QT_VERSION >= 0x040400 -QT_BEGIN_NAMESPACE -#endif - -class QtButtonPropertyBrowserPrivate; - -class QT_QTPROPERTYBROWSER_EXPORT QtButtonPropertyBrowser : public QtAbstractPropertyBrowser -{ - Q_OBJECT -public: - - QtButtonPropertyBrowser(QWidget *parent = 0); - ~QtButtonPropertyBrowser(); - - void setExpanded(QtBrowserItem *item, bool expanded); - bool isExpanded(QtBrowserItem *item) const; - -Q_SIGNALS: - - void collapsed(QtBrowserItem *item); - void expanded(QtBrowserItem *item); - -protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); - -private: - - QtButtonPropertyBrowserPrivate *d_ptr; - Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) - Q_DISABLE_COPY(QtButtonPropertyBrowser) - Q_PRIVATE_SLOT(d_func(), void slotUpdate()) - Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) - Q_PRIVATE_SLOT(d_func(), void slotToggled(bool)) - -}; - -#if QT_VERSION >= 0x040400 -QT_END_NAMESPACE -#endif - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h deleted file mode 100644 index 075f3286e7..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTGROUPBOXPROPERTYBROWSER_H -#define QTGROUPBOXPROPERTYBROWSER_H - -#include "qtpropertybrowser.h" - -#if QT_VERSION >= 0x040400 -QT_BEGIN_NAMESPACE -#endif - -class QtGroupBoxPropertyBrowserPrivate; - -class QT_QTPROPERTYBROWSER_EXPORT QtGroupBoxPropertyBrowser : public QtAbstractPropertyBrowser -{ - Q_OBJECT -public: - - QtGroupBoxPropertyBrowser(QWidget *parent = 0); - ~QtGroupBoxPropertyBrowser(); - -protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); - -private: - - QtGroupBoxPropertyBrowserPrivate *d_ptr; - Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) - Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) - Q_PRIVATE_SLOT(d_func(), void slotUpdate()) - Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) - -}; - -#if QT_VERSION >= 0x040400 -QT_END_NAMESPACE -#endif - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri deleted file mode 100644 index 6a6050c75a..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri +++ /dev/null @@ -1,30 +0,0 @@ -include(../common.pri) -INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD - -qtpropertybrowser-uselib:!qtpropertybrowser-buildlib { - LIBS += -L$$QTPROPERTYBROWSER_LIBDIR -l$$QTPROPERTYBROWSER_LIBNAME -} else { - SOURCES += $$PWD/qtpropertybrowser.cpp \ - $$PWD/qtpropertymanager.cpp \ - $$PWD/qteditorfactory.cpp \ - $$PWD/qtvariantproperty.cpp \ - $$PWD/qttreepropertybrowser.cpp \ - $$PWD/qtbuttonpropertybrowser.cpp \ - $$PWD/qtgroupboxpropertybrowser.cpp \ - $$PWD/qtpropertybrowserutils.cpp - HEADERS += $$PWD/qtpropertybrowser.h \ - $$PWD/qtpropertymanager.h \ - $$PWD/qteditorfactory.h \ - $$PWD/qtvariantproperty.h \ - $$PWD/qttreepropertybrowser.h \ - $$PWD/qtbuttonpropertybrowser.h \ - $$PWD/qtgroupboxpropertybrowser.h \ - $$PWD/qtpropertybrowserutils_p.h - RESOURCES += $$PWD/qtpropertybrowser.qrc -} - -win32 { - contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTPROPERTYBROWSER_EXPORT - else:qtpropertybrowser-uselib:DEFINES += QT_QTPROPERTYBROWSER_IMPORT -} diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc index 50c2479f26..a7d37dd10d 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc @@ -1,5 +1,5 @@ - + images/cursor-arrow.png images/cursor-busy.png images/cursor-closedhand.png @@ -18,7 +18,6 @@ images/cursor-vsplit.png images/cursor-wait.png images/cursor-whatsthis.png - images/resetproperty.png - + diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp deleted file mode 100644 index 9b482a5692..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp +++ /dev/null @@ -1,492 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtpropertybrowserutils_p.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#if QT_VERSION >= 0x040400 -QT_BEGIN_NAMESPACE -#endif - -QtCursorDatabase::QtCursorDatabase() -{ - appendCursor(Qt::ArrowCursor, QApplication::translate("QtCursorDatabase", "Arrow", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-arrow.png"))); - appendCursor(Qt::UpArrowCursor, QApplication::translate("QtCursorDatabase", "Up Arrow", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-uparrow.png"))); - appendCursor(Qt::CrossCursor, QApplication::translate("QtCursorDatabase", "Cross", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-cross.png"))); - appendCursor(Qt::WaitCursor, QApplication::translate("QtCursorDatabase", "Wait", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-wait.png"))); - appendCursor(Qt::IBeamCursor, QApplication::translate("QtCursorDatabase", "IBeam", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-ibeam.png"))); - appendCursor(Qt::SizeVerCursor, QApplication::translate("QtCursorDatabase", "Size Vertical", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizev.png"))); - appendCursor(Qt::SizeHorCursor, QApplication::translate("QtCursorDatabase", "Size Horizontal", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeh.png"))); - appendCursor(Qt::SizeFDiagCursor, QApplication::translate("QtCursorDatabase", "Size Backslash", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizef.png"))); - appendCursor(Qt::SizeBDiagCursor, QApplication::translate("QtCursorDatabase", "Size Slash", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeb.png"))); - appendCursor(Qt::SizeAllCursor, QApplication::translate("QtCursorDatabase", "Size All", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeall.png"))); - appendCursor(Qt::BlankCursor, QApplication::translate("QtCursorDatabase", "Blank", 0, - QApplication::UnicodeUTF8), QIcon()); - appendCursor(Qt::SplitVCursor, QApplication::translate("QtCursorDatabase", "Split Vertical", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-vsplit.png"))); - appendCursor(Qt::SplitHCursor, QApplication::translate("QtCursorDatabase", "Split Horizontal", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hsplit.png"))); - appendCursor(Qt::PointingHandCursor, QApplication::translate("QtCursorDatabase", "Pointing Hand", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hand.png"))); - appendCursor(Qt::ForbiddenCursor, QApplication::translate("QtCursorDatabase", "Forbidden", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-forbidden.png"))); - appendCursor(Qt::OpenHandCursor, QApplication::translate("QtCursorDatabase", "Open Hand", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-openhand.png"))); - appendCursor(Qt::ClosedHandCursor, QApplication::translate("QtCursorDatabase", "Closed Hand", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-closedhand.png"))); - appendCursor(Qt::WhatsThisCursor, QApplication::translate("QtCursorDatabase", "What's This", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-whatsthis.png"))); - appendCursor(Qt::BusyCursor, QApplication::translate("QtCursorDatabase", "Busy", 0, - QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png"))); -} - -void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) -{ - if (m_cursorShapeToValue.contains(shape)) - return; - int value = m_cursorNames.count(); - m_cursorNames.append(name); - m_cursorIcons[value] = icon; - m_valueToCursorShape[value] = shape; - m_cursorShapeToValue[shape] = value; -} - -QStringList QtCursorDatabase::cursorShapeNames() const -{ - return m_cursorNames; -} - -QMap QtCursorDatabase::cursorShapeIcons() const -{ - return m_cursorIcons; -} - -QString QtCursorDatabase::cursorToShapeName(const QCursor &cursor) const -{ - int val = cursorToValue(cursor); - if (val >= 0) - return m_cursorNames.at(val); - return QString(); -} - -QIcon QtCursorDatabase::cursorToShapeIcon(const QCursor &cursor) const -{ - int val = cursorToValue(cursor); - return m_cursorIcons.value(val); -} - -int QtCursorDatabase::cursorToValue(const QCursor &cursor) const -{ -#ifndef QT_NO_CURSOR - Qt::CursorShape shape = cursor.shape(); - if (m_cursorShapeToValue.contains(shape)) - return m_cursorShapeToValue[shape]; -#endif - return -1; -} - -#ifndef QT_NO_CURSOR -QCursor QtCursorDatabase::valueToCursor(int value) const -{ - if (m_valueToCursorShape.contains(value)) - return QCursor(m_valueToCursorShape[value]); - return QCursor(); -} -#endif - -QPixmap QtPropertyBrowserUtils::brushValuePixmap(const QBrush &b) -{ - QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); - img.fill(0); - - QPainter painter(&img); - painter.setCompositionMode(QPainter::CompositionMode_Source); - painter.fillRect(0, 0, img.width(), img.height(), b); - QColor color = b.color(); - if (color.alpha() != 255) { // indicate alpha by an inset - QBrush opaqueBrush = b; - color.setAlpha(255); - opaqueBrush.setColor(color); - painter.fillRect(img.width() / 4, img.height() / 4, - img.width() / 2, img.height() / 2, opaqueBrush); - } - painter.end(); - return QPixmap::fromImage(img); -} - -QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b) -{ - return QIcon(brushValuePixmap(b)); -} - -QString QtPropertyBrowserUtils::colorValueText(const QColor &c) -{ - return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2, %3] (%4)", 0, QApplication::UnicodeUTF8) - .arg(QString::number(c.red())) - .arg(QString::number(c.green())) - .arg(QString::number(c.blue())) - .arg(QString::number(c.alpha())); -} - -QPixmap QtPropertyBrowserUtils::fontValuePixmap(const QFont &font) -{ - QFont f = font; - QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); - img.fill(0); - QPainter p(&img); - p.setRenderHint(QPainter::TextAntialiasing, true); - p.setRenderHint(QPainter::Antialiasing, true); - f.setPointSize(13); - p.setFont(f); - QTextOption t; - t.setAlignment(Qt::AlignCenter); - p.drawText(QRect(0, 0, 16, 16), QString(QLatin1Char('A')), t); - return QPixmap::fromImage(img); -} - -QIcon QtPropertyBrowserUtils::fontValueIcon(const QFont &f) -{ - return QIcon(fontValuePixmap(f)); -} - -QString QtPropertyBrowserUtils::fontValueText(const QFont &f) -{ - return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2]", 0, QApplication::UnicodeUTF8) - .arg(f.family()) - .arg(f.pointSize()); -} - - -QtBoolEdit::QtBoolEdit(QWidget *parent) : - QWidget(parent), - m_checkBox(new QCheckBox(this)), - m_defaultButton(new QToolButton(this)), - m_textVisible(true) -{ - m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); - m_defaultButton->setMaximumWidth(16); - m_defaultButton->setEnabled(false); - - QHBoxLayout *lt = new QHBoxLayout; - if (QApplication::layoutDirection() == Qt::LeftToRight) - lt->setContentsMargins(4, 0, 0, 0); - else - lt->setContentsMargins(0, 0, 4, 0); - lt->addWidget(m_checkBox); - lt->addWidget(m_defaultButton); - setLayout(lt); - - connect(m_checkBox, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool))); - connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); - - setFocusProxy(m_checkBox); - m_checkBox->setText(QString()); -} - -void QtBoolEdit::setTextVisible(bool textVisible) -{ - if (m_textVisible == textVisible) - return; - - m_textVisible = textVisible; - m_checkBox->setText(QString()); -} - -Qt::CheckState QtBoolEdit::checkState() const -{ - return m_checkBox->checkState(); -} - -void QtBoolEdit::setCheckState(Qt::CheckState state) -{ - m_checkBox->setCheckState(state); -} - -void QtBoolEdit::setStateResetButton(bool enabled) -{ - m_defaultButton->setEnabled(enabled); -} - -bool QtBoolEdit::isChecked() const -{ - return m_checkBox->isChecked(); -} - -void QtBoolEdit::setChecked(bool c) -{ - m_checkBox->setChecked(c); - if (!m_textVisible) - return; - m_checkBox->setText(QString()); -} - -bool QtBoolEdit::blockCheckBoxSignals(bool block) -{ - return m_checkBox->blockSignals(block); -} - -void QtBoolEdit::mousePressEvent(QMouseEvent *event) -{ - if (event->buttons() == Qt::LeftButton) { - m_checkBox->click(); - event->accept(); - } else { - QWidget::mousePressEvent(event); - } -} - - -QtKeySequenceEdit::QtKeySequenceEdit(QWidget *parent) - : QWidget(parent), m_num(0), m_lineEdit(new QLineEdit(this)) -{ - QHBoxLayout *layout = new QHBoxLayout(this); - layout->addWidget(m_lineEdit); - layout->setMargin(0); - m_lineEdit->installEventFilter(this); - m_lineEdit->setReadOnly(true); - m_lineEdit->setFocusProxy(this); - setFocusPolicy(m_lineEdit->focusPolicy()); - setAttribute(Qt::WA_InputMethodEnabled); -} - -bool QtKeySequenceEdit::eventFilter(QObject *o, QEvent *e) -{ - if (o == m_lineEdit && e->type() == QEvent::ContextMenu) { - QContextMenuEvent *c = static_cast(e); - QMenu *menu = m_lineEdit->createStandardContextMenu(); - const QList actions = menu->actions(); - QListIterator itAction(actions); - while (itAction.hasNext()) { - QAction *action = itAction.next(); - action->setShortcut(QKeySequence()); - QString actionString = action->text(); - const int pos = actionString.lastIndexOf(QLatin1Char('\t')); - if (pos > 0) - actionString.remove(pos, actionString.length() - pos); - action->setText(actionString); - } - QAction *actionBefore = 0; - if (actions.count() > 0) - actionBefore = actions[0]; - QAction *clearAction = new QAction(tr("Clear Shortcut"), menu); - menu->insertAction(actionBefore, clearAction); - menu->insertSeparator(actionBefore); - clearAction->setEnabled(!m_keySequence.isEmpty()); - connect(clearAction, SIGNAL(triggered()), this, SLOT(slotClearShortcut())); - menu->exec(c->globalPos()); - delete menu; - e->accept(); - return true; - } - - return QWidget::eventFilter(o, e); -} - -void QtKeySequenceEdit::slotClearShortcut() -{ - if (m_keySequence.isEmpty()) - return; - setKeySequence(QKeySequence()); - emit keySequenceChanged(m_keySequence); -} - -void QtKeySequenceEdit::handleKeyEvent(QKeyEvent *e) -{ - int nextKey = e->key(); - if (nextKey == Qt::Key_Control || nextKey == Qt::Key_Shift || - nextKey == Qt::Key_Meta || nextKey == Qt::Key_Alt || - nextKey == Qt::Key_Super_L || nextKey == Qt::Key_AltGr) - return; - - nextKey |= translateModifiers(e->modifiers(), e->text()); - int k0 = m_keySequence[0]; - int k1 = m_keySequence[1]; - int k2 = m_keySequence[2]; - int k3 = m_keySequence[3]; - switch (m_num) { - case 0: k0 = nextKey; k1 = 0; k2 = 0; k3 = 0; break; - case 1: k1 = nextKey; k2 = 0; k3 = 0; break; - case 2: k2 = nextKey; k3 = 0; break; - case 3: k3 = nextKey; break; - default: break; - } - ++m_num; - if (m_num > 3) - m_num = 0; - m_keySequence = QKeySequence(k0, k1, k2, k3); - m_lineEdit->setText(m_keySequence.toString(QKeySequence::NativeText)); - e->accept(); - emit keySequenceChanged(m_keySequence); -} - -void QtKeySequenceEdit::setKeySequence(const QKeySequence &sequence) -{ - if (sequence == m_keySequence) - return; - m_num = 0; - m_keySequence = sequence; - m_lineEdit->setText(m_keySequence.toString(QKeySequence::NativeText)); -} - -QKeySequence QtKeySequenceEdit::keySequence() const -{ - return m_keySequence; -} - -int QtKeySequenceEdit::translateModifiers(Qt::KeyboardModifiers state, const QString &text) const -{ - int result = 0; - if ((state & Qt::ShiftModifier) && (text.size() == 0 || !text.at(0).isPrint() || text.at(0).isLetter() || text.at(0).isSpace())) - result |= Qt::SHIFT; - if (state & Qt::ControlModifier) - result |= Qt::CTRL; - if (state & Qt::MetaModifier) - result |= Qt::META; - if (state & Qt::AltModifier) - result |= Qt::ALT; - return result; -} - -void QtKeySequenceEdit::focusInEvent(QFocusEvent *e) -{ - m_lineEdit->event(e); - m_lineEdit->selectAll(); - QWidget::focusInEvent(e); -} - -void QtKeySequenceEdit::focusOutEvent(QFocusEvent *e) -{ - m_num = 0; - m_lineEdit->event(e); - QWidget::focusOutEvent(e); -} - -void QtKeySequenceEdit::keyPressEvent(QKeyEvent *e) -{ - handleKeyEvent(e); - e->accept(); -} - -void QtKeySequenceEdit::keyReleaseEvent(QKeyEvent *e) -{ - m_lineEdit->event(e); -} - -bool QtKeySequenceEdit::event(QEvent *e) -{ - if (e->type() == QEvent::Shortcut || - e->type() == QEvent::ShortcutOverride || - e->type() == QEvent::KeyRelease) { - e->accept(); - return true; - } - return QWidget::event(e); -} - - - - -#if QT_VERSION >= 0x040400 -QT_END_NAMESPACE -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h deleted file mode 100644 index 66156c5d4c..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h +++ /dev/null @@ -1,211 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QTPROPERTYBROWSERUTILS_H -#define QTPROPERTYBROWSERUTILS_H - -#include -#include -#include -#include - -#if QT_VERSION >= 0x040400 -QT_BEGIN_NAMESPACE -#endif - -class QMouseEvent; -class QCheckBox; -class QToolButton; -class QLineEdit; - -class QtCursorDatabase -{ -public: - QtCursorDatabase(); - - QStringList cursorShapeNames() const; - QMap cursorShapeIcons() const; - QString cursorToShapeName(const QCursor &cursor) const; - QIcon cursorToShapeIcon(const QCursor &cursor) const; - int cursorToValue(const QCursor &cursor) const; -#ifndef QT_NO_CURSOR - QCursor valueToCursor(int value) const; -#endif -private: - void appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon); - QStringList m_cursorNames; - QMap m_cursorIcons; - QMap m_valueToCursorShape; - QMap m_cursorShapeToValue; -}; - -class QtPropertyBrowserUtils -{ -public: - static QPixmap brushValuePixmap(const QBrush &b); - static QIcon brushValueIcon(const QBrush &b); - static QString colorValueText(const QColor &c); - static QPixmap fontValuePixmap(const QFont &f); - static QIcon fontValueIcon(const QFont &f); - static QString fontValueText(const QFont &f); -}; - -class QtBoolEdit : public QWidget { - Q_OBJECT -public: - QtBoolEdit(QWidget *parent = 0); - - bool textVisible() const { return m_textVisible; } - void setTextVisible(bool textVisible); - - Qt::CheckState checkState() const; - void setCheckState(Qt::CheckState state); - void setStateResetButton(bool enabled); - - bool isChecked() const; - void setChecked(bool c); - - bool blockCheckBoxSignals(bool block); - -Q_SIGNALS: - void toggled(bool); - void resetProperty(); - -protected: - void mousePressEvent(QMouseEvent * event); - -private: - QCheckBox *m_checkBox; - QToolButton *m_defaultButton; - bool m_textVisible; -}; - -class QtKeySequenceEdit : public QWidget -{ - Q_OBJECT -public: - QtKeySequenceEdit(QWidget *parent = 0); - - QKeySequence keySequence() const; - bool eventFilter(QObject *o, QEvent *e); -public Q_SLOTS: - void setKeySequence(const QKeySequence &sequence); -Q_SIGNALS: - void keySequenceChanged(const QKeySequence &sequence); -protected: - void focusInEvent(QFocusEvent *e); - void focusOutEvent(QFocusEvent *e); - void keyPressEvent(QKeyEvent *e); - void keyReleaseEvent(QKeyEvent *e); - bool event(QEvent *e); -private slots: - void slotClearShortcut(); -private: - void handleKeyEvent(QKeyEvent *e); - int translateModifiers(Qt::KeyboardModifiers state, const QString &text) const; - - int m_num; - QKeySequence m_keySequence; - QLineEdit *m_lineEdit; -}; - -#if QT_VERSION >= 0x040400 -QT_END_NAMESPACE -#endif - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h deleted file mode 100644 index f664609d79..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h +++ /dev/null @@ -1,184 +0,0 @@ -/**************************************************************************** -** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTTREEPROPERTYBROWSER_H -#define QTTREEPROPERTYBROWSER_H - -#include "qtpropertybrowser.h" - -#if QT_VERSION >= 0x040400 -QT_BEGIN_NAMESPACE -#endif - -class QTreeWidgetItem; -class QtTreePropertyBrowserPrivate; - -class QT_QTPROPERTYBROWSER_EXPORT QtTreePropertyBrowser : public QtAbstractPropertyBrowser -{ - Q_OBJECT - Q_ENUMS(ResizeMode) - Q_PROPERTY(int indentation READ indentation WRITE setIndentation) - Q_PROPERTY(bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated) - Q_PROPERTY(bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors) - Q_PROPERTY(bool headerVisible READ isHeaderVisible WRITE setHeaderVisible) - Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) - Q_PROPERTY(int splitterPosition READ splitterPosition WRITE setSplitterPosition) - Q_PROPERTY(bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked) -public: - - enum ResizeMode - { - Interactive, - Stretch, - Fixed, - ResizeToContents - }; - - QtTreePropertyBrowser(QWidget *parent = 0); - ~QtTreePropertyBrowser(); - - int indentation() const; - void setIndentation(int i); - - bool rootIsDecorated() const; - void setRootIsDecorated(bool show); - - bool alternatingRowColors() const; - void setAlternatingRowColors(bool enable); - - bool isHeaderVisible() const; - void setHeaderVisible(bool visible); - - ResizeMode resizeMode() const; - void setResizeMode(ResizeMode mode); - - int splitterPosition() const; - void setSplitterPosition(int position); - - void setExpanded(QtBrowserItem *item, bool expanded); - bool isExpanded(QtBrowserItem *item) const; - - bool isItemVisible(QtBrowserItem *item) const; - void setItemVisible(QtBrowserItem *item, bool visible); - - void setBackgroundColor(QtBrowserItem *item, const QColor &color); - QColor backgroundColor(QtBrowserItem *item) const; - QColor calculatedBackgroundColor(QtBrowserItem *item) const; - - void setPropertiesWithoutValueMarked(bool mark); - bool propertiesWithoutValueMarked() const; - - void editItem(QtBrowserItem *item); - -Q_SIGNALS: - - void collapsed(QtBrowserItem *item); - void expanded(QtBrowserItem *item); - -protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); - -private: - - QtTreePropertyBrowserPrivate *d_ptr; - Q_DECLARE_PRIVATE(QtTreePropertyBrowser) - Q_DISABLE_COPY(QtTreePropertyBrowser) - - Q_PRIVATE_SLOT(d_func(), void slotCollapsed(const QModelIndex &)) - Q_PRIVATE_SLOT(d_func(), void slotExpanded(const QModelIndex &)) - Q_PRIVATE_SLOT(d_func(), void slotCurrentBrowserItemChanged(QtBrowserItem *)) - Q_PRIVATE_SLOT(d_func(), void slotCurrentTreeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)) - -}; - -#if QT_VERSION >= 0x040400 -QT_END_NAMESPACE -#endif - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp similarity index 81% rename from studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp index d5ebd4fc2b..0e9d223967 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp @@ -1,102 +1,46 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtbuttonpropertybrowser.h" #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QtButtonPropertyBrowserPrivate { @@ -324,14 +268,11 @@ void QtButtonPropertyBrowserPrivate::propertyInserted(QtBrowserItem *index, QtBr if (!parentItem->container) { m_recreateQueue.removeAll(parentItem); WidgetItem *grandParent = parentItem->parent; - QWidget *w = 0; QGridLayout *l = 0; const int oldRow = gridRow(parentItem); if (grandParent) { - w = grandParent->container; l = grandParent->layout; } else { - w = q_ptr; l = m_mainLayout; } QFrame *container = new QFrame(); @@ -548,6 +489,9 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) /*! \class QtButtonPropertyBrowser + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtButtonPropertyBrowser class provides a drop down QToolButton based property browser. @@ -592,9 +536,8 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtButtonPropertyBrowser::QtButtonPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtButtonPropertyBrowserPrivate) { - d_ptr = new QtButtonPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -615,7 +558,6 @@ QtButtonPropertyBrowser::~QtButtonPropertyBrowser() const QMap::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); - delete d_ptr; } /*! @@ -669,8 +611,6 @@ bool QtButtonPropertyBrowser::isExpanded(QtBrowserItem *item) const return false; } -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qtbuttonpropertybrowser.cxx" +#include "moc_qtbuttonpropertybrowser.cpp" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h new file mode 100644 index 0000000000..bfad38d9c2 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTBUTTONPROPERTYBROWSER_H +#define QTBUTTONPROPERTYBROWSER_H + +#include "qtpropertybrowser.h" +#include "qtpropertybrowser_export.h" + +QT_BEGIN_NAMESPACE + +class QtButtonPropertyBrowserPrivate; + +class QTPROPERTYBROWSER_EXPORT QtButtonPropertyBrowser : public QtAbstractPropertyBrowser +{ + Q_OBJECT +public: + + QtButtonPropertyBrowser(QWidget *parent = 0); + ~QtButtonPropertyBrowser(); + + void setExpanded(QtBrowserItem *item, bool expanded); + bool isExpanded(QtBrowserItem *item) const; + +Q_SIGNALS: + + void collapsed(QtBrowserItem *item); + void expanded(QtBrowserItem *item); + +protected: + virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); + virtual void itemRemoved(QtBrowserItem *item); + virtual void itemChanged(QtBrowserItem *item); + +private: + + QScopedPointer d_ptr; + Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) + Q_DISABLE_COPY(QtButtonPropertyBrowser) + Q_PRIVATE_SLOT(d_func(), void slotUpdate()) + Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) + Q_PRIVATE_SLOT(d_func(), void slotToggled(bool)) + +}; + +QT_END_NAMESPACE + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.cpp similarity index 68% rename from studio/src/3rdparty/qtpropertybrowser/qteditorfactory.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.cpp index 2c45b77beb..973418d011 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.cpp @@ -1,123 +1,61 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qteditorfactory.h" #include "qtpropertybrowserutils_p.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #if defined(Q_CC_MSVC) # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif // Set a hard coded left margin to account for the indentation // of the tree view icon when switching to an editor @@ -162,7 +100,7 @@ Editor *EditorFactoryPrivate::createEditor(QtProperty *property, QWidget template void EditorFactoryPrivate::initializeEditor(QtProperty *property, Editor *editor) { - Q_TYPENAME PropertyToEditorListMap::iterator it = m_createdEditors.find(property); + typename PropertyToEditorListMap::iterator it = m_createdEditors.find(property); if (it == m_createdEditors.end()) it = m_createdEditors.insert(property, EditorList()); it.value().append(editor); @@ -172,12 +110,12 @@ void EditorFactoryPrivate::initializeEditor(QtProperty *property, Editor template void EditorFactoryPrivate::slotEditorDestroyed(QObject *object) { - const Q_TYPENAME EditorToPropertyMap::iterator ecend = m_editorToProperty.end(); - for (Q_TYPENAME EditorToPropertyMap::iterator itEditor = m_editorToProperty.begin(); itEditor != ecend; ++itEditor) { + const typename EditorToPropertyMap::iterator ecend = m_editorToProperty.end(); + for (typename EditorToPropertyMap::iterator itEditor = m_editorToProperty.begin(); itEditor != ecend; ++itEditor) { if (itEditor.key() == object) { Editor *editor = itEditor.key(); QtProperty *property = itEditor.value(); - const Q_TYPENAME PropertyToEditorListMap::iterator pit = m_createdEditors.find(property); + const typename PropertyToEditorListMap::iterator pit = m_createdEditors.find(property); if (pit != m_createdEditors.end()) { pit.value().removeAll(editor); if (pit.value().empty()) @@ -268,6 +206,9 @@ void QtSpinBoxFactoryPrivate::slotSetValue(int value) /*! \class QtSpinBoxFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager objects. @@ -279,9 +220,8 @@ void QtSpinBoxFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtSpinBoxFactoryPrivate()) { - d_ptr = new QtSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -292,7 +232,6 @@ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) QtSpinBoxFactory::~QtSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -302,12 +241,12 @@ QtSpinBoxFactory::~QtSpinBoxFactory() */ void QtSpinBoxFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } /*! @@ -325,8 +264,8 @@ QWidget *QtSpinBoxFactory::createEditor(QtIntPropertyManager *manager, QtPropert editor->setKeyboardTracking(false); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -337,12 +276,12 @@ QWidget *QtSpinBoxFactory::createEditor(QtIntPropertyManager *manager, QtPropert */ void QtSpinBoxFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } // QtSliderFactory @@ -421,6 +360,9 @@ void QtSliderFactoryPrivate::slotSetValue(int value) /*! \class QtSliderFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager objects. @@ -432,9 +374,8 @@ void QtSliderFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSliderFactory::QtSliderFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtSliderFactoryPrivate()) { - d_ptr = new QtSliderFactoryPrivate(); d_ptr->q_ptr = this; } @@ -445,7 +386,6 @@ QtSliderFactory::QtSliderFactory(QObject *parent) QtSliderFactory::~QtSliderFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -455,12 +395,12 @@ QtSliderFactory::~QtSliderFactory() */ void QtSliderFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } /*! @@ -478,8 +418,8 @@ QWidget *QtSliderFactory::createEditor(QtIntPropertyManager *manager, QtProperty editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -490,12 +430,12 @@ QWidget *QtSliderFactory::createEditor(QtIntPropertyManager *manager, QtProperty */ void QtSliderFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } // QtSliderFactory @@ -574,6 +514,9 @@ void QtScrollBarFactoryPrivate::slotSetValue(int value) /*! \class QtScrollBarFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManager objects. @@ -585,9 +528,8 @@ void QtScrollBarFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtScrollBarFactoryPrivate()) { - d_ptr = new QtScrollBarFactoryPrivate(); d_ptr->q_ptr = this; } @@ -598,7 +540,6 @@ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) QtScrollBarFactory::~QtScrollBarFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -608,12 +549,12 @@ QtScrollBarFactory::~QtScrollBarFactory() */ void QtScrollBarFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } /*! @@ -630,8 +571,8 @@ QWidget *QtScrollBarFactory::createEditor(QtIntPropertyManager *manager, QtPrope editor->setRange(manager->minimum(property), manager->maximum(property)); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -642,12 +583,12 @@ QWidget *QtScrollBarFactory::createEditor(QtIntPropertyManager *manager, QtPrope */ void QtScrollBarFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); } // QtCheckBoxFactory @@ -659,7 +600,6 @@ class QtCheckBoxFactoryPrivate : public EditorFactoryPrivate public: void slotPropertyChanged(QtProperty *property, bool value); void slotSetValue(bool value); - void slotResetProperty(); }; void QtCheckBoxFactoryPrivate::slotPropertyChanged(QtProperty *property, bool value) @@ -670,7 +610,6 @@ void QtCheckBoxFactoryPrivate::slotPropertyChanged(QtProperty *property, bool va QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { QtBoolEdit *editor = itEditor.next(); - editor->setStateResetButton(property->isModified()); editor->blockCheckBoxSignals(true); editor->setChecked(value); editor->blockCheckBoxSignals(false); @@ -693,24 +632,11 @@ void QtCheckBoxFactoryPrivate::slotSetValue(bool value) } } -void QtCheckBoxFactoryPrivate::slotResetProperty() -{ - QObject *object = q_ptr->sender(); - - const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) - if (itEditor.key() == object) { - QtProperty *property = itEditor.value(); - QtBoolPropertyManager *manager = q_ptr->propertyManager(property); - if (!manager) - return; - manager->emitResetProperty(property); - return; - } -} - /*! \class QtCheckBoxFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManager objects. @@ -722,9 +648,8 @@ void QtCheckBoxFactoryPrivate::slotResetProperty() Creates a factory with the given \a parent. */ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtCheckBoxFactoryPrivate()) { - d_ptr = new QtCheckBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -735,7 +660,6 @@ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) QtCheckBoxFactory::~QtCheckBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -745,8 +669,8 @@ QtCheckBoxFactory::~QtCheckBoxFactory() */ void QtCheckBoxFactory::connectPropertyManager(QtBoolPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotPropertyChanged(QtProperty *, bool))); + connect(manager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotPropertyChanged(QtProperty*,bool))); } /*! @@ -758,13 +682,11 @@ QWidget *QtCheckBoxFactory::createEditor(QtBoolPropertyManager *manager, QtPrope QWidget *parent) { QtBoolEdit *editor = d_ptr->createEditor(property, parent); - editor->setStateResetButton(property->isModified()); editor->setChecked(manager->value(property)); - connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); connect(editor, SIGNAL(toggled(bool)), this, SLOT(slotSetValue(bool))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -775,8 +697,8 @@ QWidget *QtCheckBoxFactory::createEditor(QtBoolPropertyManager *manager, QtPrope */ void QtCheckBoxFactory::disconnectPropertyManager(QtBoolPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotPropertyChanged(QtProperty *, bool))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotPropertyChanged(QtProperty*,bool))); } // QtDoubleSpinBoxFactory @@ -885,6 +807,9 @@ void QtDoubleSpinBoxFactoryPrivate::slotSetValue(double value) } /*! \class QtDoubleSpinBoxFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePropertyManager objects. @@ -896,9 +821,8 @@ void QtDoubleSpinBoxFactoryPrivate::slotSetValue(double value) Creates a factory with the given \a parent. */ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtDoubleSpinBoxFactoryPrivate()) { - d_ptr = new QtDoubleSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -909,7 +833,6 @@ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -919,14 +842,14 @@ QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() */ void QtDoubleSpinBoxFactory::connectPropertyManager(QtDoublePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotPropertyChanged(QtProperty *, double))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(manager, SIGNAL(singleStepChanged(QtProperty *, double)), - this, SLOT(slotSingleStepChanged(QtProperty *, double))); - connect(manager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(manager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotPropertyChanged(QtProperty*,double))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), + this, SLOT(slotSingleStepChanged(QtProperty*,double))); + connect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); } /*! @@ -939,14 +862,14 @@ QWidget *QtDoubleSpinBoxFactory::createEditor(QtDoublePropertyManager *manager, { QDoubleSpinBox *editor = d_ptr->createEditor(property, parent); editor->setSingleStep(manager->singleStep(property)); - editor->setDecimals(6); + editor->setDecimals(manager->decimals(property)); editor->setRange(manager->minimum(property), manager->maximum(property)); editor->setValue(manager->value(property)); editor->setKeyboardTracking(false); connect(editor, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -957,14 +880,14 @@ QWidget *QtDoubleSpinBoxFactory::createEditor(QtDoublePropertyManager *manager, */ void QtDoubleSpinBoxFactory::disconnectPropertyManager(QtDoublePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotPropertyChanged(QtProperty *, double))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, double)), - this, SLOT(slotSingleStepChanged(QtProperty *, double))); - disconnect(manager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotPropertyChanged(QtProperty*,double))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), + this, SLOT(slotSingleStepChanged(QtProperty*,double))); + disconnect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); } // QtLineEditFactory @@ -978,7 +901,6 @@ class QtLineEditFactoryPrivate : public EditorFactoryPrivate void slotPropertyChanged(QtProperty *property, const QString &value); void slotRegExpChanged(QtProperty *property, const QRegExp ®Exp); void slotSetValue(const QString &value); - void slotEditingFinished(); }; void QtLineEditFactoryPrivate::slotPropertyChanged(QtProperty *property, @@ -1036,24 +958,11 @@ void QtLineEditFactoryPrivate::slotSetValue(const QString &value) } } -void QtLineEditFactoryPrivate::slotEditingFinished() -{ - QObject *object = q_ptr->sender(); - const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) - if (itEditor.key() == object) { - QtProperty *property = itEditor.value(); - QtStringPropertyManager *manager = q_ptr->propertyManager(property); - if (!manager) - return; - QString value = static_cast(itEditor.key())->text(); - manager->setValue(property, value); - return; - } -} - /*! \class QtLineEditFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyManager objects. @@ -1065,9 +974,8 @@ void QtLineEditFactoryPrivate::slotEditingFinished() Creates a factory with the given \a parent. */ QtLineEditFactory::QtLineEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtLineEditFactoryPrivate()) { - d_ptr = new QtLineEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1078,7 +986,6 @@ QtLineEditFactory::QtLineEditFactory(QObject *parent) QtLineEditFactory::~QtLineEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1088,10 +995,10 @@ QtLineEditFactory::~QtLineEditFactory() */ void QtLineEditFactory::connectPropertyManager(QtStringPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); - connect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), - this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QString)), + this, SLOT(slotPropertyChanged(QtProperty*,QString))); + connect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), + this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); } /*! @@ -1111,10 +1018,10 @@ QWidget *QtLineEditFactory::createEditor(QtStringPropertyManager *manager, } editor->setText(manager->value(property)); - connect(editor, SIGNAL(editingFinished()), - this, SLOT(slotEditingFinished())); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(textEdited(QString)), + this, SLOT(slotSetValue(QString))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1125,10 +1032,10 @@ QWidget *QtLineEditFactory::createEditor(QtStringPropertyManager *manager, */ void QtLineEditFactory::disconnectPropertyManager(QtStringPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); - disconnect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), - this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QString)), + this, SLOT(slotPropertyChanged(QtProperty*,QString))); + disconnect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), + this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); } // QtDateEditFactory @@ -1194,6 +1101,9 @@ void QtDateEditFactoryPrivate::slotSetValue(const QDate &value) /*! \class QtDateEditFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManager objects. @@ -1205,9 +1115,8 @@ void QtDateEditFactoryPrivate::slotSetValue(const QDate &value) Creates a factory with the given \a parent. */ QtDateEditFactory::QtDateEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtDateEditFactoryPrivate()) { - d_ptr = new QtDateEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1218,7 +1127,6 @@ QtDateEditFactory::QtDateEditFactory(QObject *parent) QtDateEditFactory::~QtDateEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1228,10 +1136,10 @@ QtDateEditFactory::~QtDateEditFactory() */ void QtDateEditFactory::connectPropertyManager(QtDatePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDate &))); - connect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), - this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), + this, SLOT(slotPropertyChanged(QtProperty*,QDate))); + connect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), + this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); } /*! @@ -1243,14 +1151,15 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope QWidget *parent) { QDateEdit *editor = d_ptr->createEditor(property, parent); + editor->setDisplayFormat(QtPropertyBrowserUtils::dateFormat()); editor->setCalendarPopup(true); editor->setDateRange(manager->minimum(property), manager->maximum(property)); editor->setDate(manager->value(property)); - connect(editor, SIGNAL(dateChanged(const QDate &)), - this, SLOT(slotSetValue(const QDate &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(dateChanged(QDate)), + this, SLOT(slotSetValue(QDate))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1261,10 +1170,10 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope */ void QtDateEditFactory::disconnectPropertyManager(QtDatePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDate &))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), - this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), + this, SLOT(slotPropertyChanged(QtProperty*,QDate))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), + this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); } // QtTimeEditFactory @@ -1309,6 +1218,9 @@ void QtTimeEditFactoryPrivate::slotSetValue(const QTime &value) /*! \class QtTimeEditFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManager objects. @@ -1320,9 +1232,8 @@ void QtTimeEditFactoryPrivate::slotSetValue(const QTime &value) Creates a factory with the given \a parent. */ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtTimeEditFactoryPrivate()) { - d_ptr = new QtTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1333,7 +1244,6 @@ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) QtTimeEditFactory::~QtTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1343,8 +1253,8 @@ QtTimeEditFactory::~QtTimeEditFactory() */ void QtTimeEditFactory::connectPropertyManager(QtTimePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QTime &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QTime))); } /*! @@ -1356,12 +1266,13 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope QWidget *parent) { QTimeEdit *editor = d_ptr->createEditor(property, parent); + editor->setDisplayFormat(QtPropertyBrowserUtils::timeFormat()); editor->setTime(manager->value(property)); - connect(editor, SIGNAL(timeChanged(const QTime &)), - this, SLOT(slotSetValue(const QTime &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(timeChanged(QTime)), + this, SLOT(slotSetValue(QTime))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1372,8 +1283,8 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope */ void QtTimeEditFactory::disconnectPropertyManager(QtTimePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QTime &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QTime))); } // QtDateTimeEditFactory @@ -1421,6 +1332,9 @@ void QtDateTimeEditFactoryPrivate::slotSetValue(const QDateTime &value) /*! \class QtDateTimeEditFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePropertyManager objects. @@ -1432,9 +1346,8 @@ void QtDateTimeEditFactoryPrivate::slotSetValue(const QDateTime &value) Creates a factory with the given \a parent. */ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtDateTimeEditFactoryPrivate()) { - d_ptr = new QtDateTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1445,7 +1358,6 @@ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) QtDateTimeEditFactory::~QtDateTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1455,8 +1367,8 @@ QtDateTimeEditFactory::~QtDateTimeEditFactory() */ void QtDateTimeEditFactory::connectPropertyManager(QtDateTimePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); } /*! @@ -1468,12 +1380,13 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, QtProperty *property, QWidget *parent) { QDateTimeEdit *editor = d_ptr->createEditor(property, parent); + editor->setDisplayFormat(QtPropertyBrowserUtils::dateTimeFormat()); editor->setDateTime(manager->value(property)); - connect(editor, SIGNAL(dateTimeChanged(const QDateTime &)), - this, SLOT(slotSetValue(const QDateTime &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(dateTimeChanged(QDateTime)), + this, SLOT(slotSetValue(QDateTime))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1484,13 +1397,13 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, */ void QtDateTimeEditFactory::disconnectPropertyManager(QtDateTimePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), + this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); } // QtKeySequenceEditorFactory -class QtKeySequenceEditorFactoryPrivate : public EditorFactoryPrivate +class QtKeySequenceEditorFactoryPrivate : public EditorFactoryPrivate { QtKeySequenceEditorFactory *q_ptr; Q_DECLARE_PUBLIC(QtKeySequenceEditorFactory) @@ -1506,9 +1419,9 @@ void QtKeySequenceEditorFactoryPrivate::slotPropertyChanged(QtProperty *property if (!m_createdEditors.contains(property)) return; - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QtKeySequenceEdit *editor = itEditor.next(); + QKeySequenceEdit *editor = itEditor.next(); editor->blockSignals(true); editor->setKeySequence(value); editor->blockSignals(false); @@ -1518,8 +1431,8 @@ void QtKeySequenceEditorFactoryPrivate::slotPropertyChanged(QtProperty *property void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) { QObject *object = q_ptr->sender(); - const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) if (itEditor.key() == object) { QtProperty *property = itEditor.value(); QtKeySequencePropertyManager *manager = q_ptr->propertyManager(property); @@ -1532,6 +1445,9 @@ void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) /*! \class QtKeySequenceEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequencePropertyManager objects. @@ -1543,9 +1459,8 @@ void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) Creates a factory with the given \a parent. */ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtKeySequenceEditorFactoryPrivate()) { - d_ptr = new QtKeySequenceEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1556,7 +1471,6 @@ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1566,8 +1480,8 @@ QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() */ void QtKeySequenceEditorFactory::connectPropertyManager(QtKeySequencePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), + this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); } /*! @@ -1578,13 +1492,13 @@ void QtKeySequenceEditorFactory::connectPropertyManager(QtKeySequencePropertyMan QWidget *QtKeySequenceEditorFactory::createEditor(QtKeySequencePropertyManager *manager, QtProperty *property, QWidget *parent) { - QtKeySequenceEdit *editor = d_ptr->createEditor(property, parent); + QKeySequenceEdit *editor = d_ptr->createEditor(property, parent); editor->setKeySequence(manager->value(property)); - connect(editor, SIGNAL(keySequenceChanged(const QKeySequence &)), - this, SLOT(slotSetValue(const QKeySequence &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(keySequenceChanged(QKeySequence)), + this, SLOT(slotSetValue(QKeySequence))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1595,8 +1509,8 @@ QWidget *QtKeySequenceEditorFactory::createEditor(QtKeySequencePropertyManager * */ void QtKeySequenceEditorFactory::disconnectPropertyManager(QtKeySequencePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), + this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); } // QtCharEdit @@ -1813,6 +1727,9 @@ void QtCharEditorFactoryPrivate::slotSetValue(const QChar &value) /*! \class QtCharEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager objects. @@ -1824,9 +1741,8 @@ void QtCharEditorFactoryPrivate::slotSetValue(const QChar &value) Creates a factory with the given \a parent. */ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtCharEditorFactoryPrivate()) { - d_ptr = new QtCharEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1837,7 +1753,6 @@ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) QtCharEditorFactory::~QtCharEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1847,8 +1762,8 @@ QtCharEditorFactory::~QtCharEditorFactory() */ void QtCharEditorFactory::connectPropertyManager(QtCharPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QChar &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), + this, SLOT(slotPropertyChanged(QtProperty*,QChar))); } /*! @@ -1862,10 +1777,10 @@ QWidget *QtCharEditorFactory::createEditor(QtCharPropertyManager *manager, QtCharEdit *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); - connect(editor, SIGNAL(valueChanged(const QChar &)), - this, SLOT(slotSetValue(const QChar &))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(valueChanged(QChar)), + this, SLOT(slotSetValue(QChar))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -1876,91 +1791,13 @@ QWidget *QtCharEditorFactory::createEditor(QtCharPropertyManager *manager, */ void QtCharEditorFactory::disconnectPropertyManager(QtCharPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QChar &))); -} - - -class QtEnumEditWidget : public QWidget { - Q_OBJECT - -public: - QtEnumEditWidget(QWidget *parent); - - bool blockComboBoxSignals(bool block); - void addItems(const QStringList &texts); - void clearComboBox(); - void setItemIcon(int index, const QIcon &icon); - -public Q_SLOTS: - void setValue(int value); - void setStateResetButton(bool enabled); - -Q_SIGNALS: - void valueChanged(int value); - void resetProperty(); - -private: - QComboBox *m_comboBox; - QToolButton *m_defaultButton; -}; - -QtEnumEditWidget::QtEnumEditWidget(QWidget *parent) : - QWidget(parent), - m_comboBox(new QComboBox), - m_defaultButton(new QToolButton) -{ - m_comboBox->view()->setTextElideMode(Qt::ElideRight); - - QHBoxLayout *lt = new QHBoxLayout(this); - lt->setContentsMargins(0, 0, 0, 0); - lt->setSpacing(0); - lt->addWidget(m_comboBox); - - m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); - m_defaultButton->setMaximumWidth(16); - - connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(valueChanged(int))); - connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); - lt->addWidget(m_defaultButton); - m_defaultButton->setEnabled(false); - setFocusProxy(m_comboBox); -} - -void QtEnumEditWidget::setValue(int value) -{ - if (m_comboBox->currentIndex() != value) - m_comboBox->setCurrentIndex(value); -} - -void QtEnumEditWidget::setStateResetButton(bool enabled) -{ - m_defaultButton->setEnabled(enabled); -} - -bool QtEnumEditWidget::blockComboBoxSignals(bool block) -{ - return m_comboBox->blockSignals(block); -} - -void QtEnumEditWidget::addItems(const QStringList &texts) -{ - m_comboBox->addItems(texts); -} - -void QtEnumEditWidget::clearComboBox() -{ - m_comboBox->clear(); -} - -void QtEnumEditWidget::setItemIcon(int index, const QIcon &icon) -{ - m_comboBox->setItemIcon(index, icon); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), + this, SLOT(slotPropertyChanged(QtProperty*,QChar))); } // QtEnumEditorFactory -class QtEnumEditorFactoryPrivate : public EditorFactoryPrivate +class QtEnumEditorFactoryPrivate : public EditorFactoryPrivate { QtEnumEditorFactory *q_ptr; Q_DECLARE_PUBLIC(QtEnumEditorFactory) @@ -1970,36 +1807,19 @@ class QtEnumEditorFactoryPrivate : public EditorFactoryPrivate void slotEnumNamesChanged(QtProperty *property, const QStringList &); void slotEnumIconsChanged(QtProperty *property, const QMap &); void slotSetValue(int value); - void slotResetProperty(); }; -void QtEnumEditorFactoryPrivate::slotResetProperty() -{ - QObject *object = q_ptr->sender(); - const EditorToPropertyMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (EditorToPropertyMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) - if (itEditor.key() == object) { - QtProperty *property = itEditor.value(); - QtEnumPropertyManager *manager = q_ptr->propertyManager(property); - if (!manager) - return; - manager->emitResetProperty(property); - return; - } -} - void QtEnumEditorFactoryPrivate::slotPropertyChanged(QtProperty *property, int value) { if (!m_createdEditors.contains(property)) return; - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QtEnumEditWidget *editor = itEditor.next(); - editor->setStateResetButton(property->isModified()); - editor->blockComboBoxSignals(true); - editor->setValue(value); - editor->blockComboBoxSignals(false); + QComboBox *editor = itEditor.next(); + editor->blockSignals(true); + editor->setCurrentIndex(value); + editor->blockSignals(false); } } @@ -2015,17 +1835,17 @@ void QtEnumEditorFactoryPrivate::slotEnumNamesChanged(QtProperty *property, QMap enumIcons = manager->enumIcons(property); - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QtEnumEditWidget *editor = itEditor.next(); - editor->blockComboBoxSignals(true); - editor->clearComboBox(); + QComboBox *editor = itEditor.next(); + editor->blockSignals(true); + editor->clear(); editor->addItems(enumNames); const int nameCount = enumNames.count(); for (int i = 0; i < nameCount; i++) editor->setItemIcon(i, enumIcons.value(i)); - editor->setValue(manager->value(property)); - editor->blockComboBoxSignals(false); + editor->setCurrentIndex(manager->value(property)); + editor->blockSignals(false); } } @@ -2040,23 +1860,23 @@ void QtEnumEditorFactoryPrivate::slotEnumIconsChanged(QtProperty *property, return; const QStringList enumNames = manager->enumNames(property); - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QtEnumEditWidget *editor = itEditor.next(); - editor->blockComboBoxSignals(true); + QComboBox *editor = itEditor.next(); + editor->blockSignals(true); const int nameCount = enumNames.count(); for (int i = 0; i < nameCount; i++) editor->setItemIcon(i, enumIcons.value(i)); - editor->setValue(manager->value(property)); - editor->blockComboBoxSignals(false); + editor->setCurrentIndex(manager->value(property)); + editor->blockSignals(false); } } void QtEnumEditorFactoryPrivate::slotSetValue(int value) { QObject *object = q_ptr->sender(); - const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) if (itEditor.key() == object) { QtProperty *property = itEditor.value(); QtEnumPropertyManager *manager = q_ptr->propertyManager(property); @@ -2069,6 +1889,9 @@ void QtEnumEditorFactoryPrivate::slotSetValue(int value) /*! \class QtEnumEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyManager objects. @@ -2080,9 +1903,8 @@ void QtEnumEditorFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtEnumEditorFactoryPrivate()) { - d_ptr = new QtEnumEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -2093,7 +1915,6 @@ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) QtEnumEditorFactory::~QtEnumEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2103,10 +1924,10 @@ QtEnumEditorFactory::~QtEnumEditorFactory() */ void QtEnumEditorFactory::connectPropertyManager(QtEnumPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - connect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + connect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); } /*! @@ -2117,21 +1938,20 @@ void QtEnumEditorFactory::connectPropertyManager(QtEnumPropertyManager *manager) QWidget *QtEnumEditorFactory::createEditor(QtEnumPropertyManager *manager, QtProperty *property, QWidget *parent) { - QtEnumEditWidget *editor = d_ptr->createEditor(property, parent); + QComboBox *editor = d_ptr->createEditor(property, parent); editor->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); + editor->view()->setTextElideMode(Qt::ElideRight); QStringList enumNames = manager->enumNames(property); editor->addItems(enumNames); QMap enumIcons = manager->enumIcons(property); const int enumNamesCount = enumNames.count(); for (int i = 0; i < enumNamesCount; i++) editor->setItemIcon(i, enumIcons.value(i)); - editor->setValue(manager->value(property)); - editor->setStateResetButton(property->isModified()); + editor->setCurrentIndex(manager->value(property)); - connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); - connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(currentIndexChanged(int)), this, SLOT(slotSetValue(int))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -2142,10 +1962,10 @@ QWidget *QtEnumEditorFactory::createEditor(QtEnumPropertyManager *manager, QtPro */ void QtEnumEditorFactory::disconnectPropertyManager(QtEnumPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotPropertyChanged(QtProperty *, int))); - disconnect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotPropertyChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); } // QtCursorEditorFactory @@ -2232,6 +2052,9 @@ void QtCursorEditorFactoryPrivate::slotEditorDestroyed(QObject *object) /*! \class QtCursorEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorPropertyManager objects. @@ -2243,15 +2066,14 @@ void QtCursorEditorFactoryPrivate::slotEditorDestroyed(QObject *object) Creates a factory with the given \a parent. */ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtCursorEditorFactoryPrivate()) { - d_ptr = new QtCursorEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_enumEditorFactory = new QtEnumEditorFactory(this); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); d_ptr->m_enumEditorFactory->addPropertyManager(d_ptr->m_enumPropertyManager); } @@ -2260,7 +2082,6 @@ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) */ QtCursorEditorFactory::~QtCursorEditorFactory() { - delete d_ptr; } /*! @@ -2270,8 +2091,8 @@ QtCursorEditorFactory::~QtCursorEditorFactory() */ void QtCursorEditorFactory::connectPropertyManager(QtCursorPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &))); + connect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), + this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); } /*! @@ -2299,8 +2120,8 @@ QWidget *QtCursorEditorFactory::createEditor(QtCursorPropertyManager *manager, Q QWidget *editor = af->createEditor(enumProp, parent); d_ptr->m_enumToEditors[enumProp].append(editor); d_ptr->m_editorToEnum[editor] = enumProp; - connect(editor, SIGNAL(destroyed(QObject *)), - this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), + this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -2311,8 +2132,8 @@ QWidget *QtCursorEditorFactory::createEditor(QtCursorPropertyManager *manager, Q */ void QtCursorEditorFactory::disconnectPropertyManager(QtCursorPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &))); + disconnect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), + this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); } // QtColorEditWidget @@ -2377,11 +2198,9 @@ void QtColorEditWidget::setValue(const QColor &c) void QtColorEditWidget::buttonClicked() { - bool ok = false; - QRgb oldRgba = m_color.rgba(); - QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this); - if (ok && newRgba != oldRgba) { - setValue(QColor::fromRgba(newRgba)); + const QColor newColor = QColorDialog::getColor(m_color, this, QString(), QColorDialog::ShowAlphaChannel); + if (newColor.isValid() && newColor != m_color) { + setValue(newColor); emit valueChanged(m_color); } } @@ -2451,6 +2270,9 @@ void QtColorEditorFactoryPrivate::slotSetValue(const QColor &value) /*! \class QtColorEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManager objects. @@ -2474,7 +2296,6 @@ QtColorEditorFactory::QtColorEditorFactory(QObject *parent) : QtColorEditorFactory::~QtColorEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2499,7 +2320,7 @@ QWidget *QtColorEditorFactory::createEditor(QtColorPropertyManager *manager, QtColorEditWidget *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(QColor)), this, SLOT(slotSetValue(QColor))); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -2662,6 +2483,9 @@ void QtFontEditorFactoryPrivate::slotSetValue(const QFont &value) /*! \class QtFontEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager objects. @@ -2685,7 +2509,6 @@ QtFontEditorFactory::QtFontEditorFactory(QObject *parent) : QtFontEditorFactory::~QtFontEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2710,7 +2533,7 @@ QWidget *QtFontEditorFactory::createEditor(QtFontPropertyManager *manager, QtFontEditWidget *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(QFont)), this, SLOT(slotSetValue(QFont))); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); return editor; } @@ -2724,270 +2547,7 @@ void QtFontEditorFactory::disconnectPropertyManager(QtFontPropertyManager *manag disconnect(manager, SIGNAL(valueChanged(QtProperty*,QFont)), this, SLOT(slotPropertyChanged(QtProperty*,QFont))); } -class QtTextEditWidget : public QWidget { - Q_OBJECT - -public: - QtTextEditWidget(QWidget *parent); - - bool eventFilter(QObject *obj, QEvent *ev); - -public Q_SLOTS: - void setValue(const QString &value); - void setStateResetButton(bool enabled); - -private Q_SLOTS: - void buttonClicked(); - -Q_SIGNALS: - void valueChanged(const QString &value); - void resetProperty(); - -private: - QLineEdit *m_lineEdit; - QToolButton *m_defaultButton; - QToolButton *m_button; -}; - -QtTextEditWidget::QtTextEditWidget(QWidget *parent) : - QWidget(parent), - m_lineEdit(new QLineEdit), - m_defaultButton(new QToolButton), - m_button(new QToolButton) -{ - QHBoxLayout *lt = new QHBoxLayout(this); - lt->setContentsMargins(0, 0, 0, 0); - lt->setSpacing(0); - lt->addWidget(m_lineEdit); - m_lineEdit->setReadOnly(true); - - m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored); - m_button->setFixedWidth(20); - m_button->setText(tr("...")); - m_button->installEventFilter(this); - - setFocusProxy(m_button); - setFocusPolicy(m_button->focusPolicy()); - - m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); - m_defaultButton->setMaximumWidth(16); - - connect(m_button, SIGNAL(clicked()), this, SLOT(buttonClicked())); - connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); - lt->addWidget(m_button); - lt->addWidget(m_defaultButton); - m_defaultButton->setEnabled(false); -} - -void QtTextEditWidget::setValue(const QString &value) -{ - if (m_lineEdit->text() != value) - m_lineEdit->setText(value); -} - -void QtTextEditWidget::setStateResetButton(bool enabled) -{ - m_defaultButton->setEnabled(enabled); -} - -void QtTextEditWidget::buttonClicked() -{ - QGridLayout *gridLayout; - QPlainTextEdit *plainTextEdit; - QDialogButtonBox *buttonBox; - QDialog *dialog; - - dialog = new QDialog(this); - dialog->resize(400, 300); - gridLayout = new QGridLayout(dialog); - plainTextEdit = new QPlainTextEdit(dialog); - - gridLayout->addWidget(plainTextEdit, 0, 0, 1, 1); - - buttonBox = new QDialogButtonBox(dialog); - buttonBox->setOrientation(Qt::Horizontal); - buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); - - gridLayout->addWidget(buttonBox, 1, 0, 1, 1); - - QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); - - plainTextEdit->textCursor().insertText(m_lineEdit->text()); - - dialog->setModal(true); - dialog->show(); - int result = dialog->exec(); - - if (result == QDialog::Accepted) - { - QString newText = plainTextEdit->document()->toPlainText(); - - setValue(newText); - if (plainTextEdit->document()->isModified()) - Q_EMIT valueChanged(newText); - } - - delete dialog; -} - -bool QtTextEditWidget::eventFilter(QObject *obj, QEvent *ev) -{ - if (obj == m_button) { - switch (ev->type()) { - case QEvent::KeyPress: - case QEvent::KeyRelease: { // Prevent the QToolButton from handling Enter/Escape meant control the delegate - switch (static_cast(ev)->key()) { - case Qt::Key_Escape: - case Qt::Key_Enter: - case Qt::Key_Return: - ev->ignore(); - return true; - default: - break; - } - } - break; - default: - break; - } - } - return QWidget::eventFilter(obj, ev); -} - -// QtLineEditFactory - -class QtTextEditorFactoryPrivate : public EditorFactoryPrivate -{ - QtTextEditorFactory *q_ptr; - Q_DECLARE_PUBLIC(QtTextEditorFactory) -public: - - void slotPropertyChanged(QtProperty *property, const QString &value); - void slotSetValue(const QString &value); - void slotResetProperty(); -}; - -void QtTextEditorFactoryPrivate::slotPropertyChanged(QtProperty *property, - const QString &value) -{ - const PropertyToEditorListMap::iterator it = m_createdEditors.find(property); - if (it == m_createdEditors.end()) - return; - QListIterator itEditor(it.value()); - - while (itEditor.hasNext()) - { - QtTextEditWidget *editor = itEditor.next(); - editor->setValue(value); - editor->setStateResetButton(property->isModified()); - } -} - -void QtTextEditorFactoryPrivate::slotSetValue(const QString &value) -{ - QObject *object = q_ptr->sender(); - const EditorToPropertyMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (EditorToPropertyMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) - if (itEditor.key() == object) { - QtProperty *property = itEditor.value(); - QtTextPropertyManager *manager = q_ptr->propertyManager(property); - if (!manager) - return; - manager->setValue(property, value); - return; - } -} - -void QtTextEditorFactoryPrivate::slotResetProperty() -{ - QObject *object = q_ptr->sender(); - const EditorToPropertyMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (EditorToPropertyMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) - if (itEditor.key() == object) { - QtProperty *property = itEditor.value(); - QtTextPropertyManager *manager = q_ptr->propertyManager(property); - if (!manager) - return; - manager->emitResetProperty(property); - return; - } -} - -/*! - \class QtTextEditFactory - - \brief The QtTextEditFactory class provides QTextEdit widgets for - properties created by QtStringPropertyManager objects. - - \sa QtAbstractEditorFactory, QtStringPropertyManager -*/ - -/*! - Creates a factory with the given \a parent. -*/ -QtTextEditorFactory::QtTextEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent) -{ - d_ptr = new QtTextEditorFactoryPrivate(); - d_ptr->q_ptr = this; - -} - -/*! - Destroys this factory, and all the widgets it has created. -*/ -QtTextEditorFactory::~QtTextEditorFactory() -{ - qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; -} - -/*! - \internal - - Reimplemented from the QtAbstractEditorFactory class. -*/ -void QtTextEditorFactory::connectPropertyManager(QtTextPropertyManager *manager) -{ - connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); -} - -/*! - \internal - - Reimplemented from the QtAbstractEditorFactory class. -*/ -QWidget *QtTextEditorFactory::createEditor(QtTextPropertyManager *manager, - QtProperty *property, QWidget *parent) -{ - - QtTextEditWidget *editor = d_ptr->createEditor(property, parent); - - editor->setValue(manager->value(property)); - editor->setStateResetButton(property->isModified()); - - connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); - connect(editor, SIGNAL(valueChanged(QString)), this, SLOT(slotSetValue(QString))); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); - return editor; -} - -/*! - \internal - - Reimplemented from the QtAbstractEditorFactory class. -*/ -void QtTextEditorFactory::disconnectPropertyManager(QtTextPropertyManager *manager) -{ - disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); -} - -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qteditorfactory.cxx" +#include "moc_qteditorfactory.cpp" #include "qteditorfactory.moc" diff --git a/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.h b/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.h similarity index 62% rename from studio/src/3rdparty/qtpropertybrowser/qteditorfactory.h rename to studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.h index fe47d5f16b..411ca166d1 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.h +++ b/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.h @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -89,14 +35,13 @@ #define QTEDITORFACTORY_H #include "qtpropertymanager.h" +#include "qtpropertybrowser_export.h" -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QtSpinBoxFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -108,7 +53,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFact QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtSpinBoxFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtSpinBoxFactory) Q_DISABLE_COPY(QtSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -120,7 +65,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFact class QtSliderFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -132,7 +77,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFacto QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtSliderFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtSliderFactory) Q_DISABLE_COPY(QtSliderFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -144,7 +89,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFacto class QtScrollBarFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -156,7 +101,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFa QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtScrollBarFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtScrollBarFactory) Q_DISABLE_COPY(QtScrollBarFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -168,7 +113,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFa class QtCheckBoxFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -180,18 +125,17 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFac QWidget *parent); void disconnectPropertyManager(QtBoolPropertyManager *manager); private: - QtCheckBoxFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtCheckBoxFactory) Q_DISABLE_COPY(QtCheckBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, bool)) Q_PRIVATE_SLOT(d_func(), void slotSetValue(bool)) Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) - Q_PRIVATE_SLOT(d_func(), void slotResetProperty()) }; class QtDoubleSpinBoxFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -203,7 +147,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEdit QWidget *parent); void disconnectPropertyManager(QtDoublePropertyManager *manager); private: - QtDoubleSpinBoxFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) Q_DISABLE_COPY(QtDoubleSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double)) @@ -216,7 +160,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEdit class QtLineEditFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -228,19 +172,18 @@ class QT_QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFac QWidget *parent); void disconnectPropertyManager(QtStringPropertyManager *manager); private: - QtLineEditFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtLineEditFactory) Q_DISABLE_COPY(QtLineEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &)) Q_PRIVATE_SLOT(d_func(), void slotRegExpChanged(QtProperty *, const QRegExp &)) Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString &)) - Q_PRIVATE_SLOT(d_func(), void slotEditingFinished()) Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) }; class QtDateEditFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -252,7 +195,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFac QWidget *parent); void disconnectPropertyManager(QtDatePropertyManager *manager); private: - QtDateEditFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtDateEditFactory) Q_DISABLE_COPY(QtDateEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDate &)) @@ -264,7 +207,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFac class QtTimeEditFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -276,7 +219,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFac QWidget *parent); void disconnectPropertyManager(QtTimePropertyManager *manager); private: - QtTimeEditFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtTimeEditFactory) Q_DISABLE_COPY(QtTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QTime &)) @@ -286,7 +229,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFac class QtDateTimeEditFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -298,7 +241,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEdito QWidget *parent); void disconnectPropertyManager(QtDateTimePropertyManager *manager); private: - QtDateTimeEditFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtDateTimeEditFactory) Q_DISABLE_COPY(QtDateTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDateTime &)) @@ -308,7 +251,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEdito class QtKeySequenceEditorFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -320,7 +263,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstract QWidget *parent); void disconnectPropertyManager(QtKeySequencePropertyManager *manager); private: - QtKeySequenceEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) Q_DISABLE_COPY(QtKeySequenceEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QKeySequence &)) @@ -330,7 +273,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstract class QtCharEditorFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -342,7 +285,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorF QWidget *parent); void disconnectPropertyManager(QtCharPropertyManager *manager); private: - QtCharEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtCharEditorFactory) Q_DISABLE_COPY(QtCharEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QChar &)) @@ -352,7 +295,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorF class QtEnumEditorFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -364,7 +307,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorF QWidget *parent); void disconnectPropertyManager(QtEnumPropertyManager *manager); private: - QtEnumEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtEnumEditorFactory) Q_DISABLE_COPY(QtEnumEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -374,12 +317,11 @@ class QT_QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorF const QMap &)) Q_PRIVATE_SLOT(d_func(), void slotSetValue(int)) Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) - Q_PRIVATE_SLOT(d_func(), void slotResetProperty()) }; class QtCursorEditorFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -391,7 +333,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEdito QWidget *parent); void disconnectPropertyManager(QtCursorPropertyManager *manager); private: - QtCursorEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtCursorEditorFactory) Q_DISABLE_COPY(QtCursorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QCursor &)) @@ -401,7 +343,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEdito class QtColorEditorFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -413,7 +355,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditor QWidget *parent); void disconnectPropertyManager(QtColorPropertyManager *manager); private: - QtColorEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtColorEditorFactory) Q_DISABLE_COPY(QtColorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QColor &)) @@ -423,7 +365,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditor class QtFontEditorFactoryPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -435,7 +377,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorF QWidget *parent); void disconnectPropertyManager(QtFontPropertyManager *manager); private: - QtFontEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtFontEditorFactory) Q_DISABLE_COPY(QtFontEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QFont &)) @@ -443,31 +385,6 @@ class QT_QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorF Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont &)) }; -class QtTextEditorFactoryPrivate; - -class QT_QTPROPERTYBROWSER_EXPORT QtTextEditorFactory : public QtAbstractEditorFactory -{ - Q_OBJECT -public: - QtTextEditorFactory(QObject *parent = 0); - ~QtTextEditorFactory(); -protected: - void connectPropertyManager(QtTextPropertyManager *manager); - QWidget *createEditor(QtTextPropertyManager *manager, QtProperty *property, - QWidget *parent); - void disconnectPropertyManager(QtTextPropertyManager *manager); -private: - QtTextEditorFactoryPrivate *d_ptr; - Q_DECLARE_PRIVATE(QtTextEditorFactory) - Q_DISABLE_COPY(QtTextEditorFactory) - Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &)) - Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString &)) - Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) - Q_PRIVATE_SLOT(d_func(), void slotResetProperty()) -}; - -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif #endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp similarity index 78% rename from studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp index d789c86956..d32f6e5a7a 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp @@ -1,101 +1,45 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtgroupboxpropertybrowser.h" #include -#include -#include -#include +#include +#include +#include #include #include -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QtGroupBoxPropertyBrowserPrivate { @@ -355,15 +299,12 @@ void QtGroupBoxPropertyBrowserPrivate::propertyRemoved(QtBrowserItem *index) removeRow(parentItem->layout, row); } else { WidgetItem *par = parentItem->parent; - QWidget *w = 0; QGridLayout *l = 0; int oldRow = -1; if (!par) { - w = q_ptr; l = m_mainLayout; oldRow = m_children.indexOf(parentItem); } else { - w = par->groupBox; l = par->layout; oldRow = par->children.indexOf(parentItem); if (hasHeader(par)) @@ -493,6 +434,9 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) /*! \class QtGroupBoxPropertyBrowser + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtGroupBoxPropertyBrowser class provides a QGroupBox based property browser. @@ -521,9 +465,8 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtGroupBoxPropertyBrowser::QtGroupBoxPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtGroupBoxPropertyBrowserPrivate) { - d_ptr = new QtGroupBoxPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -544,7 +487,6 @@ QtGroupBoxPropertyBrowser::~QtGroupBoxPropertyBrowser() const QMap::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); - delete d_ptr; } /*! @@ -571,8 +513,6 @@ void QtGroupBoxPropertyBrowser::itemChanged(QtBrowserItem *item) d_ptr->propertyChanged(item); } -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qtgroupboxpropertybrowser.cxx" +#include "moc_qtgroupboxpropertybrowser.cpp" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h new file mode 100644 index 0000000000..990796661d --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTGROUPBOXPROPERTYBROWSER_H +#define QTGROUPBOXPROPERTYBROWSER_H + +#include "qtpropertybrowser.h" +#include "qtpropertybrowser_export.h" + +QT_BEGIN_NAMESPACE + +class QtGroupBoxPropertyBrowserPrivate; + +class QTPROPERTYBROWSER_EXPORT QtGroupBoxPropertyBrowser : public QtAbstractPropertyBrowser +{ + Q_OBJECT +public: + + QtGroupBoxPropertyBrowser(QWidget *parent = 0); + ~QtGroupBoxPropertyBrowser(); + +protected: + virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); + virtual void itemRemoved(QtBrowserItem *item); + virtual void itemChanged(QtBrowserItem *item); + +private: + + QScopedPointer d_ptr; + Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) + Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) + Q_PRIVATE_SLOT(d_func(), void slotUpdate()) + Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) + +}; + +QT_END_NAMESPACE + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.cpp similarity index 87% rename from studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.cpp index 9b7d98b092..aac4c086ad 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.cpp @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -94,14 +40,12 @@ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QtPropertyPrivate { public: - QtPropertyPrivate(QtAbstractPropertyManager *manager) : m_enabled(true), m_modified(false), m_bold(false), m_manager(manager) {} + QtPropertyPrivate(QtAbstractPropertyManager *manager) : m_enabled(true), m_modified(false), m_manager(manager) {} QtProperty *q_ptr; QSet m_parentItems; @@ -113,7 +57,6 @@ class QtPropertyPrivate QString m_name; bool m_enabled; bool m_modified; - bool m_bold; QtAbstractPropertyManager * const m_manager; }; @@ -135,6 +78,9 @@ class QtAbstractPropertyManagerPrivate /*! \class QtProperty + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtProperty class encapsulates an instance of a property. @@ -148,23 +94,23 @@ class QtAbstractPropertyManagerPrivate provides functions for retrieving as well as setting their values: \table - \header \o Getter \o Setter + \header \li Getter \li Setter \row - \o propertyName() \o setPropertyName() + \li propertyName() \li setPropertyName() \row - \o statusTip() \o setStatusTip() + \li statusTip() \li setStatusTip() \row - \o toolTip() \o setToolTip() + \li toolTip() \li setToolTip() \row - \o whatsThis() \o setWhatsThis() + \li whatsThis() \li setWhatsThis() \row - \o isEnabled() \o setEnabled() + \li isEnabled() \li setEnabled() \row - \o isModified() \o setModified() + \li isModified() \li setModified() \row - \o valueText() \o Nop + \li valueText() \li Nop \row - \o valueIcon() \o Nop + \li valueIcon() \li Nop \endtable It is also possible to nest properties: QtProperty provides the @@ -188,8 +134,8 @@ class QtAbstractPropertyManagerPrivate \sa QtAbstractPropertyManager::addProperty() */ QtProperty::QtProperty(QtAbstractPropertyManager *manager) + : d_ptr(new QtPropertyPrivate(manager)) { - d_ptr = new QtPropertyPrivate(manager); d_ptr->q_ptr = this; } @@ -223,7 +169,6 @@ QtProperty::~QtProperty() QtProperty *property = itParent.next(); property->d_ptr->m_subItems.removeAll(this); } - delete d_ptr; } /*! @@ -307,16 +252,6 @@ bool QtProperty::isModified() const return d_ptr->m_modified; } -/*! - Returns whether the property is displayed as bold. - - \sa setBold() -*/ -bool QtProperty::isBold() const -{ - return d_ptr->m_bold; -} - /*! Returns whether the property has a value. @@ -439,20 +374,6 @@ void QtProperty::setModified(bool modified) propertyChanged(); } -/*! - Sets the property's bold state according to the passed \a bold value. - - \sa isBold() -*/ -void QtProperty::setBold(bool bold) -{ - if (d_ptr->m_bold == bold) - return; - - d_ptr->m_bold = bold; - propertyChanged(); -} - /*! Appends the given \a property to this property's subproperties. @@ -590,6 +511,9 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, /*! \class QtAbstractPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtAbstractPropertyManager provides an interface for property managers. @@ -617,23 +541,23 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, implementations are available: \list - \o QtBoolPropertyManager - \o QtColorPropertyManager - \o QtDatePropertyManager - \o QtDateTimePropertyManager - \o QtDoublePropertyManager - \o QtEnumPropertyManager - \o QtFlagPropertyManager - \o QtFontPropertyManager - \o QtGroupPropertyManager - \o QtIntPropertyManager - \o QtPointPropertyManager - \o QtRectPropertyManager - \o QtSizePropertyManager - \o QtSizePolicyPropertyManager - \o QtStringPropertyManager - \o QtTimePropertyManager - \o QtVariantPropertyManager + \li QtBoolPropertyManager + \li QtColorPropertyManager + \li QtDatePropertyManager + \li QtDateTimePropertyManager + \li QtDoublePropertyManager + \li QtEnumPropertyManager + \li QtFlagPropertyManager + \li QtFontPropertyManager + \li QtGroupPropertyManager + \li QtIntPropertyManager + \li QtPointPropertyManager + \li QtRectPropertyManager + \li QtSizePropertyManager + \li QtSizePolicyPropertyManager + \li QtStringPropertyManager + \li QtTimePropertyManager + \li QtVariantPropertyManager \endlist \sa QtAbstractEditorFactoryBase, QtAbstractPropertyBrowser, QtProperty @@ -705,9 +629,8 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, Creates an abstract property manager with the given \a parent. */ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtAbstractPropertyManagerPrivate) { - d_ptr = new QtAbstractPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -719,7 +642,6 @@ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) QtAbstractPropertyManager::~QtAbstractPropertyManager() { clear(); - delete d_ptr; } /*! @@ -808,11 +730,6 @@ QtProperty *QtAbstractPropertyManager::addProperty(const QString &name) return property; } -void QtAbstractPropertyManager::emitResetProperty(QtProperty *property) -{ - emit resetProperty(property); -} - /*! Creates a property. @@ -853,7 +770,7 @@ QtProperty *QtAbstractPropertyManager::createProperty() property is being destroyed so that it can remove the property's additional attributes. - \sa clear(), propertyDestroyed() + \sa clear(), propertyDestroyed() */ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) { @@ -864,6 +781,9 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) /*! \class QtAbstractEditorFactoryBase + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtAbstractEditorFactoryBase provides an interface for editor factories. @@ -887,17 +807,17 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) implementations are available: \list - \o QtCheckBoxFactory - \o QtDateEditFactory - \o QtDateTimeEditFactory - \o QtDoubleSpinBoxFactory - \o QtEnumEditorFactory - \o QtLineEditFactory - \o QtScrollBarFactory - \o QtSliderFactory - \o QtSpinBoxFactory - \o QtTimeEditFactory - \o QtVariantEditorFactory + \li QtCheckBoxFactory + \li QtDateEditFactory + \li QtDateTimeEditFactory + \li QtDoubleSpinBoxFactory + \li QtEnumEditorFactory + \li QtLineEditFactory + \li QtScrollBarFactory + \li QtSliderFactory + \li QtSpinBoxFactory + \li QtTimeEditFactory + \li QtVariantEditorFactory \endlist \sa QtAbstractPropertyManager, QtAbstractPropertyBrowser @@ -914,7 +834,7 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) which also provides a pure virtual convenience overload of this function enabling access to the property's manager. - \sa QtAbstractEditorFactory::createEditor() + \sa QtAbstractEditorFactory::createEditor() */ /*! @@ -947,6 +867,9 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) /*! \class QtAbstractEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtAbstractEditorFactory is the base template class for editor factories. @@ -960,10 +883,7 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) PropertyManager template argument class which can be any QtAbstractPropertyManager subclass. For example: - \code - QtSpinBoxFactory *factory; - QSet managers = factory->propertyManagers(); - \endcode + \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 0 Note that QtSpinBoxFactory by definition creates editing widgets \e only for properties created by QtIntPropertyManager. @@ -988,17 +908,17 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) are available: \list - \o QtCheckBoxFactory - \o QtDateEditFactory - \o QtDateTimeEditFactory - \o QtDoubleSpinBoxFactory - \o QtEnumEditorFactory - \o QtLineEditFactory - \o QtScrollBarFactory - \o QtSliderFactory - \o QtSpinBoxFactory - \o QtTimeEditFactory - \o QtVariantEditorFactory + \li QtCheckBoxFactory + \li QtDateEditFactory + \li QtDateTimeEditFactory + \li QtDoubleSpinBoxFactory + \li QtEnumEditorFactory + \li QtLineEditFactory + \li QtScrollBarFactory + \li QtSliderFactory + \li QtSpinBoxFactory + \li QtTimeEditFactory + \li QtVariantEditorFactory \endlist When deriving from the QtAbstractEditorFactory class, several pure virtual @@ -1126,7 +1046,6 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) \fn virtual void QtAbstractEditorFactory::managerDestroyed(QObject *manager) \internal - \reimp */ //////////////////////////////////// @@ -1165,6 +1084,9 @@ void QtBrowserItemPrivate::removeChild(QtBrowserItem *index) /*! \class QtBrowserItem + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtBrowserItem class represents a property in a property browser instance. @@ -1213,12 +1135,7 @@ QtBrowserItem *QtBrowserItem::parent() const reproduced from children items are always the same as reproduced from associated property' children, for example: - \code - QtBrowserItem *item; - QList childrenItems = item->children(); - - QList childrenProperties = item->property()->subProperties(); - \endcode + \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 1 The \e childrenItems list represents the same list as \e childrenProperties. */ @@ -1238,14 +1155,13 @@ QtAbstractPropertyBrowser *QtBrowserItem::browser() const } QtBrowserItem::QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent) + : d_ptr(new QtBrowserItemPrivate(browser, property, parent)) { - d_ptr = new QtBrowserItemPrivate(browser, property, parent); d_ptr->q_ptr = this; } QtBrowserItem::~QtBrowserItem() { - delete d_ptr; } @@ -1318,11 +1234,11 @@ void QtAbstractPropertyBrowserPrivate::insertSubTree(QtProperty *property, QtProperty *, QtProperty *))); q_ptr->connect(manager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); - q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty *)), - q_ptr, SLOT(slotPropertyDestroyed(QtProperty *))); - q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty *)), - q_ptr, SLOT(slotPropertyDataChanged(QtProperty *))); + q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty*)), + q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); + q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty*)), + q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); } m_managerToProperties[manager].append(property); m_propertyToParents[property].append(parentProperty); @@ -1358,11 +1274,11 @@ void QtAbstractPropertyBrowserPrivate::removeSubTree(QtProperty *property, QtProperty *, QtProperty *))); q_ptr->disconnect(manager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); - q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty *)), - q_ptr, SLOT(slotPropertyDestroyed(QtProperty *))); - q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty *)), - q_ptr, SLOT(slotPropertyDataChanged(QtProperty *))); + q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty*)), + q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); + q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty*)), + q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); m_managerToProperties.remove(manager); } @@ -1544,6 +1460,9 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope /*! \class QtAbstractPropertyBrowser + \internal + \inmodule QtDesigner + \since 4.4 \brief QtAbstractPropertyBrowser provides a base class for implementing property browsers. @@ -1602,20 +1521,9 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope \table 100% \row - \o - \code - QtProperty *property1, *property2, *property3; - - property2->addSubProperty(property1); - property3->addSubProperty(property2); - - QtAbstractPropertyBrowser *editor; - - editor->addProperty(property1); - editor->addProperty(property2); - editor->addProperty(property3); - \endcode - \o \image qtpropertybrowser-duplicate.png + \li + \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 2 + \li \image qtpropertybrowser-duplicate.png \endtable The addProperty() function returns a QtBrowserItem that uniquely @@ -1629,8 +1537,8 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope implementations: \list - \o QtGroupBoxPropertyBrowser - \o QtTreePropertyBrowser + \li QtGroupBoxPropertyBrowser + \li QtTreePropertyBrowser \endlist \sa QtAbstractPropertyManager, QtAbstractEditorFactoryBase @@ -1646,23 +1554,7 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope For example: - \code - QtIntPropertyManager *intManager; - QtDoublePropertyManager *doubleManager; - - QtProperty *myInteger = intManager->addProperty(); - QtProperty *myDouble = doubleManager->addProperty(); - - QtSpinBoxFactory *spinBoxFactory; - QtDoubleSpinBoxFactory *doubleSpinBoxFactory; - - QtAbstractPropertyBrowser *editor; - editor->setFactoryForManager(intManager, spinBoxFactory); - editor->setFactoryForManager(doubleManager, doubleSpinBoxFactory); - - editor->addProperty(myInteger); - editor->addProperty(myDouble); - \endcode + \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 3 In this example the \c myInteger property's value is displayed with a QSpinBox widget, while the \c myDouble property's value is @@ -1741,9 +1633,8 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope Creates an abstract property browser with the given \a parent. */ QtAbstractPropertyBrowser::QtAbstractPropertyBrowser(QWidget *parent) - : QWidget(parent) + : QWidget(parent), d_ptr(new QtAbstractPropertyBrowserPrivate) { - d_ptr = new QtAbstractPropertyBrowserPrivate; d_ptr->q_ptr = this; } @@ -1766,7 +1657,6 @@ QtAbstractPropertyBrowser::~QtAbstractPropertyBrowser() QListIterator itItem(indexes); while (itItem.hasNext()) d_ptr->clearIndex(itItem.next()); - delete d_ptr; } /*! @@ -1884,14 +1774,12 @@ QtBrowserItem *QtAbstractPropertyBrowser::insertProperty(QtProperty *property, QList pendingList = properties(); int pos = 0; int newPos = 0; - QtProperty *properAfterProperty = 0; while (pos < pendingList.count()) { QtProperty *prop = pendingList.at(pos); if (prop == property) return 0; if (prop == afterProperty) { newPos = pos + 1; - properAfterProperty = afterProperty; } pos++; } @@ -1971,7 +1859,14 @@ QWidget *QtAbstractPropertyBrowser::createEditor(QtProperty *property, if (!factory) return 0; - return factory->createEditor(property, parent); + QWidget *w = factory->createEditor(property, parent); + // Since some editors can be QComboBoxes, and we changed their focus policy in Qt 5 + // to make them feel more native on Mac, we need to relax the focus policy to something + // more permissive to keep the combo box from losing focus, allowing it to stay alive, + // when the user clicks on it to show the popup. + if (w) + w->setFocusPolicy(Qt::WheelFocus); + return w; } bool QtAbstractPropertyBrowser::addFactory(QtAbstractPropertyManager *abstractManager, @@ -2051,8 +1946,6 @@ void QtAbstractPropertyBrowser::setCurrentItem(QtBrowserItem *item) emit currentItemChanged(item); } -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qtpropertybrowser.cxx" +#include "moc_qtpropertybrowser.cpp" diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.h similarity index 62% rename from studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.h rename to studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.h index 5b63d3917f..eaa4a60fbd 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.h +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.h @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -88,34 +34,17 @@ #ifndef QTPROPERTYBROWSER_H #define QTPROPERTYBROWSER_H -#include +#include "qtpropertybrowser_export.h" + +#include #include -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif - -#if defined(Q_WS_WIN) -# if !defined(QT_QTPROPERTYBROWSER_EXPORT) && !defined(QT_QTPROPERTYBROWSER_IMPORT) -# define QT_QTPROPERTYBROWSER_EXPORT -# elif defined(QT_QTPROPERTYBROWSER_IMPORT) -# if defined(QT_QTPROPERTYBROWSER_EXPORT) -# undef QT_QTPROPERTYBROWSER_EXPORT -# endif -# define QT_QTPROPERTYBROWSER_EXPORT __declspec(dllimport) -# elif defined(QT_QTPROPERTYBROWSER_EXPORT) -# undef QT_QTPROPERTYBROWSER_EXPORT -# define QT_QTPROPERTYBROWSER_EXPORT __declspec(dllexport) -# endif -#else -# define QT_QTPROPERTYBROWSER_EXPORT -#endif - class QtAbstractPropertyManager; class QtPropertyPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtProperty +class QTPROPERTYBROWSER_EXPORT QtProperty { public: virtual ~QtProperty(); @@ -128,10 +57,8 @@ class QT_QTPROPERTYBROWSER_EXPORT QtProperty QString statusTip() const; QString whatsThis() const; QString propertyName() const; - bool isEnabled() const; bool isModified() const; - bool isBold() const; bool hasValue() const; QIcon valueIcon() const; @@ -143,7 +70,6 @@ class QT_QTPROPERTYBROWSER_EXPORT QtProperty void setPropertyName(const QString &text); void setEnabled(bool enable); void setModified(bool modified); - void setBold(bool bold); void addSubProperty(QtProperty *property); void insertSubProperty(QtProperty *property, QtProperty *afterProperty); @@ -153,12 +79,12 @@ class QT_QTPROPERTYBROWSER_EXPORT QtProperty void propertyChanged(); private: friend class QtAbstractPropertyManager; - QtPropertyPrivate *d_ptr; + QScopedPointer d_ptr; }; class QtAbstractPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject +class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject { Q_OBJECT public: @@ -170,7 +96,6 @@ class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject void clear() const; QtProperty *addProperty(const QString &name = QString()); - void emitResetProperty(QtProperty *property); Q_SIGNALS: void propertyInserted(QtProperty *property, @@ -178,7 +103,6 @@ class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject void propertyChanged(QtProperty *property); void propertyRemoved(QtProperty *property, QtProperty *parent); void propertyDestroyed(QtProperty *property); - void resetProperty(QtProperty *property); protected: virtual bool hasValue(const QtProperty *property) const; virtual QIcon valueIcon(const QtProperty *property) const; @@ -188,12 +112,12 @@ class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject virtual QtProperty *createProperty(); private: friend class QtProperty; - QtAbstractPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyManager) Q_DISABLE_COPY(QtAbstractPropertyManager) }; -class QT_QTPROPERTYBROWSER_EXPORT QtAbstractEditorFactoryBase : public QObject +class QTPROPERTYBROWSER_EXPORT QtAbstractEditorFactoryBase : public QObject { Q_OBJECT public: @@ -295,7 +219,7 @@ class QtAbstractEditorFactory : public QtAbstractEditorFactoryBase class QtAbstractPropertyBrowser; class QtBrowserItemPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtBrowserItem +class QTPROPERTYBROWSER_EXPORT QtBrowserItem { public: QtProperty *property() const; @@ -305,13 +229,13 @@ class QT_QTPROPERTYBROWSER_EXPORT QtBrowserItem private: explicit QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent); ~QtBrowserItem(); - QtBrowserItemPrivate *d_ptr; + QScopedPointer d_ptr; friend class QtAbstractPropertyBrowserPrivate; }; class QtAbstractPropertyBrowserPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyBrowser : public QWidget +class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyBrowser : public QWidget { Q_OBJECT public: @@ -362,7 +286,7 @@ public Q_SLOTS: bool addFactory(QtAbstractPropertyManager *abstractManager, QtAbstractEditorFactoryBase *abstractFactory); - QtAbstractPropertyBrowserPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyBrowser) Q_DISABLE_COPY(QtAbstractPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotPropertyInserted(QtProperty *, @@ -374,8 +298,6 @@ public Q_SLOTS: }; -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif #endif // QTPROPERTYBROWSER_H diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp new file mode 100644 index 0000000000..015ac8b025 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp @@ -0,0 +1,296 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qtpropertybrowserutils_p.h" +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +QtCursorDatabase::QtCursorDatabase() +{ + appendCursor(Qt::ArrowCursor, QCoreApplication::translate("QtCursorDatabase", "Arrow"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-arrow.png"))); + appendCursor(Qt::UpArrowCursor, QCoreApplication::translate("QtCursorDatabase", "Up Arrow"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-uparrow.png"))); + appendCursor(Qt::CrossCursor, QCoreApplication::translate("QtCursorDatabase", "Cross"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-cross.png"))); + appendCursor(Qt::WaitCursor, QCoreApplication::translate("QtCursorDatabase", "Wait"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-wait.png"))); + appendCursor(Qt::IBeamCursor, QCoreApplication::translate("QtCursorDatabase", "IBeam"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-ibeam.png"))); + appendCursor(Qt::SizeVerCursor, QCoreApplication::translate("QtCursorDatabase", "Size Vertical"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizev.png"))); + appendCursor(Qt::SizeHorCursor, QCoreApplication::translate("QtCursorDatabase", "Size Horizontal"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizeh.png"))); + appendCursor(Qt::SizeFDiagCursor, QCoreApplication::translate("QtCursorDatabase", "Size Backslash"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizef.png"))); + appendCursor(Qt::SizeBDiagCursor, QCoreApplication::translate("QtCursorDatabase", "Size Slash"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizeb.png"))); + appendCursor(Qt::SizeAllCursor, QCoreApplication::translate("QtCursorDatabase", "Size All"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizeall.png"))); + appendCursor(Qt::BlankCursor, QCoreApplication::translate("QtCursorDatabase", "Blank"), + QIcon()); + appendCursor(Qt::SplitVCursor, QCoreApplication::translate("QtCursorDatabase", "Split Vertical"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-vsplit.png"))); + appendCursor(Qt::SplitHCursor, QCoreApplication::translate("QtCursorDatabase", "Split Horizontal"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-hsplit.png"))); + appendCursor(Qt::PointingHandCursor, QCoreApplication::translate("QtCursorDatabase", "Pointing Hand"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-hand.png"))); + appendCursor(Qt::ForbiddenCursor, QCoreApplication::translate("QtCursorDatabase", "Forbidden"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-forbidden.png"))); + appendCursor(Qt::OpenHandCursor, QCoreApplication::translate("QtCursorDatabase", "Open Hand"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-openhand.png"))); + appendCursor(Qt::ClosedHandCursor, QCoreApplication::translate("QtCursorDatabase", "Closed Hand"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-closedhand.png"))); + appendCursor(Qt::WhatsThisCursor, QCoreApplication::translate("QtCursorDatabase", "What's This"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-whatsthis.png"))); + appendCursor(Qt::BusyCursor, QCoreApplication::translate("QtCursorDatabase", "Busy"), + QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-busy.png"))); +} + +void QtCursorDatabase::clear() +{ + m_cursorNames.clear(); + m_cursorIcons.clear(); + m_valueToCursorShape.clear(); + m_cursorShapeToValue.clear(); +} + +void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) +{ + if (m_cursorShapeToValue.contains(shape)) + return; + const int value = m_cursorNames.count(); + m_cursorNames.append(name); + m_cursorIcons.insert(value, icon); + m_valueToCursorShape.insert(value, shape); + m_cursorShapeToValue.insert(shape, value); +} + +QStringList QtCursorDatabase::cursorShapeNames() const +{ + return m_cursorNames; +} + +QMap QtCursorDatabase::cursorShapeIcons() const +{ + return m_cursorIcons; +} + +QString QtCursorDatabase::cursorToShapeName(const QCursor &cursor) const +{ + int val = cursorToValue(cursor); + if (val >= 0) + return m_cursorNames.at(val); + return QString(); +} + +QIcon QtCursorDatabase::cursorToShapeIcon(const QCursor &cursor) const +{ + int val = cursorToValue(cursor); + return m_cursorIcons.value(val); +} + +int QtCursorDatabase::cursorToValue(const QCursor &cursor) const +{ +#ifndef QT_NO_CURSOR + Qt::CursorShape shape = cursor.shape(); + if (m_cursorShapeToValue.contains(shape)) + return m_cursorShapeToValue[shape]; +#endif + return -1; +} + +#ifndef QT_NO_CURSOR +QCursor QtCursorDatabase::valueToCursor(int value) const +{ + if (m_valueToCursorShape.contains(value)) + return QCursor(m_valueToCursorShape[value]); + return QCursor(); +} +#endif + +QPixmap QtPropertyBrowserUtils::brushValuePixmap(const QBrush &b) +{ + QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); + img.fill(0); + + QPainter painter(&img); + painter.setCompositionMode(QPainter::CompositionMode_Source); + painter.fillRect(0, 0, img.width(), img.height(), b); + QColor color = b.color(); + if (color.alpha() != 255) { // indicate alpha by an inset + QBrush opaqueBrush = b; + color.setAlpha(255); + opaqueBrush.setColor(color); + painter.fillRect(img.width() / 4, img.height() / 4, + img.width() / 2, img.height() / 2, opaqueBrush); + } + painter.end(); + return QPixmap::fromImage(img); +} + +QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b) +{ + return QIcon(brushValuePixmap(b)); +} + +QString QtPropertyBrowserUtils::colorValueText(const QColor &c) +{ + return QCoreApplication::translate("QtPropertyBrowserUtils", "[%1, %2, %3] (%4)") + .arg(c.red()).arg(c.green()).arg(c.blue()).arg(c.alpha()); +} + +QPixmap QtPropertyBrowserUtils::fontValuePixmap(const QFont &font) +{ + QFont f = font; + QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); + img.fill(0); + QPainter p(&img); + p.setRenderHint(QPainter::TextAntialiasing, true); + p.setRenderHint(QPainter::Antialiasing, true); + f.setPointSize(13); + p.setFont(f); + QTextOption t; + t.setAlignment(Qt::AlignCenter); + p.drawText(QRect(0, 0, 16, 16), QString(QLatin1Char('A')), t); + return QPixmap::fromImage(img); +} + +QIcon QtPropertyBrowserUtils::fontValueIcon(const QFont &f) +{ + return QIcon(fontValuePixmap(f)); +} + +QString QtPropertyBrowserUtils::fontValueText(const QFont &f) +{ + return QCoreApplication::translate("QtPropertyBrowserUtils", "[%1, %2]") + .arg(f.family()).arg(f.pointSize()); +} + +QString QtPropertyBrowserUtils::dateFormat() +{ + QLocale loc; + return loc.dateFormat(QLocale::ShortFormat); +} + +QString QtPropertyBrowserUtils::timeFormat() +{ + QLocale loc; + // ShortFormat is missing seconds on UNIX. + return loc.timeFormat(QLocale::LongFormat); +} + +QString QtPropertyBrowserUtils::dateTimeFormat() +{ + QString format = dateFormat(); + format += QLatin1Char(' '); + format += timeFormat(); + return format; +} + +QtBoolEdit::QtBoolEdit(QWidget *parent) : + QWidget(parent), + m_checkBox(new QCheckBox(this)), + m_textVisible(true) +{ + QHBoxLayout *lt = new QHBoxLayout; + if (QApplication::layoutDirection() == Qt::LeftToRight) + lt->setContentsMargins(4, 0, 0, 0); + else + lt->setContentsMargins(0, 0, 4, 0); + lt->addWidget(m_checkBox); + setLayout(lt); + connect(m_checkBox, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool))); + setFocusProxy(m_checkBox); + m_checkBox->setText(tr("True")); +} + +void QtBoolEdit::setTextVisible(bool textVisible) +{ + if (m_textVisible == textVisible) + return; + + m_textVisible = textVisible; + if (m_textVisible) + m_checkBox->setText(isChecked() ? tr("True") : tr("False")); + else + m_checkBox->setText(QString()); +} + +Qt::CheckState QtBoolEdit::checkState() const +{ + return m_checkBox->checkState(); +} + +void QtBoolEdit::setCheckState(Qt::CheckState state) +{ + m_checkBox->setCheckState(state); +} + +bool QtBoolEdit::isChecked() const +{ + return m_checkBox->isChecked(); +} + +void QtBoolEdit::setChecked(bool c) +{ + m_checkBox->setChecked(c); + if (!m_textVisible) + return; + m_checkBox->setText(isChecked() ? tr("True") : tr("False")); +} + +bool QtBoolEdit::blockCheckBoxSignals(bool block) +{ + return m_checkBox->blockSignals(block); +} + +void QtBoolEdit::mousePressEvent(QMouseEvent *event) +{ + if (event->buttons() == Qt::LeftButton) { + m_checkBox->click(); + event->accept(); + } else { + QWidget::mousePressEvent(event); + } +} + +QT_END_NAMESPACE diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h new file mode 100644 index 0000000000..c6b3f41383 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of Qt Designer. This header +// file may change from version to version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QTPROPERTYBROWSERUTILS_H +#define QTPROPERTYBROWSERUTILS_H + +#include "qtpropertybrowser_export.h" + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QMouseEvent; +class QCheckBox; +class QLineEdit; + +class QTPROPERTYBROWSER_EXPORT QtCursorDatabase +{ +public: + QtCursorDatabase(); + void clear(); + + QStringList cursorShapeNames() const; + QMap cursorShapeIcons() const; + QString cursorToShapeName(const QCursor &cursor) const; + QIcon cursorToShapeIcon(const QCursor &cursor) const; + int cursorToValue(const QCursor &cursor) const; +#ifndef QT_NO_CURSOR + QCursor valueToCursor(int value) const; +#endif +private: + void appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon); + QStringList m_cursorNames; + QMap m_cursorIcons; + QMap m_valueToCursorShape; + QMap m_cursorShapeToValue; +}; + +class QTPROPERTYBROWSER_EXPORT QtPropertyBrowserUtils +{ +public: + static QPixmap brushValuePixmap(const QBrush &b); + static QIcon brushValueIcon(const QBrush &b); + static QString colorValueText(const QColor &c); + static QPixmap fontValuePixmap(const QFont &f); + static QIcon fontValueIcon(const QFont &f); + static QString fontValueText(const QFont &f); + static QString dateFormat(); + static QString timeFormat(); + static QString dateTimeFormat(); +}; + +class QTPROPERTYBROWSER_EXPORT QtBoolEdit : public QWidget { + Q_OBJECT +public: + QtBoolEdit(QWidget *parent = 0); + + bool textVisible() const { return m_textVisible; } + void setTextVisible(bool textVisible); + + Qt::CheckState checkState() const; + void setCheckState(Qt::CheckState state); + + bool isChecked() const; + void setChecked(bool c); + + bool blockCheckBoxSignals(bool block); + +Q_SIGNALS: + void toggled(bool); + +protected: + void mousePressEvent(QMouseEvent * event); + +private: + QCheckBox *m_checkBox; + bool m_textVisible; +}; + +QT_END_NAMESPACE + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.cpp similarity index 93% rename from studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.cpp index fe8ea92c9f..eea0900cea 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.cpp @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -94,12 +40,11 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include #include #include @@ -108,9 +53,7 @@ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif template static void setSimpleMinimumData(PrivateData *data, const Value &minVal) @@ -239,7 +182,7 @@ static Value getData(const QMap &propertyMap, const QtProperty *property, const Value &defaultValue = Value()) { typedef QMap PropertyToData; - typedef Q_TYPENAME PropertyToData::const_iterator PropertyToDataConstIterator; + typedef typename PropertyToData::const_iterator PropertyToDataConstIterator; const PropertyToDataConstIterator it = propertyMap.constFind(property); if (it == propertyMap.constEnd()) return defaultValue; @@ -275,7 +218,7 @@ static void setSimpleValue(QMap &propertyMap, QtProperty *property, const Value &val) { typedef QMap PropertyToData; - typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; + typedef typename PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = propertyMap.find(property); if (it == propertyMap.end()) return; @@ -296,9 +239,9 @@ static void setValueInRange(PropertyManager *manager, PropertyManagerPrivate *ma QtProperty *property, const Value &val, void (PropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, ValueChangeParameter)) { - typedef Q_TYPENAME PropertyManagerPrivate::Data PrivateData; + typedef typename PropertyManagerPrivate::Data PrivateData; typedef QMap PropertyToData; - typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; + typedef typename PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -331,9 +274,9 @@ static void setBorderValues(PropertyManager *manager, PropertyManagerPrivate *ma void (PropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, ValueChangeParameter, ValueChangeParameter, ValueChangeParameter)) { - typedef Q_TYPENAME PropertyManagerPrivate::Data PrivateData; + typedef typename PropertyManagerPrivate::Data PrivateData; typedef QMap PropertyToData; - typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; + typedef typename PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -376,7 +319,7 @@ static void setBorderValue(PropertyManager *manager, PropertyManagerPrivate *man ValueChangeParameter, ValueChangeParameter, ValueChangeParameter)) { typedef QMap PropertyToData; - typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; + typedef typename PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -468,23 +411,6 @@ class QtMetaEnumProvider QMetaEnum m_policyEnum; }; -#if QT_VERSION < 0x040300 - -static QList countriesForLanguage(QLocale::Language language) -{ - QList countries; - QLocale::Country country = QLocale::AnyCountry; - while (country <= QLocale::LastCountry) { - QLocale locale(language, country); - if (locale.language() == language && !countries.contains(locale.country())) - countries << locale.country(); - country = (QLocale::Country)((uint)country + 1); // ++country - } - return countries; -} - -#endif - static QList sortCountries(const QList &countries) { QMultiMap nameToCountry; @@ -516,11 +442,7 @@ void QtMetaEnumProvider::initLocale() while (itLang.hasNext()) { QLocale::Language language = itLang.next(); QList countries; -#if QT_VERSION < 0x040300 - countries = countriesForLanguage(language); -#else countries = QLocale::countriesForLanguage(language); -#endif if (countries.isEmpty() && language == system.language()) countries << system.country(); @@ -610,6 +532,9 @@ Q_GLOBAL_STATIC(QtMetaEnumProvider, metaEnumProvider) /*! \class QtGroupPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtGroupPropertyManager provides and manages group properties. @@ -687,6 +612,9 @@ class QtIntPropertyManagerPrivate /*! \class QtIntPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtIntPropertyManager provides and manages int properties. @@ -741,9 +669,8 @@ class QtIntPropertyManagerPrivate Creates a manager with the given \a parent. */ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtIntPropertyManagerPrivate) { - d_ptr = new QtIntPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -753,7 +680,6 @@ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) QtIntPropertyManager::~QtIntPropertyManager() { clear(); - delete d_ptr; } /*! @@ -826,7 +752,7 @@ QString QtIntPropertyManager::valueText(const QtProperty *property) const void QtIntPropertyManager::setValue(QtProperty *property, int val) { void (QtIntPropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, int) = 0; - setValueInRange(this, d_ptr, + setValueInRange(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -843,7 +769,7 @@ void QtIntPropertyManager::setValue(QtProperty *property, int val) */ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) { - setMinimumValue(this, d_ptr, + setMinimumValue(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -861,7 +787,7 @@ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) */ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) { - setMaximumValue(this, d_ptr, + setMaximumValue(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -885,7 +811,7 @@ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) void QtIntPropertyManager::setRange(QtProperty *property, int minVal, int maxVal) { void (QtIntPropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, int, int, int) = 0; - setBorderValues(this, d_ptr, + setBorderValues(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -946,7 +872,7 @@ class QtDoublePropertyManagerPrivate struct Data { - Data() : val(0), minVal(-INT_MAX), maxVal(INT_MAX), singleStep(1), decimals(2) {} + Data() : val(0), minVal(-DBL_MAX), maxVal(DBL_MAX), singleStep(1), decimals(2) {} double val; double minVal; double maxVal; @@ -964,6 +890,9 @@ class QtDoublePropertyManagerPrivate /*! \class QtDoublePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtDoublePropertyManager provides and manages double properties. @@ -1029,9 +958,8 @@ class QtDoublePropertyManagerPrivate Creates a manager with the given \a parent. */ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDoublePropertyManagerPrivate) { - d_ptr = new QtDoublePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1041,7 +969,6 @@ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) QtDoublePropertyManager::~QtDoublePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1107,8 +1034,7 @@ QString QtDoublePropertyManager::valueText(const QtProperty *property) const const QtDoublePropertyManagerPrivate::PropertyValueMap::const_iterator it = d_ptr->m_values.constFind(property); if (it == d_ptr->m_values.constEnd()) return QString(); - - return QString("%1").arg(it.value().val); + return QString::number(it.value().val, 'f', it.value().decimals); } /*! @@ -1125,7 +1051,7 @@ QString QtDoublePropertyManager::valueText(const QtProperty *property) const void QtDoublePropertyManager::setValue(QtProperty *property, double val) { void (QtDoublePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, double) = 0; - setValueInRange(this, d_ptr, + setValueInRange(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1202,7 +1128,7 @@ void QtDoublePropertyManager::setDecimals(QtProperty *property, int prec) */ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) { - setMinimumValue(this, d_ptr, + setMinimumValue(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1220,7 +1146,7 @@ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) */ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) { - setMaximumValue(this, d_ptr, + setMaximumValue(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1244,7 +1170,7 @@ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) void QtDoublePropertyManager::setRange(QtProperty *property, double minVal, double maxVal) { void (QtDoublePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, double, double, double) = 0; - setBorderValues(this, d_ptr, + setBorderValues(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1290,6 +1216,9 @@ class QtStringPropertyManagerPrivate /*! \class QtStringPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtStringPropertyManager provides and manages QString properties. @@ -1332,9 +1261,8 @@ class QtStringPropertyManagerPrivate Creates a manager with the given \a parent. */ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtStringPropertyManagerPrivate) { - d_ptr = new QtStringPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1344,7 +1272,6 @@ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) QtStringPropertyManager::~QtStringPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1456,18 +1383,59 @@ void QtStringPropertyManager::uninitializeProperty(QtProperty *property) } // QtBoolPropertyManager +// Return an icon containing a check box indicator +static QIcon drawCheckBox(bool value) +{ + QStyleOptionButton opt; + opt.state |= value ? QStyle::State_On : QStyle::State_Off; + opt.state |= QStyle::State_Enabled; + const QStyle *style = QApplication::style(); + // Figure out size of an indicator and make sure it is not scaled down in a list view item + // by making the pixmap as big as a list view icon and centering the indicator in it. + // (if it is smaller, it can't be helped) + const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt); + const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt); + const int listViewIconSize = indicatorWidth; + const int pixmapWidth = indicatorWidth; + const int pixmapHeight = qMax(indicatorHeight, listViewIconSize); + + opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight); + QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight); + pixmap.fill(Qt::transparent); + { + // Center? + const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0; + const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0; + QPainter painter(&pixmap); + painter.translate(xoff, yoff); + style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter); + } + return QIcon(pixmap); +} class QtBoolPropertyManagerPrivate { QtBoolPropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtBoolPropertyManager) public: + QtBoolPropertyManagerPrivate(); QMap m_values; + const QIcon m_checkedIcon; + const QIcon m_uncheckedIcon; }; +QtBoolPropertyManagerPrivate::QtBoolPropertyManagerPrivate() : + m_checkedIcon(drawCheckBox(true)), + m_uncheckedIcon(drawCheckBox(false)) +{ +} + /*! \class QtBoolPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtBoolPropertyManager class provides and manages boolean properties. @@ -1493,9 +1461,8 @@ class QtBoolPropertyManagerPrivate Creates a manager with the given \a parent. */ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtBoolPropertyManagerPrivate) { - d_ptr = new QtBoolPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1505,7 +1472,6 @@ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) QtBoolPropertyManager::~QtBoolPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1526,37 +1492,13 @@ bool QtBoolPropertyManager::value(const QtProperty *property) const */ QString QtBoolPropertyManager::valueText(const QtProperty *property) const { - return QString(); -} - -// Return an icon containing a check box indicator -static QIcon drawCheckBox(bool value) -{ - QStyleOptionButton opt; - opt.state |= value ? QStyle::State_On : QStyle::State_Off; - opt.state |= QStyle::State_Enabled; - const QStyle *style = QApplication::style(); - // Figure out size of an indicator and make sure it is not scaled down in a list view item - // by making the pixmap as big as a list view icon and centering the indicator in it. - // (if it is smaller, it can't be helped) - const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt); - const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt); - const int listViewIconSize = indicatorWidth; - const int pixmapWidth = indicatorWidth; - const int pixmapHeight = qMax(indicatorHeight, listViewIconSize); + const QMap::const_iterator it = d_ptr->m_values.constFind(property); + if (it == d_ptr->m_values.constEnd()) + return QString(); - opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight); - QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight); - pixmap.fill(Qt::transparent); - { - // Center? - const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0; - const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0; - QPainter painter(&pixmap); - painter.translate(xoff, yoff); - style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter); - } - return QIcon(pixmap); + static const QString trueText = tr("True"); + static const QString falseText = tr("False"); + return it.value() ? trueText : falseText; } /*! @@ -1568,9 +1510,7 @@ QIcon QtBoolPropertyManager::valueIcon(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QIcon(); - static const QIcon checkedIcon = drawCheckBox(true); - static const QIcon uncheckedIcon = drawCheckBox(false); - return it.value() ? checkedIcon : uncheckedIcon; + return it.value() ? d_ptr->m_checkedIcon : d_ptr->m_uncheckedIcon; } /*! @@ -1611,6 +1551,7 @@ class QtDatePropertyManagerPrivate QtDatePropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtDatePropertyManager) public: + explicit QtDatePropertyManagerPrivate(QtDatePropertyManager *q); struct Data { @@ -1631,8 +1572,17 @@ class QtDatePropertyManagerPrivate QMap m_values; }; +QtDatePropertyManagerPrivate::QtDatePropertyManagerPrivate(QtDatePropertyManager *q) : + q_ptr(q), + m_format(QtPropertyBrowserUtils::dateFormat()) +{ +} + /*! \class QtDatePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtDatePropertyManager provides and manages QDate properties. @@ -1677,13 +1627,8 @@ class QtDatePropertyManagerPrivate Creates a manager with the given \a parent. */ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate(this)) { - d_ptr = new QtDatePropertyManagerPrivate; - d_ptr->q_ptr = this; - - QLocale loc; - d_ptr->m_format = loc.dateFormat(QLocale::ShortFormat); } /*! @@ -1692,7 +1637,6 @@ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) QtDatePropertyManager::~QtDatePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1753,7 +1697,7 @@ QString QtDatePropertyManager::valueText(const QtProperty *property) const void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) { void (QtDatePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, const QDate &) = 0; - setValueInRange(this, d_ptr, + setValueInRange(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1770,7 +1714,7 @@ void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) */ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal) { - setMinimumValue(this, d_ptr, + setMinimumValue(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1788,7 +1732,7 @@ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal */ void QtDatePropertyManager::setMaximum(QtProperty *property, const QDate &maxVal) { - setMaximumValue(this, d_ptr, + setMaximumValue(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1813,7 +1757,7 @@ void QtDatePropertyManager::setRange(QtProperty *property, const QDate &minVal, { void (QtDatePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, const QDate &, const QDate &, const QDate &) = 0; - setBorderValues(this, d_ptr, + setBorderValues(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1843,15 +1787,25 @@ class QtTimePropertyManagerPrivate QtTimePropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtTimePropertyManager) public: + explicit QtTimePropertyManagerPrivate(QtTimePropertyManager *q); - QString m_format; + const QString m_format; typedef QMap PropertyValueMap; PropertyValueMap m_values; }; +QtTimePropertyManagerPrivate::QtTimePropertyManagerPrivate(QtTimePropertyManager *q) : + q_ptr(q), + m_format(QtPropertyBrowserUtils::timeFormat()) +{ +} + /*! \class QtTimePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtTimePropertyManager provides and manages QTime properties. @@ -1879,13 +1833,8 @@ class QtTimePropertyManagerPrivate Creates a manager with the given \a parent. */ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate(this)) { - d_ptr = new QtTimePropertyManagerPrivate; - d_ptr->q_ptr = this; - - QLocale loc; - d_ptr->m_format = loc.timeFormat(QLocale::ShortFormat); } /*! @@ -1894,7 +1843,6 @@ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) QtTimePropertyManager::~QtTimePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1959,14 +1907,24 @@ class QtDateTimePropertyManagerPrivate QtDateTimePropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtDateTimePropertyManager) public: + explicit QtDateTimePropertyManagerPrivate(QtDateTimePropertyManager *q); - QString m_format; + const QString m_format; typedef QMap PropertyValueMap; PropertyValueMap m_values; }; +QtDateTimePropertyManagerPrivate::QtDateTimePropertyManagerPrivate(QtDateTimePropertyManager *q) : + q_ptr(q), + m_format(QtPropertyBrowserUtils::dateTimeFormat()) +{ +} + /*! \class QtDateTimePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtDateTimePropertyManager provides and manages QDateTime properties. @@ -1991,15 +1949,8 @@ class QtDateTimePropertyManagerPrivate Creates a manager with the given \a parent. */ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate(this)) { - d_ptr = new QtDateTimePropertyManagerPrivate; - d_ptr->q_ptr = this; - - QLocale loc; - d_ptr->m_format = loc.dateFormat(QLocale::ShortFormat); - d_ptr->m_format += QLatin1Char(' '); - d_ptr->m_format += loc.timeFormat(QLocale::ShortFormat); } /*! @@ -2008,7 +1959,6 @@ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) QtDateTimePropertyManager::~QtDateTimePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2081,6 +2031,9 @@ class QtKeySequencePropertyManagerPrivate }; /*! \class QtKeySequencePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtKeySequencePropertyManager provides and manages QKeySequence properties. @@ -2106,9 +2059,8 @@ class QtKeySequencePropertyManagerPrivate Creates a manager with the given \a parent. */ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtKeySequencePropertyManagerPrivate) { - d_ptr = new QtKeySequencePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2118,7 +2070,6 @@ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) QtKeySequencePropertyManager::~QtKeySequencePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2189,6 +2140,9 @@ class QtCharPropertyManagerPrivate }; /*! \class QtCharPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtCharPropertyManager provides and manages QChar properties. @@ -2214,9 +2168,8 @@ class QtCharPropertyManagerPrivate Creates a manager with the given \a parent. */ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtCharPropertyManagerPrivate) { - d_ptr = new QtCharPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2226,7 +2179,6 @@ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) QtCharPropertyManager::~QtCharPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2346,6 +2298,9 @@ void QtLocalePropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) /*! \class QtLocalePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtLocalePropertyManager provides and manages QLocale properties. @@ -2379,17 +2334,16 @@ void QtLocalePropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtLocalePropertyManagerPrivate) { - d_ptr = new QtLocalePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -2398,7 +2352,6 @@ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) QtLocalePropertyManager::~QtLocalePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2438,15 +2391,23 @@ QString QtLocalePropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); - QLocale loc = it.value(); + const QLocale loc = it.value(); int langIdx = 0; int countryIdx = 0; - metaEnumProvider()->localeToIndex(loc.language(), loc.country(), &langIdx, &countryIdx); - QString str = tr("%1, %2") - .arg(metaEnumProvider()->languageEnumNames().at(langIdx)) - .arg(metaEnumProvider()->countryEnumNames(loc.language()).at(countryIdx)); - return str; + const QtMetaEnumProvider *me = metaEnumProvider(); + me->localeToIndex(loc.language(), loc.country(), &langIdx, &countryIdx); + if (langIdx < 0) { + qWarning("QtLocalePropertyManager::valueText: Unknown language %d", loc.language()); + return tr(""); + } + const QString languageName = me->languageEnumNames().at(langIdx); + if (countryIdx < 0) { + qWarning("QtLocalePropertyManager::valueText: Unknown country %d for %s", loc.country(), qPrintable(languageName)); + return languageName; + } + const QString countryName = me->countryEnumNames(loc.language()).at(countryIdx); + return tr("%1, %2").arg(languageName, countryName); } /*! @@ -2582,6 +2543,9 @@ void QtPointPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) } /*! \class QtPointPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtPointPropertyManager provides and manages QPoint properties. @@ -2615,16 +2579,15 @@ void QtPointPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtPointPropertyManagerPrivate) { - d_ptr = new QtPointPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -2633,7 +2596,6 @@ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) QtPointPropertyManager::~QtPointPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2673,8 +2635,8 @@ QString QtPointPropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); const QPoint v = it.value(); - return QString(tr("(%1, %2)").arg(QString::number(v.x())) - .arg(QString::number(v.y()))); + return tr("(%1, %2)").arg(QString::number(v.x())) + .arg(QString::number(v.y())); } /*! @@ -2801,6 +2763,9 @@ void QtPointFPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) } /*! \class QtPointFPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtPointFPropertyManager provides and manages QPointF properties. @@ -2844,16 +2809,15 @@ void QtPointFPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtPointFPropertyManagerPrivate) { - d_ptr = new QtPointFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotDoubleChanged(QtProperty *, double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotDoubleChanged(QtProperty*,double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -2862,7 +2826,6 @@ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) QtPointFPropertyManager::~QtPointFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2913,8 +2876,8 @@ QString QtPointFPropertyManager::valueText(const QtProperty *property) const return QString(); const QPointF v = it.value().val; const int dec = it.value().decimals; - return QString(tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec)) - .arg(QString::number(v.y(), 'f', dec))); + return tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec)) + .arg(QString::number(v.y(), 'f', dec)); } /*! @@ -3103,6 +3066,9 @@ void QtSizePropertyManagerPrivate::setRange(QtProperty *property, /*! \class QtSizePropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtSizePropertyManager provides and manages QSize properties. @@ -3154,16 +3120,15 @@ void QtSizePropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizePropertyManagerPrivate) { - d_ptr = new QtSizePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -3172,7 +3137,6 @@ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) QtSizePropertyManager::~QtSizePropertyManager() { clear(); - delete d_ptr; } /*! @@ -3232,8 +3196,8 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); const QSize v = it.value().val; - return QString(tr("%1 x %2").arg(QString::number(v.width())) - .arg(QString::number(v.height()))); + return tr("%1 x %2").arg(QString::number(v.width())) + .arg(QString::number(v.height())); } /*! @@ -3249,7 +3213,7 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const */ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) { - setValueInRange(this, d_ptr, + setValueInRange(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, property, val, &QtSizePropertyManagerPrivate::setValue); @@ -3266,7 +3230,7 @@ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) */ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal) { - setBorderValue(this, d_ptr, + setBorderValue(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3287,7 +3251,7 @@ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal */ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal) { - setBorderValue(this, d_ptr, + setBorderValue(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3309,11 +3273,11 @@ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal When setting a new range, the current value is adjusted if necessary (ensuring that the value remains within the range). - \sa setMinimum(), setMaximum(), rangeChanged() + \sa setMinimum(), setMaximum(), rangeChanged() */ void QtSizePropertyManager::setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal) { - setBorderValues(this, d_ptr, + setBorderValues(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3446,6 +3410,9 @@ void QtSizeFPropertyManagerPrivate::setRange(QtProperty *property, /*! \class QtSizeFPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtSizeFPropertyManager provides and manages QSizeF properties. @@ -3507,16 +3474,15 @@ void QtSizeFPropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizeFPropertyManagerPrivate) { - d_ptr = new QtSizeFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotDoubleChanged(QtProperty *, double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotDoubleChanged(QtProperty*,double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -3525,7 +3491,6 @@ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) QtSizeFPropertyManager::~QtSizeFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -3596,8 +3561,8 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const return QString(); const QSizeF v = it.value().val; const int dec = it.value().decimals; - return QString(tr("%1 x %2").arg(QString::number(v.width(), 'f', dec)) - .arg(QString::number(v.height(), 'f', dec))); + return tr("%1 x %2").arg(QString::number(v.width(), 'f', dec)) + .arg(QString::number(v.height(), 'f', dec)); } /*! @@ -3613,7 +3578,7 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const */ void QtSizeFPropertyManager::setValue(QtProperty *property, const QSizeF &val) { - setValueInRange(this, d_ptr, + setValueInRange(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, property, val, &QtSizeFPropertyManagerPrivate::setValue); @@ -3664,7 +3629,7 @@ void QtSizeFPropertyManager::setDecimals(QtProperty *property, int prec) */ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minVal) { - setBorderValue(this, d_ptr, + setBorderValue(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3685,7 +3650,7 @@ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minV */ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxVal) { - setBorderValue(this, d_ptr, + setBorderValue(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3707,11 +3672,11 @@ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxV When setting a new range, the current value is adjusted if necessary (ensuring that the value remains within the range). - \sa setMinimum(), setMaximum(), rangeChanged() + \sa setMinimum(), setMaximum(), rangeChanged() */ void QtSizeFPropertyManager::setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal) { - setBorderValues(this, d_ptr, + setBorderValues(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3871,6 +3836,9 @@ void QtRectPropertyManagerPrivate::setConstraint(QtProperty *property, /*! \class QtRectPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtRectPropertyManager provides and manages QRect properties. @@ -3920,16 +3888,15 @@ void QtRectPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtRectPropertyManagerPrivate) { - d_ptr = new QtRectPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -3938,7 +3905,6 @@ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) QtRectPropertyManager::~QtRectPropertyManager() { clear(); - delete d_ptr; } /*! @@ -3988,10 +3954,10 @@ QString QtRectPropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); const QRect v = it.value().val; - return QString(tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x())) - .arg(QString::number(v.y())) - .arg(QString::number(v.width())) - .arg(QString::number(v.height()))); + return tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x())) + .arg(QString::number(v.y())) + .arg(QString::number(v.width())) + .arg(QString::number(v.height())); } /*! @@ -4280,6 +4246,9 @@ void QtRectFPropertyManagerPrivate::setConstraint(QtProperty *property, /*! \class QtRectFPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtRectFPropertyManager provides and manages QRectF properties. @@ -4339,16 +4308,15 @@ void QtRectFPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtRectFPropertyManagerPrivate) { - d_ptr = new QtRectFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotDoubleChanged(QtProperty *, double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotDoubleChanged(QtProperty*,double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -4357,7 +4325,6 @@ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) QtRectFPropertyManager::~QtRectFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -4666,6 +4633,9 @@ class QtEnumPropertyManagerPrivate /*! \class QtEnumPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtEnumPropertyManager provides and manages enum properties. @@ -4721,9 +4691,8 @@ class QtEnumPropertyManagerPrivate Creates a manager with the given \a parent. */ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtEnumPropertyManagerPrivate) { - d_ptr = new QtEnumPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -4733,7 +4702,6 @@ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) QtEnumPropertyManager::~QtEnumPropertyManager() { clear(); - delete d_ptr; } /*! @@ -4977,6 +4945,9 @@ void QtFlagPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) /*! \class QtFlagPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtFlagPropertyManager provides and manages flag properties. @@ -5030,16 +5001,15 @@ void QtFlagPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtFlagPropertyManagerPrivate) { - d_ptr = new QtFlagPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); - connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotBoolChanged(QtProperty *, bool))); - connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotBoolChanged(QtProperty*,bool))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -5048,7 +5018,6 @@ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) QtFlagPropertyManager::~QtFlagPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5320,6 +5289,9 @@ void QtSizePolicyPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *prope /*! \class QtSizePolicyPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtSizePolicyPropertyManager provides and manages QSizePolicy properties. @@ -5355,22 +5327,21 @@ void QtSizePolicyPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *prope Creates a manager with the given \a parent. */ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizePolicyPropertyManagerPrivate) { - d_ptr = new QtSizePolicyPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -5379,7 +5350,6 @@ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) QtSizePolicyPropertyManager::~QtSizePolicyPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5728,6 +5698,9 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() /*! \class QtFontPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtFontPropertyManager provides and manages QFont properties. @@ -5764,30 +5737,27 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() Creates a manager with the given \a parent. */ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtFontPropertyManagerPrivate) { - d_ptr = new QtFontPropertyManagerPrivate; d_ptr->q_ptr = this; -#if QT_VERSION >= 0x040500 QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged())); -#endif d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotEnumChanged(QtProperty *, int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotEnumChanged(QtProperty*,int))); d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); - connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotBoolChanged(QtProperty *, bool))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotBoolChanged(QtProperty*,bool))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); - connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -5796,7 +5766,6 @@ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) QtFontPropertyManager::~QtFontPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6107,6 +6076,9 @@ void QtColorPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) /*! \class QtColorPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtColorPropertyManager provides and manages QColor properties. @@ -6141,17 +6113,16 @@ void QtColorPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtColorPropertyManagerPrivate) { - d_ptr = new QtColorPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotIntChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), - this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), + this, SLOT(slotPropertyDestroyed(QtProperty*))); } /*! @@ -6160,7 +6131,6 @@ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) QtColorPropertyManager::~QtColorPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6323,8 +6293,25 @@ void QtColorPropertyManager::uninitializeProperty(QtProperty *property) // QtCursorPropertyManager +// Make sure icons are removed as soon as QApplication is destroyed, otherwise, +// handles are leaked on X11. +static void clearCursorDatabase(); +namespace { +struct CursorDatabase : public QtCursorDatabase +{ + CursorDatabase() + { + qAddPostRoutine(clearCursorDatabase); + } +}; +} Q_GLOBAL_STATIC(QtCursorDatabase, cursorDatabase) +static void clearCursorDatabase() +{ + cursorDatabase()->clear(); +} + class QtCursorPropertyManagerPrivate { QtCursorPropertyManager *q_ptr; @@ -6336,6 +6323,9 @@ class QtCursorPropertyManagerPrivate /*! \class QtCursorPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtCursorPropertyManager provides and manages QCursor properties. @@ -6362,9 +6352,8 @@ class QtCursorPropertyManagerPrivate Creates a manager with the given \a parent. */ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtCursorPropertyManagerPrivate) { - d_ptr = new QtCursorPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -6374,7 +6363,6 @@ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) QtCursorPropertyManager::~QtCursorPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6458,23 +6446,7 @@ void QtCursorPropertyManager::uninitializeProperty(QtProperty *property) d_ptr->m_values.remove(property); } -QString QtTextPropertyManager::valueText(const QtProperty *property) const -{ - QString text = QtStringPropertyManager::valueText(property); - for (int i = 0; i < text.size(); i++) - { - if (text.at(i) == '\n') - { - QStringRef ret(&text, 0, i); - return ret.toString() + " ..."; - } - } - return text; -} - -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qtpropertymanager.cxx" +#include "moc_qtpropertymanager.cpp" #include "qtpropertymanager.moc" diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.h b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.h similarity index 75% rename from studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.h rename to studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.h index a19dd6e03a..0b1c1fd24e 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.h +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.h @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -88,18 +34,17 @@ #ifndef QTPROPERTYMANAGER_H #define QTPROPERTYMANAGER_H +#include "qtpropertybrowser_export.h" #include "qtpropertybrowser.h" -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QDate; class QTime; class QDateTime; class QLocale; -class QT_QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -115,7 +60,7 @@ class QT_QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractProp class QtIntPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtIntPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtIntPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -142,14 +87,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtIntPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtIntPropertyManager) Q_DISABLE_COPY(QtIntPropertyManager) }; class QtBoolPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -160,24 +105,22 @@ class QT_QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPrope public Q_SLOTS: void setValue(QtProperty *property, bool val); - Q_SIGNALS: void valueChanged(QtProperty *property, bool val); - protected: QString valueText(const QtProperty *property) const; QIcon valueIcon(const QtProperty *property) const; virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtBoolPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtBoolPropertyManager) Q_DISABLE_COPY(QtBoolPropertyManager) }; class QtDoublePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtDoublePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtDoublePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -207,14 +150,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDoublePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtDoublePropertyManager) Q_DISABLE_COPY(QtDoublePropertyManager) }; class QtStringPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtStringPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtStringPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -235,14 +178,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtStringPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtStringPropertyManager) Q_DISABLE_COPY(QtStringPropertyManager) }; class QtDatePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtDatePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtDatePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -266,14 +209,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDatePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtDatePropertyManager) Q_DISABLE_COPY(QtDatePropertyManager) }; class QtTimePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtTimePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtTimePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -291,14 +234,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtTimePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtTimePropertyManager) Q_DISABLE_COPY(QtTimePropertyManager) }; class QtDateTimePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtDateTimePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtDateTimePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -316,14 +259,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDateTimePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtDateTimePropertyManager) Q_DISABLE_COPY(QtDateTimePropertyManager) }; class QtKeySequencePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtKeySequencePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtKeySequencePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -341,14 +284,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtKeySequencePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) Q_DISABLE_COPY(QtKeySequencePropertyManager) }; class QtCharPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtCharPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtCharPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -366,7 +309,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtCharPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtCharPropertyManager) Q_DISABLE_COPY(QtCharPropertyManager) }; @@ -374,7 +317,7 @@ public Q_SLOTS: class QtEnumPropertyManager; class QtLocalePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtLocalePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtLocalePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -394,7 +337,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtLocalePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtLocalePropertyManager) Q_DISABLE_COPY(QtLocalePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) @@ -403,7 +346,7 @@ public Q_SLOTS: class QtPointPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtPointPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtPointPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -423,7 +366,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtPointPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtPointPropertyManager) Q_DISABLE_COPY(QtPointPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -432,7 +375,7 @@ public Q_SLOTS: class QtPointFPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtPointFPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtPointFPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -455,7 +398,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtPointFPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtPointFPropertyManager) Q_DISABLE_COPY(QtPointFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -464,7 +407,7 @@ public Q_SLOTS: class QtSizePropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtSizePropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtSizePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -490,7 +433,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizePropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtSizePropertyManager) Q_DISABLE_COPY(QtSizePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -499,7 +442,7 @@ public Q_SLOTS: class QtSizeFPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtSizeFPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtSizeFPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -528,7 +471,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizeFPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtSizeFPropertyManager) Q_DISABLE_COPY(QtSizeFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -537,7 +480,7 @@ public Q_SLOTS: class QtRectPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtRectPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtRectPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -560,7 +503,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtRectPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtRectPropertyManager) Q_DISABLE_COPY(QtRectPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -569,7 +512,7 @@ public Q_SLOTS: class QtRectFPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtRectFPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtRectFPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -595,7 +538,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtRectFPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtRectFPropertyManager) Q_DISABLE_COPY(QtRectFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -604,7 +547,7 @@ public Q_SLOTS: class QtEnumPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtEnumPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtEnumPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -629,14 +572,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtEnumPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtEnumPropertyManager) Q_DISABLE_COPY(QtEnumPropertyManager) }; class QtFlagPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtFlagPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtFlagPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -659,7 +602,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtFlagPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtFlagPropertyManager) Q_DISABLE_COPY(QtFlagPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool)) @@ -668,7 +611,7 @@ public Q_SLOTS: class QtSizePolicyPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtSizePolicyPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtSizePolicyPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -689,7 +632,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizePolicyPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) Q_DISABLE_COPY(QtSizePolicyPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -699,7 +642,7 @@ public Q_SLOTS: class QtFontPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtFontPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtFontPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -722,7 +665,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtFontPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtFontPropertyManager) Q_DISABLE_COPY(QtFontPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -735,7 +678,7 @@ public Q_SLOTS: class QtColorPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtColorPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtColorPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -756,7 +699,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtColorPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtColorPropertyManager) Q_DISABLE_COPY(QtColorPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -765,7 +708,7 @@ public Q_SLOTS: class QtCursorPropertyManagerPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtCursorPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtCursorPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -786,23 +729,11 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtCursorPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtCursorPropertyManager) Q_DISABLE_COPY(QtCursorPropertyManager) }; -class QT_QTPROPERTYBROWSER_EXPORT QtTextPropertyManager : public QtStringPropertyManager -{ - Q_OBJECT -public: - QtTextPropertyManager(QObject *parent = 0):QtStringPropertyManager(parent) {} - -protected: - virtual QString valueText(const QtProperty *property) const; -}; - -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif #endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.cpp similarity index 86% rename from studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.cpp index eb9b375150..abb883e49d 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.cpp @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -88,19 +34,17 @@ #include "qttreepropertybrowser.h" #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include -#include +#include #include -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QtPropertyEditorView; @@ -197,10 +141,7 @@ void QtPropertyEditorView::drawRow(QPainter *painter, const QStyleOptionViewItem if (m_editorPrivate) { QtProperty *property = m_editorPrivate->indexToProperty(index); if (property) - { hasValue = property->hasValue(); - opt.font.setBold(property->isBold()); - } } if (!hasValue && m_editorPrivate->markPropertiesWithoutValue()) { const QColor c = option.palette.color(QPalette::Dark); @@ -213,7 +154,6 @@ void QtPropertyEditorView::drawRow(QPainter *painter, const QStyleOptionViewItem opt.palette.setColor(QPalette::AlternateBase, c.lighter(112)); } } - QTreeWidget::drawRow(painter, opt, index); QColor color = static_cast(QApplication::style()->styleHint(QStyle::SH_Table_GridLineColor, &opt)); painter->save(); @@ -362,7 +302,7 @@ QWidget *QtPropertyEditorDelegate::createEditor(QWidget *parent, if (editor) { editor->setAutoFillBackground(true); editor->installEventFilter(const_cast(this)); - connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); m_propertyToEditor[property] = editor; m_editorToProperty[editor] = property; m_editedItem = item; @@ -491,21 +431,21 @@ void QtTreePropertyBrowserPrivate::init(QWidget *parent) m_treeWidget->setColumnCount(2); QStringList labels; - labels.append(QApplication::translate("QtTreePropertyBrowser", "Property", 0, QApplication::UnicodeUTF8)); - labels.append(QApplication::translate("QtTreePropertyBrowser", "Value", 0, QApplication::UnicodeUTF8)); + labels.append(QCoreApplication::translate("QtTreePropertyBrowser", "Property")); + labels.append(QCoreApplication::translate("QtTreePropertyBrowser", "Value")); m_treeWidget->setHeaderLabels(labels); m_treeWidget->setAlternatingRowColors(true); m_treeWidget->setEditTriggers(QAbstractItemView::EditKeyPressed); m_delegate = new QtPropertyEditorDelegate(parent); m_delegate->setEditorPrivate(this); m_treeWidget->setItemDelegate(m_delegate); - m_treeWidget->header()->setMovable(false); - m_treeWidget->header()->setResizeMode(QHeaderView::Stretch); + m_treeWidget->header()->setSectionsMovable(false); + m_treeWidget->header()->setSectionResizeMode(QHeaderView::Stretch); m_expandIcon = drawIndicatorIcon(q_ptr->palette(), q_ptr->style()); - QObject::connect(m_treeWidget, SIGNAL(collapsed(const QModelIndex &)), q_ptr, SLOT(slotCollapsed(const QModelIndex &))); - QObject::connect(m_treeWidget, SIGNAL(expanded(const QModelIndex &)), q_ptr, SLOT(slotExpanded(const QModelIndex &))); + QObject::connect(m_treeWidget, SIGNAL(collapsed(QModelIndex)), q_ptr, SLOT(slotCollapsed(QModelIndex))); + QObject::connect(m_treeWidget, SIGNAL(expanded(QModelIndex)), q_ptr, SLOT(slotExpanded(QModelIndex))); QObject::connect(m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), q_ptr, SLOT(slotCurrentTreeItemChanged(QTreeWidgetItem*,QTreeWidgetItem*))); } @@ -730,6 +670,9 @@ void QtTreePropertyBrowserPrivate::editItem(QtBrowserItem *browserItem) /*! \class QtTreePropertyBrowser + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtTreePropertyBrowser class provides QTreeWidget based property browser. @@ -775,9 +718,8 @@ void QtTreePropertyBrowserPrivate::editItem(QtBrowserItem *browserItem) Creates a property browser with the given \a parent. */ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtTreePropertyBrowserPrivate) { - d_ptr = new QtTreePropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -796,7 +738,6 @@ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) */ QtTreePropertyBrowser::~QtTreePropertyBrowser() { - delete d_ptr; } /*! @@ -912,7 +853,7 @@ void QtTreePropertyBrowser::setResizeMode(QtTreePropertyBrowser::ResizeMode mode case QtTreePropertyBrowser::Stretch: default: m = QHeaderView::Stretch; break; } - d_ptr->m_treeWidget->header()->setResizeMode(m); + d_ptr->m_treeWidget->header()->setSectionResizeMode(m); } /*! @@ -1087,9 +1028,7 @@ void QtTreePropertyBrowser::editItem(QtBrowserItem *item) d_ptr->editItem(item); } -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qttreepropertybrowser.cxx" +#include "moc_qttreepropertybrowser.cpp" #include "qttreepropertybrowser.moc" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h new file mode 100644 index 0000000000..7861f297c7 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h @@ -0,0 +1,127 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTTREEPROPERTYBROWSER_H +#define QTTREEPROPERTYBROWSER_H + +#include "qtpropertybrowser_export.h" +#include "qtpropertybrowser.h" + +QT_BEGIN_NAMESPACE + +class QTreeWidgetItem; +class QtTreePropertyBrowserPrivate; + +class QTPROPERTYBROWSER_EXPORT QtTreePropertyBrowser : public QtAbstractPropertyBrowser +{ + Q_OBJECT + Q_ENUMS(ResizeMode) + Q_PROPERTY(int indentation READ indentation WRITE setIndentation) + Q_PROPERTY(bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated) + Q_PROPERTY(bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors) + Q_PROPERTY(bool headerVisible READ isHeaderVisible WRITE setHeaderVisible) + Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) + Q_PROPERTY(int splitterPosition READ splitterPosition WRITE setSplitterPosition) + Q_PROPERTY(bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked) +public: + + enum ResizeMode + { + Interactive, + Stretch, + Fixed, + ResizeToContents + }; + + QtTreePropertyBrowser(QWidget *parent = 0); + ~QtTreePropertyBrowser(); + + int indentation() const; + void setIndentation(int i); + + bool rootIsDecorated() const; + void setRootIsDecorated(bool show); + + bool alternatingRowColors() const; + void setAlternatingRowColors(bool enable); + + bool isHeaderVisible() const; + void setHeaderVisible(bool visible); + + ResizeMode resizeMode() const; + void setResizeMode(ResizeMode mode); + + int splitterPosition() const; + void setSplitterPosition(int position); + + void setExpanded(QtBrowserItem *item, bool expanded); + bool isExpanded(QtBrowserItem *item) const; + + bool isItemVisible(QtBrowserItem *item) const; + void setItemVisible(QtBrowserItem *item, bool visible); + + void setBackgroundColor(QtBrowserItem *item, const QColor &color); + QColor backgroundColor(QtBrowserItem *item) const; + QColor calculatedBackgroundColor(QtBrowserItem *item) const; + + void setPropertiesWithoutValueMarked(bool mark); + bool propertiesWithoutValueMarked() const; + + void editItem(QtBrowserItem *item); + +Q_SIGNALS: + + void collapsed(QtBrowserItem *item); + void expanded(QtBrowserItem *item); + +protected: + virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); + virtual void itemRemoved(QtBrowserItem *item); + virtual void itemChanged(QtBrowserItem *item); + +private: + + QScopedPointer d_ptr; + Q_DECLARE_PRIVATE(QtTreePropertyBrowser) + Q_DISABLE_COPY(QtTreePropertyBrowser) + + Q_PRIVATE_SLOT(d_func(), void slotCollapsed(const QModelIndex &)) + Q_PRIVATE_SLOT(d_func(), void slotExpanded(const QModelIndex &)) + Q_PRIVATE_SLOT(d_func(), void slotCurrentBrowserItemChanged(QtBrowserItem *)) + Q_PRIVATE_SLOT(d_func(), void slotCurrentTreeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)) + +}; + +QT_END_NAMESPACE + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.cpp similarity index 75% rename from studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.cpp rename to studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.cpp index 820e6e2f15..ea8b007a15 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.cpp @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -97,9 +43,7 @@ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif class QtEnumPropertyType { @@ -115,17 +59,13 @@ class QtGroupPropertyType { }; -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif Q_DECLARE_METATYPE(QtEnumPropertyType) Q_DECLARE_METATYPE(QtFlagPropertyType) Q_DECLARE_METATYPE(QtGroupPropertyType) -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif /*! Returns the type id for an enum property. @@ -192,7 +132,6 @@ static QtProperty *wrappedProperty(QtProperty *property) class QtVariantPropertyPrivate { - QtVariantProperty *q_ptr; public: QtVariantPropertyPrivate(QtVariantPropertyManager *m) : manager(m) {} @@ -201,6 +140,9 @@ class QtVariantPropertyPrivate /*! \class QtVariantProperty + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtVariantProperty class is a convenience class handling QVariant based properties. @@ -214,21 +156,11 @@ class QtVariantPropertyPrivate For example, instead of writing: - \code - QtVariantPropertyManager *variantPropertyManager; - QtProperty *property; - - variantPropertyManager->setValue(property, 10); - \endcode + \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp 0 you can write: - \code - QtVariantPropertyManager *variantPropertyManager; - QtVariantProperty *property; - - property->setValue(10); - \endcode + \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp 1 QtVariantProperty instances can only be created by the QtVariantPropertyManager class. @@ -247,9 +179,8 @@ class QtVariantPropertyPrivate \sa QtVariantPropertyManager */ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) - : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) + : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) { - } /*! @@ -259,7 +190,6 @@ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) */ QtVariantProperty::~QtVariantProperty() { - delete d_ptr; } /*! @@ -610,7 +540,7 @@ void QtVariantPropertyManagerPrivate::slotValueChanged(QtProperty *property, con void QtVariantPropertyManagerPrivate::slotValueChanged(QtProperty *property, const QKeySequence &val) { QVariant v; - qVariantSetValue(v, val); + v.setValue(val); valueChanged(property, v); } @@ -697,7 +627,7 @@ void QtVariantPropertyManagerPrivate::slotEnumIconsChanged(QtProperty *property, { if (QtVariantProperty *varProp = m_internalToProperty.value(property, 0)) { QVariant v; - qVariantSetValue(v, enumIcons); + v.setValue(enumIcons); emit q_ptr->attributeChanged(varProp, m_enumIconsAttribute, v); } } @@ -727,6 +657,9 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, /*! \class QtVariantPropertyManager + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtVariantPropertyManager class provides and manages QVariant based properties. @@ -757,77 +690,77 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, \table \header - \o Property Type - \o Property Type Id + \li Property Type + \li Property Type Id \row - \o int - \o QVariant::Int + \li int + \li QVariant::Int \row - \o double - \o QVariant::Double + \li double + \li QVariant::Double \row - \o bool - \o QVariant::Bool + \li bool + \li QVariant::Bool \row - \o QString - \o QVariant::String + \li QString + \li QVariant::String \row - \o QDate - \o QVariant::Date + \li QDate + \li QVariant::Date \row - \o QTime - \o QVariant::Time + \li QTime + \li QVariant::Time \row - \o QDateTime - \o QVariant::DateTime + \li QDateTime + \li QVariant::DateTime \row - \o QKeySequence - \o QVariant::KeySequence + \li QKeySequence + \li QVariant::KeySequence \row - \o QChar - \o QVariant::Char + \li QChar + \li QVariant::Char \row - \o QLocale - \o QVariant::Locale + \li QLocale + \li QVariant::Locale \row - \o QPoint - \o QVariant::Point + \li QPoint + \li QVariant::Point \row - \o QPointF - \o QVariant::PointF + \li QPointF + \li QVariant::PointF \row - \o QSize - \o QVariant::Size + \li QSize + \li QVariant::Size \row - \o QSizeF - \o QVariant::SizeF + \li QSizeF + \li QVariant::SizeF \row - \o QRect - \o QVariant::Rect + \li QRect + \li QVariant::Rect \row - \o QRectF - \o QVariant::RectF + \li QRectF + \li QVariant::RectF \row - \o QColor - \o QVariant::Color + \li QColor + \li QVariant::Color \row - \o QSizePolicy - \o QVariant::SizePolicy + \li QSizePolicy + \li QVariant::SizePolicy \row - \o QFont - \o QVariant::Font + \li QFont + \li QVariant::Font \row - \o QCursor - \o QVariant::Cursor + \li QCursor + \li QVariant::Cursor \row - \o enum - \o enumTypeId() + \li enum + \li enumTypeId() \row - \o flag - \o flagTypeId() + \li flag + \li flagTypeId() \row - \o group - \o groupTypeId() + \li group + \li groupTypeId() \endtable Each property type can provide additional attributes, @@ -836,97 +769,97 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, \table \header - \o Property Type - \o Attribute Name - \o Attribute Type + \li Property Type + \li Attribute Name + \li Attribute Type \row - \o \c int - \o minimum - \o QVariant::Int + \li \c int + \li minimum + \li QVariant::Int \row - \o - \o maximum - \o QVariant::Int + \li + \li maximum + \li QVariant::Int \row - \o - \o singleStep - \o QVariant::Int + \li + \li singleStep + \li QVariant::Int \row - \o \c double - \o minimum - \o QVariant::Double + \li \c double + \li minimum + \li QVariant::Double \row - \o - \o maximum - \o QVariant::Double + \li + \li maximum + \li QVariant::Double \row - \o - \o singleStep - \o QVariant::Double + \li + \li singleStep + \li QVariant::Double \row - \o - \o decimals - \o QVariant::Int + \li + \li decimals + \li QVariant::Int \row - \o QString - \o regExp - \o QVariant::RegExp + \li QString + \li regExp + \li QVariant::RegExp \row - \o QDate - \o minimum - \o QVariant::Date + \li QDate + \li minimum + \li QVariant::Date \row - \o - \o maximum - \o QVariant::Date + \li + \li maximum + \li QVariant::Date \row - \o QPointF - \o decimals - \o QVariant::Int + \li QPointF + \li decimals + \li QVariant::Int \row - \o QSize - \o minimum - \o QVariant::Size + \li QSize + \li minimum + \li QVariant::Size \row - \o - \o maximum - \o QVariant::Size + \li + \li maximum + \li QVariant::Size \row - \o QSizeF - \o minimum - \o QVariant::SizeF + \li QSizeF + \li minimum + \li QVariant::SizeF \row - \o - \o maximum - \o QVariant::SizeF + \li + \li maximum + \li QVariant::SizeF \row - \o - \o decimals - \o QVariant::Int + \li + \li decimals + \li QVariant::Int \row - \o QRect - \o constraint - \o QVariant::Rect + \li QRect + \li constraint + \li QVariant::Rect \row - \o QRectF - \o constraint - \o QVariant::RectF + \li QRectF + \li constraint + \li QVariant::RectF \row - \o - \o decimals - \o QVariant::Int + \li + \li decimals + \li QVariant::Int \row - \o \c enum - \o enumNames - \o QVariant::StringList + \li \c enum + \li enumNames + \li QVariant::StringList \row - \o - \o enumIcons - \o iconMapTypeId() + \li + \li enumIcons + \li iconMapTypeId() \row - \o \c flag - \o flagNames - \o QVariant::StringList + \li \c flag + \li flagNames + \li QVariant::StringList \endtable The attributes for a given property type can be retrieved using @@ -968,9 +901,8 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, Creates a manager with the given \a parent. */ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtVariantPropertyManagerPrivate) { - d_ptr = new QtVariantPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_creatingProperty = false; @@ -985,12 +917,12 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_maximumAttribute] = QVariant::Int; d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_singleStepAttribute] = QVariant::Int; d_ptr->m_typeToValueType[QVariant::Int] = QVariant::Int; - connect(intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty *, int)), - this, SLOT(slotSingleStepChanged(QtProperty *, int))); + connect(intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty*,int)), + this, SLOT(slotSingleStepChanged(QtProperty*,int))); // DoublePropertyManager QtDoublePropertyManager *doublePropertyManager = new QtDoublePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Double] = doublePropertyManager; @@ -1003,30 +935,30 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_decimalsAttribute] = QVariant::Int; d_ptr->m_typeToValueType[QVariant::Double] = QVariant::Double; - connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty *, double)), - this, SLOT(slotSingleStepChanged(QtProperty *, double))); - connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty*,double)), + this, SLOT(slotSingleStepChanged(QtProperty*,double))); + connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); // BoolPropertyManager QtBoolPropertyManager *boolPropertyManager = new QtBoolPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Bool] = boolPropertyManager; d_ptr->m_typeToValueType[QVariant::Bool] = QVariant::Bool; - connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotValueChanged(QtProperty *, bool))); + connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotValueChanged(QtProperty*,bool))); // StringPropertyManager QtStringPropertyManager *stringPropertyManager = new QtStringPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::String] = stringPropertyManager; d_ptr->m_typeToValueType[QVariant::String] = QVariant::String; d_ptr->m_typeToAttributeToAttributeType[QVariant::String][d_ptr->m_regExpAttribute] = QVariant::RegExp; - connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty *, const QString &)), - this, SLOT(slotValueChanged(QtProperty *, const QString &))); - connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), - this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); + connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty*,QString)), + this, SLOT(slotValueChanged(QtProperty*,QString))); + connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), + this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); // DatePropertyManager QtDatePropertyManager *datePropertyManager = new QtDatePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Date] = datePropertyManager; @@ -1035,74 +967,74 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::Date; d_ptr->m_typeToAttributeToAttributeType[QVariant::Date][d_ptr->m_maximumAttribute] = QVariant::Date; - connect(datePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDate &)), - this, SLOT(slotValueChanged(QtProperty *, const QDate &))); - connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), - this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); + connect(datePropertyManager, SIGNAL(valueChanged(QtProperty*,QDate)), + this, SLOT(slotValueChanged(QtProperty*,QDate))); + connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), + this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); // TimePropertyManager QtTimePropertyManager *timePropertyManager = new QtTimePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Time] = timePropertyManager; d_ptr->m_typeToValueType[QVariant::Time] = QVariant::Time; - connect(timePropertyManager, SIGNAL(valueChanged(QtProperty *, const QTime &)), - this, SLOT(slotValueChanged(QtProperty *, const QTime &))); + connect(timePropertyManager, SIGNAL(valueChanged(QtProperty*,QTime)), + this, SLOT(slotValueChanged(QtProperty*,QTime))); // DateTimePropertyManager QtDateTimePropertyManager *dateTimePropertyManager = new QtDateTimePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::DateTime] = dateTimePropertyManager; d_ptr->m_typeToValueType[QVariant::DateTime] = QVariant::DateTime; - connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), - this, SLOT(slotValueChanged(QtProperty *, const QDateTime &))); + connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty*,QDateTime)), + this, SLOT(slotValueChanged(QtProperty*,QDateTime))); // KeySequencePropertyManager QtKeySequencePropertyManager *keySequencePropertyManager = new QtKeySequencePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::KeySequence] = keySequencePropertyManager; d_ptr->m_typeToValueType[QVariant::KeySequence] = QVariant::KeySequence; - connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), - this, SLOT(slotValueChanged(QtProperty *, const QKeySequence &))); + connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), + this, SLOT(slotValueChanged(QtProperty*,QKeySequence))); // CharPropertyManager QtCharPropertyManager *charPropertyManager = new QtCharPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Char] = charPropertyManager; d_ptr->m_typeToValueType[QVariant::Char] = QVariant::Char; - connect(charPropertyManager, SIGNAL(valueChanged(QtProperty *, const QChar &)), - this, SLOT(slotValueChanged(QtProperty *, const QChar &))); + connect(charPropertyManager, SIGNAL(valueChanged(QtProperty*,QChar)), + this, SLOT(slotValueChanged(QtProperty*,QChar))); // LocalePropertyManager QtLocalePropertyManager *localePropertyManager = new QtLocalePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Locale] = localePropertyManager; d_ptr->m_typeToValueType[QVariant::Locale] = QVariant::Locale; - connect(localePropertyManager, SIGNAL(valueChanged(QtProperty *, const QLocale &)), - this, SLOT(slotValueChanged(QtProperty *, const QLocale &))); - connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(localePropertyManager, SIGNAL(valueChanged(QtProperty*,QLocale)), + this, SLOT(slotValueChanged(QtProperty*,QLocale))); + connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // PointPropertyManager QtPointPropertyManager *pointPropertyManager = new QtPointPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Point] = pointPropertyManager; d_ptr->m_typeToValueType[QVariant::Point] = QVariant::Point; - connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPoint &)), - this, SLOT(slotValueChanged(QtProperty *, const QPoint &))); - connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty*,QPoint)), + this, SLOT(slotValueChanged(QtProperty*,QPoint))); + connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // PointFPropertyManager QtPointFPropertyManager *pointFPropertyManager = new QtPointFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::PointF] = pointFPropertyManager; d_ptr->m_typeToValueType[QVariant::PointF] = QVariant::PointF; d_ptr->m_typeToAttributeToAttributeType[QVariant::PointF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPointF &)), - this, SLOT(slotValueChanged(QtProperty *, const QPointF &))); - connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); - connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty*,QPointF)), + this, SLOT(slotValueChanged(QtProperty*,QPointF))); + connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // SizePropertyManager QtSizePropertyManager *sizePropertyManager = new QtSizePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Size] = sizePropertyManager; @@ -1111,18 +1043,18 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::Size; d_ptr->m_typeToAttributeToAttributeType[QVariant::Size][d_ptr->m_maximumAttribute] = QVariant::Size; - connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty *, const QSize &)), - this, SLOT(slotValueChanged(QtProperty *, const QSize &))); - connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSize &, const QSize &)), - this, SLOT(slotRangeChanged(QtProperty *, const QSize &, const QSize &))); - connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty*,QSize)), + this, SLOT(slotValueChanged(QtProperty*,QSize))); + connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty*,QSize,QSize)), + this, SLOT(slotRangeChanged(QtProperty*,QSize,QSize))); + connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // SizeFPropertyManager QtSizeFPropertyManager *sizeFPropertyManager = new QtSizeFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::SizeF] = sizeFPropertyManager; @@ -1133,38 +1065,38 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::SizeF; d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizeF &)), - this, SLOT(slotValueChanged(QtProperty *, const QSizeF &))); - connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSizeF &, const QSizeF &)), - this, SLOT(slotRangeChanged(QtProperty *, const QSizeF &, const QSizeF &))); - connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); - connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizeF)), + this, SLOT(slotValueChanged(QtProperty*,QSizeF))); + connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty*,QSizeF,QSizeF)), + this, SLOT(slotRangeChanged(QtProperty*,QSizeF,QSizeF))); + connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // RectPropertyManager QtRectPropertyManager *rectPropertyManager = new QtRectPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Rect] = rectPropertyManager; d_ptr->m_typeToValueType[QVariant::Rect] = QVariant::Rect; d_ptr->m_typeToAttributeToAttributeType[QVariant::Rect][d_ptr->m_constraintAttribute] = QVariant::Rect; - connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRect &)), - this, SLOT(slotValueChanged(QtProperty *, const QRect &))); - connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRect &)), - this, SLOT(slotConstraintChanged(QtProperty *, const QRect &))); - connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty*,QRect)), + this, SLOT(slotValueChanged(QtProperty*,QRect))); + connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRect)), + this, SLOT(slotConstraintChanged(QtProperty*,QRect))); + connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // RectFPropertyManager QtRectFPropertyManager *rectFPropertyManager = new QtRectFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::RectF] = rectFPropertyManager; @@ -1173,32 +1105,32 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::RectF; d_ptr->m_typeToAttributeToAttributeType[QVariant::RectF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRectF &)), - this, SLOT(slotValueChanged(QtProperty *, const QRectF &))); - connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRectF &)), - this, SLOT(slotConstraintChanged(QtProperty *, const QRectF &))); - connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), - this, SLOT(slotDecimalsChanged(QtProperty *, int))); - connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), - this, SLOT(slotValueChanged(QtProperty *, double))); - connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double, double)), - this, SLOT(slotRangeChanged(QtProperty *, double, double))); - connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty*,QRectF)), + this, SLOT(slotValueChanged(QtProperty*,QRectF))); + connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRectF)), + this, SLOT(slotConstraintChanged(QtProperty*,QRectF))); + connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), + this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), + this, SLOT(slotValueChanged(QtProperty*,double))); + connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), + this, SLOT(slotRangeChanged(QtProperty*,double,double))); + connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // ColorPropertyManager QtColorPropertyManager *colorPropertyManager = new QtColorPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Color] = colorPropertyManager; d_ptr->m_typeToValueType[QVariant::Color] = QVariant::Color; - connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QColor &)), - this, SLOT(slotValueChanged(QtProperty *, const QColor &))); - connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty*,QColor)), + this, SLOT(slotValueChanged(QtProperty*,QColor))); + connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // EnumPropertyManager int enumId = enumTypeId(); QtEnumPropertyManager *enumPropertyManager = new QtEnumPropertyManager(this); @@ -1208,58 +1140,58 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::StringList; d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] = iconMapTypeId(); - connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); - connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty *, const QMap &)), - this, SLOT(slotEnumIconsChanged(QtProperty *, const QMap &))); + connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty*,QMap)), + this, SLOT(slotEnumIconsChanged(QtProperty*,QMap))); // SizePolicyPropertyManager QtSizePolicyPropertyManager *sizePolicyPropertyManager = new QtSizePolicyPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::SizePolicy] = sizePolicyPropertyManager; d_ptr->m_typeToValueType[QVariant::SizePolicy] = QVariant::SizePolicy; - connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizePolicy &)), - this, SLOT(slotValueChanged(QtProperty *, const QSizePolicy &))); - connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); + connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizePolicy)), + this, SLOT(slotValueChanged(QtProperty*,QSizePolicy))); + connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); connect(sizePolicyPropertyManager->subEnumPropertyManager(), - SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); - connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // FontPropertyManager QtFontPropertyManager *fontPropertyManager = new QtFontPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Font] = fontPropertyManager; d_ptr->m_typeToValueType[QVariant::Font] = QVariant::Font; - connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty *, const QFont &)), - this, SLOT(slotValueChanged(QtProperty *, const QFont &))); - connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), - this, SLOT(slotRangeChanged(QtProperty *, int, int))); - connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); + connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty*,QFont)), + this, SLOT(slotValueChanged(QtProperty*,QFont))); + connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), + this, SLOT(slotRangeChanged(QtProperty*,int,int))); + connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); connect(fontPropertyManager->subEnumPropertyManager(), - SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); - connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotValueChanged(QtProperty *, bool))); - connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + SIGNAL(enumNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotValueChanged(QtProperty*,bool))); + connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // CursorPropertyManager QtCursorPropertyManager *cursorPropertyManager = new QtCursorPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Cursor] = cursorPropertyManager; d_ptr->m_typeToValueType[QVariant::Cursor] = QVariant::Cursor; - connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), - this, SLOT(slotValueChanged(QtProperty *, const QCursor &))); + connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty*,QCursor)), + this, SLOT(slotValueChanged(QtProperty*,QCursor))); // FlagPropertyManager int flagId = flagTypeId(); QtFlagPropertyManager *flagPropertyManager = new QtFlagPropertyManager(this); @@ -1267,16 +1199,16 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToValueType[flagId] = QVariant::Int; d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] = QVariant::StringList; - connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), - this, SLOT(slotValueChanged(QtProperty *, int))); - connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty *, const QStringList &)), - this, SLOT(slotFlagNamesChanged(QtProperty *, const QStringList &))); - connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *, bool)), - this, SLOT(slotValueChanged(QtProperty *, bool))); - connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), - this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); - connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), + this, SLOT(slotValueChanged(QtProperty*,int))); + connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty*,QStringList)), + this, SLOT(slotFlagNamesChanged(QtProperty*,QStringList))); + connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), + this, SLOT(slotValueChanged(QtProperty*,bool))); + connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), + this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); + connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), + this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); // FlagPropertyManager int groupId = groupTypeId(); QtGroupPropertyManager *groupPropertyManager = new QtGroupPropertyManager(this); @@ -1290,7 +1222,6 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QtVariantPropertyManager::~QtVariantPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1384,7 +1315,7 @@ QVariant QtVariantPropertyManager::value(const QtProperty *property) const } else if (QtDateTimePropertyManager *dateTimeManager = qobject_cast(manager)) { return dateTimeManager->value(internProp); } else if (QtKeySequencePropertyManager *keySequenceManager = qobject_cast(manager)) { - return keySequenceManager->value(internProp); + return QVariant::fromValue(keySequenceManager->value(internProp)); } else if (QtCharPropertyManager *charManager = qobject_cast(manager)) { return charManager->value(internProp); } else if (QtLocalePropertyManager *localeManager = qobject_cast(manager)) { @@ -1548,7 +1479,7 @@ QVariant QtVariantPropertyManager::attributeValue(const QtProperty *property, co return enumManager->enumNames(internProp); if (attribute == d_ptr->m_enumIconsAttribute) { QVariant v; - qVariantSetValue(v, enumManager->enumIcons(internProp)); + v.setValue(enumManager->enumIcons(internProp)); return v; } return QVariant(); @@ -1628,73 +1559,73 @@ void QtVariantPropertyManager::setValue(QtProperty *property, const QVariant &va QtAbstractPropertyManager *manager = internProp->propertyManager(); if (QtIntPropertyManager *intManager = qobject_cast(manager)) { - intManager->setValue(internProp, qVariantValue(val)); + intManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtDoublePropertyManager *doubleManager = qobject_cast(manager)) { - doubleManager->setValue(internProp, qVariantValue(val)); + doubleManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtBoolPropertyManager *boolManager = qobject_cast(manager)) { - boolManager->setValue(internProp, qVariantValue(val)); + boolManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtStringPropertyManager *stringManager = qobject_cast(manager)) { - stringManager->setValue(internProp, qVariantValue(val)); + stringManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtDatePropertyManager *dateManager = qobject_cast(manager)) { - dateManager->setValue(internProp, qVariantValue(val)); + dateManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtTimePropertyManager *timeManager = qobject_cast(manager)) { - timeManager->setValue(internProp, qVariantValue(val)); + timeManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtDateTimePropertyManager *dateTimeManager = qobject_cast(manager)) { - dateTimeManager->setValue(internProp, qVariantValue(val)); + dateTimeManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtKeySequencePropertyManager *keySequenceManager = qobject_cast(manager)) { - keySequenceManager->setValue(internProp, qVariantValue(val)); + keySequenceManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtCharPropertyManager *charManager = qobject_cast(manager)) { - charManager->setValue(internProp, qVariantValue(val)); + charManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtLocalePropertyManager *localeManager = qobject_cast(manager)) { - localeManager->setValue(internProp, qVariantValue(val)); + localeManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtPointPropertyManager *pointManager = qobject_cast(manager)) { - pointManager->setValue(internProp, qVariantValue(val)); + pointManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtPointFPropertyManager *pointFManager = qobject_cast(manager)) { - pointFManager->setValue(internProp, qVariantValue(val)); + pointFManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtSizePropertyManager *sizeManager = qobject_cast(manager)) { - sizeManager->setValue(internProp, qVariantValue(val)); + sizeManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtSizeFPropertyManager *sizeFManager = qobject_cast(manager)) { - sizeFManager->setValue(internProp, qVariantValue(val)); + sizeFManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtRectPropertyManager *rectManager = qobject_cast(manager)) { - rectManager->setValue(internProp, qVariantValue(val)); + rectManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtRectFPropertyManager *rectFManager = qobject_cast(manager)) { - rectFManager->setValue(internProp, qVariantValue(val)); + rectFManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtColorPropertyManager *colorManager = qobject_cast(manager)) { - colorManager->setValue(internProp, qVariantValue(val)); + colorManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtEnumPropertyManager *enumManager = qobject_cast(manager)) { - enumManager->setValue(internProp, qVariantValue(val)); + enumManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtSizePolicyPropertyManager *sizePolicyManager = qobject_cast(manager)) { - sizePolicyManager->setValue(internProp, qVariantValue(val)); + sizePolicyManager->setValue(internProp, qvariant_cast(val)); return; } else if (QtFontPropertyManager *fontManager = qobject_cast(manager)) { - fontManager->setValue(internProp, qVariantValue(val)); + fontManager->setValue(internProp, qvariant_cast(val)); return; #ifndef QT_NO_CURSOR } else if (QtCursorPropertyManager *cursorManager = qobject_cast(manager)) { - cursorManager->setValue(internProp, qVariantValue(val)); + cursorManager->setValue(internProp, qvariant_cast(val)); return; #endif } else if (QtFlagPropertyManager *flagManager = qobject_cast(manager)) { - flagManager->setValue(internProp, qVariantValue(val)); + flagManager->setValue(internProp, qvariant_cast(val)); return; } } @@ -1732,75 +1663,75 @@ void QtVariantPropertyManager::setAttribute(QtProperty *property, QtAbstractPropertyManager *manager = internProp->propertyManager(); if (QtIntPropertyManager *intManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - intManager->setMaximum(internProp, qVariantValue(value)); + intManager->setMaximum(internProp, qvariant_cast(value)); else if (attribute == d_ptr->m_minimumAttribute) - intManager->setMinimum(internProp, qVariantValue(value)); + intManager->setMinimum(internProp, qvariant_cast(value)); else if (attribute == d_ptr->m_singleStepAttribute) - intManager->setSingleStep(internProp, qVariantValue(value)); + intManager->setSingleStep(internProp, qvariant_cast(value)); return; } else if (QtDoublePropertyManager *doubleManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - doubleManager->setMaximum(internProp, qVariantValue(value)); + doubleManager->setMaximum(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_minimumAttribute) - doubleManager->setMinimum(internProp, qVariantValue(value)); + doubleManager->setMinimum(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_singleStepAttribute) - doubleManager->setSingleStep(internProp, qVariantValue(value)); + doubleManager->setSingleStep(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_decimalsAttribute) - doubleManager->setDecimals(internProp, qVariantValue(value)); + doubleManager->setDecimals(internProp, qvariant_cast(value)); return; } else if (QtStringPropertyManager *stringManager = qobject_cast(manager)) { if (attribute == d_ptr->m_regExpAttribute) - stringManager->setRegExp(internProp, qVariantValue(value)); + stringManager->setRegExp(internProp, qvariant_cast(value)); return; } else if (QtDatePropertyManager *dateManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - dateManager->setMaximum(internProp, qVariantValue(value)); + dateManager->setMaximum(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_minimumAttribute) - dateManager->setMinimum(internProp, qVariantValue(value)); + dateManager->setMinimum(internProp, qvariant_cast(value)); return; } else if (QtPointFPropertyManager *pointFManager = qobject_cast(manager)) { if (attribute == d_ptr->m_decimalsAttribute) - pointFManager->setDecimals(internProp, qVariantValue(value)); + pointFManager->setDecimals(internProp, qvariant_cast(value)); return; } else if (QtSizePropertyManager *sizeManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - sizeManager->setMaximum(internProp, qVariantValue(value)); + sizeManager->setMaximum(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_minimumAttribute) - sizeManager->setMinimum(internProp, qVariantValue(value)); + sizeManager->setMinimum(internProp, qvariant_cast(value)); return; } else if (QtSizeFPropertyManager *sizeFManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - sizeFManager->setMaximum(internProp, qVariantValue(value)); + sizeFManager->setMaximum(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_minimumAttribute) - sizeFManager->setMinimum(internProp, qVariantValue(value)); + sizeFManager->setMinimum(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_decimalsAttribute) - sizeFManager->setDecimals(internProp, qVariantValue(value)); + sizeFManager->setDecimals(internProp, qvariant_cast(value)); return; } else if (QtRectPropertyManager *rectManager = qobject_cast(manager)) { if (attribute == d_ptr->m_constraintAttribute) - rectManager->setConstraint(internProp, qVariantValue(value)); + rectManager->setConstraint(internProp, qvariant_cast(value)); return; } else if (QtRectFPropertyManager *rectFManager = qobject_cast(manager)) { if (attribute == d_ptr->m_constraintAttribute) - rectFManager->setConstraint(internProp, qVariantValue(value)); + rectFManager->setConstraint(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_decimalsAttribute) - rectFManager->setDecimals(internProp, qVariantValue(value)); + rectFManager->setDecimals(internProp, qvariant_cast(value)); return; } else if (QtEnumPropertyManager *enumManager = qobject_cast(manager)) { if (attribute == d_ptr->m_enumNamesAttribute) - enumManager->setEnumNames(internProp, qVariantValue(value)); + enumManager->setEnumNames(internProp, qvariant_cast(value)); if (attribute == d_ptr->m_enumIconsAttribute) - enumManager->setEnumIcons(internProp, qVariantValue(value)); + enumManager->setEnumIcons(internProp, qvariant_cast(value)); return; } else if (QtFlagPropertyManager *flagManager = qobject_cast(manager)) { if (attribute == d_ptr->m_flagNamesAttribute) - flagManager->setFlagNames(internProp, qVariantValue(value)); + flagManager->setFlagNames(internProp, qvariant_cast(value)); return; } } /*! - \reimp + \internal */ bool QtVariantPropertyManager::hasValue(const QtProperty *property) const { @@ -1810,7 +1741,7 @@ bool QtVariantPropertyManager::hasValue(const QtProperty *property) const } /*! - \reimp + \internal */ QString QtVariantPropertyManager::valueText(const QtProperty *property) const { @@ -1819,7 +1750,7 @@ QString QtVariantPropertyManager::valueText(const QtProperty *property) const } /*! - \reimp + \internal */ QIcon QtVariantPropertyManager::valueIcon(const QtProperty *property) const { @@ -1828,7 +1759,7 @@ QIcon QtVariantPropertyManager::valueIcon(const QtProperty *property) const } /*! - \reimp + \internal */ void QtVariantPropertyManager::initializeProperty(QtProperty *property) { @@ -1859,7 +1790,7 @@ void QtVariantPropertyManager::initializeProperty(QtProperty *property) } /*! - \reimp + \internal */ void QtVariantPropertyManager::uninitializeProperty(QtProperty *property) { @@ -1882,7 +1813,7 @@ void QtVariantPropertyManager::uninitializeProperty(QtProperty *property) } /*! - \reimp + \internal */ QtProperty *QtVariantPropertyManager::createProperty() { @@ -1923,6 +1854,9 @@ class QtVariantEditorFactoryPrivate /*! \class QtVariantEditorFactory + \internal + \inmodule QtDesigner + \since 4.4 \brief The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager objects. @@ -1932,41 +1866,41 @@ class QtVariantEditorFactoryPrivate \table \header - \o Property Type - \o Widget + \li Property Type + \li Widget \row - \o \c int - \o QSpinBox + \li \c int + \li QSpinBox \row - \o \c double - \o QDoubleSpinBox + \li \c double + \li QDoubleSpinBox \row - \o \c bool - \o QCheckBox + \li \c bool + \li QCheckBox \row - \o QString - \o QLineEdit + \li QString + \li QLineEdit \row - \o QDate - \o QDateEdit + \li QDate + \li QDateEdit \row - \o QTime - \o QTimeEdit + \li QTime + \li QTimeEdit \row - \o QDateTime - \o QDateTimeEdit + \li QDateTime + \li QDateTimeEdit \row - \o QKeySequence - \o customized editor + \li QKeySequence + \li customized editor \row - \o QChar - \o customized editor + \li QChar + \li customized editor \row - \o \c enum - \o QComboBox + \li \c enum + \li QComboBox \row - \o QCursor - \o QComboBox + \li QCursor + \li QComboBox \endtable Note that QtVariantPropertyManager supports several additional property @@ -1982,9 +1916,8 @@ class QtVariantEditorFactoryPrivate Creates a factory with the given \a parent. */ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent) + : QtAbstractEditorFactory(parent), d_ptr(new QtVariantEditorFactoryPrivate()) { - d_ptr = new QtVariantEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_spinBoxFactory = new QtSpinBoxFactory(this); @@ -2046,7 +1979,6 @@ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) */ QtVariantEditorFactory::~QtVariantEditorFactory() { - delete d_ptr; } /*! @@ -2056,87 +1988,87 @@ QtVariantEditorFactory::~QtVariantEditorFactory() */ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *manager) { - QList intPropertyManagers = qFindChildren(manager); + QList intPropertyManagers = manager->findChildren(); QListIterator itInt(intPropertyManagers); while (itInt.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itInt.next()); - QList doublePropertyManagers = qFindChildren(manager); + QList doublePropertyManagers = manager->findChildren(); QListIterator itDouble(doublePropertyManagers); while (itDouble.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itDouble.next()); - QList boolPropertyManagers = qFindChildren(manager); + QList boolPropertyManagers = manager->findChildren(); QListIterator itBool(boolPropertyManagers); while (itBool.hasNext()) d_ptr->m_checkBoxFactory->addPropertyManager(itBool.next()); - QList stringPropertyManagers = qFindChildren(manager); + QList stringPropertyManagers = manager->findChildren(); QListIterator itString(stringPropertyManagers); while (itString.hasNext()) d_ptr->m_lineEditFactory->addPropertyManager(itString.next()); - QList datePropertyManagers = qFindChildren(manager); + QList datePropertyManagers = manager->findChildren(); QListIterator itDate(datePropertyManagers); while (itDate.hasNext()) d_ptr->m_dateEditFactory->addPropertyManager(itDate.next()); - QList timePropertyManagers = qFindChildren(manager); + QList timePropertyManagers = manager->findChildren(); QListIterator itTime(timePropertyManagers); while (itTime.hasNext()) d_ptr->m_timeEditFactory->addPropertyManager(itTime.next()); - QList dateTimePropertyManagers = qFindChildren(manager); + QList dateTimePropertyManagers = manager->findChildren(); QListIterator itDateTime(dateTimePropertyManagers); while (itDateTime.hasNext()) d_ptr->m_dateTimeEditFactory->addPropertyManager(itDateTime.next()); - QList keySequencePropertyManagers = qFindChildren(manager); + QList keySequencePropertyManagers = manager->findChildren(); QListIterator itKeySequence(keySequencePropertyManagers); while (itKeySequence.hasNext()) d_ptr->m_keySequenceEditorFactory->addPropertyManager(itKeySequence.next()); - QList charPropertyManagers = qFindChildren(manager); + QList charPropertyManagers = manager->findChildren(); QListIterator itChar(charPropertyManagers); while (itChar.hasNext()) d_ptr->m_charEditorFactory->addPropertyManager(itChar.next()); - QList localePropertyManagers = qFindChildren(manager); + QList localePropertyManagers = manager->findChildren(); QListIterator itLocale(localePropertyManagers); while (itLocale.hasNext()) d_ptr->m_comboBoxFactory->addPropertyManager(itLocale.next()->subEnumPropertyManager()); - QList pointPropertyManagers = qFindChildren(manager); + QList pointPropertyManagers = manager->findChildren(); QListIterator itPoint(pointPropertyManagers); while (itPoint.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itPoint.next()->subIntPropertyManager()); - QList pointFPropertyManagers = qFindChildren(manager); + QList pointFPropertyManagers = manager->findChildren(); QListIterator itPointF(pointFPropertyManagers); while (itPointF.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itPointF.next()->subDoublePropertyManager()); - QList sizePropertyManagers = qFindChildren(manager); + QList sizePropertyManagers = manager->findChildren(); QListIterator itSize(sizePropertyManagers); while (itSize.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itSize.next()->subIntPropertyManager()); - QList sizeFPropertyManagers = qFindChildren(manager); + QList sizeFPropertyManagers = manager->findChildren(); QListIterator itSizeF(sizeFPropertyManagers); while (itSizeF.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itSizeF.next()->subDoublePropertyManager()); - QList rectPropertyManagers = qFindChildren(manager); + QList rectPropertyManagers = manager->findChildren(); QListIterator itRect(rectPropertyManagers); while (itRect.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itRect.next()->subIntPropertyManager()); - QList rectFPropertyManagers = qFindChildren(manager); + QList rectFPropertyManagers = manager->findChildren(); QListIterator itRectF(rectFPropertyManagers); while (itRectF.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itRectF.next()->subDoublePropertyManager()); - QList colorPropertyManagers = qFindChildren(manager); + QList colorPropertyManagers = manager->findChildren(); QListIterator itColor(colorPropertyManagers); while (itColor.hasNext()) { QtColorPropertyManager *manager = itColor.next(); @@ -2144,12 +2076,12 @@ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *ma d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager()); } - QList enumPropertyManagers = qFindChildren(manager); + QList enumPropertyManagers = manager->findChildren(); QListIterator itEnum(enumPropertyManagers); while (itEnum.hasNext()) d_ptr->m_comboBoxFactory->addPropertyManager(itEnum.next()); - QList sizePolicyPropertyManagers = qFindChildren(manager); + QList sizePolicyPropertyManagers = manager->findChildren(); QListIterator itSizePolicy(sizePolicyPropertyManagers); while (itSizePolicy.hasNext()) { QtSizePolicyPropertyManager *manager = itSizePolicy.next(); @@ -2157,7 +2089,7 @@ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *ma d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager()); } - QList fontPropertyManagers = qFindChildren(manager); + QList fontPropertyManagers = manager->findChildren(); QListIterator itFont(fontPropertyManagers); while (itFont.hasNext()) { QtFontPropertyManager *manager = itFont.next(); @@ -2167,12 +2099,12 @@ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *ma d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager()); } - QList cursorPropertyManagers = qFindChildren(manager); + QList cursorPropertyManagers = manager->findChildren(); QListIterator itCursor(cursorPropertyManagers); while (itCursor.hasNext()) d_ptr->m_cursorEditorFactory->addPropertyManager(itCursor.next()); - QList flagPropertyManagers = qFindChildren(manager); + QList flagPropertyManagers = manager->findChildren(); QListIterator itFlag(flagPropertyManagers); while (itFlag.hasNext()) d_ptr->m_checkBoxFactory->addPropertyManager(itFlag.next()->subBoolPropertyManager()); @@ -2200,87 +2132,87 @@ QWidget *QtVariantEditorFactory::createEditor(QtVariantPropertyManager *manager, */ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager *manager) { - QList intPropertyManagers = qFindChildren(manager); + QList intPropertyManagers = manager->findChildren(); QListIterator itInt(intPropertyManagers); while (itInt.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itInt.next()); - QList doublePropertyManagers = qFindChildren(manager); + QList doublePropertyManagers = manager->findChildren(); QListIterator itDouble(doublePropertyManagers); while (itDouble.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itDouble.next()); - QList boolPropertyManagers = qFindChildren(manager); + QList boolPropertyManagers = manager->findChildren(); QListIterator itBool(boolPropertyManagers); while (itBool.hasNext()) d_ptr->m_checkBoxFactory->removePropertyManager(itBool.next()); - QList stringPropertyManagers = qFindChildren(manager); + QList stringPropertyManagers = manager->findChildren(); QListIterator itString(stringPropertyManagers); while (itString.hasNext()) d_ptr->m_lineEditFactory->removePropertyManager(itString.next()); - QList datePropertyManagers = qFindChildren(manager); + QList datePropertyManagers = manager->findChildren(); QListIterator itDate(datePropertyManagers); while (itDate.hasNext()) d_ptr->m_dateEditFactory->removePropertyManager(itDate.next()); - QList timePropertyManagers = qFindChildren(manager); + QList timePropertyManagers = manager->findChildren(); QListIterator itTime(timePropertyManagers); while (itTime.hasNext()) d_ptr->m_timeEditFactory->removePropertyManager(itTime.next()); - QList dateTimePropertyManagers = qFindChildren(manager); + QList dateTimePropertyManagers = manager->findChildren(); QListIterator itDateTime(dateTimePropertyManagers); while (itDateTime.hasNext()) d_ptr->m_dateTimeEditFactory->removePropertyManager(itDateTime.next()); - QList keySequencePropertyManagers = qFindChildren(manager); + QList keySequencePropertyManagers = manager->findChildren(); QListIterator itKeySequence(keySequencePropertyManagers); while (itKeySequence.hasNext()) d_ptr->m_keySequenceEditorFactory->removePropertyManager(itKeySequence.next()); - QList charPropertyManagers = qFindChildren(manager); + QList charPropertyManagers = manager->findChildren(); QListIterator itChar(charPropertyManagers); while (itChar.hasNext()) d_ptr->m_charEditorFactory->removePropertyManager(itChar.next()); - QList localePropertyManagers = qFindChildren(manager); + QList localePropertyManagers = manager->findChildren(); QListIterator itLocale(localePropertyManagers); while (itLocale.hasNext()) d_ptr->m_comboBoxFactory->removePropertyManager(itLocale.next()->subEnumPropertyManager()); - QList pointPropertyManagers = qFindChildren(manager); + QList pointPropertyManagers = manager->findChildren(); QListIterator itPoint(pointPropertyManagers); while (itPoint.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itPoint.next()->subIntPropertyManager()); - QList pointFPropertyManagers = qFindChildren(manager); + QList pointFPropertyManagers = manager->findChildren(); QListIterator itPointF(pointFPropertyManagers); while (itPointF.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itPointF.next()->subDoublePropertyManager()); - QList sizePropertyManagers = qFindChildren(manager); + QList sizePropertyManagers = manager->findChildren(); QListIterator itSize(sizePropertyManagers); while (itSize.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itSize.next()->subIntPropertyManager()); - QList sizeFPropertyManagers = qFindChildren(manager); + QList sizeFPropertyManagers = manager->findChildren(); QListIterator itSizeF(sizeFPropertyManagers); while (itSizeF.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itSizeF.next()->subDoublePropertyManager()); - QList rectPropertyManagers = qFindChildren(manager); + QList rectPropertyManagers = manager->findChildren(); QListIterator itRect(rectPropertyManagers); while (itRect.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itRect.next()->subIntPropertyManager()); - QList rectFPropertyManagers = qFindChildren(manager); + QList rectFPropertyManagers = manager->findChildren(); QListIterator itRectF(rectFPropertyManagers); while (itRectF.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itRectF.next()->subDoublePropertyManager()); - QList colorPropertyManagers = qFindChildren(manager); + QList colorPropertyManagers = manager->findChildren(); QListIterator itColor(colorPropertyManagers); while (itColor.hasNext()) { QtColorPropertyManager *manager = itColor.next(); @@ -2288,12 +2220,12 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager()); } - QList enumPropertyManagers = qFindChildren(manager); + QList enumPropertyManagers = manager->findChildren(); QListIterator itEnum(enumPropertyManagers); while (itEnum.hasNext()) d_ptr->m_comboBoxFactory->removePropertyManager(itEnum.next()); - QList sizePolicyPropertyManagers = qFindChildren(manager); + QList sizePolicyPropertyManagers = manager->findChildren(); QListIterator itSizePolicy(sizePolicyPropertyManagers); while (itSizePolicy.hasNext()) { QtSizePolicyPropertyManager *manager = itSizePolicy.next(); @@ -2301,7 +2233,7 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager()); } - QList fontPropertyManagers = qFindChildren(manager); + QList fontPropertyManagers = manager->findChildren(); QListIterator itFont(fontPropertyManagers); while (itFont.hasNext()) { QtFontPropertyManager *manager = itFont.next(); @@ -2311,19 +2243,17 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager()); } - QList cursorPropertyManagers = qFindChildren(manager); + QList cursorPropertyManagers = manager->findChildren(); QListIterator itCursor(cursorPropertyManagers); while (itCursor.hasNext()) d_ptr->m_cursorEditorFactory->removePropertyManager(itCursor.next()); - QList flagPropertyManagers = qFindChildren(manager); + QList flagPropertyManagers = manager->findChildren(); QListIterator itFlag(flagPropertyManagers); while (itFlag.hasNext()) d_ptr->m_checkBoxFactory->removePropertyManager(itFlag.next()->subBoolPropertyManager()); } -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif -#include "moc_qtvariantproperty.cxx" +#include "moc_qtvariantproperty.cpp" diff --git a/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.h b/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.h similarity index 59% rename from studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.h rename to studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.h index 9f20d3dd41..18220abedd 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.h +++ b/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.h @@ -1,86 +1,32 @@ /**************************************************************************** ** -** This file is part of a Qt Solutions component. -** -** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Solutions Commercial License Agreement provided -** with the Software or, alternatively, in accordance with the terms -** contained in a written agreement between you and Nokia. -** -** GNU Lesser General Public License Usage -** Alternatively, 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. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** Please note Third Party Software included with Qt Solutions may impose -** additional restrictions and it is the user's responsibility to ensure -** that they have met the licensing requirements of the GPL, LGPL, or Qt -** Solutions Commercial license and the relevant license of the Third -** Party Software they are using. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** -****************************************************************************/ - -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, 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. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -88,20 +34,19 @@ #ifndef QTVARIANTPROPERTY_H #define QTVARIANTPROPERTY_H +#include "qtpropertybrowser_export.h" #include "qtpropertybrowser.h" + #include #include -#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE -#endif typedef QMap QtIconMap; class QtVariantPropertyManager; -class QtVariantPropertyPrivate; -class QT_QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty +class QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty { public: ~QtVariantProperty(); @@ -116,12 +61,10 @@ class QT_QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty QtVariantProperty(QtVariantPropertyManager *manager); private: friend class QtVariantPropertyManager; - QtVariantPropertyPrivate *d_ptr; + QScopedPointer d_ptr; }; -class QtVariantPropertyManagerPrivate; - -class QT_QTPROPERTYBROWSER_EXPORT QtVariantPropertyManager : public QtAbstractPropertyManager +class QTPROPERTYBROWSER_EXPORT QtVariantPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -162,7 +105,7 @@ public Q_SLOTS: virtual void uninitializeProperty(QtProperty *property); virtual QtProperty *createProperty(); private: - QtVariantPropertyManagerPrivate *d_ptr; + QScopedPointer d_ptr; Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int)) Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int)) @@ -204,9 +147,7 @@ public Q_SLOTS: Q_DISABLE_COPY(QtVariantPropertyManager) }; -class QtVariantEditorFactoryPrivate; - -class QT_QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorFactory +class QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -218,14 +159,12 @@ class QT_QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEdit QWidget *parent); void disconnectPropertyManager(QtVariantPropertyManager *manager); private: - QtVariantEditorFactoryPrivate *d_ptr; + QScopedPointer d_ptr; Q_DECLARE_PRIVATE(QtVariantEditorFactory) Q_DISABLE_COPY(QtVariantEditorFactory) }; -#if QT_VERSION >= 0x040400 QT_END_NAMESPACE -#endif Q_DECLARE_METATYPE(QIcon) Q_DECLARE_METATYPE(QtIconMap) diff --git a/studio/src/CMakeLists.txt b/studio/src/CMakeLists.txt index b7831cc925..81c3eee110 100644 --- a/studio/src/CMakeLists.txt +++ b/studio/src/CMakeLists.txt @@ -54,7 +54,7 @@ ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${QT_DEFINITIONS}) NL_DEFAULT_PROPS(studio "Tools: Studio") NL_ADD_RUNTIME_FLAGS(studio) -ADD_SUBDIRECTORY(libqtpropertybrowser) +ADD_SUBDIRECTORY(libqtpropertybrowser-text) ADD_SUBDIRECTORY(plugins) add_dependencies(studio diff --git a/studio/src/libqtpropertybrowser-text/CMakeLists.txt b/studio/src/libqtpropertybrowser-text/CMakeLists.txt new file mode 100644 index 0000000000..da6df91728 --- /dev/null +++ b/studio/src/libqtpropertybrowser-text/CMakeLists.txt @@ -0,0 +1,30 @@ +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +set(CMAKE_AUTOMOC ON) + +set(SRC + libqtpropertybrowser-text/QtTextEditorFactory.cpp + libqtpropertybrowser-text/QtTextEditWidget.cpp + libqtpropertybrowser-text/QtTextPropertyManager.cpp +) + +SOURCE_GROUP("" FILES ${SRC}) + +ADD_LIBRARY(QtPropertyBrowserText ${SRC}) + +ADD_LIBRARY(QtPropertyBrowser::Text ALIAS QtPropertyBrowserText) + +TARGET_LINK_LIBRARIES(QtPropertyBrowserText ${QT_LIBRARIES} ${QtPropertyBrowser_LIBRARY}) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR} + ${QT_INCLUDES} + ${QtPropertyBrowser_INCLUDE_DIR} +) + +TARGET_INCLUDE_DIRECTORIES(QtPropertyBrowserText + INTERFACE + $ + $ +) diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp similarity index 98% rename from studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp rename to studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp index 6832787cc2..10267c23a4 100644 --- a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.cpp +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #if defined(Q_CC_MSVC) # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.h similarity index 100% rename from studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditWidget.h rename to studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditWidget.h diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp similarity index 96% rename from studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp rename to studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp index 898eff4288..30245399f3 100644 --- a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.cpp +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.cpp @@ -1,5 +1,4 @@ -#include -#include +#include #if defined(Q_CC_MSVC) #pragma warning(disable : 4786) /* MS VS 6: truncating debug info after 255 characters */ diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h similarity index 90% rename from studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h rename to studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h index b13729da4a..88f27eb796 100644 --- a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextEditorFactory.h +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextEditorFactory.h @@ -1,8 +1,8 @@ #ifndef LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H #define LIBQTPROPERTYMANAGER_TEXT_EDITOR_FACTORY_H -#include -#include +#include +#include #if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp similarity index 89% rename from studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp rename to studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp index cb40b8c104..a46b7d7b60 100644 --- a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.cpp +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.cpp @@ -1,4 +1,4 @@ -#include +#include #if defined(Q_CC_MSVC) # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ diff --git a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h similarity index 71% rename from studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h rename to studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h index a0abc1d1ee..4e662fe4bc 100644 --- a/studio/src/libqtpropertybrowser/libqtpropertybrowser/QtTextPropertyManager.h +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h @@ -1,5 +1,5 @@ -#ifndef LIBQTPROPERTYMANAGER_TEXT_PROPERTY_MANAGER_H -#define LIBQTPROPERTYMANAGER_TEXT_PROPERTY_MANAGER_H +#ifndef LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H +#define LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H #include @@ -22,4 +22,4 @@ class QT_QTPROPERTYBROWSER_EXPORT QtTextPropertyManager : public QtStringPropert QT_END_NAMESPACE #endif -#endif // LIBQTPROPERTYMANAGER_TEXT_PROPERTY_MANAGER_H +#endif // LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H diff --git a/studio/src/libqtpropertybrowser/CMakeLists.txt b/studio/src/libqtpropertybrowser/CMakeLists.txt deleted file mode 100644 index de0cf85e6a..0000000000 --- a/studio/src/libqtpropertybrowser/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -FIND_PACKAGE(QtPropertyBrowser REQUIRED) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -set(CMAKE_AUTOMOC ON) - -FILE(GLOB SRC libqtpropertybrowser/*.cpp) - -SOURCE_GROUP("" FILES ${SRC}) - -ADD_LIBRARY(qtpropertybrowser ${SRC}) - -ADD_LIBRARY(qtpropertybrowser::qtpropertybrowser ALIAS qtpropertybrowser) - -TARGET_LINK_LIBRARIES(qtpropertybrowser ${QT_LIBRARIES} ${QtPropertyBrowser_LIBRARY}) - -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR} - ${QT_INCLUDES} - ${QtPropertyBrowser_INCLUDE_DIR} -) - -TARGET_INCLUDE_DIRECTORIES(qtpropertybrowser - INTERFACE - $ - $ -) diff --git a/studio/src/plugins/world_editor/CMakeLists.txt b/studio/src/plugins/world_editor/CMakeLists.txt index 7f7e8ec27b..ad0c8914f0 100644 --- a/studio/src/plugins/world_editor/CMakeLists.txt +++ b/studio/src/plugins/world_editor/CMakeLists.txt @@ -57,9 +57,9 @@ TARGET_LINK_LIBRARIES( studio_plugin_world_editor studio_plugin_landscape_editor nelmisc nel3d - qtpropertybrowser ${QtPropertyBrowser_LIBRARY} - ${QT_LIBRARIES} + QtPropertyBrowser::Text + ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${LIBXML2_LIBRARIES} ) diff --git a/studio/src/plugins/world_editor/property_editor_widget.cpp b/studio/src/plugins/world_editor/property_editor_widget.cpp index b65ed6f514..93ae8faf4e 100644 --- a/studio/src/plugins/world_editor/property_editor_widget.cpp +++ b/studio/src/plugins/world_editor/property_editor_widget.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "const_string_array_property.h" diff --git a/studio/src/plugins/world_editor/property_editor_widget.h b/studio/src/plugins/world_editor/property_editor_widget.h index b1b82aa46c..795fe9126f 100644 --- a/studio/src/plugins/world_editor/property_editor_widget.h +++ b/studio/src/plugins/world_editor/property_editor_widget.h @@ -30,7 +30,7 @@ // 3rdparty #include #include -#include +#include // NeL includes From 2580f836c30400f9d46286dd4548cf3a6f6c0fbc Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 18:23:22 +0100 Subject: [PATCH 21/28] build studio --- .github/workflows/build-studio.yml | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/build-studio.yml diff --git a/.github/workflows/build-studio.yml b/.github/workflows/build-studio.yml new file mode 100644 index 0000000000..0b3a6f1301 --- /dev/null +++ b/.github/workflows/build-studio.yml @@ -0,0 +1,57 @@ +name: build studio + +on: + push: + branches: [ "core4", "feature/*" ] + pull_request: + branches: [ "core4" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Dependencies + run: | + sudo apt update + sudo apt install --yes software-properties-common + sudo apt update + sudo apt install --yes \ + cmake build-essential ninja-build ccache \ + bison autoconf automake \ + libpng-dev \ + libjpeg-dev \ + libgif-dev libfreetype6-dev \ + freeglut3-dev \ + liblua5.2-dev libluabind-dev libcpptest-dev \ + libogg-dev libvorbis-dev libopenal-dev \ + libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev \ + libmysqlclient-dev \ + libxml2-dev \ + libcurl4-openssl-dev libssl-dev \ + libsquish-dev \ + liblzma-dev \ + libgsf-1-dev \ + qtbase5-dev qttools5-dev qttools5-dev-tools + + - name: Configure CMake + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -G "Ninja" + -DWITH_QT5=ON + -DWITH_STUDIO=ON + -DWITH_RYZOM=OFF + -DWITH_NEL_TOOLS=OFF + -DWITH_NEL_SAMPLES=OFF + -DWITH_NEL_TESTS=OFF + -S ${{ github.workspace }} + + - name: Build + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} From 715fc83773bfd094556ebd5a0ab52aa38ef41a17 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 19:41:52 +0100 Subject: [PATCH 22/28] add include directory for qtpropertybrowser library --- studio/src/3rdparty/CMakeLists.txt | 6 ++++++ studio/src/plugins/georges_editor/CMakeLists.txt | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/studio/src/3rdparty/CMakeLists.txt b/studio/src/3rdparty/CMakeLists.txt index 8d87f50b7c..fe1a29074c 100644 --- a/studio/src/3rdparty/CMakeLists.txt +++ b/studio/src/3rdparty/CMakeLists.txt @@ -1,3 +1,9 @@ ADD_SUBDIRECTORY(qtpropertybrowser) SET(QtPropertyBrowser_LIBRARY "QtPropertyBrowser") + +target_include_directories(QtPropertyBrowser + INTERFACE + $ + $ +) diff --git a/studio/src/plugins/georges_editor/CMakeLists.txt b/studio/src/plugins/georges_editor/CMakeLists.txt index 7e9ce571ea..015eafa770 100644 --- a/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/studio/src/plugins/georges_editor/CMakeLists.txt @@ -1,5 +1,3 @@ -FIND_PACKAGE(QtPropertyBrowser REQUIRED) - INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} From 8aea06606e5cc1ca9de1e16079ea45efe2585cb3 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 19:52:57 +0100 Subject: [PATCH 23/28] adjust import path --- .../libqtpropertybrowser-text/QtTextPropertyManager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h index 4e662fe4bc..e6585b203a 100644 --- a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h @@ -1,7 +1,7 @@ #ifndef LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H #define LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H -#include +#include #if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE From 79a0e0c25599365a8a6b045204c0af2344a84210 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 21:59:26 +0100 Subject: [PATCH 24/28] Revert "adjust import path" This reverts commit 8aea06606e5cc1ca9de1e16079ea45efe2585cb3. --- .../libqtpropertybrowser-text/QtTextPropertyManager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h index e6585b203a..4e662fe4bc 100644 --- a/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h +++ b/studio/src/libqtpropertybrowser-text/libqtpropertybrowser-text/QtTextPropertyManager.h @@ -1,7 +1,7 @@ #ifndef LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H #define LIBQTPROPERTYMANAGER_TEXT_TEXT_PROPERTY_MANAGER_H -#include +#include #if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE From 01f1421d07e8525881ce4db4e4a3e89e73a2e8d0 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 21:59:45 +0100 Subject: [PATCH 25/28] Revert "add include directory for qtpropertybrowser library" This reverts commit 715fc83773bfd094556ebd5a0ab52aa38ef41a17. --- studio/src/3rdparty/CMakeLists.txt | 6 ------ studio/src/plugins/georges_editor/CMakeLists.txt | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/studio/src/3rdparty/CMakeLists.txt b/studio/src/3rdparty/CMakeLists.txt index fe1a29074c..8d87f50b7c 100644 --- a/studio/src/3rdparty/CMakeLists.txt +++ b/studio/src/3rdparty/CMakeLists.txt @@ -1,9 +1,3 @@ ADD_SUBDIRECTORY(qtpropertybrowser) SET(QtPropertyBrowser_LIBRARY "QtPropertyBrowser") - -target_include_directories(QtPropertyBrowser - INTERFACE - $ - $ -) diff --git a/studio/src/plugins/georges_editor/CMakeLists.txt b/studio/src/plugins/georges_editor/CMakeLists.txt index 015eafa770..7e9ce571ea 100644 --- a/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/studio/src/plugins/georges_editor/CMakeLists.txt @@ -1,3 +1,5 @@ +FIND_PACKAGE(QtPropertyBrowser REQUIRED) + INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES} From 4085457903dae955dd1436a961555f7ebb2f5de3 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 29 Jan 2024 22:01:02 +0100 Subject: [PATCH 26/28] install libqtroppertybrowser lib --- .github/workflows/build-studio.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-studio.yml b/.github/workflows/build-studio.yml index 0b3a6f1301..657db95337 100644 --- a/.github/workflows/build-studio.yml +++ b/.github/workflows/build-studio.yml @@ -39,7 +39,7 @@ jobs: libsquish-dev \ liblzma-dev \ libgsf-1-dev \ - qtbase5-dev qttools5-dev qttools5-dev-tools + qtbase5-dev qttools5-dev qttools5-dev-tools libqtpropertybrowser-dev - name: Configure CMake run: > From ddc4a513d7120d9fc91970c1022a16cc1af15d92 Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Wed, 31 Jan 2024 17:39:47 +0100 Subject: [PATCH 27/28] limit target to studio --- .github/workflows/build-studio.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-studio.yml b/.github/workflows/build-studio.yml index 657db95337..fff2ed94e6 100644 --- a/.github/workflows/build-studio.yml +++ b/.github/workflows/build-studio.yml @@ -54,4 +54,4 @@ jobs: -S ${{ github.workspace }} - name: Build - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target studio From bc1409ae9a70f19ae81c53521d5f61733397cddc Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Sun, 4 Feb 2024 12:39:37 +0100 Subject: [PATCH 28/28] use libqtpropertybrowser for studio compilation --- studio/src/3rdparty/CMakeLists.txt | 2 - .../3rdparty/qtpropertybrowser/CMakeLists.txt | 176 +- .../qtpropertybrowser/LGPL_EXCEPTION.txt | 10 + .../3rdparty/qtpropertybrowser/LICENSE.GPL3 | 674 ++++++++ .../3rdparty/qtpropertybrowser/LICENSE.LGPL | 504 ++++++ .../{include => }/QtAbstractEditorFactoryBase | 0 .../{include => }/QtAbstractPropertyBrowser | 0 .../{include => }/QtAbstractPropertyManager | 0 .../{include => }/QtBoolPropertyManager | 0 .../{include => }/QtBrowserItem | 0 .../{include => }/QtButtonPropertyBrowser | 0 .../{include => }/QtCharEditorFactory | 0 .../{include => }/QtCharPropertyManager | 0 .../{include => }/QtCheckBoxFactory | 0 .../{include => }/QtColorEditorFactory | 0 .../{include => }/QtColorPropertyManager | 0 .../{include => }/QtCursorEditorFactory | 0 .../{include => }/QtCursorPropertyManager | 0 .../{include => }/QtDateEditFactory | 0 .../{include => }/QtDatePropertyManager | 0 .../{include => }/QtDateTimeEditFactory | 0 .../{include => }/QtDateTimePropertyManager | 0 .../{include => }/QtDoublePropertyManager | 0 .../{include => }/QtDoubleSpinBoxFactory | 0 .../{include => }/QtEnumEditorFactory | 0 .../{include => }/QtEnumPropertyManager | 0 .../{include => }/QtFlagPropertyManager | 0 .../{include => }/QtFontEditorFactory | 0 .../{include => }/QtFontPropertyManager | 0 .../{include => }/QtGroupBoxPropertyBrowser | 0 .../{include => }/QtGroupPropertyManager | 0 .../{include => }/QtIntPropertyManager | 0 .../{include => }/QtKeySequenceEditorFactory | 0 .../QtKeySequencePropertyManager | 0 .../{include => }/QtLineEditFactory | 0 .../{include => }/QtLocalePropertyManager | 0 .../{include => }/QtPointFPropertyManager | 0 .../{include => }/QtPointPropertyManager | 0 .../{include => }/QtProperty | 0 .../{include => }/QtRectFPropertyManager | 0 .../{include => }/QtRectPropertyManager | 0 .../{include => }/QtScrollBarFactory | 0 .../{include => }/QtSizeFPropertyManager | 0 .../{include => }/QtSizePolicyPropertyManager | 0 .../{include => }/QtSizePropertyManager | 0 .../{include => }/QtSliderFactory | 0 .../{include => }/QtSpinBoxFactory | 0 .../{include => }/QtStringPropertyManager | 0 .../{include => }/QtTimeEditFactory | 0 .../{include => }/QtTimePropertyManager | 0 .../{include => }/QtTreePropertyBrowser | 0 .../{include => }/QtVariantEditorFactory | 0 .../{include => }/QtVariantProperty | 0 .../{include => }/QtVariantPropertyManager | 0 .../src/3rdparty/qtpropertybrowser/README.TXT | 19 + .../src/3rdparty/qtpropertybrowser/README.md | 73 - .../cmake/FindQtPropertyBrowser.cmake | 43 - .../qtpropertybrowser/doxygen/Doxyfile.in | 1521 ----------------- .../qtpropertybrowser/doxygen/doxygen.cmake | 17 - .../examples/demo/CMakeLists.txt | 32 - .../qtpropertybrowser/examples/demo/demo.qrc | 8 - .../examples/demo/images/down.png | Bin 594 -> 0 bytes .../examples/demo/images/left.png | Bin 678 -> 0 bytes .../examples/demo/images/right.png | Bin 655 -> 0 bytes .../examples/demo/images/up.png | Bin 692 -> 0 bytes .../qtpropertybrowser/examples/demo/main.cpp | 216 --- .../images/resetproperty.png | Bin 0 -> 169 bytes .../{src => }/qtbuttonpropertybrowser.cpp | 116 +- .../qtbuttonpropertybrowser.h | 135 ++ .../{src => }/qteditorfactory.cpp | 990 ++++++++--- .../{src => }/qteditorfactory.h | 183 +- .../{src => }/qtgroupboxpropertybrowser.cpp | 114 +- .../qtgroupboxpropertybrowser.h | 126 ++ .../{src => }/qtpropertybrowser.cpp | 345 ++-- .../{src => }/qtpropertybrowser.h | 140 +- .../qtpropertybrowser/qtpropertybrowser.pri | 30 + .../qtpropertybrowser/qtpropertybrowser.qrc | 5 +- .../qtpropertybrowserutils.cpp | 492 ++++++ .../qtpropertybrowserutils_p.h | 211 +++ .../{src => }/qtpropertymanager.cpp | 654 +++---- .../{src => }/qtpropertymanager.h | 199 ++- .../{src => }/qttreepropertybrowser.cpp | 137 +- .../qtpropertybrowser/qttreepropertybrowser.h | 184 ++ .../{src => }/qtvariantproperty.cpp | 948 +++++----- .../{src => }/qtvariantproperty.h | 115 +- .../src/qtbuttonpropertybrowser.h | 78 - .../src/qtgroupboxpropertybrowser.h | 69 - .../src/qtpropertybrowserutils.cpp | 296 ---- .../src/qtpropertybrowserutils_p.h | 126 -- .../src/qttreepropertybrowser.h | 127 -- .../libqtpropertybrowser-text/CMakeLists.txt | 2 + 91 files changed, 5019 insertions(+), 4098 deletions(-) create mode 100644 studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt create mode 100644 studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 create mode 100644 studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtAbstractEditorFactoryBase (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtAbstractPropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtAbstractPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtBoolPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtBrowserItem (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtButtonPropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtCharEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtCharPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtCheckBoxFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtColorEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtColorPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtCursorEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtCursorPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtDateEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtDatePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtDateTimeEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtDateTimePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtDoublePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtDoubleSpinBoxFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtEnumEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtEnumPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtFlagPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtFontEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtFontPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtGroupBoxPropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtGroupPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtIntPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtKeySequenceEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtKeySequencePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtLineEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtLocalePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtPointFPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtPointPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtProperty (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtRectFPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtRectPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtScrollBarFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtSizeFPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtSizePolicyPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtSizePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtSliderFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtSpinBoxFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtStringPropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtTimeEditFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtTimePropertyManager (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtTreePropertyBrowser (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtVariantEditorFactory (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtVariantProperty (100%) rename studio/src/3rdparty/qtpropertybrowser/{include => }/QtVariantPropertyManager (100%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/README.TXT delete mode 100644 studio/src/3rdparty/qtpropertybrowser/README.md delete mode 100644 studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake delete mode 100644 studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in delete mode 100644 studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/down.png delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/left.png delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/right.png delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/images/up.png delete mode 100644 studio/src/3rdparty/qtpropertybrowser/examples/demo/main.cpp create mode 100644 studio/src/3rdparty/qtpropertybrowser/images/resetproperty.png rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtbuttonpropertybrowser.cpp (81%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{src => }/qteditorfactory.cpp (68%) rename studio/src/3rdparty/qtpropertybrowser/{src => }/qteditorfactory.h (62%) rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtgroupboxpropertybrowser.cpp (78%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtpropertybrowser.cpp (87%) rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtpropertybrowser.h (62%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri create mode 100644 studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp create mode 100644 studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtpropertymanager.cpp (93%) rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtpropertymanager.h (75%) rename studio/src/3rdparty/qtpropertybrowser/{src => }/qttreepropertybrowser.cpp (86%) create mode 100644 studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtvariantproperty.cpp (75%) rename studio/src/3rdparty/qtpropertybrowser/{src => }/qtvariantproperty.h (59%) delete mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h delete mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h delete mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp delete mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h delete mode 100644 studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h diff --git a/studio/src/3rdparty/CMakeLists.txt b/studio/src/3rdparty/CMakeLists.txt index 8d87f50b7c..2caaa1be78 100644 --- a/studio/src/3rdparty/CMakeLists.txt +++ b/studio/src/3rdparty/CMakeLists.txt @@ -1,3 +1 @@ ADD_SUBDIRECTORY(qtpropertybrowser) - -SET(QtPropertyBrowser_LIBRARY "QtPropertyBrowser") diff --git a/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt b/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt index 2194f24927..fa834dabfc 100644 --- a/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt +++ b/studio/src/3rdparty/qtpropertybrowser/CMakeLists.txt @@ -1,76 +1,100 @@ -cmake_minimum_required(VERSION 2.9) -project(QtPropertyBrowser) - -find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED) - -set(SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtbuttonpropertybrowser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qteditorfactory.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtgroupboxpropertybrowser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowserutils.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertymanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qttreepropertybrowser.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtvariantproperty.cpp -) -set(HEADER_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtbuttonpropertybrowser.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qteditorfactory.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtgroupboxpropertybrowser.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowser.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertybrowserutils_p.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtpropertymanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qttreepropertybrowser.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/qtvariantproperty.h -) - -set(QRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.qrc) - -source_group("Header Files" FILES ${HEADER_FILES}) -source_group("Source Files" FILES ${SOURCE_FILES}) - -set(CMAKE_AUTORCC ON) - -option(BUILD_SHARED_LIBS "Build shared library." ON) -option(BUILD_EXAMPLES "Build examples." OFF) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) -add_library(QtPropertyBrowser ${HEADER_FILES} ${SOURCE_FILES} ${QRC_FILES}) - -target_include_directories(QtPropertyBrowser PUBLIC - ${Qt5Core_INCLUDE_DIRS} - ${Qt5Gui_INCLUDE_DIRS} - ${Qt5Widgets_INCLUDE_DIRS} -) - -target_link_libraries(QtPropertyBrowser PUBLIC - ${Qt5Core_LIBRARIES} - ${Qt5Gui_LIBRARIES} - ${Qt5Widgets_LIBRARIES} -) - -set_target_properties(QtPropertyBrowser PROPERTIES AUTOMOC TRUE) - -if(BUILD_EXAMPLES) - add_subdirectory(examples/demo) -endif() - -include(GenerateExportHeader) -set(CMAKE_CXX_VISIBILITY_PRESET hidden) -set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) -generate_export_header(QtPropertyBrowser) - -install(TARGETS QtPropertyBrowser - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib -) -install(FILES ${HEADER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtPropertyBrowser) -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindQtPropertyBrowser.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qtpropertybrowser_export.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/QtPropertyBrowser) - - -option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF) -if(BUILD_DOCUMENTATION) - include(doxygen/doxygen.cmake) -endif() +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES}) +INCLUDE(${QT_USE_FILE}) + +FILE(GLOB SRC *.cpp *.h) + +SET(QT_PROPERTY_EDITOR_HDR qtpropertybrowser.h + qtpropertymanager.h + qteditorfactory.h + qtvariantproperty.h + qttreepropertybrowser.h + qtbuttonpropertybrowser.h + qtgroupboxpropertybrowser.h + qtpropertybrowserutils_p.h) + +SET(QT_PROPERTY_EDITOR_RCS qtpropertybrowser.qrc) + +SET(QT_USE_QTGUI TRUE) + +QT4_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS}) +QT4_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR}) + +SOURCE_GROUP(QtResources FILES ${QT_PROPERTY_EDITOR_RCS}) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${QT_PROPERTY_EDITOR_MOC_SRC}) +SOURCE_GROUP("Qt Property Editor Source" FILES ${SRC}) + +qt4_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc) +qt4_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) +qt4_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc) + +# Need to remove these so that they are not linked as they are inline included. +LIST(REMOVE_ITEM QT_PROPERTY_EDITOR_MOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx + ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx + ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx + ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx + ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx + ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx + ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) + +# We need to add new depencencies on removed files because we need them to be still generated +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtbuttonpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx) +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qteditorfactory.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx) +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtgroupboxpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx) +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx) +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertymanager.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx) +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qttreepropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx) +SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) + +#set( +# qtpropertyeditor_HEADERS_ONLY_MOC +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cpp +# ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc +# ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc +# ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc +#) +# +#set_source_files_properties( +# ${qtpropertyeditor_HEADERS_ONLY_MOC} +# PROPERTIES +# HEADER_FILE_ONLY true +#) +# + +#set( +# qtpropertyeditor_HEADERS_MOC +# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowserutils_p.cpp +#) + +#set( +# qtpropertyeditor_MOC +# ${qtpropertyeditor_HEADERS_MOC} +# ${qtpropertyeditor_HEADERS_ONLY_MOC} +#) + +ADD_LIBRARY(qt_property_browser SHARED ${SRC} + ${QT_PROPERTY_EDITOR_MOC_SRC} + ${QT_PROPERTY_EDITOR_RC_SRCS} + ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc + ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc + ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) + +TARGET_LINK_LIBRARIES(qt_property_browser ${QT_LIBRARIES}) + +ADD_DEFINITIONS(${QT_DEFINITIONS}) +ADD_DEFINITIONS(-DQT_DLL) +ADD_DEFINITIONS(-DQT_QTPROPERTYBROWSER_EXPORT) +ADD_DEFINITIONS(-DQT_PLUGIN) +#ADD_DEFINITIONS(-DQT_NO_DEBUG) +ADD_DEFINITIONS(-DQT_SHARED) + +NL_DEFAULT_PROPS(qt_property_browser "3rdParty: Qt Property Browser 2.5") +NL_ADD_RUNTIME_FLAGS(qt_property_browser) +NL_ADD_LIB_SUFFIX(qt_property_browser) + +INSTALL(TARGETS qt_property_browser LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) diff --git a/studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt b/studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt new file mode 100644 index 0000000000..0b56ff1efe --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/LGPL_EXCEPTION.txt @@ -0,0 +1,10 @@ +Nokia Qt LGPL Exception version 1.0 + +As a special exception to the GNU Lesser General Public License +version 2.1, the object code form of a "work that uses the Library" +may incorporate material from a header file that is part of the +Library. You may distribute such object code under terms of your +choice, provided that the incorporated material (i) does not exceed +more than 5% of the total size of the Library; and (ii) is limited to +numerical parameters, data structure layouts, accessors, macros, +inline functions and templates. diff --git a/studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 b/studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 new file mode 100644 index 0000000000..94a9ed024d --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/LICENSE.GPL3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL b/studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL new file mode 100644 index 0000000000..5ab7695ab8 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/LICENSE.LGPL @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtAbstractEditorFactoryBase b/studio/src/3rdparty/qtpropertybrowser/QtAbstractEditorFactoryBase similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtAbstractEditorFactoryBase rename to studio/src/3rdparty/qtpropertybrowser/QtAbstractEditorFactoryBase diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtAbstractPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtAbstractPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtBoolPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtBoolPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtBoolPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtBoolPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtBrowserItem b/studio/src/3rdparty/qtpropertybrowser/QtBrowserItem similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtBrowserItem rename to studio/src/3rdparty/qtpropertybrowser/QtBrowserItem diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtButtonPropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/QtButtonPropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtButtonPropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/QtButtonPropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtCharEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtCharEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtCharEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtCharEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtCharPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtCharPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtCharPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtCharPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtCheckBoxFactory b/studio/src/3rdparty/qtpropertybrowser/QtCheckBoxFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtCheckBoxFactory rename to studio/src/3rdparty/qtpropertybrowser/QtCheckBoxFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtColorEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtColorEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtColorEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtColorEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtColorPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtColorPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtColorPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtColorPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtCursorEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtCursorEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtCursorEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtCursorEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtCursorPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtCursorPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtCursorPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtCursorPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtDateEditFactory b/studio/src/3rdparty/qtpropertybrowser/QtDateEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtDateEditFactory rename to studio/src/3rdparty/qtpropertybrowser/QtDateEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtDatePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtDatePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtDatePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtDatePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtDateTimeEditFactory b/studio/src/3rdparty/qtpropertybrowser/QtDateTimeEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtDateTimeEditFactory rename to studio/src/3rdparty/qtpropertybrowser/QtDateTimeEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtDateTimePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtDateTimePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtDateTimePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtDateTimePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtDoublePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtDoublePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtDoublePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtDoublePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtDoubleSpinBoxFactory b/studio/src/3rdparty/qtpropertybrowser/QtDoubleSpinBoxFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtDoubleSpinBoxFactory rename to studio/src/3rdparty/qtpropertybrowser/QtDoubleSpinBoxFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtEnumEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtEnumEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtEnumEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtEnumEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtEnumPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtEnumPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtEnumPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtEnumPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtFlagPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtFlagPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtFlagPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtFlagPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtFontEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtFontEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtFontEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtFontEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtFontPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtFontPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtFontPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtFontPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtGroupBoxPropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/QtGroupBoxPropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtGroupBoxPropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/QtGroupBoxPropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtGroupPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtGroupPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtGroupPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtGroupPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtIntPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtIntPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtIntPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtIntPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtKeySequenceEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtKeySequenceEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtKeySequenceEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtKeySequenceEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtKeySequencePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtKeySequencePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtKeySequencePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtKeySequencePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtLineEditFactory b/studio/src/3rdparty/qtpropertybrowser/QtLineEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtLineEditFactory rename to studio/src/3rdparty/qtpropertybrowser/QtLineEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtLocalePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtLocalePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtLocalePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtLocalePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtPointFPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtPointFPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtPointFPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtPointFPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtPointPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtPointPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtPointPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtPointPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtProperty b/studio/src/3rdparty/qtpropertybrowser/QtProperty similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtProperty rename to studio/src/3rdparty/qtpropertybrowser/QtProperty diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtRectFPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtRectFPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtRectFPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtRectFPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtRectPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtRectPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtRectPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtRectPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtScrollBarFactory b/studio/src/3rdparty/qtpropertybrowser/QtScrollBarFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtScrollBarFactory rename to studio/src/3rdparty/qtpropertybrowser/QtScrollBarFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtSizeFPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtSizeFPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtSizeFPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtSizeFPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtSizePolicyPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtSizePolicyPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtSizePolicyPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtSizePolicyPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtSizePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtSizePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtSizePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtSizePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtSliderFactory b/studio/src/3rdparty/qtpropertybrowser/QtSliderFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtSliderFactory rename to studio/src/3rdparty/qtpropertybrowser/QtSliderFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtSpinBoxFactory b/studio/src/3rdparty/qtpropertybrowser/QtSpinBoxFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtSpinBoxFactory rename to studio/src/3rdparty/qtpropertybrowser/QtSpinBoxFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtStringPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtStringPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtStringPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtStringPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtTimeEditFactory b/studio/src/3rdparty/qtpropertybrowser/QtTimeEditFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtTimeEditFactory rename to studio/src/3rdparty/qtpropertybrowser/QtTimeEditFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtTimePropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtTimePropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtTimePropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtTimePropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtTreePropertyBrowser b/studio/src/3rdparty/qtpropertybrowser/QtTreePropertyBrowser similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtTreePropertyBrowser rename to studio/src/3rdparty/qtpropertybrowser/QtTreePropertyBrowser diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtVariantEditorFactory b/studio/src/3rdparty/qtpropertybrowser/QtVariantEditorFactory similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtVariantEditorFactory rename to studio/src/3rdparty/qtpropertybrowser/QtVariantEditorFactory diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtVariantProperty b/studio/src/3rdparty/qtpropertybrowser/QtVariantProperty similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtVariantProperty rename to studio/src/3rdparty/qtpropertybrowser/QtVariantProperty diff --git a/studio/src/3rdparty/qtpropertybrowser/include/QtVariantPropertyManager b/studio/src/3rdparty/qtpropertybrowser/QtVariantPropertyManager similarity index 100% rename from studio/src/3rdparty/qtpropertybrowser/include/QtVariantPropertyManager rename to studio/src/3rdparty/qtpropertybrowser/QtVariantPropertyManager diff --git a/studio/src/3rdparty/qtpropertybrowser/README.TXT b/studio/src/3rdparty/qtpropertybrowser/README.TXT new file mode 100644 index 0000000000..d9452cfc1d --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/README.TXT @@ -0,0 +1,19 @@ +Property Browser v2.5 + +A property browser framework enabling the user to edit a set of +properties. + +The framework provides a browser widget that displays the given +properties with labels and corresponding editing widgets (e.g. +line edits or comboboxes). The various types of editing widgets +are provided by the framework's editor factories: For each +property type, the framework provides a property manager (e.g. +QtIntPropertyManager and QtStringPropertyManager) which can be +associated with the preferred editor factory (e.g. +QtSpinBoxFactory and QtLineEditFactory). The framework also +provides a variant based property type with corresponding variant +manager and factory. Finally, the framework provides three +ready-made implementations of the browser widget: +QtTreePropertyBrowser, QtButtonPropertyBrowser and +QtGroupBoxPropertyBrowser. + diff --git a/studio/src/3rdparty/qtpropertybrowser/README.md b/studio/src/3rdparty/qtpropertybrowser/README.md deleted file mode 100644 index 86ab41f326..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/README.md +++ /dev/null @@ -1,73 +0,0 @@ -Qt Solutions Component: Property Browser -======================================== - -*A property browser framework enabling the user to edit a set of properties.* - -The framework provides a browser widget that displays the given properties with labels and corresponding editing widgets (e.g.;line edits or comboboxes). -The various types of editing widgets are provided by the framework's editor factories: -For each property type, the framework provides a property manager (e.g. QtIntPropertyManager and QtStringPropertyManager) which can be associated with the preferred editor factory (e.g. QtSpinBoxFactory and QtLineEditFactory). -The framework also provides a variant based property type with corresponding variant manager and factory. -Finally, the framework provides three ready-made implementations of the browser widget: -QtTreePropertyBrowser, QtButtonPropertyBrowser and QtGroupBoxPropertyBrowser. - -Version history: ----------------- - -2.1: - -- QtTreePropertyBrowser - tooltip of property applied to first column, while second column shows the value text of property in its tooltip -- QtAbstractPropertyManager - initializeProperty() and uninitializeProperty() without const modifier now -- QtTreePropertyBrowser and QtGroupBoxPropertyBrowser - internal margin set to 0 -- QtProperty - setEnabled() and isEnabled() methods added -- QtTreePropertyBrowser - "rootIsDecorated", "indentation" and "headerVisible" properties added -- QtProperty - hasValue() method added, useful for group properties - - -2.2: - -- FocusOut event now filtered out in case of Qt::ActiveWindowFocusReason reason. In that case editor is not closed when its sub dialog is executed -- Removed bug in color icon generation -- Decimals attribute added to "double" property type -- PointF, SizeF and RectF types supported -- Proper translation calls for tree property browser -- QtProperty - ensure inserted subproperty is different from "this" property -- QtBrowserItem class introduced, useful for identifying browser's gui elements -- Possibility to control expanded state of QtTreePropertyBrowser's items from code -- QtTreePropertyBrowser - "resizeMode" and "splitterPosition" properties added -- QtGroupBoxPropertyBrowser - fixed crash in case of deleting the editor factory and then deleting the manager -- "Decoration" example added - it shows how to add new responsibilities to the existing managers and editor factories - -2.3: - -- Various bugfixes and improvements -- QtProperty - setModified() and isModified() methods added -- QtTreePropertyBrowser - disabling an item closes its editor -- KeySequence, Char, Locale and Cursor types supported -- Support for icons in enum type added -- Kerning subproperty exposed in Font type -- New property browser class added - QtButtonPropertyBrowser with drop down button as a grouping element - -2.4: - -- Fixed memory leak of QtProperty -- QtTreePropertyBrowser - group items are rendered better -- QtTreePropertyBrowser - propertiesWithoutValueMarked and alternatingRowColors features added -- QtTreePropertyBrowser - possibility of coloring properties added -- QtTreePropertyBrowser - keyboard navigation improved -- New factories providing popup dialogs added: QtColorEditorFactory and QtFontEditorFactory -- Single step attribute added to: QtIntPropertyManager and QtDoublePropertyManager - -2.5: - -- "Object Controller" example added. It implements a similar widget to the property editor in QDesigner -- Compile with QT_NO_CURSOR -- Expand root item with single click on the '+' icon -- QtRectPropertyManager and QtRectFPropertyManager - by default constraint is null rect meaning no constraint is applied - -2.6: - -- QtGroupPropertyBrowser - don't force the layout to show the whole labels' contents for read only properties, show tooltips for them in addition. -- QtTreePropertyBrowser - fixed painting of the editor for color property type when style sheet is used (QTSOLBUG-64). -- Make it possible to change the style of the checkboxes with a stylesheet (QTSOLBUG-61). -- Change the minimum size of a combobox so that it can show at least one character and an icon. -- Make it possible to properly style custom embedded editors (e.g. the color editor provided with the solution). diff --git a/studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake b/studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake deleted file mode 100644 index c51b206da3..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/cmake/FindQtPropertyBrowser.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# Locate QtPropertyBrowser library -# This module defines -# QTPROPERTYBROWSER_FOUND, if false, do not try to link to QtPropertyBrowser -# QTPROPERTYBROWSER_LIBRARY -# QTPROPERTYBROWSER_INCLUDE_DIR, where to find qtpropertybrowser.h -# QTPROPERTYBROWSER_DIR - Can be set to QtPropertyBrowser install path or Windows build path - -find_path(QTPROPERTYBROWSER_INCLUDE_DIR qtpropertybrowser.h - HINTS ${QTPROPERTYBROWSER_DIR} - PATH_SUFFIXES include QtPropertyBrowser - PATHS - ~/Library/Frameworks - /Library/Frameworks - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) - -find_library(QTPROPERTYBROWSER_LIBRARY - NAMES QtPropertyBrowser - HINTS ${QTPROPERTYBROWSER_DIR} - PATH_SUFFIXES lib64 lib - PATHS - ~/Library/Frameworks - /Library/Frameworks - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt -) - -include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set QTPROPERTYBROWSER_FOUND to TRUE if -# all listed variables are TRUE -FIND_PACKAGE_HANDLE_STANDARD_ARGS(QTPROPERTYBROWSER DEFAULT_MSG QTPROPERTYBROWSER_LIBRARY QTPROPERTYBROWSER_INCLUDE_DIR) - -mark_as_advanced(QTPROPERTYBROWSER_INCLUDE_DIR QTPROPERTYBROWSER_LIBRARY) - diff --git a/studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in b/studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in deleted file mode 100644 index cd6a011b6c..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/doxygen/Doxyfile.in +++ /dev/null @@ -1,1521 +0,0 @@ -# Doxyfile 1.5.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = QtPropertyBrowser - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/Doxygen - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, -# Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = YES - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/mrproject". Separate the files or directories -# with spaces. - -INPUT = @CMAKE_CURRENT_SOURCE_DIR@ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = YES - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = */.svn/* - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = HIERARCHIES - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = @INCLUDE_DIRS@ - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES #====== -#CLASS_DIAGRAMS = NO - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = NO - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES #====== -#CLASS_GRAPH = NO - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES #====== -#COLLABORATION_GRAPH = NO - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES #====== -#GROUP_GRAPHS = NO - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES #====== -#TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES #====== -#INCLUDE_GRAPH = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES #====== -#INCLUDED_BY_GRAPH = NO - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = YES #====== -#CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = YES #====== -#CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES #====== -#GRAPHICAL_HIERARCHY = NO - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES #====== -#DIRECTORY_GRAPH = NO - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = ################################################# - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = YES - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Options related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake b/studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake deleted file mode 100644 index ef7d1255aa..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/doxygen/doxygen.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# Generates doxygen. -find_package(Doxygen) -if(NOT DOXYGEN_FOUND) - message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly") -endif() - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in - ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) - -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Doxygen/html/index.html - COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile ${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in - COMMENT "Generating API documentation with Doxygen") - -add_custom_target(doc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxygen/html/index.html ) - -install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Doxygen DESTINATION ${CMAKE_INSTALL_PREFIX}/doc ) diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt b/studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt deleted file mode 100644 index 64bb1c1a3b..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/examples/demo/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 2.9) -project(Demo) - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake) - -find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED) -find_package(QtPropertyBrowser REQUIRED) - -set(SOURCE_FILES main.cpp) -set(QRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/demo.qrc) - -set(CMAKE_AUTORCC ON) - -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} -) - -add_executable(Demo ${SOURCE_FILES} ${QRC_FILES}) -target_link_libraries(Demo - ${QTPROPERTYBROWSER_LIBRARY} - ${Qt5Core_LIBRARIES} - ${Qt5Gui_LIBRARIES} - ${Qt5Widgets_LIBRARIES} -) - -target_include_directories(Demo PUBLIC - ${QTPROPERTYBROWSER_INCLUDE_DIR} - ${Qt5Core_INCLUDE_DIRS} - ${Qt5Gui_INCLUDE_DIRS} - ${Qt5Widgets_INCLUDE_DIRS} -) diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc b/studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc deleted file mode 100644 index c6be0cefb3..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/examples/demo/demo.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - images/up.png - images/down.png - images/right.png - images/left.png - - diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/down.png b/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/down.png deleted file mode 100644 index 29d1d4439a139c662aecca94b6f43a465cfb9cc6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 594 zcmV-Y0j z)Xz`TU>wKswOeUBH_Vo3LZ*V4p&U4v;LVFDq!ObUNJtQHC_UYOy}c$4_Z z287Mpy&>Gkk3$;%;XTGD)-SARcb^V+y#l_lys$a@k{nD+qgKLE+C6xLudGK{sd70w zcE71nDjtqr6rQslcH!s21HbzIZLG4Ku(F%O+U^xp_O4>4nBl-LJ{^?W2788E7ww3c$dW3qz>Ki(HSZqJlD~5#;x#SD}gQ7 zgv0(;bxhbL9Yezjn5K`uZiTiRwq2=|ckJ6DkxX7Tsy45p8>IMse%D zf;Vqf6vh<#P(J!fv{R}3IKcTOvuzkL=(>--JPth;j^KP+u2DCF7oBg1O2Gjh4J~2iFzHobR$W9+ed&iz#gEmW3Y&v zZ*1~MdipzQPYUyy_~Z-G`o@qna0>{{%>1pCHZ|9c3=DO#|4^B1;VbnCc=)W9ww8m4 z5Dx_AeopgXzy^VPz%mf{RiNioWwhsV2m3k#e&uEe!zFx$pqOEPVH#0TK(sQx&BWn* zqx`Q2i^!>#*2L)b+g-FLjck4v377E{R4Ncv5S+PyuQ8$#$gRtDp0Op+s|WHmRvNvJ7zd!z7-kcBSVc z_~L*!C{+>EtN7Fen^`C#i@?y-J4A)lg+B1=;Kz4Z%7e*Tj#t0Sg%}Y4<*J=$W`T(0 zfIE{D;0dX|{tEQ*qfOrK&&#Me!Yy0cg-^T%RZ`vE@$xZX5m<3Tf(V+A=3BoNF8s|n z{9Yjiya48^fXk86pr+z#@Tn<20mDERSTVEWKfT8e{7KYRtIBHHAITZSk@xgqT>t<8 M07*qoM6N<$f+VOsGXMYp diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/right.png b/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/right.png deleted file mode 100644 index 34b91f09fa3aa8e0b329edc97054c11defba8016..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 655 zcmV;A0&x9_P)cJAZUz`NyfQlF14XgvfeqKhRM8=g$nIpi07v2Pm$T0PG z+s5t5ev&IuzPy9iGfJ_*Szxjq-U_S#@di#sMFxj0Y^u zs2IrSA-xLzn@Xv~L10-`OD_1{xQ}!;h8VCMGZhEg7)ve(nH0=Nlth##z-1t-sznz( zI^knI8`}k}=1Q^8xg4a|;6+&Z7-tr^27CjyRJH7a$AX8**swS%Z2U-ZpmSmP5GMj$ z1y+C!prEQ%7kpz7mY14W%oynFgWlfyOj9X{G^0Np=uW$J^8**~h`aaUdlDkgAkhJB z2loJbfPHrEakyVc$6#mx5^=)7buY9XEP!Q$7GNCj4jnzl`B(FVY;?m5b-|rNMD_xg pfC->zKW))&VdLne22{OJfIn@@R^)Beh^qhq002ovPDHLkV1l$X9{d0R diff --git a/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/up.png b/studio/src/3rdparty/qtpropertybrowser/examples/demo/images/up.png deleted file mode 100644 index e4373122171599c88b78c884b927c6a8b4a90c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 692 zcmV;l0!#ggP)p2raNh0iv$(l~TMx4kdC6q9nEA|`**D{}k#dX8|6LB>7#;)I^Ped=4Hzs5}YJfl=IMqVOwV3TOn<`fg+FtutHTOl+p4ItW@S@UCRT$s#e2Vdg=lo5D}~>p3$197_jRp z=YhPc7Gm8z$3=Kf7AcnG)$Gyx5pjP)J5;=W_SftyqWmZ>V+N`!8lA3I}LdVVyM axbX+reAIe(fQ}9T0000 -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - QApplication app(argc, argv); - - QWidget *w = new QWidget(); - - QtBoolPropertyManager *boolManager = new QtBoolPropertyManager(w); - QtIntPropertyManager *intManager = new QtIntPropertyManager(w); - QtStringPropertyManager *stringManager = new QtStringPropertyManager(w); - QtSizePropertyManager *sizeManager = new QtSizePropertyManager(w); - QtRectPropertyManager *rectManager = new QtRectPropertyManager(w); - QtSizePolicyPropertyManager *sizePolicyManager = new QtSizePolicyPropertyManager(w); - QtEnumPropertyManager *enumManager = new QtEnumPropertyManager(w); - QtGroupPropertyManager *groupManager = new QtGroupPropertyManager(w); - - QtProperty *item0 = groupManager->addProperty("QObject"); - - QtProperty *item1 = stringManager->addProperty("objectName"); - item0->addSubProperty(item1); - - QtProperty *item2 = boolManager->addProperty("enabled"); - item0->addSubProperty(item2); - - QtProperty *item3 = rectManager->addProperty("geometry"); - item0->addSubProperty(item3); - - QtProperty *item4 = sizePolicyManager->addProperty("sizePolicy"); - item0->addSubProperty(item4); - - QtProperty *item5 = sizeManager->addProperty("sizeIncrement"); - item0->addSubProperty(item5); - - QtProperty *item7 = boolManager->addProperty("mouseTracking"); - item0->addSubProperty(item7); - - QtProperty *item8 = enumManager->addProperty("direction"); - QStringList enumNames; - enumNames << "Up" << "Right" << "Down" << "Left"; - enumManager->setEnumNames(item8, enumNames); - QMap enumIcons; - enumIcons[0] = QIcon(":/demo/images/up.png"); - enumIcons[1] = QIcon(":/demo/images/right.png"); - enumIcons[2] = QIcon(":/demo/images/down.png"); - enumIcons[3] = QIcon(":/demo/images/left.png"); - enumManager->setEnumIcons(item8, enumIcons); - item0->addSubProperty(item8); - - QtProperty *item9 = intManager->addProperty("value"); - intManager->setRange(item9, -100, 100); - item0->addSubProperty(item9); - - QtCheckBoxFactory *checkBoxFactory = new QtCheckBoxFactory(w); - QtSpinBoxFactory *spinBoxFactory = new QtSpinBoxFactory(w); - QtSliderFactory *sliderFactory = new QtSliderFactory(w); - QtScrollBarFactory *scrollBarFactory = new QtScrollBarFactory(w); - QtLineEditFactory *lineEditFactory = new QtLineEditFactory(w); - QtEnumEditorFactory *comboBoxFactory = new QtEnumEditorFactory(w); - - QtAbstractPropertyBrowser *editor1 = new QtTreePropertyBrowser(); - editor1->setFactoryForManager(boolManager, checkBoxFactory); - editor1->setFactoryForManager(intManager, spinBoxFactory); - editor1->setFactoryForManager(stringManager, lineEditFactory); - editor1->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); - editor1->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); - editor1->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), spinBoxFactory); - editor1->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); - editor1->setFactoryForManager(enumManager, comboBoxFactory); - - editor1->addProperty(item0); - - QtAbstractPropertyBrowser *editor2 = new QtTreePropertyBrowser(); - editor2->addProperty(item0); - - QtAbstractPropertyBrowser *editor3 = new QtGroupBoxPropertyBrowser(); - editor3->setFactoryForManager(boolManager, checkBoxFactory); - editor3->setFactoryForManager(intManager, spinBoxFactory); - editor3->setFactoryForManager(stringManager, lineEditFactory); - editor3->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); - editor3->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); - editor3->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), spinBoxFactory); - editor3->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); - editor3->setFactoryForManager(enumManager, comboBoxFactory); - - editor3->addProperty(item0); - - QScrollArea *scroll3 = new QScrollArea(); - scroll3->setWidgetResizable(true); - scroll3->setWidget(editor3); - - QtAbstractPropertyBrowser *editor4 = new QtGroupBoxPropertyBrowser(); - editor4->setFactoryForManager(boolManager, checkBoxFactory); - editor4->setFactoryForManager(intManager, scrollBarFactory); - editor4->setFactoryForManager(stringManager, lineEditFactory); - editor4->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); - editor4->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); - editor4->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), sliderFactory); - editor4->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); - editor4->setFactoryForManager(enumManager, comboBoxFactory); - - editor4->addProperty(item0); - - QScrollArea *scroll4 = new QScrollArea(); - scroll4->setWidgetResizable(true); - scroll4->setWidget(editor4); - - QtAbstractPropertyBrowser *editor5 = new QtButtonPropertyBrowser(); - editor5->setFactoryForManager(boolManager, checkBoxFactory); - editor5->setFactoryForManager(intManager, scrollBarFactory); - editor5->setFactoryForManager(stringManager, lineEditFactory); - editor5->setFactoryForManager(sizeManager->subIntPropertyManager(), spinBoxFactory); - editor5->setFactoryForManager(rectManager->subIntPropertyManager(), spinBoxFactory); - editor5->setFactoryForManager(sizePolicyManager->subIntPropertyManager(), sliderFactory); - editor5->setFactoryForManager(sizePolicyManager->subEnumPropertyManager(), comboBoxFactory); - editor5->setFactoryForManager(enumManager, comboBoxFactory); - - editor5->addProperty(item0); - - QScrollArea *scroll5 = new QScrollArea(); - scroll5->setWidgetResizable(true); - scroll5->setWidget(editor5); - - QGridLayout *layout = new QGridLayout(w); - QLabel *label1 = new QLabel("Editable Tree Property Browser"); - QLabel *label2 = new QLabel("Read Only Tree Property Browser, editor factories are not set"); - QLabel *label3 = new QLabel("Group Box Property Browser"); - QLabel *label4 = new QLabel("Group Box Property Browser with different editor factories"); - QLabel *label5 = new QLabel("Button Property Browser"); - label1->setWordWrap(true); - label2->setWordWrap(true); - label3->setWordWrap(true); - label4->setWordWrap(true); - label5->setWordWrap(true); - label1->setFrameShadow(QFrame::Sunken); - label2->setFrameShadow(QFrame::Sunken); - label3->setFrameShadow(QFrame::Sunken); - label4->setFrameShadow(QFrame::Sunken); - label5->setFrameShadow(QFrame::Sunken); - label1->setFrameShape(QFrame::Panel); - label2->setFrameShape(QFrame::Panel); - label3->setFrameShape(QFrame::Panel); - label4->setFrameShape(QFrame::Panel); - label5->setFrameShape(QFrame::Panel); - label1->setAlignment(Qt::AlignCenter); - label2->setAlignment(Qt::AlignCenter); - label3->setAlignment(Qt::AlignCenter); - label4->setAlignment(Qt::AlignCenter); - label5->setAlignment(Qt::AlignCenter); - - layout->addWidget(label1, 0, 0); - layout->addWidget(label2, 0, 1); - layout->addWidget(label3, 0, 2); - layout->addWidget(label4, 0, 3); - layout->addWidget(label5, 0, 4); - layout->addWidget(editor1, 1, 0); - layout->addWidget(editor2, 1, 1); - layout->addWidget(scroll3, 1, 2); - layout->addWidget(scroll4, 1, 3); - layout->addWidget(scroll5, 1, 4); - w->show(); - - int ret = app.exec(); - delete w; - return ret; -} diff --git a/studio/src/3rdparty/qtpropertybrowser/images/resetproperty.png b/studio/src/3rdparty/qtpropertybrowser/images/resetproperty.png new file mode 100644 index 0000000000000000000000000000000000000000..9048252ec2a51e7ee3461b72ba31fcabb2f10027 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)M!VDz;D$H~RQtAOdA+G=b|DVXfKoI@;pQ;7a z!c!9D7tA1OVDFM#)bRFI`d!AXvO1u+s;7%%2#0KP!Un;Fgaq5gCk{*~e&)l-9KQS# jBO6=3qr$;M$qWpMPuN;S?ziRvH86O(`njxgN@xNAXMir1 literal 0 HcmV?d00001 diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.cpp similarity index 81% rename from studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.cpp index 0e9d223967..d5ebd4fc2b 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.cpp @@ -1,46 +1,102 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtbuttonpropertybrowser.h" #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QtButtonPropertyBrowserPrivate { @@ -268,11 +324,14 @@ void QtButtonPropertyBrowserPrivate::propertyInserted(QtBrowserItem *index, QtBr if (!parentItem->container) { m_recreateQueue.removeAll(parentItem); WidgetItem *grandParent = parentItem->parent; + QWidget *w = 0; QGridLayout *l = 0; const int oldRow = gridRow(parentItem); if (grandParent) { + w = grandParent->container; l = grandParent->layout; } else { + w = q_ptr; l = m_mainLayout; } QFrame *container = new QFrame(); @@ -489,9 +548,6 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) /*! \class QtButtonPropertyBrowser - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtButtonPropertyBrowser class provides a drop down QToolButton based property browser. @@ -536,8 +592,9 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtButtonPropertyBrowser::QtButtonPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent), d_ptr(new QtButtonPropertyBrowserPrivate) + : QtAbstractPropertyBrowser(parent) { + d_ptr = new QtButtonPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -558,6 +615,7 @@ QtButtonPropertyBrowser::~QtButtonPropertyBrowser() const QMap::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); + delete d_ptr; } /*! @@ -611,6 +669,8 @@ bool QtButtonPropertyBrowser::isExpanded(QtBrowserItem *item) const return false; } +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qtbuttonpropertybrowser.cpp" +#include "moc_qtbuttonpropertybrowser.cxx" diff --git a/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h new file mode 100644 index 0000000000..518e047e86 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/qtbuttonpropertybrowser.h @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTBUTTONPROPERTYBROWSER_H +#define QTBUTTONPROPERTYBROWSER_H + +#include "qtpropertybrowser.h" + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QtButtonPropertyBrowserPrivate; + +class QT_QTPROPERTYBROWSER_EXPORT QtButtonPropertyBrowser : public QtAbstractPropertyBrowser +{ + Q_OBJECT +public: + + QtButtonPropertyBrowser(QWidget *parent = 0); + ~QtButtonPropertyBrowser(); + + void setExpanded(QtBrowserItem *item, bool expanded); + bool isExpanded(QtBrowserItem *item) const; + +Q_SIGNALS: + + void collapsed(QtBrowserItem *item); + void expanded(QtBrowserItem *item); + +protected: + virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); + virtual void itemRemoved(QtBrowserItem *item); + virtual void itemChanged(QtBrowserItem *item); + +private: + + QtButtonPropertyBrowserPrivate *d_ptr; + Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) + Q_DISABLE_COPY(QtButtonPropertyBrowser) + Q_PRIVATE_SLOT(d_func(), void slotUpdate()) + Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) + Q_PRIVATE_SLOT(d_func(), void slotToggled(bool)) + +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.cpp b/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.cpp similarity index 68% rename from studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.cpp rename to studio/src/3rdparty/qtpropertybrowser/qteditorfactory.cpp index 973418d011..2c45b77beb 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.cpp @@ -1,61 +1,123 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qteditorfactory.h" #include "qtpropertybrowserutils_p.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #if defined(Q_CC_MSVC) # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif // Set a hard coded left margin to account for the indentation // of the tree view icon when switching to an editor @@ -100,7 +162,7 @@ Editor *EditorFactoryPrivate::createEditor(QtProperty *property, QWidget template void EditorFactoryPrivate::initializeEditor(QtProperty *property, Editor *editor) { - typename PropertyToEditorListMap::iterator it = m_createdEditors.find(property); + Q_TYPENAME PropertyToEditorListMap::iterator it = m_createdEditors.find(property); if (it == m_createdEditors.end()) it = m_createdEditors.insert(property, EditorList()); it.value().append(editor); @@ -110,12 +172,12 @@ void EditorFactoryPrivate::initializeEditor(QtProperty *property, Editor template void EditorFactoryPrivate::slotEditorDestroyed(QObject *object) { - const typename EditorToPropertyMap::iterator ecend = m_editorToProperty.end(); - for (typename EditorToPropertyMap::iterator itEditor = m_editorToProperty.begin(); itEditor != ecend; ++itEditor) { + const Q_TYPENAME EditorToPropertyMap::iterator ecend = m_editorToProperty.end(); + for (Q_TYPENAME EditorToPropertyMap::iterator itEditor = m_editorToProperty.begin(); itEditor != ecend; ++itEditor) { if (itEditor.key() == object) { Editor *editor = itEditor.key(); QtProperty *property = itEditor.value(); - const typename PropertyToEditorListMap::iterator pit = m_createdEditors.find(property); + const Q_TYPENAME PropertyToEditorListMap::iterator pit = m_createdEditors.find(property); if (pit != m_createdEditors.end()) { pit.value().removeAll(editor); if (pit.value().empty()) @@ -206,9 +268,6 @@ void QtSpinBoxFactoryPrivate::slotSetValue(int value) /*! \class QtSpinBoxFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtSpinBoxFactory class provides QSpinBox widgets for properties created by QtIntPropertyManager objects. @@ -220,8 +279,9 @@ void QtSpinBoxFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtSpinBoxFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -232,6 +292,7 @@ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) QtSpinBoxFactory::~QtSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -241,12 +302,12 @@ QtSpinBoxFactory::~QtSpinBoxFactory() */ void QtSpinBoxFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + connect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); } /*! @@ -264,8 +325,8 @@ QWidget *QtSpinBoxFactory::createEditor(QtIntPropertyManager *manager, QtPropert editor->setKeyboardTracking(false); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -276,12 +337,12 @@ QWidget *QtSpinBoxFactory::createEditor(QtIntPropertyManager *manager, QtPropert */ void QtSpinBoxFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); } // QtSliderFactory @@ -360,9 +421,6 @@ void QtSliderFactoryPrivate::slotSetValue(int value) /*! \class QtSliderFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtSliderFactory class provides QSlider widgets for properties created by QtIntPropertyManager objects. @@ -374,8 +432,9 @@ void QtSliderFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSliderFactory::QtSliderFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtSliderFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtSliderFactoryPrivate(); d_ptr->q_ptr = this; } @@ -386,6 +445,7 @@ QtSliderFactory::QtSliderFactory(QObject *parent) QtSliderFactory::~QtSliderFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -395,12 +455,12 @@ QtSliderFactory::~QtSliderFactory() */ void QtSliderFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + connect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); } /*! @@ -418,8 +478,8 @@ QWidget *QtSliderFactory::createEditor(QtIntPropertyManager *manager, QtProperty editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -430,12 +490,12 @@ QWidget *QtSliderFactory::createEditor(QtIntPropertyManager *manager, QtProperty */ void QtSliderFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); } // QtSliderFactory @@ -514,9 +574,6 @@ void QtScrollBarFactoryPrivate::slotSetValue(int value) /*! \class QtScrollBarFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtScrollBarFactory class provides QScrollBar widgets for properties created by QtIntPropertyManager objects. @@ -528,8 +585,9 @@ void QtScrollBarFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtScrollBarFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtScrollBarFactoryPrivate(); d_ptr->q_ptr = this; } @@ -540,6 +598,7 @@ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) QtScrollBarFactory::~QtScrollBarFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -549,12 +608,12 @@ QtScrollBarFactory::~QtScrollBarFactory() */ void QtScrollBarFactory::connectPropertyManager(QtIntPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + connect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + connect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); } /*! @@ -571,8 +630,8 @@ QWidget *QtScrollBarFactory::createEditor(QtIntPropertyManager *manager, QtPrope editor->setRange(manager->minimum(property), manager->maximum(property)); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -583,12 +642,12 @@ QWidget *QtScrollBarFactory::createEditor(QtIntPropertyManager *manager, QtPrope */ void QtScrollBarFactory::disconnectPropertyManager(QtIntPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); } // QtCheckBoxFactory @@ -600,6 +659,7 @@ class QtCheckBoxFactoryPrivate : public EditorFactoryPrivate public: void slotPropertyChanged(QtProperty *property, bool value); void slotSetValue(bool value); + void slotResetProperty(); }; void QtCheckBoxFactoryPrivate::slotPropertyChanged(QtProperty *property, bool value) @@ -610,6 +670,7 @@ void QtCheckBoxFactoryPrivate::slotPropertyChanged(QtProperty *property, bool va QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { QtBoolEdit *editor = itEditor.next(); + editor->setStateResetButton(property->isModified()); editor->blockCheckBoxSignals(true); editor->setChecked(value); editor->blockCheckBoxSignals(false); @@ -632,11 +693,24 @@ void QtCheckBoxFactoryPrivate::slotSetValue(bool value) } } +void QtCheckBoxFactoryPrivate::slotResetProperty() +{ + QObject *object = q_ptr->sender(); + + const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) { + QtProperty *property = itEditor.value(); + QtBoolPropertyManager *manager = q_ptr->propertyManager(property); + if (!manager) + return; + manager->emitResetProperty(property); + return; + } +} + /*! \class QtCheckBoxFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtCheckBoxFactory class provides QCheckBox widgets for properties created by QtBoolPropertyManager objects. @@ -648,8 +722,9 @@ void QtCheckBoxFactoryPrivate::slotSetValue(bool value) Creates a factory with the given \a parent. */ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtCheckBoxFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtCheckBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -660,6 +735,7 @@ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) QtCheckBoxFactory::~QtCheckBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -669,8 +745,8 @@ QtCheckBoxFactory::~QtCheckBoxFactory() */ void QtCheckBoxFactory::connectPropertyManager(QtBoolPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotPropertyChanged(QtProperty*,bool))); + connect(manager, SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotPropertyChanged(QtProperty *, bool))); } /*! @@ -682,11 +758,13 @@ QWidget *QtCheckBoxFactory::createEditor(QtBoolPropertyManager *manager, QtPrope QWidget *parent) { QtBoolEdit *editor = d_ptr->createEditor(property, parent); + editor->setStateResetButton(property->isModified()); editor->setChecked(manager->value(property)); + connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); connect(editor, SIGNAL(toggled(bool)), this, SLOT(slotSetValue(bool))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -697,8 +775,8 @@ QWidget *QtCheckBoxFactory::createEditor(QtBoolPropertyManager *manager, QtPrope */ void QtCheckBoxFactory::disconnectPropertyManager(QtBoolPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotPropertyChanged(QtProperty*,bool))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotPropertyChanged(QtProperty *, bool))); } // QtDoubleSpinBoxFactory @@ -807,9 +885,6 @@ void QtDoubleSpinBoxFactoryPrivate::slotSetValue(double value) } /*! \class QtDoubleSpinBoxFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtDoubleSpinBoxFactory class provides QDoubleSpinBox widgets for properties created by QtDoublePropertyManager objects. @@ -821,8 +896,9 @@ void QtDoubleSpinBoxFactoryPrivate::slotSetValue(double value) Creates a factory with the given \a parent. */ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtDoubleSpinBoxFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtDoubleSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -833,6 +909,7 @@ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -842,14 +919,14 @@ QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() */ void QtDoubleSpinBoxFactory::connectPropertyManager(QtDoublePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotPropertyChanged(QtProperty*,double))); - connect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), - this, SLOT(slotRangeChanged(QtProperty*,double,double))); - connect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), - this, SLOT(slotSingleStepChanged(QtProperty*,double))); - connect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), - this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(manager, SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotPropertyChanged(QtProperty *, double))); + connect(manager, SIGNAL(rangeChanged(QtProperty *, double, double)), + this, SLOT(slotRangeChanged(QtProperty *, double, double))); + connect(manager, SIGNAL(singleStepChanged(QtProperty *, double)), + this, SLOT(slotSingleStepChanged(QtProperty *, double))); + connect(manager, SIGNAL(decimalsChanged(QtProperty *, int)), + this, SLOT(slotDecimalsChanged(QtProperty *, int))); } /*! @@ -862,14 +939,14 @@ QWidget *QtDoubleSpinBoxFactory::createEditor(QtDoublePropertyManager *manager, { QDoubleSpinBox *editor = d_ptr->createEditor(property, parent); editor->setSingleStep(manager->singleStep(property)); - editor->setDecimals(manager->decimals(property)); + editor->setDecimals(6); editor->setRange(manager->minimum(property), manager->maximum(property)); editor->setValue(manager->value(property)); editor->setKeyboardTracking(false); connect(editor, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -880,14 +957,14 @@ QWidget *QtDoubleSpinBoxFactory::createEditor(QtDoublePropertyManager *manager, */ void QtDoubleSpinBoxFactory::disconnectPropertyManager(QtDoublePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotPropertyChanged(QtProperty*,double))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), - this, SLOT(slotRangeChanged(QtProperty*,double,double))); - disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), - this, SLOT(slotSingleStepChanged(QtProperty*,double))); - disconnect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), - this, SLOT(slotDecimalsChanged(QtProperty*,int))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotPropertyChanged(QtProperty *, double))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty *, double, double)), + this, SLOT(slotRangeChanged(QtProperty *, double, double))); + disconnect(manager, SIGNAL(singleStepChanged(QtProperty *, double)), + this, SLOT(slotSingleStepChanged(QtProperty *, double))); + disconnect(manager, SIGNAL(decimalsChanged(QtProperty *, int)), + this, SLOT(slotDecimalsChanged(QtProperty *, int))); } // QtLineEditFactory @@ -901,6 +978,7 @@ class QtLineEditFactoryPrivate : public EditorFactoryPrivate void slotPropertyChanged(QtProperty *property, const QString &value); void slotRegExpChanged(QtProperty *property, const QRegExp ®Exp); void slotSetValue(const QString &value); + void slotEditingFinished(); }; void QtLineEditFactoryPrivate::slotPropertyChanged(QtProperty *property, @@ -958,11 +1036,24 @@ void QtLineEditFactoryPrivate::slotSetValue(const QString &value) } } +void QtLineEditFactoryPrivate::slotEditingFinished() +{ + QObject *object = q_ptr->sender(); + const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) { + QtProperty *property = itEditor.value(); + QtStringPropertyManager *manager = q_ptr->propertyManager(property); + if (!manager) + return; + QString value = static_cast(itEditor.key())->text(); + manager->setValue(property, value); + return; + } +} + /*! \class QtLineEditFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtLineEditFactory class provides QLineEdit widgets for properties created by QtStringPropertyManager objects. @@ -974,8 +1065,9 @@ void QtLineEditFactoryPrivate::slotSetValue(const QString &value) Creates a factory with the given \a parent. */ QtLineEditFactory::QtLineEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtLineEditFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtLineEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -986,6 +1078,7 @@ QtLineEditFactory::QtLineEditFactory(QObject *parent) QtLineEditFactory::~QtLineEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -995,10 +1088,10 @@ QtLineEditFactory::~QtLineEditFactory() */ void QtLineEditFactory::connectPropertyManager(QtStringPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QString)), - this, SLOT(slotPropertyChanged(QtProperty*,QString))); - connect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), - this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); + connect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), + this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); } /*! @@ -1018,10 +1111,10 @@ QWidget *QtLineEditFactory::createEditor(QtStringPropertyManager *manager, } editor->setText(manager->value(property)); - connect(editor, SIGNAL(textEdited(QString)), - this, SLOT(slotSetValue(QString))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(editingFinished()), + this, SLOT(slotEditingFinished())); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1032,10 +1125,10 @@ QWidget *QtLineEditFactory::createEditor(QtStringPropertyManager *manager, */ void QtLineEditFactory::disconnectPropertyManager(QtStringPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QString)), - this, SLOT(slotPropertyChanged(QtProperty*,QString))); - disconnect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), - this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); + disconnect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), + this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); } // QtDateEditFactory @@ -1101,9 +1194,6 @@ void QtDateEditFactoryPrivate::slotSetValue(const QDate &value) /*! \class QtDateEditFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtDateEditFactory class provides QDateEdit widgets for properties created by QtDatePropertyManager objects. @@ -1115,8 +1205,9 @@ void QtDateEditFactoryPrivate::slotSetValue(const QDate &value) Creates a factory with the given \a parent. */ QtDateEditFactory::QtDateEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtDateEditFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtDateEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1127,6 +1218,7 @@ QtDateEditFactory::QtDateEditFactory(QObject *parent) QtDateEditFactory::~QtDateEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -1136,10 +1228,10 @@ QtDateEditFactory::~QtDateEditFactory() */ void QtDateEditFactory::connectPropertyManager(QtDatePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), - this, SLOT(slotPropertyChanged(QtProperty*,QDate))); - connect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), - this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QDate &))); + connect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), + this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); } /*! @@ -1151,15 +1243,14 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope QWidget *parent) { QDateEdit *editor = d_ptr->createEditor(property, parent); - editor->setDisplayFormat(QtPropertyBrowserUtils::dateFormat()); editor->setCalendarPopup(true); editor->setDateRange(manager->minimum(property), manager->maximum(property)); editor->setDate(manager->value(property)); - connect(editor, SIGNAL(dateChanged(QDate)), - this, SLOT(slotSetValue(QDate))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(dateChanged(const QDate &)), + this, SLOT(slotSetValue(const QDate &))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1170,10 +1261,10 @@ QWidget *QtDateEditFactory::createEditor(QtDatePropertyManager *manager, QtPrope */ void QtDateEditFactory::disconnectPropertyManager(QtDatePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), - this, SLOT(slotPropertyChanged(QtProperty*,QDate))); - disconnect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), - this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QDate &))); + disconnect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), + this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); } // QtTimeEditFactory @@ -1218,9 +1309,6 @@ void QtTimeEditFactoryPrivate::slotSetValue(const QTime &value) /*! \class QtTimeEditFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtTimeEditFactory class provides QTimeEdit widgets for properties created by QtTimePropertyManager objects. @@ -1232,8 +1320,9 @@ void QtTimeEditFactoryPrivate::slotSetValue(const QTime &value) Creates a factory with the given \a parent. */ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtTimeEditFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1244,6 +1333,7 @@ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) QtTimeEditFactory::~QtTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -1253,8 +1343,8 @@ QtTimeEditFactory::~QtTimeEditFactory() */ void QtTimeEditFactory::connectPropertyManager(QtTimePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), - this, SLOT(slotPropertyChanged(QtProperty*,QTime))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QTime &))); } /*! @@ -1266,13 +1356,12 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope QWidget *parent) { QTimeEdit *editor = d_ptr->createEditor(property, parent); - editor->setDisplayFormat(QtPropertyBrowserUtils::timeFormat()); editor->setTime(manager->value(property)); - connect(editor, SIGNAL(timeChanged(QTime)), - this, SLOT(slotSetValue(QTime))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(timeChanged(const QTime &)), + this, SLOT(slotSetValue(const QTime &))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1283,8 +1372,8 @@ QWidget *QtTimeEditFactory::createEditor(QtTimePropertyManager *manager, QtPrope */ void QtTimeEditFactory::disconnectPropertyManager(QtTimePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), - this, SLOT(slotPropertyChanged(QtProperty*,QTime))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QTime &))); } // QtDateTimeEditFactory @@ -1332,9 +1421,6 @@ void QtDateTimeEditFactoryPrivate::slotSetValue(const QDateTime &value) /*! \class QtDateTimeEditFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtDateTimeEditFactory class provides QDateTimeEdit widgets for properties created by QtDateTimePropertyManager objects. @@ -1346,8 +1432,9 @@ void QtDateTimeEditFactoryPrivate::slotSetValue(const QDateTime &value) Creates a factory with the given \a parent. */ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtDateTimeEditFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtDateTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1358,6 +1445,7 @@ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) QtDateTimeEditFactory::~QtDateTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -1367,8 +1455,8 @@ QtDateTimeEditFactory::~QtDateTimeEditFactory() */ void QtDateTimeEditFactory::connectPropertyManager(QtDateTimePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), - this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &))); } /*! @@ -1380,13 +1468,12 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, QtProperty *property, QWidget *parent) { QDateTimeEdit *editor = d_ptr->createEditor(property, parent); - editor->setDisplayFormat(QtPropertyBrowserUtils::dateTimeFormat()); editor->setDateTime(manager->value(property)); - connect(editor, SIGNAL(dateTimeChanged(QDateTime)), - this, SLOT(slotSetValue(QDateTime))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(dateTimeChanged(const QDateTime &)), + this, SLOT(slotSetValue(const QDateTime &))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1397,13 +1484,13 @@ QWidget *QtDateTimeEditFactory::createEditor(QtDateTimePropertyManager *manager, */ void QtDateTimeEditFactory::disconnectPropertyManager(QtDateTimePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), - this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &))); } // QtKeySequenceEditorFactory -class QtKeySequenceEditorFactoryPrivate : public EditorFactoryPrivate +class QtKeySequenceEditorFactoryPrivate : public EditorFactoryPrivate { QtKeySequenceEditorFactory *q_ptr; Q_DECLARE_PUBLIC(QtKeySequenceEditorFactory) @@ -1419,9 +1506,9 @@ void QtKeySequenceEditorFactoryPrivate::slotPropertyChanged(QtProperty *property if (!m_createdEditors.contains(property)) return; - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QKeySequenceEdit *editor = itEditor.next(); + QtKeySequenceEdit *editor = itEditor.next(); editor->blockSignals(true); editor->setKeySequence(value); editor->blockSignals(false); @@ -1431,8 +1518,8 @@ void QtKeySequenceEditorFactoryPrivate::slotPropertyChanged(QtProperty *property void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) { QObject *object = q_ptr->sender(); - const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) if (itEditor.key() == object) { QtProperty *property = itEditor.value(); QtKeySequencePropertyManager *manager = q_ptr->propertyManager(property); @@ -1445,9 +1532,6 @@ void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) /*! \class QtKeySequenceEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtKeySequenceEditorFactory class provides editor widgets for properties created by QtKeySequencePropertyManager objects. @@ -1459,8 +1543,9 @@ void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) Creates a factory with the given \a parent. */ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtKeySequenceEditorFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtKeySequenceEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1471,6 +1556,7 @@ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -1480,8 +1566,8 @@ QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() */ void QtKeySequenceEditorFactory::connectPropertyManager(QtKeySequencePropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), - this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &))); } /*! @@ -1492,13 +1578,13 @@ void QtKeySequenceEditorFactory::connectPropertyManager(QtKeySequencePropertyMan QWidget *QtKeySequenceEditorFactory::createEditor(QtKeySequencePropertyManager *manager, QtProperty *property, QWidget *parent) { - QKeySequenceEdit *editor = d_ptr->createEditor(property, parent); + QtKeySequenceEdit *editor = d_ptr->createEditor(property, parent); editor->setKeySequence(manager->value(property)); - connect(editor, SIGNAL(keySequenceChanged(QKeySequence)), - this, SLOT(slotSetValue(QKeySequence))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(keySequenceChanged(const QKeySequence &)), + this, SLOT(slotSetValue(const QKeySequence &))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1509,8 +1595,8 @@ QWidget *QtKeySequenceEditorFactory::createEditor(QtKeySequencePropertyManager * */ void QtKeySequenceEditorFactory::disconnectPropertyManager(QtKeySequencePropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), - this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &))); } // QtCharEdit @@ -1727,9 +1813,6 @@ void QtCharEditorFactoryPrivate::slotSetValue(const QChar &value) /*! \class QtCharEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtCharEditorFactory class provides editor widgets for properties created by QtCharPropertyManager objects. @@ -1741,8 +1824,9 @@ void QtCharEditorFactoryPrivate::slotSetValue(const QChar &value) Creates a factory with the given \a parent. */ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtCharEditorFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtCharEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1753,6 +1837,7 @@ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) QtCharEditorFactory::~QtCharEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -1762,8 +1847,8 @@ QtCharEditorFactory::~QtCharEditorFactory() */ void QtCharEditorFactory::connectPropertyManager(QtCharPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), - this, SLOT(slotPropertyChanged(QtProperty*,QChar))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QChar &))); } /*! @@ -1777,10 +1862,10 @@ QWidget *QtCharEditorFactory::createEditor(QtCharPropertyManager *manager, QtCharEdit *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); - connect(editor, SIGNAL(valueChanged(QChar)), - this, SLOT(slotSetValue(QChar))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(valueChanged(const QChar &)), + this, SLOT(slotSetValue(const QChar &))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1791,13 +1876,91 @@ QWidget *QtCharEditorFactory::createEditor(QtCharPropertyManager *manager, */ void QtCharEditorFactory::disconnectPropertyManager(QtCharPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), - this, SLOT(slotPropertyChanged(QtProperty*,QChar))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QChar &))); +} + + +class QtEnumEditWidget : public QWidget { + Q_OBJECT + +public: + QtEnumEditWidget(QWidget *parent); + + bool blockComboBoxSignals(bool block); + void addItems(const QStringList &texts); + void clearComboBox(); + void setItemIcon(int index, const QIcon &icon); + +public Q_SLOTS: + void setValue(int value); + void setStateResetButton(bool enabled); + +Q_SIGNALS: + void valueChanged(int value); + void resetProperty(); + +private: + QComboBox *m_comboBox; + QToolButton *m_defaultButton; +}; + +QtEnumEditWidget::QtEnumEditWidget(QWidget *parent) : + QWidget(parent), + m_comboBox(new QComboBox), + m_defaultButton(new QToolButton) +{ + m_comboBox->view()->setTextElideMode(Qt::ElideRight); + + QHBoxLayout *lt = new QHBoxLayout(this); + lt->setContentsMargins(0, 0, 0, 0); + lt->setSpacing(0); + lt->addWidget(m_comboBox); + + m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); + m_defaultButton->setMaximumWidth(16); + + connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(valueChanged(int))); + connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); + lt->addWidget(m_defaultButton); + m_defaultButton->setEnabled(false); + setFocusProxy(m_comboBox); +} + +void QtEnumEditWidget::setValue(int value) +{ + if (m_comboBox->currentIndex() != value) + m_comboBox->setCurrentIndex(value); +} + +void QtEnumEditWidget::setStateResetButton(bool enabled) +{ + m_defaultButton->setEnabled(enabled); +} + +bool QtEnumEditWidget::blockComboBoxSignals(bool block) +{ + return m_comboBox->blockSignals(block); +} + +void QtEnumEditWidget::addItems(const QStringList &texts) +{ + m_comboBox->addItems(texts); +} + +void QtEnumEditWidget::clearComboBox() +{ + m_comboBox->clear(); +} + +void QtEnumEditWidget::setItemIcon(int index, const QIcon &icon) +{ + m_comboBox->setItemIcon(index, icon); } // QtEnumEditorFactory -class QtEnumEditorFactoryPrivate : public EditorFactoryPrivate +class QtEnumEditorFactoryPrivate : public EditorFactoryPrivate { QtEnumEditorFactory *q_ptr; Q_DECLARE_PUBLIC(QtEnumEditorFactory) @@ -1807,19 +1970,36 @@ class QtEnumEditorFactoryPrivate : public EditorFactoryPrivate void slotEnumNamesChanged(QtProperty *property, const QStringList &); void slotEnumIconsChanged(QtProperty *property, const QMap &); void slotSetValue(int value); + void slotResetProperty(); }; +void QtEnumEditorFactoryPrivate::slotResetProperty() +{ + QObject *object = q_ptr->sender(); + const EditorToPropertyMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) { + QtProperty *property = itEditor.value(); + QtEnumPropertyManager *manager = q_ptr->propertyManager(property); + if (!manager) + return; + manager->emitResetProperty(property); + return; + } +} + void QtEnumEditorFactoryPrivate::slotPropertyChanged(QtProperty *property, int value) { if (!m_createdEditors.contains(property)) return; - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QComboBox *editor = itEditor.next(); - editor->blockSignals(true); - editor->setCurrentIndex(value); - editor->blockSignals(false); + QtEnumEditWidget *editor = itEditor.next(); + editor->setStateResetButton(property->isModified()); + editor->blockComboBoxSignals(true); + editor->setValue(value); + editor->blockComboBoxSignals(false); } } @@ -1835,17 +2015,17 @@ void QtEnumEditorFactoryPrivate::slotEnumNamesChanged(QtProperty *property, QMap enumIcons = manager->enumIcons(property); - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QComboBox *editor = itEditor.next(); - editor->blockSignals(true); - editor->clear(); + QtEnumEditWidget *editor = itEditor.next(); + editor->blockComboBoxSignals(true); + editor->clearComboBox(); editor->addItems(enumNames); const int nameCount = enumNames.count(); for (int i = 0; i < nameCount; i++) editor->setItemIcon(i, enumIcons.value(i)); - editor->setCurrentIndex(manager->value(property)); - editor->blockSignals(false); + editor->setValue(manager->value(property)); + editor->blockComboBoxSignals(false); } } @@ -1860,23 +2040,23 @@ void QtEnumEditorFactoryPrivate::slotEnumIconsChanged(QtProperty *property, return; const QStringList enumNames = manager->enumNames(property); - QListIterator itEditor(m_createdEditors[property]); + QListIterator itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { - QComboBox *editor = itEditor.next(); - editor->blockSignals(true); + QtEnumEditWidget *editor = itEditor.next(); + editor->blockComboBoxSignals(true); const int nameCount = enumNames.count(); for (int i = 0; i < nameCount; i++) editor->setItemIcon(i, enumIcons.value(i)); - editor->setCurrentIndex(manager->value(property)); - editor->blockSignals(false); + editor->setValue(manager->value(property)); + editor->blockComboBoxSignals(false); } } void QtEnumEditorFactoryPrivate::slotSetValue(int value) { QObject *object = q_ptr->sender(); - const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); - for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + const QMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (QMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) if (itEditor.key() == object) { QtProperty *property = itEditor.value(); QtEnumPropertyManager *manager = q_ptr->propertyManager(property); @@ -1889,9 +2069,6 @@ void QtEnumEditorFactoryPrivate::slotSetValue(int value) /*! \class QtEnumEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtEnumEditorFactory class provides QComboBox widgets for properties created by QtEnumPropertyManager objects. @@ -1903,8 +2080,9 @@ void QtEnumEditorFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtEnumEditorFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtEnumEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1915,6 +2093,7 @@ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) QtEnumEditorFactory::~QtEnumEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -1924,10 +2103,10 @@ QtEnumEditorFactory::~QtEnumEditorFactory() */ void QtEnumEditorFactory::connectPropertyManager(QtEnumPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - connect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), - this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + connect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + connect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), + this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); } /*! @@ -1938,20 +2117,21 @@ void QtEnumEditorFactory::connectPropertyManager(QtEnumPropertyManager *manager) QWidget *QtEnumEditorFactory::createEditor(QtEnumPropertyManager *manager, QtProperty *property, QWidget *parent) { - QComboBox *editor = d_ptr->createEditor(property, parent); + QtEnumEditWidget *editor = d_ptr->createEditor(property, parent); editor->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); - editor->view()->setTextElideMode(Qt::ElideRight); QStringList enumNames = manager->enumNames(property); editor->addItems(enumNames); QMap enumIcons = manager->enumIcons(property); const int enumNamesCount = enumNames.count(); for (int i = 0; i < enumNamesCount; i++) editor->setItemIcon(i, enumIcons.value(i)); - editor->setCurrentIndex(manager->value(property)); + editor->setValue(manager->value(property)); + editor->setStateResetButton(property->isModified()); - connect(editor, SIGNAL(currentIndexChanged(int)), this, SLOT(slotSetValue(int))); - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); + connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -1962,10 +2142,10 @@ QWidget *QtEnumEditorFactory::createEditor(QtEnumPropertyManager *manager, QtPro */ void QtEnumEditorFactory::disconnectPropertyManager(QtEnumPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotPropertyChanged(QtProperty*,int))); - disconnect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), - this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotPropertyChanged(QtProperty *, int))); + disconnect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), + this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); } // QtCursorEditorFactory @@ -2052,9 +2232,6 @@ void QtCursorEditorFactoryPrivate::slotEditorDestroyed(QObject *object) /*! \class QtCursorEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtCursorEditorFactory class provides QComboBox widgets for properties created by QtCursorPropertyManager objects. @@ -2066,14 +2243,15 @@ void QtCursorEditorFactoryPrivate::slotEditorDestroyed(QObject *object) Creates a factory with the given \a parent. */ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtCursorEditorFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtCursorEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_enumEditorFactory = new QtEnumEditorFactory(this); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotEnumChanged(QtProperty*,int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotEnumChanged(QtProperty *, int))); d_ptr->m_enumEditorFactory->addPropertyManager(d_ptr->m_enumPropertyManager); } @@ -2082,6 +2260,7 @@ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) */ QtCursorEditorFactory::~QtCursorEditorFactory() { + delete d_ptr; } /*! @@ -2091,8 +2270,8 @@ QtCursorEditorFactory::~QtCursorEditorFactory() */ void QtCursorEditorFactory::connectPropertyManager(QtCursorPropertyManager *manager) { - connect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), - this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); + connect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &))); } /*! @@ -2120,8 +2299,8 @@ QWidget *QtCursorEditorFactory::createEditor(QtCursorPropertyManager *manager, Q QWidget *editor = af->createEditor(enumProp, parent); d_ptr->m_enumToEditors[enumProp].append(editor); d_ptr->m_editorToEnum[editor] = enumProp; - connect(editor, SIGNAL(destroyed(QObject*)), - this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), + this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -2132,8 +2311,8 @@ QWidget *QtCursorEditorFactory::createEditor(QtCursorPropertyManager *manager, Q */ void QtCursorEditorFactory::disconnectPropertyManager(QtCursorPropertyManager *manager) { - disconnect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), - this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &))); } // QtColorEditWidget @@ -2198,9 +2377,11 @@ void QtColorEditWidget::setValue(const QColor &c) void QtColorEditWidget::buttonClicked() { - const QColor newColor = QColorDialog::getColor(m_color, this, QString(), QColorDialog::ShowAlphaChannel); - if (newColor.isValid() && newColor != m_color) { - setValue(newColor); + bool ok = false; + QRgb oldRgba = m_color.rgba(); + QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this); + if (ok && newRgba != oldRgba) { + setValue(QColor::fromRgba(newRgba)); emit valueChanged(m_color); } } @@ -2270,9 +2451,6 @@ void QtColorEditorFactoryPrivate::slotSetValue(const QColor &value) /*! \class QtColorEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtColorEditorFactory class provides color editing for properties created by QtColorPropertyManager objects. @@ -2296,6 +2474,7 @@ QtColorEditorFactory::QtColorEditorFactory(QObject *parent) : QtColorEditorFactory::~QtColorEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -2320,7 +2499,7 @@ QWidget *QtColorEditorFactory::createEditor(QtColorPropertyManager *manager, QtColorEditWidget *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(QColor)), this, SLOT(slotSetValue(QColor))); - connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -2483,9 +2662,6 @@ void QtFontEditorFactoryPrivate::slotSetValue(const QFont &value) /*! \class QtFontEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtFontEditorFactory class provides font editing for properties created by QtFontPropertyManager objects. @@ -2509,6 +2685,7 @@ QtFontEditorFactory::QtFontEditorFactory(QObject *parent) : QtFontEditorFactory::~QtFontEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; } /*! @@ -2533,7 +2710,7 @@ QWidget *QtFontEditorFactory::createEditor(QtFontPropertyManager *manager, QtFontEditWidget *editor = d_ptr->createEditor(property, parent); editor->setValue(manager->value(property)); connect(editor, SIGNAL(valueChanged(QFont)), this, SLOT(slotSetValue(QFont))); - connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); return editor; } @@ -2547,7 +2724,270 @@ void QtFontEditorFactory::disconnectPropertyManager(QtFontPropertyManager *manag disconnect(manager, SIGNAL(valueChanged(QtProperty*,QFont)), this, SLOT(slotPropertyChanged(QtProperty*,QFont))); } +class QtTextEditWidget : public QWidget { + Q_OBJECT + +public: + QtTextEditWidget(QWidget *parent); + + bool eventFilter(QObject *obj, QEvent *ev); + +public Q_SLOTS: + void setValue(const QString &value); + void setStateResetButton(bool enabled); + +private Q_SLOTS: + void buttonClicked(); + +Q_SIGNALS: + void valueChanged(const QString &value); + void resetProperty(); + +private: + QLineEdit *m_lineEdit; + QToolButton *m_defaultButton; + QToolButton *m_button; +}; + +QtTextEditWidget::QtTextEditWidget(QWidget *parent) : + QWidget(parent), + m_lineEdit(new QLineEdit), + m_defaultButton(new QToolButton), + m_button(new QToolButton) +{ + QHBoxLayout *lt = new QHBoxLayout(this); + lt->setContentsMargins(0, 0, 0, 0); + lt->setSpacing(0); + lt->addWidget(m_lineEdit); + m_lineEdit->setReadOnly(true); + + m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored); + m_button->setFixedWidth(20); + m_button->setText(tr("...")); + m_button->installEventFilter(this); + + setFocusProxy(m_button); + setFocusPolicy(m_button->focusPolicy()); + + m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); + m_defaultButton->setMaximumWidth(16); + + connect(m_button, SIGNAL(clicked()), this, SLOT(buttonClicked())); + connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); + lt->addWidget(m_button); + lt->addWidget(m_defaultButton); + m_defaultButton->setEnabled(false); +} + +void QtTextEditWidget::setValue(const QString &value) +{ + if (m_lineEdit->text() != value) + m_lineEdit->setText(value); +} + +void QtTextEditWidget::setStateResetButton(bool enabled) +{ + m_defaultButton->setEnabled(enabled); +} + +void QtTextEditWidget::buttonClicked() +{ + QGridLayout *gridLayout; + QPlainTextEdit *plainTextEdit; + QDialogButtonBox *buttonBox; + QDialog *dialog; + + dialog = new QDialog(this); + dialog->resize(400, 300); + gridLayout = new QGridLayout(dialog); + plainTextEdit = new QPlainTextEdit(dialog); + + gridLayout->addWidget(plainTextEdit, 0, 0, 1, 1); + + buttonBox = new QDialogButtonBox(dialog); + buttonBox->setOrientation(Qt::Horizontal); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + gridLayout->addWidget(buttonBox, 1, 0, 1, 1); + + QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); + QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); + + plainTextEdit->textCursor().insertText(m_lineEdit->text()); + + dialog->setModal(true); + dialog->show(); + int result = dialog->exec(); + + if (result == QDialog::Accepted) + { + QString newText = plainTextEdit->document()->toPlainText(); + + setValue(newText); + if (plainTextEdit->document()->isModified()) + Q_EMIT valueChanged(newText); + } + + delete dialog; +} + +bool QtTextEditWidget::eventFilter(QObject *obj, QEvent *ev) +{ + if (obj == m_button) { + switch (ev->type()) { + case QEvent::KeyPress: + case QEvent::KeyRelease: { // Prevent the QToolButton from handling Enter/Escape meant control the delegate + switch (static_cast(ev)->key()) { + case Qt::Key_Escape: + case Qt::Key_Enter: + case Qt::Key_Return: + ev->ignore(); + return true; + default: + break; + } + } + break; + default: + break; + } + } + return QWidget::eventFilter(obj, ev); +} + +// QtLineEditFactory + +class QtTextEditorFactoryPrivate : public EditorFactoryPrivate +{ + QtTextEditorFactory *q_ptr; + Q_DECLARE_PUBLIC(QtTextEditorFactory) +public: + + void slotPropertyChanged(QtProperty *property, const QString &value); + void slotSetValue(const QString &value); + void slotResetProperty(); +}; + +void QtTextEditorFactoryPrivate::slotPropertyChanged(QtProperty *property, + const QString &value) +{ + const PropertyToEditorListMap::iterator it = m_createdEditors.find(property); + if (it == m_createdEditors.end()) + return; + QListIterator itEditor(it.value()); + + while (itEditor.hasNext()) + { + QtTextEditWidget *editor = itEditor.next(); + editor->setValue(value); + editor->setStateResetButton(property->isModified()); + } +} + +void QtTextEditorFactoryPrivate::slotSetValue(const QString &value) +{ + QObject *object = q_ptr->sender(); + const EditorToPropertyMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) { + QtProperty *property = itEditor.value(); + QtTextPropertyManager *manager = q_ptr->propertyManager(property); + if (!manager) + return; + manager->setValue(property, value); + return; + } +} + +void QtTextEditorFactoryPrivate::slotResetProperty() +{ + QObject *object = q_ptr->sender(); + const EditorToPropertyMap::ConstIterator ecend = m_editorToProperty.constEnd(); + for (EditorToPropertyMap::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor) + if (itEditor.key() == object) { + QtProperty *property = itEditor.value(); + QtTextPropertyManager *manager = q_ptr->propertyManager(property); + if (!manager) + return; + manager->emitResetProperty(property); + return; + } +} + +/*! + \class QtTextEditFactory + + \brief The QtTextEditFactory class provides QTextEdit widgets for + properties created by QtStringPropertyManager objects. + + \sa QtAbstractEditorFactory, QtStringPropertyManager +*/ + +/*! + Creates a factory with the given \a parent. +*/ +QtTextEditorFactory::QtTextEditorFactory(QObject *parent) + : QtAbstractEditorFactory(parent) +{ + d_ptr = new QtTextEditorFactoryPrivate(); + d_ptr->q_ptr = this; + +} + +/*! + Destroys this factory, and all the widgets it has created. +*/ +QtTextEditorFactory::~QtTextEditorFactory() +{ + qDeleteAll(d_ptr->m_editorToProperty.keys()); + delete d_ptr; +} + +/*! + \internal + + Reimplemented from the QtAbstractEditorFactory class. +*/ +void QtTextEditorFactory::connectPropertyManager(QtTextPropertyManager *manager) +{ + connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); +} + +/*! + \internal + + Reimplemented from the QtAbstractEditorFactory class. +*/ +QWidget *QtTextEditorFactory::createEditor(QtTextPropertyManager *manager, + QtProperty *property, QWidget *parent) +{ + + QtTextEditWidget *editor = d_ptr->createEditor(property, parent); + + editor->setValue(manager->value(property)); + editor->setStateResetButton(property->isModified()); + + connect(editor, SIGNAL(resetProperty()), this, SLOT(slotResetProperty())); + connect(editor, SIGNAL(valueChanged(QString)), this, SLOT(slotSetValue(QString))); + connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); + return editor; +} + +/*! + \internal + + Reimplemented from the QtAbstractEditorFactory class. +*/ +void QtTextEditorFactory::disconnectPropertyManager(QtTextPropertyManager *manager) +{ + disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotPropertyChanged(QtProperty *, const QString &))); +} + +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qteditorfactory.cpp" +#include "moc_qteditorfactory.cxx" #include "qteditorfactory.moc" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.h b/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.h similarity index 62% rename from studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.h rename to studio/src/3rdparty/qtpropertybrowser/qteditorfactory.h index 411ca166d1..fe47d5f16b 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qteditorfactory.h +++ b/studio/src/3rdparty/qtpropertybrowser/qteditorfactory.h @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -35,13 +89,14 @@ #define QTEDITORFACTORY_H #include "qtpropertymanager.h" -#include "qtpropertybrowser_export.h" +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QtSpinBoxFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -53,7 +108,7 @@ class QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QScopedPointer d_ptr; + QtSpinBoxFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSpinBoxFactory) Q_DISABLE_COPY(QtSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -65,7 +120,7 @@ class QTPROPERTYBROWSER_EXPORT QtSpinBoxFactory : public QtAbstractEditorFactory class QtSliderFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -77,7 +132,7 @@ class QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFactory< QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QScopedPointer d_ptr; + QtSliderFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSliderFactory) Q_DISABLE_COPY(QtSliderFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -89,7 +144,7 @@ class QTPROPERTYBROWSER_EXPORT QtSliderFactory : public QtAbstractEditorFactory< class QtScrollBarFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -101,7 +156,7 @@ class QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFacto QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QScopedPointer d_ptr; + QtScrollBarFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtScrollBarFactory) Q_DISABLE_COPY(QtScrollBarFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -113,7 +168,7 @@ class QTPROPERTYBROWSER_EXPORT QtScrollBarFactory : public QtAbstractEditorFacto class QtCheckBoxFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -125,17 +180,18 @@ class QTPROPERTYBROWSER_EXPORT QtCheckBoxFactory : public QtAbstractEditorFactor QWidget *parent); void disconnectPropertyManager(QtBoolPropertyManager *manager); private: - QScopedPointer d_ptr; + QtCheckBoxFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCheckBoxFactory) Q_DISABLE_COPY(QtCheckBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, bool)) Q_PRIVATE_SLOT(d_func(), void slotSetValue(bool)) Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) + Q_PRIVATE_SLOT(d_func(), void slotResetProperty()) }; class QtDoubleSpinBoxFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -147,7 +203,7 @@ class QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorF QWidget *parent); void disconnectPropertyManager(QtDoublePropertyManager *manager); private: - QScopedPointer d_ptr; + QtDoubleSpinBoxFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) Q_DISABLE_COPY(QtDoubleSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double)) @@ -160,7 +216,7 @@ class QTPROPERTYBROWSER_EXPORT QtDoubleSpinBoxFactory : public QtAbstractEditorF class QtLineEditFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -172,18 +228,19 @@ class QTPROPERTYBROWSER_EXPORT QtLineEditFactory : public QtAbstractEditorFactor QWidget *parent); void disconnectPropertyManager(QtStringPropertyManager *manager); private: - QScopedPointer d_ptr; + QtLineEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtLineEditFactory) Q_DISABLE_COPY(QtLineEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &)) Q_PRIVATE_SLOT(d_func(), void slotRegExpChanged(QtProperty *, const QRegExp &)) Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString &)) + Q_PRIVATE_SLOT(d_func(), void slotEditingFinished()) Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) }; class QtDateEditFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -195,7 +252,7 @@ class QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFactor QWidget *parent); void disconnectPropertyManager(QtDatePropertyManager *manager); private: - QScopedPointer d_ptr; + QtDateEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDateEditFactory) Q_DISABLE_COPY(QtDateEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDate &)) @@ -207,7 +264,7 @@ class QTPROPERTYBROWSER_EXPORT QtDateEditFactory : public QtAbstractEditorFactor class QtTimeEditFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -219,7 +276,7 @@ class QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFactor QWidget *parent); void disconnectPropertyManager(QtTimePropertyManager *manager); private: - QScopedPointer d_ptr; + QtTimeEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtTimeEditFactory) Q_DISABLE_COPY(QtTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QTime &)) @@ -229,7 +286,7 @@ class QTPROPERTYBROWSER_EXPORT QtTimeEditFactory : public QtAbstractEditorFactor class QtDateTimeEditFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -241,7 +298,7 @@ class QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFa QWidget *parent); void disconnectPropertyManager(QtDateTimePropertyManager *manager); private: - QScopedPointer d_ptr; + QtDateTimeEditFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDateTimeEditFactory) Q_DISABLE_COPY(QtDateTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDateTime &)) @@ -251,7 +308,7 @@ class QTPROPERTYBROWSER_EXPORT QtDateTimeEditFactory : public QtAbstractEditorFa class QtKeySequenceEditorFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -263,7 +320,7 @@ class QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstractEdi QWidget *parent); void disconnectPropertyManager(QtKeySequencePropertyManager *manager); private: - QScopedPointer d_ptr; + QtKeySequenceEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) Q_DISABLE_COPY(QtKeySequenceEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QKeySequence &)) @@ -273,7 +330,7 @@ class QTPROPERTYBROWSER_EXPORT QtKeySequenceEditorFactory : public QtAbstractEdi class QtCharEditorFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -285,7 +342,7 @@ class QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorFact QWidget *parent); void disconnectPropertyManager(QtCharPropertyManager *manager); private: - QScopedPointer d_ptr; + QtCharEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCharEditorFactory) Q_DISABLE_COPY(QtCharEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QChar &)) @@ -295,7 +352,7 @@ class QTPROPERTYBROWSER_EXPORT QtCharEditorFactory : public QtAbstractEditorFact class QtEnumEditorFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -307,7 +364,7 @@ class QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorFact QWidget *parent); void disconnectPropertyManager(QtEnumPropertyManager *manager); private: - QScopedPointer d_ptr; + QtEnumEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtEnumEditorFactory) Q_DISABLE_COPY(QtEnumEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -317,11 +374,12 @@ class QTPROPERTYBROWSER_EXPORT QtEnumEditorFactory : public QtAbstractEditorFact const QMap &)) Q_PRIVATE_SLOT(d_func(), void slotSetValue(int)) Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) + Q_PRIVATE_SLOT(d_func(), void slotResetProperty()) }; class QtCursorEditorFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -333,7 +391,7 @@ class QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEditorFa QWidget *parent); void disconnectPropertyManager(QtCursorPropertyManager *manager); private: - QScopedPointer d_ptr; + QtCursorEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCursorEditorFactory) Q_DISABLE_COPY(QtCursorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QCursor &)) @@ -343,7 +401,7 @@ class QTPROPERTYBROWSER_EXPORT QtCursorEditorFactory : public QtAbstractEditorFa class QtColorEditorFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -355,7 +413,7 @@ class QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditorFac QWidget *parent); void disconnectPropertyManager(QtColorPropertyManager *manager); private: - QScopedPointer d_ptr; + QtColorEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtColorEditorFactory) Q_DISABLE_COPY(QtColorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QColor &)) @@ -365,7 +423,7 @@ class QTPROPERTYBROWSER_EXPORT QtColorEditorFactory : public QtAbstractEditorFac class QtFontEditorFactoryPrivate; -class QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorFactory +class QT_QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -377,7 +435,7 @@ class QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorFact QWidget *parent); void disconnectPropertyManager(QtFontPropertyManager *manager); private: - QScopedPointer d_ptr; + QtFontEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtFontEditorFactory) Q_DISABLE_COPY(QtFontEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QFont &)) @@ -385,6 +443,31 @@ class QTPROPERTYBROWSER_EXPORT QtFontEditorFactory : public QtAbstractEditorFact Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QFont &)) }; +class QtTextEditorFactoryPrivate; + +class QT_QTPROPERTYBROWSER_EXPORT QtTextEditorFactory : public QtAbstractEditorFactory +{ + Q_OBJECT +public: + QtTextEditorFactory(QObject *parent = 0); + ~QtTextEditorFactory(); +protected: + void connectPropertyManager(QtTextPropertyManager *manager); + QWidget *createEditor(QtTextPropertyManager *manager, QtProperty *property, + QWidget *parent); + void disconnectPropertyManager(QtTextPropertyManager *manager); +private: + QtTextEditorFactoryPrivate *d_ptr; + Q_DECLARE_PRIVATE(QtTextEditorFactory) + Q_DISABLE_COPY(QtTextEditorFactory) + Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &)) + Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString &)) + Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *)) + Q_PRIVATE_SLOT(d_func(), void slotResetProperty()) +}; + +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif #endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp similarity index 78% rename from studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp index d32f6e5a7a..d789c86956 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.cpp @@ -1,45 +1,101 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qtgroupboxpropertybrowser.h" #include -#include -#include -#include +#include +#include +#include #include #include +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QtGroupBoxPropertyBrowserPrivate { @@ -299,12 +355,15 @@ void QtGroupBoxPropertyBrowserPrivate::propertyRemoved(QtBrowserItem *index) removeRow(parentItem->layout, row); } else { WidgetItem *par = parentItem->parent; + QWidget *w = 0; QGridLayout *l = 0; int oldRow = -1; if (!par) { + w = q_ptr; l = m_mainLayout; oldRow = m_children.indexOf(parentItem); } else { + w = par->groupBox; l = par->layout; oldRow = par->children.indexOf(parentItem); if (hasHeader(par)) @@ -434,9 +493,6 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) /*! \class QtGroupBoxPropertyBrowser - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtGroupBoxPropertyBrowser class provides a QGroupBox based property browser. @@ -465,8 +521,9 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtGroupBoxPropertyBrowser::QtGroupBoxPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent), d_ptr(new QtGroupBoxPropertyBrowserPrivate) + : QtAbstractPropertyBrowser(parent) { + d_ptr = new QtGroupBoxPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -487,6 +544,7 @@ QtGroupBoxPropertyBrowser::~QtGroupBoxPropertyBrowser() const QMap::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); + delete d_ptr; } /*! @@ -513,6 +571,8 @@ void QtGroupBoxPropertyBrowser::itemChanged(QtBrowserItem *item) d_ptr->propertyChanged(item); } +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qtgroupboxpropertybrowser.cpp" +#include "moc_qtgroupboxpropertybrowser.cxx" diff --git a/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h new file mode 100644 index 0000000000..075f3286e7 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/qtgroupboxpropertybrowser.h @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTGROUPBOXPROPERTYBROWSER_H +#define QTGROUPBOXPROPERTYBROWSER_H + +#include "qtpropertybrowser.h" + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QtGroupBoxPropertyBrowserPrivate; + +class QT_QTPROPERTYBROWSER_EXPORT QtGroupBoxPropertyBrowser : public QtAbstractPropertyBrowser +{ + Q_OBJECT +public: + + QtGroupBoxPropertyBrowser(QWidget *parent = 0); + ~QtGroupBoxPropertyBrowser(); + +protected: + virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); + virtual void itemRemoved(QtBrowserItem *item); + virtual void itemChanged(QtBrowserItem *item); + +private: + + QtGroupBoxPropertyBrowserPrivate *d_ptr; + Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) + Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) + Q_PRIVATE_SLOT(d_func(), void slotUpdate()) + Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) + +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.cpp similarity index 87% rename from studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.cpp index aac4c086ad..9b7d98b092 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.cpp @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -40,12 +94,14 @@ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QtPropertyPrivate { public: - QtPropertyPrivate(QtAbstractPropertyManager *manager) : m_enabled(true), m_modified(false), m_manager(manager) {} + QtPropertyPrivate(QtAbstractPropertyManager *manager) : m_enabled(true), m_modified(false), m_bold(false), m_manager(manager) {} QtProperty *q_ptr; QSet m_parentItems; @@ -57,6 +113,7 @@ class QtPropertyPrivate QString m_name; bool m_enabled; bool m_modified; + bool m_bold; QtAbstractPropertyManager * const m_manager; }; @@ -78,9 +135,6 @@ class QtAbstractPropertyManagerPrivate /*! \class QtProperty - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtProperty class encapsulates an instance of a property. @@ -94,23 +148,23 @@ class QtAbstractPropertyManagerPrivate provides functions for retrieving as well as setting their values: \table - \header \li Getter \li Setter + \header \o Getter \o Setter \row - \li propertyName() \li setPropertyName() + \o propertyName() \o setPropertyName() \row - \li statusTip() \li setStatusTip() + \o statusTip() \o setStatusTip() \row - \li toolTip() \li setToolTip() + \o toolTip() \o setToolTip() \row - \li whatsThis() \li setWhatsThis() + \o whatsThis() \o setWhatsThis() \row - \li isEnabled() \li setEnabled() + \o isEnabled() \o setEnabled() \row - \li isModified() \li setModified() + \o isModified() \o setModified() \row - \li valueText() \li Nop + \o valueText() \o Nop \row - \li valueIcon() \li Nop + \o valueIcon() \o Nop \endtable It is also possible to nest properties: QtProperty provides the @@ -134,8 +188,8 @@ class QtAbstractPropertyManagerPrivate \sa QtAbstractPropertyManager::addProperty() */ QtProperty::QtProperty(QtAbstractPropertyManager *manager) - : d_ptr(new QtPropertyPrivate(manager)) { + d_ptr = new QtPropertyPrivate(manager); d_ptr->q_ptr = this; } @@ -169,6 +223,7 @@ QtProperty::~QtProperty() QtProperty *property = itParent.next(); property->d_ptr->m_subItems.removeAll(this); } + delete d_ptr; } /*! @@ -252,6 +307,16 @@ bool QtProperty::isModified() const return d_ptr->m_modified; } +/*! + Returns whether the property is displayed as bold. + + \sa setBold() +*/ +bool QtProperty::isBold() const +{ + return d_ptr->m_bold; +} + /*! Returns whether the property has a value. @@ -374,6 +439,20 @@ void QtProperty::setModified(bool modified) propertyChanged(); } +/*! + Sets the property's bold state according to the passed \a bold value. + + \sa isBold() +*/ +void QtProperty::setBold(bool bold) +{ + if (d_ptr->m_bold == bold) + return; + + d_ptr->m_bold = bold; + propertyChanged(); +} + /*! Appends the given \a property to this property's subproperties. @@ -511,9 +590,6 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, /*! \class QtAbstractPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtAbstractPropertyManager provides an interface for property managers. @@ -541,23 +617,23 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, implementations are available: \list - \li QtBoolPropertyManager - \li QtColorPropertyManager - \li QtDatePropertyManager - \li QtDateTimePropertyManager - \li QtDoublePropertyManager - \li QtEnumPropertyManager - \li QtFlagPropertyManager - \li QtFontPropertyManager - \li QtGroupPropertyManager - \li QtIntPropertyManager - \li QtPointPropertyManager - \li QtRectPropertyManager - \li QtSizePropertyManager - \li QtSizePolicyPropertyManager - \li QtStringPropertyManager - \li QtTimePropertyManager - \li QtVariantPropertyManager + \o QtBoolPropertyManager + \o QtColorPropertyManager + \o QtDatePropertyManager + \o QtDateTimePropertyManager + \o QtDoublePropertyManager + \o QtEnumPropertyManager + \o QtFlagPropertyManager + \o QtFontPropertyManager + \o QtGroupPropertyManager + \o QtIntPropertyManager + \o QtPointPropertyManager + \o QtRectPropertyManager + \o QtSizePropertyManager + \o QtSizePolicyPropertyManager + \o QtStringPropertyManager + \o QtTimePropertyManager + \o QtVariantPropertyManager \endlist \sa QtAbstractEditorFactoryBase, QtAbstractPropertyBrowser, QtProperty @@ -629,8 +705,9 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, Creates an abstract property manager with the given \a parent. */ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) - : QObject(parent), d_ptr(new QtAbstractPropertyManagerPrivate) + : QObject(parent) { + d_ptr = new QtAbstractPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -642,6 +719,7 @@ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) QtAbstractPropertyManager::~QtAbstractPropertyManager() { clear(); + delete d_ptr; } /*! @@ -730,6 +808,11 @@ QtProperty *QtAbstractPropertyManager::addProperty(const QString &name) return property; } +void QtAbstractPropertyManager::emitResetProperty(QtProperty *property) +{ + emit resetProperty(property); +} + /*! Creates a property. @@ -770,7 +853,7 @@ QtProperty *QtAbstractPropertyManager::createProperty() property is being destroyed so that it can remove the property's additional attributes. - \sa clear(), propertyDestroyed() + \sa clear(), propertyDestroyed() */ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) { @@ -781,9 +864,6 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) /*! \class QtAbstractEditorFactoryBase - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtAbstractEditorFactoryBase provides an interface for editor factories. @@ -807,17 +887,17 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) implementations are available: \list - \li QtCheckBoxFactory - \li QtDateEditFactory - \li QtDateTimeEditFactory - \li QtDoubleSpinBoxFactory - \li QtEnumEditorFactory - \li QtLineEditFactory - \li QtScrollBarFactory - \li QtSliderFactory - \li QtSpinBoxFactory - \li QtTimeEditFactory - \li QtVariantEditorFactory + \o QtCheckBoxFactory + \o QtDateEditFactory + \o QtDateTimeEditFactory + \o QtDoubleSpinBoxFactory + \o QtEnumEditorFactory + \o QtLineEditFactory + \o QtScrollBarFactory + \o QtSliderFactory + \o QtSpinBoxFactory + \o QtTimeEditFactory + \o QtVariantEditorFactory \endlist \sa QtAbstractPropertyManager, QtAbstractPropertyBrowser @@ -834,7 +914,7 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) which also provides a pure virtual convenience overload of this function enabling access to the property's manager. - \sa QtAbstractEditorFactory::createEditor() + \sa QtAbstractEditorFactory::createEditor() */ /*! @@ -867,9 +947,6 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) /*! \class QtAbstractEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtAbstractEditorFactory is the base template class for editor factories. @@ -883,7 +960,10 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) PropertyManager template argument class which can be any QtAbstractPropertyManager subclass. For example: - \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 0 + \code + QtSpinBoxFactory *factory; + QSet managers = factory->propertyManagers(); + \endcode Note that QtSpinBoxFactory by definition creates editing widgets \e only for properties created by QtIntPropertyManager. @@ -908,17 +988,17 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) are available: \list - \li QtCheckBoxFactory - \li QtDateEditFactory - \li QtDateTimeEditFactory - \li QtDoubleSpinBoxFactory - \li QtEnumEditorFactory - \li QtLineEditFactory - \li QtScrollBarFactory - \li QtSliderFactory - \li QtSpinBoxFactory - \li QtTimeEditFactory - \li QtVariantEditorFactory + \o QtCheckBoxFactory + \o QtDateEditFactory + \o QtDateTimeEditFactory + \o QtDoubleSpinBoxFactory + \o QtEnumEditorFactory + \o QtLineEditFactory + \o QtScrollBarFactory + \o QtSliderFactory + \o QtSpinBoxFactory + \o QtTimeEditFactory + \o QtVariantEditorFactory \endlist When deriving from the QtAbstractEditorFactory class, several pure virtual @@ -1046,6 +1126,7 @@ void QtAbstractPropertyManager::uninitializeProperty(QtProperty *property) \fn virtual void QtAbstractEditorFactory::managerDestroyed(QObject *manager) \internal + \reimp */ //////////////////////////////////// @@ -1084,9 +1165,6 @@ void QtBrowserItemPrivate::removeChild(QtBrowserItem *index) /*! \class QtBrowserItem - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtBrowserItem class represents a property in a property browser instance. @@ -1135,7 +1213,12 @@ QtBrowserItem *QtBrowserItem::parent() const reproduced from children items are always the same as reproduced from associated property' children, for example: - \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 1 + \code + QtBrowserItem *item; + QList childrenItems = item->children(); + + QList childrenProperties = item->property()->subProperties(); + \endcode The \e childrenItems list represents the same list as \e childrenProperties. */ @@ -1155,13 +1238,14 @@ QtAbstractPropertyBrowser *QtBrowserItem::browser() const } QtBrowserItem::QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent) - : d_ptr(new QtBrowserItemPrivate(browser, property, parent)) { + d_ptr = new QtBrowserItemPrivate(browser, property, parent); d_ptr->q_ptr = this; } QtBrowserItem::~QtBrowserItem() { + delete d_ptr; } @@ -1234,11 +1318,11 @@ void QtAbstractPropertyBrowserPrivate::insertSubTree(QtProperty *property, QtProperty *, QtProperty *))); q_ptr->connect(manager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); - q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty*)), - q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); - q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty*)), - q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); + q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty *)), + q_ptr, SLOT(slotPropertyDestroyed(QtProperty *))); + q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty *)), + q_ptr, SLOT(slotPropertyDataChanged(QtProperty *))); } m_managerToProperties[manager].append(property); m_propertyToParents[property].append(parentProperty); @@ -1274,11 +1358,11 @@ void QtAbstractPropertyBrowserPrivate::removeSubTree(QtProperty *property, QtProperty *, QtProperty *))); q_ptr->disconnect(manager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), - q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); - q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty*)), - q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); - q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty*)), - q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); + q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); + q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty *)), + q_ptr, SLOT(slotPropertyDestroyed(QtProperty *))); + q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty *)), + q_ptr, SLOT(slotPropertyDataChanged(QtProperty *))); m_managerToProperties.remove(manager); } @@ -1460,9 +1544,6 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope /*! \class QtAbstractPropertyBrowser - \internal - \inmodule QtDesigner - \since 4.4 \brief QtAbstractPropertyBrowser provides a base class for implementing property browsers. @@ -1521,9 +1602,20 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope \table 100% \row - \li - \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 2 - \li \image qtpropertybrowser-duplicate.png + \o + \code + QtProperty *property1, *property2, *property3; + + property2->addSubProperty(property1); + property3->addSubProperty(property2); + + QtAbstractPropertyBrowser *editor; + + editor->addProperty(property1); + editor->addProperty(property2); + editor->addProperty(property3); + \endcode + \o \image qtpropertybrowser-duplicate.png \endtable The addProperty() function returns a QtBrowserItem that uniquely @@ -1537,8 +1629,8 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope implementations: \list - \li QtGroupBoxPropertyBrowser - \li QtTreePropertyBrowser + \o QtGroupBoxPropertyBrowser + \o QtTreePropertyBrowser \endlist \sa QtAbstractPropertyManager, QtAbstractEditorFactoryBase @@ -1554,7 +1646,23 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope For example: - \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp 3 + \code + QtIntPropertyManager *intManager; + QtDoublePropertyManager *doubleManager; + + QtProperty *myInteger = intManager->addProperty(); + QtProperty *myDouble = doubleManager->addProperty(); + + QtSpinBoxFactory *spinBoxFactory; + QtDoubleSpinBoxFactory *doubleSpinBoxFactory; + + QtAbstractPropertyBrowser *editor; + editor->setFactoryForManager(intManager, spinBoxFactory); + editor->setFactoryForManager(doubleManager, doubleSpinBoxFactory); + + editor->addProperty(myInteger); + editor->addProperty(myDouble); + \endcode In this example the \c myInteger property's value is displayed with a QSpinBox widget, while the \c myDouble property's value is @@ -1633,8 +1741,9 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope Creates an abstract property browser with the given \a parent. */ QtAbstractPropertyBrowser::QtAbstractPropertyBrowser(QWidget *parent) - : QWidget(parent), d_ptr(new QtAbstractPropertyBrowserPrivate) + : QWidget(parent) { + d_ptr = new QtAbstractPropertyBrowserPrivate; d_ptr->q_ptr = this; } @@ -1657,6 +1766,7 @@ QtAbstractPropertyBrowser::~QtAbstractPropertyBrowser() QListIterator itItem(indexes); while (itItem.hasNext()) d_ptr->clearIndex(itItem.next()); + delete d_ptr; } /*! @@ -1774,12 +1884,14 @@ QtBrowserItem *QtAbstractPropertyBrowser::insertProperty(QtProperty *property, QList pendingList = properties(); int pos = 0; int newPos = 0; + QtProperty *properAfterProperty = 0; while (pos < pendingList.count()) { QtProperty *prop = pendingList.at(pos); if (prop == property) return 0; if (prop == afterProperty) { newPos = pos + 1; + properAfterProperty = afterProperty; } pos++; } @@ -1859,14 +1971,7 @@ QWidget *QtAbstractPropertyBrowser::createEditor(QtProperty *property, if (!factory) return 0; - QWidget *w = factory->createEditor(property, parent); - // Since some editors can be QComboBoxes, and we changed their focus policy in Qt 5 - // to make them feel more native on Mac, we need to relax the focus policy to something - // more permissive to keep the combo box from losing focus, allowing it to stay alive, - // when the user clicks on it to show the popup. - if (w) - w->setFocusPolicy(Qt::WheelFocus); - return w; + return factory->createEditor(property, parent); } bool QtAbstractPropertyBrowser::addFactory(QtAbstractPropertyManager *abstractManager, @@ -1946,6 +2051,8 @@ void QtAbstractPropertyBrowser::setCurrentItem(QtBrowserItem *item) emit currentItemChanged(item); } +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qtpropertybrowser.cpp" +#include "moc_qtpropertybrowser.cxx" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.h similarity index 62% rename from studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.h rename to studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.h index eaa4a60fbd..5b63d3917f 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowser.h +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.h @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -34,17 +88,34 @@ #ifndef QTPROPERTYBROWSER_H #define QTPROPERTYBROWSER_H -#include "qtpropertybrowser_export.h" - -#include +#include #include +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif + +#if defined(Q_WS_WIN) +# if !defined(QT_QTPROPERTYBROWSER_EXPORT) && !defined(QT_QTPROPERTYBROWSER_IMPORT) +# define QT_QTPROPERTYBROWSER_EXPORT +# elif defined(QT_QTPROPERTYBROWSER_IMPORT) +# if defined(QT_QTPROPERTYBROWSER_EXPORT) +# undef QT_QTPROPERTYBROWSER_EXPORT +# endif +# define QT_QTPROPERTYBROWSER_EXPORT __declspec(dllimport) +# elif defined(QT_QTPROPERTYBROWSER_EXPORT) +# undef QT_QTPROPERTYBROWSER_EXPORT +# define QT_QTPROPERTYBROWSER_EXPORT __declspec(dllexport) +# endif +#else +# define QT_QTPROPERTYBROWSER_EXPORT +#endif + class QtAbstractPropertyManager; class QtPropertyPrivate; -class QTPROPERTYBROWSER_EXPORT QtProperty +class QT_QTPROPERTYBROWSER_EXPORT QtProperty { public: virtual ~QtProperty(); @@ -57,8 +128,10 @@ class QTPROPERTYBROWSER_EXPORT QtProperty QString statusTip() const; QString whatsThis() const; QString propertyName() const; + bool isEnabled() const; bool isModified() const; + bool isBold() const; bool hasValue() const; QIcon valueIcon() const; @@ -70,6 +143,7 @@ class QTPROPERTYBROWSER_EXPORT QtProperty void setPropertyName(const QString &text); void setEnabled(bool enable); void setModified(bool modified); + void setBold(bool bold); void addSubProperty(QtProperty *property); void insertSubProperty(QtProperty *property, QtProperty *afterProperty); @@ -79,12 +153,12 @@ class QTPROPERTYBROWSER_EXPORT QtProperty void propertyChanged(); private: friend class QtAbstractPropertyManager; - QScopedPointer d_ptr; + QtPropertyPrivate *d_ptr; }; class QtAbstractPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject +class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject { Q_OBJECT public: @@ -96,6 +170,7 @@ class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject void clear() const; QtProperty *addProperty(const QString &name = QString()); + void emitResetProperty(QtProperty *property); Q_SIGNALS: void propertyInserted(QtProperty *property, @@ -103,6 +178,7 @@ class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject void propertyChanged(QtProperty *property); void propertyRemoved(QtProperty *property, QtProperty *parent); void propertyDestroyed(QtProperty *property); + void resetProperty(QtProperty *property); protected: virtual bool hasValue(const QtProperty *property) const; virtual QIcon valueIcon(const QtProperty *property) const; @@ -112,12 +188,12 @@ class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyManager : public QObject virtual QtProperty *createProperty(); private: friend class QtProperty; - QScopedPointer d_ptr; + QtAbstractPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyManager) Q_DISABLE_COPY(QtAbstractPropertyManager) }; -class QTPROPERTYBROWSER_EXPORT QtAbstractEditorFactoryBase : public QObject +class QT_QTPROPERTYBROWSER_EXPORT QtAbstractEditorFactoryBase : public QObject { Q_OBJECT public: @@ -219,7 +295,7 @@ class QtAbstractEditorFactory : public QtAbstractEditorFactoryBase class QtAbstractPropertyBrowser; class QtBrowserItemPrivate; -class QTPROPERTYBROWSER_EXPORT QtBrowserItem +class QT_QTPROPERTYBROWSER_EXPORT QtBrowserItem { public: QtProperty *property() const; @@ -229,13 +305,13 @@ class QTPROPERTYBROWSER_EXPORT QtBrowserItem private: explicit QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent); ~QtBrowserItem(); - QScopedPointer d_ptr; + QtBrowserItemPrivate *d_ptr; friend class QtAbstractPropertyBrowserPrivate; }; class QtAbstractPropertyBrowserPrivate; -class QTPROPERTYBROWSER_EXPORT QtAbstractPropertyBrowser : public QWidget +class QT_QTPROPERTYBROWSER_EXPORT QtAbstractPropertyBrowser : public QWidget { Q_OBJECT public: @@ -286,7 +362,7 @@ public Q_SLOTS: bool addFactory(QtAbstractPropertyManager *abstractManager, QtAbstractEditorFactoryBase *abstractFactory); - QScopedPointer d_ptr; + QtAbstractPropertyBrowserPrivate *d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyBrowser) Q_DISABLE_COPY(QtAbstractPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotPropertyInserted(QtProperty *, @@ -298,6 +374,8 @@ public Q_SLOTS: }; +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif #endif // QTPROPERTYBROWSER_H diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri new file mode 100644 index 0000000000..6a6050c75a --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.pri @@ -0,0 +1,30 @@ +include(../common.pri) +INCLUDEPATH += $$PWD +DEPENDPATH += $$PWD + +qtpropertybrowser-uselib:!qtpropertybrowser-buildlib { + LIBS += -L$$QTPROPERTYBROWSER_LIBDIR -l$$QTPROPERTYBROWSER_LIBNAME +} else { + SOURCES += $$PWD/qtpropertybrowser.cpp \ + $$PWD/qtpropertymanager.cpp \ + $$PWD/qteditorfactory.cpp \ + $$PWD/qtvariantproperty.cpp \ + $$PWD/qttreepropertybrowser.cpp \ + $$PWD/qtbuttonpropertybrowser.cpp \ + $$PWD/qtgroupboxpropertybrowser.cpp \ + $$PWD/qtpropertybrowserutils.cpp + HEADERS += $$PWD/qtpropertybrowser.h \ + $$PWD/qtpropertymanager.h \ + $$PWD/qteditorfactory.h \ + $$PWD/qtvariantproperty.h \ + $$PWD/qttreepropertybrowser.h \ + $$PWD/qtbuttonpropertybrowser.h \ + $$PWD/qtgroupboxpropertybrowser.h \ + $$PWD/qtpropertybrowserutils_p.h + RESOURCES += $$PWD/qtpropertybrowser.qrc +} + +win32 { + contains(TEMPLATE, lib):contains(CONFIG, shared):DEFINES += QT_QTPROPERTYBROWSER_EXPORT + else:qtpropertybrowser-uselib:DEFINES += QT_QTPROPERTYBROWSER_IMPORT +} diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc index a7d37dd10d..50c2479f26 100644 --- a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowser.qrc @@ -1,5 +1,5 @@ - + images/cursor-arrow.png images/cursor-busy.png images/cursor-closedhand.png @@ -18,6 +18,7 @@ images/cursor-vsplit.png images/cursor-wait.png images/cursor-whatsthis.png + images/resetproperty.png - + diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp new file mode 100644 index 0000000000..9b482a5692 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils.cpp @@ -0,0 +1,492 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qtpropertybrowserutils_p.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +QtCursorDatabase::QtCursorDatabase() +{ + appendCursor(Qt::ArrowCursor, QApplication::translate("QtCursorDatabase", "Arrow", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-arrow.png"))); + appendCursor(Qt::UpArrowCursor, QApplication::translate("QtCursorDatabase", "Up Arrow", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-uparrow.png"))); + appendCursor(Qt::CrossCursor, QApplication::translate("QtCursorDatabase", "Cross", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-cross.png"))); + appendCursor(Qt::WaitCursor, QApplication::translate("QtCursorDatabase", "Wait", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-wait.png"))); + appendCursor(Qt::IBeamCursor, QApplication::translate("QtCursorDatabase", "IBeam", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-ibeam.png"))); + appendCursor(Qt::SizeVerCursor, QApplication::translate("QtCursorDatabase", "Size Vertical", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizev.png"))); + appendCursor(Qt::SizeHorCursor, QApplication::translate("QtCursorDatabase", "Size Horizontal", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeh.png"))); + appendCursor(Qt::SizeFDiagCursor, QApplication::translate("QtCursorDatabase", "Size Backslash", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizef.png"))); + appendCursor(Qt::SizeBDiagCursor, QApplication::translate("QtCursorDatabase", "Size Slash", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeb.png"))); + appendCursor(Qt::SizeAllCursor, QApplication::translate("QtCursorDatabase", "Size All", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeall.png"))); + appendCursor(Qt::BlankCursor, QApplication::translate("QtCursorDatabase", "Blank", 0, + QApplication::UnicodeUTF8), QIcon()); + appendCursor(Qt::SplitVCursor, QApplication::translate("QtCursorDatabase", "Split Vertical", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-vsplit.png"))); + appendCursor(Qt::SplitHCursor, QApplication::translate("QtCursorDatabase", "Split Horizontal", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hsplit.png"))); + appendCursor(Qt::PointingHandCursor, QApplication::translate("QtCursorDatabase", "Pointing Hand", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hand.png"))); + appendCursor(Qt::ForbiddenCursor, QApplication::translate("QtCursorDatabase", "Forbidden", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-forbidden.png"))); + appendCursor(Qt::OpenHandCursor, QApplication::translate("QtCursorDatabase", "Open Hand", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-openhand.png"))); + appendCursor(Qt::ClosedHandCursor, QApplication::translate("QtCursorDatabase", "Closed Hand", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-closedhand.png"))); + appendCursor(Qt::WhatsThisCursor, QApplication::translate("QtCursorDatabase", "What's This", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-whatsthis.png"))); + appendCursor(Qt::BusyCursor, QApplication::translate("QtCursorDatabase", "Busy", 0, + QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png"))); +} + +void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) +{ + if (m_cursorShapeToValue.contains(shape)) + return; + int value = m_cursorNames.count(); + m_cursorNames.append(name); + m_cursorIcons[value] = icon; + m_valueToCursorShape[value] = shape; + m_cursorShapeToValue[shape] = value; +} + +QStringList QtCursorDatabase::cursorShapeNames() const +{ + return m_cursorNames; +} + +QMap QtCursorDatabase::cursorShapeIcons() const +{ + return m_cursorIcons; +} + +QString QtCursorDatabase::cursorToShapeName(const QCursor &cursor) const +{ + int val = cursorToValue(cursor); + if (val >= 0) + return m_cursorNames.at(val); + return QString(); +} + +QIcon QtCursorDatabase::cursorToShapeIcon(const QCursor &cursor) const +{ + int val = cursorToValue(cursor); + return m_cursorIcons.value(val); +} + +int QtCursorDatabase::cursorToValue(const QCursor &cursor) const +{ +#ifndef QT_NO_CURSOR + Qt::CursorShape shape = cursor.shape(); + if (m_cursorShapeToValue.contains(shape)) + return m_cursorShapeToValue[shape]; +#endif + return -1; +} + +#ifndef QT_NO_CURSOR +QCursor QtCursorDatabase::valueToCursor(int value) const +{ + if (m_valueToCursorShape.contains(value)) + return QCursor(m_valueToCursorShape[value]); + return QCursor(); +} +#endif + +QPixmap QtPropertyBrowserUtils::brushValuePixmap(const QBrush &b) +{ + QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); + img.fill(0); + + QPainter painter(&img); + painter.setCompositionMode(QPainter::CompositionMode_Source); + painter.fillRect(0, 0, img.width(), img.height(), b); + QColor color = b.color(); + if (color.alpha() != 255) { // indicate alpha by an inset + QBrush opaqueBrush = b; + color.setAlpha(255); + opaqueBrush.setColor(color); + painter.fillRect(img.width() / 4, img.height() / 4, + img.width() / 2, img.height() / 2, opaqueBrush); + } + painter.end(); + return QPixmap::fromImage(img); +} + +QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b) +{ + return QIcon(brushValuePixmap(b)); +} + +QString QtPropertyBrowserUtils::colorValueText(const QColor &c) +{ + return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2, %3] (%4)", 0, QApplication::UnicodeUTF8) + .arg(QString::number(c.red())) + .arg(QString::number(c.green())) + .arg(QString::number(c.blue())) + .arg(QString::number(c.alpha())); +} + +QPixmap QtPropertyBrowserUtils::fontValuePixmap(const QFont &font) +{ + QFont f = font; + QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); + img.fill(0); + QPainter p(&img); + p.setRenderHint(QPainter::TextAntialiasing, true); + p.setRenderHint(QPainter::Antialiasing, true); + f.setPointSize(13); + p.setFont(f); + QTextOption t; + t.setAlignment(Qt::AlignCenter); + p.drawText(QRect(0, 0, 16, 16), QString(QLatin1Char('A')), t); + return QPixmap::fromImage(img); +} + +QIcon QtPropertyBrowserUtils::fontValueIcon(const QFont &f) +{ + return QIcon(fontValuePixmap(f)); +} + +QString QtPropertyBrowserUtils::fontValueText(const QFont &f) +{ + return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2]", 0, QApplication::UnicodeUTF8) + .arg(f.family()) + .arg(f.pointSize()); +} + + +QtBoolEdit::QtBoolEdit(QWidget *parent) : + QWidget(parent), + m_checkBox(new QCheckBox(this)), + m_defaultButton(new QToolButton(this)), + m_textVisible(true) +{ + m_defaultButton->setIcon(QIcon(":/trolltech/qtpropertybrowser/images/resetproperty.png")); + m_defaultButton->setMaximumWidth(16); + m_defaultButton->setEnabled(false); + + QHBoxLayout *lt = new QHBoxLayout; + if (QApplication::layoutDirection() == Qt::LeftToRight) + lt->setContentsMargins(4, 0, 0, 0); + else + lt->setContentsMargins(0, 0, 4, 0); + lt->addWidget(m_checkBox); + lt->addWidget(m_defaultButton); + setLayout(lt); + + connect(m_checkBox, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool))); + connect(m_defaultButton, SIGNAL(clicked()), this, SIGNAL(resetProperty())); + + setFocusProxy(m_checkBox); + m_checkBox->setText(QString()); +} + +void QtBoolEdit::setTextVisible(bool textVisible) +{ + if (m_textVisible == textVisible) + return; + + m_textVisible = textVisible; + m_checkBox->setText(QString()); +} + +Qt::CheckState QtBoolEdit::checkState() const +{ + return m_checkBox->checkState(); +} + +void QtBoolEdit::setCheckState(Qt::CheckState state) +{ + m_checkBox->setCheckState(state); +} + +void QtBoolEdit::setStateResetButton(bool enabled) +{ + m_defaultButton->setEnabled(enabled); +} + +bool QtBoolEdit::isChecked() const +{ + return m_checkBox->isChecked(); +} + +void QtBoolEdit::setChecked(bool c) +{ + m_checkBox->setChecked(c); + if (!m_textVisible) + return; + m_checkBox->setText(QString()); +} + +bool QtBoolEdit::blockCheckBoxSignals(bool block) +{ + return m_checkBox->blockSignals(block); +} + +void QtBoolEdit::mousePressEvent(QMouseEvent *event) +{ + if (event->buttons() == Qt::LeftButton) { + m_checkBox->click(); + event->accept(); + } else { + QWidget::mousePressEvent(event); + } +} + + +QtKeySequenceEdit::QtKeySequenceEdit(QWidget *parent) + : QWidget(parent), m_num(0), m_lineEdit(new QLineEdit(this)) +{ + QHBoxLayout *layout = new QHBoxLayout(this); + layout->addWidget(m_lineEdit); + layout->setMargin(0); + m_lineEdit->installEventFilter(this); + m_lineEdit->setReadOnly(true); + m_lineEdit->setFocusProxy(this); + setFocusPolicy(m_lineEdit->focusPolicy()); + setAttribute(Qt::WA_InputMethodEnabled); +} + +bool QtKeySequenceEdit::eventFilter(QObject *o, QEvent *e) +{ + if (o == m_lineEdit && e->type() == QEvent::ContextMenu) { + QContextMenuEvent *c = static_cast(e); + QMenu *menu = m_lineEdit->createStandardContextMenu(); + const QList actions = menu->actions(); + QListIterator itAction(actions); + while (itAction.hasNext()) { + QAction *action = itAction.next(); + action->setShortcut(QKeySequence()); + QString actionString = action->text(); + const int pos = actionString.lastIndexOf(QLatin1Char('\t')); + if (pos > 0) + actionString.remove(pos, actionString.length() - pos); + action->setText(actionString); + } + QAction *actionBefore = 0; + if (actions.count() > 0) + actionBefore = actions[0]; + QAction *clearAction = new QAction(tr("Clear Shortcut"), menu); + menu->insertAction(actionBefore, clearAction); + menu->insertSeparator(actionBefore); + clearAction->setEnabled(!m_keySequence.isEmpty()); + connect(clearAction, SIGNAL(triggered()), this, SLOT(slotClearShortcut())); + menu->exec(c->globalPos()); + delete menu; + e->accept(); + return true; + } + + return QWidget::eventFilter(o, e); +} + +void QtKeySequenceEdit::slotClearShortcut() +{ + if (m_keySequence.isEmpty()) + return; + setKeySequence(QKeySequence()); + emit keySequenceChanged(m_keySequence); +} + +void QtKeySequenceEdit::handleKeyEvent(QKeyEvent *e) +{ + int nextKey = e->key(); + if (nextKey == Qt::Key_Control || nextKey == Qt::Key_Shift || + nextKey == Qt::Key_Meta || nextKey == Qt::Key_Alt || + nextKey == Qt::Key_Super_L || nextKey == Qt::Key_AltGr) + return; + + nextKey |= translateModifiers(e->modifiers(), e->text()); + int k0 = m_keySequence[0]; + int k1 = m_keySequence[1]; + int k2 = m_keySequence[2]; + int k3 = m_keySequence[3]; + switch (m_num) { + case 0: k0 = nextKey; k1 = 0; k2 = 0; k3 = 0; break; + case 1: k1 = nextKey; k2 = 0; k3 = 0; break; + case 2: k2 = nextKey; k3 = 0; break; + case 3: k3 = nextKey; break; + default: break; + } + ++m_num; + if (m_num > 3) + m_num = 0; + m_keySequence = QKeySequence(k0, k1, k2, k3); + m_lineEdit->setText(m_keySequence.toString(QKeySequence::NativeText)); + e->accept(); + emit keySequenceChanged(m_keySequence); +} + +void QtKeySequenceEdit::setKeySequence(const QKeySequence &sequence) +{ + if (sequence == m_keySequence) + return; + m_num = 0; + m_keySequence = sequence; + m_lineEdit->setText(m_keySequence.toString(QKeySequence::NativeText)); +} + +QKeySequence QtKeySequenceEdit::keySequence() const +{ + return m_keySequence; +} + +int QtKeySequenceEdit::translateModifiers(Qt::KeyboardModifiers state, const QString &text) const +{ + int result = 0; + if ((state & Qt::ShiftModifier) && (text.size() == 0 || !text.at(0).isPrint() || text.at(0).isLetter() || text.at(0).isSpace())) + result |= Qt::SHIFT; + if (state & Qt::ControlModifier) + result |= Qt::CTRL; + if (state & Qt::MetaModifier) + result |= Qt::META; + if (state & Qt::AltModifier) + result |= Qt::ALT; + return result; +} + +void QtKeySequenceEdit::focusInEvent(QFocusEvent *e) +{ + m_lineEdit->event(e); + m_lineEdit->selectAll(); + QWidget::focusInEvent(e); +} + +void QtKeySequenceEdit::focusOutEvent(QFocusEvent *e) +{ + m_num = 0; + m_lineEdit->event(e); + QWidget::focusOutEvent(e); +} + +void QtKeySequenceEdit::keyPressEvent(QKeyEvent *e) +{ + handleKeyEvent(e); + e->accept(); +} + +void QtKeySequenceEdit::keyReleaseEvent(QKeyEvent *e) +{ + m_lineEdit->event(e); +} + +bool QtKeySequenceEdit::event(QEvent *e) +{ + if (e->type() == QEvent::Shortcut || + e->type() == QEvent::ShortcutOverride || + e->type() == QEvent::KeyRelease) { + e->accept(); + return true; + } + return QWidget::event(e); +} + + + + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h new file mode 100644 index 0000000000..66156c5d4c --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertybrowserutils_p.h @@ -0,0 +1,211 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of Qt Designer. This header +// file may change from version to version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QTPROPERTYBROWSERUTILS_H +#define QTPROPERTYBROWSERUTILS_H + +#include +#include +#include +#include + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QMouseEvent; +class QCheckBox; +class QToolButton; +class QLineEdit; + +class QtCursorDatabase +{ +public: + QtCursorDatabase(); + + QStringList cursorShapeNames() const; + QMap cursorShapeIcons() const; + QString cursorToShapeName(const QCursor &cursor) const; + QIcon cursorToShapeIcon(const QCursor &cursor) const; + int cursorToValue(const QCursor &cursor) const; +#ifndef QT_NO_CURSOR + QCursor valueToCursor(int value) const; +#endif +private: + void appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon); + QStringList m_cursorNames; + QMap m_cursorIcons; + QMap m_valueToCursorShape; + QMap m_cursorShapeToValue; +}; + +class QtPropertyBrowserUtils +{ +public: + static QPixmap brushValuePixmap(const QBrush &b); + static QIcon brushValueIcon(const QBrush &b); + static QString colorValueText(const QColor &c); + static QPixmap fontValuePixmap(const QFont &f); + static QIcon fontValueIcon(const QFont &f); + static QString fontValueText(const QFont &f); +}; + +class QtBoolEdit : public QWidget { + Q_OBJECT +public: + QtBoolEdit(QWidget *parent = 0); + + bool textVisible() const { return m_textVisible; } + void setTextVisible(bool textVisible); + + Qt::CheckState checkState() const; + void setCheckState(Qt::CheckState state); + void setStateResetButton(bool enabled); + + bool isChecked() const; + void setChecked(bool c); + + bool blockCheckBoxSignals(bool block); + +Q_SIGNALS: + void toggled(bool); + void resetProperty(); + +protected: + void mousePressEvent(QMouseEvent * event); + +private: + QCheckBox *m_checkBox; + QToolButton *m_defaultButton; + bool m_textVisible; +}; + +class QtKeySequenceEdit : public QWidget +{ + Q_OBJECT +public: + QtKeySequenceEdit(QWidget *parent = 0); + + QKeySequence keySequence() const; + bool eventFilter(QObject *o, QEvent *e); +public Q_SLOTS: + void setKeySequence(const QKeySequence &sequence); +Q_SIGNALS: + void keySequenceChanged(const QKeySequence &sequence); +protected: + void focusInEvent(QFocusEvent *e); + void focusOutEvent(QFocusEvent *e); + void keyPressEvent(QKeyEvent *e); + void keyReleaseEvent(QKeyEvent *e); + bool event(QEvent *e); +private slots: + void slotClearShortcut(); +private: + void handleKeyEvent(QKeyEvent *e); + int translateModifiers(Qt::KeyboardModifiers state, const QString &text) const; + + int m_num; + QKeySequence m_keySequence; + QLineEdit *m_lineEdit; +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.cpp b/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.cpp similarity index 93% rename from studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.cpp rename to studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.cpp index eea0900cea..fe8ea92c9f 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.cpp @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -40,11 +94,12 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include +#include #include #include @@ -53,7 +108,9 @@ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif template static void setSimpleMinimumData(PrivateData *data, const Value &minVal) @@ -182,7 +239,7 @@ static Value getData(const QMap &propertyMap, const QtProperty *property, const Value &defaultValue = Value()) { typedef QMap PropertyToData; - typedef typename PropertyToData::const_iterator PropertyToDataConstIterator; + typedef Q_TYPENAME PropertyToData::const_iterator PropertyToDataConstIterator; const PropertyToDataConstIterator it = propertyMap.constFind(property); if (it == propertyMap.constEnd()) return defaultValue; @@ -218,7 +275,7 @@ static void setSimpleValue(QMap &propertyMap, QtProperty *property, const Value &val) { typedef QMap PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = propertyMap.find(property); if (it == propertyMap.end()) return; @@ -239,9 +296,9 @@ static void setValueInRange(PropertyManager *manager, PropertyManagerPrivate *ma QtProperty *property, const Value &val, void (PropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, ValueChangeParameter)) { - typedef typename PropertyManagerPrivate::Data PrivateData; + typedef Q_TYPENAME PropertyManagerPrivate::Data PrivateData; typedef QMap PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -274,9 +331,9 @@ static void setBorderValues(PropertyManager *manager, PropertyManagerPrivate *ma void (PropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, ValueChangeParameter, ValueChangeParameter, ValueChangeParameter)) { - typedef typename PropertyManagerPrivate::Data PrivateData; + typedef Q_TYPENAME PropertyManagerPrivate::Data PrivateData; typedef QMap PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -319,7 +376,7 @@ static void setBorderValue(PropertyManager *manager, PropertyManagerPrivate *man ValueChangeParameter, ValueChangeParameter, ValueChangeParameter)) { typedef QMap PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + typedef Q_TYPENAME PropertyToData::iterator PropertyToDataIterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -411,6 +468,23 @@ class QtMetaEnumProvider QMetaEnum m_policyEnum; }; +#if QT_VERSION < 0x040300 + +static QList countriesForLanguage(QLocale::Language language) +{ + QList countries; + QLocale::Country country = QLocale::AnyCountry; + while (country <= QLocale::LastCountry) { + QLocale locale(language, country); + if (locale.language() == language && !countries.contains(locale.country())) + countries << locale.country(); + country = (QLocale::Country)((uint)country + 1); // ++country + } + return countries; +} + +#endif + static QList sortCountries(const QList &countries) { QMultiMap nameToCountry; @@ -442,7 +516,11 @@ void QtMetaEnumProvider::initLocale() while (itLang.hasNext()) { QLocale::Language language = itLang.next(); QList countries; +#if QT_VERSION < 0x040300 + countries = countriesForLanguage(language); +#else countries = QLocale::countriesForLanguage(language); +#endif if (countries.isEmpty() && language == system.language()) countries << system.country(); @@ -532,9 +610,6 @@ Q_GLOBAL_STATIC(QtMetaEnumProvider, metaEnumProvider) /*! \class QtGroupPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtGroupPropertyManager provides and manages group properties. @@ -612,9 +687,6 @@ class QtIntPropertyManagerPrivate /*! \class QtIntPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtIntPropertyManager provides and manages int properties. @@ -669,8 +741,9 @@ class QtIntPropertyManagerPrivate Creates a manager with the given \a parent. */ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtIntPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtIntPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -680,6 +753,7 @@ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) QtIntPropertyManager::~QtIntPropertyManager() { clear(); + delete d_ptr; } /*! @@ -752,7 +826,7 @@ QString QtIntPropertyManager::valueText(const QtProperty *property) const void QtIntPropertyManager::setValue(QtProperty *property, int val) { void (QtIntPropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, int) = 0; - setValueInRange(this, d_ptr.data(), + setValueInRange(this, d_ptr, &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -769,7 +843,7 @@ void QtIntPropertyManager::setValue(QtProperty *property, int val) */ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) { - setMinimumValue(this, d_ptr.data(), + setMinimumValue(this, d_ptr, &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -787,7 +861,7 @@ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) */ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) { - setMaximumValue(this, d_ptr.data(), + setMaximumValue(this, d_ptr, &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -811,7 +885,7 @@ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) void QtIntPropertyManager::setRange(QtProperty *property, int minVal, int maxVal) { void (QtIntPropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, int, int, int) = 0; - setBorderValues(this, d_ptr.data(), + setBorderValues(this, d_ptr, &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -872,7 +946,7 @@ class QtDoublePropertyManagerPrivate struct Data { - Data() : val(0), minVal(-DBL_MAX), maxVal(DBL_MAX), singleStep(1), decimals(2) {} + Data() : val(0), minVal(-INT_MAX), maxVal(INT_MAX), singleStep(1), decimals(2) {} double val; double minVal; double maxVal; @@ -890,9 +964,6 @@ class QtDoublePropertyManagerPrivate /*! \class QtDoublePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtDoublePropertyManager provides and manages double properties. @@ -958,8 +1029,9 @@ class QtDoublePropertyManagerPrivate Creates a manager with the given \a parent. */ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtDoublePropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtDoublePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -969,6 +1041,7 @@ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) QtDoublePropertyManager::~QtDoublePropertyManager() { clear(); + delete d_ptr; } /*! @@ -1034,7 +1107,8 @@ QString QtDoublePropertyManager::valueText(const QtProperty *property) const const QtDoublePropertyManagerPrivate::PropertyValueMap::const_iterator it = d_ptr->m_values.constFind(property); if (it == d_ptr->m_values.constEnd()) return QString(); - return QString::number(it.value().val, 'f', it.value().decimals); + + return QString("%1").arg(it.value().val); } /*! @@ -1051,7 +1125,7 @@ QString QtDoublePropertyManager::valueText(const QtProperty *property) const void QtDoublePropertyManager::setValue(QtProperty *property, double val) { void (QtDoublePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, double) = 0; - setValueInRange(this, d_ptr.data(), + setValueInRange(this, d_ptr, &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1128,7 +1202,7 @@ void QtDoublePropertyManager::setDecimals(QtProperty *property, int prec) */ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) { - setMinimumValue(this, d_ptr.data(), + setMinimumValue(this, d_ptr, &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1146,7 +1220,7 @@ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) */ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) { - setMaximumValue(this, d_ptr.data(), + setMaximumValue(this, d_ptr, &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1170,7 +1244,7 @@ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) void QtDoublePropertyManager::setRange(QtProperty *property, double minVal, double maxVal) { void (QtDoublePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, double, double, double) = 0; - setBorderValues(this, d_ptr.data(), + setBorderValues(this, d_ptr, &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1216,9 +1290,6 @@ class QtStringPropertyManagerPrivate /*! \class QtStringPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtStringPropertyManager provides and manages QString properties. @@ -1261,8 +1332,9 @@ class QtStringPropertyManagerPrivate Creates a manager with the given \a parent. */ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtStringPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtStringPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1272,6 +1344,7 @@ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) QtStringPropertyManager::~QtStringPropertyManager() { clear(); + delete d_ptr; } /*! @@ -1383,59 +1456,18 @@ void QtStringPropertyManager::uninitializeProperty(QtProperty *property) } // QtBoolPropertyManager -// Return an icon containing a check box indicator -static QIcon drawCheckBox(bool value) -{ - QStyleOptionButton opt; - opt.state |= value ? QStyle::State_On : QStyle::State_Off; - opt.state |= QStyle::State_Enabled; - const QStyle *style = QApplication::style(); - // Figure out size of an indicator and make sure it is not scaled down in a list view item - // by making the pixmap as big as a list view icon and centering the indicator in it. - // (if it is smaller, it can't be helped) - const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt); - const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt); - const int listViewIconSize = indicatorWidth; - const int pixmapWidth = indicatorWidth; - const int pixmapHeight = qMax(indicatorHeight, listViewIconSize); - - opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight); - QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight); - pixmap.fill(Qt::transparent); - { - // Center? - const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0; - const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0; - QPainter painter(&pixmap); - painter.translate(xoff, yoff); - style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter); - } - return QIcon(pixmap); -} class QtBoolPropertyManagerPrivate { QtBoolPropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtBoolPropertyManager) public: - QtBoolPropertyManagerPrivate(); QMap m_values; - const QIcon m_checkedIcon; - const QIcon m_uncheckedIcon; }; -QtBoolPropertyManagerPrivate::QtBoolPropertyManagerPrivate() : - m_checkedIcon(drawCheckBox(true)), - m_uncheckedIcon(drawCheckBox(false)) -{ -} - /*! \class QtBoolPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtBoolPropertyManager class provides and manages boolean properties. @@ -1461,8 +1493,9 @@ QtBoolPropertyManagerPrivate::QtBoolPropertyManagerPrivate() : Creates a manager with the given \a parent. */ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtBoolPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtBoolPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1472,6 +1505,7 @@ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) QtBoolPropertyManager::~QtBoolPropertyManager() { clear(); + delete d_ptr; } /*! @@ -1492,13 +1526,37 @@ bool QtBoolPropertyManager::value(const QtProperty *property) const */ QString QtBoolPropertyManager::valueText(const QtProperty *property) const { - const QMap::const_iterator it = d_ptr->m_values.constFind(property); - if (it == d_ptr->m_values.constEnd()) - return QString(); + return QString(); +} - static const QString trueText = tr("True"); - static const QString falseText = tr("False"); - return it.value() ? trueText : falseText; +// Return an icon containing a check box indicator +static QIcon drawCheckBox(bool value) +{ + QStyleOptionButton opt; + opt.state |= value ? QStyle::State_On : QStyle::State_Off; + opt.state |= QStyle::State_Enabled; + const QStyle *style = QApplication::style(); + // Figure out size of an indicator and make sure it is not scaled down in a list view item + // by making the pixmap as big as a list view icon and centering the indicator in it. + // (if it is smaller, it can't be helped) + const int indicatorWidth = style->pixelMetric(QStyle::PM_IndicatorWidth, &opt); + const int indicatorHeight = style->pixelMetric(QStyle::PM_IndicatorHeight, &opt); + const int listViewIconSize = indicatorWidth; + const int pixmapWidth = indicatorWidth; + const int pixmapHeight = qMax(indicatorHeight, listViewIconSize); + + opt.rect = QRect(0, 0, indicatorWidth, indicatorHeight); + QPixmap pixmap = QPixmap(pixmapWidth, pixmapHeight); + pixmap.fill(Qt::transparent); + { + // Center? + const int xoff = (pixmapWidth > indicatorWidth) ? (pixmapWidth - indicatorWidth) / 2 : 0; + const int yoff = (pixmapHeight > indicatorHeight) ? (pixmapHeight - indicatorHeight) / 2 : 0; + QPainter painter(&pixmap); + painter.translate(xoff, yoff); + style->drawPrimitive(QStyle::PE_IndicatorCheckBox, &opt, &painter); + } + return QIcon(pixmap); } /*! @@ -1510,7 +1568,9 @@ QIcon QtBoolPropertyManager::valueIcon(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QIcon(); - return it.value() ? d_ptr->m_checkedIcon : d_ptr->m_uncheckedIcon; + static const QIcon checkedIcon = drawCheckBox(true); + static const QIcon uncheckedIcon = drawCheckBox(false); + return it.value() ? checkedIcon : uncheckedIcon; } /*! @@ -1551,7 +1611,6 @@ class QtDatePropertyManagerPrivate QtDatePropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtDatePropertyManager) public: - explicit QtDatePropertyManagerPrivate(QtDatePropertyManager *q); struct Data { @@ -1572,17 +1631,8 @@ class QtDatePropertyManagerPrivate QMap m_values; }; -QtDatePropertyManagerPrivate::QtDatePropertyManagerPrivate(QtDatePropertyManager *q) : - q_ptr(q), - m_format(QtPropertyBrowserUtils::dateFormat()) -{ -} - /*! \class QtDatePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtDatePropertyManager provides and manages QDate properties. @@ -1627,8 +1677,13 @@ QtDatePropertyManagerPrivate::QtDatePropertyManagerPrivate(QtDatePropertyManager Creates a manager with the given \a parent. */ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate(this)) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtDatePropertyManagerPrivate; + d_ptr->q_ptr = this; + + QLocale loc; + d_ptr->m_format = loc.dateFormat(QLocale::ShortFormat); } /*! @@ -1637,6 +1692,7 @@ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) QtDatePropertyManager::~QtDatePropertyManager() { clear(); + delete d_ptr; } /*! @@ -1697,7 +1753,7 @@ QString QtDatePropertyManager::valueText(const QtProperty *property) const void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) { void (QtDatePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, const QDate &) = 0; - setValueInRange(this, d_ptr.data(), + setValueInRange(this, d_ptr, &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1714,7 +1770,7 @@ void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) */ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal) { - setMinimumValue(this, d_ptr.data(), + setMinimumValue(this, d_ptr, &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1732,7 +1788,7 @@ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal */ void QtDatePropertyManager::setMaximum(QtProperty *property, const QDate &maxVal) { - setMaximumValue(this, d_ptr.data(), + setMaximumValue(this, d_ptr, &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1757,7 +1813,7 @@ void QtDatePropertyManager::setRange(QtProperty *property, const QDate &minVal, { void (QtDatePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, const QDate &, const QDate &, const QDate &) = 0; - setBorderValues(this, d_ptr.data(), + setBorderValues(this, d_ptr, &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1787,25 +1843,15 @@ class QtTimePropertyManagerPrivate QtTimePropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtTimePropertyManager) public: - explicit QtTimePropertyManagerPrivate(QtTimePropertyManager *q); - const QString m_format; + QString m_format; typedef QMap PropertyValueMap; PropertyValueMap m_values; }; -QtTimePropertyManagerPrivate::QtTimePropertyManagerPrivate(QtTimePropertyManager *q) : - q_ptr(q), - m_format(QtPropertyBrowserUtils::timeFormat()) -{ -} - /*! \class QtTimePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtTimePropertyManager provides and manages QTime properties. @@ -1833,8 +1879,13 @@ QtTimePropertyManagerPrivate::QtTimePropertyManagerPrivate(QtTimePropertyManager Creates a manager with the given \a parent. */ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate(this)) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtTimePropertyManagerPrivate; + d_ptr->q_ptr = this; + + QLocale loc; + d_ptr->m_format = loc.timeFormat(QLocale::ShortFormat); } /*! @@ -1843,6 +1894,7 @@ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) QtTimePropertyManager::~QtTimePropertyManager() { clear(); + delete d_ptr; } /*! @@ -1907,24 +1959,14 @@ class QtDateTimePropertyManagerPrivate QtDateTimePropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtDateTimePropertyManager) public: - explicit QtDateTimePropertyManagerPrivate(QtDateTimePropertyManager *q); - const QString m_format; + QString m_format; typedef QMap PropertyValueMap; PropertyValueMap m_values; }; -QtDateTimePropertyManagerPrivate::QtDateTimePropertyManagerPrivate(QtDateTimePropertyManager *q) : - q_ptr(q), - m_format(QtPropertyBrowserUtils::dateTimeFormat()) -{ -} - /*! \class QtDateTimePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtDateTimePropertyManager provides and manages QDateTime properties. @@ -1949,8 +1991,15 @@ QtDateTimePropertyManagerPrivate::QtDateTimePropertyManagerPrivate(QtDateTimePro Creates a manager with the given \a parent. */ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate(this)) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtDateTimePropertyManagerPrivate; + d_ptr->q_ptr = this; + + QLocale loc; + d_ptr->m_format = loc.dateFormat(QLocale::ShortFormat); + d_ptr->m_format += QLatin1Char(' '); + d_ptr->m_format += loc.timeFormat(QLocale::ShortFormat); } /*! @@ -1959,6 +2008,7 @@ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) QtDateTimePropertyManager::~QtDateTimePropertyManager() { clear(); + delete d_ptr; } /*! @@ -2031,9 +2081,6 @@ class QtKeySequencePropertyManagerPrivate }; /*! \class QtKeySequencePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtKeySequencePropertyManager provides and manages QKeySequence properties. @@ -2059,8 +2106,9 @@ class QtKeySequencePropertyManagerPrivate Creates a manager with the given \a parent. */ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtKeySequencePropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtKeySequencePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2070,6 +2118,7 @@ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) QtKeySequencePropertyManager::~QtKeySequencePropertyManager() { clear(); + delete d_ptr; } /*! @@ -2140,9 +2189,6 @@ class QtCharPropertyManagerPrivate }; /*! \class QtCharPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtCharPropertyManager provides and manages QChar properties. @@ -2168,8 +2214,9 @@ class QtCharPropertyManagerPrivate Creates a manager with the given \a parent. */ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtCharPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtCharPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2179,6 +2226,7 @@ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) QtCharPropertyManager::~QtCharPropertyManager() { clear(); + delete d_ptr; } /*! @@ -2298,9 +2346,6 @@ void QtLocalePropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) /*! \class QtLocalePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtLocalePropertyManager provides and manages QLocale properties. @@ -2334,16 +2379,17 @@ void QtLocalePropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtLocalePropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtLocalePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotEnumChanged(QtProperty*,int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotEnumChanged(QtProperty *, int))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -2352,6 +2398,7 @@ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) QtLocalePropertyManager::~QtLocalePropertyManager() { clear(); + delete d_ptr; } /*! @@ -2391,23 +2438,15 @@ QString QtLocalePropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); - const QLocale loc = it.value(); + QLocale loc = it.value(); int langIdx = 0; int countryIdx = 0; - const QtMetaEnumProvider *me = metaEnumProvider(); - me->localeToIndex(loc.language(), loc.country(), &langIdx, &countryIdx); - if (langIdx < 0) { - qWarning("QtLocalePropertyManager::valueText: Unknown language %d", loc.language()); - return tr(""); - } - const QString languageName = me->languageEnumNames().at(langIdx); - if (countryIdx < 0) { - qWarning("QtLocalePropertyManager::valueText: Unknown country %d for %s", loc.country(), qPrintable(languageName)); - return languageName; - } - const QString countryName = me->countryEnumNames(loc.language()).at(countryIdx); - return tr("%1, %2").arg(languageName, countryName); + metaEnumProvider()->localeToIndex(loc.language(), loc.country(), &langIdx, &countryIdx); + QString str = tr("%1, %2") + .arg(metaEnumProvider()->languageEnumNames().at(langIdx)) + .arg(metaEnumProvider()->countryEnumNames(loc.language()).at(countryIdx)); + return str; } /*! @@ -2543,9 +2582,6 @@ void QtPointPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) } /*! \class QtPointPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtPointPropertyManager provides and manages QPoint properties. @@ -2579,15 +2615,16 @@ void QtPointPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtPointPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtPointPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotIntChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -2596,6 +2633,7 @@ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) QtPointPropertyManager::~QtPointPropertyManager() { clear(); + delete d_ptr; } /*! @@ -2635,8 +2673,8 @@ QString QtPointPropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); const QPoint v = it.value(); - return tr("(%1, %2)").arg(QString::number(v.x())) - .arg(QString::number(v.y())); + return QString(tr("(%1, %2)").arg(QString::number(v.x())) + .arg(QString::number(v.y()))); } /*! @@ -2763,9 +2801,6 @@ void QtPointFPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) } /*! \class QtPointFPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtPointFPropertyManager provides and manages QPointF properties. @@ -2809,15 +2844,16 @@ void QtPointFPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtPointFPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtPointFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotDoubleChanged(QtProperty*,double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotDoubleChanged(QtProperty *, double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -2826,6 +2862,7 @@ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) QtPointFPropertyManager::~QtPointFPropertyManager() { clear(); + delete d_ptr; } /*! @@ -2876,8 +2913,8 @@ QString QtPointFPropertyManager::valueText(const QtProperty *property) const return QString(); const QPointF v = it.value().val; const int dec = it.value().decimals; - return tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec)) - .arg(QString::number(v.y(), 'f', dec)); + return QString(tr("(%1, %2)").arg(QString::number(v.x(), 'f', dec)) + .arg(QString::number(v.y(), 'f', dec))); } /*! @@ -3066,9 +3103,6 @@ void QtSizePropertyManagerPrivate::setRange(QtProperty *property, /*! \class QtSizePropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtSizePropertyManager provides and manages QSize properties. @@ -3120,15 +3154,16 @@ void QtSizePropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtSizePropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtSizePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotIntChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -3137,6 +3172,7 @@ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) QtSizePropertyManager::~QtSizePropertyManager() { clear(); + delete d_ptr; } /*! @@ -3196,8 +3232,8 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); const QSize v = it.value().val; - return tr("%1 x %2").arg(QString::number(v.width())) - .arg(QString::number(v.height())); + return QString(tr("%1 x %2").arg(QString::number(v.width())) + .arg(QString::number(v.height()))); } /*! @@ -3213,7 +3249,7 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const */ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) { - setValueInRange(this, d_ptr.data(), + setValueInRange(this, d_ptr, &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, property, val, &QtSizePropertyManagerPrivate::setValue); @@ -3230,7 +3266,7 @@ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) */ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal) { - setBorderValue(this, d_ptr.data(), + setBorderValue(this, d_ptr, &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3251,7 +3287,7 @@ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal */ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal) { - setBorderValue(this, d_ptr.data(), + setBorderValue(this, d_ptr, &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3273,11 +3309,11 @@ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal When setting a new range, the current value is adjusted if necessary (ensuring that the value remains within the range). - \sa setMinimum(), setMaximum(), rangeChanged() + \sa setMinimum(), setMaximum(), rangeChanged() */ void QtSizePropertyManager::setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal) { - setBorderValues(this, d_ptr.data(), + setBorderValues(this, d_ptr, &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3410,9 +3446,6 @@ void QtSizeFPropertyManagerPrivate::setRange(QtProperty *property, /*! \class QtSizeFPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtSizeFPropertyManager provides and manages QSizeF properties. @@ -3474,15 +3507,16 @@ void QtSizeFPropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtSizeFPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtSizeFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotDoubleChanged(QtProperty*,double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotDoubleChanged(QtProperty *, double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -3491,6 +3525,7 @@ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) QtSizeFPropertyManager::~QtSizeFPropertyManager() { clear(); + delete d_ptr; } /*! @@ -3561,8 +3596,8 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const return QString(); const QSizeF v = it.value().val; const int dec = it.value().decimals; - return tr("%1 x %2").arg(QString::number(v.width(), 'f', dec)) - .arg(QString::number(v.height(), 'f', dec)); + return QString(tr("%1 x %2").arg(QString::number(v.width(), 'f', dec)) + .arg(QString::number(v.height(), 'f', dec))); } /*! @@ -3578,7 +3613,7 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const */ void QtSizeFPropertyManager::setValue(QtProperty *property, const QSizeF &val) { - setValueInRange(this, d_ptr.data(), + setValueInRange(this, d_ptr, &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, property, val, &QtSizeFPropertyManagerPrivate::setValue); @@ -3629,7 +3664,7 @@ void QtSizeFPropertyManager::setDecimals(QtProperty *property, int prec) */ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minVal) { - setBorderValue(this, d_ptr.data(), + setBorderValue(this, d_ptr, &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3650,7 +3685,7 @@ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minV */ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxVal) { - setBorderValue(this, d_ptr.data(), + setBorderValue(this, d_ptr, &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3672,11 +3707,11 @@ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxV When setting a new range, the current value is adjusted if necessary (ensuring that the value remains within the range). - \sa setMinimum(), setMaximum(), rangeChanged() + \sa setMinimum(), setMaximum(), rangeChanged() */ void QtSizeFPropertyManager::setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal) { - setBorderValues(this, d_ptr.data(), + setBorderValues(this, d_ptr, &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3836,9 +3871,6 @@ void QtRectPropertyManagerPrivate::setConstraint(QtProperty *property, /*! \class QtRectPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtRectPropertyManager provides and manages QRect properties. @@ -3888,15 +3920,16 @@ void QtRectPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtRectPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtRectPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotIntChanged(QtProperty*,int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotIntChanged(QtProperty *, int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -3905,6 +3938,7 @@ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) QtRectPropertyManager::~QtRectPropertyManager() { clear(); + delete d_ptr; } /*! @@ -3954,10 +3988,10 @@ QString QtRectPropertyManager::valueText(const QtProperty *property) const if (it == d_ptr->m_values.constEnd()) return QString(); const QRect v = it.value().val; - return tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x())) - .arg(QString::number(v.y())) - .arg(QString::number(v.width())) - .arg(QString::number(v.height())); + return QString(tr("[(%1, %2), %3 x %4]").arg(QString::number(v.x())) + .arg(QString::number(v.y())) + .arg(QString::number(v.width())) + .arg(QString::number(v.height()))); } /*! @@ -4246,9 +4280,6 @@ void QtRectFPropertyManagerPrivate::setConstraint(QtProperty *property, /*! \class QtRectFPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtRectFPropertyManager provides and manages QRectF properties. @@ -4308,15 +4339,16 @@ void QtRectFPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtRectFPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtRectFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); - connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotDoubleChanged(QtProperty*,double))); - connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotDoubleChanged(QtProperty *, double))); + connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -4325,6 +4357,7 @@ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) QtRectFPropertyManager::~QtRectFPropertyManager() { clear(); + delete d_ptr; } /*! @@ -4633,9 +4666,6 @@ class QtEnumPropertyManagerPrivate /*! \class QtEnumPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtEnumPropertyManager provides and manages enum properties. @@ -4691,8 +4721,9 @@ class QtEnumPropertyManagerPrivate Creates a manager with the given \a parent. */ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtEnumPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtEnumPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -4702,6 +4733,7 @@ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) QtEnumPropertyManager::~QtEnumPropertyManager() { clear(); + delete d_ptr; } /*! @@ -4945,9 +4977,6 @@ void QtFlagPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) /*! \class QtFlagPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtFlagPropertyManager provides and manages flag properties. @@ -5001,15 +5030,16 @@ void QtFlagPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtFlagPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtFlagPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); - connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotBoolChanged(QtProperty*,bool))); - connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotBoolChanged(QtProperty *, bool))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -5018,6 +5048,7 @@ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) QtFlagPropertyManager::~QtFlagPropertyManager() { clear(); + delete d_ptr; } /*! @@ -5289,9 +5320,6 @@ void QtSizePolicyPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *prope /*! \class QtSizePolicyPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtSizePolicyPropertyManager provides and manages QSizePolicy properties. @@ -5327,21 +5355,22 @@ void QtSizePolicyPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *prope Creates a manager with the given \a parent. */ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtSizePolicyPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtSizePolicyPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotIntChanged(QtProperty *, int))); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotEnumChanged(QtProperty*,int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotEnumChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -5350,6 +5379,7 @@ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) QtSizePolicyPropertyManager::~QtSizePolicyPropertyManager() { clear(); + delete d_ptr; } /*! @@ -5698,9 +5728,6 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() /*! \class QtFontPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtFontPropertyManager provides and manages QFont properties. @@ -5737,27 +5764,30 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() Creates a manager with the given \a parent. */ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtFontPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtFontPropertyManagerPrivate; d_ptr->q_ptr = this; +#if QT_VERSION >= 0x040500 QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged())); +#endif d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotIntChanged(QtProperty *, int))); d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); - connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotEnumChanged(QtProperty*,int))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotEnumChanged(QtProperty *, int))); d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); - connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotBoolChanged(QtProperty*,bool))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotBoolChanged(QtProperty *, bool))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); - connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); - connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); + connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -5766,6 +5796,7 @@ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) QtFontPropertyManager::~QtFontPropertyManager() { clear(); + delete d_ptr; } /*! @@ -6076,9 +6107,6 @@ void QtColorPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) /*! \class QtColorPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtColorPropertyManager provides and manages QColor properties. @@ -6113,16 +6141,17 @@ void QtColorPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtColorPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtColorPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); - connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotIntChanged(QtProperty*,int))); + connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotIntChanged(QtProperty *, int))); - connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), - this, SLOT(slotPropertyDestroyed(QtProperty*))); + connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty *)), + this, SLOT(slotPropertyDestroyed(QtProperty *))); } /*! @@ -6131,6 +6160,7 @@ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) QtColorPropertyManager::~QtColorPropertyManager() { clear(); + delete d_ptr; } /*! @@ -6293,25 +6323,8 @@ void QtColorPropertyManager::uninitializeProperty(QtProperty *property) // QtCursorPropertyManager -// Make sure icons are removed as soon as QApplication is destroyed, otherwise, -// handles are leaked on X11. -static void clearCursorDatabase(); -namespace { -struct CursorDatabase : public QtCursorDatabase -{ - CursorDatabase() - { - qAddPostRoutine(clearCursorDatabase); - } -}; -} Q_GLOBAL_STATIC(QtCursorDatabase, cursorDatabase) -static void clearCursorDatabase() -{ - cursorDatabase()->clear(); -} - class QtCursorPropertyManagerPrivate { QtCursorPropertyManager *q_ptr; @@ -6323,9 +6336,6 @@ class QtCursorPropertyManagerPrivate /*! \class QtCursorPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtCursorPropertyManager provides and manages QCursor properties. @@ -6352,8 +6362,9 @@ class QtCursorPropertyManagerPrivate Creates a manager with the given \a parent. */ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtCursorPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtCursorPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -6363,6 +6374,7 @@ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) QtCursorPropertyManager::~QtCursorPropertyManager() { clear(); + delete d_ptr; } /*! @@ -6446,7 +6458,23 @@ void QtCursorPropertyManager::uninitializeProperty(QtProperty *property) d_ptr->m_values.remove(property); } +QString QtTextPropertyManager::valueText(const QtProperty *property) const +{ + QString text = QtStringPropertyManager::valueText(property); + for (int i = 0; i < text.size(); i++) + { + if (text.at(i) == '\n') + { + QStringRef ret(&text, 0, i); + return ret.toString() + " ..."; + } + } + return text; +} + +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qtpropertymanager.cpp" +#include "moc_qtpropertymanager.cxx" #include "qtpropertymanager.moc" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.h b/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.h similarity index 75% rename from studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.h rename to studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.h index 0b1c1fd24e..a19dd6e03a 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertymanager.h +++ b/studio/src/3rdparty/qtpropertybrowser/qtpropertymanager.h @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -34,17 +88,18 @@ #ifndef QTPROPERTYMANAGER_H #define QTPROPERTYMANAGER_H -#include "qtpropertybrowser_export.h" #include "qtpropertybrowser.h" +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QDate; class QTime; class QDateTime; class QLocale; -class QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -60,7 +115,7 @@ class QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractPropert class QtIntPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtIntPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtIntPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -87,14 +142,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtIntPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtIntPropertyManager) Q_DISABLE_COPY(QtIntPropertyManager) }; class QtBoolPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -105,22 +160,24 @@ class QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractProperty public Q_SLOTS: void setValue(QtProperty *property, bool val); + Q_SIGNALS: void valueChanged(QtProperty *property, bool val); + protected: QString valueText(const QtProperty *property) const; QIcon valueIcon(const QtProperty *property) const; virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtBoolPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtBoolPropertyManager) Q_DISABLE_COPY(QtBoolPropertyManager) }; class QtDoublePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtDoublePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtDoublePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -150,14 +207,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtDoublePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDoublePropertyManager) Q_DISABLE_COPY(QtDoublePropertyManager) }; class QtStringPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtStringPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtStringPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -178,14 +235,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtStringPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtStringPropertyManager) Q_DISABLE_COPY(QtStringPropertyManager) }; class QtDatePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtDatePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtDatePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -209,14 +266,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtDatePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDatePropertyManager) Q_DISABLE_COPY(QtDatePropertyManager) }; class QtTimePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtTimePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtTimePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -234,14 +291,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtTimePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtTimePropertyManager) Q_DISABLE_COPY(QtTimePropertyManager) }; class QtDateTimePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtDateTimePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtDateTimePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -259,14 +316,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtDateTimePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtDateTimePropertyManager) Q_DISABLE_COPY(QtDateTimePropertyManager) }; class QtKeySequencePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtKeySequencePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtKeySequencePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -284,14 +341,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtKeySequencePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) Q_DISABLE_COPY(QtKeySequencePropertyManager) }; class QtCharPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtCharPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtCharPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -309,7 +366,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtCharPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCharPropertyManager) Q_DISABLE_COPY(QtCharPropertyManager) }; @@ -317,7 +374,7 @@ public Q_SLOTS: class QtEnumPropertyManager; class QtLocalePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtLocalePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtLocalePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -337,7 +394,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtLocalePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtLocalePropertyManager) Q_DISABLE_COPY(QtLocalePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) @@ -346,7 +403,7 @@ public Q_SLOTS: class QtPointPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtPointPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtPointPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -366,7 +423,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtPointPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtPointPropertyManager) Q_DISABLE_COPY(QtPointPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -375,7 +432,7 @@ public Q_SLOTS: class QtPointFPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtPointFPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtPointFPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -398,7 +455,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtPointFPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtPointFPropertyManager) Q_DISABLE_COPY(QtPointFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -407,7 +464,7 @@ public Q_SLOTS: class QtSizePropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtSizePropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtSizePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -433,7 +490,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtSizePropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSizePropertyManager) Q_DISABLE_COPY(QtSizePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -442,7 +499,7 @@ public Q_SLOTS: class QtSizeFPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtSizeFPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtSizeFPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -471,7 +528,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtSizeFPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSizeFPropertyManager) Q_DISABLE_COPY(QtSizeFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -480,7 +537,7 @@ public Q_SLOTS: class QtRectPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtRectPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtRectPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -503,7 +560,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtRectPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtRectPropertyManager) Q_DISABLE_COPY(QtRectPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -512,7 +569,7 @@ public Q_SLOTS: class QtRectFPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtRectFPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtRectFPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -538,7 +595,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtRectFPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtRectFPropertyManager) Q_DISABLE_COPY(QtRectFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -547,7 +604,7 @@ public Q_SLOTS: class QtEnumPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtEnumPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtEnumPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -572,14 +629,14 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtEnumPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtEnumPropertyManager) Q_DISABLE_COPY(QtEnumPropertyManager) }; class QtFlagPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtFlagPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtFlagPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -602,7 +659,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtFlagPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtFlagPropertyManager) Q_DISABLE_COPY(QtFlagPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool)) @@ -611,7 +668,7 @@ public Q_SLOTS: class QtSizePolicyPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtSizePolicyPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtSizePolicyPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -632,7 +689,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtSizePolicyPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) Q_DISABLE_COPY(QtSizePolicyPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -642,7 +699,7 @@ public Q_SLOTS: class QtFontPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtFontPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtFontPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -665,7 +722,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtFontPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtFontPropertyManager) Q_DISABLE_COPY(QtFontPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -678,7 +735,7 @@ public Q_SLOTS: class QtColorPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtColorPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtColorPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -699,7 +756,7 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtColorPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtColorPropertyManager) Q_DISABLE_COPY(QtColorPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -708,7 +765,7 @@ public Q_SLOTS: class QtCursorPropertyManagerPrivate; -class QTPROPERTYBROWSER_EXPORT QtCursorPropertyManager : public QtAbstractPropertyManager +class QT_QTPROPERTYBROWSER_EXPORT QtCursorPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -729,11 +786,23 @@ public Q_SLOTS: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QScopedPointer d_ptr; + QtCursorPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtCursorPropertyManager) Q_DISABLE_COPY(QtCursorPropertyManager) }; +class QT_QTPROPERTYBROWSER_EXPORT QtTextPropertyManager : public QtStringPropertyManager +{ + Q_OBJECT +public: + QtTextPropertyManager(QObject *parent = 0):QtStringPropertyManager(parent) {} + +protected: + virtual QString valueText(const QtProperty *property) const; +}; + +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif #endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.cpp b/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.cpp similarity index 86% rename from studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.cpp rename to studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.cpp index abb883e49d..eb9b375150 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.cpp @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. ** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -34,17 +88,19 @@ #include "qttreepropertybrowser.h" #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include -#include +#include #include +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QtPropertyEditorView; @@ -141,7 +197,10 @@ void QtPropertyEditorView::drawRow(QPainter *painter, const QStyleOptionViewItem if (m_editorPrivate) { QtProperty *property = m_editorPrivate->indexToProperty(index); if (property) + { hasValue = property->hasValue(); + opt.font.setBold(property->isBold()); + } } if (!hasValue && m_editorPrivate->markPropertiesWithoutValue()) { const QColor c = option.palette.color(QPalette::Dark); @@ -154,6 +213,7 @@ void QtPropertyEditorView::drawRow(QPainter *painter, const QStyleOptionViewItem opt.palette.setColor(QPalette::AlternateBase, c.lighter(112)); } } + QTreeWidget::drawRow(painter, opt, index); QColor color = static_cast(QApplication::style()->styleHint(QStyle::SH_Table_GridLineColor, &opt)); painter->save(); @@ -302,7 +362,7 @@ QWidget *QtPropertyEditorDelegate::createEditor(QWidget *parent, if (editor) { editor->setAutoFillBackground(true); editor->installEventFilter(const_cast(this)); - connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject *))); m_propertyToEditor[property] = editor; m_editorToProperty[editor] = property; m_editedItem = item; @@ -431,21 +491,21 @@ void QtTreePropertyBrowserPrivate::init(QWidget *parent) m_treeWidget->setColumnCount(2); QStringList labels; - labels.append(QCoreApplication::translate("QtTreePropertyBrowser", "Property")); - labels.append(QCoreApplication::translate("QtTreePropertyBrowser", "Value")); + labels.append(QApplication::translate("QtTreePropertyBrowser", "Property", 0, QApplication::UnicodeUTF8)); + labels.append(QApplication::translate("QtTreePropertyBrowser", "Value", 0, QApplication::UnicodeUTF8)); m_treeWidget->setHeaderLabels(labels); m_treeWidget->setAlternatingRowColors(true); m_treeWidget->setEditTriggers(QAbstractItemView::EditKeyPressed); m_delegate = new QtPropertyEditorDelegate(parent); m_delegate->setEditorPrivate(this); m_treeWidget->setItemDelegate(m_delegate); - m_treeWidget->header()->setSectionsMovable(false); - m_treeWidget->header()->setSectionResizeMode(QHeaderView::Stretch); + m_treeWidget->header()->setMovable(false); + m_treeWidget->header()->setResizeMode(QHeaderView::Stretch); m_expandIcon = drawIndicatorIcon(q_ptr->palette(), q_ptr->style()); - QObject::connect(m_treeWidget, SIGNAL(collapsed(QModelIndex)), q_ptr, SLOT(slotCollapsed(QModelIndex))); - QObject::connect(m_treeWidget, SIGNAL(expanded(QModelIndex)), q_ptr, SLOT(slotExpanded(QModelIndex))); + QObject::connect(m_treeWidget, SIGNAL(collapsed(const QModelIndex &)), q_ptr, SLOT(slotCollapsed(const QModelIndex &))); + QObject::connect(m_treeWidget, SIGNAL(expanded(const QModelIndex &)), q_ptr, SLOT(slotExpanded(const QModelIndex &))); QObject::connect(m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), q_ptr, SLOT(slotCurrentTreeItemChanged(QTreeWidgetItem*,QTreeWidgetItem*))); } @@ -670,9 +730,6 @@ void QtTreePropertyBrowserPrivate::editItem(QtBrowserItem *browserItem) /*! \class QtTreePropertyBrowser - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtTreePropertyBrowser class provides QTreeWidget based property browser. @@ -718,8 +775,9 @@ void QtTreePropertyBrowserPrivate::editItem(QtBrowserItem *browserItem) Creates a property browser with the given \a parent. */ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent), d_ptr(new QtTreePropertyBrowserPrivate) + : QtAbstractPropertyBrowser(parent) { + d_ptr = new QtTreePropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -738,6 +796,7 @@ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) */ QtTreePropertyBrowser::~QtTreePropertyBrowser() { + delete d_ptr; } /*! @@ -853,7 +912,7 @@ void QtTreePropertyBrowser::setResizeMode(QtTreePropertyBrowser::ResizeMode mode case QtTreePropertyBrowser::Stretch: default: m = QHeaderView::Stretch; break; } - d_ptr->m_treeWidget->header()->setSectionResizeMode(m); + d_ptr->m_treeWidget->header()->setResizeMode(m); } /*! @@ -1028,7 +1087,9 @@ void QtTreePropertyBrowser::editItem(QtBrowserItem *item) d_ptr->editItem(item); } +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qttreepropertybrowser.cpp" +#include "moc_qttreepropertybrowser.cxx" #include "qttreepropertybrowser.moc" diff --git a/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h new file mode 100644 index 0000000000..f664609d79 --- /dev/null +++ b/studio/src/3rdparty/qtpropertybrowser/qttreepropertybrowser.h @@ -0,0 +1,184 @@ +/**************************************************************************** +** +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTTREEPROPERTYBROWSER_H +#define QTTREEPROPERTYBROWSER_H + +#include "qtpropertybrowser.h" + +#if QT_VERSION >= 0x040400 +QT_BEGIN_NAMESPACE +#endif + +class QTreeWidgetItem; +class QtTreePropertyBrowserPrivate; + +class QT_QTPROPERTYBROWSER_EXPORT QtTreePropertyBrowser : public QtAbstractPropertyBrowser +{ + Q_OBJECT + Q_ENUMS(ResizeMode) + Q_PROPERTY(int indentation READ indentation WRITE setIndentation) + Q_PROPERTY(bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated) + Q_PROPERTY(bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors) + Q_PROPERTY(bool headerVisible READ isHeaderVisible WRITE setHeaderVisible) + Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) + Q_PROPERTY(int splitterPosition READ splitterPosition WRITE setSplitterPosition) + Q_PROPERTY(bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked) +public: + + enum ResizeMode + { + Interactive, + Stretch, + Fixed, + ResizeToContents + }; + + QtTreePropertyBrowser(QWidget *parent = 0); + ~QtTreePropertyBrowser(); + + int indentation() const; + void setIndentation(int i); + + bool rootIsDecorated() const; + void setRootIsDecorated(bool show); + + bool alternatingRowColors() const; + void setAlternatingRowColors(bool enable); + + bool isHeaderVisible() const; + void setHeaderVisible(bool visible); + + ResizeMode resizeMode() const; + void setResizeMode(ResizeMode mode); + + int splitterPosition() const; + void setSplitterPosition(int position); + + void setExpanded(QtBrowserItem *item, bool expanded); + bool isExpanded(QtBrowserItem *item) const; + + bool isItemVisible(QtBrowserItem *item) const; + void setItemVisible(QtBrowserItem *item, bool visible); + + void setBackgroundColor(QtBrowserItem *item, const QColor &color); + QColor backgroundColor(QtBrowserItem *item) const; + QColor calculatedBackgroundColor(QtBrowserItem *item) const; + + void setPropertiesWithoutValueMarked(bool mark); + bool propertiesWithoutValueMarked() const; + + void editItem(QtBrowserItem *item); + +Q_SIGNALS: + + void collapsed(QtBrowserItem *item); + void expanded(QtBrowserItem *item); + +protected: + virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); + virtual void itemRemoved(QtBrowserItem *item); + virtual void itemChanged(QtBrowserItem *item); + +private: + + QtTreePropertyBrowserPrivate *d_ptr; + Q_DECLARE_PRIVATE(QtTreePropertyBrowser) + Q_DISABLE_COPY(QtTreePropertyBrowser) + + Q_PRIVATE_SLOT(d_func(), void slotCollapsed(const QModelIndex &)) + Q_PRIVATE_SLOT(d_func(), void slotExpanded(const QModelIndex &)) + Q_PRIVATE_SLOT(d_func(), void slotCurrentBrowserItemChanged(QtBrowserItem *)) + Q_PRIVATE_SLOT(d_func(), void slotCurrentTreeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)) + +}; + +#if QT_VERSION >= 0x040400 +QT_END_NAMESPACE +#endif + +#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.cpp b/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.cpp similarity index 75% rename from studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.cpp rename to studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.cpp index ea8b007a15..820e6e2f15 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.cpp +++ b/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.cpp @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -43,7 +97,9 @@ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ #endif +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif class QtEnumPropertyType { @@ -59,13 +115,17 @@ class QtGroupPropertyType { }; +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif Q_DECLARE_METATYPE(QtEnumPropertyType) Q_DECLARE_METATYPE(QtFlagPropertyType) Q_DECLARE_METATYPE(QtGroupPropertyType) +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif /*! Returns the type id for an enum property. @@ -132,6 +192,7 @@ static QtProperty *wrappedProperty(QtProperty *property) class QtVariantPropertyPrivate { + QtVariantProperty *q_ptr; public: QtVariantPropertyPrivate(QtVariantPropertyManager *m) : manager(m) {} @@ -140,9 +201,6 @@ class QtVariantPropertyPrivate /*! \class QtVariantProperty - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtVariantProperty class is a convenience class handling QVariant based properties. @@ -156,11 +214,21 @@ class QtVariantPropertyPrivate For example, instead of writing: - \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp 0 + \code + QtVariantPropertyManager *variantPropertyManager; + QtProperty *property; + + variantPropertyManager->setValue(property, 10); + \endcode you can write: - \snippet doc/src/snippets/code/tools_shared_qtpropertybrowser_qtvariantproperty.cpp 1 + \code + QtVariantPropertyManager *variantPropertyManager; + QtVariantProperty *property; + + property->setValue(10); + \endcode QtVariantProperty instances can only be created by the QtVariantPropertyManager class. @@ -179,8 +247,9 @@ class QtVariantPropertyPrivate \sa QtVariantPropertyManager */ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) - : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) + : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) { + } /*! @@ -190,6 +259,7 @@ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) */ QtVariantProperty::~QtVariantProperty() { + delete d_ptr; } /*! @@ -540,7 +610,7 @@ void QtVariantPropertyManagerPrivate::slotValueChanged(QtProperty *property, con void QtVariantPropertyManagerPrivate::slotValueChanged(QtProperty *property, const QKeySequence &val) { QVariant v; - v.setValue(val); + qVariantSetValue(v, val); valueChanged(property, v); } @@ -627,7 +697,7 @@ void QtVariantPropertyManagerPrivate::slotEnumIconsChanged(QtProperty *property, { if (QtVariantProperty *varProp = m_internalToProperty.value(property, 0)) { QVariant v; - v.setValue(enumIcons); + qVariantSetValue(v, enumIcons); emit q_ptr->attributeChanged(varProp, m_enumIconsAttribute, v); } } @@ -657,9 +727,6 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, /*! \class QtVariantPropertyManager - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtVariantPropertyManager class provides and manages QVariant based properties. @@ -690,77 +757,77 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, \table \header - \li Property Type - \li Property Type Id + \o Property Type + \o Property Type Id \row - \li int - \li QVariant::Int + \o int + \o QVariant::Int \row - \li double - \li QVariant::Double + \o double + \o QVariant::Double \row - \li bool - \li QVariant::Bool + \o bool + \o QVariant::Bool \row - \li QString - \li QVariant::String + \o QString + \o QVariant::String \row - \li QDate - \li QVariant::Date + \o QDate + \o QVariant::Date \row - \li QTime - \li QVariant::Time + \o QTime + \o QVariant::Time \row - \li QDateTime - \li QVariant::DateTime + \o QDateTime + \o QVariant::DateTime \row - \li QKeySequence - \li QVariant::KeySequence + \o QKeySequence + \o QVariant::KeySequence \row - \li QChar - \li QVariant::Char + \o QChar + \o QVariant::Char \row - \li QLocale - \li QVariant::Locale + \o QLocale + \o QVariant::Locale \row - \li QPoint - \li QVariant::Point + \o QPoint + \o QVariant::Point \row - \li QPointF - \li QVariant::PointF + \o QPointF + \o QVariant::PointF \row - \li QSize - \li QVariant::Size + \o QSize + \o QVariant::Size \row - \li QSizeF - \li QVariant::SizeF + \o QSizeF + \o QVariant::SizeF \row - \li QRect - \li QVariant::Rect + \o QRect + \o QVariant::Rect \row - \li QRectF - \li QVariant::RectF + \o QRectF + \o QVariant::RectF \row - \li QColor - \li QVariant::Color + \o QColor + \o QVariant::Color \row - \li QSizePolicy - \li QVariant::SizePolicy + \o QSizePolicy + \o QVariant::SizePolicy \row - \li QFont - \li QVariant::Font + \o QFont + \o QVariant::Font \row - \li QCursor - \li QVariant::Cursor + \o QCursor + \o QVariant::Cursor \row - \li enum - \li enumTypeId() + \o enum + \o enumTypeId() \row - \li flag - \li flagTypeId() + \o flag + \o flagTypeId() \row - \li group - \li groupTypeId() + \o group + \o groupTypeId() \endtable Each property type can provide additional attributes, @@ -769,97 +836,97 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, \table \header - \li Property Type - \li Attribute Name - \li Attribute Type + \o Property Type + \o Attribute Name + \o Attribute Type \row - \li \c int - \li minimum - \li QVariant::Int + \o \c int + \o minimum + \o QVariant::Int \row - \li - \li maximum - \li QVariant::Int + \o + \o maximum + \o QVariant::Int \row - \li - \li singleStep - \li QVariant::Int + \o + \o singleStep + \o QVariant::Int \row - \li \c double - \li minimum - \li QVariant::Double + \o \c double + \o minimum + \o QVariant::Double \row - \li - \li maximum - \li QVariant::Double + \o + \o maximum + \o QVariant::Double \row - \li - \li singleStep - \li QVariant::Double + \o + \o singleStep + \o QVariant::Double \row - \li - \li decimals - \li QVariant::Int + \o + \o decimals + \o QVariant::Int \row - \li QString - \li regExp - \li QVariant::RegExp + \o QString + \o regExp + \o QVariant::RegExp \row - \li QDate - \li minimum - \li QVariant::Date + \o QDate + \o minimum + \o QVariant::Date \row - \li - \li maximum - \li QVariant::Date + \o + \o maximum + \o QVariant::Date \row - \li QPointF - \li decimals - \li QVariant::Int + \o QPointF + \o decimals + \o QVariant::Int \row - \li QSize - \li minimum - \li QVariant::Size + \o QSize + \o minimum + \o QVariant::Size \row - \li - \li maximum - \li QVariant::Size + \o + \o maximum + \o QVariant::Size \row - \li QSizeF - \li minimum - \li QVariant::SizeF + \o QSizeF + \o minimum + \o QVariant::SizeF \row - \li - \li maximum - \li QVariant::SizeF + \o + \o maximum + \o QVariant::SizeF \row - \li - \li decimals - \li QVariant::Int + \o + \o decimals + \o QVariant::Int \row - \li QRect - \li constraint - \li QVariant::Rect + \o QRect + \o constraint + \o QVariant::Rect \row - \li QRectF - \li constraint - \li QVariant::RectF + \o QRectF + \o constraint + \o QVariant::RectF \row - \li - \li decimals - \li QVariant::Int + \o + \o decimals + \o QVariant::Int \row - \li \c enum - \li enumNames - \li QVariant::StringList + \o \c enum + \o enumNames + \o QVariant::StringList \row - \li - \li enumIcons - \li iconMapTypeId() + \o + \o enumIcons + \o iconMapTypeId() \row - \li \c flag - \li flagNames - \li QVariant::StringList + \o \c flag + \o flagNames + \o QVariant::StringList \endtable The attributes for a given property type can be retrieved using @@ -901,8 +968,9 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, Creates a manager with the given \a parent. */ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent), d_ptr(new QtVariantPropertyManagerPrivate) + : QtAbstractPropertyManager(parent) { + d_ptr = new QtVariantPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_creatingProperty = false; @@ -917,12 +985,12 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_maximumAttribute] = QVariant::Int; d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_singleStepAttribute] = QVariant::Int; d_ptr->m_typeToValueType[QVariant::Int] = QVariant::Int; - connect(intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty*,int)), - this, SLOT(slotSingleStepChanged(QtProperty*,int))); + connect(intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty *, int)), + this, SLOT(slotSingleStepChanged(QtProperty *, int))); // DoublePropertyManager QtDoublePropertyManager *doublePropertyManager = new QtDoublePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Double] = doublePropertyManager; @@ -935,30 +1003,30 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_decimalsAttribute] = QVariant::Int; d_ptr->m_typeToValueType[QVariant::Double] = QVariant::Double; - connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotValueChanged(QtProperty*,double))); - connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty*,double,double)), - this, SLOT(slotRangeChanged(QtProperty*,double,double))); - connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty*,double)), - this, SLOT(slotSingleStepChanged(QtProperty*,double))); - connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), - this, SLOT(slotDecimalsChanged(QtProperty*,int))); + connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotValueChanged(QtProperty *, double))); + connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty *, double, double)), + this, SLOT(slotRangeChanged(QtProperty *, double, double))); + connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty *, double)), + this, SLOT(slotSingleStepChanged(QtProperty *, double))); + connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), + this, SLOT(slotDecimalsChanged(QtProperty *, int))); // BoolPropertyManager QtBoolPropertyManager *boolPropertyManager = new QtBoolPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Bool] = boolPropertyManager; d_ptr->m_typeToValueType[QVariant::Bool] = QVariant::Bool; - connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotValueChanged(QtProperty*,bool))); + connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotValueChanged(QtProperty *, bool))); // StringPropertyManager QtStringPropertyManager *stringPropertyManager = new QtStringPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::String] = stringPropertyManager; d_ptr->m_typeToValueType[QVariant::String] = QVariant::String; d_ptr->m_typeToAttributeToAttributeType[QVariant::String][d_ptr->m_regExpAttribute] = QVariant::RegExp; - connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty*,QString)), - this, SLOT(slotValueChanged(QtProperty*,QString))); - connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), - this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); + connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty *, const QString &)), + this, SLOT(slotValueChanged(QtProperty *, const QString &))); + connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)), + this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &))); // DatePropertyManager QtDatePropertyManager *datePropertyManager = new QtDatePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Date] = datePropertyManager; @@ -967,74 +1035,74 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::Date; d_ptr->m_typeToAttributeToAttributeType[QVariant::Date][d_ptr->m_maximumAttribute] = QVariant::Date; - connect(datePropertyManager, SIGNAL(valueChanged(QtProperty*,QDate)), - this, SLOT(slotValueChanged(QtProperty*,QDate))); - connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), - this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); + connect(datePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDate &)), + this, SLOT(slotValueChanged(QtProperty *, const QDate &))); + connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)), + this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &))); // TimePropertyManager QtTimePropertyManager *timePropertyManager = new QtTimePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Time] = timePropertyManager; d_ptr->m_typeToValueType[QVariant::Time] = QVariant::Time; - connect(timePropertyManager, SIGNAL(valueChanged(QtProperty*,QTime)), - this, SLOT(slotValueChanged(QtProperty*,QTime))); + connect(timePropertyManager, SIGNAL(valueChanged(QtProperty *, const QTime &)), + this, SLOT(slotValueChanged(QtProperty *, const QTime &))); // DateTimePropertyManager QtDateTimePropertyManager *dateTimePropertyManager = new QtDateTimePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::DateTime] = dateTimePropertyManager; d_ptr->m_typeToValueType[QVariant::DateTime] = QVariant::DateTime; - connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty*,QDateTime)), - this, SLOT(slotValueChanged(QtProperty*,QDateTime))); + connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)), + this, SLOT(slotValueChanged(QtProperty *, const QDateTime &))); // KeySequencePropertyManager QtKeySequencePropertyManager *keySequencePropertyManager = new QtKeySequencePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::KeySequence] = keySequencePropertyManager; d_ptr->m_typeToValueType[QVariant::KeySequence] = QVariant::KeySequence; - connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), - this, SLOT(slotValueChanged(QtProperty*,QKeySequence))); + connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)), + this, SLOT(slotValueChanged(QtProperty *, const QKeySequence &))); // CharPropertyManager QtCharPropertyManager *charPropertyManager = new QtCharPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Char] = charPropertyManager; d_ptr->m_typeToValueType[QVariant::Char] = QVariant::Char; - connect(charPropertyManager, SIGNAL(valueChanged(QtProperty*,QChar)), - this, SLOT(slotValueChanged(QtProperty*,QChar))); + connect(charPropertyManager, SIGNAL(valueChanged(QtProperty *, const QChar &)), + this, SLOT(slotValueChanged(QtProperty *, const QChar &))); // LocalePropertyManager QtLocalePropertyManager *localePropertyManager = new QtLocalePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Locale] = localePropertyManager; d_ptr->m_typeToValueType[QVariant::Locale] = QVariant::Locale; - connect(localePropertyManager, SIGNAL(valueChanged(QtProperty*,QLocale)), - this, SLOT(slotValueChanged(QtProperty*,QLocale))); - connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(localePropertyManager, SIGNAL(valueChanged(QtProperty *, const QLocale &)), + this, SLOT(slotValueChanged(QtProperty *, const QLocale &))); + connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // PointPropertyManager QtPointPropertyManager *pointPropertyManager = new QtPointPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Point] = pointPropertyManager; d_ptr->m_typeToValueType[QVariant::Point] = QVariant::Point; - connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty*,QPoint)), - this, SLOT(slotValueChanged(QtProperty*,QPoint))); - connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPoint &)), + this, SLOT(slotValueChanged(QtProperty *, const QPoint &))); + connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // PointFPropertyManager QtPointFPropertyManager *pointFPropertyManager = new QtPointFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::PointF] = pointFPropertyManager; d_ptr->m_typeToValueType[QVariant::PointF] = QVariant::PointF; d_ptr->m_typeToAttributeToAttributeType[QVariant::PointF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty*,QPointF)), - this, SLOT(slotValueChanged(QtProperty*,QPointF))); - connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), - this, SLOT(slotDecimalsChanged(QtProperty*,int))); - connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotValueChanged(QtProperty*,double))); - connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPointF &)), + this, SLOT(slotValueChanged(QtProperty *, const QPointF &))); + connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), + this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotValueChanged(QtProperty *, double))); + connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // SizePropertyManager QtSizePropertyManager *sizePropertyManager = new QtSizePropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Size] = sizePropertyManager; @@ -1043,18 +1111,18 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::Size; d_ptr->m_typeToAttributeToAttributeType[QVariant::Size][d_ptr->m_maximumAttribute] = QVariant::Size; - connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty*,QSize)), - this, SLOT(slotValueChanged(QtProperty*,QSize))); - connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty*,QSize,QSize)), - this, SLOT(slotRangeChanged(QtProperty*,QSize,QSize))); - connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty *, const QSize &)), + this, SLOT(slotValueChanged(QtProperty *, const QSize &))); + connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSize &, const QSize &)), + this, SLOT(slotRangeChanged(QtProperty *, const QSize &, const QSize &))); + connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // SizeFPropertyManager QtSizeFPropertyManager *sizeFPropertyManager = new QtSizeFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::SizeF] = sizeFPropertyManager; @@ -1065,38 +1133,38 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::SizeF; d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizeF)), - this, SLOT(slotValueChanged(QtProperty*,QSizeF))); - connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty*,QSizeF,QSizeF)), - this, SLOT(slotRangeChanged(QtProperty*,QSizeF,QSizeF))); - connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), - this, SLOT(slotDecimalsChanged(QtProperty*,int))); - connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotValueChanged(QtProperty*,double))); - connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), - this, SLOT(slotRangeChanged(QtProperty*,double,double))); - connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizeF &)), + this, SLOT(slotValueChanged(QtProperty *, const QSizeF &))); + connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSizeF &, const QSizeF &)), + this, SLOT(slotRangeChanged(QtProperty *, const QSizeF &, const QSizeF &))); + connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), + this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotValueChanged(QtProperty *, double))); + connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double, double)), + this, SLOT(slotRangeChanged(QtProperty *, double, double))); + connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // RectPropertyManager QtRectPropertyManager *rectPropertyManager = new QtRectPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Rect] = rectPropertyManager; d_ptr->m_typeToValueType[QVariant::Rect] = QVariant::Rect; d_ptr->m_typeToAttributeToAttributeType[QVariant::Rect][d_ptr->m_constraintAttribute] = QVariant::Rect; - connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty*,QRect)), - this, SLOT(slotValueChanged(QtProperty*,QRect))); - connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRect)), - this, SLOT(slotConstraintChanged(QtProperty*,QRect))); - connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRect &)), + this, SLOT(slotValueChanged(QtProperty *, const QRect &))); + connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRect &)), + this, SLOT(slotConstraintChanged(QtProperty *, const QRect &))); + connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // RectFPropertyManager QtRectFPropertyManager *rectFPropertyManager = new QtRectFPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::RectF] = rectFPropertyManager; @@ -1105,32 +1173,32 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::RectF; d_ptr->m_typeToAttributeToAttributeType[QVariant::RectF][d_ptr->m_decimalsAttribute] = QVariant::Int; - connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty*,QRectF)), - this, SLOT(slotValueChanged(QtProperty*,QRectF))); - connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRectF)), - this, SLOT(slotConstraintChanged(QtProperty*,QRectF))); - connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), - this, SLOT(slotDecimalsChanged(QtProperty*,int))); - connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), - this, SLOT(slotValueChanged(QtProperty*,double))); - connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), - this, SLOT(slotRangeChanged(QtProperty*,double,double))); - connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRectF &)), + this, SLOT(slotValueChanged(QtProperty *, const QRectF &))); + connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRectF &)), + this, SLOT(slotConstraintChanged(QtProperty *, const QRectF &))); + connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)), + this, SLOT(slotDecimalsChanged(QtProperty *, int))); + connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *, double)), + this, SLOT(slotValueChanged(QtProperty *, double))); + connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double, double)), + this, SLOT(slotRangeChanged(QtProperty *, double, double))); + connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // ColorPropertyManager QtColorPropertyManager *colorPropertyManager = new QtColorPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Color] = colorPropertyManager; d_ptr->m_typeToValueType[QVariant::Color] = QVariant::Color; - connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty*,QColor)), - this, SLOT(slotValueChanged(QtProperty*,QColor))); - connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QColor &)), + this, SLOT(slotValueChanged(QtProperty *, const QColor &))); + connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // EnumPropertyManager int enumId = enumTypeId(); QtEnumPropertyManager *enumPropertyManager = new QtEnumPropertyManager(this); @@ -1140,58 +1208,58 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QVariant::StringList; d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] = iconMapTypeId(); - connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), - this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); - connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty*,QMap)), - this, SLOT(slotEnumIconsChanged(QtProperty*,QMap))); + connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), + this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty *, const QMap &)), + this, SLOT(slotEnumIconsChanged(QtProperty *, const QMap &))); // SizePolicyPropertyManager QtSizePolicyPropertyManager *sizePolicyPropertyManager = new QtSizePolicyPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::SizePolicy] = sizePolicyPropertyManager; d_ptr->m_typeToValueType[QVariant::SizePolicy] = QVariant::SizePolicy; - connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizePolicy)), - this, SLOT(slotValueChanged(QtProperty*,QSizePolicy))); - connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); + connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizePolicy &)), + this, SLOT(slotValueChanged(QtProperty *, const QSizePolicy &))); + connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); connect(sizePolicyPropertyManager->subEnumPropertyManager(), - SIGNAL(enumNamesChanged(QtProperty*,QStringList)), - this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); - connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), + this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // FontPropertyManager QtFontPropertyManager *fontPropertyManager = new QtFontPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Font] = fontPropertyManager; d_ptr->m_typeToValueType[QVariant::Font] = QVariant::Font; - connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty*,QFont)), - this, SLOT(slotValueChanged(QtProperty*,QFont))); - connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), - this, SLOT(slotRangeChanged(QtProperty*,int,int))); - connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); + connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty *, const QFont &)), + this, SLOT(slotValueChanged(QtProperty *, const QFont &))); + connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int, int)), + this, SLOT(slotRangeChanged(QtProperty *, int, int))); + connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); connect(fontPropertyManager->subEnumPropertyManager(), - SIGNAL(enumNamesChanged(QtProperty*,QStringList)), - this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); - connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotValueChanged(QtProperty*,bool))); - connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)), + this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &))); + connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotValueChanged(QtProperty *, bool))); + connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // CursorPropertyManager QtCursorPropertyManager *cursorPropertyManager = new QtCursorPropertyManager(this); d_ptr->m_typeToPropertyManager[QVariant::Cursor] = cursorPropertyManager; d_ptr->m_typeToValueType[QVariant::Cursor] = QVariant::Cursor; - connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty*,QCursor)), - this, SLOT(slotValueChanged(QtProperty*,QCursor))); + connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QCursor &)), + this, SLOT(slotValueChanged(QtProperty *, const QCursor &))); // FlagPropertyManager int flagId = flagTypeId(); QtFlagPropertyManager *flagPropertyManager = new QtFlagPropertyManager(this); @@ -1199,16 +1267,16 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) d_ptr->m_typeToValueType[flagId] = QVariant::Int; d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] = QVariant::StringList; - connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), - this, SLOT(slotValueChanged(QtProperty*,int))); - connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty*,QStringList)), - this, SLOT(slotFlagNamesChanged(QtProperty*,QStringList))); - connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), - this, SLOT(slotValueChanged(QtProperty*,bool))); - connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), - this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); - connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), - this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); + connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty *, int)), + this, SLOT(slotValueChanged(QtProperty *, int))); + connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty *, const QStringList &)), + this, SLOT(slotFlagNamesChanged(QtProperty *, const QStringList &))); + connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *, bool)), + this, SLOT(slotValueChanged(QtProperty *, bool))); + connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty *)), + this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty *))); + connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty *)), + this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *))); // FlagPropertyManager int groupId = groupTypeId(); QtGroupPropertyManager *groupPropertyManager = new QtGroupPropertyManager(this); @@ -1222,6 +1290,7 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QtVariantPropertyManager::~QtVariantPropertyManager() { clear(); + delete d_ptr; } /*! @@ -1315,7 +1384,7 @@ QVariant QtVariantPropertyManager::value(const QtProperty *property) const } else if (QtDateTimePropertyManager *dateTimeManager = qobject_cast(manager)) { return dateTimeManager->value(internProp); } else if (QtKeySequencePropertyManager *keySequenceManager = qobject_cast(manager)) { - return QVariant::fromValue(keySequenceManager->value(internProp)); + return keySequenceManager->value(internProp); } else if (QtCharPropertyManager *charManager = qobject_cast(manager)) { return charManager->value(internProp); } else if (QtLocalePropertyManager *localeManager = qobject_cast(manager)) { @@ -1479,7 +1548,7 @@ QVariant QtVariantPropertyManager::attributeValue(const QtProperty *property, co return enumManager->enumNames(internProp); if (attribute == d_ptr->m_enumIconsAttribute) { QVariant v; - v.setValue(enumManager->enumIcons(internProp)); + qVariantSetValue(v, enumManager->enumIcons(internProp)); return v; } return QVariant(); @@ -1559,73 +1628,73 @@ void QtVariantPropertyManager::setValue(QtProperty *property, const QVariant &va QtAbstractPropertyManager *manager = internProp->propertyManager(); if (QtIntPropertyManager *intManager = qobject_cast(manager)) { - intManager->setValue(internProp, qvariant_cast(val)); + intManager->setValue(internProp, qVariantValue(val)); return; } else if (QtDoublePropertyManager *doubleManager = qobject_cast(manager)) { - doubleManager->setValue(internProp, qvariant_cast(val)); + doubleManager->setValue(internProp, qVariantValue(val)); return; } else if (QtBoolPropertyManager *boolManager = qobject_cast(manager)) { - boolManager->setValue(internProp, qvariant_cast(val)); + boolManager->setValue(internProp, qVariantValue(val)); return; } else if (QtStringPropertyManager *stringManager = qobject_cast(manager)) { - stringManager->setValue(internProp, qvariant_cast(val)); + stringManager->setValue(internProp, qVariantValue(val)); return; } else if (QtDatePropertyManager *dateManager = qobject_cast(manager)) { - dateManager->setValue(internProp, qvariant_cast(val)); + dateManager->setValue(internProp, qVariantValue(val)); return; } else if (QtTimePropertyManager *timeManager = qobject_cast(manager)) { - timeManager->setValue(internProp, qvariant_cast(val)); + timeManager->setValue(internProp, qVariantValue(val)); return; } else if (QtDateTimePropertyManager *dateTimeManager = qobject_cast(manager)) { - dateTimeManager->setValue(internProp, qvariant_cast(val)); + dateTimeManager->setValue(internProp, qVariantValue(val)); return; } else if (QtKeySequencePropertyManager *keySequenceManager = qobject_cast(manager)) { - keySequenceManager->setValue(internProp, qvariant_cast(val)); + keySequenceManager->setValue(internProp, qVariantValue(val)); return; } else if (QtCharPropertyManager *charManager = qobject_cast(manager)) { - charManager->setValue(internProp, qvariant_cast(val)); + charManager->setValue(internProp, qVariantValue(val)); return; } else if (QtLocalePropertyManager *localeManager = qobject_cast(manager)) { - localeManager->setValue(internProp, qvariant_cast(val)); + localeManager->setValue(internProp, qVariantValue(val)); return; } else if (QtPointPropertyManager *pointManager = qobject_cast(manager)) { - pointManager->setValue(internProp, qvariant_cast(val)); + pointManager->setValue(internProp, qVariantValue(val)); return; } else if (QtPointFPropertyManager *pointFManager = qobject_cast(manager)) { - pointFManager->setValue(internProp, qvariant_cast(val)); + pointFManager->setValue(internProp, qVariantValue(val)); return; } else if (QtSizePropertyManager *sizeManager = qobject_cast(manager)) { - sizeManager->setValue(internProp, qvariant_cast(val)); + sizeManager->setValue(internProp, qVariantValue(val)); return; } else if (QtSizeFPropertyManager *sizeFManager = qobject_cast(manager)) { - sizeFManager->setValue(internProp, qvariant_cast(val)); + sizeFManager->setValue(internProp, qVariantValue(val)); return; } else if (QtRectPropertyManager *rectManager = qobject_cast(manager)) { - rectManager->setValue(internProp, qvariant_cast(val)); + rectManager->setValue(internProp, qVariantValue(val)); return; } else if (QtRectFPropertyManager *rectFManager = qobject_cast(manager)) { - rectFManager->setValue(internProp, qvariant_cast(val)); + rectFManager->setValue(internProp, qVariantValue(val)); return; } else if (QtColorPropertyManager *colorManager = qobject_cast(manager)) { - colorManager->setValue(internProp, qvariant_cast(val)); + colorManager->setValue(internProp, qVariantValue(val)); return; } else if (QtEnumPropertyManager *enumManager = qobject_cast(manager)) { - enumManager->setValue(internProp, qvariant_cast(val)); + enumManager->setValue(internProp, qVariantValue(val)); return; } else if (QtSizePolicyPropertyManager *sizePolicyManager = qobject_cast(manager)) { - sizePolicyManager->setValue(internProp, qvariant_cast(val)); + sizePolicyManager->setValue(internProp, qVariantValue(val)); return; } else if (QtFontPropertyManager *fontManager = qobject_cast(manager)) { - fontManager->setValue(internProp, qvariant_cast(val)); + fontManager->setValue(internProp, qVariantValue(val)); return; #ifndef QT_NO_CURSOR } else if (QtCursorPropertyManager *cursorManager = qobject_cast(manager)) { - cursorManager->setValue(internProp, qvariant_cast(val)); + cursorManager->setValue(internProp, qVariantValue(val)); return; #endif } else if (QtFlagPropertyManager *flagManager = qobject_cast(manager)) { - flagManager->setValue(internProp, qvariant_cast(val)); + flagManager->setValue(internProp, qVariantValue(val)); return; } } @@ -1663,75 +1732,75 @@ void QtVariantPropertyManager::setAttribute(QtProperty *property, QtAbstractPropertyManager *manager = internProp->propertyManager(); if (QtIntPropertyManager *intManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - intManager->setMaximum(internProp, qvariant_cast(value)); + intManager->setMaximum(internProp, qVariantValue(value)); else if (attribute == d_ptr->m_minimumAttribute) - intManager->setMinimum(internProp, qvariant_cast(value)); + intManager->setMinimum(internProp, qVariantValue(value)); else if (attribute == d_ptr->m_singleStepAttribute) - intManager->setSingleStep(internProp, qvariant_cast(value)); + intManager->setSingleStep(internProp, qVariantValue(value)); return; } else if (QtDoublePropertyManager *doubleManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - doubleManager->setMaximum(internProp, qvariant_cast(value)); + doubleManager->setMaximum(internProp, qVariantValue(value)); if (attribute == d_ptr->m_minimumAttribute) - doubleManager->setMinimum(internProp, qvariant_cast(value)); + doubleManager->setMinimum(internProp, qVariantValue(value)); if (attribute == d_ptr->m_singleStepAttribute) - doubleManager->setSingleStep(internProp, qvariant_cast(value)); + doubleManager->setSingleStep(internProp, qVariantValue(value)); if (attribute == d_ptr->m_decimalsAttribute) - doubleManager->setDecimals(internProp, qvariant_cast(value)); + doubleManager->setDecimals(internProp, qVariantValue(value)); return; } else if (QtStringPropertyManager *stringManager = qobject_cast(manager)) { if (attribute == d_ptr->m_regExpAttribute) - stringManager->setRegExp(internProp, qvariant_cast(value)); + stringManager->setRegExp(internProp, qVariantValue(value)); return; } else if (QtDatePropertyManager *dateManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - dateManager->setMaximum(internProp, qvariant_cast(value)); + dateManager->setMaximum(internProp, qVariantValue(value)); if (attribute == d_ptr->m_minimumAttribute) - dateManager->setMinimum(internProp, qvariant_cast(value)); + dateManager->setMinimum(internProp, qVariantValue(value)); return; } else if (QtPointFPropertyManager *pointFManager = qobject_cast(manager)) { if (attribute == d_ptr->m_decimalsAttribute) - pointFManager->setDecimals(internProp, qvariant_cast(value)); + pointFManager->setDecimals(internProp, qVariantValue(value)); return; } else if (QtSizePropertyManager *sizeManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - sizeManager->setMaximum(internProp, qvariant_cast(value)); + sizeManager->setMaximum(internProp, qVariantValue(value)); if (attribute == d_ptr->m_minimumAttribute) - sizeManager->setMinimum(internProp, qvariant_cast(value)); + sizeManager->setMinimum(internProp, qVariantValue(value)); return; } else if (QtSizeFPropertyManager *sizeFManager = qobject_cast(manager)) { if (attribute == d_ptr->m_maximumAttribute) - sizeFManager->setMaximum(internProp, qvariant_cast(value)); + sizeFManager->setMaximum(internProp, qVariantValue(value)); if (attribute == d_ptr->m_minimumAttribute) - sizeFManager->setMinimum(internProp, qvariant_cast(value)); + sizeFManager->setMinimum(internProp, qVariantValue(value)); if (attribute == d_ptr->m_decimalsAttribute) - sizeFManager->setDecimals(internProp, qvariant_cast(value)); + sizeFManager->setDecimals(internProp, qVariantValue(value)); return; } else if (QtRectPropertyManager *rectManager = qobject_cast(manager)) { if (attribute == d_ptr->m_constraintAttribute) - rectManager->setConstraint(internProp, qvariant_cast(value)); + rectManager->setConstraint(internProp, qVariantValue(value)); return; } else if (QtRectFPropertyManager *rectFManager = qobject_cast(manager)) { if (attribute == d_ptr->m_constraintAttribute) - rectFManager->setConstraint(internProp, qvariant_cast(value)); + rectFManager->setConstraint(internProp, qVariantValue(value)); if (attribute == d_ptr->m_decimalsAttribute) - rectFManager->setDecimals(internProp, qvariant_cast(value)); + rectFManager->setDecimals(internProp, qVariantValue(value)); return; } else if (QtEnumPropertyManager *enumManager = qobject_cast(manager)) { if (attribute == d_ptr->m_enumNamesAttribute) - enumManager->setEnumNames(internProp, qvariant_cast(value)); + enumManager->setEnumNames(internProp, qVariantValue(value)); if (attribute == d_ptr->m_enumIconsAttribute) - enumManager->setEnumIcons(internProp, qvariant_cast(value)); + enumManager->setEnumIcons(internProp, qVariantValue(value)); return; } else if (QtFlagPropertyManager *flagManager = qobject_cast(manager)) { if (attribute == d_ptr->m_flagNamesAttribute) - flagManager->setFlagNames(internProp, qvariant_cast(value)); + flagManager->setFlagNames(internProp, qVariantValue(value)); return; } } /*! - \internal + \reimp */ bool QtVariantPropertyManager::hasValue(const QtProperty *property) const { @@ -1741,7 +1810,7 @@ bool QtVariantPropertyManager::hasValue(const QtProperty *property) const } /*! - \internal + \reimp */ QString QtVariantPropertyManager::valueText(const QtProperty *property) const { @@ -1750,7 +1819,7 @@ QString QtVariantPropertyManager::valueText(const QtProperty *property) const } /*! - \internal + \reimp */ QIcon QtVariantPropertyManager::valueIcon(const QtProperty *property) const { @@ -1759,7 +1828,7 @@ QIcon QtVariantPropertyManager::valueIcon(const QtProperty *property) const } /*! - \internal + \reimp */ void QtVariantPropertyManager::initializeProperty(QtProperty *property) { @@ -1790,7 +1859,7 @@ void QtVariantPropertyManager::initializeProperty(QtProperty *property) } /*! - \internal + \reimp */ void QtVariantPropertyManager::uninitializeProperty(QtProperty *property) { @@ -1813,7 +1882,7 @@ void QtVariantPropertyManager::uninitializeProperty(QtProperty *property) } /*! - \internal + \reimp */ QtProperty *QtVariantPropertyManager::createProperty() { @@ -1854,9 +1923,6 @@ class QtVariantEditorFactoryPrivate /*! \class QtVariantEditorFactory - \internal - \inmodule QtDesigner - \since 4.4 \brief The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager objects. @@ -1866,41 +1932,41 @@ class QtVariantEditorFactoryPrivate \table \header - \li Property Type - \li Widget + \o Property Type + \o Widget \row - \li \c int - \li QSpinBox + \o \c int + \o QSpinBox \row - \li \c double - \li QDoubleSpinBox + \o \c double + \o QDoubleSpinBox \row - \li \c bool - \li QCheckBox + \o \c bool + \o QCheckBox \row - \li QString - \li QLineEdit + \o QString + \o QLineEdit \row - \li QDate - \li QDateEdit + \o QDate + \o QDateEdit \row - \li QTime - \li QTimeEdit + \o QTime + \o QTimeEdit \row - \li QDateTime - \li QDateTimeEdit + \o QDateTime + \o QDateTimeEdit \row - \li QKeySequence - \li customized editor + \o QKeySequence + \o customized editor \row - \li QChar - \li customized editor + \o QChar + \o customized editor \row - \li \c enum - \li QComboBox + \o \c enum + \o QComboBox \row - \li QCursor - \li QComboBox + \o QCursor + \o QComboBox \endtable Note that QtVariantPropertyManager supports several additional property @@ -1916,8 +1982,9 @@ class QtVariantEditorFactoryPrivate Creates a factory with the given \a parent. */ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) - : QtAbstractEditorFactory(parent), d_ptr(new QtVariantEditorFactoryPrivate()) + : QtAbstractEditorFactory(parent) { + d_ptr = new QtVariantEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_spinBoxFactory = new QtSpinBoxFactory(this); @@ -1979,6 +2046,7 @@ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) */ QtVariantEditorFactory::~QtVariantEditorFactory() { + delete d_ptr; } /*! @@ -1988,87 +2056,87 @@ QtVariantEditorFactory::~QtVariantEditorFactory() */ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *manager) { - QList intPropertyManagers = manager->findChildren(); + QList intPropertyManagers = qFindChildren(manager); QListIterator itInt(intPropertyManagers); while (itInt.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itInt.next()); - QList doublePropertyManagers = manager->findChildren(); + QList doublePropertyManagers = qFindChildren(manager); QListIterator itDouble(doublePropertyManagers); while (itDouble.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itDouble.next()); - QList boolPropertyManagers = manager->findChildren(); + QList boolPropertyManagers = qFindChildren(manager); QListIterator itBool(boolPropertyManagers); while (itBool.hasNext()) d_ptr->m_checkBoxFactory->addPropertyManager(itBool.next()); - QList stringPropertyManagers = manager->findChildren(); + QList stringPropertyManagers = qFindChildren(manager); QListIterator itString(stringPropertyManagers); while (itString.hasNext()) d_ptr->m_lineEditFactory->addPropertyManager(itString.next()); - QList datePropertyManagers = manager->findChildren(); + QList datePropertyManagers = qFindChildren(manager); QListIterator itDate(datePropertyManagers); while (itDate.hasNext()) d_ptr->m_dateEditFactory->addPropertyManager(itDate.next()); - QList timePropertyManagers = manager->findChildren(); + QList timePropertyManagers = qFindChildren(manager); QListIterator itTime(timePropertyManagers); while (itTime.hasNext()) d_ptr->m_timeEditFactory->addPropertyManager(itTime.next()); - QList dateTimePropertyManagers = manager->findChildren(); + QList dateTimePropertyManagers = qFindChildren(manager); QListIterator itDateTime(dateTimePropertyManagers); while (itDateTime.hasNext()) d_ptr->m_dateTimeEditFactory->addPropertyManager(itDateTime.next()); - QList keySequencePropertyManagers = manager->findChildren(); + QList keySequencePropertyManagers = qFindChildren(manager); QListIterator itKeySequence(keySequencePropertyManagers); while (itKeySequence.hasNext()) d_ptr->m_keySequenceEditorFactory->addPropertyManager(itKeySequence.next()); - QList charPropertyManagers = manager->findChildren(); + QList charPropertyManagers = qFindChildren(manager); QListIterator itChar(charPropertyManagers); while (itChar.hasNext()) d_ptr->m_charEditorFactory->addPropertyManager(itChar.next()); - QList localePropertyManagers = manager->findChildren(); + QList localePropertyManagers = qFindChildren(manager); QListIterator itLocale(localePropertyManagers); while (itLocale.hasNext()) d_ptr->m_comboBoxFactory->addPropertyManager(itLocale.next()->subEnumPropertyManager()); - QList pointPropertyManagers = manager->findChildren(); + QList pointPropertyManagers = qFindChildren(manager); QListIterator itPoint(pointPropertyManagers); while (itPoint.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itPoint.next()->subIntPropertyManager()); - QList pointFPropertyManagers = manager->findChildren(); + QList pointFPropertyManagers = qFindChildren(manager); QListIterator itPointF(pointFPropertyManagers); while (itPointF.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itPointF.next()->subDoublePropertyManager()); - QList sizePropertyManagers = manager->findChildren(); + QList sizePropertyManagers = qFindChildren(manager); QListIterator itSize(sizePropertyManagers); while (itSize.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itSize.next()->subIntPropertyManager()); - QList sizeFPropertyManagers = manager->findChildren(); + QList sizeFPropertyManagers = qFindChildren(manager); QListIterator itSizeF(sizeFPropertyManagers); while (itSizeF.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itSizeF.next()->subDoublePropertyManager()); - QList rectPropertyManagers = manager->findChildren(); + QList rectPropertyManagers = qFindChildren(manager); QListIterator itRect(rectPropertyManagers); while (itRect.hasNext()) d_ptr->m_spinBoxFactory->addPropertyManager(itRect.next()->subIntPropertyManager()); - QList rectFPropertyManagers = manager->findChildren(); + QList rectFPropertyManagers = qFindChildren(manager); QListIterator itRectF(rectFPropertyManagers); while (itRectF.hasNext()) d_ptr->m_doubleSpinBoxFactory->addPropertyManager(itRectF.next()->subDoublePropertyManager()); - QList colorPropertyManagers = manager->findChildren(); + QList colorPropertyManagers = qFindChildren(manager); QListIterator itColor(colorPropertyManagers); while (itColor.hasNext()) { QtColorPropertyManager *manager = itColor.next(); @@ -2076,12 +2144,12 @@ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *ma d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager()); } - QList enumPropertyManagers = manager->findChildren(); + QList enumPropertyManagers = qFindChildren(manager); QListIterator itEnum(enumPropertyManagers); while (itEnum.hasNext()) d_ptr->m_comboBoxFactory->addPropertyManager(itEnum.next()); - QList sizePolicyPropertyManagers = manager->findChildren(); + QList sizePolicyPropertyManagers = qFindChildren(manager); QListIterator itSizePolicy(sizePolicyPropertyManagers); while (itSizePolicy.hasNext()) { QtSizePolicyPropertyManager *manager = itSizePolicy.next(); @@ -2089,7 +2157,7 @@ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *ma d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager()); } - QList fontPropertyManagers = manager->findChildren(); + QList fontPropertyManagers = qFindChildren(manager); QListIterator itFont(fontPropertyManagers); while (itFont.hasNext()) { QtFontPropertyManager *manager = itFont.next(); @@ -2099,12 +2167,12 @@ void QtVariantEditorFactory::connectPropertyManager(QtVariantPropertyManager *ma d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager()); } - QList cursorPropertyManagers = manager->findChildren(); + QList cursorPropertyManagers = qFindChildren(manager); QListIterator itCursor(cursorPropertyManagers); while (itCursor.hasNext()) d_ptr->m_cursorEditorFactory->addPropertyManager(itCursor.next()); - QList flagPropertyManagers = manager->findChildren(); + QList flagPropertyManagers = qFindChildren(manager); QListIterator itFlag(flagPropertyManagers); while (itFlag.hasNext()) d_ptr->m_checkBoxFactory->addPropertyManager(itFlag.next()->subBoolPropertyManager()); @@ -2132,87 +2200,87 @@ QWidget *QtVariantEditorFactory::createEditor(QtVariantPropertyManager *manager, */ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager *manager) { - QList intPropertyManagers = manager->findChildren(); + QList intPropertyManagers = qFindChildren(manager); QListIterator itInt(intPropertyManagers); while (itInt.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itInt.next()); - QList doublePropertyManagers = manager->findChildren(); + QList doublePropertyManagers = qFindChildren(manager); QListIterator itDouble(doublePropertyManagers); while (itDouble.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itDouble.next()); - QList boolPropertyManagers = manager->findChildren(); + QList boolPropertyManagers = qFindChildren(manager); QListIterator itBool(boolPropertyManagers); while (itBool.hasNext()) d_ptr->m_checkBoxFactory->removePropertyManager(itBool.next()); - QList stringPropertyManagers = manager->findChildren(); + QList stringPropertyManagers = qFindChildren(manager); QListIterator itString(stringPropertyManagers); while (itString.hasNext()) d_ptr->m_lineEditFactory->removePropertyManager(itString.next()); - QList datePropertyManagers = manager->findChildren(); + QList datePropertyManagers = qFindChildren(manager); QListIterator itDate(datePropertyManagers); while (itDate.hasNext()) d_ptr->m_dateEditFactory->removePropertyManager(itDate.next()); - QList timePropertyManagers = manager->findChildren(); + QList timePropertyManagers = qFindChildren(manager); QListIterator itTime(timePropertyManagers); while (itTime.hasNext()) d_ptr->m_timeEditFactory->removePropertyManager(itTime.next()); - QList dateTimePropertyManagers = manager->findChildren(); + QList dateTimePropertyManagers = qFindChildren(manager); QListIterator itDateTime(dateTimePropertyManagers); while (itDateTime.hasNext()) d_ptr->m_dateTimeEditFactory->removePropertyManager(itDateTime.next()); - QList keySequencePropertyManagers = manager->findChildren(); + QList keySequencePropertyManagers = qFindChildren(manager); QListIterator itKeySequence(keySequencePropertyManagers); while (itKeySequence.hasNext()) d_ptr->m_keySequenceEditorFactory->removePropertyManager(itKeySequence.next()); - QList charPropertyManagers = manager->findChildren(); + QList charPropertyManagers = qFindChildren(manager); QListIterator itChar(charPropertyManagers); while (itChar.hasNext()) d_ptr->m_charEditorFactory->removePropertyManager(itChar.next()); - QList localePropertyManagers = manager->findChildren(); + QList localePropertyManagers = qFindChildren(manager); QListIterator itLocale(localePropertyManagers); while (itLocale.hasNext()) d_ptr->m_comboBoxFactory->removePropertyManager(itLocale.next()->subEnumPropertyManager()); - QList pointPropertyManagers = manager->findChildren(); + QList pointPropertyManagers = qFindChildren(manager); QListIterator itPoint(pointPropertyManagers); while (itPoint.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itPoint.next()->subIntPropertyManager()); - QList pointFPropertyManagers = manager->findChildren(); + QList pointFPropertyManagers = qFindChildren(manager); QListIterator itPointF(pointFPropertyManagers); while (itPointF.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itPointF.next()->subDoublePropertyManager()); - QList sizePropertyManagers = manager->findChildren(); + QList sizePropertyManagers = qFindChildren(manager); QListIterator itSize(sizePropertyManagers); while (itSize.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itSize.next()->subIntPropertyManager()); - QList sizeFPropertyManagers = manager->findChildren(); + QList sizeFPropertyManagers = qFindChildren(manager); QListIterator itSizeF(sizeFPropertyManagers); while (itSizeF.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itSizeF.next()->subDoublePropertyManager()); - QList rectPropertyManagers = manager->findChildren(); + QList rectPropertyManagers = qFindChildren(manager); QListIterator itRect(rectPropertyManagers); while (itRect.hasNext()) d_ptr->m_spinBoxFactory->removePropertyManager(itRect.next()->subIntPropertyManager()); - QList rectFPropertyManagers = manager->findChildren(); + QList rectFPropertyManagers = qFindChildren(manager); QListIterator itRectF(rectFPropertyManagers); while (itRectF.hasNext()) d_ptr->m_doubleSpinBoxFactory->removePropertyManager(itRectF.next()->subDoublePropertyManager()); - QList colorPropertyManagers = manager->findChildren(); + QList colorPropertyManagers = qFindChildren(manager); QListIterator itColor(colorPropertyManagers); while (itColor.hasNext()) { QtColorPropertyManager *manager = itColor.next(); @@ -2220,12 +2288,12 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager()); } - QList enumPropertyManagers = manager->findChildren(); + QList enumPropertyManagers = qFindChildren(manager); QListIterator itEnum(enumPropertyManagers); while (itEnum.hasNext()) d_ptr->m_comboBoxFactory->removePropertyManager(itEnum.next()); - QList sizePolicyPropertyManagers = manager->findChildren(); + QList sizePolicyPropertyManagers = qFindChildren(manager); QListIterator itSizePolicy(sizePolicyPropertyManagers); while (itSizePolicy.hasNext()) { QtSizePolicyPropertyManager *manager = itSizePolicy.next(); @@ -2233,7 +2301,7 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager()); } - QList fontPropertyManagers = manager->findChildren(); + QList fontPropertyManagers = qFindChildren(manager); QListIterator itFont(fontPropertyManagers); while (itFont.hasNext()) { QtFontPropertyManager *manager = itFont.next(); @@ -2243,17 +2311,19 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager()); } - QList cursorPropertyManagers = manager->findChildren(); + QList cursorPropertyManagers = qFindChildren(manager); QListIterator itCursor(cursorPropertyManagers); while (itCursor.hasNext()) d_ptr->m_cursorEditorFactory->removePropertyManager(itCursor.next()); - QList flagPropertyManagers = manager->findChildren(); + QList flagPropertyManagers = qFindChildren(manager); QListIterator itFlag(flagPropertyManagers); while (itFlag.hasNext()) d_ptr->m_checkBoxFactory->removePropertyManager(itFlag.next()->subBoolPropertyManager()); } +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif -#include "moc_qtvariantproperty.cpp" +#include "moc_qtvariantproperty.cxx" diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.h b/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.h similarity index 59% rename from studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.h rename to studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.h index 18220abedd..9f20d3dd41 100644 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtvariantproperty.h +++ b/studio/src/3rdparty/qtpropertybrowser/qtvariantproperty.h @@ -1,32 +1,86 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** This file is part of a Qt Solutions component. +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (qt-info@nokia.com) +** +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Solutions Commercial License Agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, 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. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** Please note Third Party Software included with Qt Solutions may impose +** additional restrictions and it is the user's responsibility to ensure +** that they have met the licensing requirements of the GPL, LGPL, or Qt +** Solutions Commercial license and the relevant license of the Third +** Party Software they are using. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** +****************************************************************************/ + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** 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. ** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. ** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -34,19 +88,20 @@ #ifndef QTVARIANTPROPERTY_H #define QTVARIANTPROPERTY_H -#include "qtpropertybrowser_export.h" #include "qtpropertybrowser.h" - #include #include +#if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE +#endif typedef QMap QtIconMap; class QtVariantPropertyManager; +class QtVariantPropertyPrivate; -class QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty +class QT_QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty { public: ~QtVariantProperty(); @@ -61,10 +116,12 @@ class QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty QtVariantProperty(QtVariantPropertyManager *manager); private: friend class QtVariantPropertyManager; - QScopedPointer d_ptr; + QtVariantPropertyPrivate *d_ptr; }; -class QTPROPERTYBROWSER_EXPORT QtVariantPropertyManager : public QtAbstractPropertyManager +class QtVariantPropertyManagerPrivate; + +class QT_QTPROPERTYBROWSER_EXPORT QtVariantPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: @@ -105,7 +162,7 @@ public Q_SLOTS: virtual void uninitializeProperty(QtProperty *property); virtual QtProperty *createProperty(); private: - QScopedPointer d_ptr; + QtVariantPropertyManagerPrivate *d_ptr; Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int)) Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int)) @@ -147,7 +204,9 @@ public Q_SLOTS: Q_DISABLE_COPY(QtVariantPropertyManager) }; -class QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorFactory +class QtVariantEditorFactoryPrivate; + +class QT_QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorFactory { Q_OBJECT public: @@ -159,12 +218,14 @@ class QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorF QWidget *parent); void disconnectPropertyManager(QtVariantPropertyManager *manager); private: - QScopedPointer d_ptr; + QtVariantEditorFactoryPrivate *d_ptr; Q_DECLARE_PRIVATE(QtVariantEditorFactory) Q_DISABLE_COPY(QtVariantEditorFactory) }; +#if QT_VERSION >= 0x040400 QT_END_NAMESPACE +#endif Q_DECLARE_METATYPE(QIcon) Q_DECLARE_METATYPE(QtIconMap) diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h deleted file mode 100644 index bfad38d9c2..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtbuttonpropertybrowser.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTBUTTONPROPERTYBROWSER_H -#define QTBUTTONPROPERTYBROWSER_H - -#include "qtpropertybrowser.h" -#include "qtpropertybrowser_export.h" - -QT_BEGIN_NAMESPACE - -class QtButtonPropertyBrowserPrivate; - -class QTPROPERTYBROWSER_EXPORT QtButtonPropertyBrowser : public QtAbstractPropertyBrowser -{ - Q_OBJECT -public: - - QtButtonPropertyBrowser(QWidget *parent = 0); - ~QtButtonPropertyBrowser(); - - void setExpanded(QtBrowserItem *item, bool expanded); - bool isExpanded(QtBrowserItem *item) const; - -Q_SIGNALS: - - void collapsed(QtBrowserItem *item); - void expanded(QtBrowserItem *item); - -protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); - -private: - - QScopedPointer d_ptr; - Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) - Q_DISABLE_COPY(QtButtonPropertyBrowser) - Q_PRIVATE_SLOT(d_func(), void slotUpdate()) - Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) - Q_PRIVATE_SLOT(d_func(), void slotToggled(bool)) - -}; - -QT_END_NAMESPACE - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h deleted file mode 100644 index 990796661d..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtgroupboxpropertybrowser.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTGROUPBOXPROPERTYBROWSER_H -#define QTGROUPBOXPROPERTYBROWSER_H - -#include "qtpropertybrowser.h" -#include "qtpropertybrowser_export.h" - -QT_BEGIN_NAMESPACE - -class QtGroupBoxPropertyBrowserPrivate; - -class QTPROPERTYBROWSER_EXPORT QtGroupBoxPropertyBrowser : public QtAbstractPropertyBrowser -{ - Q_OBJECT -public: - - QtGroupBoxPropertyBrowser(QWidget *parent = 0); - ~QtGroupBoxPropertyBrowser(); - -protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); - -private: - - QScopedPointer d_ptr; - Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) - Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) - Q_PRIVATE_SLOT(d_func(), void slotUpdate()) - Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed()) - -}; - -QT_END_NAMESPACE - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp deleted file mode 100644 index 015ac8b025..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils.cpp +++ /dev/null @@ -1,296 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtpropertybrowserutils_p.h" -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -QtCursorDatabase::QtCursorDatabase() -{ - appendCursor(Qt::ArrowCursor, QCoreApplication::translate("QtCursorDatabase", "Arrow"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-arrow.png"))); - appendCursor(Qt::UpArrowCursor, QCoreApplication::translate("QtCursorDatabase", "Up Arrow"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-uparrow.png"))); - appendCursor(Qt::CrossCursor, QCoreApplication::translate("QtCursorDatabase", "Cross"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-cross.png"))); - appendCursor(Qt::WaitCursor, QCoreApplication::translate("QtCursorDatabase", "Wait"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-wait.png"))); - appendCursor(Qt::IBeamCursor, QCoreApplication::translate("QtCursorDatabase", "IBeam"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-ibeam.png"))); - appendCursor(Qt::SizeVerCursor, QCoreApplication::translate("QtCursorDatabase", "Size Vertical"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizev.png"))); - appendCursor(Qt::SizeHorCursor, QCoreApplication::translate("QtCursorDatabase", "Size Horizontal"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizeh.png"))); - appendCursor(Qt::SizeFDiagCursor, QCoreApplication::translate("QtCursorDatabase", "Size Backslash"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizef.png"))); - appendCursor(Qt::SizeBDiagCursor, QCoreApplication::translate("QtCursorDatabase", "Size Slash"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizeb.png"))); - appendCursor(Qt::SizeAllCursor, QCoreApplication::translate("QtCursorDatabase", "Size All"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-sizeall.png"))); - appendCursor(Qt::BlankCursor, QCoreApplication::translate("QtCursorDatabase", "Blank"), - QIcon()); - appendCursor(Qt::SplitVCursor, QCoreApplication::translate("QtCursorDatabase", "Split Vertical"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-vsplit.png"))); - appendCursor(Qt::SplitHCursor, QCoreApplication::translate("QtCursorDatabase", "Split Horizontal"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-hsplit.png"))); - appendCursor(Qt::PointingHandCursor, QCoreApplication::translate("QtCursorDatabase", "Pointing Hand"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-hand.png"))); - appendCursor(Qt::ForbiddenCursor, QCoreApplication::translate("QtCursorDatabase", "Forbidden"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-forbidden.png"))); - appendCursor(Qt::OpenHandCursor, QCoreApplication::translate("QtCursorDatabase", "Open Hand"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-openhand.png"))); - appendCursor(Qt::ClosedHandCursor, QCoreApplication::translate("QtCursorDatabase", "Closed Hand"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-closedhand.png"))); - appendCursor(Qt::WhatsThisCursor, QCoreApplication::translate("QtCursorDatabase", "What's This"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-whatsthis.png"))); - appendCursor(Qt::BusyCursor, QCoreApplication::translate("QtCursorDatabase", "Busy"), - QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/cursor-busy.png"))); -} - -void QtCursorDatabase::clear() -{ - m_cursorNames.clear(); - m_cursorIcons.clear(); - m_valueToCursorShape.clear(); - m_cursorShapeToValue.clear(); -} - -void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) -{ - if (m_cursorShapeToValue.contains(shape)) - return; - const int value = m_cursorNames.count(); - m_cursorNames.append(name); - m_cursorIcons.insert(value, icon); - m_valueToCursorShape.insert(value, shape); - m_cursorShapeToValue.insert(shape, value); -} - -QStringList QtCursorDatabase::cursorShapeNames() const -{ - return m_cursorNames; -} - -QMap QtCursorDatabase::cursorShapeIcons() const -{ - return m_cursorIcons; -} - -QString QtCursorDatabase::cursorToShapeName(const QCursor &cursor) const -{ - int val = cursorToValue(cursor); - if (val >= 0) - return m_cursorNames.at(val); - return QString(); -} - -QIcon QtCursorDatabase::cursorToShapeIcon(const QCursor &cursor) const -{ - int val = cursorToValue(cursor); - return m_cursorIcons.value(val); -} - -int QtCursorDatabase::cursorToValue(const QCursor &cursor) const -{ -#ifndef QT_NO_CURSOR - Qt::CursorShape shape = cursor.shape(); - if (m_cursorShapeToValue.contains(shape)) - return m_cursorShapeToValue[shape]; -#endif - return -1; -} - -#ifndef QT_NO_CURSOR -QCursor QtCursorDatabase::valueToCursor(int value) const -{ - if (m_valueToCursorShape.contains(value)) - return QCursor(m_valueToCursorShape[value]); - return QCursor(); -} -#endif - -QPixmap QtPropertyBrowserUtils::brushValuePixmap(const QBrush &b) -{ - QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); - img.fill(0); - - QPainter painter(&img); - painter.setCompositionMode(QPainter::CompositionMode_Source); - painter.fillRect(0, 0, img.width(), img.height(), b); - QColor color = b.color(); - if (color.alpha() != 255) { // indicate alpha by an inset - QBrush opaqueBrush = b; - color.setAlpha(255); - opaqueBrush.setColor(color); - painter.fillRect(img.width() / 4, img.height() / 4, - img.width() / 2, img.height() / 2, opaqueBrush); - } - painter.end(); - return QPixmap::fromImage(img); -} - -QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b) -{ - return QIcon(brushValuePixmap(b)); -} - -QString QtPropertyBrowserUtils::colorValueText(const QColor &c) -{ - return QCoreApplication::translate("QtPropertyBrowserUtils", "[%1, %2, %3] (%4)") - .arg(c.red()).arg(c.green()).arg(c.blue()).arg(c.alpha()); -} - -QPixmap QtPropertyBrowserUtils::fontValuePixmap(const QFont &font) -{ - QFont f = font; - QImage img(16, 16, QImage::Format_ARGB32_Premultiplied); - img.fill(0); - QPainter p(&img); - p.setRenderHint(QPainter::TextAntialiasing, true); - p.setRenderHint(QPainter::Antialiasing, true); - f.setPointSize(13); - p.setFont(f); - QTextOption t; - t.setAlignment(Qt::AlignCenter); - p.drawText(QRect(0, 0, 16, 16), QString(QLatin1Char('A')), t); - return QPixmap::fromImage(img); -} - -QIcon QtPropertyBrowserUtils::fontValueIcon(const QFont &f) -{ - return QIcon(fontValuePixmap(f)); -} - -QString QtPropertyBrowserUtils::fontValueText(const QFont &f) -{ - return QCoreApplication::translate("QtPropertyBrowserUtils", "[%1, %2]") - .arg(f.family()).arg(f.pointSize()); -} - -QString QtPropertyBrowserUtils::dateFormat() -{ - QLocale loc; - return loc.dateFormat(QLocale::ShortFormat); -} - -QString QtPropertyBrowserUtils::timeFormat() -{ - QLocale loc; - // ShortFormat is missing seconds on UNIX. - return loc.timeFormat(QLocale::LongFormat); -} - -QString QtPropertyBrowserUtils::dateTimeFormat() -{ - QString format = dateFormat(); - format += QLatin1Char(' '); - format += timeFormat(); - return format; -} - -QtBoolEdit::QtBoolEdit(QWidget *parent) : - QWidget(parent), - m_checkBox(new QCheckBox(this)), - m_textVisible(true) -{ - QHBoxLayout *lt = new QHBoxLayout; - if (QApplication::layoutDirection() == Qt::LeftToRight) - lt->setContentsMargins(4, 0, 0, 0); - else - lt->setContentsMargins(0, 0, 4, 0); - lt->addWidget(m_checkBox); - setLayout(lt); - connect(m_checkBox, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool))); - setFocusProxy(m_checkBox); - m_checkBox->setText(tr("True")); -} - -void QtBoolEdit::setTextVisible(bool textVisible) -{ - if (m_textVisible == textVisible) - return; - - m_textVisible = textVisible; - if (m_textVisible) - m_checkBox->setText(isChecked() ? tr("True") : tr("False")); - else - m_checkBox->setText(QString()); -} - -Qt::CheckState QtBoolEdit::checkState() const -{ - return m_checkBox->checkState(); -} - -void QtBoolEdit::setCheckState(Qt::CheckState state) -{ - m_checkBox->setCheckState(state); -} - -bool QtBoolEdit::isChecked() const -{ - return m_checkBox->isChecked(); -} - -void QtBoolEdit::setChecked(bool c) -{ - m_checkBox->setChecked(c); - if (!m_textVisible) - return; - m_checkBox->setText(isChecked() ? tr("True") : tr("False")); -} - -bool QtBoolEdit::blockCheckBoxSignals(bool block) -{ - return m_checkBox->blockSignals(block); -} - -void QtBoolEdit::mousePressEvent(QMouseEvent *event) -{ - if (event->buttons() == Qt::LeftButton) { - m_checkBox->click(); - event->accept(); - } else { - QWidget::mousePressEvent(event); - } -} - -QT_END_NAMESPACE diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h b/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h deleted file mode 100644 index c6b3f41383..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/src/qtpropertybrowserutils_p.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of Qt Designer. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QTPROPERTYBROWSERUTILS_H -#define QTPROPERTYBROWSERUTILS_H - -#include "qtpropertybrowser_export.h" - -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QMouseEvent; -class QCheckBox; -class QLineEdit; - -class QTPROPERTYBROWSER_EXPORT QtCursorDatabase -{ -public: - QtCursorDatabase(); - void clear(); - - QStringList cursorShapeNames() const; - QMap cursorShapeIcons() const; - QString cursorToShapeName(const QCursor &cursor) const; - QIcon cursorToShapeIcon(const QCursor &cursor) const; - int cursorToValue(const QCursor &cursor) const; -#ifndef QT_NO_CURSOR - QCursor valueToCursor(int value) const; -#endif -private: - void appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon); - QStringList m_cursorNames; - QMap m_cursorIcons; - QMap m_valueToCursorShape; - QMap m_cursorShapeToValue; -}; - -class QTPROPERTYBROWSER_EXPORT QtPropertyBrowserUtils -{ -public: - static QPixmap brushValuePixmap(const QBrush &b); - static QIcon brushValueIcon(const QBrush &b); - static QString colorValueText(const QColor &c); - static QPixmap fontValuePixmap(const QFont &f); - static QIcon fontValueIcon(const QFont &f); - static QString fontValueText(const QFont &f); - static QString dateFormat(); - static QString timeFormat(); - static QString dateTimeFormat(); -}; - -class QTPROPERTYBROWSER_EXPORT QtBoolEdit : public QWidget { - Q_OBJECT -public: - QtBoolEdit(QWidget *parent = 0); - - bool textVisible() const { return m_textVisible; } - void setTextVisible(bool textVisible); - - Qt::CheckState checkState() const; - void setCheckState(Qt::CheckState state); - - bool isChecked() const; - void setChecked(bool c); - - bool blockCheckBoxSignals(bool block); - -Q_SIGNALS: - void toggled(bool); - -protected: - void mousePressEvent(QMouseEvent * event); - -private: - QCheckBox *m_checkBox; - bool m_textVisible; -}; - -QT_END_NAMESPACE - -#endif diff --git a/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h b/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h deleted file mode 100644 index 7861f297c7..0000000000 --- a/studio/src/3rdparty/qtpropertybrowser/src/qttreepropertybrowser.h +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL21$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** As a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTTREEPROPERTYBROWSER_H -#define QTTREEPROPERTYBROWSER_H - -#include "qtpropertybrowser_export.h" -#include "qtpropertybrowser.h" - -QT_BEGIN_NAMESPACE - -class QTreeWidgetItem; -class QtTreePropertyBrowserPrivate; - -class QTPROPERTYBROWSER_EXPORT QtTreePropertyBrowser : public QtAbstractPropertyBrowser -{ - Q_OBJECT - Q_ENUMS(ResizeMode) - Q_PROPERTY(int indentation READ indentation WRITE setIndentation) - Q_PROPERTY(bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated) - Q_PROPERTY(bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors) - Q_PROPERTY(bool headerVisible READ isHeaderVisible WRITE setHeaderVisible) - Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode) - Q_PROPERTY(int splitterPosition READ splitterPosition WRITE setSplitterPosition) - Q_PROPERTY(bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked) -public: - - enum ResizeMode - { - Interactive, - Stretch, - Fixed, - ResizeToContents - }; - - QtTreePropertyBrowser(QWidget *parent = 0); - ~QtTreePropertyBrowser(); - - int indentation() const; - void setIndentation(int i); - - bool rootIsDecorated() const; - void setRootIsDecorated(bool show); - - bool alternatingRowColors() const; - void setAlternatingRowColors(bool enable); - - bool isHeaderVisible() const; - void setHeaderVisible(bool visible); - - ResizeMode resizeMode() const; - void setResizeMode(ResizeMode mode); - - int splitterPosition() const; - void setSplitterPosition(int position); - - void setExpanded(QtBrowserItem *item, bool expanded); - bool isExpanded(QtBrowserItem *item) const; - - bool isItemVisible(QtBrowserItem *item) const; - void setItemVisible(QtBrowserItem *item, bool visible); - - void setBackgroundColor(QtBrowserItem *item, const QColor &color); - QColor backgroundColor(QtBrowserItem *item) const; - QColor calculatedBackgroundColor(QtBrowserItem *item) const; - - void setPropertiesWithoutValueMarked(bool mark); - bool propertiesWithoutValueMarked() const; - - void editItem(QtBrowserItem *item); - -Q_SIGNALS: - - void collapsed(QtBrowserItem *item); - void expanded(QtBrowserItem *item); - -protected: - virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem); - virtual void itemRemoved(QtBrowserItem *item); - virtual void itemChanged(QtBrowserItem *item); - -private: - - QScopedPointer d_ptr; - Q_DECLARE_PRIVATE(QtTreePropertyBrowser) - Q_DISABLE_COPY(QtTreePropertyBrowser) - - Q_PRIVATE_SLOT(d_func(), void slotCollapsed(const QModelIndex &)) - Q_PRIVATE_SLOT(d_func(), void slotExpanded(const QModelIndex &)) - Q_PRIVATE_SLOT(d_func(), void slotCurrentBrowserItemChanged(QtBrowserItem *)) - Q_PRIVATE_SLOT(d_func(), void slotCurrentTreeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)) - -}; - -QT_END_NAMESPACE - -#endif diff --git a/studio/src/libqtpropertybrowser-text/CMakeLists.txt b/studio/src/libqtpropertybrowser-text/CMakeLists.txt index da6df91728..c35020dabb 100644 --- a/studio/src/libqtpropertybrowser-text/CMakeLists.txt +++ b/studio/src/libqtpropertybrowser-text/CMakeLists.txt @@ -1,3 +1,5 @@ +FIND_PACKAGE(QtPropertyBrowser REQUIRED) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON)