diff --git a/code/CMakeModules/CheckDepends.cmake b/code/CMakeModules/CheckDepends.cmake index 893582581..d2fbe06e1 100644 --- a/code/CMakeModules/CheckDepends.cmake +++ b/code/CMakeModules/CheckDepends.cmake @@ -27,12 +27,17 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND) ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL}) ENDIF(CMAKE_NM) ELSEIF(UNIX) + SET(CMAKE_OBJDUMP objdump) IF(CMAKE_OBJDUMP) # Use objdump to check if a library is using an external symbol + #MESSAGE(STATUS "exec ${CMAKE_OBJDUMP} -T ${${MYLIBRARY}} | grep ${SYMBOL}") EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-T ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE OBJDUMP_SYMBOL) - IF(OBJDUMP_SYMBOL MATCHES "UND") + IF(NOT OBJDUMP_SYMBOL MATCHES "UND") + #MESSAGE(STATUS "${${MYLIBRARY}} does not use symbol ${SYMBOL}") SET(${SYMBOL_FOUND} FALSE) - ENDIF(OBJDUMP_SYMBOL MATCHES "UND") + ELSE(NOT OBJDUMP_SYMBOL MATCHES "UND") + #MESSAGE(STATUS "${${MYLIBRARY}} uses symbol ${SYMBOL}") + ENDIF(NOT OBJDUMP_SYMBOL MATCHES "UND") ENDIF(CMAKE_OBJDUMP) ENDIF(WIN32) ENDMACRO(CHECK_UNDEFINED_SYMBOL) @@ -64,14 +69,19 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND) ENDIF(OTOOL_LIBRARY MATCHES "${LIBNAME}") ENDIF(CMAKE_OTOOL) ELSEIF(UNIX) + SET(CMAKE_OBJDUMP objdump) IF(CMAKE_OBJDUMP) GET_FILENAME_COMPONENT(LIBNAME "${${OTHERLIBRARY}}" NAME) # TODO: under Solaris use dump -Lv # Use objdump to check if a library is linked to another library + #MESSAGE(STATUS "exec ${CMAKE_OBJDUMP} -p ${${MYLIBRARY}} | grep ${LIBNAME}") EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-p ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OBJDUMP_LIBRARY) - IF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED") + IF(OBJDUMP_LIBRARY MATCHES "NEEDED") + #MESSAGE(STATUS "${${MYLIBRARY}} references to ${LIBNAME}.") SET(${LIBRARY_FOUND} TRUE) - ENDIF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED") + ELSE(OBJDUMP_LIBRARY MATCHES "NEEDED") + #MESSAGE(STATUS "${${MYLIBRARY}} does not reference to ${LIBNAME}!") + ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED") ENDIF(CMAKE_OBJDUMP) ENDIF(WIN32) ENDMACRO(CHECK_LINKED_LIBRARY) @@ -125,3 +135,4 @@ MACRO(LINK_DEPENDS LIBRARIES MYLIBRARY OTHERLIBRARY SYMBOL) SET(${OTHERLIBRARY}_LINKED TRUE) ENDIF(MUST_LINK) ENDMACRO(LINK_DEPENDS) + diff --git a/code/README b/code/README index e880666e5..3c19258ee 100644 --- a/code/README +++ b/code/README @@ -1,10 +1,10 @@ Introduction ------------ -NeL is a software platform for creating and running massively multi-user +Ryzom Core is a software platform for creating and running massively multi-user entertainment in a 3D environment over the Internet. -The NeL library is further divided into specific modules: network, ai, 3d +The Ryzom Core library is further divided into specific modules: network, ai, 3d and misc. If you want to use any of these, you also need to use the misc part of the library, but ai, 3d and network are totally independant from each other so you can use only the parts you really need in your project. @@ -12,14 +12,14 @@ each other so you can use only the parts you really need in your project. If you want know more about the library content and functionalities, you should take a look on the documents present in the doc directory. -NeL is currently developped and tested under GNU/Linux and Windows +Ryzom Core is currently developped and tested under GNU/Linux and Windows environments. License ------- -NeL is a Free Software project under the GNU Affero General Public License, +Ryzom Core is a Free Software project under the GNU Affero General Public License, which means all its code is available for everyone to download, examine, use, modify, and distribute, subject to the usual restrictions attached to any GPL software. If you are not familiar with the AGPL, see the COPYING @@ -29,4 +29,4 @@ file for for more details on license terms and other legal issues. Installation ------------ -Please check the dev.ryzom.com for more information \ No newline at end of file +Please check the dev.ryzom.com for more information diff --git a/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt index 344417e3f..3cbe745af 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt @@ -19,6 +19,10 @@ SET(OBJECT_VIEWER_TS translations/object_viewer_qt_en.ts SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) + +IF(WIN32) + SET(OBJECT_VIEWER_RC object_viewer_qt.rc) +ENDIF(WIN32) QT4_ADD_TRANSLATION(OBJECT_VIEWER_QM ${OBJECT_VIEWER_TS}) QT4_ADD_RESOURCES( OBJECT_VIEWER_RC_SRCS ${OBJECT_VIEWER_RCS}) @@ -30,7 +34,8 @@ SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${OBJECT_VIEWER_MOC_SRCS} ${OBJECT_VIEWE ADD_EXECUTABLE(object_viewer_qt WIN32 MACOSX_BUNDLE ${OBJECT_VIEWER_SRC} ${OBJECT_VIEWER_MOC_SRCS} - ${OBJECT_VIEWER_RC_SRCS}) + ${OBJECT_VIEWER_RC_SRCS} + ${OBJECT_VIEWER_RC}) TARGET_LINK_LIBRARIES(object_viewer_qt nelmisc diff --git a/code/nel/tools/3d/object_viewer_qt/src/ic_nel_pill.ico b/code/nel/tools/3d/object_viewer_qt/src/ic_nel_pill.ico new file mode 100644 index 000000000..2f2fc9eb3 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/ic_nel_pill.ico differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.rc b/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.rc new file mode 100644 index 000000000..a0f0e7099 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.rc @@ -0,0 +1,54 @@ +#include + +#define IDR_MAINFRAME 128 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "Ryzom Core\0" + VALUE "FileDescription", "\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Object_Viewer_Qt\0" + VALUE "LegalCopyright", "Copyright (C) 2011\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "Object Viewer Qt\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "ic_nel_pill.ico" diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.qrc b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.qrc index c9cae1893..85b4702b0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.qrc +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.qrc @@ -1,9 +1,15 @@ - images/list-add.png - images/list-remove.png - images/go-up.png - images/go-down.png + icons/ic_nel_add_item.png + icons/ic_nel_crash.png + icons/ic_nel_delete_item.png + icons/ic_nel_down_item.png + icons/ic_nel_generic_settings.png + icons/ic_nel_open.png + icons/ic_nel_path_settings.png + icons/ic_nel_pill.png + icons/ic_nel_reset_all.png + icons/ic_nel_up_item.png images/nel.png images/preferences.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h index 07567246f..18dc11c87 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h @@ -23,53 +23,57 @@ namespace Core namespace Constants { -const char * const OVQT_VERSION_LONG = "0.0.1"; -const char * const OVQT_VENDOR = "Dzmitry Kamiahin"; -const char * const OVQT_YEAR = "2010, 2011"; +const char * const OVQT_VERSION_LONG = "0.0.1"; +const char * const OVQT_VENDOR = "Dzmitry Kamiahin"; +const char * const OVQT_YEAR = "2010, 2011"; const char * const OVQT_CORE_PLUGIN = "Core"; //mainwindow -const char * const MAIN_WINDOW = "ObjectViewerQt.MainWindow"; +const char * const MAIN_WINDOW = "ObjectViewerQt.MainWindow"; //menubar -const char * const MENU_BAR = "ObjectViewerQt.MenuBar"; +const char * const MENU_BAR = "ObjectViewerQt.MenuBar"; //menus -const char * const M_FILE = "ObjectViewerQt.Menu.File"; -const char * const M_EDIT = "ObjectViewerQt.Menu.Edit"; -const char * const M_VIEW = "ObjectViewerQt.Menu.View"; -const char * const M_SCENE = "ObjectViewerQt.Menu.Scene"; -const char * const M_TOOLS = "ObjectViewerQt.Menu.Tools"; -const char * const M_WINDOW = "ObjectViewerQt.Menu.Window"; -const char * const M_HELP = "ObjectViewerQt.Menu.Help"; +const char * const M_FILE = "ObjectViewerQt.Menu.File"; +const char * const M_EDIT = "ObjectViewerQt.Menu.Edit"; +const char * const M_VIEW = "ObjectViewerQt.Menu.View"; +const char * const M_SCENE = "ObjectViewerQt.Menu.Scene"; +const char * const M_TOOLS = "ObjectViewerQt.Menu.Tools"; +const char * const M_WINDOW = "ObjectViewerQt.Menu.Window"; +const char * const M_HELP = "ObjectViewerQt.Menu.Help"; -const char * const M_SHEET = "ObjectViewerQt.Menu.Sheet"; +const char * const M_SHEET = "ObjectViewerQt.Menu.Sheet"; //actions -const char * const NEW = "ObjectViewerQt.New"; -const char * const OPEN = "ObjectViewerQt.Open"; -const char * const EXIT = "ObjectViewerQt.Exit"; +const char * const NEW = "ObjectViewerQt.New"; +const char * const OPEN = "ObjectViewerQt.Open"; +const char * const EXIT = "ObjectViewerQt.Exit"; -const char * const SETTINGS = "ObjectViewerQt.Settings"; -const char * const TOGGLE_FULLSCREEN = "ObjectViewerQt.ToggleFullScreen"; +const char * const SETTINGS = "ObjectViewerQt.Settings"; +const char * const TOGGLE_FULLSCREEN = "ObjectViewerQt.ToggleFullScreen"; -const char * const CLOSE = "ObjectViewerQt.Close"; -const char * const CLOSEALL = "ObjectViewerQt.CloseAll"; -const char * const CLOSEOTHERS = "ObjectViewerQt.CloseOthers"; -const char * const ABOUT = "ObjectViewerQt.About"; -const char * const ABOUT_PLUGINS = "ObjectViewerQt.AboutPlugins"; -const char * const ABOUT_QT = "ObjectViewerQt.AboutQt"; +const char * const CLOSE = "ObjectViewerQt.Close"; +const char * const CLOSEALL = "ObjectViewerQt.CloseAll"; +const char * const CLOSEOTHERS = "ObjectViewerQt.CloseOthers"; +const char * const ABOUT = "ObjectViewerQt.About"; +const char * const ABOUT_PLUGINS = "ObjectViewerQt.AboutPlugins"; +const char * const ABOUT_QT = "ObjectViewerQt.AboutQt"; //settings const char * const DATA_PATH_SECTION = "DataPath"; const char * const SEARCH_PATHS = "SearchPaths"; const char * const RECURSIVE_SEARCH_PATHS = "RecursiveSearchPathes"; const char * const LEVELDESIGN_PATH = "LevelDesignPath"; -const char * const ASSETS_PATH = "LevelDesignPath"; +const char * const ASSETS_PATH = "LevelDesignPath"; //resources -const char * const ICON_NEL = ":/core/images/nel.png"; -const char * const ICON_SETTINGS = ":/core/images/preferences.png"; +const char * const ICON_NEL = ":/core/images/nel.png"; +const char * const ICON_SETTINGS = ":/core/images/preferences.png"; +const char * const ICON_PILL = ":/core/icons/ic_nel_pill.png"; +const char * const ICON_OPEN = ":/core/icons/ic_nel_open.png"; +const char * const ICON_CRASH = ":/core/icons/ic_nel_crash.png"; + } // namespace Constants } // namespace Core diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_add_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_add_item.png new file mode 100644 index 000000000..bde338f78 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_add_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_crash.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_crash.png new file mode 100644 index 000000000..5e1f6380b Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_crash.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_delete_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_delete_item.png new file mode 100644 index 000000000..a5a1787d5 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_delete_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_down_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_down_item.png new file mode 100644 index 000000000..fc86c4f6d Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_down_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_generic_settings.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_generic_settings.png new file mode 100644 index 000000000..799bacb28 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_generic_settings.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_open.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_open.png new file mode 100644 index 000000000..c4992affd Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_open.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_path_settings.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_path_settings.png new file mode 100644 index 000000000..8f3441112 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_path_settings.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_pill.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_pill.png new file mode 100644 index 000000000..e748b8190 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_pill.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_reset_all.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_reset_all.png new file mode 100644 index 000000000..aea193c70 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_reset_all.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_up_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_up_item.png new file mode 100644 index 000000000..ee471023e Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_up_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/go-down.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/go-down.png deleted file mode 100644 index 780714b8f..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/go-down.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/go-up.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/go-up.png deleted file mode 100644 index 7174fa8be..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/go-up.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/list-add.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/list-add.png deleted file mode 100644 index af5b56e3c..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/list-add.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/list-remove.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/list-remove.png deleted file mode 100644 index 678b34df7..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/list-remove.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp index 13a5370e8..44f415a25 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp @@ -47,7 +47,7 @@ MainWindow::MainWindow(ExtensionSystem::IPluginManager *pluginManager, QWidget * QCoreApplication::setOrganizationName(QLatin1String("RyzomCore")); setObjectName(Constants::MAIN_WINDOW); - setWindowIcon(QIcon(Constants::ICON_NEL)); + setWindowIcon(QIcon(Constants::ICON_PILL)); setWindowTitle(tr("Object Viewer Qt")); m_pluginManager = pluginManager; @@ -173,7 +173,7 @@ void MainWindow::addContextObject(IContext *context) void MainWindow::createActions() { m_openAction = new QAction(tr("&Open..."), this); - m_openAction->setIcon(QIcon(":/images/open-file.png")); + m_openAction->setIcon(QIcon(Constants::ICON_OPEN)); m_openAction->setShortcut(QKeySequence::Open); m_openAction->setStatusTip(tr("Open an existing file")); menuManager()->registerAction(m_openAction, Constants::OPEN); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.cpp index 7f85a17df..c52624717 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.cpp @@ -74,6 +74,7 @@ QWidget *CSearchPathsSettingsPage::createPage(QWidget *parent) connect(m_ui.removeToolButton, SIGNAL(clicked()), this, SLOT(delPath())); connect(m_ui.upToolButton, SIGNAL(clicked()), this, SLOT(upPath())); connect(m_ui.downToolButton, SIGNAL(clicked()), this, SLOT(downPath())); + connect(m_ui.resetToolButton, SIGNAL(clicked()), m_ui.pathsListWidget, SLOT(clear())); return m_page; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.ui index e250cfdda..79a6b2141 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.ui @@ -53,12 +53,15 @@ 0 + + Add + - :/core/images/list-add.png:/core/images/list-add.png + :/core/icons/ic_nel_add_item.png:/core/icons/ic_nel_add_item.png @@ -79,12 +82,15 @@ 0 + + Delete + - :/core/images/list-remove.png:/core/images/list-remove.png + :/core/icons/ic_nel_delete_item.png:/core/icons/ic_nel_delete_item.png @@ -105,12 +111,15 @@ 0 + + Up + - :/core/images/go-up.png:/core/images/go-up.png + :/core/icons/ic_nel_up_item.png:/core/icons/ic_nel_up_item.png @@ -131,12 +140,38 @@ 0 + + Down + - :/core/images/go-down.png:/core/images/go-down.png + :/core/icons/ic_nel_down_item.png:/core/icons/ic_nel_down_item.png + + + + 20 + 20 + + + + true + + + + + + + Reset + + + + + + + :/core/icons/ic_nel_reset_all.png:/core/icons/ic_nel_reset_all.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h index f09ec8fa2..d3be3bc38 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/plugin1.h @@ -62,7 +62,11 @@ class CExampleContext: public Core::IContext { Q_OBJECT public: - CExampleContext(QObject *parent = 0): IContext(parent) {} + CExampleContext(QObject *parent = 0): IContext(parent) + { + m_simpleViewer = new CSimpleViewer(); + } + virtual ~CExampleContext() {} virtual QString id() const @@ -79,8 +83,10 @@ public: } virtual QWidget *widget() { - return new CSimpleViewer(); + return m_simpleViewer; } + + CSimpleViewer *m_simpleViewer; }; } // namespace Plugin diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt index 9ea5ef8a5..7f084fbb1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt @@ -70,7 +70,8 @@ SET(OBJECT_VIEWER_PLUGIN_HDR object_viewer_plugin.h camera_control.h graphics_settings_page.h sound_settings_page.h - vegetable_settings_page.h) + vegetable_settings_page.h + scheme_bank_dialog.h) SET(OBJECT_VIEWER_PLUGIN_UIS animation_form.ui animation_set_form.ui @@ -120,7 +121,9 @@ SET(OBJECT_VIEWER_PLUGIN_UIS animation_form.ui tune_timer_form.ui graphics_settings_page.ui sound_settings_page.ui - vegetable_settings_page.ui) + vegetable_settings_page.ui + scheme_bank_form.ui + value_gradient_form.ui) SET(OBJECT_VIEWER_PLUGIN_RCS object_viewer.qrc) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_form.ui index eef9f0950..178a27e37 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/animation_set_form.ui @@ -24,7 +24,7 @@ - :/images/animset.png:/images/animset.png + :/icons/ic_nel_animset.png:/icons/ic_nel_animset.png Animation set manager @@ -309,7 +309,7 @@ - :/images/clear.png:/images/clear.png + :/icons/ic_nel_reset_all.png:/icons/ic_nel_reset_all.png @@ -355,7 +355,7 @@ - :/images/list-add.png:/images/list-add.png + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png @@ -381,7 +381,7 @@ - :/images/list-remove.png:/images/list-remove.png + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png @@ -404,7 +404,7 @@ - :/images/go-up.png:/images/go-up.png + :/icons/ic_nel_up_item.png:/icons/ic_nel_up_item.png @@ -427,7 +427,7 @@ - :/images/go-down.png:/images/go-down.png + :/icons/ic_nel_down_item.png:/icons/ic_nel_down_item.png @@ -471,7 +471,7 @@ - :/images/time.png:/images/time.png + :/icons/ic_nel_framedelay.png:/icons/ic_nel_framedelay.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_form.ui index c3efabdbd..404444fc0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_form.ui @@ -6,8 +6,8 @@ 0 0 - 231 - 213 + 208 + 217 @@ -37,82 +37,83 @@ - - - - - - - - - - - - - - - - - - - Qt::Horizontal - + + + + + 1 + + + 0 + + + + + Qt::Horizontal + + + + 5 + 5 + + + + + + + + + 30 + 16777215 + + + + E + + + + + + + false + + + + 30 + 16777215 + + + + U + + + + + + + true + + + + 0 + 0 + + + + + 30 + 16777215 + + + + B + + + + - - - - Input mutliplier: - - - - - - - Qt::Horizontal - - - - 108 - 20 - - - - - - - - false - - - Clamp - - - - - - - false - - - - - - - Qt::Vertical - - - QSizePolicy::Preferred - - - - 20 - 1 - - - - - + true @@ -127,19 +128,6 @@ - - - - - 30 - 16777215 - - - - E - - - @@ -211,57 +199,84 @@ - - - - false - - - - 30 - 16777215 - - - - U - - - - - - - false - - - - 30 - 16777215 - - - - P - - - - - - - false - - - - 30 - 16777215 - - - - G - - - + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + Input mutliplier: + + + + + + + Qt::Horizontal + + + + 108 + 20 + + + + + + + + false + + + Clamp + + + + + + + false + + + + + + + Qt::Vertical + + + QSizePolicy::Preferred + + + + 20 + 1 + + + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.cpp index 648921f4f..648e0e1a5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.cpp @@ -39,6 +39,7 @@ #include "value_from_emitter_dialog.h" #include "spinner_dialog.h" #include "follow_path_dialog.h" +#include "scheme_bank_dialog.h" namespace NLQT { @@ -59,6 +60,7 @@ CAttribWidget::CAttribWidget(QWidget *parent) _ui.constRangeIntWidget->hide(); _ui.constRGBAWidget->hide(); _ui.schemeWidget->hide(); + _ui.schemeEditWidget->hide(); _ui.inMultiplierWidget->setRange(0.1f, 10.1f); _ui.inMultiplierWidget->enableLowerBound(0, true);; @@ -82,6 +84,7 @@ void CAttribWidget::init() connect(_ui.schemeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changeCurrentScheme(int))); connect(_ui.srcComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setCurrentSrc(int))); connect(_ui.userParamPushButton, SIGNAL(clicked()), this, SLOT(setUserIndex())); + connect(_ui.bankButton, SIGNAL(clicked()), this, SLOT(openSchemeBankDialog())); connect(_ui.comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changeUseScheme(int))); } @@ -181,6 +184,16 @@ void CAttribWidget::changeUseScheme(int index) } } +void CAttribWidget::openSchemeBankDialog() +{ + CSchemeBankDialog *dialog = new CSchemeBankDialog(this); + dialog->setModal(true); + dialog->show(); + dialog->exec(); + delete dialog; + //updateUi(); +} + void CAttribWidget::inputValueUpdate(void) { if (useScheme() && getSchemeInput().InputType == NL3D::CPSInputType::attrUserParam) @@ -206,7 +219,7 @@ void CAttribWidget::schemeValueUpdate() _ui.constRGBAWidget->hide(); _ui.schemeWidget->show(); - + _ui.schemeEditWidget->show(); sint k = getCurrentScheme(); if (k == -1) // unknow scheme ... @@ -312,11 +325,11 @@ QDialog *CAttribFloatWidget::editScheme(void) if (dynamic_cast(scheme)) { CFloatGradientWrapper *wrapper = new CFloatGradientWrapper; - wrapper->MinRange = _MinRange; - wrapper->MaxRange = _MaxRange; - wrapper->Scheme = &(((NL3D::CPSFloatGradient *) (_SchemeWrapper->getScheme()) )->_F); + wrapper->m_minRange = _MinRange; + wrapper->m_maxRange = _MaxRange; + wrapper->m_scheme = &(((NL3D::CPSFloatGradient *) (_SchemeWrapper->getScheme()) )->_F); CGradientDialog *gd = new CGradientDialog(_Node, wrapper, true, true, 2, this); - wrapper->DefaultValue = 0.f; + wrapper->m_defaultValue = 0.f; return gd; } if (dynamic_cast(scheme)) @@ -423,6 +436,7 @@ sint CAttribFloatWidget::getCurrentScheme(void) const void CAttribFloatWidget::cstValueUpdate() { _ui.schemeWidget->hide(); + _ui.schemeEditWidget->hide(); _ui.inMultiplierWidget->setEnabled(false); _ui.clampCheckBox->setEnabled(false); _ui.inputLabel->setEnabled(false); @@ -473,11 +487,11 @@ QDialog *CAttribUIntWidget::editScheme(void) if (dynamic_cast(scheme)) { CUIntGradientWrapper *wrapper = new CUIntGradientWrapper; - wrapper->MinRange = _MinRange; - wrapper->MaxRange = _MaxRange; - wrapper->Scheme = &(((NL3D::CPSUIntGradient *) (_SchemeWrapper->getScheme()) )->_F); + wrapper->m_minRange = _MinRange; + wrapper->m_maxRange = _MaxRange; + wrapper->m_scheme = &(((NL3D::CPSUIntGradient *) (_SchemeWrapper->getScheme()) )->_F); CGradientDialog *gd = new CGradientDialog(_Node, wrapper, true, true, 2, this); - wrapper->DefaultValue = 0; + wrapper->m_defaultValue = 0; return gd; } @@ -560,6 +574,7 @@ sint CAttribUIntWidget::getCurrentScheme(void) const void CAttribUIntWidget::cstValueUpdate() { _ui.schemeWidget->hide(); + _ui.schemeEditWidget->hide(); _ui.inMultiplierWidget->setEnabled(false); _ui.clampCheckBox->setEnabled(false); _ui.inputLabel->setEnabled(false); @@ -610,11 +625,11 @@ QDialog *CAttribIntWidget::editScheme(void) if (dynamic_cast(scheme)) { CIntGradientWrapper *wrapper = new CIntGradientWrapper; - wrapper->MinRange = _MinRange; - wrapper->MaxRange = _MaxRange; - wrapper->Scheme = &(((NL3D::CPSIntGradient *) (_SchemeWrapper->getScheme()) )->_F); + wrapper->m_minRange = _MinRange; + wrapper->m_maxRange = _MaxRange; + wrapper->m_scheme = &(((NL3D::CPSIntGradient *) (_SchemeWrapper->getScheme()) )->_F); CGradientDialog *gd = new CGradientDialog(_Node, wrapper, true, true, 2, this); - wrapper->DefaultValue = 0; + wrapper->m_defaultValue = 0; return gd; } if (dynamic_cast(scheme)) @@ -695,6 +710,7 @@ sint CAttribIntWidget::getCurrentScheme(void) const void CAttribIntWidget::cstValueUpdate() { _ui.schemeWidget->hide(); + _ui.schemeEditWidget->hide(); _ui.inMultiplierWidget->setEnabled(false); _ui.clampCheckBox->setEnabled(false); _ui.inputLabel->setEnabled(false); @@ -737,9 +753,9 @@ QDialog *CAttribRGBAWidget::editScheme(void) if (dynamic_cast(scheme)) { CColorGradientWrapper *wrapper = new CColorGradientWrapper; - wrapper->Scheme = &(((NL3D::CPSColorGradient *) (_SchemeWrapper->getScheme()) )->_F); + wrapper->m_scheme = &(((NL3D::CPSColorGradient *) (_SchemeWrapper->getScheme()) )->_F); CGradientDialog *gd = new CGradientDialog(_Node, wrapper, true, true, 2, this); - wrapper->DefaultValue = NLMISC::CRGBA::White; + wrapper->m_defaultValue = NLMISC::CRGBA::White; return gd; } if (dynamic_cast(scheme)) @@ -827,6 +843,7 @@ sint CAttribRGBAWidget::getCurrentScheme(void) const void CAttribRGBAWidget::cstValueUpdate() { _ui.schemeWidget->hide(); + _ui.schemeEditWidget->hide(); _ui.inMultiplierWidget->setEnabled(false); _ui.clampCheckBox->setEnabled(false); _ui.inputLabel->setEnabled(false); @@ -861,9 +878,9 @@ QDialog *CAttribPlaneBasisWidget::editScheme(void) if (dynamic_cast(scheme)) { CPlaneBasisGradientWrapper *wrapper = new CPlaneBasisGradientWrapper; - wrapper->Scheme = &(((NL3D::CPSPlaneBasisGradient *) (_SchemeWrapper->getScheme()) )->_F); + wrapper->m_scheme = &(((NL3D::CPSPlaneBasisGradient *) (_SchemeWrapper->getScheme()) )->_F); CGradientDialog *gd = new CGradientDialog(_Node, wrapper, true, true, 2, this); - wrapper->DefaultValue = NL3D::CPlaneBasis(NLMISC::CVector::K); + wrapper->m_defaultValue = NL3D::CPlaneBasis(NLMISC::CVector::K); return gd; } if (dynamic_cast(scheme)) @@ -964,6 +981,7 @@ sint CAttribPlaneBasisWidget::getCurrentScheme(void) const void CAttribPlaneBasisWidget::cstValueUpdate() { _ui.schemeWidget->hide(); + _ui.schemeEditWidget->hide(); _ui.inMultiplierWidget->setEnabled(false); _ui.clampCheckBox->setEnabled(false); _ui.inputLabel->setEnabled(false); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.h index 3a14516a1..7bd929d72 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/attrib_widget.h @@ -109,6 +109,7 @@ private Q_SLOTS: virtual void setCurrentSrc(int index); virtual void setUserIndex(); virtual void changeUseScheme(int index); + virtual void openSchemeBankDialog(); protected: diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/camera_control.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/camera_control.cpp index 916158cc6..4443833d0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/camera_control.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/camera_control.cpp @@ -33,6 +33,7 @@ // Project includes #include "modules.h" +#include "object_viewer_constants.h" static int camId = 0; @@ -106,11 +107,13 @@ CCameraControl::CCameraControl(QWidget *parent) { _camToolBar = new QToolBar(tr("CameraControl"), parent); - _fpsAction = _camToolBar->addAction(tr("Fly")); + _fpsAction = _camToolBar->addAction(tr("Camera frs")); + _fpsAction->setIcon(QIcon(Constants::ICON_CAMERA_FPS)); _fpsAction->setStatusTip(tr("Set firstPerson camera mode")); _fpsAction->setCheckable(true); - _edit3dAction = _camToolBar->addAction(tr("Edit")); + _edit3dAction = _camToolBar->addAction(tr("Camera 3dEdit")); + _edit3dAction->setIcon(QIcon(Constants::ICON_CAMERA_3DEDIT)); _edit3dAction->setStatusTip(tr("Set edit3d camera mode")); _edit3dAction->setCheckable(true); @@ -160,12 +163,12 @@ CCameraControl::CCameraControl(QWidget *parent) _camToolBar->addSeparator(); _addCamAction = _camToolBar->addAction(tr("Create camera")); - _addCamAction->setIcon(QIcon(":/images/cam_add.png")); + _addCamAction->setIcon(QIcon(Constants::ICON_CAMERA_ADD)); _addCamAction->setStatusTip(tr("Create new camera")); connect(_addCamAction, SIGNAL(triggered()), this, SLOT(addCamera())); _delCamAction = _camToolBar->addAction(tr("Delete camera")); - _delCamAction->setIcon(QIcon(":/images/cam_del.png")); + _delCamAction->setIcon(QIcon(Constants::ICON_CAMERA_DEL)); _delCamAction->setStatusTip(tr("Delete current camera")); connect(_delCamAction, SIGNAL(triggered()), this, SLOT(delCamera())); @@ -176,6 +179,7 @@ CCameraControl::CCameraControl(QWidget *parent) _camToolBar->addSeparator(); _resetCamAction = _camToolBar->addAction(tr("Reset camera")); + _resetCamAction->setIcon(QIcon(Constants::ICON_RESET_CAMERA)); _resetCamAction->setStatusTip(tr("Reset current camera")); //_resetCamAction->setShortcut(tr("Ctrl+R")); connect(_resetCamAction, SIGNAL(triggered()), this, SLOT(resetCamera())); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_add_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_add_item.png new file mode 100644 index 000000000..bde338f78 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_add_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_anim.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_anim.png new file mode 100644 index 000000000..501cada5d Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_anim.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_animset.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_animset.png new file mode 100644 index 000000000..ef3039df9 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_animset.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_append_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_append_item.png new file mode 100644 index 000000000..365a85a10 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_append_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_bgcolor.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_bgcolor.png new file mode 100644 index 000000000..bda1168cd Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_bgcolor.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png new file mode 100644 index 000000000..2828e5d9e Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_add.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_add.png new file mode 100644 index 000000000..d104f8784 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_add.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_del.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_del.png new file mode 100644 index 000000000..a42b086ec Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_del.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_fps.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_fps.png new file mode 100644 index 000000000..6c5b85482 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_fps.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_daynight.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_daynight.png new file mode 100644 index 000000000..da2ddfb72 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_daynight.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_delete_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_delete_item.png new file mode 100644 index 000000000..a5a1787d5 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_delete_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_down_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_down_item.png new file mode 100644 index 000000000..fc86c4f6d Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_down_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_framedelay.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_framedelay.png new file mode 100644 index 000000000..c0777de86 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_framedelay.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_insert_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_insert_item.png new file mode 100644 index 000000000..f75ea064f Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_insert_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mixer.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mixer.png new file mode 100644 index 000000000..b95913f52 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mixer.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png new file mode 100644 index 000000000..e9c0b5567 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_new.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_new.png new file mode 100644 index 000000000..d45dcb467 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_new.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_open.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_open.png new file mode 100644 index 000000000..c4992affd Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_open.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system.png new file mode 100644 index 000000000..60bdaf733 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png new file mode 100644 index 000000000..aa9173e65 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particles.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particles.png new file mode 100644 index 000000000..824444a61 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particles.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_all.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_all.png new file mode 100644 index 000000000..aea193c70 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_all.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_camera.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_camera.png new file mode 100644 index 000000000..337a1b22b Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_camera.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save.png new file mode 100644 index 000000000..7f7d35e9a Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save_as.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save_as.png new file mode 100644 index 000000000..1558632b9 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save_as.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_skelscale.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_skelscale.png new file mode 100644 index 000000000..3ea596a7d Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_skelscale.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_sound.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_sound.png new file mode 100644 index 000000000..0724b44d7 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_sound.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_up_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_up_item.png new file mode 100644 index 000000000..ee471023e Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_up_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_veget.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_veget.png new file mode 100644 index 000000000..dbc5fd554 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_veget.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_vegetset.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_vegetset.png new file mode 100644 index 000000000..f15616ad9 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_vegetset.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_water.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_water.png new file mode 100644 index 000000000..0578e0372 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_water.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_wind.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_wind.png new file mode 100644 index 000000000..46234b56a Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_wind.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_workspace_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_workspace_item.png new file mode 100644 index 000000000..519975ac5 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_workspace_item.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_collision_zone_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_collision_zone_item_24.png new file mode 100644 index 000000000..f82ee48ee Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_collision_zone_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_emitter_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_emitter_item_24.png new file mode 100644 index 000000000..074b8a3a3 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_emitter_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_force_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_force_item_24.png new file mode 100644 index 000000000..b41d3d7be Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_force_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_instance_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_instance_item_24.png new file mode 100644 index 000000000..fc0a8ddb1 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_instance_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_light_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_light_item_24.png new file mode 100644 index 000000000..393766a7c Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_light_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_located_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_located_item_24.png new file mode 100644 index 000000000..505004fc8 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_located_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_item_24.png new file mode 100644 index 000000000..7357faf33 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_24.png new file mode 100644 index 000000000..a693de1d2 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_close_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_close_24.png new file mode 100644 index 000000000..3fd7483be Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_close_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_sound_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_sound_item_24.png new file mode 100644 index 000000000..264e8c003 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_sound_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_workspace_item_24.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_workspace_item_24.png new file mode 100644 index 000000000..3645ede23 Binary files /dev/null and b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_workspace_item_24.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/Emitter.bmp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/Emitter.bmp deleted file mode 100644 index c78596918..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/Emitter.bmp and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/Force.bmp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/Force.bmp deleted file mode 100644 index 8627ba0db..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/Force.bmp and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/anim.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/anim.png deleted file mode 100644 index a617d2397..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/anim.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/animset.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/animset.png deleted file mode 100644 index e16e70346..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/animset.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/bad_particle_system_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/bad_particle_system_item.png deleted file mode 100644 index 27ce05333..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/bad_particle_system_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/cam_add.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/cam_add.png deleted file mode 100644 index dbc579d43..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/cam_add.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/cam_del.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/cam_del.png deleted file mode 100644 index 1f6bee21f..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/cam_del.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/clear.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/clear.png deleted file mode 100644 index 551ce7c96..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/clear.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/collision_zone_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/collision_zone_item.png deleted file mode 100644 index 4f7f4df8a..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/collision_zone_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/go-down.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/go-down.png deleted file mode 100644 index 780714b8f..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/go-down.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/go-up.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/go-up.png deleted file mode 100644 index 7174fa8be..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/go-up.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_bgcolor.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_bgcolor.png deleted file mode 100644 index 49eac810a..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_bgcolor.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_framedelay.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_framedelay.png deleted file mode 100644 index c72969a20..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_framedelay.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_light_group.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_light_group.png deleted file mode 100644 index 49ad8830a..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_light_group.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_skelscale.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_skelscale.png deleted file mode 100644 index 7154a8a05..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_skelscale.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/insert-horizontal.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/insert-horizontal.png deleted file mode 100644 index 247889d4a..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/insert-horizontal.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/insert.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/insert.png deleted file mode 100644 index 4143a38b6..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/insert.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/instance_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/instance_item.png deleted file mode 100644 index 4c9d0417e..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/instance_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/light_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/light_item.png deleted file mode 100644 index 22d67cc40..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/light_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/list-add.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/list-add.png deleted file mode 100644 index af5b56e3c..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/list-add.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/list-remove.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/list-remove.png deleted file mode 100644 index 678b34df7..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/list-remove.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/located_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/located_item.png deleted file mode 100644 index 50c0afd2f..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/located_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/new.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/new.png deleted file mode 100644 index 61db97ae4..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/new.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/open-file.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/open-file.png deleted file mode 100644 index 7422ad333..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/open-file.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/particle_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/particle_item.png deleted file mode 100644 index 4fc3f9278..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/particle_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/particle_system_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/particle_system_item.png deleted file mode 100644 index 2a863a043..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/particle_system_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/preferences.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/preferences.png deleted file mode 100644 index 729bc0393..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/preferences.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/save-as.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/save-as.png deleted file mode 100644 index ed2453d9f..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/save-as.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/save.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/save.png deleted file mode 100644 index cc380a03a..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/save.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/sound_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/sound_item.png deleted file mode 100644 index d86039a2d..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/sound_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/time.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/time.png deleted file mode 100644 index 09ef0c6c6..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/time.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/veget.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/veget.png deleted file mode 100644 index 4767f2ea2..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/veget.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/workspace_item.png b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/workspace_item.png deleted file mode 100644 index 9143b7b6b..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/workspace_item.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/located_bindable_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/located_bindable_form.ui index 1c1edb51a..491d68f16 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/located_bindable_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/located_bindable_form.ui @@ -60,6 +60,12 @@ + + 6 + + + 3 + @@ -174,6 +180,12 @@ + + 6 + + + 3 + @@ -256,6 +268,12 @@ + + 6 + + + 3 + @@ -351,6 +369,12 @@ + + 6 + + + 3 + @@ -411,6 +435,12 @@ + + 6 + + + 3 + @@ -467,6 +497,12 @@ + + 6 + + + 3 + @@ -533,6 +569,12 @@ + + 6 + + + 3 + @@ -579,6 +621,12 @@ + + 6 + + + 3 + @@ -670,6 +718,12 @@ + + 6 + + + 3 + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp index efb6d2a9e..fa077cfed 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp @@ -249,14 +249,14 @@ void CMainWindow::updateStatusBar() void CMainWindow::createActions() { _openAction = new QAction(tr("&Open..."), this); - _openAction->setIcon(QIcon(":/images/open-file.png")); + _openAction->setIcon(QIcon(Core::Constants::ICON_OPEN)); _openAction->setShortcut(QKeySequence::Open); _openAction->setStatusTip(tr("Open an existing file")); connect(_openAction, SIGNAL(triggered()), this, SLOT(open())); _setBackColorAction = _GraphicsViewport->createSetBackgroundColor(this); _setBackColorAction->setText(tr("Set &background color")); - _setBackColorAction->setIcon(QIcon(":/images/ico_bgcolor.png")); + _setBackColorAction->setIcon(QIcon(Constants::ICON_BGCOLOR)); _setBackColorAction->setStatusTip(tr("Set background color")); _resetSceneAction = new QAction(tr("&Reset scene"), this); @@ -308,40 +308,40 @@ void CMainWindow::createMenus() toolsMenu->insertMenu(settingsAction, ovMenu); ovMenu->insertAction(settingsAction ,_AnimationDialog->toggleViewAction()); - _AnimationDialog->toggleViewAction()->setIcon(QIcon(":/images/anim.png")); + _AnimationDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIM)); ovMenu->insertAction(settingsAction ,_AnimationSetDialog->toggleViewAction()); - _AnimationSetDialog->toggleViewAction()->setIcon(QIcon(":/images/animset.png")); + _AnimationSetDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIMSET)); ovMenu->insertAction(settingsAction ,_SlotManagerDialog->toggleViewAction()); - _SlotManagerDialog->toggleViewAction()->setIcon(QIcon(":/images/mixer.png")); + _SlotManagerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MIXER)); ovMenu->insertAction(settingsAction ,_ParticleControlDialog->toggleViewAction()); _ParticleControlDialog->toggleViewAction()->setIcon(QIcon(":/images/pqrticles.png")); ovMenu->insertAction(settingsAction ,_DayNightDialog->toggleViewAction()); - _DayNightDialog->toggleViewAction()->setIcon(QIcon(":/images/dqynight.png")); + _DayNightDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_DAYNIGHT)); ovMenu->insertAction(settingsAction ,_WaterPoolDialog->toggleViewAction()); - _WaterPoolDialog->toggleViewAction()->setIcon(QIcon(":/images/water.png")); + _WaterPoolDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WATER)); _WaterPoolDialog->toggleViewAction()->setEnabled(false); ovMenu->insertAction(settingsAction ,_VegetableDialog->toggleViewAction()); - _VegetableDialog->toggleViewAction()->setIcon(QIcon(":/images/veget.png")); + _VegetableDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_VEGET)); ovMenu->insertAction(settingsAction ,_GlobalWindDialog->toggleViewAction()); - _GlobalWindDialog->toggleViewAction()->setIcon(QIcon(":/images/wind.png")); + _GlobalWindDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WIND)); ovMenu->insertAction(settingsAction ,_SkeletonScaleDialog->toggleViewAction()); - _SkeletonScaleDialog->toggleViewAction()->setIcon(QIcon(":/images/ico_skelscale.png")); + _SkeletonScaleDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_SKELSCALE)); ovMenu->insertAction(settingsAction ,_TuneTimerDialog->toggleViewAction()); - _TuneTimerDialog->toggleViewAction()->setIcon(QIcon(":/images/ico_framedelay.png")); + _TuneTimerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_FRAMEDELAY)); ovMenu->insertAction(settingsAction ,_SunColorDialog->toggleViewAction()); ovMenu->insertAction(settingsAction ,_TuneMRMDialog->toggleViewAction()); - _TuneMRMDialog->toggleViewAction()->setIcon(QIcon(":/images/ico_mrm_mesh.png")); + _TuneMRMDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MRM_MESH)); connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)), _ParticleWorkspaceDialog, SLOT(setVisible(bool))); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_form.ui index 9f2bd474a..bab672d73 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/morph_mesh_form.ui @@ -54,7 +54,7 @@ - :/images/list-add.png:/images/list-add.png + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png @@ -74,6 +74,10 @@ Insert + + + :/icons/ic_nel_insert_item.png:/icons/ic_nel_insert_item.png + @@ -83,7 +87,7 @@ - :/images/list-remove.png:/images/list-remove.png + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png @@ -94,7 +98,7 @@ - :/images/go-up.png:/images/go-up.png + :/icons/ic_nel_up_item.png:/icons/ic_nel_up_item.png @@ -105,7 +109,7 @@ - :/images/go-down.png:/images/go-down.png + :/icons/ic_nel_down_item.png:/icons/ic_nel_down_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.qrc b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.qrc index 3f09bdc1b..ac9647047 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.qrc +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.qrc @@ -1,57 +1,68 @@ - - images/nel.png - images/open-file.png - images/go-down.png - images/go-up.png - images/list-add.png - images/list-remove.png - images/play.png - images/pause.png - images/stop.png - images/seek-backward.png - images/seek-forward.png - images/skip-backward.png - images/skip-forward.png - images/preferences.png - images/time.png - images/anim.png - images/animset.png - images/dqynight.png - images/mixer.png - images/pqrticles.png - images/sound.png - images/veget.png - images/water.png - images/wind.png - images/ico_bgcolor.png - images/ico_framedelay.png - images/ico_skelscale.png - images/ico_mrm_mesh.png - images/ico_light_group.png - images/clear.png - images/insert.png - images/new.png - images/refresh.png - images/save-as.png - images/save.png - images/insert-horizontal.png - images/polymode.png - images/rmfill.png - images/rmline.png - images/rmpoints.png - images/cam_del.png - images/cam_add.png - images/Emitter.bmp - images/Force.bmp - images/bad_particle_system_item.png - images/particle_system_item.png - images/instance_item.png - images/light_item.png - images/located_item.png - images/particle_item.png - images/sound_item.png - images/workspace_item.png - images/collision_zone_item.png - + + icons/ic_nel_camera_add.png + icons/ic_nel_camera_del.png + icons/ic_nel_add_item.png + icons/ic_nel_anim.png + icons/ic_nel_animset.png + icons/ic_nel_append_item.png + icons/ic_nel_bgcolor.png + icons/ic_nel_camera_3dedit.png + icons/ic_nel_camera_fps.png + icons/ic_nel_daynight.png + icons/ic_nel_delete_item.png + icons/ic_nel_down_item.png + icons/ic_nel_framedelay.png + icons/ic_nel_insert_item.png + icons/ic_nel_mixer.png + icons/ic_nel_mrm_mesh.png + icons/ic_nel_new.png + icons/ic_nel_open.png + icons/ic_nel_particle_system.png + icons/ic_nel_particle_system_close.png + icons/ic_nel_particles.png + icons/ic_nel_reset_all.png + icons/ic_nel_reset_camera.png + icons/ic_nel_save.png + icons/ic_nel_save_as.png + icons/ic_nel_skelscale.png + icons/ic_nel_sound.png + icons/ic_nel_up_item.png + icons/ic_nel_veget.png + icons/ic_nel_vegetset.png + icons/ic_nel_water.png + icons/ic_nel_wind.png + icons/ic_nel_workspace_item.png + images/nel.png + icons/particles_system_24/ic_nel_collision_zone_item_24.png + icons/particles_system_24/ic_nel_emitter_item_24.png + icons/particles_system_24/ic_nel_force_item_24.png + icons/particles_system_24/ic_nel_instance_item_24.png + icons/particles_system_24/ic_nel_light_item_24.png + icons/particles_system_24/ic_nel_located_item_24.png + icons/particles_system_24/ic_nel_particle_item_24.png + icons/particles_system_24/ic_nel_particle_system_24.png + icons/particles_system_24/ic_nel_particle_system_close_24.png + icons/particles_system_24/ic_nel_sound_item_24.png + icons/particles_system_24/ic_nel_workspace_item_24.png + images/play.png + images/pause.png + images/stop.png + images/seek-backward.png + images/seek-forward.png + images/skip-backward.png + images/skip-forward.png + images/dqynight.png + images/mixer.png + images/pqrticles.png + images/sound.png + images/water.png + images/wind.png + images/ico_mrm_mesh.png + images/refresh.png + images/polymode.png + images/rmfill.png + images/rmline.png + images/rmpoints.png + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h index ba3af1b59..30a9b4c45 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h @@ -56,6 +56,43 @@ const char * const VEGET_TEXTURE = "VegetTexture"; const char * const VEGET_LANDSCAPE_ZONES = "VegetLandscapeZones"; const char * const COARSE_MESH_TEXTURE = "CoarseMeshTexture"; +const char * const ICON_ADD_ITEM = ":/icons/ic_nel_add_item.png"; +const char * const ICON_INSERT_ITEM = ":/icons/ic_nel_insert_item.png"; +const char * const ICON_DELETE_ITEM = ":/icons/ic_nel_delete_item.png"; +const char * const ICON_DOWN_ITEM = ":/icons/ic_nel_down_item.png"; +const char * const ICON_UP_ITEM = ":/icons/ic_nel_up_item.png"; +const char * const ICON_CAMERA_ADD = ":/icons/ic_nel_camera_add.png"; +const char * const ICON_CAMERA_DEL = ":/icons/ic_nel_camera_del.png"; +const char * const ICON_CAMERA_3DEDIT = ":/icons/ic_nel_camera_3dedit.png"; +const char * const ICON_CAMERA_FPS = ":/icons/ic_nel_camera_fps.png"; +const char * const ICON_RESET_CAMERA = ":/icons/ic_nel_reset_camera.png"; +const char * const ICON_ANIM = ":/icons/ic_nel_anim.png"; +const char * const ICON_ANIMSET = ":/icons/ic_nel_animset.png"; +const char * const ICON_BGCOLOR = ":/icons/ic_nel_bgcolor.png"; +const char * const ICON_DAYNIGHT = ":/icons/ic_nel_daynight.png"; +const char * const ICON_FRAMEDELAY = ":/icons/ic_nel_framedelay.png"; +const char * const ICON_MIXER = ":/icons/ic_nel_mixer.png"; +const char * const ICON_MRM_MESH = ":/icons/ic_nel_mrm_mesh.png"; +const char * const ICON_PARTICLES = ":/icons/ic_nel_particles.png"; +const char * const ICON_SKELSCALE = ":/icons/ic_nel_skelscale.png"; +const char * const ICON_VEGET = ":/icons/ic_nel_veget.png"; +const char * const ICON_VEGETSET = ":/icons/ic_nel_vegetset.png"; +const char * const ICON_WATER = ":/icons/ic_nel_water.png"; +const char * const ICON_WIND = ":/icons/ic_nel_wind.png"; + +const char * const ICON_COLLISION_ZONE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_collision_zone_item_24.png"; +const char * const ICON_EMITTER_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_emitter_item_24.png"; +const char * const ICON_FORCE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_force_item_24.png"; +const char * const ICON_INSTANCE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_instance_item_24.png"; +const char * const ICON_LIGHT_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_light_item_24.png"; +const char * const ICON_LOCATED_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_located_item_24.png"; +const char * const ICON_PARTICLE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_particle_item_24.png"; +const char * const ICON_PARTICLE_SYSTEM_SMALL = ":/icons/particles_system_24/ic_nel_particle_system_24.png"; +const char * const ICON_PARTICLE_SYSTEM_CLOSE_SMALL = ":/icons/particles_system_24/ic_nel_particle_system_close_24.png"; +const char * const ICON_PARTICLES_SMALL = ":/icons/particles_system_24/ic_nel_particles_24.png"; +const char * const ICON_SOUND_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_sound_item_24.png"; +const char * const ICON_WORKSPACE_ITEM_SMALL = ":/icons/particles_system_24/ic_nel_workspace_item_24.png"; + } // namespace Constants } // namespace NLQT diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.cpp index 0ce56cc2a..d03cdab3d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.cpp @@ -28,13 +28,14 @@ #include // Project includes +#include "scheme_manager.h" #include "modules.h" namespace NLQT { CParticleEditor::CParticleEditor(void) - : _ActiveNode(NULL), + : _ActiveNode(0), _State(State::Stopped), _Speed(1.0f), _AutoRepeat(false), @@ -42,11 +43,12 @@ CParticleEditor::CParticleEditor(void) _DisplayHelpers(false), _AutoUpdateBBox(false), _EmptyBBox(true), - _PW(NULL), - _Driver(NULL), - _Scene(NULL), - _FontManager(NULL), - _FontGen(NULL) + _PW(0), + _Driver(0), + _Scene(0), + _FontManager(0), + _FontGen(0), + _SchemeManager(0) { } @@ -63,6 +65,8 @@ void CParticleEditor::init() _FontManager = textContext->getTextContext().getFontManager(); _FontGen = textContext->getTextContext().getFontGenerator(); NL3D::CParticleSystem::setSerializeIdentifierFlag(true); + + _SchemeManager = new CSchemeManager(); } void CParticleEditor::release() @@ -89,9 +93,9 @@ void CParticleEditor::setActiveNode(CWorkspaceNode *node) NL3D::CParticleSystemModel *CParticleEditor::getModelFromPS(NL3D::CParticleSystem *ps) const { - if (!ps) return NULL; + if (!ps) return 0; CWorkspaceNode *node = _PW->getNodeFromPS(ps); - if (!node) return NULL; + if (!node) return 0; return node->getPSModel(); } @@ -113,7 +117,7 @@ void CParticleEditor::loadWorkspace(const std::string &fullPath) } // try to load each ps - CWorkspaceNode *firstLoadedNode = NULL; + CWorkspaceNode *firstLoadedNode = 0; TPWNodeItr itr = newPW->getNodeList().begin(); while(itr != newPW->getNodeList().end()) { @@ -181,9 +185,9 @@ void CParticleEditor::saveWorkspaceContent() void CParticleEditor::closeWorkspace() { - setActiveNode(NULL); + setActiveNode(0); delete _PW; - _PW = NULL; + _PW = 0; } void CParticleEditor::start() @@ -353,7 +357,7 @@ void CParticleEditor::stop() void CParticleEditor::update() { if (!_ActiveNode) return; - if (_PW == NULL) return; + if (_PW == 0) return; NL3D::CParticleSystem *currPS = _ActiveNode->getPSPointer(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.h index 205998245..da191705f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_editor.h @@ -47,6 +47,8 @@ class CFontGenerator; namespace NLQT { +class CSchemeManager; + /** @class CParticleEditor @brief The main class of the particles editor. @@ -212,6 +214,11 @@ public: { return _FontGen; } + + CSchemeManager *getSchemeManager () const + { + return _SchemeManager; + } private: // Check if a node is inserted in the running list (it may be paused) @@ -257,6 +264,8 @@ private: // Font generator NL3D::CFontGenerator *_FontGen; + CSchemeManager *_SchemeManager; + }; /* class CParticleEditor */ } /* namespace NLQT */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_sound_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_sound_form.ui index 108b64375..bcdad9ef0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_sound_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_sound_form.ui @@ -14,6 +14,12 @@ Form + + 3 + + + 6 + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp index 7d909d776..155e6ad4c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_tree_model.cpp @@ -26,6 +26,7 @@ #include "nel/3d/particle_system.h" // Project includes +#include "object_viewer_constants.h" #include "modules.h" namespace NLQT @@ -337,27 +338,27 @@ QIcon CParticleTreeModel::getIcon(const QModelIndex &index) const case ItemType::Root: break; case ItemType::Workspace: - return QIcon(":/images/workspace_item.png"); + return QIcon(Constants::ICON_WORKSPACE_ITEM_SMALL); case ItemType::ParticleSystem: - return QIcon(":/images/particle_system_item.png"); + return QIcon(Constants::ICON_PARTICLE_SYSTEM_SMALL); case ItemType::Particle: - return QIcon(":/images/particle_item.png"); + return QIcon(Constants::ICON_PARTICLE_ITEM_SMALL); case ItemType::Emitter: - return QIcon(":/images/Emitter.bmp"); + return QIcon(Constants::ICON_EMITTER_ITEM_SMALL); case ItemType::Force: - return QIcon(":/images/Force.bmp"); + return QIcon(Constants::ICON_FORCE_ITEM_SMALL); case ItemType::Light: - return QIcon(":/images/light_item.png"); + return QIcon(Constants::ICON_LIGHT_ITEM_SMALL); case ItemType::Sound: - return QIcon(":/images/sound_item.png"); + return QIcon(Constants::ICON_SOUND_ITEM_SMALL); case ItemType::Located: - return QIcon(":/images/located_item.png"); + return QIcon(Constants::ICON_LOCATED_ITEM_SMALL); case ItemType::CollisionZone: - return QIcon(":/images/collision_zone_item.png"); + return QIcon(Constants::ICON_COLLISION_ZONE_ITEM_SMALL); case ItemType::LocatedInstance: - return QIcon(":/images/instance_item.png"); + return QIcon(Constants::ICON_INSTANCE_ITEM_SMALL); case ItemType::ParticleSystemNotLoaded: - return QIcon(":/images/bad_particle_system_item.png"); + return QIcon(Constants::ICON_PARTICLE_SYSTEM_CLOSE_SMALL); } return QIcon(); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_dialog.cpp index e420af8ff..50698198b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_dialog.cpp @@ -41,6 +41,7 @@ // Project includes #include "dup_ps.h" #include "modules.h" +#include "object_viewer_constants.h" namespace NLQT { @@ -148,19 +149,19 @@ CParticleWorkspaceDialog::CParticleWorkspaceDialog(QWidget *parent) _mergeAction = new QAction(tr("Merge"), this); _newLocatedAction = new QAction(tr("New located"), this); - _newLocatedAction->setIcon(QIcon(":/images/located_item.png")); + _newLocatedAction->setIcon(QIcon(Constants::ICON_LOCATED_ITEM_SMALL)); _pasteLocatedAction = new QAction(tr("Paste located"), this); for(int i = 0; LocatedBindable[i]; ++i) _bindNewLocatedBindable[i] = new QAction(tr(LocatedBindable[i]), this); - _bindNewLocatedBindable[Action::Sound]->setIcon(QIcon(":/images/sound_item.png")); - _bindNewLocatedBindable[Action::Light]->setIcon(QIcon(":/images/light_item.png")); + _bindNewLocatedBindable[Action::Sound]->setIcon(QIcon(Constants::ICON_SOUND_ITEM_SMALL)); + _bindNewLocatedBindable[Action::Light]->setIcon(QIcon(Constants::ICON_LIGHT_ITEM_SMALL)); _forceZBiasAction = new QAction(tr("Force ZBias"), this); _instanciateAction = new QAction(tr("Instanciate"), this); - _instanciateAction->setIcon(QIcon(":/images/instance_item.png")); + _instanciateAction->setIcon(QIcon(Constants::ICON_INSTANCE_ITEM_SMALL)); _copyLocatedAction = new QAction(tr("Copy located"), this); _copyBindableAction = new QAction(tr("Copy bindable"), this); _pasteBindableAction = new QAction(tr("Paste bindable"), this); @@ -732,23 +733,25 @@ void CParticleWorkspaceDialog::updateTreeView() void CParticleWorkspaceDialog::buildMenu(QMenu *menu) { QMenu *bindParticleMenu = new QMenu(tr("Bind particle..."), menu); - bindParticleMenu->setIcon(QIcon(":/images/particle_system_item.png")); + bindParticleMenu->setIcon(QIcon(Constants::ICON_PARTICLE_SYSTEM_SMALL)); menu->addAction(bindParticleMenu->menuAction()); for(int i = Action::ParticlePoint; i <= Action::ParticleRibbonLookAt; ++i) bindParticleMenu->addAction(_bindNewLocatedBindable[i]); QMenu *bindForceMenu = new QMenu(tr("Bind force..."), menu); + bindForceMenu->setIcon(QIcon(Constants::ICON_FORCE_ITEM_SMALL)); menu->addAction(bindForceMenu->menuAction()); for(int i = Action::ForceGravity; i <= Action::ForceMagnetic; ++i) bindForceMenu->addAction(_bindNewLocatedBindable[i]); QMenu *bindZoneMenu = new QMenu(tr("Bind zone..."), menu); - bindZoneMenu->setIcon(QIcon(":/images/collision_zone_item.png")); + bindZoneMenu->setIcon(QIcon(Constants::ICON_COLLISION_ZONE_ITEM_SMALL)); menu->addAction(bindZoneMenu->menuAction()); for(int i = Action::ZonePlane; i <= Action::ZoneCylinder; ++i) bindZoneMenu->addAction(_bindNewLocatedBindable[i]); QMenu *bindEmitterMenu = new QMenu(tr("Bind emitter..."), menu); + bindEmitterMenu->setIcon(QIcon(Constants::ICON_EMITTER_ITEM_SMALL)); menu->addAction(bindEmitterMenu->menuAction()); for(int i = Action::EmitterDirectional; i <= Action::EmitterRadial; ++i) bindEmitterMenu->addAction(_bindNewLocatedBindable[i]); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.cpp index ec4fde7d3..3f2dd1657 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.cpp @@ -47,6 +47,7 @@ CWorkspacePage::CWorkspacePage(CParticleTreeModel *treeModel, QWidget *parent) connect(_ui.insertToolButton, SIGNAL(clicked()), this, SLOT(insertPS())); connect(_ui.createToolButton, SIGNAL(clicked()), this, SLOT(createPS())); connect(_ui.resetToolButton, SIGNAL(clicked()), this, SLOT(removeAllPS())); + connect(_ui.unloadToolButton, SIGNAL(clicked()), this, SLOT(unloadWP())); } CWorkspacePage::~CWorkspacePage() @@ -84,6 +85,7 @@ void CWorkspacePage::loadWP() { Modules::psEdit().loadWorkspace(fileName.toStdString()); _treeModel->setupModelFromWorkSpace(); + _ui.unloadToolButton->setEnabled(true); _ui.saveToolButton->setEnabled(true); _ui.saveAsToolButton->setEnabled(true); _ui.insertToolButton->setEnabled(true); @@ -124,7 +126,7 @@ void CWorkspacePage::insertPS() { // TODO: create method particle editor insertNewPS and multiple add CWorkspaceNode *node = Modules::psEdit().getParticleWorkspace()->addNode(NLMISC::CFile::getFilename(fileName.toStdString())); - if (node != NULL) + if (node != 0) { try { @@ -195,4 +197,17 @@ void CWorkspacePage::removeAllPS() _treeModel->setupModelFromWorkSpace(); } +void CWorkspacePage::unloadWP() +{ + //checkModifiedWorkSpace(); + Modules::psEdit().closeWorkspace(); + _treeModel->setupModelFromWorkSpace(); + _ui.unloadToolButton->setEnabled(false); + _ui.saveToolButton->setEnabled(false); + _ui.saveAsToolButton->setEnabled(false); + _ui.insertToolButton->setEnabled(false); + _ui.resetToolButton->setEnabled(false); + _ui.createToolButton->setEnabled(false); +} + } /* namespace NLQT */ \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.h index b29945b9a..843bbbb41 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_workspace_page.h @@ -55,6 +55,7 @@ private Q_SLOTS: void insertPS(); void createPS(); void removeAllPS(); + void unloadWP(); private: diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_form.ui index ba461eb5c..243cd565d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ps_mover_form.ui @@ -6,22 +6,37 @@ 0 0 - 332 - 575 + 322 + 392 Form + + 6 + + + 3 + Position: + + 6 + + + 6 + + + 3 + @@ -49,6 +64,9 @@ + + 3 + @@ -76,6 +94,9 @@ + + 3 + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_dialog.cpp new file mode 100644 index 000000000..66deb2a17 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_dialog.cpp @@ -0,0 +1,61 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Project includes +#include "stdpch.h" +#include "scheme_bank_dialog.h" +#include "modules.h" + +namespace NLQT +{ + +CSchemeBankDialog::CSchemeBankDialog(CAttribWidget *attribWidget, QWidget *parent) + : QDialog(parent) +{ + _ui.setupUi(this); + _attribWidget = attribWidget; +} + +CSchemeBankDialog::~CSchemeBankDialog() +{ +} + +void CSchemeBankDialog::createScheme() +{ +} + +void CSchemeBankDialog::setCurrentScheme() +{ + //SchemeManager.insertScheme(cn.getName(), getCurrentSchemePtr()->clone()); +} + +void CSchemeBankDialog::removeScheme() +{ +} + +void CSchemeBankDialog::saveBank() +{ +} + +void CSchemeBankDialog::loadBank() +{ +} + +void CSchemeBankDialog::buildList() +{ +} + +} /* namespace NLQT */ \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_dialog.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_dialog.h new file mode 100644 index 000000000..a02406468 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_dialog.h @@ -0,0 +1,60 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef SCHEME_BANK_DIALOG_H +#define SCHEME_BANK_DIALOG_H + +#include "ui_scheme_bank_form.h" + +// STL includes + +// Qt includes + +// NeL includes +#include "nel/3d/particle_system.h" + +// Project includes +#include "ps_wrapper.h" + +namespace NLQT +{ +class CAttribWidget; + +class CSchemeBankDialog: public QDialog +{ + Q_OBJECT + +public: + CSchemeBankDialog(CAttribWidget *attribWidget, QWidget *parent = 0); + ~CSchemeBankDialog(); + +private Q_SLOTS: + void createScheme(); + void setCurrentScheme(); + void removeScheme(); + void saveBank(); + void loadBank(); + +private: + void buildList(); + + CAttribWidget *_attribWidget; + Ui::CSchemeBankDialog _ui; +}; /* class CSchemeBankDialog */ + +} /* namespace NLQT */ + +#endif // SCHEME_BANK_DIALOG_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_form.ui new file mode 100644 index 000000000..e7dd281f8 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_bank_form.ui @@ -0,0 +1,151 @@ + + + CSchemeBankDialog + + + + 0 + 0 + 369 + 357 + + + + Sceme bank + + + + + + + + + Create + + + + + + + Rename + + + + + + + Remove + + + + + + + Qt::Vertical + + + + 72 + 125 + + + + + + + + Load bank + + + + + + + Save bank + + + + + + + + + + 0 + 0 + + + + Note: default.scb loaded at startup + + + true + + + + + + + true + + + + 0 + 0 + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + Set current + + + + + + + + + buttonBox + accepted() + CSchemeBankDialog + accept() + + + 163 + 338 + + + 157 + 274 + + + + + buttonBox + rejected() + CSchemeBankDialog + reject() + + + 189 + 338 + + + 286 + 274 + + + + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.cpp new file mode 100644 index 000000000..62e847a73 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.cpp @@ -0,0 +1,117 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdpch.h" +#include "scheme_manager.h" +#include "nel/3d/ps_attrib_maker.h" + +namespace NLQT +{ + +CSchemeManager::~CSchemeManager() +{ + for(TSchemeMap::iterator it = _SchemeMap.begin(); it != _SchemeMap.end(); ++it) + { + delete it->second.second; + } +} + + +void CSchemeManager::insertScheme(const std::string &name, NL3D::CPSAttribMakerBase *scheme) +{ + nlassert(scheme); + TSchemeInfo si(std::string(name), scheme); + _SchemeMap.insert(TSchemeMap::value_type(std::string(scheme->getType()), si)); +} + +void CSchemeManager::getSchemes(const std::string &type, std::vector &dest) +{ + TSchemeMap::const_iterator lbd = _SchemeMap.lower_bound(type), ubd = _SchemeMap.upper_bound(type); + dest.clear(); + for (TSchemeMap::const_iterator it = lbd; it != ubd; ++it) + { + dest.push_back(it->second); + } +} + +void CSchemeManager::serial(NLMISC::IStream &f) throw(NLMISC::EStream) +{ + + f.serialCheck((uint32) '_GNM'); + f.serialCheck((uint32) 'MHCS'); + f.serialVersion(1); + if (!f.isReading()) + { + sint32 size = (sint32)_SchemeMap.size(); + f.serial(size); + for (TSchemeMap::iterator smIt = _SchemeMap.begin(); smIt != _SchemeMap.end(); ++smIt) + { + f.serial(smIt->second.first); // name + f.serialPolyPtr(smIt->second.second); // scheme + } + } + else + { + _SchemeMap.clear(); + + std::string name; + NL3D::CPSAttribMakerBase *scheme = NULL; + sint32 size; + f.serial(size); + for (sint32 k = 0; k < size; ++k) + { + f.serial(name); + f.serialPolyPtr(scheme); + insertScheme(name, scheme); + } + } +} + +void CSchemeManager::swap(CSchemeManager &other) +{ + this->_SchemeMap.swap(other._SchemeMap); +} + +void CSchemeManager::remove(NL3D::CPSAttribMakerBase *am) +{ + TSchemeMap::iterator smIt; + for (smIt = _SchemeMap.begin(); smIt != _SchemeMap.end(); ++smIt) + { + if (smIt->second.second == am) break; + } + if (smIt != _SchemeMap.end()) + { + delete smIt->second.second; // delete the scheme + // delet from the collection + _SchemeMap.erase(smIt); + } +} + +// rename a scheme, given a pointer on it +void CSchemeManager::rename(NL3D::CPSAttribMakerBase *am, const std::string &newName) +{ + TSchemeMap::iterator smIt; + for (smIt = _SchemeMap.begin(); smIt != _SchemeMap.end(); ++smIt) + { + if (smIt->second.second == am) break; + } + if (smIt != _SchemeMap.end()) + { + smIt->second.first = newName; + } +} + +} \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h new file mode 100644 index 000000000..01a2abb35 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scheme_manager.h @@ -0,0 +1,61 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef SCHEME_MANAGER_H +#define SCHEME_MANAGER_H + +#include + +#include +#include +#include + +namespace NL3D +{ + class CPSAttribMakerBase; +} + +namespace NLQT +{ + +class CSchemeManager +{ +public: + /// dtor + ~CSchemeManager(); + + typedef std::pair TSchemeInfo; + // insert a new scheme in the collection. The scheme is then owned by this object + void insertScheme(const std::string &name, NL3D::CPSAttribMakerBase *scheme); + // get all the schemes with the given type + void getSchemes(const std::string &type, std::vector &dest); + // serial this collection + void serial(NLMISC::IStream &f) throw(NLMISC::EStream); + // swap this collection with another one + void swap(CSchemeManager &other); + // remove a scheme from the bank, given a pointer on it + void remove(NL3D::CPSAttribMakerBase *am); + // rename a scheme, given a pointer on it + void rename(NL3D::CPSAttribMakerBase *am, const std::string &newName); +protected: + typedef std::pair TSchemeInfo; + typedef std::multimap TSchemeMap; + TSchemeMap _SchemeMap; +}; + +} /* namespace NLQT */ + +#endif \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.cpp index c8165ceed..adf91c598 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.cpp @@ -1,23 +1,23 @@ -/* - Object Viewer Qt - Copyright (C) 2010 Dzmitry Kamiahin - - 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 . - -*/ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// Projects include #include "stdpch.h" +#include "particle_texture_widget.h" #include "value_gradient_dialog.h" // Qt include @@ -25,11 +25,8 @@ // NeL includes #include -#include "nel/3d/texture_file.h" -#include "nel/misc/path.h" - -// Projects include -#include "particle_texture_widget.h" +#include +#include namespace NLQT { @@ -41,246 +38,178 @@ CGradientDialog::CGradientDialog(CWorkspaceNode *ownerNode, uint minSize, QWidget *parent) : QDialog(parent), - _MinSize(minSize), - _CanTuneNbStages(canTuneNbStages), - _ClientInterface(clientInterface), - _DestroyClientInterface(destroyClientInterface), - _Node(ownerNode) + m_minSize(minSize), + m_canTuneNbStages(canTuneNbStages), + m_clientInterface(clientInterface), + m_destroyClientInterface(destroyClientInterface), + m_node(ownerNode) { - nlassert(_ClientInterface); + nlassert(m_clientInterface); - resize(490, 210); - _gridLayout = new QGridLayout(this); - _listWidget = new QListWidget(this); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(_listWidget->sizePolicy().hasHeightForWidth()); - _listWidget->setSizePolicy(sizePolicy); - //_listWidget->setIconSize(QSize(16, 16)); - _listWidget->setMaximumSize(QSize(185, 16777215)); - _gridLayout->addWidget(_listWidget, 0, 0, 9, 1); + m_ui.setupUi(this); + setWindowTitle(m_clientInterface->getTitleDialog()); + QWidget *widget = m_clientInterface->createDialog(this); + m_ui.gridLayout->addWidget(widget, 4, 0, 1, 2); - _horizontalLayout = new QHBoxLayout(); - _addPushButton = new QPushButton(this); - QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(_addPushButton->sizePolicy().hasHeightForWidth()); - _addPushButton->setSizePolicy(sizePolicy1); - _addPushButton->setMaximumSize(QSize(36, 36)); - QIcon icon; - icon.addFile(QString::fromUtf8(":/images/list-add.png"), QSize(), QIcon::Normal, QIcon::Off); - _addPushButton->setIcon(icon); - _addPushButton->setIconSize(QSize(24, 24)); - _horizontalLayout->addWidget(_addPushButton); - - _removePushButton = new QPushButton(this); - sizePolicy1.setHeightForWidth(_removePushButton->sizePolicy().hasHeightForWidth()); - _removePushButton->setSizePolicy(sizePolicy1); - _removePushButton->setMinimumSize(QSize(0, 0)); - _removePushButton->setMaximumSize(QSize(36, 36)); - QIcon icon1; - icon1.addFile(QString::fromUtf8(":/images/list-remove.png"), QSize(), QIcon::Normal, QIcon::Off); - _removePushButton->setIcon(icon1); - _removePushButton->setIconSize(QSize(24, 24)); - _horizontalLayout->addWidget(_removePushButton); - - _upPushButton = new QPushButton(this); - sizePolicy1.setHeightForWidth(_upPushButton->sizePolicy().hasHeightForWidth()); - _upPushButton->setSizePolicy(sizePolicy1); - _upPushButton->setMaximumSize(QSize(36, 36)); - QIcon icon2; - icon2.addFile(QString::fromUtf8(":/images/go-up.png"), QSize(), QIcon::Normal, QIcon::Off); - _upPushButton->setIcon(icon2); - _upPushButton->setIconSize(QSize(24, 24)); - _horizontalLayout->addWidget(_upPushButton); - - _downPushButton = new QPushButton(this); - sizePolicy1.setHeightForWidth(_downPushButton->sizePolicy().hasHeightForWidth()); - _downPushButton->setSizePolicy(sizePolicy1); - _downPushButton->setMaximumSize(QSize(36, 36)); - QIcon icon3; - icon3.addFile(QString::fromUtf8(":/images/go-down.png"), QSize(), QIcon::Normal, QIcon::Off); - _downPushButton->setIcon(icon3); - _downPushButton->setIconSize(QSize(24, 24)); - _horizontalLayout->addWidget(_downPushButton); - - _horizontalSpacer = new QSpacerItem(208, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - _horizontalLayout->addItem(_horizontalSpacer); - _gridLayout->addLayout(_horizontalLayout, 0, 1, 1, 2); - - _label = new QLabel(this); - _gridLayout->addWidget(_label, 1, 1, 1, 1); - - _nbStepWidget = new NLQT::CEditRangeUIntWidget(this); - _gridLayout->addWidget(_nbStepWidget, 2, 1, 1, 2); - - _verticalSpacer = new QSpacerItem(20, 85, QSizePolicy::Minimum, QSizePolicy::Expanding); - _gridLayout->addItem(_verticalSpacer, 3, 2, 1, 1); - - editWidget = _ClientInterface->createDialog(this); - _gridLayout->addWidget(editWidget, 4, 1, 1, 2); - - setWindowTitle(_ClientInterface->getTitleDialog()); - _label->setText(tr("Num samples:")); - - if (canTuneNbStages) + if (m_canTuneNbStages) { - _NbStepWrapper.OwnerNode = _Node; - _NbStepWrapper.I = _ClientInterface; - _nbStepWidget->setRange(1, 255); - _nbStepWidget->enableLowerBound(0, true); - _nbStepWidget->setWrapper(&_NbStepWrapper); - _nbStepWidget->updateUi(); + m_ui.nbStepWidget->setRange(1, 255); + m_ui.nbStepWidget->enableLowerBound(0, true); + m_ui.nbStepWidget->setValue(m_clientInterface->getNbSteps()); + connect(m_ui.nbStepWidget, SIGNAL(valueChanged(uint32)), this, SLOT(setNbSteps(uint32))); } else { - _nbStepWidget->hide(); - _label->hide(); + m_ui.nbStepWidget->hide(); + m_ui.label->hide(); } - connect(_addPushButton, SIGNAL(clicked()), this, SLOT(addValue())); - connect(_removePushButton, SIGNAL(clicked()), this, SLOT(removeValue())); - connect(_upPushButton, SIGNAL(clicked()), this, SLOT(valueUp())); - connect(_downPushButton, SIGNAL(clicked()), this, SLOT(valueDown())); - connect(_listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(changeCurrentRow(int))); + connect(m_ui.addButton, SIGNAL(clicked()), this, SLOT(addValue())); + connect(m_ui.insButton, SIGNAL(clicked()), this, SLOT(insertValue())); + connect(m_ui.delButton, SIGNAL(clicked()), this, SLOT(removeValue())); + connect(m_ui.upButton, SIGNAL(clicked()), this, SLOT(valueUp())); + connect(m_ui.downButton, SIGNAL(clicked()), this, SLOT(valueDown())); + connect(m_ui.listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(changeCurrentRow(int))); connect(clientInterface, SIGNAL(itemChanged()), this, SLOT(updateItem())); - _Size = _ClientInterface->getSchemeSize(); - for (uint k = 0; k < _Size; ++k) + m_size = m_clientInterface->getSchemeSize(); + for (uint k = 0; k < m_size; ++k) { QListWidgetItem *item = new QListWidgetItem(); - _ClientInterface->displayValue(k, item); - _listWidget->addItem(item); + m_clientInterface->displayValue(k, item); + m_ui.listWidget->addItem(item); } - _removePushButton->setEnabled(_Size > _MinSize ? true : false); - _listWidget->setCurrentRow(0); + m_ui.delButton->setEnabled(m_size > m_minSize ? true : false); + m_ui.listWidget->setCurrentRow(0); } CGradientDialog::~CGradientDialog() { - if (_DestroyClientInterface) delete _ClientInterface; + if (m_destroyClientInterface) delete m_clientInterface; } void CGradientDialog::addValue() { - nlassert(_ClientInterface); - if (!_ClientInterface->modifyGradient(IValueGradientClient::Add, 0)) return; - ++_Size; + nlassert(m_clientInterface); + if (!m_clientInterface->modifyGradient(IValueGradientClient::Add, 0)) return; + ++m_size; QListWidgetItem *item = new QListWidgetItem(); - _ClientInterface->displayValue(_Size - 1, item); - _listWidget->addItem(item); + m_clientInterface->displayValue(m_size - 1, item); + m_ui.listWidget->addItem(item); - _removePushButton->setEnabled(true); + m_ui.delButton->setEnabled(true); - _listWidget->setCurrentRow(_Size - 1); + m_ui.listWidget->setCurrentRow(m_size - 1); } void CGradientDialog::insertValue() { - nlassert(_ClientInterface); - int oldIndex = _listWidget->currentRow(); - if (!_ClientInterface->modifyGradient(IValueGradientClient::Insert, oldIndex)) return; - ++_Size; + nlassert(m_clientInterface); + int oldIndex = m_ui.listWidget->currentRow(); + if (!m_clientInterface->modifyGradient(IValueGradientClient::Insert, oldIndex)) return; + ++m_size; QListWidgetItem *item = new QListWidgetItem(); - _ClientInterface->displayValue(_Size - 1, item); - _listWidget->insertItem(oldIndex, item); - _listWidget->setCurrentRow(oldIndex); + m_clientInterface->displayValue(m_size - 1, item); + m_ui.listWidget->insertItem(oldIndex, item); + m_ui.listWidget->setCurrentRow(oldIndex); + m_ui.delButton->setEnabled(true); } void CGradientDialog::removeValue() { - nlassert(_ClientInterface); - - int oldIndex = _listWidget->currentRow(); + nlassert(m_clientInterface); + int oldIndex = m_ui.listWidget->currentRow(); if (oldIndex == -1) return; if (uint(oldIndex) == 0) - _listWidget->setCurrentRow(oldIndex + 1); + m_ui.listWidget->setCurrentRow(oldIndex + 1); else - _listWidget->setCurrentRow(oldIndex - 1); + m_ui.listWidget->setCurrentRow(oldIndex - 1); - if (!_ClientInterface->modifyGradient(IValueGradientClient::Delete, oldIndex)) + if (!m_clientInterface->modifyGradient(IValueGradientClient::Delete, oldIndex)) { - _listWidget->setCurrentRow(oldIndex); + m_ui.listWidget->setCurrentRow(oldIndex); return; } - --_Size; + --m_size; + if (m_size <= m_minSize) + m_ui.delButton->setEnabled(false); - if (_Size <= _MinSize) - _removePushButton->setEnabled(false); - - QListWidgetItem *removeItem = _listWidget->takeItem(oldIndex); + QListWidgetItem *removeItem = m_ui.listWidget->takeItem(oldIndex); if (!removeItem) delete removeItem; } void CGradientDialog::valueDown() { - nlassert(_ClientInterface); - int currentRow = _listWidget->currentRow(); - if (!((currentRow == _listWidget->count()-1) || (currentRow == -1))) + nlassert(m_clientInterface); + int currentRow = m_ui.listWidget->currentRow(); + if (!((currentRow == m_ui.listWidget->count()-1) || (currentRow == -1))) { - if (!_ClientInterface->modifyGradient(IValueGradientClient::Down, currentRow)) return; - QListWidgetItem *item = _listWidget->takeItem(currentRow); - _listWidget->insertItem(++currentRow, item); - _listWidget->setCurrentRow(currentRow); + if (!m_clientInterface->modifyGradient(IValueGradientClient::Down, currentRow)) return; + QListWidgetItem *item = m_ui.listWidget->takeItem(currentRow); + m_ui.listWidget->insertItem(++currentRow, item); + m_ui.listWidget->setCurrentRow(currentRow); } - _listWidget->setCurrentRow(currentRow); + m_ui.listWidget->setCurrentRow(currentRow); } void CGradientDialog::valueUp() { - nlassert(_ClientInterface); - int currentRow = _listWidget->currentRow(); + nlassert(m_clientInterface); + int currentRow = m_ui.listWidget->currentRow(); if (!((currentRow == 0) || (currentRow == -1))) { - if (!_ClientInterface->modifyGradient(IValueGradientClient::Up, currentRow)) return; - QListWidgetItem *item = _listWidget->takeItem(currentRow); - _listWidget->insertItem(--currentRow, item); - _listWidget->setCurrentRow(currentRow); + if (!m_clientInterface->modifyGradient(IValueGradientClient::Up, currentRow)) return; + QListWidgetItem *item = m_ui.listWidget->takeItem(currentRow); + m_ui.listWidget->insertItem(--currentRow, item); + m_ui.listWidget->setCurrentRow(currentRow); } - _listWidget->setCurrentRow(currentRow); + m_ui.listWidget->setCurrentRow(currentRow); } void CGradientDialog::changeCurrentRow(int currentRow) { - _ClientInterface->setCurrentIndex(currentRow); + m_clientInterface->setCurrentIndex(currentRow); } void CGradientDialog::updateItem() { - _ClientInterface->displayValue(_listWidget->currentRow(), _listWidget->currentItem()); + m_clientInterface->displayValue(m_ui.listWidget->currentRow(), m_ui.listWidget->currentItem()); +} + +void CGradientDialog::setNbSteps(uint32 nbSteps) +{ + m_clientInterface->setNbSteps(nbSteps); } QWidget *CTextureGradientInterface::createDialog(QWidget *parent) { - editWidget = new CParticleTextureWidget(); + m_editWidget = new CParticleTextureWidget(); - _TextureWrapper.P = TP; - _TextureWrapper.Index = 0; - _TextureWrapper.OwnerNode = Node; - editWidget->setWrapper(&_TextureWrapper); - connect(editWidget, SIGNAL(textureChanged(QString)), this, SIGNAL(itemChanged())); - return editWidget; + m_textureWrapper.P = m_tp; + m_textureWrapper.Index = 0; + m_textureWrapper.OwnerNode = m_node; + m_editWidget->setWrapper(&m_textureWrapper); + connect(m_editWidget, SIGNAL(textureChanged(QString)), this, SIGNAL(itemChanged())); + return m_editWidget; } bool CTextureGradientInterface::modifyGradient(TAction action, uint index) { - nlassert(TP); - nlassert(TP->getTextureGroup()); + nlassert(m_tp); + nlassert(m_tp->getTextureGroup()); - NLMISC::CSmartPtr tex = TP->getTextureGroup()->getTexture(index); + NLMISC::CSmartPtr tex = m_tp->getTextureGroup()->getTexture(index); std::string texName = (static_cast(tex.getPtr()))->getFileName().c_str(); if (texName.empty()) return false; std::vector< NLMISC::CSmartPtr > textureList; - textureList.resize(TP->getTextureGroup()->getNbTextures()); - TP->getTextureGroup()->getTextures(&textureList[0]); + textureList.resize(m_tp->getTextureGroup()->getNbTextures()); + m_tp->getTextureGroup()->getTextures(&textureList[0]); switch(action) { @@ -307,14 +236,14 @@ bool CTextureGradientInterface::modifyGradient(TAction action, uint index) return false; } - TP->getTextureGroup()->setTextures(&textureList[0], (uint)textureList.size()); + m_tp->getTextureGroup()->setTextures(&textureList[0], (uint)textureList.size()); return true; } void CTextureGradientInterface::displayValue(uint index, QListWidgetItem *item) { QPixmap pixmap; - NLMISC::CSmartPtr tex = TP->getTextureGroup()->getTexture(index); + NLMISC::CSmartPtr tex = m_tp->getTextureGroup()->getTexture(index); if (dynamic_cast(tex.getPtr())) { @@ -332,14 +261,14 @@ void CTextureGradientInterface::displayValue(uint index, QListWidgetItem *item) void CTextureGradientInterface::setCurrentIndex(uint index) { - _TextureWrapper.Index = index; - editWidget->updateUi(); + m_textureWrapper.Index = index; + m_editWidget->updateUi(); } uint32 CTextureGradientInterface::getSchemeSize(void) const { - nlassert(TP->getTextureGroup()); - return TP->getTextureGroup()->getNbTextures(); + nlassert(m_tp->getTextureGroup()); + return m_tp->getTextureGroup()->getNbTextures(); } uint32 CTextureGradientInterface::getNbSteps(void) const { @@ -389,7 +318,6 @@ void CTextureGradientInterface::CTextureWrapper::set(NL3D::ITexture *t) textureList[Index] = t; - P->getTextureGroup()->setTextures(&textureList[0], (uint)textureList.size()); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.h index bb28ac634..48da2f600 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_dialog.h @@ -1,26 +1,30 @@ -/* - Object Viewer Qt - Copyright (C) 2010 Dzmitry Kamiahin - - 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 . - -*/ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . #ifndef VALUE_GRADIENT_DIALOG_H #define VALUE_GRADIENT_DIALOG_H -#include +// Project includes +#include "ui_value_gradient_form.h" +#include "basic_edit_widget.h" +#include "color_edit_widget.h" +#include "edit_range_widget.h" +#include "ps_wrapper.h" +#include "particle_node.h" // Qt includes #include @@ -37,13 +41,6 @@ // NeL includes #include -// Project includes -#include "basic_edit_widget.h" -#include "color_edit_widget.h" -#include "edit_range_widget.h" -#include "ps_wrapper.h" -#include "particle_node.h" - namespace NL3D { class CPSTexturedParticle; @@ -111,58 +108,31 @@ private Q_SLOTS: void valueUp(); void changeCurrentRow(int currentRow); void updateItem(); + void setNbSteps(uint32 nbSteps); protected: // the minimum number of element in the gradient - uint _MinSize; + uint m_minSize; // false to disable the dialog that control the number of stages between each value - bool _CanTuneNbStages; + bool m_canTuneNbStages; - IValueGradientClient *_ClientInterface; + IValueGradientClient *m_clientInterface; - bool _DestroyClientInterface; + bool m_destroyClientInterface; // the current size of the gradient - uint _Size; + uint m_size; - CWorkspaceNode *_Node; - - // a wrapper to tune the number of step - struct CNbStepWrapper :public IPSWrapperUInt - { - // the interface that was passed to the dialog this struct is part of - IValueGradientClient *I; - uint32 get(void) const - { - return I->getNbSteps(); - } - void set(const uint32 &nbSteps) - { - I->setNbSteps(nbSteps); - } - - } _NbStepWrapper; - - QGridLayout *_gridLayout; - QListWidget *_listWidget; - QHBoxLayout *_horizontalLayout; - QPushButton *_addPushButton; - QPushButton *_removePushButton; - QPushButton *_upPushButton; - QPushButton *_downPushButton; - QSpacerItem *_horizontalSpacer; - QLabel *_label; - NLQT::CEditRangeUIntWidget *_nbStepWidget; - QSpacerItem *_verticalSpacer; - QWidget *editWidget; + CWorkspaceNode *m_node; + Ui::CGradientDialog m_ui; }; /* class CGradientDialog */ /** @class CValueGradientClientT @brief This template generate an interface that is used with the gradient edition dialog -This the type to be edited (color, floet, etc..) +This the type to be edited (color, float, etc..) */ template class CValueGradientClientT : public IValueGradientClient, public IPSWrapper @@ -172,22 +142,22 @@ public: virtual ~CValueGradientClientT() {} /// the gradient being edited, must be filled by the instancier - NL3D::CPSValueGradientFunc *Scheme; + NL3D::CPSValueGradientFunc *m_scheme; /// the gradient dialog, must be filled by the instancier - T DefaultValue; + T m_defaultValue; /// inherited from IPSWrapper virtual T get(void) const { - return Scheme->getValue(_CurrentEditedIndex); + return m_scheme->getValue(m_currentEditedIndex); } virtual void set(const T &v) { - T *tab = new T[Scheme->getNumValues()]; - Scheme->getValues(tab); - tab[_CurrentEditedIndex] = v; - Scheme->setValues(tab, Scheme->getNumValues(), Scheme->getNumStages()); + T *tab = new T[m_scheme->getNumValues()]; + m_scheme->getValues(tab); + tab[m_currentEditedIndex] = v; + m_scheme->setValues(tab, m_scheme->getNumValues(), m_scheme->getNumStages()); delete[] tab; } @@ -209,33 +179,33 @@ public: virtual bool modifyGradient(TAction action, uint index) { - T *tab = new T[Scheme->getNumValues() + 1]; // +1 is for the add / insert case - Scheme->getValues(tab); + T *tab = new T[m_scheme->getNumValues() + 1]; // +1 is for the add / insert case + m_scheme->getValues(tab); switch(action) { case IValueGradientClient::Add: - tab[Scheme->getNumValues()] = DefaultValue; - Scheme->setValues(tab, Scheme->getNumValues() + 1, Scheme->getNumStages()); + tab[m_scheme->getNumValues()] = m_defaultValue; + m_scheme->setValues(tab, m_scheme->getNumValues() + 1, m_scheme->getNumStages()); break; case IValueGradientClient::Insert: - ::memmove(tab + (index + 1), tab + index, sizeof(T) * (Scheme->getNumValues() - index)); - tab[index] = DefaultValue; - Scheme->setValues(tab, Scheme->getNumValues() + 1, Scheme->getNumStages()); + ::memmove(tab + (index + 1), tab + index, sizeof(T) * (m_scheme->getNumValues() - index)); + tab[index] = m_defaultValue; + m_scheme->setValues(tab, m_scheme->getNumValues() + 1, m_scheme->getNumStages()); break; case IValueGradientClient::Delete: - ::memmove(tab + index, tab + index + 1, sizeof(T) * (Scheme->getNumValues() - index - 1)); - Scheme->setValues(tab, Scheme->getNumValues() - 1, Scheme->getNumStages()); + ::memmove(tab + index, tab + index + 1, sizeof(T) * (m_scheme->getNumValues() - index - 1)); + m_scheme->setValues(tab, m_scheme->getNumValues() - 1, m_scheme->getNumStages()); break; case IValueGradientClient::Up: nlassert(index > 0); std::swap(tab[index], tab[index - 1]); - Scheme->setValues(tab, Scheme->getNumValues(), Scheme->getNumStages()); + m_scheme->setValues(tab, m_scheme->getNumValues(), m_scheme->getNumStages()); break; case IValueGradientClient::Down: - nlassert(index < Scheme->getNumValues() - 1); + nlassert(index < m_scheme->getNumValues() - 1); std::swap(tab[index], tab[index + 1]); - Scheme->setValues(tab, Scheme->getNumValues(), Scheme->getNumStages()); + m_scheme->setValues(tab, m_scheme->getNumValues(), m_scheme->getNumStages()); break; } @@ -244,24 +214,24 @@ public: } virtual uint32 getSchemeSize(void) const { - return Scheme->getNumValues(); + return m_scheme->getNumValues(); } /// Get the number of interpolation step uint32 getNbSteps(void) const { - return Scheme->getNumStages(); + return m_scheme->getNumStages(); } /// Set the number of interpolation steps void setNbSteps(uint32 value) { - Scheme->setNumStages(value); + m_scheme->setNumStages(value); } protected: // index of the value OF the current dialog that exist - uint32 _CurrentEditedIndex; + uint32 m_currentEditedIndex; }; /* class CValueGradientClientT */ /// FLOAT GRADIENT EDITION INTERFACE @@ -274,11 +244,11 @@ public: virtual QWidget *newDialog(IPSWrapperFloat *wrapper, QWidget *parent) { - editWidget = new CEditRangeFloatWidget(parent); - editWidget->setRange(MinRange, MaxRange); - editWidget->setWrapper(wrapper); - connect(editWidget, SIGNAL(valueChanged(float)), this, SIGNAL(itemChanged())); - return editWidget; + m_editWidget = new CEditRangeFloatWidget(parent); + m_editWidget->setRange(m_minRange, m_maxRange); + m_editWidget->setWrapper(wrapper); + connect(m_editWidget ,SIGNAL(valueChanged(float)), this, SIGNAL(itemChanged())); + return m_editWidget; } virtual QString getTitleDialog() const @@ -288,17 +258,17 @@ public: virtual void setCurrentIndex(uint index) { - _CurrentEditedIndex = index; - editWidget->updateUi(); + m_currentEditedIndex = index; + m_editWidget->updateUi(); } virtual void displayValue(uint index, QListWidgetItem *item) { - item->setText(QString("%1").arg(Scheme->getValue(index),0,'f',2)); + item->setText(QString("%1").arg(m_scheme->getValue(index), 0, 'f', 2)); } - CEditRangeFloatWidget *editWidget; - float MinRange, MaxRange; + CEditRangeFloatWidget *m_editWidget; + float m_minRange, m_maxRange; }; /* CFloatGradientWrapper */ /// UINT GRADIENT EDITION INTERFACE @@ -311,11 +281,11 @@ public: virtual QWidget *newDialog(IPSWrapperUInt *wrapper, QWidget *parent) { - editWidget = new CEditRangeUIntWidget(parent); - editWidget->setRange(MinRange, MaxRange); - editWidget->setWrapper(wrapper); - connect(editWidget, SIGNAL(valueChanged(uint32)), this, SIGNAL(itemChanged())); - return editWidget; + m_editWidget = new CEditRangeUIntWidget(parent); + m_editWidget->setRange(m_minRange, m_maxRange); + m_editWidget->setWrapper(wrapper); + connect(m_editWidget, SIGNAL(valueChanged(uint32)), this, SIGNAL(itemChanged())); + return m_editWidget; } virtual QString getTitleDialog() const @@ -325,17 +295,17 @@ public: virtual void setCurrentIndex(uint index) { - _CurrentEditedIndex = index; - editWidget->updateUi(); + m_currentEditedIndex = index; + m_editWidget->updateUi(); } virtual void displayValue(uint index, QListWidgetItem *item) { - item->setText(QString("%1").arg(Scheme->getValue(index))); + item->setText(QString("%1").arg(m_scheme->getValue(index))); } - CEditRangeUIntWidget *editWidget; - uint32 MinRange, MaxRange; + CEditRangeUIntWidget *m_editWidget; + uint32 m_minRange, m_maxRange; }; /* CUIntGradientWrapper */ /// INT GRADIENT EDITION INTERFACE @@ -348,11 +318,11 @@ public: virtual QWidget *newDialog(IPSWrapper *wrapper, QWidget *parent) { - editWidget = new CEditRangeIntWidget(parent); - editWidget->setRange(MinRange, MaxRange); - editWidget->setWrapper(wrapper); - connect(editWidget, SIGNAL(valueChanged(sint32)), this, SIGNAL(itemChanged())); - return editWidget; + m_editWidget = new CEditRangeIntWidget(parent); + m_editWidget->setRange(m_minRange, m_maxRange); + m_editWidget->setWrapper(wrapper); + connect(m_editWidget, SIGNAL(valueChanged(sint32)), this, SIGNAL(itemChanged())); + return m_editWidget; } virtual QString getTitleDialog() const @@ -362,17 +332,17 @@ public: virtual void setCurrentIndex(uint index) { - _CurrentEditedIndex = index; - editWidget->updateUi(); + m_currentEditedIndex = index; + m_editWidget->updateUi(); } virtual void displayValue(uint index, QListWidgetItem *item) { - item->setText(QString("%1").arg(Scheme->getValue(index))); + item->setText(QString("%1").arg(m_scheme->getValue(index))); } - CEditRangeIntWidget *editWidget; - sint32 MinRange, MaxRange; + CEditRangeIntWidget *m_editWidget; + sint32 m_minRange, m_maxRange; }; /* CIntGradientWrapper */ /// COLOR GRADIENT EDITION INTERFACE @@ -385,10 +355,10 @@ public: virtual QWidget *newDialog(IPSWrapper *wrapper, QWidget *parent) { - editWidget = new CColorEditWidget(parent); - editWidget->setWrapper(wrapper); - connect(editWidget, SIGNAL(colorChanged(NLMISC::CRGBA)), this, SIGNAL(itemChanged())); - return editWidget; + m_editWidget = new CColorEditWidget(parent); + m_editWidget->setWrapper(wrapper); + connect(m_editWidget, SIGNAL(colorChanged(NLMISC::CRGBA)), this, SIGNAL(itemChanged())); + return m_editWidget; } virtual QString getTitleDialog() const @@ -398,24 +368,24 @@ public: virtual void setCurrentIndex(uint index) { - _CurrentEditedIndex = index; - editWidget->updateUi(); + m_currentEditedIndex = index; + m_editWidget->updateUi(); } virtual void displayValue(uint index, QListWidgetItem *item) { - NLMISC::CRGBA color = Scheme->getValue(index); + NLMISC::CRGBA color = m_scheme->getValue(index); item->setText(QString("RGBA(%1,%2,%3,%4)").arg(color.R).arg(color.G).arg(color.B).arg(color.A)); QPixmap pixmap(QSize(16, 16)); QPainter painter(&pixmap); painter.setRenderHint(QPainter::Antialiasing, true); painter.setBrush(QBrush(QColor(color.R, color.G, color.B))); painter.setPen(QPen(Qt::black, 1, Qt::SolidLine)); - painter.drawRect(0, 0, pixmap.width() , pixmap.height()); + painter.drawRect(0, 0, pixmap.width(), pixmap.height()); item->setIcon(QIcon(pixmap)); } - CColorEditWidget *editWidget; + CColorEditWidget *m_editWidget; }; /* CColorGradientWrapper */ /// PLANE BASIS GRADIENT EDITION INTERFACE @@ -428,9 +398,9 @@ public: virtual QWidget *newDialog(IPSWrapper *wrapper, QWidget *parent) { - editWidget = new CBasicEditWidget(parent); - editWidget->setWrapper(wrapper); - return editWidget; + m_editWidget = new CBasicEditWidget(parent); + m_editWidget->setWrapper(wrapper); + return m_editWidget; } virtual QString getTitleDialog() const { @@ -438,8 +408,8 @@ public: } virtual void setCurrentIndex(uint index) { - _CurrentEditedIndex = index; - editWidget->updateUi(); + m_currentEditedIndex = index; + m_editWidget->updateUi(); } virtual void displayValue(uint index, QListWidgetItem *item) @@ -447,7 +417,7 @@ public: item->setText(QString("Plane %1").arg(index)); } - CBasicEditWidget *editWidget; + CBasicEditWidget *m_editWidget; }; /* class CPlaneBasisGradientWrapper */ /** @@ -460,12 +430,12 @@ class CTextureGradientInterface : public IValueGradientClient public: CTextureGradientInterface(QObject *parent = 0): IValueGradientClient(parent) {} - CTextureGradientInterface(NL3D::CPSTexturedParticle *tp, CWorkspaceNode *ownerNode): Node(ownerNode), TP(tp) {} + CTextureGradientInterface(NL3D::CPSTexturedParticle *tp, CWorkspaceNode *ownerNode): m_node(ownerNode), m_tp(tp) {} ~CTextureGradientInterface() {} - CWorkspaceNode *Node; - NL3D::CPSTexturedParticle *TP; + CWorkspaceNode *m_node; + NL3D::CPSTexturedParticle *m_tp; // all method inherited from IValueGradientClient virtual QWidget *createDialog(QWidget *parent); @@ -489,9 +459,9 @@ public: uint32 Index; NL3D::ITexture *get(void); void set(NL3D::ITexture *t); - } _TextureWrapper; + } m_textureWrapper; - CParticleTextureWidget *editWidget; + CParticleTextureWidget *m_editWidget; }; } /* namespace NLQT */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_form.ui new file mode 100644 index 000000000..0bfb52b25 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/value_gradient_form.ui @@ -0,0 +1,183 @@ + + + CGradientDialog + + + + 0 + 0 + 558 + 222 + + + + Dialog + + + + + + Qt::Horizontal + + + + + + + + + + + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + + 24 + 24 + + + + true + + + + + + + + + + + :/icons/ic_nel_insert_item.png:/icons/ic_nel_insert_item.png + + + + 24 + 24 + + + + true + + + + + + + + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + + 24 + 24 + + + + true + + + + + + + + + + + :/icons/ic_nel_up_item.png:/icons/ic_nel_up_item.png + + + + 24 + 24 + + + + true + + + + + + + + + + + :/icons/ic_nel_down_item.png:/icons/ic_nel_down_item.png + + + + 24 + 24 + + + + true + + + + + + + Qt::Horizontal + + + + 128 + 20 + + + + + + + + + + Num samples: + + + + + + + + + + Qt::Vertical + + + + 20 + 13 + + + + + + + + + + + + + NLQT::CEditRangeUIntWidget + QWidget +
edit_range_widget.h
+ 1 +
+
+ + + + +
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_apperance_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_apperance_form.ui index d379d629f..eb73d52b3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_apperance_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_apperance_form.ui @@ -130,7 +130,7 @@
- :/images/list-remove.png:/images/list-remove.png + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png
@@ -148,7 +148,7 @@
- :/images/insert-horizontal.png:/images/insert-horizontal.png + :/icons/ic_nel_insert_item.png:/icons/ic_nel_insert_item.png
@@ -159,7 +159,7 @@ - :/images/list-add.png:/images/list-add.png + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_dialog_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_dialog_form.ui index fb023c416..a503cb09f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_dialog_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_dialog_form.ui @@ -6,13 +6,13 @@ 0 0 - 504 - 473 + 437 + 512 - :/images/veget.png:/images/veget.png + :/icons/ic_nel_veget.png:/icons/ic_nel_veget.png Vegetable editor @@ -35,229 +35,264 @@ 0 0 - 490 - 437 + 423 + 476 - - 6 - - - 6 - - + 6 - 5 + 3 - - - QLayout::SetFixedSize + + + Qt::Horizontal - - - - Vegetables: + + + + 3 - - - - - - - 0 - 0 - - - - - 170 - 16777215 - - - - - - - - List edition - - - - 6 - - - 5 - - - - - Add vegetable + + + + Vegetables: + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + + List edition + + + + 6 - - + + 3 - - - :/images/list-add.png:/images/list-add.png + + + + + 0 + 0 + + + + Add vegetable + + + + + + + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png + + + + + + + + 0 + 0 + + + + Remove vegetable + + + + + + + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png + + + + + + + + 0 + 0 + + + + Insert vegetable + + + + + + + :/icons/ic_nel_insert_item.png:/icons/ic_nel_insert_item.png + + + + + + + + 0 + 0 + + + + Clear all vegetables + + + + + + + :/icons/ic_nel_reset_all.png:/icons/ic_nel_reset_all.png + + + + + + + false + + + Copy Vegetable + + + + + + + Load .vegetdesc + + + + + + + Save .vegetdesc + + + + + + + + + + List Save/Load + + + + 6 - - - - - - Insert vegetable + + 5 - - - - - - :/images/insert-horizontal.png:/images/insert-horizontal.png - - - - - - - Remove vegetable - - - - - - - :/images/list-remove.png:/images/list-remove.png - - - - - - - Clear all vegetables - - - - - - - :/images/clear.png:/images/clear.png - - - - - - - false - - - Copy Vegetable - - - - - - - Load .vegetdesc - - - - - - - Save .vegetdesc - - - - - - - - - - List Save/Load - - - - 6 - - - 5 - - - - - Load .vegetset - - - - - - - Append .vegetset - - - - - - - Save .vegetset - - - - - - - - - - true - - - Display Vegetables - - - true - - - - - - - - - QTabWidget::East - - - 0 - - - - Landscape - + + + + Load .vegetset + + + + :/icons/ic_nel_vegetset.png:/icons/ic_nel_vegetset.png + + + + + + + Append .vegetset + + + + :/icons/ic_nel_append_item.png:/icons/ic_nel_append_item.png + + + + + + + Save .vegetset + + + + :/icons/ic_nel_save.png:/icons/ic_nel_save.png + + + + + +
+ + + + true + + + Display Vegetables + + + true + + + +
- - - General/Density - - - - - Appearance - - - - - Scale - - - - - Rotation - + + + QTabWidget::East + + + 0 + + + + Landscape + + + + + General/Density + + + + + Appearance + + + + + Scale + + + + + Rotation + +
diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui index e36b8bb37..0d4a41cf2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui @@ -156,11 +156,11 @@ - ... + - :/images/list-add.png:/images/list-add.png + :/icons/ic_nel_add_item.png:/icons/ic_nel_add_item.png @@ -173,11 +173,11 @@ - ... + - :/images/list-remove.png:/images/list-remove.png + :/icons/ic_nel_delete_item.png:/icons/ic_nel_delete_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/workspace_form.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/workspace_form.ui index 0670eaf9d..28705f097 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/workspace_form.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/workspace_form.ui @@ -6,7 +6,7 @@ 0 0 - 282 + 337 232 @@ -73,7 +73,7 @@ - :/images/new.png:/images/new.png + :/icons/ic_nel_new.png:/icons/ic_nel_new.png @@ -114,7 +114,7 @@ - :/images/open-file.png:/images/open-file.png + :/icons/ic_nel_particle_system.png:/icons/ic_nel_particle_system.png @@ -130,7 +130,7 @@ - + false @@ -158,7 +158,7 @@ - :/images/save.png:/images/save.png + :/icons/ic_nel_save.png:/icons/ic_nel_save.png @@ -177,7 +177,7 @@ - + false @@ -205,7 +205,7 @@ - :/images/save-as.png:/images/save-as.png + :/icons/ic_nel_save_as.png:/icons/ic_nel_save_as.png @@ -221,18 +221,49 @@ - - - - Qt::Horizontal + + + + false - + + + 0 + 0 + + + - 0 + 55 0 - + + + 16777215 + 16777215 + + + + Unload + + + + :/icons/ic_nel_particle_system_close.png:/icons/ic_nel_particle_system_close.png + + + + 32 + 32 + + + + Qt::ToolButtonTextUnderIcon + + + true + + @@ -267,11 +298,11 @@ - Insert New + Insert - :/images/pqrticles.png:/images/pqrticles.png + :/icons/ic_nel_open.png:/icons/ic_nel_open.png @@ -311,11 +342,11 @@ - Create New + Create - :/images/insert.png:/images/insert.png + :/icons/ic_nel_particles.png:/icons/ic_nel_particles.png @@ -331,7 +362,7 @@ - + false @@ -359,7 +390,7 @@ - :/images/clear.png:/images/clear.png + :/icons/ic_nel_reset_all.png:/icons/ic_nel_reset_all.png @@ -375,19 +406,6 @@ - - - - Qt::Horizontal - - - - 0 - 0 - - - - diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.cpp index 068896799..413527fae 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.cpp @@ -27,37 +27,37 @@ ZonePainterMainWindow::ZonePainterMainWindow(QWidget *parent) : m_painterDockWidget->setVisible(true); // Insert tool modes - _toolModeMenu = new QMenu(tr("Tool Mode"), ui->painterToolBar); - _toolModeMenu->setIcon(QIcon(":/painterTools/images/draw-brush.png")); - ui->painterToolBar->addAction(_toolModeMenu->menuAction()); - //connect(_renderModeMenu->menuAction(), SIGNAL(triggered()), this, SLOT(setRenderMode())); - - QSignalMapper *modeMapper = new QSignalMapper(this); - - _toolPaintModeAction = _toolModeMenu->addAction(tr("Paint Mode")); - _toolPaintModeAction->setIcon(QIcon(":/painterTools/images/draw-brush.png")); - _toolPaintModeAction->setStatusTip(tr("Set paint mode")); - connect(_toolPaintModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); - modeMapper->setMapping(_toolPaintModeAction, 0); - - _toolFillModeAction = _toolModeMenu->addAction(tr("Fill Mode")); - _toolFillModeAction->setStatusTip(tr("Set fill mode")); - _toolFillModeAction->setIcon(QIcon(":/painterTools/images/color-fill.png")); - connect(_toolFillModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); - modeMapper->setMapping(_toolFillModeAction, 1); - - _toolSelectModeAction = _toolModeMenu->addAction(tr("Select mode")); - _toolSelectModeAction->setIcon(QIcon(":/painterTools/images/go-jump-4.png")); - _toolSelectModeAction->setStatusTip(tr("Set select mode")); - connect(_toolSelectModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); - modeMapper->setMapping(_toolSelectModeAction, 2); - - _toolPickModeAction = _toolModeMenu->addAction(tr("Pick mode")); - _toolPickModeAction->setIcon(QIcon(":/painterTools/images/color-picker-black.png")); - _toolPickModeAction->setStatusTip(tr("Set color picking mode")); - connect(_toolPickModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); - modeMapper->setMapping(_toolPickModeAction, 2); - + _toolModeMenu = new QMenu(tr("Tool Mode"), ui->painterToolBar); + _toolModeMenu->setIcon(QIcon(":/painterTools/images/draw-brush.png")); + ui->painterToolBar->addAction(_toolModeMenu->menuAction()); + //connect(_renderModeMenu->menuAction(), SIGNAL(triggered()), this, SLOT(setRenderMode())); + + QSignalMapper *modeMapper = new QSignalMapper(this); + + _toolPaintModeAction = _toolModeMenu->addAction(tr("Paint Mode")); + _toolPaintModeAction->setIcon(QIcon(":/painterTools/images/draw-brush.png")); + _toolPaintModeAction->setStatusTip(tr("Set paint mode")); + connect(_toolPaintModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); + modeMapper->setMapping(_toolPaintModeAction, 0); + + _toolFillModeAction = _toolModeMenu->addAction(tr("Fill Mode")); + _toolFillModeAction->setStatusTip(tr("Set fill mode")); + _toolFillModeAction->setIcon(QIcon(":/painterTools/images/color-fill.png")); + connect(_toolFillModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); + modeMapper->setMapping(_toolFillModeAction, 1); + + _toolSelectModeAction = _toolModeMenu->addAction(tr("Select mode")); + _toolSelectModeAction->setIcon(QIcon(":/painterTools/images/go-jump-4.png")); + _toolSelectModeAction->setStatusTip(tr("Set select mode")); + connect(_toolSelectModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); + modeMapper->setMapping(_toolSelectModeAction, 2); + + _toolPickModeAction = _toolModeMenu->addAction(tr("Pick mode")); + _toolPickModeAction->setIcon(QIcon(":/painterTools/images/color-picker-black.png")); + _toolPickModeAction->setStatusTip(tr("Set color picking mode")); + connect(_toolPickModeAction, SIGNAL(triggered()), modeMapper, SLOT(map())); + modeMapper->setMapping(_toolPickModeAction, 2); + connect(modeMapper, SIGNAL(mapped(int)), this, SLOT(setToolMode(int))); m_statusBarTimer = new QTimer(this); @@ -67,8 +67,8 @@ ZonePainterMainWindow::ZonePainterMainWindow(QWidget *parent) : // Set Background Color Toolbar - - connect(ui->actionBackground_Dlg, SIGNAL(triggered()), this, SLOT(setBackgroundColor())); + + connect(ui->actionBackground_Dlg, SIGNAL(triggered()), this, SLOT(setBackgroundColor())); Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(m_statusInfo); @@ -95,43 +95,43 @@ void ZonePainterMainWindow::updateStatusBar() m_statusInfo->setText(QString("Tool Mode: Paint Mode")); } -void ZonePainterMainWindow::setToolMode(int value) -{ - switch (value) - { - case 0: - //Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Point); - break; - case 1: - //Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Line); - break; - case 2: - //Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Filled); - break; - } -} - -void ZonePainterMainWindow::setToolMode() -{ - //switch (Modules::objView().getDriver()->getPolygonMode()) - //{ - //case NL3D::UDriver::Filled: - // Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Line); - // break; - //case NL3D::UDriver::Line: - // Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Point); - // break; - //case NL3D::UDriver::Point: - // Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Filled); - // break; - //} +void ZonePainterMainWindow::setToolMode(int value) +{ + switch (value) + { + case 0: + //Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Point); + break; + case 1: + //Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Line); + break; + case 2: + //Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Filled); + break; + } +} + +void ZonePainterMainWindow::setToolMode() +{ + //switch (Modules::objView().getDriver()->getPolygonMode()) + //{ + //case NL3D::UDriver::Filled: + // Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Line); + // break; + //case NL3D::UDriver::Line: + // Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Point); + // break; + //case NL3D::UDriver::Point: + // Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Filled); + // break; + //} } void ZonePainterMainWindow::setBackgroundColor() { - QColor color = QColorDialog::getColor(QColor(m_nelWidget->backgroundColor().R, - m_nelWidget->backgroundColor().G, - m_nelWidget->backgroundColor().B)); - if (color.isValid()) + QColor color = QColorDialog::getColor(QColor(m_nelWidget->backgroundColor().R, + m_nelWidget->backgroundColor().G, + m_nelWidget->backgroundColor().B)); + if (color.isValid()) m_nelWidget->setBackgroundColor(NLMISC::CRGBA(color.red(), color.green(), color.blue())); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h index 7cb6b9c43..aeae39ba6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h @@ -79,25 +79,29 @@ class CZonePainterContext: public Core::IContext { Q_OBJECT public: - CZonePainterContext(QObject *parent = 0): IContext(parent) {} - virtual ~CZonePainterContext() {} - - virtual QString id() const - { - return QLatin1String("ZonePainterContext"); - } - virtual QString trName() const - { - return tr("Zone Painter"); - } - virtual QIcon icon() const - { - return QIcon(); - } - virtual QWidget *widget() - { - return new ZonePainterMainWindow(); - } + CZonePainterContext(QObject *parent = 0): IContext(parent) + { + m_zonePainterMainWindow = new ZonePainterMainWindow(); + } + virtual ~CZonePainterContext() {} + + virtual QString id() const + { + return QLatin1String("ZonePainterContext"); + } + virtual QString trName() const + { + return tr("Zone Painter"); + } + virtual QIcon icon() const + { + return QIcon(); + } + virtual QWidget *widget() + { + return m_zonePainterMainWindow; + } + ZonePainterMainWindow *m_zonePainterMainWindow; }; } // namespace Plugin diff --git a/code/ryzom/client/src/client_sheets/stdpch.h b/code/ryzom/client/src/client_sheets/stdpch.h index 1b3d2e146..53a1531be 100644 --- a/code/ryzom/client/src/client_sheets/stdpch.h +++ b/code/ryzom/client/src/client_sheets/stdpch.h @@ -16,6 +16,7 @@ #include +#include #include #include #include diff --git a/code/ryzom/client/src/stdpch.h b/code/ryzom/client/src/stdpch.h index 45957ec35..fdb16ef93 100644 --- a/code/ryzom/client/src/stdpch.h +++ b/code/ryzom/client/src/stdpch.h @@ -16,6 +16,7 @@ #include +#include #include #include #include diff --git a/code/ryzom/tools/sheets_packer/stdpch.h b/code/ryzom/tools/sheets_packer/stdpch.h index d0135ae17..afa7d2137 100644 --- a/code/ryzom/tools/sheets_packer/stdpch.h +++ b/code/ryzom/tools/sheets_packer/stdpch.h @@ -1,5 +1,6 @@ #include +#include #include #include #include