diff --git a/.hgignore b/.hgignore index 829f8812b..2c278c240 100644 --- a/.hgignore +++ b/.hgignore @@ -43,7 +43,6 @@ default_c *.so *.so.* *_debug -core *.pc *.gch @@ -204,16 +203,7 @@ code/nel/tools/pacs/build_rbank/build_rbank code/ryzom/common/data_leveldesign/leveldesign/game_element/xp_table/skills.skill_tree code/ryzom/common/data_leveldesign/leveldesign/game_element/xp_table/xptable.xp_table code/ryzom/tools/server/sql/ryzom_admin_default_data.sql -code/ryzom/tools/server/ryzom_ams/drupal -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/autoload -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/configs -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/cron -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/img -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/plugins -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/smarty -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/translations -code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/libinclude.php -code/ryzom/tools/server/ryzom_ams/www/html/templates_c + # Linux server compile code/ryzom/server/src/entities_game_service/entities_game_service @@ -227,11 +217,23 @@ code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service code/ryzom/server/src/tick_service/tick_service # WebTT temp dir code/ryzom/tools/server/www/webtt/app/tmp -code\ryzom\tools\server\ryzom_ams\old # AMS ignore -code/ryzom/tools/server/ryzom_ams/www/config.php -code/ryzom/tools/server/ryzom_ams/www/is_installed +code/web/public_php/ams/is_installed +code/web/docs/ams/html +code/web/public_php/ams/templates_c +code/ryzom/tools/server/ryzom_ams/drupal +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/autoload +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/configs +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/cron +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/img +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/plugins +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/smarty +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/translations +code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/ams_lib/libinclude.php +code/ryzom/tools/server/ryzom_ams/old + + #tools and external dir's external diff --git a/.hgtags b/.hgtags index e69de29bb..106c1e722 100644 --- a/.hgtags +++ b/.hgtags @@ -0,0 +1,4 @@ +950d650ca92e6041611258d7e5131ccf661e4ec2 compatibility-merge +4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0 +00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0 +79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1 diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 34b33859b..c0552eb54 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -197,6 +197,10 @@ IF(WITH_TOOLS) ADD_SUBDIRECTORY(tool) ENDIF(WITH_TOOLS) +IF(WITH_STUDIO) + ADD_SUBDIRECTORY(studio) +ENDIF(WITH_STUDIO) + # To build the documention, you will have to enable it # and then do the equivalent of "make DoxygenDoc". IF(BUILD_DOCUMENTATION) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index dd8dee49f..0474c7d7b 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -229,6 +229,10 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.: ENDMACRO(CHECK_OUT_OF_SOURCE) MACRO(NL_SETUP_DEFAULT_OPTIONS) + IF(WITH_QT) + OPTION(WITH_STUDIO "Build Core Studio" OFF ) + ENDIF(WITH_QT) + ### # Features ### diff --git a/code/nel/include/nel/3d/tile_bank.h b/code/nel/include/nel/3d/tile_bank.h index 9253c5f45..00e0f2cae 100644 --- a/code/nel/include/nel/3d/tile_bank.h +++ b/code/nel/include/nel/3d/tile_bank.h @@ -86,6 +86,11 @@ public: _BitmapName[bitmapType]=name; } + std::string getFileName (TBitmap bitmapType) const + { + return _BitmapName[bitmapType]; + } + /// Get the additional orientation (CCW) for alpha texture. uint8 getRotAlpha () { @@ -161,6 +166,9 @@ public: { return _Name; }; + + std::set getTileSets() const{ return _TileSet; } + void setName (const std::string& name); void addTileSet (const std::string& name); void removeTileSet (const std::string& name); @@ -169,6 +177,8 @@ public: return _TileSet.find (name)!=_TileSet.end(); } + void clear(){ _TileSet.clear(); } + void serial(class NLMISC::IStream &f) throw(NLMISC::EStream); private: diff --git a/code/nel/include/nel/gui/action_handler.h b/code/nel/include/nel/gui/action_handler.h index 70c4b386e..48b49e451 100644 --- a/code/nel/include/nel/gui/action_handler.h +++ b/code/nel/include/nel/gui/action_handler.h @@ -68,6 +68,8 @@ namespace NLGUI return _GlobalInstance; } + void getActionHandlers( std::vector< std::string > &handlers ); + /// return pointer to action handler or null if it doesn't exist IActionHandler *getActionHandler(const std::string &name) const { diff --git a/code/nel/include/nel/gui/ctrl_base.h b/code/nel/include/nel/gui/ctrl_base.h index 28eeb2cd0..71e6cad56 100644 --- a/code/nel/include/nel/gui/ctrl_base.h +++ b/code/nel/include/nel/gui/ctrl_base.h @@ -171,7 +171,9 @@ namespace NLGUI THotSpot _ToolTipPosRefAlt : 6; protected: void convertTooltipHotSpot(const char *prop, THotSpot &parentHS, THotSpot &childHS); + void convertTooltipHotSpot(const char *prop, THotSpot &HS ); static std::string TooltipHotSpotToString( THotSpot parent, THotSpot child ); + static std::string TooltipHotSpotToString( THotSpot HS ); void mapAHString( const std::string &key, const std::string &value ); std::string getAHString( const std::string &key ) const; diff --git a/code/nel/include/nel/gui/view_renderer.h b/code/nel/include/nel/gui/view_renderer.h index 83ac4457e..fe5dad405 100644 --- a/code/nel/include/nel/gui/view_renderer.h +++ b/code/nel/include/nel/gui/view_renderer.h @@ -286,6 +286,12 @@ namespace NLGUI */ void flush (); + /// Retrives a texture + bool getTexture( NLMISC::CBitmap &bm, const std::string &name ); + + /// Retrieve the texture names + void getTextureNames( std::vector< std::string > &textures ); + /** * get a texture file pointer from a string name. O(logN) * \param id : the id of the texture diff --git a/code/nel/include/nel/misc/i_xml.h b/code/nel/include/nel/misc/i_xml.h index a9452e341..cf2527e21 100644 --- a/code/nel/include/nel/misc/i_xml.h +++ b/code/nel/include/nel/misc/i_xml.h @@ -232,6 +232,9 @@ private: // If not NULL, binary mode detected, use this stream in serials IStream *_BinaryStream; + + // System dependant structure for locale + void* _Locale; }; diff --git a/code/nel/include/nel/misc/o_xml.h b/code/nel/include/nel/misc/o_xml.h index 5933b7ebc..a532f0342 100644 --- a/code/nel/include/nel/misc/o_xml.h +++ b/code/nel/include/nel/misc/o_xml.h @@ -178,6 +178,9 @@ private: // Error message std::string _ErrorString; + + // System dependant structure for locale + void* _Locale; }; diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index 73652a581..f3120c907 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -200,6 +200,10 @@ public: */ void getFileListByName(const std::string &extension, const std::string &name, std::vector &filenames); + /** Create a list of file having the requested string in the path and the requested extension. + */ + void getFileListByPath(const std::string &extension, const std::string &path, std::vector &filenames); + /** Make a path relative to another if possible, else doesn't change it. * \param basePath is the base path to be relative to. * \param relativePath is the path to make relative to basePath. @@ -492,6 +496,10 @@ public: */ static void getFileListByName(const std::string &extension, const std::string &name, std::vector &filenames); + /** Create a list of file having the requested string in the path and the requested extension + */ + static void getFileListByPath(const std::string &extension, const std::string &path, std::vector &filenames); + /** Make a path relative to another if possible, else doesn't change it. * \param basePath is the base path to be relative to. * \param relativePath is the path to make relative to basePath. diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index eb59f2205..6dae9f4fe 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -2803,9 +2803,13 @@ IOcclusionQuery::TOcclusionType COcclusionQueryGL::getOcclusionType() else { GLuint result; - nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result); - OcclusionType = result != 0 ? NotOccluded : Occluded; - VisibleCount = (uint) result; + nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT_AVAILABLE, &result); + if (result != GL_FALSE) + { + nglGetQueryObjectuivARB(ID, GL_QUERY_RESULT, &result); + OcclusionType = result != 0 ? NotOccluded : Occluded; + VisibleCount = (uint) result; + } } } #endif diff --git a/code/nel/src/3d/instance_lighter.cpp b/code/nel/src/3d/instance_lighter.cpp index f754ebb8b..d21f80e4e 100644 --- a/code/nel/src/3d/instance_lighter.cpp +++ b/code/nel/src/3d/instance_lighter.cpp @@ -408,6 +408,12 @@ void CInstanceLighter::light (const CInstanceGroup &igIn, CInstanceGroup &igOut, string name= _Instances[i].Name; bool shapeFound= true; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // Try to find the shape in the UseShapeMap. std::map::const_iterator iteMap= lightDesc.UserShapeMap.find (name); diff --git a/code/nel/src/gui/action_handler.cpp b/code/nel/src/gui/action_handler.cpp index 8b0d9c4ee..d7214ef06 100644 --- a/code/nel/src/gui/action_handler.cpp +++ b/code/nel/src/gui/action_handler.cpp @@ -111,6 +111,18 @@ namespace NLGUI } } + void CAHManager::getActionHandlers( std::vector< std::string > &handlers ) + { + handlers.clear(); + + std::map< string, IActionHandler* >::iterator itr = FactoryMap.begin(); + while( itr != FactoryMap.end() ) + { + handlers.push_back( itr->first ); + ++itr; + } + } + // ------------------------------------------------------------------------------------------------ IActionHandler* CAHManager::getAH(const std::string &name, std::string ¶ms) { diff --git a/code/nel/src/gui/ctrl_base.cpp b/code/nel/src/gui/ctrl_base.cpp index f0a2c2f89..5c250a0da 100644 --- a/code/nel/src/gui/ctrl_base.cpp +++ b/code/nel/src/gui/ctrl_base.cpp @@ -86,7 +86,7 @@ namespace NLGUI break; } - return ""; + return "control"; } CCtrlBase::TToolTipParentType CCtrlBase::stringToToolTipParent( const std::string &str ) @@ -220,28 +220,22 @@ namespace NLGUI else if( name == "tooltip_posref" ) { - std::string s; - if( ( _ToolTipParentPosRef == Hotspot_TTAuto ) && ( _ToolTipPosRef == Hotspot_TTAuto ) ) - return "auto"; - else{ - s = CInterfaceElement::HotSpotToString( _ToolTipParentPosRef ); - s += " "; - s += CInterfaceElement::HotSpotToString( _ToolTipPosRef ); - return s; - } + return TooltipHotSpotToString( _ToolTipPosRef ); + } + else + if( name == "tooltip_parent_posref" ) + { + return TooltipHotSpotToString( _ToolTipParentPosRef ); } else if( name == "tooltip_posref_alt" ) { - std::string s; - if( ( _ToolTipParentPosRefAlt == Hotspot_TTAuto ) && ( _ToolTipPosRefAlt == Hotspot_TTAuto ) ) - return "auto"; - else{ - s = CInterfaceElement::HotSpotToString( _ToolTipParentPosRefAlt ); - s += " "; - s += CInterfaceElement::HotSpotToString( _ToolTipPosRefAlt ); - return s; - } + return TooltipHotSpotToString( _ToolTipPosRefAlt ); + } + else + if( name == "tooltip_parent_posref_alt" ) + { + return TooltipHotSpotToString( _ToolTipParentPosRefAlt ); } else if( name == "instant_help" ) @@ -293,21 +287,65 @@ namespace NLGUI else if( name == "tooltip_posref" ) { - THotSpot parentHS; THotSpot HS; - convertTooltipHotSpot( value.c_str(), parentHS, HS ); - _ToolTipParentPosRef = parentHS; + convertTooltipHotSpot( value.c_str(), HS ); _ToolTipPosRef = HS; + + // When auto is set, both of them need to be auto + if( _ToolTipPosRef == Hotspot_TTAuto ) + _ToolTipParentPosRef = Hotspot_TTAuto; + else + if( _ToolTipParentPosRef == Hotspot_TTAuto ) + _ToolTipParentPosRef = _ToolTipPosRef; + + return; + } + else + if( name == "tooltip_parent_posref" ) + { + THotSpot HS; + convertTooltipHotSpot( value.c_str(), HS ); + _ToolTipParentPosRef = HS; + + // When auto is set, both of them need to be auto + if( _ToolTipParentPosRef == Hotspot_TTAuto ) + _ToolTipPosRef = Hotspot_TTAuto; + else + if( _ToolTipPosRef == Hotspot_TTAuto ) + _ToolTipPosRef = _ToolTipParentPosRef; + return; } else if( name == "tooltip_posref_alt" ) { - THotSpot parentHS; THotSpot HS; - convertTooltipHotSpot( value.c_str(), parentHS, HS ); - _ToolTipParentPosRefAlt = parentHS; + convertTooltipHotSpot( value.c_str(), HS ); _ToolTipPosRefAlt = HS; + + // When auto is set, both of them need to be auto + if( _ToolTipPosRefAlt == Hotspot_TTAuto ) + _ToolTipParentPosRefAlt = Hotspot_TTAuto; + else + if( _ToolTipParentPosRefAlt == Hotspot_TTAuto ) + _ToolTipPosRefAlt = _ToolTipParentPosRefAlt; + + return; + } + else + if( name == "tooltip_parent_posref_alt" ) + { + THotSpot HS; + convertTooltipHotSpot( value.c_str(), HS ); + _ToolTipParentPosRefAlt = HS; + + // When auto is set, both of them need to be auto + if( _ToolTipParentPosRefAlt == Hotspot_TTAuto ) + _ToolTipPosRefAlt = Hotspot_TTAuto; + else + if( _ToolTipPosRefAlt == Hotspot_TTAuto ) + _ToolTipPosRefAlt = _ToolTipParentPosRefAlt; + return; } else @@ -374,6 +412,21 @@ namespace NLGUI } } + void CCtrlBase::convertTooltipHotSpot(const char *prop, THotSpot &HS ) + { + if(prop) + { + const char *ptr = (const char*)prop; + if(stricmp(ptr, "auto")==0) + { + HS = Hotspot_TTAuto; + } + else if(strlen(ptr)==2) + { + HS = convertHotSpot(ptr); + } + } + } std::string CCtrlBase::TooltipHotSpotToString( THotSpot parent, THotSpot child ) { @@ -393,6 +446,20 @@ namespace NLGUI return s; } + std::string CCtrlBase::TooltipHotSpotToString( THotSpot HS ) + { + std::string s; + if( HS == Hotspot_TTAuto ) + { + s = "auto"; + } + else + { + s = HotSpotToString( HS ); + } + return s; + } + // *************************************************************************** bool CCtrlBase::emptyContextHelp() const { diff --git a/code/nel/src/gui/ctrl_text_button.cpp b/code/nel/src/gui/ctrl_text_button.cpp index cdf006a51..d3a0f6765 100644 --- a/code/nel/src/gui/ctrl_text_button.cpp +++ b/code/nel/src/gui/ctrl_text_button.cpp @@ -149,11 +149,16 @@ namespace NLGUI } else if( name == "text_posref" ) + { + std::string pr; + pr = CInterfaceElement::HotSpotToString( _TextPosRef ); + return pr; + } + else + if( name == "text_parent_posref" ) { std::string pr; pr = CInterfaceElement::HotSpotToString( _TextParentPosRef ); - pr += " "; - pr += CInterfaceElement::HotSpotToString( _TextPosRef ); return pr; } else @@ -324,10 +329,13 @@ namespace NLGUI else if( name == "text_posref" ) { - THotSpot parent, posref; - CInterfaceElement::convertHotSpotCouple( value.c_str(), parent, posref ); - _TextPosRef = posref; - _TextParentPosRef = parent; + _TextPosRef = convertHotSpot( value.c_str() ); + return; + } + else + if( name == "text_parent_posref" ) + { + _TextParentPosRef = convertHotSpot( value.c_str() ); return; } else diff --git a/code/nel/src/gui/group_paragraph.cpp b/code/nel/src/gui/group_paragraph.cpp index 00ea5f3b7..9e065c878 100644 --- a/code/nel/src/gui/group_paragraph.cpp +++ b/code/nel/src/gui/group_paragraph.cpp @@ -209,6 +209,8 @@ namespace NLGUI } nlassert(false); + + return ""; } else if( name == "align" ) @@ -229,6 +231,8 @@ namespace NLGUI } nlassert(false); + + return ""; } else if( name == "space" ) diff --git a/code/nel/src/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index 9f019ed48..2fdd7e364 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.cpp @@ -89,6 +89,8 @@ namespace NLGUI } nlassert(false); + + return ""; } else if( name == "valign" ) @@ -106,6 +108,8 @@ namespace NLGUI } nlassert(false); + + return ""; } else if( name == "left_margin" ) diff --git a/code/nel/src/gui/group_wheel.cpp b/code/nel/src/gui/group_wheel.cpp index 6f4c96484..e242a98e7 100644 --- a/code/nel/src/gui/group_wheel.cpp +++ b/code/nel/src/gui/group_wheel.cpp @@ -24,6 +24,8 @@ NLMISC_REGISTER_OBJECT(CViewBase, CInterfaceGroupWheel, std::string, "group_whee namespace NLGUI { + void force_link_group_wheel_cpp() { } + // ***************************************************************************************************************** CInterfaceGroupWheel::CInterfaceGroupWheel(const TCtorParam ¶m) : CInterfaceGroup(param) { diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index 15f9cf812..0225d2797 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -130,12 +130,17 @@ namespace NLGUI if( name == "posref" ) { std::string posref; - posref = HotSpotToString( getParentPosRef() ); - posref += " "; posref += HotSpotToString( getPosRef() ); return posref; } else + if( name == "parentposref" ) + { + std::string parentPosRef; + parentPosRef = HotSpotToString( getParentPosRef() ); + return parentPosRef; + } + else if( name == "sizeref" ) { return getSizeRefAsString( _SizeRef, _SizeDivW, _SizeDivH ); @@ -221,10 +226,15 @@ namespace NLGUI else if( name == "posref" ) { - convertHotSpotCouple( value.c_str(), _ParentPosRef, _PosRef ); + convertHotSpot( value.c_str() ); return; } else + if( name == "parentposref" ) + { + convertHotSpot( value.c_str() ); + } + else if( name == "sizeref" ) { parseSizeRef( value.c_str() ); diff --git a/code/nel/src/gui/link_hack.cpp b/code/nel/src/gui/link_hack.cpp index 1492012e1..06a8c23e8 100644 --- a/code/nel/src/gui/link_hack.cpp +++ b/code/nel/src/gui/link_hack.cpp @@ -26,6 +26,7 @@ namespace NLGUI void ifexprufct_forcelink(); void force_link_dbgroup_select_number_cpp(); void force_link_dbgroup_combo_box_cpp(); + void force_link_group_wheel_cpp(); /// Necessary so the linker doesn't drop the code of these classes from the library void LinkHack() @@ -37,5 +38,6 @@ namespace NLGUI ifexprufct_forcelink(); force_link_dbgroup_select_number_cpp(); force_link_dbgroup_combo_box_cpp(); + force_link_group_wheel_cpp(); } } \ No newline at end of file diff --git a/code/nel/src/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index b2758c634..6e6675599 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.cpp @@ -1064,6 +1064,46 @@ namespace NLGUI } } + bool CViewRenderer::getTexture( NLMISC::CBitmap &bm, const std::string &name ) + { + TTextureMap::const_iterator itr = _TextureMap.find( name ); + if( itr == _TextureMap.end() ) + return false; + + sint32 id = itr->second; + SImage *si = getSImage( id ); + NLMISC::CBitmap *src = si->GlobalTexturePtr->Texture->generateDatas(); + + if( src->getPixelFormat() != NLMISC::CBitmap::RGBA ) + return false; + + uint x0 = (uint)( si->UVMin.U * si->GlobalTexturePtr->Width ); + uint y0 = (uint)( si->UVMin.V * si->GlobalTexturePtr->Height ); + uint x1 = (uint)( si->UVMax.U * si->GlobalTexturePtr->Width ); + uint y1 = (uint)( si->UVMax.V * si->GlobalTexturePtr->Height ); + + if( x1 == x0 ) + return false; + + if( y1 == y0 ) + return false; + + bm.resize( x1 - x0, y1 - y0 ); + bm.blit( *src, x0, y0, ( x1 - x0 ), ( y1 - y0 ), 0, 0 ); + + return true; + } + + void CViewRenderer::getTextureNames( std::vector< std::string > &textures ) + { + TTextureMap::const_iterator itr = _TextureMap.begin(); + while( itr != _TextureMap.end() ) + { + textures.push_back( itr->first ); + ++itr; + } + } + /* * getTextureIdFromName */ diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index d8925ddef..ee3f39a89 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -24,6 +24,11 @@ // Include from libxml2 #include +#if defined(NL_OS_WINDOWS) && defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 80 +#define USE_LOCALE_ATOF +#include +#endif + using namespace std; #define NLMISC_READ_BUFFER_SIZE 1024 @@ -46,6 +51,22 @@ const char SEPARATOR = ' '; serialSeparatedBufferIn( number_as_string ); \ dest = (thetype)convfunc( number_as_string.c_str() ); +#ifdef USE_LOCALE_ATOF + +#define readnumberlocale(dest,thetype,digits,convfunc) \ + string number_as_string; \ + serialSeparatedBufferIn( number_as_string ); \ + dest = (thetype)convfunc( number_as_string.c_str(), (_locale_t)_Locale ); + +#define nl_atof _atof_l + +#else + +#define readnumberlocale(dest,thetype,digits,convfunc) readnumber(dest,thetype,digits,convfunc) +#define nl_atof atof + +#endif + // *************************************************************************** inline void CIXml::flushContentString () @@ -70,6 +91,13 @@ CIXml::CIXml () : IStream (true /* Input mode */) _ErrorString = ""; _TryBinaryMode = false; _BinaryStream = NULL; + +#ifdef USE_LOCALE_ATOF + // create C numeric locale + _Locale = _create_locale(LC_NUMERIC, "C"); +#else + _Locale = NULL; +#endif } // *************************************************************************** @@ -85,6 +113,13 @@ CIXml::CIXml (bool tryBinaryMode) : IStream (true /* Input mode */) _ErrorString = ""; _TryBinaryMode = tryBinaryMode; _BinaryStream = NULL; + +#ifdef USE_LOCALE_ATOF + // create C numeric locale + _Locale = _create_locale(LC_NUMERIC, "C"); +#else + _Locale = NULL; +#endif } // *************************************************************************** @@ -93,6 +128,10 @@ CIXml::~CIXml () { // Release release (); + +#ifdef USE_LOCALE_ATOF + if (_Locale) _free_locale((_locale_t)_Locale); +#endif } // *************************************************************************** @@ -546,7 +585,7 @@ void CIXml::serial(float &b) } else { - readnumber( b, float, 128, atof ); + readnumberlocale( b, float, 128, nl_atof ); } } @@ -560,7 +599,7 @@ void CIXml::serial(double &b) } else { - readnumber( b, double, 128, atof ); + readnumberlocale( b, double, 128, nl_atof ); } } diff --git a/code/nel/src/misc/o_xml.cpp b/code/nel/src/misc/o_xml.cpp index 005ef8000..0fbe3dade 100644 --- a/code/nel/src/misc/o_xml.cpp +++ b/code/nel/src/misc/o_xml.cpp @@ -23,6 +23,11 @@ // Include from libxml2 #include +#if defined(NL_OS_WINDOWS) && defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 80 +#define USE_LOCALE_SPRINTF +#include +#endif + using namespace std; #ifdef DEBUG_NEW @@ -38,11 +43,22 @@ const char SEPARATOR = ' '; // *************************************************************************** +#ifdef USE_LOCALE_SPRINTF + +#define writenumber(src,format,digits) \ + char number_as_cstring [digits+1]; \ + _sprintf_l( number_as_cstring, format, (_locale_t)_Locale, src ); \ + serialSeparatedBufferOut( number_as_cstring ); + +#else + #define writenumber(src,format,digits) \ char number_as_cstring [digits+1]; \ sprintf( number_as_cstring, format, src ); \ serialSeparatedBufferOut( number_as_cstring ); +#endif + // *************************************************************************** // XML callbacks // *************************************************************************** @@ -133,6 +149,13 @@ COXml::COXml () : IStream (false /* Output mode */) // Push begin _PushBegin = false; + +#ifdef USE_LOCALE_SPRINTF + // create C numeric locale + _Locale = _create_locale(LC_NUMERIC, "C"); +#else + _Locale = NULL; +#endif } // *************************************************************************** @@ -192,6 +215,10 @@ COXml::~COXml () { // Flush document to the internal stream flush (); + +#ifdef USE_LOCALE_SPRINTF + if (_Locale) _free_locale((_locale_t)_Locale); +#endif } // *************************************************************************** diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 743f8f514..d47b8ce4a 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -221,6 +221,67 @@ void CFileContainer::getFileListByName(const std::string &extension, const std:: } } +void CPath::getFileListByPath(const std::string &extension, const std::string &path, std::vector &filenames) +{ + getInstance()->_FileContainer.getFileListByPath(extension, path, filenames); +} + +void CFileContainer::getFileListByPath(const std::string &extension, const std::string &path, std::vector &filenames) +{ + if (!_MemoryCompressed) + { + TFiles::iterator first(_Files.begin()), last(_Files.end()); + + if( !path.empty() ) + { + for (; first != last; ++ first) + { + string ext = SSMext.get(first->second.idExt); + string p = SSMpath.get(first->second.idPath); + if (p.find(path) != string::npos && (ext == extension || extension.empty())) + { + filenames.push_back(first->first); + } + } + } + // if extension is empty we keep all files + else + { + for (; first != last; ++ first) + { + filenames.push_back(first->first); + } + } + } + else + { + // compressed memory version + std::vector::iterator first(_MCFiles.begin()), last(_MCFiles.end()); + + if( !path.empty() ) + { + for (; first != last; ++ first) + { + string ext = SSMext.get(first->idExt); + string p = SSMpath.get(first->idPath); + + if (strstr(p.c_str(), path.c_str()) != NULL && (ext == extension || extension.empty())) + { + filenames.push_back(first->Name); + } + } + } + // if extension is empty we keep all files + else + { + for (; first != last; ++ first) + { + filenames.push_back(first->Name); + } + } + } +} + void CPath::clearMap () { getInstance()->_FileContainer.clearMap(); diff --git a/code/nel/tools/3d/CMakeLists.txt b/code/nel/tools/3d/CMakeLists.txt index a07e8c53a..cb709ffaa 100644 --- a/code/nel/tools/3d/CMakeLists.txt +++ b/code/nel/tools/3d/CMakeLists.txt @@ -1,40 +1,42 @@ IF(WITH_NEL_TOOLS) - + IF(WITH_3D) + SUBDIRS( + anim_builder + animation_set_builder + build_clod_bank + build_clodtex + build_coarse_mesh + build_far_bank + build_shadow_skin + build_smallbank + cluster_viewer + file_info + ig_add + ig_elevation + ig_info + ig_lighter + lightmap_optimizer + zone_dependencies + zone_ig_lighter + zone_lighter + zone_welder + shapes_exporter + shape2obj + zone_check_bind + zone_dump + zviewer) + ENDIF() + SUBDIRS( - build_coarse_mesh - build_far_bank - build_smallbank - ig_lighter - ig_elevation - lightmap_optimizer - zone_dependencies - zone_ig_lighter - zone_lighter - zone_welder - animation_set_builder - anim_builder - build_clod_bank - build_clodtex build_interface - build_shadow_skin - cluster_viewer - file_info get_neighbors - ig_add - ig_info - shapes_exporter tga_cut - tga_resize - shape2obj - zone_check_bind - zone_dump - zviewer) - -ENDIF(WITH_NEL_TOOLS) + tga_resize) +ENDIF() # For tools selection of only max plugins -IF(WIN32) +IF(WIN32 AND WITH_3D) IF(MFC_FOUND) ADD_SUBDIRECTORY(object_viewer) IF(WITH_NEL_MAXPLUGIN) @@ -44,9 +46,9 @@ IF(WIN32) ENDIF(MAXSDK_FOUND) ENDIF(WITH_NEL_MAXPLUGIN) ENDIF(MFC_FOUND) -ENDIF(WIN32) +ENDIF() -IF(WITH_NEL_TOOLS) +IF(WITH_NEL_TOOLS AND WITH_3D) IF(WIN32) # ADD_SUBDIRECTORY(lightmap_optimizer) IF(MFC_FOUND) @@ -57,7 +59,6 @@ IF(WITH_NEL_TOOLS) IF(WITH_QT) ADD_SUBDIRECTORY(tile_edit_qt) - ADD_SUBDIRECTORY(object_viewer_qt) ADD_SUBDIRECTORY(object_viewer_widget) ENDIF(WITH_QT) @@ -71,5 +72,5 @@ IF(WITH_NEL_TOOLS) #crash_log_analyser #shapes_exporter -ENDIF(WITH_NEL_TOOLS) +ENDIF() diff --git a/code/nel/tools/3d/build_interface/main.cpp b/code/nel/tools/3d/build_interface/main.cpp index be39b7d17..343673b34 100644 --- a/code/nel/tools/3d/build_interface/main.cpp +++ b/code/nel/tools/3d/build_interface/main.cpp @@ -113,18 +113,17 @@ void putPixel(uint8 *dst, uint8 *src, bool alphaTransfert) // *************************************************************************** bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bool alphaTransfert=true) { - uint32 a, b; - uint8 *rSrcPix = &pSrc->getPixels()[0]; uint8 *rDstPix = &pDst->getPixels()[0]; uint wSrc= pSrc->getWidth(); uint hSrc= pSrc->getHeight(); - for (b = 0; b < hSrc; ++b) - for (a = 0; a < wSrc; ++a) + for (uint b = 0; b < hSrc; ++b) + for (uint a = 0; a < wSrc; ++a) { if (rDstPix[4*((x+a)+(y+b)*pDst->getWidth())+3] != 0) return false; + // write putPixel(rDstPix + 4*((x+a)+(y+b)*pDst->getWidth()), rSrcPix+ 4*(a+b*pSrc->getWidth()), alphaTransfert); } @@ -135,9 +134,9 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bo // expand on W if(wSrcgetWidth()), rDstPix + 4*((x+wSrc-1)+(y+b)*pDst->getWidth()), alphaTransfert); } @@ -146,9 +145,9 @@ bool putIn (NLMISC::CBitmap *pSrc, NLMISC::CBitmap *pDst, sint32 x, sint32 y, bo // expand on H if(hSrcgetWidth()), rDstPix + 4*((x+a)+(y+hSrc-1)*pDst->getWidth()), alphaTransfert); } @@ -252,30 +251,38 @@ int main(int nNbArg, char **ppArgs) } vector AllMaps; - sint32 i, j; + sint32 j; // Load all maps sint32 mapSize = (sint32)AllMapNames.size(); AllMaps.resize( mapSize ); - for( i = 0; i < mapSize; ++i ) + for(sint i = 0; i < mapSize; ++i ) { + NLMISC::CBitmap *pBtmp = NULL; + try { - NLMISC::CBitmap *pBtmp = new NLMISC::CBitmap; + pBtmp = new NLMISC::CBitmap; NLMISC::CIFile inFile; - inFile.open( AllMapNames[i] ); - pBtmp->load(inFile); + if (!inFile.open( AllMapNames[i] )) throw NLMISC::Exception("Unable to open " + AllMapNames[i]); + + uint8 colors = pBtmp->load(inFile); + + if (colors != 32) throw NLMISC::Exception(AllMapNames[i] + " is using " + toString(colors) + " bits colors, only 32 bit supported!"); + AllMaps[i] = pBtmp; } catch (const NLMISC::Exception &e) { + if (pBtmp) delete pBtmp; + outString (string("ERROR :") + e.what()); return -1; } } // Sort all maps by decreasing size - for (i = 0; i < mapSize-1; ++i) + for (sint i = 0; i < mapSize-1; ++i) for (j = i+1; j < mapSize; ++j) { NLMISC::CBitmap *pBI = AllMaps[i]; @@ -303,7 +310,7 @@ int main(int nNbArg, char **ppArgs) vector UVMin, UVMax; UVMin.resize (mapSize, NLMISC::CUV(0.0f, 0.0f)); UVMax.resize (mapSize, NLMISC::CUV(0.0f, 0.0f)); - for (i = 0; i < mapSize; ++i) + for (sint i = 0; i < mapSize; ++i) { sint32 x, y; while (!tryAllPos(AllMaps[i], &GlobalMask, x, y)) @@ -349,7 +356,7 @@ int main(int nNbArg, char **ppArgs) } // Convert UV from pixel to ratio - for (i = 0; i < mapSize; ++i) + for (sint i = 0; i < mapSize; ++i) { UVMin[i].U = UVMin[i].U / (float)GlobalTexture.getWidth(); UVMin[i].V = UVMin[i].V / (float)GlobalTexture.getHeight(); @@ -394,7 +401,7 @@ int main(int nNbArg, char **ppArgs) FILE *f = fopen (fmtName.c_str(), "wt"); if (f != NULL) { - for (i = 0; i < mapSize; ++i) + for (sint i = 0; i < mapSize; ++i) { // get the string whitout path string fileName= CFile::getFilename(AllMapNames[i]); @@ -442,6 +449,8 @@ int main(int nNbArg, char **ppArgs) nlwarning("Can't parse %s", bufTmp); continue; } + + sint i; sTGAname = toLower(string(tgaName)); string findTGAName; diff --git a/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp b/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp index 4365eab9b..8286a10e6 100644 --- a/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp +++ b/code/nel/tools/3d/ig_lighter_lib/ig_lighter_lib.cpp @@ -167,6 +167,12 @@ void CIgLighterLib::lightIg(CInstanceLighter &instanceLighter, string name= igIn.getShapeName(i); bool shapeFound= true; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // Try to find the shape in the UseShapeMap. std::map::const_iterator iteMap= lightDesc.UserShapeMap.find (name); diff --git a/code/nel/tools/3d/object_viewer_qt/ovqt_config.h.cmake b/code/nel/tools/3d/object_viewer_qt/ovqt_config.h.cmake deleted file mode 100644 index 5b3a49654..000000000 --- a/code/nel/tools/3d/object_viewer_qt/ovqt_config.h.cmake +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef OVQT_CONFIG_H -#define OVQT_CONFIG_H - -#define DATA_DIR "${NL_SHARE_ABSOLUTE_PREFIX}/object_viewer_qt" -#define PLUGINS_DIR "${NL_LIB_ABSOLUTE_PREFIX}/object_viewer_qt" - -#endif diff --git a/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt deleted file mode 100644 index d77b0e6a1..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -ADD_SUBDIRECTORY(3rdparty) - -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES}) -INCLUDE( ${QT_USE_FILE} ) - -CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY) - -FILE(GLOB OBJECT_VIEWER_SRC extension_system/*.h - extension_system/*.cpp - *.h *.cpp) - -SET(OBJECT_VIEWER_HDR extension_system/iplugin_manager.h - extension_system/plugin_manager.h) - -SET(OBJECT_VIEWER_RCS object_viewer_qt.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc) - -SET(OBJECT_VIEWER_TS translations/object_viewer_qt_en.ts - translations/object_viewer_qt_fr.ts - translations/object_viewer_qt_de.ts - translations/object_viewer_qt_ru.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}) -QT4_WRAP_CPP( OBJECT_VIEWER_MOC_SRCS ${OBJECT_VIEWER_HDR} ) - -SOURCE_GROUP(QtResources FILES ${OBJECT_VIEWER_RCS}) -SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${OBJECT_VIEWER_MOC_SRCS} ${OBJECT_VIEWER_RC_SRCS}) - -ADD_EXECUTABLE(object_viewer_qt WIN32 MACOSX_BUNDLE - ${OBJECT_VIEWER_SRC} - ${OBJECT_VIEWER_MOC_SRCS} - ${OBJECT_VIEWER_RC_SRCS} - ${OBJECT_VIEWER_RC}) - -TARGET_LINK_LIBRARIES(object_viewer_qt - nelmisc - ${QT_LIBRARIES} - ${QT_QTMAIN_LIBRARY}) - -ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS}) -NL_DEFAULT_PROPS(object_viewer_qt "NeL, Tools, 3D: Object Viewer Qt") -NL_ADD_RUNTIME_FLAGS(object_viewer_qt) - -ADD_SUBDIRECTORY(plugins) - -INSTALL(TARGETS object_viewer_qt RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) diff --git a/code/nel/tools/3d/object_viewer_qt/src/images/nel_ide_load.png b/code/nel/tools/3d/object_viewer_qt/src/images/nel_ide_load.png deleted file mode 100644 index 1ec9d823f..000000000 Binary files a/code/nel/tools/3d/object_viewer_qt/src/images/nel_ide_load.png and /dev/null differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formitem.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formitem.cpp deleted file mode 100644 index 744bb58da..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formitem.cpp +++ /dev/null @@ -1,163 +0,0 @@ -// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel -// -// 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 "formitem.h" - -// Qt includes - -// NeL includes -#include -#include -#include - -namespace GeorgesQt -{ - - CFormItem::CFormItem(NLGEORGES::UFormElm* elm, const QList &data, CFormItem *parent, - NLGEORGES::UFormElm::TWhereIsValue wV, NLGEORGES::UFormElm::TWhereIsNode wN) - { - parentItem = parent; - itemData = data; - formElm = elm; - whereV = wV; - whereN = wN; - } - - CFormItem::~CFormItem() - { - qDeleteAll(childItems); - } - - void CFormItem::appendChild(CFormItem *item) - { - childItems.append(item); - } - - CFormItem *CFormItem::child(int row) - { - return childItems.value(row); - } - - int CFormItem::childCount() const - { - return childItems.count(); - } - - int CFormItem::columnCount() const - { - //nlinfo("columnCount %d",itemData.count()); - return itemData.count(); - } - - QVariant CFormItem::data(int column) const - { - return itemData.value(column); - } - - CFormItem *CFormItem::parent() - { - return parentItem; - } - - int CFormItem::row() const - { - if (parentItem) - return parentItem->childItems.indexOf(const_cast(this)); - - return 0; - } - - bool CFormItem::setData(int column, const QVariant &value) - { - if (column < 0 || column >= itemData.size()) - return false; - - // TODO: default values - if (!formElm) - return false; - - itemData[column] = value; - if (formElm->isAtom()) - { - const NLGEORGES::UType *type = formElm->getType(); - if (type) - { - switch (type->getType()) - { - case NLGEORGES::UType::UnsignedInt: - case NLGEORGES::UType::SignedInt: - case NLGEORGES::UType::Double: - case NLGEORGES::UType::String: - if (parentItem->formElm->isArray()) - { - //((NLGEORGES::CFormElm*)parentItem->formElm);//->arrayInsertNodeByName( - //if(parentItem->formElm->getArrayNode(elmName, num)) - //{ - //} - - bool ok; - // TODO: the node can be renamed from eg "#0" to "foobar" - int arrayIndex = itemData[0].toString().remove("#").toInt(&ok); - if(ok) - { - NLGEORGES::UFormElm *elmt = 0; - if(parentItem->formElm->getArrayNode(&elmt, arrayIndex) && elmt) - { - if (elmt->isAtom()) - { - ((NLGEORGES::CFormElmAtom*)elmt)->setValue(value.toString().toUtf8().constData()); - nldebug(QString("array element string %1 %2") - .arg(itemData[0].toString()).arg(value.toString()) - .toUtf8().constData()); - } - } - } - } - else - { - if(parentItem->formElm->setValueByName( - value.toString().toUtf8().constData(), - itemData[0].toString().toUtf8().constData())) - { - nldebug(QString("string %1 %2") - .arg(itemData[0].toString()).arg(value.toString()) - .toUtf8().constData()); - } - else - { - nldebug(QString("FAILED string %1 %2") - .arg(itemData[0].toString()).arg(value.toString()) - .toUtf8().constData()); - } - } - break; - case NLGEORGES::UType::Color: - nldebug("Color is TODO"); - break; - default: - break; - } - } - } - else - { - nldebug("setting sth other than Atom"); - } - //formElm->setValueByName(); - return true; - } -} diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor.qrc b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor.qrc deleted file mode 100644 index 3d514dbc0..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - images/ic_nel_georges_editor.png - - diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_model.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_model.cpp deleted file mode 100644 index dd0220bbf..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_model.cpp +++ /dev/null @@ -1,704 +0,0 @@ -// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework -// Copyright (C) 2011 Adrian Jaekel -// -// 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 "georgesform_model.h" -#include "formitem.h" - -// NeL includes -#include -#include -#include -#include -#include -#include - -// Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace NLGEORGES; - -namespace GeorgesQt -{ - - CGeorgesFormModel::CGeorgesFormModel(UFormElm *rootElm, QMap< QString, QStringList> deps, - QString comment, QStringList parents, bool *expanded, QObject *parent) : QAbstractItemModel(parent) - { - - m_rootData << "Value" << "Data" << "Extra";// << "Type"; - m_rootElm = rootElm; - m_rootItem = new CFormItem(m_rootElm, m_rootData); - m_dependencies = deps; - m_comments = comment; - m_parents = parents; - m_parentRows = new QList; - m_expanded = expanded; - - setupModelData(); - } - - CGeorgesFormModel::~CGeorgesFormModel() - { - delete m_rootItem; - } - - /******************************************************************************/ - - QVariant CGeorgesFormModel::data(const QModelIndex &p_index, int p_role) const - { - if (!p_index.isValid()) - return QVariant(); - - switch (p_role) - { - case Qt::DisplayRole: - { - return getItem(p_index)->data(p_index.column()); - } - case Qt::BackgroundRole: - { - QBrush defaultBrush = QBrush(QColor(255,0,0,30)); - QBrush parentBrush = QBrush(QColor(0,255,0,30)); - - // if elm not existing it must be some kind of default or type value - if(!getItem(p_index)->getFormElm()) - { - return defaultBrush; - } - - // else it might be some parent elm - switch (getItem(p_index)->nodeFrom()) - { - case NLGEORGES::UFormElm::NodeParentForm: - { - return parentBrush; - } - case NLGEORGES::UFormElm::NodeForm: - { - switch (getItem(p_index)->valueFrom()) - { - case NLGEORGES::UFormElm::ValueParentForm: - { - return parentBrush; - } - default: - { - // parent status test kindof ugly, testing only 2 steps deep - // only needed for colorization as treeview default hides childs - // when parent is hidden - CFormItem *parent = getItem(p_index)->parent(); - if (parent) - { - if (parent->nodeFrom() == NLGEORGES::UFormElm::NodeParentForm) - { - return parentBrush; - } - - CFormItem *parentParent = parent->parent(); - if (parentParent) - { - if (parentParent->nodeFrom() == NLGEORGES::UFormElm::NodeParentForm) - { - return parentBrush; - } - } // endif parentParent - } // endif parent - } // end default - } // end switch valueFrom - } // end case nodeForm - } // end switch nodeFrom - return QVariant(); - } - case Qt::DecorationRole: - { - if (p_index.column() == 2) - { - //p_index. - QModelIndex in = index(p_index.row(),p_index.column()-1,p_index.parent()); - CFormItem *item = getItem(in); - - QString value = item->data(1).toString(); - //QString path = NLMISC::CPath::lookup(value.toUtf8().constData(),false).c_str(); - - /*if (value.contains(".shape")) - { - if (Modules::objViewInt()) - { - QIcon *icon = Modules::objViewInt()->saveOneImage(value.toUtf8().constData()); - if (icon) - { - if(icon->isNull()) - return QIcon(":/images/pqrticles.png"); - else - return QIcon(*icon); - } - else - { - return QIcon(); - } - } - }*/ - if(value.contains(".tga") || value.contains(".png")) - { - QString path = NLMISC::CPath::lookup(value.toUtf8().constData(),false).c_str(); - if(path.isEmpty()) - { - path = ":/images/pqrticles.png"; - } - return QIcon(path); - } - } - return QVariant(); - break; - } - case Qt::ToolTipRole: - { - if (p_index.column() == 2) - { - QModelIndex in = index(p_index.row(),p_index.column()-1,p_index.parent()); - CFormItem *item = getItem(in); - QString value = item->data(1).toString(); - - /*if (value.contains(".shape")) - { - if (Modules::objViewInt()) - { - QIcon *icon = Modules::objViewInt()->saveOneImage(value.toUtf8().constData()); - if (icon) - { - if(icon->isNull()) - return QIcon(":/images/pqrticles.png"); - else - return QIcon(*icon); - } - else - { - return QIcon(); - } - } - }*/ - if(value.contains(".tga") || value.contains(".png")) - { - QString path = NLMISC::CPath::lookup(value.toUtf8().constData(),false).c_str(); - if(path.isEmpty()) - { - path = ":/images/pqrticles.png"; - } - - QString imageTooltip = QString("").arg(path); - - return imageTooltip; - } - } - return QVariant(); - break; - } - default: - return QVariant(); - } - } - - /******************************************************************************/ - - CFormItem *CGeorgesFormModel::getItem(const QModelIndex &index) const - { - if (index.isValid()) - { - CFormItem *item = static_cast(index.internalPointer()); - if (item) - return item; - } - return m_rootItem; - } - - /******************************************************************************/ - - bool CGeorgesFormModel::setData(const QModelIndex &index, const QVariant &value, - int role) - { - - if (role != Qt::EditRole) - return false; - - CFormItem *item = getItem(index); - bool result = item->setData(index.column(), value); - - Q_EMIT dataChanged(index, index); - - //setupModelData(); - return result; - } - - /******************************************************************************/ - - Qt::ItemFlags CGeorgesFormModel::flags(const QModelIndex& index) const { - - if (!index.isValid()) - return 0; - - Qt::ItemFlags returnValue = Qt::ItemIsSelectable | Qt::ItemIsEnabled; - - if(index.column() == 1) - returnValue |= Qt::ItemIsEditable; - - return returnValue; - - } - - /******************************************************************************/ - - QVariant CGeorgesFormModel::headerData(int section, - Qt::Orientation orientation, int role) const - { - if (orientation == Qt::Horizontal) - { - if (role == Qt::DisplayRole) - return m_rootItem->data(section); - if (role == Qt::TextAlignmentRole) - return Qt::AlignLeft; - if (section == 0 && role == Qt::DecorationRole) - { - // transparent pixmap as we paint it ourself with tree brach - // if we extend the HeaderView::paintSection for the CE_HeaderLabel - // we could drop this - QPixmap pixmap = QPixmap( - QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize), - QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize)); - // Create new picture for transparent - QPixmap transparent(pixmap.size()); - - // Do transparency - transparent.fill(Qt::transparent); - QPainter p(&transparent); - p.setCompositionMode(QPainter::CompositionMode_Source); - p.drawPixmap(0, 0, pixmap); - p.setCompositionMode(QPainter::CompositionMode_DestinationIn); - // Set transparency level to 150 (possible values are 0-255) - // The alpha channel of a color specifies the transparency effect, - // 0 represents a fully transparent color, while 255 represents - // a fully opaque color. - p.fillRect(transparent.rect(), QColor(0, 0, 0, 0)); - p.end(); - - // Set original picture's reference to new transparent one - pixmap = transparent; - return pixmap; - } - } - return QVariant(); - } - - /******************************************************************************/ - - QModelIndex CGeorgesFormModel::index(int row, int column, const QModelIndex &parent) - const - { - if (!hasIndex(row, column, parent)) - return QModelIndex(); - - CFormItem *parentItem; - - if (!parent.isValid()) - parentItem = m_rootItem; - else - parentItem = static_cast(parent.internalPointer()); - - CFormItem *childItem = parentItem->child(row); - if (childItem) - return createIndex(row, column, childItem); - else - return QModelIndex(); - } - - /******************************************************************************/ - - QModelIndex CGeorgesFormModel::parent(const QModelIndex &index) const - { - if (!index.isValid()) - return QModelIndex(); - - CFormItem *childItem = static_cast(index.internalPointer()); - CFormItem *parentItem = childItem->parent(); - - if (parentItem == m_rootItem) - return QModelIndex(); - - return createIndex(parentItem->row(), 0, parentItem); - } - - /******************************************************************************/ - - int CGeorgesFormModel::rowCount(const QModelIndex &parent) const { - - CFormItem *parentItem; - if (parent.column() > 0) - return 0; - - if (!parent.isValid()) - parentItem = m_rootItem; - else - parentItem = static_cast(parent.internalPointer()); - - return parentItem->childCount(); - - } - - /******************************************************************************/ - - int CGeorgesFormModel::columnCount(const QModelIndex &parent) const { - - if (parent.isValid()) - return static_cast(parent.internalPointer())->columnCount(); - else - return m_rootItem->columnCount(); - - } - - /******************************************************************************/ - - void CGeorgesFormModel::loadFormData(UFormElm *root, CFormItem *parent) { - - if (!root) - return; - - uint num = 0; - - - if (root->isStruct()) - { - //((CFormElm*)root)->getForm()->getComment(); - uint structSize = 0; - root->getStructSize(structSize); - while (num < structSize) - { - UFormElm::TWhereIsNode *whereN = new UFormElm::TWhereIsNode; - UFormElm::TWhereIsValue *whereV = new UFormElm::TWhereIsValue; - // Append a new item to the current parent's list of children. - std::string elmName; - if(root->getStructNodeName(num, elmName)) - { - QList columnData; - //QVariant value; - std::string value; - //NLMISC::CRGBA value_color; - //uint value_uint; - //sint value_sint; - //double value_double; - QString elmtType; - UFormElm *elmt = 0; - if(root->getNodeByName(&elmt, elmName.c_str(), whereN, true)) - { - if (elmt) - { - if (elmt->isArray()) - elmtType = "Array"; - if (elmt->isStruct()) - elmtType = "Struct"; - if (elmt->isAtom()) - { - elmtType = "Atom"; - uint numDefinitions = 0; - const UType *type = elmt->getType(); - if (type) - { - numDefinitions = type->getNumDefinition(); - root->getValueByName(value, elmName.c_str(),UFormElm::Eval,whereV); - switch (type->getType()) - { - case UType::UnsignedInt: - { - uint v; - NLMISC::fromString(value, v); - value = NLMISC::toString(v); - elmtType.append("_uint");break; - } - case UType::SignedInt: - { - sint v; - NLMISC::fromString(value, v); - value = NLMISC::toString(v); - elmtType.append("_sint");break; - } - case UType::Double: - float v; - NLMISC::fromString(value, v); - value = NLMISC::toString(v); - elmtType.append("_double");break; - case UType::String: - elmtType.append("_string");break; - case UType::Color: - elmtType.append("_color");break; - default: - elmtType.append("_unknownType"); - } - } - else - { - elmtType.append("_noType"); - } - - if (numDefinitions) - { - std::string l, v; - QString tmpLabel, tmpValue; - for (uint i = 0; i < numDefinitions; i++) - { - type->getDefinition(i,l,v); - tmpLabel = l.c_str(); - tmpValue = v.c_str(); - if (type->getType() == UType::SignedInt) - { - if (QString("%1").arg(value.c_str()).toDouble() == tmpValue.toDouble()) { - value = l; - break; - } - } - if (type->getType() == UType::String) - { - if (QString(value.c_str()) == tmpValue) - { - value = l; - break; - } - } - } - } - } - if (elmt->isVirtualStruct()) - { - root->getValueByName(value, elmName.c_str(),UFormElm::Eval,whereV); - elmtType = "VirtualStruct"; - } - switch (*whereN) - { - case UFormElm::NodeForm: - elmtType.append("_fromForm"); break; - case UFormElm::NodeParentForm: - elmtType.append("_fromParentForm"); break; - case UFormElm::NodeDfn: - elmtType.append("_isDFN"); break; - case UFormElm::NodeType: - elmtType.append("_isType"); break; - default: - elmtType.append("_noNode"); - } - switch (*whereV) - { - case UFormElm::ValueForm: - elmtType.append("_formValue"); break; - case UFormElm::ValueParentForm: - elmtType.append("_parentValue"); break; - case UFormElm::ValueDefaultDfn: - elmtType.append("_dfnValue"); break; - case UFormElm::ValueDefaultType: - elmtType.append("_typeValue"); break; - default: - elmtType.append("_noValue"); - } - columnData << QString(elmName.c_str()) << QString(value.c_str()) << "";// << elmtType; - parent->appendChild(new CFormItem(elmt, columnData, parent, *whereV, *whereN)); - //if (parents.last()->childCount() > 0) { - // parents << parents.last()->child(parents.last()->childCount()-1); - //} - loadFormData(elmt, parent->child(parent->childCount()-1)); - } - else - { - // add Defaults - // TODO: spams warnings for non ATOM values but i dont get type of non existing nodes - bool success = root->getValueByName(value, elmName.c_str(),UFormElm::Eval,whereV); - switch (*whereN) - { - case UFormElm::NodeForm: - elmtType.append("_fromForm"); break; - case UFormElm::NodeParentForm: - elmtType.append("_fromParentForm"); break; - case UFormElm::NodeDfn: - elmtType.append("_isDFN"); break; - case UFormElm::NodeType: - elmtType.append("_isType"); break; - default: - elmtType.append("_noNode"); - } - switch (*whereV) - { - case UFormElm::ValueForm: - elmtType.append("_formValue"); break; - case UFormElm::ValueParentForm: - elmtType.append("_parentValue"); break; - case UFormElm::ValueDefaultDfn: - elmtType.append("_dfnValue"); break; - case UFormElm::ValueDefaultType: - elmtType.append("_typeValue"); break; - default: - elmtType.append("_noValue"); - } - - columnData << QString(elmName.c_str()) << QString(value.c_str()) << "";// << elmtType; - parent->appendChild(new CFormItem(elmt, columnData, parent, *whereV, *whereN)); - } - } - else - { - nlinfo("getNodeByName returned false"); - } - } - num++; - } - } - if (root->isArray()) - { - uint arraySize = 0; - root->getArraySize(arraySize); - while (num < arraySize) - { - std::string elmName; - if(root->getArrayNodeName(elmName, num)) - { - QList columnData; - std::string value; - QString elmtType; - - UFormElm *elmt = 0; - if(root->getArrayNode(&elmt,0) && elmt) - { - if (elmt->isArray()) - elmtType = "Array"; - if (elmt->isStruct()) { - elmtType = "Struct"; - } - if (elmt->isAtom()) - { - elmt->getValue(value); - elmtType = "Atom"; - } - if (elmt->isVirtualStruct()) - elmtType = "VirtualStruct"; - - elmtType.append("_arrayValue"); - columnData << QString(elmName.c_str()) << QString(value.c_str()) << "";// << elmtType; - parent->appendChild(new CFormItem(elmt, columnData, parent)); - loadFormData(elmt, parent->child(parent->childCount()-1)); - } - } - num++; - } - } - } - - /******************************************************************************/ - - void CGeorgesFormModel::loadFormHeader() - { - - if (m_parents.size()) - { - CFormItem *fi_pars = new CFormItem(m_rootElm, QList() << "parents" << "" << "", m_rootItem); - m_rootItem->appendChild(fi_pars); - - Q_FOREACH(QString str, m_parents) - { - fi_pars->appendChild(new CFormItem(m_rootElm, QList() << str << "" << "", fi_pars)); - } - } - - /*QStringList dfns = _dependencies["dfn"]; - QStringList typs = _dependencies["typ"]; - - _dependencies.remove("dfn"); - _dependencies.remove("typ"); - - CFormItem *fi_dep = new CFormItem(_rootElm, QList() << "dependencies", _rootItem); - _rootItem->appendChild(fi_dep); - - if (!dfns.isEmpty()) { - CFormItem *fi_dfn = new CFormItem(_rootElm, QList() << "dfn", fi_dep); - fi_dep->appendChild(fi_dfn); - foreach(QString str, dfns) { - fi_dfn->appendChild(new CFormItem(_rootElm, QList() << str, fi_dfn)); - } - } - if (!typs.isEmpty()) { - CFormItem *fi_typ = new CFormItem(_rootElm, QList() << "typ", fi_dep); - fi_dep->appendChild(fi_typ); - foreach(QString str, typs) { - fi_typ->appendChild(new CFormItem(_rootElm, QList() << str, fi_typ)); - } - } - if (!_dependencies.isEmpty()) { - CFormItem *fi_other = new CFormItem(_rootElm, QList() << "other", fi_dep); - fi_dep->appendChild(fi_other); - foreach(QStringList list, _dependencies) { - foreach(QString str, list) { - fi_other->appendChild(new CFormItem(_rootElm, QList() << str, fi_other)); - } - } - }*/ - } - - /******************************************************************************/ - - void CGeorgesFormModel::setupModelData() - { - loadFormHeader(); - loadFormData(m_rootElm, m_rootItem); - } - - /******************************************************************************/ - - void CGeorgesFormModel::setShowParents( bool show ) { - m_showParents = show; - Q_EMIT layoutAboutToBeChanged(); - Q_EMIT layoutChanged(); - } - void CGeorgesFormModel::setShowDefaults( bool show ) - { - m_showDefaults = show; - Q_EMIT layoutAboutToBeChanged(); - Q_EMIT layoutChanged(); - } - - void CGeorgesFormModel::addParentForm(QString parentForm) - { - beginResetModel(); - m_parents.push_back(parentForm); - delete m_rootItem; - m_rootItem = new CFormItem(m_rootElm, m_rootData); - setupModelData(); - endResetModel(); - } - - void CGeorgesFormModel::removeParentForm(QString parentForm) - { - beginResetModel(); - m_parents.removeOne(parentForm); - - delete m_rootItem; - m_rootItem = new CFormItem(m_rootElm, m_rootData); - setupModelData(); - endResetModel(); - } -} /* namespace GeorgesQt */ - -/* end of file */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp deleted file mode 100644 index 3fd7abb7b..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp +++ /dev/null @@ -1,174 +0,0 @@ -// Object Viewer Qt GUI Editor plugin -// 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 "nel3d_widget.h" -#include "nel/3d/u_driver.h" -#include "nel/3d/text_context.h" -#include "nel/3d/driver_user.h" -#include "nel/misc/rgba.h" -#include "nel/misc/path.h" -#include "nel/misc/event_listener.h" -#include "nel/gui/event_listener.h" - -#ifdef NL_OS_WINDOWS -#include -#endif - - - -namespace GUIEditor -{ - Nel3DWidget::Nel3DWidget( QWidget *parent ) : - QWidget( parent ) - { - driver = NULL; - textContext = NULL; - - // Need to set this attribute with a NULL paintengine returned to Qt - // so that we can render the widget normally ourselves, without the image - // disappearing when a widget is resized or shown on top of us - setAttribute( Qt::WA_PaintOnScreen, true ); - eventListener = NULL; - } - - Nel3DWidget::~Nel3DWidget() - { - if( driver != NULL ) - { - if( textContext != NULL ) - { - driver->deleteTextContext( textContext ); - textContext = NULL; - } - - driver->release(); - delete driver; - driver = NULL; - } - delete eventListener; - } - - void Nel3DWidget::init() - { - nlassert( driver == NULL ); - - driver = NL3D::UDriver::createDriver( 0, false, 0 ); - driver->setMatrixMode2D11(); - driver->setDisplay( winId(), NL3D::UDriver::CMode( width(), height(), 32, true ) ); - eventListener = new NLGUI::CEventListener(); - eventListener->addToServer( &driver->EventServer ); - } - - void Nel3DWidget::createTextContext( std::string fontFile ) - { - if( driver == NULL ) - return; - - std::string font; - - try - { - font = NLMISC::CPath::lookup( fontFile ); - } - catch( ... ) - { - nlinfo( "Font %s cannot be found, cannot create textcontext!", fontFile.c_str() ); - exit( EXIT_FAILURE ); - } - - if( textContext != NULL ) - { - driver->deleteTextContext( textContext ); - textContext = NULL; - } - - textContext = driver->createTextContext( font ); - } - - void Nel3DWidget::clear() - { - if( driver == NULL ) - return; - driver->clearBuffers( NLMISC::CRGBA::Black ); - driver->swapBuffers(); - } - - -#if defined ( NL_OS_WINDOWS ) - - typedef bool ( *winProc )( NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ); - - bool Nel3DWidget::winEvent( MSG *message, long *result ) - { - if( driver != NULL ) - { - NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); - if( iDriver != NULL ) - { - winProc proc = (winProc)iDriver->getWindowProc(); - return proc( iDriver, message->hwnd, message->message, message->wParam, message->lParam ); - } - } - - return false; - } - -#elif defined( NL_OS_MAC ) - - typedef bool ( *cocoaProc )( NL3D::IDriver *, const void *e ); - - bool Nel3DWidget::macEvent( EventHandlerCallRef caller, EventRef event ) - { - if( caller ) - nlerror( "You are using QtCarbon! Only QtCocoa supported, please upgrade Qt" ); - - if( driver != NULL ) - { - NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); - if( iDriver != NULL ) - { - cocoaProc proc = ( cocoaProc )iDriver->getWindowProc(); - return proc( iDriver, event ); - } - } - - return false; - } - -#elif defined( NL_OS_UNIX ) - - typedef bool ( *x11Proc )( NL3D::IDriver *drv, XEvent *e ); - - bool Nel3DWidget::x11Event( XEvent *event ) - { - if( driver != NULL ) - { - NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); - if( driver != NULL ) - { - x11Proc proc = ( x11Proc )iDriver->getWindowProc(); - return proc( iDriver, event ); - } - } - - return false; - } -#endif - -} - - diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.h deleted file mode 100644 index fb4321d49..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.h +++ /dev/null @@ -1,79 +0,0 @@ -// Object Viewer Qt GUI Editor plugin -// 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 NEL3D_WIDGET_H -#define NEL3D_WIDGET_H - -#include -#include "nel/misc/types_nl.h" -#include - -namespace NLGUI -{ - class CEventListener; -} - -namespace NL3D -{ - class UDriver; - class UTextContext; -} - -namespace GUIEditor -{ - /// Nel 3D interface to Qt - class Nel3DWidget : public QWidget - { - Q_OBJECT - public: - Nel3DWidget( QWidget *parent = NULL ); - virtual ~Nel3DWidget(); - - virtual void init(); - void createTextContext( std::string fontFile ); - - NL3D::UDriver* getDriver() const{ return driver; } - NL3D::UTextContext* getTextContext() const{ return textContext; } - - - // Need to return NULL paintengine to Qt so that we can - // render the widget normally ourselves, without the image - // disappearing when a widget is resized or shown on top of us - QPaintEngine* paintEngine() const{ return NULL; } - - public Q_SLOTS: - void clear(); - - protected: - -#if defined(NL_OS_WINDOWS) - virtual bool winEvent( MSG *message, long *result ); -#elif defined(NL_OS_MAC) - virtual bool macEvent( EventHandlerCallRef caller, EventRef event ); -#elif defined(NL_OS_UNIX) - virtual bool x11Event( XEvent *event ); -#endif - - private: - NL3D::UDriver *driver; - NL3D::UTextContext *textContext; - NLGUI::CEventListener *eventListener; - }; -} - -#endif - diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp deleted file mode 100644 index 82330bfaf..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.cpp +++ /dev/null @@ -1,173 +0,0 @@ -// Object Viewer Qt GUI Editor plugin -// 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 "property_browser_ctrl.h" -#include "../../3rdparty/qtpropertybrowser/QtVariantPropertyManager" -#include "../../3rdparty/qtpropertybrowser/QtTreePropertyBrowser" -#include "nel/gui/interface_group.h" -#include "nel/gui/widget_manager.h" -#include -#include "widget_info_tree.h" - -namespace GUIEditor -{ - CPropBrowserCtrl::CPropBrowserCtrl() - { - browser = NULL; - propertyMgr = new QtVariantPropertyManager; - } - - CPropBrowserCtrl::~CPropBrowserCtrl() - { - delete propertyMgr; - propertyMgr = NULL; - browser = NULL; - } - - void CPropBrowserCtrl::setBrowser( QtTreePropertyBrowser *b ) - { - browser = b; - } - - void CPropBrowserCtrl::setupWidgetInfo( CWidgetInfoTree *tree ) - { - widgetInfo.clear(); - - std::vector< std::string > names; - tree->getNames( names ); - - std::vector< std::string >::const_iterator itr; - for( itr = names.begin(); itr != names.end(); ++itr ) - { - CWidgetInfoTreeNode *node = tree->findNodeByName( *itr ); - const SWidgetInfo &w = node->getInfo(); - widgetInfo[ w.GUIName ] = w; - } - } - - void CPropBrowserCtrl::clear() - { - browser->clear(); - disconnect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), - this, SLOT( onPropertyChanged( QtProperty* ) ) ); - } - - void CPropBrowserCtrl::onSelectionChanged( std::string &id ) - { - if( browser == NULL ) - return; - - disconnect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), - this, SLOT( onPropertyChanged( QtProperty* ) ) ); - - browser->clear(); - - CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( id ); - if( e == NULL ) - { - connect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), - this, SLOT( onPropertyChanged( QtProperty* ) ) ); - - return; - } - - currentElement = id; - - std::string n = e->getClassName(); - - setupProperties( n, e ); - connect( propertyMgr, SIGNAL( propertyChanged( QtProperty* ) ), - this, SLOT( onPropertyChanged( QtProperty* ) ) ); - } - - void CPropBrowserCtrl::onPropertyChanged( QtProperty *prop ) - { - QString propName = prop->propertyName(); - QString propValue = prop->valueText(); - - // for some reason booleans cannot be extracted from a QtProperty :( - if( propValue.isEmpty() ) - { - QtVariantProperty *p = propertyMgr->variantProperty( prop ); - if( p != NULL ) - propValue = p->value().toString(); - } - - CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); - if( e == NULL ) - return; - e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() ); - - - // Make sure the changes are applied - bool active = e->getActive(); - e->setActive( !active ); - e->setActive( active ); - } - - void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element ) - { - std::map< std::string, SWidgetInfo >::iterator itr = widgetInfo.find( type ); - if( itr == widgetInfo.end() ) - return; - SWidgetInfo &w = itr->second; - - std::vector< SPropEntry >::const_iterator pItr; - for( pItr = w.props.begin(); pItr != w.props.end(); ++pItr ) - { - const SPropEntry &prop = *pItr; - setupProperty( prop, element ); - } - - QtVariantEditorFactory *factory = new QtVariantEditorFactory; - browser->setFactoryForManager( propertyMgr, factory ); - } - - void CPropBrowserCtrl::setupProperty( const SPropEntry &prop, const CInterfaceElement *element ) - { - QtVariantProperty *p = NULL; - QVariant v; - - if( prop.propType == "string" ) - { - p = propertyMgr->addProperty( QVariant::String, prop.propName.c_str() ); - v = element->getProperty( prop.propName ).c_str(); - } - else - if( prop.propType == "bool" ) - { - p = propertyMgr->addProperty( QVariant::Bool, prop.propName.c_str() ); - bool value = false; - NLMISC::fromString( element->getProperty( prop.propName ), value ); - v = value; - } - else - if( prop.propType == "int" ) - { - p = propertyMgr->addProperty( QVariant::Int, prop.propName.c_str() ); - sint32 value = 0; - NLMISC::fromString( element->getProperty( prop.propName ), value ); - v = value; - } - - if( p == NULL ) - return; - - p->setValue( v ); - browser->addProperty( p ); - } -} diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_viewport.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_viewport.cpp deleted file mode 100644 index d8e36e785..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_viewport.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - 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 . - -*/ - -#include "stdpch.h" -#include "graphics_viewport.h" - -// STL includes - -// Qt includes -#include -#include -#include -#include - -// NeL includes -#include - -#include -#include - -#include -#include - -// Project includes -#include "modules.h" - -using namespace std; -using namespace NL3D; - -namespace NLQT -{ - -CGraphicsViewport::CGraphicsViewport(QWidget *parent) - : QNLWidget(parent) -{ - setAttribute(Qt::WA_OpaquePaintEvent); - setAttribute(Qt::WA_NoSystemBackground); - setAttribute(Qt::WA_PaintOnScreen); -} - -CGraphicsViewport::~CGraphicsViewport() -{ - -} - -void CGraphicsViewport::init() -{ - //H_AUTO2 - nldebug("CGraphicsViewport::init"); - -#if defined(NL_OS_UNIX) && !defined(NL_OS_MAC) - makeCurrent(); -#endif // defined(NL_OS_UNIX) && !defined(NL_OS_MAC) - - Modules::objView().init((nlWindow)winId(), width(), height()); - Modules::psEdit().init(); - Modules::veget().init(); - - setMouseTracking(true); - setFocusPolicy(Qt::StrongFocus); -} - -void CGraphicsViewport::release() -{ - //H_AUTO2 - nldebug("CGraphicsViewport::release"); - - Modules::veget().release(); - Modules::psEdit().release(); - Modules::objView().release(); -} - - -QAction *CGraphicsViewport::createSaveScreenshotAction(QObject *parent) -{ - QAction *action = new QAction(parent); - connect(action, SIGNAL(triggered()), this, SLOT(saveScreenshot())); - return action; -} - -QAction *CGraphicsViewport::createSetBackgroundColor(QObject *parent) -{ - QAction *action = new QAction(parent); - connect(action, SIGNAL(triggered()), this, SLOT(setBackgroundColor())); - return action; -} - -void CGraphicsViewport::saveScreenshot() -{ - Modules::objView().saveScreenshot("screenshot", false, true, false); -} - -void CGraphicsViewport::setBackgroundColor() -{ - QColor color = QColorDialog::getColor(QColor(Modules::objView().getBackgroundColor().R, - Modules::objView().getBackgroundColor().G, - Modules::objView().getBackgroundColor().B)); - if (color.isValid()) - Modules::objView().setBackgroundColor(NLMISC::CRGBA(color.red(), color.green(), color.blue())); -} - -void CGraphicsViewport::resizeEvent(QResizeEvent *resizeEvent) -{ - QWidget::resizeEvent(resizeEvent); - if (Modules::objView().getDriver()) - Modules::objView().setSizeViewport(resizeEvent->size().width(), resizeEvent->size().height()); -} - -#if defined(NL_OS_WINDOWS) - -typedef bool (*winProc)(NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - -bool CGraphicsViewport::winEvent(MSG *message, long *result) -{ - if (Modules::objView().getDriver() && Modules::objView().getDriver()->isActive()) - { - NL3D::IDriver *driver = dynamic_cast(Modules::objView().getDriver())->getDriver(); - if (driver) - { - winProc proc = (winProc)driver->getWindowProc(); - - // TODO: shouldn't it return false like the others? - // see macEvent() and x11Event() below - return proc(driver, message->hwnd, message->message, message->wParam, message->lParam); - } - } - - return false; -} - -#elif defined(NL_OS_MAC) - -typedef bool (*cocoaProc)(NL3D::IDriver *, const void *e); - -bool CGraphicsViewport::macEvent(EventHandlerCallRef caller, EventRef event) -{ - if(caller) - nlerror("You are using QtCarbon! Only QtCocoa supported, please upgrade Qt"); - - if (Modules::objView().getDriver() && Modules::objView().getDriver()->isActive()) - { - NL3D::IDriver *driver = dynamic_cast(Modules::objView().getDriver())->getDriver(); - if (driver) - { - cocoaProc proc = (cocoaProc)driver->getWindowProc(); - proc(driver, event); - } - } - - // return false to let Qt handle the event as well, - // else the widget would never get focus - return false; -} - -#elif defined(NL_OS_UNIX) - -typedef bool (*x11Proc)(NL3D::IDriver *drv, XEvent *e); - -bool CGraphicsViewport::x11Event(XEvent *event) -{ - if (Modules::objView().getDriver() && Modules::objView().getDriver()->isActive()) - { - NL3D::IDriver *driver = dynamic_cast(Modules::objView().getDriver())->getDriver(); - if (driver) - { - x11Proc proc = (x11Proc)driver->getWindowProc(); - proc(driver, event); - } - } - - // return false to let Qt handle the event as well, - // else the widget would never get focus - // TODO: test me please, i have no linux at hand (rti) - return false; -} -#endif - -} /* namespace NLQT */ - diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt deleted file mode 100644 index 34f237757..000000000 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${LIBXML2_INCLUDE_DIR} - ${QT_INCLUDES}) - -FILE(GLOB SRC *.cpp *.h) -SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) - -SET(OVQT_PLUG_SHEET_BUILDER_HDR sheetbuilderconfgdialog.h sheetbuilderdialog.h ovqt_sheet_builder.h) - -SET(QT_USE_QTGUI TRUE) -SET(QT_USE_QTOPENGL TRUE) - -QT4_WRAP_CPP(OVQT_PLUG_SHEET_BUILDER_MOC_SRC ${OVQT_PLUG_SHEET_BUILDER_HDR}) - -SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC}) -SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC}) -SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) - -ADD_LIBRARY(ovqt_plugin_sheet_builder MODULE ${SRC} ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC} ${OVQT_EXT_SYS_SRC}) - -TARGET_LINK_LIBRARIES(ovqt_plugin_sheet_builder ovqt_plugin_core nelmisc ${QT_LIBRARIES}) - -NL_DEFAULT_PROPS(ovqt_plugin_sheet_builder "NeL, Tools, 3D: Object Viewer Qt Plugin: Sheet builder") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_sheet_builder) -NL_ADD_LIB_SUFFIX(ovqt_plugin_sheet_builder) - -ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) - - -IF(WIN32) - IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) - ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) - ENDIF(WITH_INSTALL_LIBRARIES) -ELSE(WIN32) - IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) - ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) - ENDIF(WITH_INSTALL_LIBRARIES) -ENDIF(WIN32) - -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_sheet_builder.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) - diff --git a/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp b/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp index 7d958d81c..b109c2db2 100644 --- a/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp +++ b/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp @@ -607,11 +607,15 @@ static void computeIGBBox(const NL3D::CInstanceGroup &ig, CLightingBBox &result, std::string toLoad = it->Name; if (getExt(toLoad).empty()) toLoad += ".shape"; shapePathName = NLMISC::CPath::lookup(toLoad, false, false); - + if (shapePathName.empty()) { nlwarning("Unable to find shape '%s'", it->Name.c_str()); } + else if (toLower (CFile::getExtension (shapePathName)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", shapePathName.c_str()); + } else { CIFile shapeInputFile; diff --git a/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp b/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp index 0010d5179..a6636730f 100644 --- a/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp +++ b/code/nel/tools/3d/zone_ig_lighter/zone_ig_lighter.cpp @@ -410,6 +410,12 @@ int main(int argc, char* argv[]) if(group->getInstance(instance).DontCastShadow || group->getInstance(instance).DontCastShadowForExterior) continue; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // Add a .shape at the end ? if (!name.empty()) { diff --git a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp index 9b6df0900..b3c6807c1 100644 --- a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp +++ b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp @@ -202,7 +202,7 @@ static void loadIGFromContinent(NLMISC::CConfigFile ¶meter, std::listgetInstance(instance).DontCastShadow || group->getInstance(instance).DontCastShadowForExterior) continue; + if (toLower (CFile::getExtension (name)) == "pacs_prim") + { + nlwarning("EXPORT BUG: Can't read %s (not a shape), should not be part of .ig!", name.c_str()); + continue; + } + // PS ? if (toLower (CFile::getExtension (name)) == "ps") continue; diff --git a/code/nel/tools/CMakeLists.txt b/code/nel/tools/CMakeLists.txt index abc5dff02..2c1f641a0 100644 --- a/code/nel/tools/CMakeLists.txt +++ b/code/nel/tools/CMakeLists.txt @@ -6,9 +6,7 @@ IF(WITH_NEL_TOOLS) ENDIF(WITH_NEL_TOOLS) # Max plugins are under the 3d directory as well. -IF(WITH_3D) - ADD_SUBDIRECTORY(3d) -ENDIF(WITH_3D) +ADD_SUBDIRECTORY(3d) # Don't add other subdirectories if only max plugins are selected. IF(WITH_NEL_TOOLS) diff --git a/code/nel/tools/build_gamedata/all_install_dev.bat b/code/nel/tools/build_gamedata/all_install_dev.bat new file mode 100644 index 000000000..6791bbea0 --- /dev/null +++ b/code/nel/tools/build_gamedata/all_install_dev.bat @@ -0,0 +1,9 @@ +title Ryzom Core: 3_install.py +3_install.py +title Ryzom Core: a1_worldedit_data.py +a1_worldedit_data.py +title Ryzom Core: b1_client_dev.py +b1_client_dev.py +title Ryzom Core: b2_shard_data.py +b2_shard_data.py +title Ryzom Core: Ready diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms index 29744c7d1..68c8455d6 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/clod.ms @@ -56,6 +56,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms index 2a7492c29..40feab761 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/cmb.ms @@ -36,6 +36,7 @@ fn runNelMaxExport inputMaxFile = -- Select all collision mesh max select none + clearSelection() for m in geometry do ( if (isToBeExported m) == true then diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms index 7c9563088..df0ecf7fc 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/ig.ms @@ -61,6 +61,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 @@ -109,6 +110,7 @@ fn runNelMaxExport inputMaxFile = ( -- Select none max select none + clearSelection() -- Select all node in this ig for node in geometry do diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms index 93e94de19..ea730c0b4 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms @@ -10,6 +10,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Select all PACS primitives for i in geometry do diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms index c1f4761ff..d8d6c8d9d 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/shape.ms @@ -199,6 +199,7 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms index f0d5cd584..22c49013a 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/veget.ms @@ -46,6 +46,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms index d4ecbe275..338d48733 100755 --- a/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms +++ b/code/nel/tools/build_gamedata/generators/max_exporter_scripts/zone.ms @@ -40,6 +40,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Found it ? find = false diff --git a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms index f01a973e4..a8693dc8a 100755 --- a/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms +++ b/code/nel/tools/build_gamedata/processes/clodbank/maxscript/clod_export.ms @@ -122,6 +122,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms index 526d06dc8..65cb38c4a 100755 --- a/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms +++ b/code/nel/tools/build_gamedata/processes/ig/maxscript/ig_export.ms @@ -127,6 +127,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 @@ -175,6 +176,7 @@ fn runNelMaxExport inputMaxFile = ( -- Select none max select none + clearSelection() -- Select all node in this ig for node in geometry do diff --git a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms index 4b25c1427..933468459 100755 --- a/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms +++ b/code/nel/tools/build_gamedata/processes/ligo/maxscript/nel_ligo_export.ms @@ -228,6 +228,7 @@ fn exportCollisionsFromZone outputNelDir filename = ( -- Select all collision mesh max select none + clearSelection() for m in geometry do ( if (isToBeExportedCollision m) == true then @@ -311,6 +312,7 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi -- unselect max select none + clearSelection() -- Exported object count exported = 0 @@ -372,6 +374,7 @@ fn exportInstanceGroupFromZone inputFile outputPath igName transitionZone cellSi ( -- Select none max select none + clearSelection() for node in objects where classOf node == XRefObject do ( diff --git a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms index ddfc0014a..750af80d9 100755 --- a/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms +++ b/code/nel/tools/build_gamedata/processes/pacs_prim/maxscript/pacs_prim_export.ms @@ -76,6 +76,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Select all PACS primitives for i in geometry do diff --git a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms index 74cf3a8dd..59b444db3 100755 --- a/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms +++ b/code/nel/tools/build_gamedata/processes/rbank/maxscript/cmb_export.ms @@ -102,6 +102,7 @@ fn runNelMaxExport inputMaxFile = -- Select all collision mesh max select none + clearSelection() for m in geometry do ( if (isToBeExported m) == true then diff --git a/code/nel/tools/build_gamedata/processes/shape/0_setup.py b/code/nel/tools/build_gamedata/processes/shape/0_setup.py index 71dfd097e..941d07531 100755 --- a/code/nel/tools/build_gamedata/processes/shape/0_setup.py +++ b/code/nel/tools/build_gamedata/processes/shape/0_setup.py @@ -69,6 +69,7 @@ if BuildShadowSkinEnabled: printLog(log, ">>> Setup build directories <<<") mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) +mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory) mkPath(log, ExportBuildDirectory + "/" + ShapeLightmap16BitsBuildDirectory) diff --git a/code/nel/tools/build_gamedata/processes/shape/2_build.py b/code/nel/tools/build_gamedata/processes/shape/2_build.py index 48a658378..1a9f668f8 100755 --- a/code/nel/tools/build_gamedata/processes/shape/2_build.py +++ b/code/nel/tools/build_gamedata/processes/shape/2_build.py @@ -77,16 +77,19 @@ else: # copy lightmap_not_optimized to lightmap printLog(log, ">>> Optimize lightmaps <<<") loPathLightmapsOriginal = ExportBuildDirectory + "/" + ShapeLightmapNotOptimizedExportDirectory +loPathShapesOriginal = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory mkPath(log, loPathLightmapsOriginal) loPathLightmaps = ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory -loPathShapes = ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory +loPathShapes = ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory loPathTags = ExportBuildDirectory + "/" + ShapeTagExportDirectory mkPath(log, loPathLightmaps) mkPath(log, loPathShapes) mkPath(log, loPathTags) -if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): +if needUpdateDirByTagLog(log, loPathLightmapsOriginal, ".txt", loPathLightmaps, ".txt") or needUpdateDirNoSubdir(log, loPathLightmapsOriginal, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathShapesOriginal, loPathShapes) or needUpdateDirNoSubdir(log, loPathShapes, loPathLightmaps) or needUpdateDirNoSubdir(log, loPathTags, loPathLightmaps): removeFilesRecursive(log, loPathLightmaps) copyFiles(log, loPathLightmapsOriginal, loPathLightmaps) + removeFilesRecursive(log, loPathShapes) + copyFiles(log, loPathShapesOriginal, loPathShapes) # Optimize lightmaps if any. Additionnaly, output a file indicating which lightmaps are 8 bits # lightmap_optimizer [path_tags] [path_flag8bit] subprocess.call([ LightmapOptimizer, loPathLightmaps, loPathShapes, loPathTags, ExportBuildDirectory + "/" + ShapeLightmapBuildDirectory + "/list_lm_8bit.txt" ]) diff --git a/code/nel/tools/build_gamedata/processes/shape/3_install.py b/code/nel/tools/build_gamedata/processes/shape/3_install.py index cb93a443b..f6265a1a6 100755 --- a/code/nel/tools/build_gamedata/processes/shape/3_install.py +++ b/code/nel/tools/build_gamedata/processes/shape/3_install.py @@ -46,8 +46,8 @@ printLog(log, "") printLog(log, ">>> Install shape <<<") installPath = InstallDirectory + "/" + ShapeInstallDirectory mkPath(log, installPath) -mkPath(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory) -copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeClodtexBuildDirectory, installPath, ".shape") +mkPath(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory) +copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeOptimizedBuildDirectory, installPath, ".shape") mkPath(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory) copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".shape") copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + ShapeWithCoarseMeshBuildDirectory, installPath, ".dds") diff --git a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms index e979f6b0d..16c6dcec9 100755 --- a/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms +++ b/code/nel/tools/build_gamedata/processes/shape/maxscript/shape_export.ms @@ -265,6 +265,7 @@ fn runNelMaxExportSub inputMaxFile retryCount = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms index 828a78d42..cbc2f2177 100755 --- a/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms +++ b/code/nel/tools/build_gamedata/processes/veget/maxscript/veget_export.ms @@ -112,6 +112,7 @@ fn runNelMaxExport inputMaxFile = -- unselect max select none + clearSelection() -- Exported object count exported = 0 diff --git a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms index 71f63e45b..3a0ebf8fe 100755 --- a/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms +++ b/code/nel/tools/build_gamedata/processes/zone/maxscript/zone_export.ms @@ -103,6 +103,7 @@ fn runNelMaxExport inputMaxFile = -- Select none max select none + clearSelection() -- Found it ? find = false diff --git a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py index cede7d658..615a4dffa 100755 --- a/code/nel/tools/build_gamedata/processes/zone_light/1_export.py +++ b/code/nel/tools/build_gamedata/processes/zone_light/1_export.py @@ -55,6 +55,7 @@ for dir in WaterMapSourceDirectories: destDir = DatabaseDirectory + "/" + dir mkPath(log, destDir) copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".tga") + copyFilesExtNoTreeIfNeeded(log, srcDir, destDir, ".png") printLog(log, "") log.close() diff --git a/code/nel/tools/pacs/CMakeLists.txt b/code/nel/tools/pacs/CMakeLists.txt index 405476ed6..c3a5a71f6 100644 --- a/code/nel/tools/pacs/CMakeLists.txt +++ b/code/nel/tools/pacs/CMakeLists.txt @@ -1 +1,9 @@ -SUBDIRS(build_ig_boxes build_indoor_rbank build_rbank) +IF(WITH_3D) + ADD_SUBDIRECTORY(build_ig_boxes) + + IF(WITH_LIGO) + ADD_SUBDIRECTORY(build_rbank) + ENDIF() +ENDIF() + +ADD_SUBDIRECTORY(build_indoor_rbank) diff --git a/code/ryzom/tools/server/ryzom_ams/www/config.php b/code/ryzom/tools/server/ryzom_ams/www/config.php new file mode 100644 index 000000000..7ade3efb6 --- /dev/null +++ b/code/ryzom/tools/server/ryzom_ams/www/config.php @@ -0,0 +1,118 @@ + plugins() const = 0; + virtual bool loadPlugin( const QString &plugin ) = 0; + virtual bool unloadPlugin( ExtensionSystem::IPluginSpec *plugin ) = 0; + // Settings virtual void setSettings(QSettings *settings) = 0; virtual QSettings *settings() const = 0; @@ -133,6 +136,16 @@ Q_SIGNALS: /// Signal that the list of available plugins has changed. void pluginsChanged(); + + void pluginCount( int count ); + + void pluginLoading( const char *plugin ); + void pluginInitializing( const char *plugin ); + void pluginStarting( const char *plugin ); + + void pluginsLoaded(); + void pluginsInitialized(); + void pluginsStarted(); }; }; // namespace ExtensionSystem diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/iplugin_spec.h b/code/studio/src/extension_system/iplugin_spec.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/extension_system/iplugin_spec.h rename to code/studio/src/extension_system/iplugin_spec.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp b/code/studio/src/extension_system/plugin_manager.cpp similarity index 70% rename from code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp rename to code/studio/src/extension_system/plugin_manager.cpp index 9b9da508b..37cd85237 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp +++ b/code/studio/src/extension_system/plugin_manager.cpp @@ -92,21 +92,144 @@ void PluginManager::loadPlugins() setPluginState(spec, State::Resolved); QList queue = loadQueue(); + Q_EMIT pluginCount( queue.count() ); Q_FOREACH (PluginSpec *spec, queue) setPluginState(spec, State::Loaded); + + Q_EMIT pluginsLoaded(); Q_FOREACH (PluginSpec *spec, queue) setPluginState(spec, State::Initialized); + + Q_EMIT pluginsInitialized(); QListIterator it(queue); it.toBack(); while (it.hasPrevious()) setPluginState(it.previous(), State::Running); + + Q_EMIT pluginsStarted(); Q_EMIT pluginsChanged(); } +bool PluginManager::loadPluginSpec( const QString &plugin ) +{ + nlinfo( "Loading plugin spec %s", plugin.toUtf8().data() ); + + PluginSpec *spec = new PluginSpec; + spec->m_pluginManager = this; + if( !spec->setSpecFileName( plugin ) ) + { + nlinfo( "Error loading plugin spec %s", plugin.toUtf8().data() ); + return false; + } + + m_pluginSpecs.append( spec ); + m_ipluginSpecs.append( spec ); + + return true; +} + +bool PluginManager::loadPlugin( const QString &plugin ) +{ + if( !loadPluginSpec( plugin ) ) + return false; + + ExtensionSystem::PluginSpec *spec = m_pluginSpecs.last(); + + if( !spec->resolveDependencies( m_pluginSpecs ) ) + { + nlinfo( "Error resolving dependencies for plugin spec %s", plugin.toUtf8().data() ); + return false; + } + + if( !spec->loadLibrary() ) + { + nlinfo( "Error loading plugin %s", spec->fileName().toUtf8().data() ); + return false; + } + + if( !spec->initializePlugin() ) + { + nlinfo( "Error initializing plugin %s", spec->fileName().toUtf8().data() ); + spec->kill(); + return false; + } + + if( !spec->initializeExtensions() ) + { + nlinfo( "Error starting plugin %s", spec->fileName().toUtf8().data() ); + spec->stop(); + spec->kill(); + return false; + } + + nlinfo( "Loaded plugin %s ( %s )", spec->name().data(), spec->fileName().toUtf8().data() ); + + Q_EMIT pluginsChanged(); + + return true; +} + +bool PluginManager::unloadPlugin( ExtensionSystem::IPluginSpec *plugin ) +{ + ExtensionSystem::PluginSpec *spec = static_cast< ExtensionSystem::PluginSpec* >( plugin ); + + // Let's see if anything depends on this one + QListIterator< ExtensionSystem::PluginSpec* > itr( m_pluginSpecs ); + while( itr.hasNext() ) + { + ExtensionSystem::PluginSpec *sp = itr.next(); + QList< ExtensionSystem::PluginSpec* > l = sp->dependencySpecs(); + if( l.contains( spec ) ) + return false; + } + + // Stop, delete then remove plugin + spec->stop(); + spec->kill(); + removePlugin( plugin ); + + return true; +} + +void PluginManager::removePlugin( ExtensionSystem::IPluginSpec *plugin ) +{ + QList< ExtensionSystem::IPluginSpec* >::iterator itr1; + QList< ExtensionSystem::PluginSpec* >::iterator itr2; + + QList< ExtensionSystem::IPluginSpec* >::iterator i1 = m_ipluginSpecs.begin(); + while( i1 != m_ipluginSpecs.end() ) + { + if( *i1 == plugin ) + { + itr1 = i1; + break; + } + i1++; + } + + QList< ExtensionSystem::PluginSpec* >::iterator i2 = m_pluginSpecs.begin(); + while( i2 != m_pluginSpecs.end() ) + { + if( *i2 == static_cast< ExtensionSystem::PluginSpec* >( plugin ) ) + { + itr2 = i2; + break; + } + i2++; + } + + m_ipluginSpecs.erase( itr1 ); + m_pluginSpecs.erase( itr2 ); + delete plugin; + + Q_EMIT pluginsChanged(); + +} + QStringList PluginManager::getPluginPaths() const { return m_pluginPaths; @@ -183,7 +306,7 @@ void PluginManager::readPluginPaths() while (!searchPaths.isEmpty()) { const QDir dir(searchPaths.takeFirst()); - const QFileInfoList files = dir.entryInfoList(QStringList() << QString("ovqt_plugin_*.%1").arg(m_extension), QDir::Files); + const QFileInfoList files = dir.entryInfoList(QStringList() << QString("studio_plugin_*.%1").arg(m_extension), QDir::Files); Q_FOREACH (const QFileInfo &file, files) pluginsList << file.absoluteFilePath(); const QFileInfoList dirs = dir.entryInfoList(QDir::Dirs|QDir::NoDotAndDotDot); @@ -193,11 +316,7 @@ void PluginManager::readPluginPaths() Q_FOREACH (const QString &pluginFile, pluginsList) { - PluginSpec *spec = new PluginSpec; - spec->m_pluginManager = this; - spec->setSpecFileName(pluginFile); - m_pluginSpecs.append(spec); - m_ipluginSpecs.append(spec); + loadPluginSpec( pluginFile.toUtf8().data() ); } Q_EMIT pluginsChanged(); @@ -218,6 +337,7 @@ void PluginManager::setPluginState(PluginSpec *spec, int destState) spec->resolveDependencies(m_pluginSpecs); return; case State::Running: + Q_EMIT pluginStarting( spec->name().toUtf8().data() ); spec->initializeExtensions(); return; case State::Deleted: @@ -239,9 +359,11 @@ void PluginManager::setPluginState(PluginSpec *spec, int destState) switch (destState) { case State::Loaded: + Q_EMIT pluginLoading( spec->name().toUtf8().data() ); spec->loadLibrary(); return; case State::Initialized: + Q_EMIT pluginInitializing( spec->name().toUtf8().data() ); spec->initializePlugin(); break; case State::Stopped: diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.h b/code/studio/src/extension_system/plugin_manager.h similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.h rename to code/studio/src/extension_system/plugin_manager.h index 9ab1ae135..ca31e1552 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.h +++ b/code/studio/src/extension_system/plugin_manager.h @@ -51,6 +51,10 @@ public: virtual QList plugins() const; QList loadQueue(); + bool loadPlugin( const QString &plugin ); + bool unloadPlugin( ExtensionSystem::IPluginSpec *plugin ); + + // Settings virtual void setSettings(QSettings *settings); virtual QSettings *settings() const; @@ -58,6 +62,8 @@ public: void writeSettings(); private: + bool loadPluginSpec( const QString &plugin ); + void removePlugin( ExtensionSystem::IPluginSpec *plugin ); void setPluginState(PluginSpec *spec, int destState); void readPluginPaths(); bool loadQueue(PluginSpec *spec, QList &queue, QList &circularityCheckQueue); diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_spec.cpp b/code/studio/src/extension_system/plugin_spec.cpp similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_spec.cpp rename to code/studio/src/extension_system/plugin_spec.cpp index 89f8046bb..97a08ea64 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_spec.cpp +++ b/code/studio/src/extension_system/plugin_spec.cpp @@ -84,6 +84,13 @@ PluginSpec::PluginSpec() #else # error "You must define the lib suffix for your platform" #endif + loader = NULL; +} + +PluginSpec::~PluginSpec() +{ + delete loader; + loader = NULL; } QString PluginSpec::name() const @@ -292,6 +299,8 @@ bool PluginSpec::isEnabled() const bool PluginSpec::loadLibrary() { + nlassert( loader == NULL ); + if (m_hasError) return false; if (m_state != State::Resolved) @@ -301,14 +310,16 @@ bool PluginSpec::loadLibrary() return reportError(QCoreApplication::translate("PluginSpec", "Loading the library failed because state != Resolved")); } - QPluginLoader loader(m_filePath); - if (!loader.load()) - return reportError(loader.errorString()); + loader = new QPluginLoader( m_filePath ); + if (!loader->load()) + return reportError(loader->errorString()); - IPlugin *pluginObject = qobject_cast(loader.instance()); + IPlugin *pluginObject = qobject_cast(loader->instance()); if (!pluginObject) { - loader.unload(); + loader->unload(); + delete loader; + loader = NULL; return reportError(QCoreApplication::translate("PluginSpec", "Plugin is not valid (does not derive from IPlugin)")); } @@ -412,8 +423,17 @@ void PluginSpec::kill() { if (!m_plugin) return; - delete m_plugin; - m_plugin = 0; + + bool b = loader->unload(); + if( !b ) + { + nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toAscii().data() ); + } + + //delete m_plugin; + m_plugin = NULL; + delete loader; + loader = NULL; m_state = State::Deleted; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_spec.h b/code/studio/src/extension_system/plugin_spec.h similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_spec.h rename to code/studio/src/extension_system/plugin_spec.h index 0ce74d004..d2abe1ef8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_spec.h +++ b/code/studio/src/extension_system/plugin_spec.h @@ -25,12 +25,15 @@ #include #include +class QPluginLoader; + namespace ExtensionSystem { class PluginSpec: public IPluginSpec { public: + ~PluginSpec(); virtual QString name() const; virtual QString version() const; virtual QString vendor() const; @@ -54,7 +57,7 @@ public: private: PluginSpec(); - + bool setFileName(const QString &fileName); bool setSpecFileName(const QString &specFileName); bool readSpec(); @@ -96,6 +99,8 @@ private: IPluginManager *m_pluginManager; QList m_dependencySpecs; + QPluginLoader *loader; + friend class PluginManager; }; diff --git a/code/studio/src/images/studio_splash.png b/code/studio/src/images/studio_splash.png new file mode 100644 index 000000000..06f0504b9 Binary files /dev/null and b/code/studio/src/images/studio_splash.png differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/main.cpp b/code/studio/src/main.cpp similarity index 86% rename from code/nel/tools/3d/object_viewer_qt/src/main.cpp rename to code/studio/src/main.cpp index d0407ccfd..e758037c0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/main.cpp +++ b/code/studio/src/main.cpp @@ -37,15 +37,19 @@ #include #include #include -#include +//#include #include #include +#include "settings_dialog.h" +#include "splash_screen.h" +#include "pm_watcher.h" + #ifdef HAVE_OVQT_CONFIG_H #include "ovqt_config.h" #endif -static const char *appNameC = "ObjectViewerQt"; +static const char *appNameC = "RyzomCoreStudio"; // nel_qt log file name #define NLQT_LOG_FILE "nel_qt.log" @@ -104,6 +108,7 @@ static inline QString msgCoreLoadFailure(const QString &why) return QCoreApplication::translate("Application", "Failed to load Core plugin: %1").arg(why); } + #ifdef NL_OS_WINDOWS int __stdcall WinMain(void *hInstance, void *hPrevInstance, void *lpCmdLine, int nShowCmd) #else // NL_OS_WINDOWS @@ -138,14 +143,29 @@ int main(int argc, char **argv) #else // NL_OS_WINDOWS QApplication app(argc, argv); #endif // NL_OS_WINDOWS - QSplashScreen *splash = new QSplashScreen(); - splash->setPixmap(QPixmap(":/images/nel_ide_load.png")); + + SplashScreen *splash = new SplashScreen(); + splash->setPixmap(QPixmap(":/images/studio_splash.png")); + splash->setProgressBarEnabled( true ); + splash->setText( "Starting up..." ); + splash->setProgress( 0 ); splash->show(); QSettings::setDefaultFormat(QSettings::IniFormat); QSettings *settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, QLatin1String("RyzomCore"), QLatin1String(appNameC)); + bool firstRun = settings->value( "FirstRun", true ).toBool(); + if( firstRun ) + { + settings->setValue( "FirstRun", false ); + + SettingsDialog sd; + sd.setSettings( settings ); + sd.load(); + sd.exec(); + } + QTranslator translator; QTranslator qtTranslator; QString locale = settings->value("Language", QLocale::system().name()).toString(); @@ -155,6 +175,9 @@ int main(int argc, char **argv) app.installTranslator(&translator); app.installTranslator(&qtTranslator); + splash->setText( "Loading plugins..." ); + splash->setProgress( 20 ); + #if defined(NL_OS_MAC) QDir::setCurrent(qApp->applicationDirPath() + QString("/../Resources")); NLMISC::CLibrary::addLibPath((qApp->applicationDirPath() + QString("/../PlugIns/nel")).toUtf8().constData()); @@ -164,14 +187,21 @@ int main(int argc, char **argv) pluginManager.setSettings(settings); QStringList pluginPaths; #if defined(NL_OS_MAC) - pluginPaths << settings->value("PluginPath", qApp->applicationDirPath() + QString("/../PlugIns/ovqt")).toString(); + pluginPaths << settings->value("PluginPath", qApp->applicationDirPath() + QString("/../PlugIns/studio")).toString(); #else pluginPaths << settings->value("PluginPath", QString("%1/plugins").arg(DATA_DIR)).toString(); #endif pluginManager.setPluginPaths(pluginPaths); + + PluginManagerWatcher watcher; + watcher.setPluginManager( &pluginManager ); + watcher.setSplashScreen( splash ); + watcher.connect(); + pluginManager.loadPlugins(); + watcher.disconnect(); splash->hide(); ExtensionSystem::IPluginSpec *corePlugin = pluginManager.pluginByName("Core"); @@ -180,7 +210,7 @@ int main(int argc, char **argv) { QDir absolutePluginPaths(pluginPaths.join(QLatin1String(","))); QString absolutePaths = absolutePluginPaths.absolutePath(); - const QString reason = QCoreApplication::translate("Application", "Could not find ovqt_plugin_core in %1").arg(absolutePaths); + const QString reason = QCoreApplication::translate("Application", "Could not find studio_plugin_core in %1").arg(absolutePaths); displayError(msgCoreLoadFailure(reason)); QString newPath = QFileDialog::getExistingDirectory(0, QCoreApplication::translate("Application", "Change the plugins path"), QDir::homePath()); @@ -205,7 +235,7 @@ int main(int argc, char **argv) errors.append(spec->fileName() + " : " + spec->errorString()); if (!errors.isEmpty()) - QMessageBox::warning(0, QCoreApplication::translate("Application", "Object Viewer Qt - Plugin loader messages"), + QMessageBox::warning(0, QCoreApplication::translate("Application", "Studio - Plugin loader messages"), errors.join(QString::fromLatin1("\n\n"))); int result = app.exec(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt b/code/studio/src/plugins/CMakeLists.txt similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt rename to code/studio/src/plugins/CMakeLists.txt index 3e99bdc43..5916be455 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/CMakeLists.txt +++ b/code/studio/src/plugins/CMakeLists.txt @@ -13,6 +13,7 @@ IF(WITH_GUI) ENDIF(WITH_GUI) ADD_SUBDIRECTORY(translation_manager) +ADD_SUBDIRECTORY(tile_editor) ADD_SUBDIRECTORY(bnp_manager) # Note: Temporarily disabled until development continues. #ADD_SUBDIRECTORY(zone_painter) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt b/code/studio/src/plugins/bnp_manager/CMakeLists.txt similarity index 67% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt rename to code/studio/src/plugins/bnp_manager/CMakeLists.txt index 2991da073..406a927b8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt +++ b/code/studio/src/plugins/bnp_manager/CMakeLists.txt @@ -34,16 +34,16 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_BNP_MANAGER_MOC_SRC}) SOURCE_GROUP("BNP Manager Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_bnp_manager MODULE ${SRC} ${OVQT_PLUG_BNP_MANAGER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUGIN_BNP_MANAGER_RC_SRCS} ${OVQT_PLUG_BNP_MANAGER_UI_HDRS}) +ADD_LIBRARY(studio_plugin_bnp_manager MODULE ${SRC} ${OVQT_PLUG_BNP_MANAGER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUGIN_BNP_MANAGER_RC_SRCS} ${OVQT_PLUG_BNP_MANAGER_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_bnp_manager ovqt_plugin_core nelmisc nelgeorges ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_bnp_manager studio_plugin_core nelmisc nelgeorges ${QT_LIBRARIES}) -NL_DEFAULT_PROPS(ovqt_plugin_bnp_manager "NeL, Tools, 3D: Object Viewer Qt Plugin: BNP Manager") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_bnp_manager) -NL_ADD_LIB_SUFFIX(ovqt_plugin_bnp_manager) +NL_DEFAULT_PROPS(studio_plugin_bnp_manager "Tools: Studio Plugin: BNP Manager") +NL_ADD_RUNTIME_FLAGS(studio_plugin_bnp_manager) +NL_ADD_LIB_SUFFIX(studio_plugin_bnp_manager) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) -INSTALL(TARGETS ovqt_plugin_bnp_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_bnp_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(TARGETS studio_plugin_bnp_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_bnp_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp b/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp rename to code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_dirtree_dialog.h b/code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_dirtree_dialog.h rename to code/studio/src/plugins/bnp_manager/bnp_dirtree_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_dirtree_form.ui b/code/studio/src/plugins/bnp_manager/bnp_dirtree_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_dirtree_form.ui rename to code/studio/src/plugins/bnp_manager/bnp_dirtree_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_file.cpp b/code/studio/src/plugins/bnp_manager/bnp_file.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_file.cpp rename to code/studio/src/plugins/bnp_manager/bnp_file.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_file.h b/code/studio/src/plugins/bnp_manager/bnp_file.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_file.h rename to code/studio/src/plugins/bnp_manager/bnp_file.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filelist_dialog.cpp b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filelist_dialog.cpp rename to code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filelist_dialog.h b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filelist_dialog.h rename to code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filelist_dialog.ui b/code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filelist_dialog.ui rename to code/studio/src/plugins/bnp_manager/bnp_filelist_dialog.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filesystem_model.cpp b/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filesystem_model.cpp rename to code/studio/src/plugins/bnp_manager/bnp_filesystem_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filesystem_model.h b/code/studio/src/plugins/bnp_manager/bnp_filesystem_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_filesystem_model.h rename to code/studio/src/plugins/bnp_manager/bnp_filesystem_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager.qrc b/code/studio/src/plugins/bnp_manager/bnp_manager.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager.qrc rename to code/studio/src/plugins/bnp_manager/bnp_manager.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_constants.h b/code/studio/src/plugins/bnp_manager/bnp_manager_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_constants.h rename to code/studio/src/plugins/bnp_manager/bnp_manager_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_plugin.cpp b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_plugin.cpp rename to code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp index e4bf7f594..509dd2997 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_plugin.cpp +++ b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.cpp @@ -44,6 +44,9 @@ namespace BNPManager } qDeleteAll(m_autoReleaseObjects); m_autoReleaseObjects.clear(); + + delete m_libContext; + m_libContext = NULL; } bool BNPManagerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_plugin.h b/code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_plugin.h rename to code/studio/src/plugins/bnp_manager/bnp_manager_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_window.cpp b/code/studio/src/plugins/bnp_manager/bnp_manager_window.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_window.cpp rename to code/studio/src/plugins/bnp_manager/bnp_manager_window.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_window.h b/code/studio/src/plugins/bnp_manager/bnp_manager_window.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_window.h rename to code/studio/src/plugins/bnp_manager/bnp_manager_window.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_window.ui b/code/studio/src/plugins/bnp_manager/bnp_manager_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_manager_window.ui rename to code/studio/src/plugins/bnp_manager/bnp_manager_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_proxy_model.cpp b/code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_proxy_model.cpp rename to code/studio/src/plugins/bnp_manager/bnp_proxy_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_proxy_model.h b/code/studio/src/plugins/bnp_manager/bnp_proxy_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/bnp_proxy_model.h rename to code/studio/src/plugins/bnp_manager/bnp_proxy_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_add_item.png b/code/studio/src/plugins/bnp_manager/images/ic_nel_add_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_add_item.png rename to code/studio/src/plugins/bnp_manager/images/ic_nel_add_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_bnp_make.png b/code/studio/src/plugins/bnp_manager/images/ic_nel_bnp_make.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_bnp_make.png rename to code/studio/src/plugins/bnp_manager/images/ic_nel_bnp_make.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_delete_item.png b/code/studio/src/plugins/bnp_manager/images/ic_nel_delete_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_delete_item.png rename to code/studio/src/plugins/bnp_manager/images/ic_nel_delete_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_export.png b/code/studio/src/plugins/bnp_manager/images/ic_nel_export.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_export.png rename to code/studio/src/plugins/bnp_manager/images/ic_nel_export.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_new.png b/code/studio/src/plugins/bnp_manager/images/ic_nel_new.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_new.png rename to code/studio/src/plugins/bnp_manager/images/ic_nel_new.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_reset_all.png b/code/studio/src/plugins/bnp_manager/images/ic_nel_reset_all.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/images/ic_nel_reset_all.png rename to code/studio/src/plugins/bnp_manager/images/ic_nel_reset_all.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/ovqt_plugin_bnp_manager.xml b/code/studio/src/plugins/bnp_manager/studio_plugin_bnp_manager.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/ovqt_plugin_bnp_manager.xml rename to code/studio/src/plugins/bnp_manager/studio_plugin_bnp_manager.xml index a368a123c..591611504 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/ovqt_plugin_bnp_manager.xml +++ b/code/studio/src/plugins/bnp_manager/studio_plugin_bnp_manager.xml @@ -1,5 +1,5 @@ - ovqt_plugin_bnp_manager + studio_plugin_bnp_manager BNPManager 0.1 Krolock diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt b/code/studio/src/plugins/core/CMakeLists.txt similarity index 57% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt rename to code/studio/src/plugins/core/CMakeLists.txt index 5a20ba46c..2c21c9b58 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt +++ b/code/studio/src/plugins/core/CMakeLists.txt @@ -4,6 +4,11 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES}) FILE(GLOB SRC *.cpp *.h) +SET( SRC ${SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.h + ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.cpp + ) + SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) @@ -22,6 +27,7 @@ SET(OVQT_CORE_PLUGIN_HDR search_paths_settings_page.h general_settings_page.h plugin_view_dialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.h ) SET(OVQT_CORE_PLUGIN_UIS settings_dialog.ui @@ -45,29 +51,29 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_CORE_PLUGIN_MOC_SRC}) SOURCE_GROUP("Core Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_core SHARED ${SRC} ${OVQT_CORE_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_CORE_PLUGIN_RC_SRCS} ${OVQT_CORE_PLUGIN_UI_HDRS}) +ADD_LIBRARY(studio_plugin_core SHARED ${SRC} ${OVQT_CORE_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_CORE_PLUGIN_RC_SRCS} ${OVQT_CORE_PLUGIN_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_core nelmisc ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_core nelmisc nel3d ${QT_LIBRARIES}) -NL_DEFAULT_PROPS(ovqt_plugin_core "NeL, Tools, 3D: Object Viewer Qt Plugin: Core") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_core) -NL_ADD_LIB_SUFFIX(ovqt_plugin_core) +NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core") +NL_ADD_RUNTIME_FLAGS(studio_plugin_core) +NL_ADD_LIB_SUFFIX(studio_plugin_core) ADD_DEFINITIONS(-DCORE_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_core LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_core.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_core.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp new file mode 100644 index 000000000..dc0bb858b --- /dev/null +++ b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp @@ -0,0 +1,178 @@ +// Ryzom Core 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 "nel3d_widget.h" +#include "nel/3d/u_driver.h" +#include "nel/3d/text_context.h" +#include "nel/3d/driver_user.h" +#include "nel/misc/rgba.h" +#include "nel/misc/path.h" + +#ifdef NL_OS_WINDOWS +#include +#endif + +#include + +Nel3DWidget::Nel3DWidget( QWidget *parent ) : +QWidget( parent ) +{ + driver = NULL; + textContext = NULL; + + // Need to set this attribute with a NULL paintengine returned to Qt + // so that we can render the widget normally ourselves, without the image + // disappearing when a widget is resized or shown on top of us + setAttribute( Qt::WA_PaintOnScreen, true ); + setAttribute( Qt::WA_OpaquePaintEvent, true ); + setAttribute( Qt::WA_NoSystemBackground, true ); +} + +Nel3DWidget::~Nel3DWidget() +{ + if( driver != NULL ) + { + if( textContext != NULL ) + { + driver->deleteTextContext( textContext ); + textContext = NULL; + } + + driver->release(); + delete driver; + driver = NULL; + } +} + +void Nel3DWidget::init() +{ + nlassert( driver == NULL ); + + driver = NL3D::UDriver::createDriver( 0, false, 0 ); + driver->setDisplay( winId(), NL3D::UDriver::CMode( width(), height(), 32, true ) ); +} + +void Nel3DWidget::createTextContext( std::string fontFile ) +{ + if( driver == NULL ) + return; + + std::string font; + + try + { + font = NLMISC::CPath::lookup( fontFile ); + } + catch( ... ) + { + nlinfo( "Font %s cannot be found, cannot create textcontext!", fontFile.c_str() ); + exit( EXIT_FAILURE ); + } + + if( textContext != NULL ) + { + driver->deleteTextContext( textContext ); + textContext = NULL; + } + + textContext = driver->createTextContext( font ); +} + +void Nel3DWidget::clear() +{ + if( driver == NULL ) + return; + driver->clearBuffers( NLMISC::CRGBA::Black ); + driver->swapBuffers(); +} + +void Nel3DWidget::showEvent( QShowEvent *evnt ) +{ + QWidget::showEvent( evnt ); + + if( driver != NULL ) + driver->activate(); +} + +void Nel3DWidget::resizeEvent( QResizeEvent *evnt ) +{ + QWidget::resizeEvent( evnt ); + + Q_EMIT( evnt->size().width(), evnt->size().height() ); +} + +#if defined ( NL_OS_WINDOWS ) + +typedef bool ( *winProc )( NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ); + +bool Nel3DWidget::winEvent( MSG *message, long *result ) +{ + if( driver != NULL ) + { + NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); + if( iDriver != NULL ) + { + winProc proc = (winProc)iDriver->getWindowProc(); + return proc( iDriver, message->hwnd, message->message, message->wParam, message->lParam ); + } + } + + return false; +} + +#elif defined( NL_OS_MAC ) + +typedef bool ( *cocoaProc )( NL3D::IDriver *, const void *e ); + +bool Nel3DWidget::macEvent( EventHandlerCallRef caller, EventRef event ) +{ + if( caller ) + nlerror( "You are using QtCarbon! Only QtCocoa supported, please upgrade Qt" ); + + if( driver != NULL ) + { + NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); + if( iDriver != NULL ) + { + cocoaProc proc = ( cocoaProc )iDriver->getWindowProc(); + return proc( iDriver, event ); + } + } + + return false; +} + +#elif defined( NL_OS_UNIX ) + +typedef bool ( *x11Proc )( NL3D::IDriver *drv, XEvent *e ); + +bool Nel3DWidget::x11Event( XEvent *event ) +{ + if( driver != NULL ) + { + NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); + if( driver != NULL ) + { + x11Proc proc = ( x11Proc )iDriver->getWindowProc(); + return proc( iDriver, event ); + } + } + + return false; +} +#endif + diff --git a/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h new file mode 100644 index 000000000..059e1b738 --- /dev/null +++ b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h @@ -0,0 +1,79 @@ +// Ryzom Core 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 NEL3D_WIDGET_H +#define NEL3D_WIDGET_H + +#include +#include "nel/misc/types_nl.h" +#include + +#include "../core_global.h" + +namespace NL3D +{ + class UDriver; + class UTextContext; +} + +/// Nel 3D interface to Qt +class CORE_EXPORT Nel3DWidget : public QWidget +{ + Q_OBJECT +public: + Nel3DWidget( QWidget *parent = NULL ); + virtual ~Nel3DWidget(); + + void init(); + void createTextContext( std::string fontFile ); + + NL3D::UDriver* getDriver() const{ return driver; } + NL3D::UTextContext* getTextContext() const{ return textContext; } + + + // Need to return NULL paintengine to Qt so that we can + // render the widget normally ourselves, without the image + // disappearing when a widget is resized or shown on top of us + QPaintEngine* paintEngine() const{ return NULL; } + +Q_SIGNALS: + void resize( int width, int height ); + +public Q_SLOTS: + void clear(); + +protected: + + void showEvent( QShowEvent *evnt ); + void resizeEvent( QResizeEvent *evnt ); + +#if defined(NL_OS_WINDOWS) + bool winEvent( MSG *message, long *result ); +#elif defined(NL_OS_MAC) + bool macEvent( EventHandlerCallRef caller, EventRef event ); +#elif defined(NL_OS_UNIX) + bool x11Event( XEvent *event ); +#endif + +private: + NL3D::UDriver *driver; + NL3D::UTextContext *textContext; + +}; + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/context_manager.cpp b/code/studio/src/plugins/core/context_manager.cpp similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/context_manager.cpp rename to code/studio/src/plugins/core/context_manager.cpp index 8355b5cb8..3b02b411c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/context_manager.cpp +++ b/code/studio/src/plugins/core/context_manager.cpp @@ -36,13 +36,11 @@ struct ContextManagerPrivate Core::MainWindow *m_mainWindow; QTabWidget *m_tabWidget; QVector m_contexts; - int m_oldCurrent; }; ContextManagerPrivate::ContextManagerPrivate(Core::MainWindow *mainWindow, QTabWidget *tabWidget) : m_mainWindow(mainWindow), - m_tabWidget(tabWidget), - m_oldCurrent(-1) + m_tabWidget(tabWidget) { } @@ -135,8 +133,8 @@ void ContextManager::removeContextObject(IContext *context) const int index = indexOf(context->id()); QWidget *widget = d->m_tabWidget->widget(index); - d->m_tabWidget->removeTab(index); d->m_contexts.remove(index); + d->m_tabWidget->removeTab(index); delete widget; } @@ -145,11 +143,7 @@ void ContextManager::currentTabChanged(int index) if (index >= 0) { IContext *context = d->m_contexts.at(index); - IContext *oldContext = 0; - if (d->m_oldCurrent >= 0) - oldContext = d->m_contexts.at(d->m_oldCurrent); - d->m_oldCurrent = index; - Q_EMIT currentContextChanged(context, oldContext); + Q_EMIT currentContextChanged(context); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/context_manager.h b/code/studio/src/plugins/core/context_manager.h similarity index 92% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/context_manager.h rename to code/studio/src/plugins/core/context_manager.h index 8151648e7..9b0a62c7e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/context_manager.h +++ b/code/studio/src/plugins/core/context_manager.h @@ -51,8 +51,7 @@ public: void unregisterUndoStack(QUndoStack *stack); Q_SIGNALS: - // the default argument '=0' is important for connects without the oldContext argument. - void currentContextChanged(Core::IContext *context, Core::IContext *oldContext = 0); + void currentContextChanged(Core::IContext *context); public Q_SLOTS: void activateContext(const QString &id); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.cpp b/code/studio/src/plugins/core/core.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.cpp rename to code/studio/src/plugins/core/core.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.h b/code/studio/src/plugins/core/core.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.h rename to code/studio/src/plugins/core/core.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.qrc b/code/studio/src/plugins/core/core.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core.qrc rename to code/studio/src/plugins/core/core.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h b/code/studio/src/plugins/core/core_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_constants.h rename to code/studio/src/plugins/core/core_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_global.h b/code/studio/src/plugins/core/core_global.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_global.h rename to code/studio/src/plugins/core/core_global.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_plugin.cpp b/code/studio/src/plugins/core/core_plugin.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_plugin.cpp rename to code/studio/src/plugins/core/core_plugin.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_plugin.h b/code/studio/src/plugins/core/core_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/core_plugin.h rename to code/studio/src/plugins/core/core_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp b/code/studio/src/plugins/core/general_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.cpp rename to code/studio/src/plugins/core/general_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.h b/code/studio/src/plugins/core/general_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.h rename to code/studio/src/plugins/core/general_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.ui b/code/studio/src/plugins/core/general_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/general_settings_page.ui rename to code/studio/src/plugins/core/general_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_add_item.png b/code/studio/src/plugins/core/icons/ic_nel_add_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_add_item.png rename to code/studio/src/plugins/core/icons/ic_nel_add_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_crash.png b/code/studio/src/plugins/core/icons/ic_nel_crash.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_crash.png rename to code/studio/src/plugins/core/icons/ic_nel_crash.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_delete_item.png b/code/studio/src/plugins/core/icons/ic_nel_delete_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_delete_item.png rename to code/studio/src/plugins/core/icons/ic_nel_delete_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_down_item.png b/code/studio/src/plugins/core/icons/ic_nel_down_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_down_item.png rename to code/studio/src/plugins/core/icons/ic_nel_down_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_generic_settings.png b/code/studio/src/plugins/core/icons/ic_nel_generic_settings.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_generic_settings.png rename to code/studio/src/plugins/core/icons/ic_nel_generic_settings.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_new.png b/code/studio/src/plugins/core/icons/ic_nel_new.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_new.png rename to code/studio/src/plugins/core/icons/ic_nel_new.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_open.png b/code/studio/src/plugins/core/icons/ic_nel_open.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_open.png rename to code/studio/src/plugins/core/icons/ic_nel_open.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_path_settings.png b/code/studio/src/plugins/core/icons/ic_nel_path_settings.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_path_settings.png rename to code/studio/src/plugins/core/icons/ic_nel_path_settings.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_pill.png b/code/studio/src/plugins/core/icons/ic_nel_pill.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_pill.png rename to code/studio/src/plugins/core/icons/ic_nel_pill.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_redo.png b/code/studio/src/plugins/core/icons/ic_nel_redo.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_redo.png rename to code/studio/src/plugins/core/icons/ic_nel_redo.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_reset_all.png b/code/studio/src/plugins/core/icons/ic_nel_reset_all.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_reset_all.png rename to code/studio/src/plugins/core/icons/ic_nel_reset_all.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_save.png b/code/studio/src/plugins/core/icons/ic_nel_save.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_save.png rename to code/studio/src/plugins/core/icons/ic_nel_save.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_save_as.png b/code/studio/src/plugins/core/icons/ic_nel_save_as.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_save_as.png rename to code/studio/src/plugins/core/icons/ic_nel_save_as.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_undo.png b/code/studio/src/plugins/core/icons/ic_nel_undo.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_undo.png rename to code/studio/src/plugins/core/icons/ic_nel_undo.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_up_item.png b/code/studio/src/plugins/core/icons/ic_nel_up_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icons/ic_nel_up_item.png rename to code/studio/src/plugins/core/icons/ic_nel_up_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icontext.h b/code/studio/src/plugins/core/icontext.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icontext.h rename to code/studio/src/plugins/core/icontext.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icore.h b/code/studio/src/plugins/core/icore.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icore.h rename to code/studio/src/plugins/core/icore.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/icore_listener.h b/code/studio/src/plugins/core/icore_listener.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/icore_listener.h rename to code/studio/src/plugins/core/icore_listener.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/nel.png b/code/studio/src/plugins/core/images/nel.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/nel.png rename to code/studio/src/plugins/core/images/nel.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/preferences.png b/code/studio/src/plugins/core/images/preferences.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/images/preferences.png rename to code/studio/src/plugins/core/images/preferences.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/ioptions_page.h b/code/studio/src/plugins/core/ioptions_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/ioptions_page.h rename to code/studio/src/plugins/core/ioptions_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp b/code/studio/src/plugins/core/main_window.cpp similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp rename to code/studio/src/plugins/core/main_window.cpp index a90e67bc0..4ccd32564 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp +++ b/code/studio/src/plugins/core/main_window.cpp @@ -46,13 +46,13 @@ MainWindow::MainWindow(ExtensionSystem::IPluginManager *pluginManager, QWidget * m_undoGroup(0), m_settings(0) { - QCoreApplication::setApplicationName(QLatin1String("ObjectViewerQt")); + QCoreApplication::setApplicationName(QLatin1String("Studio")); QCoreApplication::setApplicationVersion(QLatin1String(Core::Constants::OVQT_VERSION_LONG)); QCoreApplication::setOrganizationName(QLatin1String("RyzomCore")); setObjectName(Constants::MAIN_WINDOW); setWindowIcon(QIcon(Constants::ICON_PILL)); - setWindowTitle(tr("Object Viewer Qt")); + setWindowTitle(tr("Ryzom Core Studio")); m_pluginManager = pluginManager; m_settings = m_pluginManager->settings(); @@ -232,8 +232,8 @@ bool MainWindow::showOptionsDialog(const QString &group, void MainWindow::about() { - QMessageBox::about(this, tr("About Object Viewer Qt"), - tr("

Object Viewer Qt

" + QMessageBox::about(this, tr("About Ryzom Core Studio"), + tr("

Ryzom Core Studio

" "

Ryzom Core team

Compiled on %1 %2").arg(__DATE__).arg(__TIME__)); } @@ -438,9 +438,6 @@ void MainWindow::createMenus() m_toolsMenu = m_menuBar->addMenu(tr("&Tools")); menuManager()->registerMenu(m_toolsMenu, Constants::M_TOOLS); - m_sheetMenu = m_toolsMenu->addMenu(tr("&Sheet")); - menuManager()->registerMenu(m_sheetMenu, Constants::M_SHEET); - // m_toolsMenu->addSeparator(); m_toolsMenu->addAction(m_settingsAction); @@ -452,6 +449,9 @@ void MainWindow::createMenus() m_helpMenu->addAction(m_aboutAction); m_helpMenu->addAction(m_aboutQtAction); m_helpMenu->addAction(m_pluginViewAction); + + m_sheetMenu = m_menuBar->addMenu(tr("&Sheet")); + menuManager()->registerMenu(m_sheetMenu, Constants::M_SHEET); } void MainWindow::createStatusBar() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.h b/code/studio/src/plugins/core/main_window.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.h rename to code/studio/src/plugins/core/main_window.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/menu_manager.cpp b/code/studio/src/plugins/core/menu_manager.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/menu_manager.cpp rename to code/studio/src/plugins/core/menu_manager.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/menu_manager.h b/code/studio/src/plugins/core/menu_manager.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/menu_manager.h rename to code/studio/src/plugins/core/menu_manager.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.cpp b/code/studio/src/plugins/core/plugin_view_dialog.cpp similarity index 67% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.cpp rename to code/studio/src/plugins/core/plugin_view_dialog.cpp index 175902d39..cccc98509 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.cpp +++ b/code/studio/src/plugins/core/plugin_view_dialog.cpp @@ -25,6 +25,8 @@ #include #include #include +#include +#include // Project includes #include "../../extension_system/iplugin_spec.h" @@ -43,6 +45,10 @@ PluginView::PluginView(ExtensionSystem::IPluginManager *pluginManager, QWidget * connect(m_pluginManager, SIGNAL(pluginsChanged()), this, SLOT(updateList())); connect(this, SIGNAL(accepted()), this, SLOT(updateSettings())); + connect( m_ui.pluginTreeWidget, SIGNAL( itemClicked( QTreeWidgetItem*, int ) ), this, SLOT( onItemClicked() ) ); + connect( m_ui.unloadButton, SIGNAL( clicked( bool ) ), this, SLOT( onUnloadClicked() ) ); + connect( m_ui.loadButton, SIGNAL( clicked( bool ) ), this, SLOT( onLoadClicked() ) ); + // WhiteList is list of plugins which can not disable. m_whiteList << Constants::OVQT_CORE_PLUGIN; updateList(); @@ -59,6 +65,7 @@ void PluginView::updateList() static QIcon notLoadedIcon = QApplication::style()->standardIcon(QStyle::SP_DialogResetButton); m_specToItem.clear(); + m_itemToSpec.clear(); QList items; Q_FOREACH (ExtensionSystem::IPluginSpec *spec, m_pluginManager->plugins()) @@ -81,6 +88,7 @@ void PluginView::updateList() items.append(item); m_specToItem.insert(spec, item); + m_itemToSpec.insert(item, spec); } m_ui.pluginTreeWidget->clear(); @@ -105,4 +113,60 @@ void PluginView::updateSettings() } } -} /* namespace Core */ \ No newline at end of file +void PluginView::onItemClicked() +{ + m_ui.unloadButton->setEnabled( true ); +} + +void PluginView::onUnloadClicked() +{ + QTreeWidgetItem *item = m_ui.pluginTreeWidget->currentItem(); + if( item == NULL ) + { + QMessageBox::warning( this, + tr( "Plugin unload" ), + tr( "No plugin selected!" ) ); + return; + } + + QMap< QTreeWidgetItem*, ExtensionSystem::IPluginSpec* >::const_iterator itr + = m_itemToSpec.find( item ); + if( itr == m_itemToSpec.end() ) + return; + + bool success = m_pluginManager->unloadPlugin( itr.value() ); + if( !success ) + { + QMessageBox::warning( this, + tr( "Plugin unload" ), + tr( "Failed to unload plugin." ) ); + } +} + +void PluginView::onLoadClicked() +{ + QString f = QFileDialog::getOpenFileName( this, + tr( "Loading a plugin" ), + ".", + "Plugin specifications ( *.xml )" ); + + if( f.isEmpty() ) + { + return; + } + + QApplication::setOverrideCursor( Qt::WaitCursor ); + bool success = m_pluginManager->loadPlugin( f ); + QApplication::setOverrideCursor( Qt::ArrowCursor ); + + if( !success ) + { + QMessageBox::warning( this, + tr( "Loading plugin" ), + tr( "Error loading plugin!" ) ); + } +} + + +} /* namespace Core */ + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.h b/code/studio/src/plugins/core/plugin_view_dialog.h similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.h rename to code/studio/src/plugins/core/plugin_view_dialog.h index aae16749d..e7c1123c1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.h +++ b/code/studio/src/plugins/core/plugin_view_dialog.h @@ -44,10 +44,15 @@ private Q_SLOTS: void updateList(); void updateSettings(); + void onItemClicked(); + void onUnloadClicked(); + void onLoadClicked(); + private: const int m_checkStateColumn; QMap m_specToItem; + QMap m_itemToSpec; QStringList m_whiteList; ExtensionSystem::IPluginManager *m_pluginManager; Ui::PluginView m_ui; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.ui b/code/studio/src/plugins/core/plugin_view_dialog.ui similarity index 85% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.ui rename to code/studio/src/plugins/core/plugin_view_dialog.ui index 9d7d395be..45c4695e8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/plugin_view_dialog.ui +++ b/code/studio/src/plugins/core/plugin_view_dialog.ui @@ -17,7 +17,7 @@ true - + true @@ -79,7 +79,34 @@ + + + + false + + + All objects list + + + + + + false + + + Unload plugin + + + + + + + Load plugin + + + + Qt::Horizontal @@ -92,27 +119,17 @@ - + Close - - - - false - - - All objects list - - - - + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/qtwin.cpp b/code/studio/src/plugins/core/qtwin.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/qtwin.cpp rename to code/studio/src/plugins/core/qtwin.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/qtwin.h b/code/studio/src/plugins/core/qtwin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/qtwin.h rename to code/studio/src/plugins/core/qtwin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.cpp b/code/studio/src/plugins/core/search_paths_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.cpp rename to code/studio/src/plugins/core/search_paths_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.h b/code/studio/src/plugins/core/search_paths_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.h rename to code/studio/src/plugins/core/search_paths_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.ui b/code/studio/src/plugins/core/search_paths_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/search_paths_settings_page.ui rename to code/studio/src/plugins/core/search_paths_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.cpp b/code/studio/src/plugins/core/settings_dialog.cpp similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.cpp rename to code/studio/src/plugins/core/settings_dialog.cpp index 4b7bbac3a..0b38e4e80 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.cpp +++ b/code/studio/src/plugins/core/settings_dialog.cpp @@ -17,7 +17,7 @@ // along with this program. If not, see . // Project includes -#include "settings_dialog.h" +#include "../core/settings_dialog.h" #include "ioptions_page.h" // Qt includes diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.h b/code/studio/src/plugins/core/settings_dialog.h similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.h rename to code/studio/src/plugins/core/settings_dialog.h index 9e1c86444..a90f88b18 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.h +++ b/code/studio/src/plugins/core/settings_dialog.h @@ -19,7 +19,7 @@ #ifndef SETTINGS_DIALOG_H #define SETTINGS_DIALOG_H -#include "ui_settings_dialog.h" +#include "../core/ui_settings_dialog.h" // Qt includes #include diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.ui b/code/studio/src/plugins/core/settings_dialog.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/settings_dialog.ui rename to code/studio/src/plugins/core/settings_dialog.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/ovqt_plugin_core.xml b/code/studio/src/plugins/core/studio_plugin_core.xml similarity index 67% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/core/ovqt_plugin_core.xml rename to code/studio/src/plugins/core/studio_plugin_core.xml index 2f5d6e9a8..335ed8845 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/ovqt_plugin_core.xml +++ b/code/studio/src/plugins/core/studio_plugin_core.xml @@ -1,5 +1,5 @@ - ovqt_plugin_core + studio_plugin_core Core 0.8 Ryzom Core diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt b/code/studio/src/plugins/disp_sheet_id/CMakeLists.txt similarity index 51% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt rename to code/studio/src/plugins/disp_sheet_id/CMakeLists.txt index 7e5c0e409..bce24b667 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt +++ b/code/studio/src/plugins/disp_sheet_id/CMakeLists.txt @@ -26,34 +26,34 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC}) SOURCE_GROUP("Display sheet id Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_disp_sheet_id MODULE ${SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS}) +ADD_LIBRARY(studio_plugin_disp_sheet_id MODULE ${SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_DISP_SHEET_ID_PLUGIN_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_disp_sheet_id ovqt_plugin_core nelmisc ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_disp_sheet_id studio_plugin_core nelmisc ${QT_LIBRARIES}) IF(WITH_STLPORT) - TARGET_LINK_LIBRARIES(ovqt_plugin_disp_sheet_id ${CMAKE_THREAD_LIBS_INIT}) + TARGET_LINK_LIBRARIES(studio_plugin_disp_sheet_id ${CMAKE_THREAD_LIBS_INIT}) ENDIF(WITH_STLPORT) -NL_DEFAULT_PROPS(ovqt_plugin_disp_sheet_id "NeL, Tools, 3D: Object Viewer Qt Plugin: Display sheet id") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_disp_sheet_id) -NL_ADD_LIB_SUFFIX(ovqt_plugin_disp_sheet_id) +NL_DEFAULT_PROPS(studio_plugin_disp_sheet_id "Tools: Studio Plugin: Display sheet id") +NL_ADD_RUNTIME_FLAGS(studio_plugin_disp_sheet_id) +NL_ADD_LIB_SUFFIX(studio_plugin_disp_sheet_id) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_disp_sheet_id.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_disp_sheet_id.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp similarity index 88% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp rename to code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp index 62d2f0430..46a8ee6bd 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp +++ b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.cpp @@ -34,6 +34,21 @@ using namespace SheetIdViewPlugin; +DispSheetIdPlugin::DispSheetIdPlugin() +{ +} + +DispSheetIdPlugin::~DispSheetIdPlugin() +{ + Core::MenuManager *menuManager = Core::ICore::instance()->menuManager(); + QAction *a = menuManager->action( "SheetIdView" ); + menuManager->unregisterAction( "SheetIdView" ); + delete a; + + delete m_LibContext; + m_LibContext = NULL; +} + bool DispSheetIdPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) { Q_UNUSED(errorString); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h rename to code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h index 8eaf3ead9..7506b84cc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h +++ b/code/studio/src/plugins/disp_sheet_id/disp_sheet_id_plugin.h @@ -37,6 +37,9 @@ class DispSheetIdPlugin : public QObject, public ExtensionSystem::IPlugin Q_INTERFACES(ExtensionSystem::IPlugin) public: + DispSheetIdPlugin(); + ~DispSheetIdPlugin(); + bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); void extensionsInitialized(); void setNelContext(NLMISC::INelContext *nelContext); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/sheet_id_view.cpp b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/sheet_id_view.cpp rename to code/studio/src/plugins/disp_sheet_id/sheet_id_view.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/sheet_id_view.h b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/sheet_id_view.h rename to code/studio/src/plugins/disp_sheet_id/sheet_id_view.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/sheet_id_view.ui b/code/studio/src/plugins/disp_sheet_id/sheet_id_view.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/sheet_id_view.ui rename to code/studio/src/plugins/disp_sheet_id/sheet_id_view.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/ovqt_plugin_disp_sheet_id.xml b/code/studio/src/plugins/disp_sheet_id/studio_plugin_disp_sheet_id.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/ovqt_plugin_disp_sheet_id.xml rename to code/studio/src/plugins/disp_sheet_id/studio_plugin_disp_sheet_id.xml index 173ce4479..4ac055b1a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/ovqt_plugin_disp_sheet_id.xml +++ b/code/studio/src/plugins/disp_sheet_id/studio_plugin_disp_sheet_id.xml @@ -1,5 +1,5 @@ - ovqt_plugin_disp_sheet_id + studio_plugin_disp_sheet_id DisplaySheetId 1.0 pemeon diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt b/code/studio/src/plugins/example/CMakeLists.txt similarity index 54% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt rename to code/studio/src/plugins/example/CMakeLists.txt index 27e8698df..fd4008fc4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt +++ b/code/studio/src/plugins/example/CMakeLists.txt @@ -28,29 +28,29 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_EXAMPLE_MOC_SRC}) SOURCE_GROUP("Example Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_example MODULE ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_EXAMPLE_UI_HDRS}) +ADD_LIBRARY(studio_plugin_example MODULE ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_EXAMPLE_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_example ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) +TARGET_LINK_LIBRARIES(studio_plugin_example studio_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) -NL_DEFAULT_PROPS(ovqt_plugin_example "NeL, Tools, 3D: Object Viewer Qt Plugin: Example") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_example) -NL_ADD_LIB_SUFFIX(ovqt_plugin_example) +NL_DEFAULT_PROPS(studio_plugin_example "Tools: Studio Plugin: Example") +NL_ADD_RUNTIME_FLAGS(studio_plugin_example) +NL_ADD_LIB_SUFFIX(studio_plugin_example) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_example.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_example.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_plugin.cpp b/code/studio/src/plugins/example/example_plugin.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_plugin.cpp rename to code/studio/src/plugins/example/example_plugin.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_plugin.h b/code/studio/src/plugins/example/example_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_plugin.h rename to code/studio/src/plugins/example/example_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.cpp b/code/studio/src/plugins/example/example_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.cpp rename to code/studio/src/plugins/example/example_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.h b/code/studio/src/plugins/example/example_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.h rename to code/studio/src/plugins/example/example_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.ui b/code/studio/src/plugins/example/example_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.ui rename to code/studio/src/plugins/example/example_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.cpp b/code/studio/src/plugins/example/qnel_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.cpp rename to code/studio/src/plugins/example/qnel_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.h b/code/studio/src/plugins/example/qnel_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/qnel_widget.h rename to code/studio/src/plugins/example/qnel_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/simple_viewer.cpp b/code/studio/src/plugins/example/simple_viewer.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/simple_viewer.cpp rename to code/studio/src/plugins/example/simple_viewer.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/simple_viewer.h b/code/studio/src/plugins/example/simple_viewer.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/simple_viewer.h rename to code/studio/src/plugins/example/simple_viewer.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/ovqt_plugin_example.xml b/code/studio/src/plugins/example/studio_plugin_example.xml similarity index 78% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/example/ovqt_plugin_example.xml rename to code/studio/src/plugins/example/studio_plugin_example.xml index ae6664d52..434e37907 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/ovqt_plugin_example.xml +++ b/code/studio/src/plugins/example/studio_plugin_example.xml @@ -1,5 +1,5 @@ - ovqt_plugin_example + studio_plugin_example ExamplePlugin 0.2 dnk-88 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt b/code/studio/src/plugins/georges_editor/CMakeLists.txt similarity index 52% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt rename to code/studio/src/plugins/georges_editor/CMakeLists.txt index 40a8dcbfe..c2d3c1da7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt +++ b/code/studio/src/plugins/georges_editor/CMakeLists.txt @@ -1,19 +1,24 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} - ${QT_INCLUDES}) + ${QT_INCLUDES} + ${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser) FILE(GLOB SRC *.cpp *.h) SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h - ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) SET(OVQT_PLUG_GEORGES_EDITOR_HDR georges_editor_plugin.h georges_editor_form.h georges_dirtree_dialog.h georges_filesystem_model.h georges_treeview_dialog.h - expandable_headerview.h) + expandable_headerview.h + browser_ctrl.h + browser_ctrl_pvt.h + ) SET(OVQT_PLUG_GEORGES_EDITOR_UIS georges_editor_form.ui georges_dirtree_form.ui @@ -34,34 +39,34 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC}) SOURCE_GROUP("Georges Editor Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS}) +ADD_LIBRARY(studio_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_georges_editor ovqt_plugin_core nelmisc nelgeorges ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qt_property_browser ${QT_LIBRARIES}) -NL_DEFAULT_PROPS(ovqt_plugin_georges_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: Georges Editor") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_georges_editor) -NL_ADD_LIB_SUFFIX(ovqt_plugin_georges_editor) +NL_DEFAULT_PROPS(studio_plugin_georges_editor "Tools: Studio Plugin: Georges Editor") +NL_ADD_RUNTIME_FLAGS(studio_plugin_georges_editor) +NL_ADD_LIB_SUFFIX(studio_plugin_georges_editor) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WITH_PCH) - ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_georges_editor ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) + ADD_NATIVE_PRECOMPILED_HEADER(studio_plugin_georges_editor ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/studio/src/plugins/georges_editor/actions.cpp b/code/studio/src/plugins/georges_editor/actions.cpp new file mode 100644 index 000000000..08196f79b --- /dev/null +++ b/code/studio/src/plugins/georges_editor/actions.cpp @@ -0,0 +1,103 @@ +// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework +// Copyright (C) 2011 Adrian Jaekel +// +// 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 "actions.h" +#include "formitem.h" +#include "georgesform_model.h" + +// Qt includes + + +// NeL includes +#include +#include +#include +#include +#include +#include +#include + +namespace GeorgesQt +{ + + CUndoFormArrayRenameCommand::CUndoFormArrayRenameCommand(CGeorgesFormModel *model, CFormItem *item, const QVariant &value, QUndoCommand *parent) + : QUndoCommand("Rename Form Array Member", parent), m_model(model), m_item(item) + { + m_newValue = value.toString(); + } + + void CUndoFormArrayRenameCommand::redo() + { + update(true); + } + + void CUndoFormArrayRenameCommand::undo() + { + update(false); + } + + void CUndoFormArrayRenameCommand::update(bool redo) + { + // Get the parent node + const NLGEORGES::CFormDfn *parentDfn; + uint indexDfn; + const NLGEORGES::CFormDfn *nodeDfn; + const NLGEORGES::CType *nodeType; + NLGEORGES::CFormElm *node; + NLGEORGES::UFormDfn::TEntryType type; + bool isArray; + bool vdfnArray; + NLGEORGES::CForm *form=static_cast(m_item->form()); + NLGEORGES::CFormElm *elm = static_cast(&form->Elements); + + nlverify ( elm->getNodeByName (m_item->formName().c_str (), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, isArray, vdfnArray, true, NLGEORGES_FIRST_ROUND) ); + if (node) + { + std::string tmpName; + node->getFormName(tmpName); + + NLGEORGES::CFormElmArray* array = static_cast (node->getParent ()); + + // In the redo stage save the old value, just in case. + if(redo) + { + // If the name of the element is empty then give it a nice default. + if(array->Elements[m_item->structId()].Name.empty()) + { + m_oldValue.append("#"); + m_oldValue.append(QString("%1").arg(m_item->structId())); + } + else + { + m_oldValue = QString(array->Elements[m_item->structId()].Name.c_str()); + } + } + + QString value; + if(redo) + value = m_newValue; + else + value = m_oldValue; + + + array->Elements[m_item->structId()].Name = value.toAscii().data(); + m_item->setName(value.toAscii().data()); + + m_model->emitDataChanged(m_model->index(m_item->row(), 0, m_item)); + } + } +} \ No newline at end of file diff --git a/code/studio/src/plugins/georges_editor/actions.h b/code/studio/src/plugins/georges_editor/actions.h new file mode 100644 index 000000000..861eaef8e --- /dev/null +++ b/code/studio/src/plugins/georges_editor/actions.h @@ -0,0 +1,48 @@ +// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework +// Copyright (C) 2011 Adrian Jaekel +// +// 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 ACTIONS_H +#define ACTIONS_H + +#include +#include + +namespace GeorgesQt +{ + class CFormItem; + class CGeorgesFormModel; + + class CUndoFormArrayRenameCommand : public QUndoCommand + { + public: + CUndoFormArrayRenameCommand(CGeorgesFormModel *model, CFormItem *item, const QVariant &value, QUndoCommand *parent = 0); + ~CUndoFormArrayRenameCommand() {} + + void redo(); + void undo(); + + void update(bool redo); + + protected: + CFormItem *m_item; + CGeorgesFormModel *m_model; + + QString m_newValue; + QString m_oldValue; + }; +} + +#endif // ACTIONS_H \ No newline at end of file diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/browser_ctrl.cpp new file mode 100644 index 000000000..5c4d2a499 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/browser_ctrl.cpp @@ -0,0 +1,81 @@ +#include "browser_ctrl.h" +#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" +#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" +#include + +#include "nel/georges/form.h" + +#include "formitem.h" + +#include "browser_ctrl_pvt.h" + +BrowserCtrl::BrowserCtrl( QtTreePropertyBrowser *browser ) : +QObject( browser ) +{ + m_pvt = new BrowserCtrlPvt(); + m_pvt->setBrowser( browser ); + + connect( m_pvt, SIGNAL( arrayResized( const QString&, int ) ), this, SLOT( onArrayResized( const QString&, int ) ) ); + connect( m_pvt, SIGNAL( modified() ), this, SLOT( onModified() ) ); +} + +BrowserCtrl::~BrowserCtrl() +{ + delete m_pvt; + m_pvt = NULL; +} + +void BrowserCtrl::clicked( const QModelIndex &idx ) +{ + disableMgrConnections(); + m_pvt->clear(); + + GeorgesQt::CFormItem *item = static_cast< GeorgesQt::CFormItem* >( idx.internalPointer() ); + NLGEORGES::UFormElm &root = m_form->getRootNode(); + NLGEORGES::CFormElm *rootNode = dynamic_cast< NLGEORGES::CFormElm* >( &root ); + m_pvt->setRootNode( rootNode ); + NLGEORGES::UFormElm *node = NULL; + bool b = false; + + b = m_form->getRootNode().getNodeByName( &node, item->formName().c_str() ); + + if( !b || ( node == NULL ) ) + return; + + m_pvt->setupNode( node ); + + enableMgrConnections(); + +} + +void BrowserCtrl::onValueChanged( QtProperty *p, const QVariant &value ) +{ + m_pvt->onValueChanged( p, value ); +} + +void BrowserCtrl::onArrayResized( const QString &name, int size ) +{ + Q_EMIT arrayResized( name, size ); +} + +void BrowserCtrl::onModified() +{ + Q_EMIT modified(); +} + +void BrowserCtrl::enableMgrConnections() +{ + QtVariantPropertyManager *mgr = m_pvt->manager(); + + connect( mgr, SIGNAL( valueChanged( QtProperty*, const QVariant & ) ), + this, SLOT( onValueChanged( QtProperty*, const QVariant & ) ) ); +} + +void BrowserCtrl::disableMgrConnections() +{ + QtVariantPropertyManager *mgr = m_pvt->manager(); + + disconnect( mgr, SIGNAL( valueChanged( QtProperty*, const QVariant & ) ), + this, SLOT( onValueChanged( QtProperty*, const QVariant & ) ) ); +} + diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl.h b/code/studio/src/plugins/georges_editor/browser_ctrl.h new file mode 100644 index 000000000..d61d3b9e9 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/browser_ctrl.h @@ -0,0 +1,47 @@ +#ifndef BROWSER_CTRL_H +#define BROWSER_CTRL_H + +#include + +namespace NLGEORGES +{ + class UForm; +} + +class QtTreePropertyBrowser; +class QModelIndex; +class QVariant; +class QtProperty; + +class BrowserCtrlPvt; + +class BrowserCtrl : public QObject +{ + Q_OBJECT +public: + BrowserCtrl( QtTreePropertyBrowser *browser ); + ~BrowserCtrl(); + void setForm( NLGEORGES::UForm *form ){ m_form = form; } + +public Q_SLOTS: + void clicked( const QModelIndex &idx ); + +Q_SIGNALS: + void arrayResized( const QString &name, int size ); + void modified(); + +private Q_SLOTS: + void onValueChanged( QtProperty *p, const QVariant &value ); + void onArrayResized( const QString &name, int size ); + void onModified(); + +private: + void enableMgrConnections(); + void disableMgrConnections(); + + + BrowserCtrlPvt *m_pvt; + NLGEORGES::UForm *m_form; +}; + +#endif diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp new file mode 100644 index 000000000..d5026ef71 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.cpp @@ -0,0 +1,205 @@ +#include "browser_ctrl_pvt.h" +#include "3rdparty/qtpropertybrowser/qttreepropertybrowser.h" +#include "3rdparty/qtpropertybrowser/qtvariantproperty.h" +#include + +namespace +{ + + QVariant::Type getValueType( const NLGEORGES::UType *typ ) + { + QVariant::Type t = QVariant::String; + + NLGEORGES::UType::TType ttyp = NLGEORGES::UType::String; + if( typ != NULL ) + ttyp = typ->getType(); + + switch( ttyp ) + { + case NLGEORGES::UType::UnsignedInt: t = QVariant::UInt; break; + case NLGEORGES::UType::SignedInt: t = QVariant::Int; break; + case NLGEORGES::UType::Double: t = QVariant::Double; break; + case NLGEORGES::UType::Color: t = QVariant::Color; break; + case NLGEORGES::UType::String: t = QVariant::String; break; + } + + return t; + } + +} + + +BrowserCtrlPvt::BrowserCtrlPvt( QObject *parent ) : +QObject( parent ) +{ + mgr = new QtVariantPropertyManager(); + factory = new QtVariantEditorFactory(); + m_currentNode = NULL; + m_rootNode = NULL; +} + +BrowserCtrlPvt::~BrowserCtrlPvt() +{ + delete mgr; + mgr = NULL; + delete factory; + factory = NULL; + m_browser = NULL; +} + +void BrowserCtrlPvt::setupAtom( NLGEORGES::CFormElmStruct::CFormElmStructElm &elm ) +{ + QString key = elm.Name.c_str(); + QString value = ""; + QVariant::Type t = QVariant::String; + + if( elm.Element != NULL ) + { + t = getValueType( elm.Element->getType() ); + + std::string formName; + elm.Element->getFormName( formName, NULL ); + + std::string v; + m_rootNode->getValueByName( v, formName.c_str(), NLGEORGES::UFormElm::NoEval, NULL, 0 ); + value = v.c_str(); + } + + QtVariantProperty *p = mgr->addProperty( t, key ); + p->setValue( value ); + m_browser->addProperty( p ); +} + +void BrowserCtrlPvt::setupArray( NLGEORGES::UFormElm *node ) +{ + NLGEORGES::CFormElmArray *arr = static_cast< NLGEORGES::CFormElmArray* >( node ); + uint size = 0; + arr->getArraySize( size ); + + QString key = QObject::tr( "Array size" ); + QtVariantProperty *p = mgr->addProperty( QVariant::Int, key ); + p->setValue( size ); + m_browser->addProperty( p ); + +} + +void BrowserCtrlPvt::setupStruct( NLGEORGES::UFormElm *node ) +{ + NLGEORGES::CFormElmStruct *st = static_cast< NLGEORGES::CFormElmStruct* >( node ); + + for( int i = 0; i < st->Elements.size(); i++ ) + { + NLGEORGES::CFormElmStruct::CFormElmStructElm &elm = st->Elements[ i ]; + if( ( elm.Element != NULL ) && !elm.Element->isAtom() ) + continue; + + if( elm.Element == NULL ) + { + NLGEORGES::CFormDfn::CEntry &entry = st->FormDfn->getEntry( i ); + if( entry.getArrayFlag() ) + continue; + } + + setupAtom( elm ); + } +} + +void BrowserCtrlPvt::setupNode( NLGEORGES::UFormElm *node ) +{ + if( node->isStruct() ) + setupStruct( node ); + else + if( node->isArray() ) + setupArray( node ); + else + return; + + m_currentNode = node; + m_browser->setFactoryForManager( mgr, factory ); +} + +void BrowserCtrlPvt::clear() +{ + m_browser->clear(); + m_currentNode = NULL; +} + + +void BrowserCtrlPvt::onStructValueChanged( QtProperty *p, const QVariant &value ) +{ + std::string k = p->propertyName().toUtf8().constData(); + std::string v = value.toString().toUtf8().constData(); + + bool created = false; + m_currentNode->setValueByName( v.c_str(), k.c_str(), &created ); + + Q_EMIT modified(); +} + +void BrowserCtrlPvt::onArrayValueChanged( QtProperty *p, const QVariant &value ) +{ + NLGEORGES::CFormElmArray *arr = static_cast< NLGEORGES::CFormElmArray* >( m_currentNode ); + std::string formName; + arr->getFormName( formName, NULL ); + + int newSize = value.toInt(); + int oldSize = arr->Elements.size(); + + if( newSize == oldSize ) + return; + + if( newSize < oldSize ) + { + for( int i = newSize; i < oldSize; i++ ) + { + delete arr->Elements[ i ].Element; + } + + arr->Elements.resize( newSize ); + } + else + { + arr->Elements.resize( newSize ); + + + const NLGEORGES::CFormDfn *parentDfn; + const NLGEORGES::CFormDfn *nodeDfn; + uint indexDfn; + const NLGEORGES::CType *type; + NLGEORGES::UFormDfn::TEntryType entryType; + NLGEORGES::CFormElm *node; + bool created; + bool isArray; + + QString idx; + + for( int i = oldSize; i < newSize; i++ ) + { + idx.clear(); + idx += "["; + idx += QString::number( i ); + idx += "]"; + + bool b; + b = arr->createNodeByName( idx.toUtf8().constData(), &parentDfn, indexDfn, &nodeDfn, &type, &node, entryType, isArray, created ); + } + } + + QString name = formName.c_str(); + Q_EMIT arrayResized( name, newSize ); + Q_EMIT modified(); +} + +void BrowserCtrlPvt::onValueChanged( QtProperty *p, const QVariant &value ) +{ + if( m_currentNode == NULL ) + return; + + if( m_currentNode->isStruct() ) + onStructValueChanged( p, value ); + else + if( m_currentNode->isArray() ) + onArrayValueChanged( p, value ); +} + + diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h new file mode 100644 index 000000000..c34d5ce0c --- /dev/null +++ b/code/studio/src/plugins/georges_editor/browser_ctrl_pvt.h @@ -0,0 +1,54 @@ +#ifndef BROWSER_CTRL_PVT_H +#define BROWSER_CTRL_PVT_H + +#include + +namespace NLGEORGES +{ + class CFormElm; + class UFormElm; + class CFormElmStruct; +} + +class QtVariantPropertyManager; +class QtVariantEditorFactory; +class QtTreePropertyBrowser; +class QVariant; +class QtProperty; + +class BrowserCtrlPvt : public QObject +{ + Q_OBJECT +public: + BrowserCtrlPvt( QObject *parent = NULL ); + ~BrowserCtrlPvt(); + + void clear(); + void setupNode( NLGEORGES::UFormElm *node ); + void onValueChanged( QtProperty *p, const QVariant &value ); + + QtVariantPropertyManager* manager() const{ return mgr; } + void setRootNode( NLGEORGES::CFormElm *root ){ m_rootNode = root; } + void setBrowser( QtTreePropertyBrowser *browser ){ m_browser = browser; } + +Q_SIGNALS: + void arrayResized( const QString &name, int size ); + void modified(); + +private: + void setupStruct( NLGEORGES::UFormElm *node ); + void setupArray( NLGEORGES::UFormElm *node ); + void setupAtom( NLGEORGES::CFormElmStruct::CFormElmStructElm &elm ); + + void onStructValueChanged( QtProperty *p, const QVariant &value ); + void onArrayValueChanged( QtProperty *p, const QVariant &value ); + + QtVariantPropertyManager *mgr; + QtVariantEditorFactory *factory; + QtTreePropertyBrowser *m_browser; + + NLGEORGES::UFormElm *m_currentNode; + NLGEORGES::CFormElm *m_rootNode; +}; + +#endif diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/expandable_headerview.cpp b/code/studio/src/plugins/georges_editor/expandable_headerview.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/expandable_headerview.cpp rename to code/studio/src/plugins/georges_editor/expandable_headerview.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/expandable_headerview.h b/code/studio/src/plugins/georges_editor/expandable_headerview.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/expandable_headerview.h rename to code/studio/src/plugins/georges_editor/expandable_headerview.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formdelegate.cpp b/code/studio/src/plugins/georges_editor/formdelegate.cpp similarity index 99% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formdelegate.cpp rename to code/studio/src/plugins/georges_editor/formdelegate.cpp index 91f62c24b..f2a2ba6c3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formdelegate.cpp +++ b/code/studio/src/plugins/georges_editor/formdelegate.cpp @@ -38,6 +38,8 @@ #include "georgesform_proxy_model.h" #include "formitem.h" +#if 0 + namespace GeorgesQt { @@ -277,3 +279,5 @@ namespace GeorgesQt editor->setGeometry(r); } } /* namespace GeorgesQt */ + +#endif // 0 \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formdelegate.h b/code/studio/src/plugins/georges_editor/formdelegate.h similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formdelegate.h rename to code/studio/src/plugins/georges_editor/formdelegate.h index b6885833e..42b10ef3d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formdelegate.h +++ b/code/studio/src/plugins/georges_editor/formdelegate.h @@ -19,6 +19,8 @@ #include +#if 0 + namespace GeorgesQt { @@ -38,4 +40,6 @@ namespace GeorgesQt }; } +#endif // 0 + #endif // FORMDELEGATE_H diff --git a/code/studio/src/plugins/georges_editor/formitem.cpp b/code/studio/src/plugins/georges_editor/formitem.cpp new file mode 100644 index 000000000..1ca2ecbe1 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/formitem.cpp @@ -0,0 +1,255 @@ +// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework +// Copyright (C) 2011 Adrian Jaekel +// +// 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 "formitem.h" +#include "actions.h" +#include "georges_editor_form.h" + +// Qt includes +#include + +// NeL includes +#include +#include +#include +#include + +using namespace NLGEORGES; + +namespace GeorgesQt +{ + CFormItem::CFormItem() + { + } + + CFormItem::~CFormItem() + { + clearChildren(); + } + + void CFormItem::appendChild(CFormItem *item) + { + childItems.append(item); + } + + CFormItem *CFormItem::child(int row) + { + return childItems.value(row); + } + + int CFormItem::childCount() const + { + return childItems.count(); + } + + int CFormItem::columnCount() const + { + //nlinfo("columnCount %d",itemData.count()); + //return itemData.count(); + return 1; + } + + QVariant CFormItem::data(int column) const + { + //return itemData.value(column); + return QVariant(_Name.c_str()); + } + + CFormItem *CFormItem::parent() + { + return parentItem; + } + + int CFormItem::row() const + { + if (parentItem) + return parentItem->childItems.indexOf(const_cast(this)); + + return 0; + } + + bool CFormItem::setData(int column, const QVariant &value) + { + nlwarning("This should not be called anymore."); + return false; + } + + bool CFormItem::isEditable(int column) + { + // Ensure only valid types can be edited. + if(_Type == Null) + return false; + + // Make sure only the first column (name) can be editted. + if (column != 0) + return false; + + if(isArrayMember()) + return true; + + return false; + } + + bool CFormItem::isArray() + { + // If it wasn't a root node then lets check the node type. + const NLGEORGES::CFormDfn *parentDfn; + uint indexDfn; + const NLGEORGES::CFormDfn *nodeDfn; + const NLGEORGES::CType *nodeType; + NLGEORGES::CFormElm *node; + NLGEORGES::UFormDfn::TEntryType type; + bool array; + bool parentVDfnArray; + NLGEORGES::CForm *form = static_cast(m_form); + NLGEORGES::CFormElm *elm = static_cast(&form->getRootNode()); + nlverify ( elm->getNodeByName (_FormName.c_str(), &parentDfn, indexDfn, + &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) ); + + if(array && node) + return true; + + return false; + } + + bool CFormItem::isArrayMember() + { + CFormItem *parent = this->parent(); + + // If it wasn't a root node then lets check the node type. + const NLGEORGES::CFormDfn *parentDfn; + uint indexDfn; + const NLGEORGES::CFormDfn *nodeDfn; + const NLGEORGES::CType *nodeType; + NLGEORGES::CFormElm *parentNode; + NLGEORGES::UFormDfn::TEntryType type; + bool array; + bool parentVDfnArray; + NLGEORGES::CForm *form = static_cast(m_form); + NLGEORGES::CFormElm *elm = static_cast(&form->getRootNode()); + nlverify ( elm->getNodeByName (parent->formName ().c_str (), &parentDfn, indexDfn, + &nodeDfn, &nodeType, &parentNode, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) ); + + if(array && parentNode) + return true; + + return false; + } + + QIcon CFormItem::getItemImage(CFormItem *rootItem) + { + if(_Type == CFormItem::Null) + { + return QIcon(":/images/root.ico"); + } + else if(_Type == CFormItem::Form) + { + // If the parent is the root item then this is the content. + if(parentItem == rootItem) + return QIcon(":/images/root.ico"); + + // If it wasn't a root node then lets check the node type. + const NLGEORGES::CFormDfn *parentDfn; + uint indexDfn; + const NLGEORGES::CFormDfn *nodeDfn; + const NLGEORGES::CType *nodeType; + NLGEORGES::CFormElm *node; + NLGEORGES::UFormDfn::TEntryType type; + bool array; + bool parentVDfnArray; + NLGEORGES::CForm *form = static_cast(m_form); + NLGEORGES::CFormElm *elm = static_cast(&form->getRootNode()); + nlverify ( elm->getNodeByName (_FormName.c_str(), &parentDfn, indexDfn, &nodeDfn, &nodeType, &node, type, array, parentVDfnArray, true, NLGEORGES_FIRST_ROUND) ); + + if(array) + { + return QIcon(":/images/array.ico"); + } + else + { + if(type == NLGEORGES::UFormDfn::EntryType) + { + if(parentDfn) + { + // Not sure what the hell to do with this. Gets filename from parent dfn? + } + return QIcon(":/images/zfee51.ico"); + } + else if(type == NLGEORGES::UFormDfn::EntryDfn) + { + if(parentDfn) + { + // Not sure what the hell to do with this. Gets filename from parent dfn? + } + return QIcon(":/images/struct.ico"); + } + else if(type == NLGEORGES::UFormDfn::EntryVirtualDfn) + { + if(node) + { + // Not sure what the hell to do with this. Gets filename from parent dfn? + std::string dfnName; + NLMISC::safe_cast(node)->getDfnName(dfnName); + // return dfnName.c_str() ? + } + return QIcon(":/images/vstruct.ico"); + } + } + //return QIcon(":/images/struct.ico"); + } + return QIcon(); + } + + CFormItem* CFormItem::findItem( const QString &formName ) + { + CFormItem *item = NULL; + + if( _FormName.c_str() == formName ) + return this; + + for( int i = 0; i < childItems.count(); i++ ) + { + item = childItems[ i ]->findItem( formName ); + if( item != NULL ) + return item; + } + + return item; + } + + void CFormItem::clearChildren() + { + qDeleteAll( childItems ); + childItems.clear(); + } + + CFormItem *CFormItem::add (TSub type, const char *name, uint structId, const char *formName, uint slot, NLGEORGES::UForm *formPtr) + { + CFormItem *newNode = new CFormItem(); + newNode->_Type = type; + newNode->_Name = name; + newNode->parentItem = this; + newNode->_StructId = structId; + newNode->_FormName = formName; + newNode->_Slot = slot; + newNode->m_form = formPtr; + + appendChild(newNode); + return newNode; + } + +} diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formitem.h b/code/studio/src/plugins/georges_editor/formitem.h similarity index 50% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formitem.h rename to code/studio/src/plugins/georges_editor/formitem.h index f440d1cf4..d29dfce0c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/formitem.h +++ b/code/studio/src/plugins/georges_editor/formitem.h @@ -18,6 +18,7 @@ #define FORMITEM_H // NeL includes +#include #include // Qt includes @@ -28,17 +29,25 @@ namespace GeorgesQt { class CFormItem - { public: - CFormItem(NLGEORGES::UFormElm *elm, const QList &data, - CFormItem *parent = 0, - NLGEORGES::UFormElm::TWhereIsValue = NLGEORGES::UFormElm::ValueForm, - NLGEORGES::UFormElm::TWhereIsNode = NLGEORGES::UFormElm::NodeForm); + // What is the sub object ? + enum TSub + { + Null, // Nothing in this node (root ?) + Header, // Header node + Type, // This node is a type + Dfn, // This node is a dfn + Form, // This node is a form + }; + + CFormItem(); ~CFormItem(); void appendChild(CFormItem *child); + CFormItem *add (TSub type, const char *name, uint structId, const char *formName, uint slot, NLGEORGES::UForm *formPtr); + CFormItem *child(int row); int childCount() const; int columnCount() const; @@ -46,23 +55,40 @@ namespace GeorgesQt int row() const; CFormItem *parent(); bool setData(int column, const QVariant &value); - NLGEORGES::UFormElm* getFormElm() {return formElm;} - NLGEORGES::UFormElm::TWhereIsValue valueFrom() - { - return whereV; - } - NLGEORGES::UFormElm::TWhereIsNode nodeFrom() - { - return whereN; - } - - private: + + TSub nodeType() { return _Type; } + std::string formName() { return _FormName; } + + std::string name() { return _Name; } + void setName(std::string name) { _Name = name; } + + uint structId() { return _StructId; } + + NLGEORGES::UForm *form() { return m_form; } + + bool isEditable(int column); + bool isArray(); + bool isArrayMember(); + + QIcon getItemImage(CFormItem *rootItem); + + CFormItem* findItem( const QString &formName ); + + void clearChildren(); + + private: QList childItems; QList itemData; CFormItem *parentItem; NLGEORGES::UFormElm* formElm; - NLGEORGES::UFormElm::TWhereIsValue whereV; - NLGEORGES::UFormElm::TWhereIsNode whereN; + NLGEORGES::UForm *m_form; + + uint _StructId; + std::string _Name; + std::string _FormName; + TSub _Type; + uint _Slot; + }; // CFormItem } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges.cpp b/code/studio/src/plugins/georges_editor/georges.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges.cpp rename to code/studio/src/plugins/georges_editor/georges.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges.h b/code/studio/src/plugins/georges_editor/georges.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges.h rename to code/studio/src/plugins/georges_editor/georges.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_dialog.cpp rename to code/studio/src/plugins/georges_editor/georges_dirtree_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_dialog.h b/code/studio/src/plugins/georges_editor/georges_dirtree_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_dialog.h rename to code/studio/src/plugins/georges_editor/georges_dirtree_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_form.ui b/code/studio/src/plugins/georges_editor/georges_dirtree_form.ui similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_form.ui rename to code/studio/src/plugins/georges_editor/georges_dirtree_form.ui index e14857e89..64f8cc57c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_dirtree_form.ui +++ b/code/studio/src/plugins/georges_editor/georges_dirtree_form.ui @@ -77,7 +77,7 @@ - + diff --git a/code/studio/src/plugins/georges_editor/georges_editor.qrc b/code/studio/src/plugins/georges_editor/georges_editor.qrc new file mode 100644 index 000000000..8d71d1438 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/georges_editor.qrc @@ -0,0 +1,12 @@ + + + images/array.ico + images/header.ico + images/hold.ico + images/root.ico + images/struct.ico + images/vstruct.ico + images/zfee51.ico + images/ic_nel_georges_editor.png + + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_constants.h b/code/studio/src/plugins/georges_editor/georges_editor_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_constants.h rename to code/studio/src/plugins/georges_editor/georges_editor_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.cpp b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.cpp rename to code/studio/src/plugins/georges_editor/georges_editor_form.cpp index 6c46d4964..dc0ca409d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp @@ -36,6 +36,7 @@ namespace GeorgesQt { + QUndoStack *GeorgesEditorForm::UndoStack = NULL; GeorgesEditorForm::GeorgesEditorForm(QWidget *parent) : QMainWindow(parent), @@ -62,7 +63,7 @@ namespace GeorgesQt m_mainDock->setDockNestingEnabled(true); layout->addWidget(m_mainDock); - m_undoStack = new QUndoStack(this); + UndoStack = new QUndoStack(this); Core::MenuManager *menuManager = Core::ICore::instance()->menuManager(); m_openAction = menuManager->action(Core::Constants::OPEN); @@ -115,7 +116,7 @@ namespace GeorgesQt QUndoStack *GeorgesEditorForm::undoStack() const { - return m_undoStack; + return UndoStack; } void GeorgesEditorForm::open() @@ -212,7 +213,7 @@ namespace GeorgesQt } CGeorgesTreeViewDialog *dock = new CGeorgesTreeViewDialog(m_mainDock); - dock->setUndoStack(m_undoStack); + dock->setUndoStack(UndoStack); m_lastActiveDock = dock; m_dockedWidgets.append(dock); @@ -270,10 +271,16 @@ namespace GeorgesQt void GeorgesEditorForm::setModified () { qDebug() << "setModified"; + bool saveEnabled = false; if (m_lastActiveDock) - m_saveAction->setEnabled(m_lastActiveDock->isModified()); + saveEnabled = m_lastActiveDock->isModified(); else - m_saveAction->setEnabled(false); + saveEnabled = false; + + m_saveAction->setEnabled( saveEnabled ); + + QAction *saveAction = Core::ICore::instance()->menuManager()->action( Core::Constants::SAVE ); + saveAction->setEnabled( saveEnabled ); } void GeorgesEditorForm::focusChanged ( QWidget * old, QWidget * now ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.h b/code/studio/src/plugins/georges_editor/georges_editor_form.h similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.h rename to code/studio/src/plugins/georges_editor/georges_editor_form.h index 77fdd1ec8..c9cef964c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.h +++ b/code/studio/src/plugins/georges_editor/georges_editor_form.h @@ -38,6 +38,8 @@ public: QUndoStack *undoStack() const; + static QUndoStack *UndoStack; + public Q_SLOTS: void open(); void loadFile(const QString fileName); @@ -54,7 +56,6 @@ private: void readSettings(); void writeSettings(); - QUndoStack *m_undoStack; Ui::GeorgesEditorForm m_ui; CGeorgesDirTreeDialog *m_georgesDirTreeDialog; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.ui b/code/studio/src/plugins/georges_editor/georges_editor_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_form.ui rename to code/studio/src/plugins/georges_editor/georges_editor_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_plugin.cpp b/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_plugin.cpp rename to code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp index 075ac41b2..f1b419e4e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_plugin.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_plugin.cpp @@ -39,6 +39,9 @@ GeorgesEditorPlugin::~GeorgesEditorPlugin() } qDeleteAll(m_autoReleaseObjects); m_autoReleaseObjects.clear(); + + delete m_libContext; + m_libContext = NULL; } bool GeorgesEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_plugin.h b/code/studio/src/plugins/georges_editor/georges_editor_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_editor_plugin.h rename to code/studio/src/plugins/georges_editor/georges_editor_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_filesystem_model.cpp b/code/studio/src/plugins/georges_editor/georges_filesystem_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_filesystem_model.cpp rename to code/studio/src/plugins/georges_editor/georges_filesystem_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_filesystem_model.h b/code/studio/src/plugins/georges_editor/georges_filesystem_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_filesystem_model.h rename to code/studio/src/plugins/georges_editor/georges_filesystem_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp similarity index 52% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_dialog.cpp rename to code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp index c19a01fd7..3ecc73045 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_dialog.cpp +++ b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.cpp @@ -14,14 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdpch.h" #include "georges_treeview_dialog.h" -#include "georges.h" -#include "georgesform_model.h" -#include "georgesform_proxy_model.h" -#include "formitem.h" -#include "formdelegate.h" -#include "expandable_headerview.h" // Qt includes #include @@ -43,6 +36,15 @@ #include "../core/icore.h" #include "../core/core_constants.h" +// Project includes +#include "georges.h" +#include "georgesform_model.h" +#include "georgesform_proxy_model.h" +#include "formitem.h" +#include "formdelegate.h" +#include "expandable_headerview.h" +#include "browser_ctrl.h" + using namespace NLMISC; using namespace NLGEORGES; @@ -60,7 +62,7 @@ namespace GeorgesQt // Set the default sheet dir dir to the level design path. m_lastSheetDir = "."; QSettings *settings = Core::ICore::instance()->settings(); - settings->beginGroup(Core::Constants::DATA_PATH_SECTION); + settings->beginGroup(Core::Constants::DATA_PATH_SECTION); m_lastSheetDir = settings->value(Core::Constants::LEVELDESIGN_PATH, "l:/leveldesign").toString(); settings->endGroup(); @@ -71,29 +73,31 @@ namespace GeorgesQt m_ui.treeView->header()->setStretchLastSection(true); m_ui.treeViewTabWidget->setTabEnabled (2,false); - m_ui.checkBoxParent->setStyleSheet("background-color: rgba(0,255,0,30)"); - m_ui.checkBoxDefaults->setStyleSheet("background-color: rgba(255,0,0,30)"); m_form = 0; + m_model = NULL; - FormDelegate *formdelegate = new FormDelegate(this); - m_ui.treeView->setItemDelegateForColumn(1, formdelegate); + m_ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu); - // Set up custom context menu. - setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showContextMenu(const QPoint&))); + m_browserCtrl = new BrowserCtrl( m_ui.propertiesBrowser ); + connect(m_ui.treeView, SIGNAL(customContextMenuRequested(const QPoint&)), + this, SLOT(showContextMenu(const QPoint&))); connect(m_ui.treeView, SIGNAL(doubleClicked (QModelIndex)), this, SLOT(doubleClicked (QModelIndex))); - connect(m_ui.checkBoxParent, SIGNAL(toggled(bool)), - this, SLOT(filterRows())); - connect(m_ui.checkBoxDefaults, SIGNAL(toggled(bool)), - this, SLOT(filterRows())); + connect(m_ui.treeView, SIGNAL(clicked(const QModelIndex&)), + m_browserCtrl, SLOT(clicked(const QModelIndex&))); connect(m_header, SIGNAL(headerClicked(int)), this, SLOT(headerClicked(int))); + connect(m_browserCtrl, SIGNAL(arrayResized(const QString&,int)), this, SLOT(onArrayResized(const QString&,int))); + + connect(m_browserCtrl, SIGNAL(modified()), this, SLOT(modifiedFile())); } CGeorgesTreeViewDialog::~CGeorgesTreeViewDialog() { + m_browserCtrl = NULL; + m_model = NULL; + delete m_form; qDebug() << "DTOR"; } @@ -101,45 +105,46 @@ namespace GeorgesQt void CGeorgesTreeViewDialog::headerClicked(int section) { if (section == 0) - { + { if (*(m_header->expanded())) m_ui.treeView->expandAll(); else m_ui.treeView->collapseAll(); - } + } } void CGeorgesTreeViewDialog::setForm(const CForm *form) { m_form = (UForm*)form; + m_browserCtrl->setForm( (UForm*)form ); } NLGEORGES::CForm* CGeorgesTreeViewDialog::getFormByName(const QString formName) { - if(NLMISC::CPath::exists(formName.toUtf8().constData())) + if(NLMISC::CPath::exists(formName.toAscii().data())) { - //NLGEORGES::CForm *form = dynamic_cast(m_georges->loadForm(formName.toUtf8())); - return (NLGEORGES::CForm *)m_georges->loadForm(formName.toUtf8().constData()); + //NLGEORGES::CForm *form = dynamic_cast(m_georges->loadForm(formName.toAscii().data())); + return (NLGEORGES::CForm *)m_georges->loadForm(formName.toAscii().data()); } //else //{ // CForm *form = 0; // // Load the DFN - // std::string extStr = NLMISC::CFile::getExtension( formName.toUtf8() ); + // std::string extStr = NLMISC::CFile::getExtension( formName.toAscii().data() ); // QString dfnName = QString("%1.dfn").arg(extStr.c_str()); // UFormDfn *formdfn; - // if (NLMISC::CPath::exists(dfnName.toUtf8())) + // if (NLMISC::CPath::exists(dfnName.toAscii().data())) // { - // formdfn = _georges->loadFormDfn (dfnName.toUtf8()); + // formdfn = _georges->loadFormDfn (dfnName.toAscii().data()); // if (!formdfn) // { - // nlwarning("Failed to load dfn: %s", dfnName.toUtf8()); + // nlwarning("Failed to load dfn: %s", dfnName.toAscii().data()); // return 0; // } // } // else // { - // nlwarning("Cannot find dfn: %s", dfnName.toUtf8()); + // nlwarning("Cannot find dfn: %s", dfnName.toAscii().data()); // return 0; // } @@ -155,56 +160,56 @@ namespace GeorgesQt // } // return form; //} - nlinfo("File '%s' does not exist!", formName.toUtf8().constData()); + nlinfo("File '%s' does not exist!", formName.toAscii().data()); return 0; } NLGEORGES::CForm* CGeorgesTreeViewDialog::getFormByDfnName(const QString dfnName) { - if(NLMISC::CPath::exists(dfnName.toUtf8().constData())) - { - // Create a new form object. - NLGEORGES::CForm *form = new NLGEORGES::CForm(); - m_form = form; + if(NLMISC::CPath::exists(dfnName.toAscii().data())) + { + // Create a new form object. + NLGEORGES::CForm *form = new NLGEORGES::CForm(); + m_form = form; - // Retrieve a copy of the root definition. - NLGEORGES::CFormDfn *formDfn = dynamic_cast(m_georges->loadFormDfn(dfnName.toUtf8().constData())); + // Retrieve a copy of the root definition. + NLGEORGES::CFormDfn *formDfn = dynamic_cast(m_georges->loadFormDfn(dfnName.toAscii().data())); - // Next we'll use the root node to build a new form. - NLGEORGES::CFormElmStruct *fes = dynamic_cast(getRootNode(0)); - fes->build(formDfn); + // Next we'll use the root node to build a new form. + NLGEORGES::CFormElmStruct *fes = dynamic_cast(getRootNode(0)); + fes->build(formDfn); - // And then initialize the held elements; - for(uint i = 0; i(getRootNode(i+1)); - fes->build(formDfn); - } - - return form; - } - nlinfo("File '%s' does not exist!", dfnName.toUtf8().constData()); - return NULL; + // And then initialize the held elements; + for(uint i = 0; i(getRootNode(i+1)); + fes->build(formDfn); + } + + return form; + } + nlinfo("File '%s' does not exist!", dfnName.toAscii().data()); + return NULL; } NLGEORGES::CFormElm *CGeorgesTreeViewDialog::getRootNode(uint slot) { - NLGEORGES::CForm *form = getFormPtr(); + NLGEORGES::CForm *form = getFormPtr(); - if(slot == 0) - { - const NLGEORGES::UFormElm &formElm = form->getRootNode(); - return (NLGEORGES::CFormElm *)&formElm; - } + if(slot == 0) + { + const NLGEORGES::UFormElm &formElm = form->getRootNode(); + return (NLGEORGES::CFormElm *)&formElm; + } - // Make sure the slot value is valid and then return the corresponding element. - nlassert(slot < NLGEORGES::CForm::HeldElementCount+1); - return getFormPtr()->HeldElements[slot-1]; + // Make sure the slot value is valid and then return the corresponding element. + nlassert(slot < NLGEORGES::CForm::HeldElementCount+1); + return getFormPtr()->HeldElements[slot-1]; } NLGEORGES::CForm *CGeorgesTreeViewDialog::getFormPtr() { - return dynamic_cast(m_form); + return dynamic_cast(m_form); } void CGeorgesTreeViewDialog::loadFormIntoDialog(CForm *form) @@ -218,14 +223,16 @@ namespace GeorgesQt UFormElm *root = 0; root = &m_form->getRootNode(); + // Extract the parent forms into the list of parents in the dialog. QStringList parents; - uint cnt = form->getParentCount(); - for (uint i = 0; i < cnt /*form->getParentCount()*/; i++) + uint cnt = form->getParentCount(); + for (uint i = 0; i < cnt /*form->getParentCount()*/; i++) { UForm *u = m_form->getParentForm(i); parents << u->getFilename().c_str(); } + // Exact the comment box for the dialog. QString comments; comments = m_form->getComment().c_str(); @@ -249,39 +256,33 @@ namespace GeorgesQt nlinfo("typ's %d",deps["typ"].count()); nlinfo("dfn's %d",deps["dfn"].count()); - //nlwarning(strList.join(";").toUtf8()); + //nlwarning(strList.join(";").toAscii().data()); if (root) { loadedForm = m_form->getFilename().c_str(); - CGeorgesFormModel *model = new CGeorgesFormModel(root,deps,comments,parents,m_header->expanded()); - CGeorgesFormProxyModel *proxyModel = new CGeorgesFormProxyModel(); - proxyModel->setSourceModel(model); - m_ui.treeView->setModel(proxyModel); + CGeorgesFormModel *model = new CGeorgesFormModel(m_form,deps,comments,parents,m_header->expanded()); + m_ui.treeView->setModel(model); m_ui.treeView->expandAll(); - // this is a debug output row - m_ui.treeView->hideColumn(3); - - filterRows(); - // //_ui.treeView->setRowHidden(0,QModelIndex(),true); connect(model, SIGNAL(dataChanged(const QModelIndex, const QModelIndex)), this, SLOT(modifiedFile())); setWindowTitle(loadedForm); // //Modules::mainWin().getTabBar(); + + m_model = model; } } void CGeorgesTreeViewDialog::addParentForm(QString parentFormNm) { // Try to load the form - NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toUtf8().constData()); + NLGEORGES::UForm *uParentForm = m_georges->loadForm(parentFormNm.toAscii().data()); NLGEORGES::CForm *parentForm = dynamic_cast(uParentForm); NLGEORGES::CForm *mainForm = static_cast(m_form); - CGeorgesFormProxyModel * proxyModel = dynamic_cast(m_ui.treeView->model()); - CGeorgesFormModel *model = dynamic_cast(proxyModel->sourceModel()); + CGeorgesFormModel *model = dynamic_cast(m_ui.treeView->model()); if(parentForm) { @@ -291,11 +292,11 @@ namespace GeorgesQt if (parentForm->Elements.FormDfn == mainForm->Elements.FormDfn) { // This is the parent form selector - if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toUtf8(), parentForm)) - nlwarning("Failed to add parent form: %s", parentFormNm.toUtf8().constData()); + if(!mainForm->insertParent(mainForm->getParentCount(),parentFormNm.toAscii().data(), parentForm)) + nlwarning("Failed to add parent form: %s", parentFormNm.toAscii().data()); else { - nlinfo("Successfullyadded parent form: %s", parentFormNm.toUtf8().constData()); + nlinfo("Successfullyadded parent form: %s", parentFormNm.toAscii().data()); model->addParentForm(parentFormNm); } } @@ -316,12 +317,12 @@ namespace GeorgesQt void CGeorgesTreeViewDialog::write( ) { - NLMISC::COFile file; - std::string s = NLMISC::CPath::lookup(loadedForm.toUtf8().constData(), false); - if(file.open (s)) - { - try - { + NLMISC::COFile file; + std::string s = NLMISC::CPath::lookup(loadedForm.toAscii().data(), false); + if(file.open (s)) + { + try + { // if (loadedForm.contains(".typ")) // { // //nlassert (Type != NULL); @@ -334,7 +335,7 @@ namespace GeorgesQt // // flushValueChange (); // //} // //Type->write (xmlStream.getDocument (), theApp.Georges4CVS); - // //modify (NULL, NULL, false); + // //modify (NULL, NULL, false); // //flushValueChange (); // //UpdateAllViews (NULL); // //return TRUE; @@ -356,9 +357,9 @@ namespace GeorgesQt // } // else // { - nlassert (m_form != NULL); + nlassert (m_form != NULL); - // Write the file + // Write the file // /*if (IsModified ()) // { // ((CForm*)(UForm*)Form)->Header.MinorVersion++; @@ -380,33 +381,29 @@ namespace GeorgesQt // // Get the left view // //CView* pView = getLeftView (); // } - } - catch (Exception &e) - { - nlerror("Error while loading file: %s", e.what()); - } - } - else - { - nlerror("Can't open the file %s for writing.", s.c_str()); - } + } + catch (Exception &e) + { + nlerror("Error while loading file: %s", e.what()); + } + } + else + { + nlerror("Can't open the file %s for writing.", s.c_str()); + } } void CGeorgesTreeViewDialog::doubleClicked ( const QModelIndex & index ) { - // TODO: this is messy :( perhaps this can be done better - CGeorgesFormProxyModel * proxyModel = - dynamic_cast(m_ui.treeView->model()); - CGeorgesFormModel *model = - dynamic_cast(proxyModel->sourceModel()); - QModelIndex sourceIndex = proxyModel->mapToSource(index); + //CGeorgesFormModel *model = + // dynamic_cast((m_ui.treeView->model()); - CFormItem *item = model->getItem(sourceIndex); + //CFormItem *item = model->getItem(index); - if (item->parent() && item->parent()->data(0) == "parents") - { - Q_EMIT changeFile(CPath::lookup(item->data(0).toString().toUtf8().constData(),false).c_str()); - } + //if (item->parent() && item->parent()->data(0) == "parents") + //{ + // Q_EMIT changeFile(CPath::lookup(item->data(0).toString().toAscii().data(),false).c_str()); + //} //// col containing additional stuff like icons //if (index.column() == 2) @@ -415,7 +412,7 @@ namespace GeorgesQt // CFormItem *item = m->getItem(in2); // QString value = item->data(1).toString(); - // QString path = CPath::lookup(value.toUtf8(),false).c_str(); + // QString path = CPath::lookup(value.toAscii().data(),false).c_str(); // if(value.contains(".tga") || value.contains(".png")) // { @@ -443,7 +440,7 @@ namespace GeorgesQt // { // Modules::objViewInt()->resetScene(); // //Modules::config().configRemapExtensions(); - // Modules::objViewInt()->loadMesh(path.toUtf8(),""); + // Modules::objViewInt()->loadMesh(path.toAscii().data(),""); // } // return; // } @@ -456,6 +453,23 @@ namespace GeorgesQt //} } + void CGeorgesTreeViewDialog::onArrayResized( const QString &name, int size ) + { + QModelIndex current = m_ui.treeView->currentIndex(); + QModelIndex parent = current.parent(); + int r = current.row(); + int c = current.column(); + + m_model->arrayResized( name, size ); + m_ui.treeView->reset(); + m_ui.treeView->expandAll(); + + QModelIndex idx = m_model->index( r, c, parent ); + if( !idx.isValid() ) + return; + m_ui.treeView->setCurrentIndex( idx ); + } + void CGeorgesTreeViewDialog::closeEvent(QCloseEvent *event) { Q_EMIT closing(); @@ -472,12 +486,12 @@ namespace GeorgesQt void CGeorgesTreeViewDialog::filterRows() { - CGeorgesFormProxyModel * mp = dynamic_cast(m_ui.treeView->model()); - CGeorgesFormModel *m = dynamic_cast(mp->sourceModel()); - if (m) { - m->setShowParents(m_ui.checkBoxParent->isChecked()); - m->setShowDefaults(m_ui.checkBoxDefaults->isChecked()); - } + //CGeorgesFormProxyModel * mp = dynamic_cast(m_ui.treeView->model()); + //CGeorgesFormModel *m = dynamic_cast(mp->sourceModel()); + //if (m) { + // m->setShowParents(m_ui.checkBoxParent->isChecked()); + // m->setShowDefaults(m_ui.checkBoxDefaults->isChecked()); + //} } void CGeorgesTreeViewDialog::showContextMenu(const QPoint &pos) @@ -485,116 +499,135 @@ namespace GeorgesQt QMenu contextMenu; QMenu *structContext = NULL; QPoint globalPos = this->mapToGlobal(pos); - + // Fisrt we're going to see if we've right clicked on a new item and select it. const QModelIndex &index = this->m_ui.treeView->currentIndex(); if(!index.isValid()) return; - CGeorgesFormProxyModel * mp = dynamic_cast(m_ui.treeView->model()); - CGeorgesFormModel *m = dynamic_cast(mp->sourceModel()); - QModelIndex sourceIndex = mp->mapToSource(index); + CGeorgesFormModel *m = dynamic_cast(m_ui.treeView->model()); - if (m) + if(m) { - - CFormItem *item = m->getItem(sourceIndex); + CFormItem *item = m->getItem(index); // Right click on the "parents" item - if (item->data(0) == "parents") - contextMenu.addAction("Add parent..."); - // Right click on a parent item - else if(item->parent() && item->parent()->data(0) == "parents") + // if (item->data(0) == "parents") + // contextMenu.addAction("Add parent..."); + // // Right click on a parent item + // else if(item->parent() && item->parent()->data(0) == "parents") + // { + // contextMenu.addAction("Add parent..."); + // contextMenu.addAction("Remove parent"); + // } + if(item->isArray()) { - contextMenu.addAction("Add parent..."); - contextMenu.addAction("Remove parent"); + contextMenu.addAction("Append array entry..."); } - else if(item->getFormElm()->isArray()) - contextMenu.addAction("Add array entry..."); - else if(item->getFormElm()->isStruct()) + else if(item->isArrayMember()) { - QMenu *structContext = new QMenu("Add struct element...", this); - contextMenu.addMenu(structContext); - - NLGEORGES::UFormDfn *defn = item->getFormElm()->getStructDfn(); - if(defn) - { - for(uint defnNum=0; defnNum < defn->getNumEntry(); defnNum++) - { - std::string entryName; - std::string dummy; - UFormElm::TWhereIsValue *whereV = new UFormElm::TWhereIsValue; - bool result = defn->getEntryName(defnNum, entryName); - bool result2 = item->getFormElm()->getValueByName(dummy, entryName.c_str(), NLGEORGES::UFormElm::Eval, whereV); - - - if(result2 && *whereV != UFormElm::ValueForm) - { - structContext->addAction(entryName.c_str()); - } - delete whereV; - } - } + contextMenu.addAction("Delete array entry..."); + contextMenu.addAction("Insert after array entry..."); } - else if(item->getFormElm()->isAtom() && item->valueFrom() == NLGEORGES::UFormElm::ValueForm) - contextMenu.addAction("Revert to parent/default..."); + // else if(item->getFormElm()->isStruct()) + // { + // QMenu *structContext = new QMenu("Add struct element...", this); + // contextMenu.addMenu(structContext); - QAction *selectedItem = contextMenu.exec(globalPos); - if(selectedItem) - { - if(selectedItem->text() == "Add parent...") - { - // Get the file extension of the form so we can build a dialog pattern. - QString file = m_form->getFilename().c_str(); - file = file.remove(0,file.indexOf(".")+1); - QString filePattern = "Parent Sheets (*."+file+")"; - - nlinfo("parent defn name '%s'", file.toUtf8().constData()); - QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select parent sheets..."), m_lastSheetDir, filePattern); - if(!fileNames.isEmpty()) - { - Q_FOREACH(QString fileToParent, fileNames) - { - // Get just the filename. Georges doesn't want the path. - QFileInfo pathInfo( fileToParent ); - QString tmpFileName( pathInfo.fileName() ); - - nlinfo("requesting to add parent form '%s'", tmpFileName.toUtf8().constData()); - - // Call to add the form and load it into the Georges form. - addParentForm(tmpFileName); - - // Save the file lookup path for future dialog boxes. - m_lastSheetDir = pathInfo.absolutePath(); - } - } - m_ui.treeView->expandAll(); - } - else if(selectedItem->text() == "Remove parent") - { - NLGEORGES::CForm *form = static_cast(m_form); - QString parentFileName = item->data(0).toString(); + // NLGEORGES::UFormDfn *defn = item->getFormElm()->getStructDfn(); + // if(defn) + // { + // for(uint defnNum=0; defnNum < defn->getNumEntry(); defnNum++) + // { + // std::string entryName; + // std::string dummy; + // UFormElm::TWhereIsValue *whereV = new UFormElm::TWhereIsValue; + // bool result = defn->getEntryName(defnNum, entryName); + // bool result2 = item->getFormElm()->getValueByName(dummy, entryName.c_str(), NLGEORGES::UFormElm::Eval, whereV); + + // + // if(result2 && *whereV != UFormElm::ValueForm) + // { + // structContext->addAction(entryName.c_str()); + // } + // delete whereV; + // } + // } + // } + // else if(item->getFormElm()->isAtom() && item->valueFrom() == NLGEORGES::UFormElm::ValueForm) + // contextMenu.addAction("Revert to parent/default..."); - for(uint num = 0; num < form->getParentCount(); num++) - { - QString curParentName = form->getParent(num)->getFilename().c_str(); - if(parentFileName == curParentName) - { - form->removeParent(num); - m->removeParentForm(parentFileName); - break; - } - } + QAction *selectedItem = contextMenu.exec(QCursor::pos()); + if(selectedItem) + { + if(selectedItem->text() == "Append array entry...") + { - m_ui.treeView->expandAll(); - } - } // if selected context menu item is valid. + } // Append an array entry... + else if(selectedItem->text() == "Delete array entry...") + { + + } + else if(selectedItem->text() == "Insert after array entry...") + { + + } + + + // if(selectedItem->text() == "Add parent...") + // { + // // Get the file extension of the form so we can build a dialog pattern. + // QString file = m_form->getFilename().c_str(); + // file = file.remove(0,file.indexOf(".")+1); + // QString filePattern = "Parent Sheets (*."+file+")"; + // + // nlinfo("parent defn name '%s'", file.toAscii().data()); + // QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Select parent sheets..."), m_lastSheetDir, filePattern); + // if(!fileNames.isEmpty()) + // { + // Q_FOREACH(QString fileToParent, fileNames) + // { + // // Get just the filename. Georges doesn't want the path. + // QFileInfo pathInfo( fileToParent ); + // QString tmpFileName( pathInfo.fileName() ); + + // nlinfo("requesting to add parent form '%s'", tmpFileName.toAscii().data()); + // + // // Call to add the form and load it into the Georges form. + // addParentForm(tmpFileName); + + // // Save the file lookup path for future dialog boxes. + // m_lastSheetDir = pathInfo.absolutePath(); + // } + // } + // m_ui.treeView->expandAll(); + // } + // else if(selectedItem->text() == "Remove parent") + // { + // NLGEORGES::CForm *form = static_cast(m_form); + // QString parentFileName = item->data(0).toString(); + + // for(uint num = 0; num < form->getParentCount(); num++) + // { + // QString curParentName = form->getParent(num)->getFilename().c_str(); + // if(parentFileName == curParentName) + // { + // form->removeParent(num); + // m->removeParentForm(parentFileName); + // break; + // } + // } + + // m_ui.treeView->expandAll(); + // } + + } // if selected context menu item is valid. } // if 'm' model valid. - if(structContext) - delete structContext; + //if(structContext) + // delete structContext; } } /* namespace GeorgesQt */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_dialog.h b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.h similarity index 84% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_dialog.h rename to code/studio/src/plugins/georges_editor/georges_treeview_dialog.h index e34ab572b..7b40fc3ef 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_dialog.h +++ b/code/studio/src/plugins/georges_editor/georges_treeview_dialog.h @@ -32,6 +32,8 @@ // Project includes +class BrowserCtrl; + namespace NLGEORGES { class UForm; @@ -45,6 +47,7 @@ namespace GeorgesQt { class CGeorges; + class CGeorgesFormModel; class CGeorgesTreeViewDialog: public QDockWidget { @@ -57,14 +60,14 @@ namespace GeorgesQt bool isModified() {return m_modified;} void setModified(bool m) {m_modified = m;} - NLGEORGES::CForm* getFormByName(const QString formName); - NLGEORGES::CForm* getFormByDfnName(const QString dfnName); + NLGEORGES::CForm* getFormByName(const QString formName); + NLGEORGES::CForm* getFormByDfnName(const QString dfnName); - /// Retrieves the root element based on the slot (document or held elements.) - NLGEORGES::CFormElm *getRootNode(uint slot); + /// Retrieves the root element based on the slot (document or held elements.) + NLGEORGES::CFormElm *getRootNode(uint slot); - /// Returns the form as a CForm pointer. - NLGEORGES::CForm *getFormPtr(); + /// Returns the form as a CForm pointer. + NLGEORGES::CForm *getFormPtr(); void addParentForm(QString parentFormNm); @@ -100,6 +103,8 @@ namespace GeorgesQt void filterRows(); void headerClicked(int); + void onArrayResized( const QString &name, int size ); + private: Ui::CGeorgesTreeViewDialog m_ui; ExpandableHeaderView *m_header; @@ -113,6 +118,9 @@ namespace GeorgesQt bool m_modified; + BrowserCtrl *m_browserCtrl; + CGeorgesFormModel *m_model; + }; /* CGeorgesTreeViewDialog */ } /* namespace GeorgesQt */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_form.ui b/code/studio/src/plugins/georges_editor/georges_treeview_form.ui similarity index 50% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_form.ui rename to code/studio/src/plugins/georges_editor/georges_treeview_form.ui index 8d53bfdd6..42d9afcf9 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georges_treeview_form.ui +++ b/code/studio/src/plugins/georges_editor/georges_treeview_form.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 300 + 564 + 525 @@ -18,8 +18,8 @@ - 199 - 165 + 280 + 242 @@ -29,9 +29,21 @@ - + + + 0 + 0 + + + + + + 0 + 0 + + QTabWidget::West @@ -39,60 +51,43 @@ 0 - - Qt::NoFocus - Form - - - 0 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - true - - - - - - - Parent - - - - - + + + Qt::Horizontal - - - 40 - 20 - - - - - - - - Defaults - + + + + 0 + 0 + + + + + 0 + 0 + + + + QAbstractItemView::NoEditTriggers + + + true + + + + + + 0 + 0 + + + @@ -126,8 +121,14 @@ - - - + + + QtTreePropertyBrowser + QWidget +

qttreepropertybrowser.h
+ 1 + + + diff --git a/code/studio/src/plugins/georges_editor/georgesform_model.cpp b/code/studio/src/plugins/georges_editor/georgesform_model.cpp new file mode 100644 index 000000000..90eaaaacd --- /dev/null +++ b/code/studio/src/plugins/georges_editor/georgesform_model.cpp @@ -0,0 +1,601 @@ +// Object Viewer Qt - Georges Editor Plugin - MMORPG Framework +// Copyright (C) 2011 Adrian Jaekel +// +// 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 "georgesform_model.h" + +// System Includes +#include + +// NeL includes +#include +#include +#include +#include +#include +#include +#include +#include + +// Qt includes +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// project includes +#include "formitem.h" +#include "georges_editor_form.h" +#include "actions.h" + +using namespace NLGEORGES; + +namespace GeorgesQt +{ + + CGeorgesFormModel::CGeorgesFormModel(UForm *form, QMap< QString, QStringList> deps, + QString comment, QStringList parents, bool *expanded, QObject *parent) : QAbstractItemModel(parent) + { + m_form = form; + m_rootData << "Value" << "Data" << "Extra";// << "Type"; + m_rootItem = new CFormItem(); + m_dependencies = deps; + m_comments = comment; + m_parents = parents; + m_parentRows = new QList; + m_expanded = expanded; + + setupModelData(); + } + + CGeorgesFormModel::~CGeorgesFormModel() + { + delete m_rootItem; + } + + /******************************************************************************/ + + QVariant CGeorgesFormModel::data(const QModelIndex &p_index, int p_role) const + { + if (!p_index.isValid()) + return QVariant(); + + switch (p_role) + { + case Qt::DisplayRole: + { + return getItem(p_index)->data(p_index.column()); + } + case Qt::DecorationRole: + { + // Based on the _Type return a QIcon from resources. + CFormItem *item = getItem(p_index); + return item->getItemImage(m_rootItem); + } + default: + return QVariant(); + } + } + + /******************************************************************************/ + + CFormItem *CGeorgesFormModel::getItem(const QModelIndex &index) const + { + if (index.isValid()) + { + CFormItem *item = static_cast(index.internalPointer()); + if (item) + return item; + } + return m_rootItem; + } + + /******************************************************************************/ + + bool CGeorgesFormModel::setData(const QModelIndex &index, const QVariant &value, int role) + { + + if (role != Qt::EditRole) + return false; + + CFormItem *item = getItem(index); + + if(!item->isEditable(index.column())) + return false; + + GeorgesEditorForm::UndoStack->push(new CUndoFormArrayRenameCommand(this,item,value)); + + Q_EMIT dataChanged(index, index); + + //setupModelData(); + return true; + } + + /******************************************************************************/ + + Qt::ItemFlags CGeorgesFormModel::flags(const QModelIndex& index) const { + + if (!index.isValid()) + return 0; + + Qt::ItemFlags returnValue = Qt::ItemIsSelectable | Qt::ItemIsEnabled; + + CFormItem *item = getItem(index); + + if(item->isEditable(index.column())) + { + returnValue |= Qt::ItemIsEditable; + } + + return returnValue; + + } + + /******************************************************************************/ + + QVariant CGeorgesFormModel::headerData(int section, + Qt::Orientation orientation, int role) const + { + if (orientation == Qt::Horizontal) + { + if (role == Qt::DisplayRole) + return m_rootItem->data(section); + if (role == Qt::TextAlignmentRole) + return Qt::AlignLeft; + if (section == 0 && role == Qt::DecorationRole) + { + // transparent pixmap as we paint it ourself with tree brach + // if we extend the HeaderView::paintSection for the CE_HeaderLabel + // we could drop this + QPixmap pixmap = QPixmap( + QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize), + QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize)); + // Create new picture for transparent + QPixmap transparent(pixmap.size()); + + // Do transparency + transparent.fill(Qt::transparent); + QPainter p(&transparent); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.drawPixmap(0, 0, pixmap); + p.setCompositionMode(QPainter::CompositionMode_DestinationIn); + // Set transparency level to 150 (possible values are 0-255) + // The alpha channel of a color specifies the transparency effect, + // 0 represents a fully transparent color, while 255 represents + // a fully opaque color. + p.fillRect(transparent.rect(), QColor(0, 0, 0, 0)); + p.end(); + + // Set original picture's reference to new transparent one + pixmap = transparent; + return pixmap; + } + } + return QVariant(); + } + + /******************************************************************************/ + + QModelIndex CGeorgesFormModel::index(int row, int column, const QModelIndex &parent) + const + { + if (!hasIndex(row, column, parent)) + return QModelIndex(); + + CFormItem *parentItem; + + if (!parent.isValid()) + parentItem = m_rootItem; + else + parentItem = static_cast(parent.internalPointer()); + + CFormItem *childItem = parentItem->child(row); + if (childItem) + return createIndex(row, column, childItem); + else + return QModelIndex(); + } + + QModelIndex CGeorgesFormModel::index(int row, int column, CFormItem *item) const + { + if(item == m_rootItem) + return QModelIndex(); + + return createIndex(row, 0, item); + } + + /******************************************************************************/ + + QModelIndex CGeorgesFormModel::parent(const QModelIndex &index) const + { + if (!index.isValid()) + return QModelIndex(); + + CFormItem *childItem = static_cast(index.internalPointer()); + CFormItem *parentItem = childItem->parent(); + + if (parentItem == m_rootItem) + return QModelIndex(); + + return createIndex(parentItem->row(), 0, parentItem); + } + + /******************************************************************************/ + + int CGeorgesFormModel::rowCount(const QModelIndex &parent) const { + + CFormItem *parentItem; + if (parent.column() > 0) + return 0; + + if (!parent.isValid()) + parentItem = m_rootItem; + else + parentItem = static_cast(parent.internalPointer()); + + return parentItem->childCount(); + + } + + /******************************************************************************/ + + int CGeorgesFormModel::columnCount(const QModelIndex &parent) const { + + if (parent.isValid()) + return static_cast(parent.internalPointer())->columnCount(); + else + return m_rootItem->columnCount(); + + } + + /******************************************************************************/ + + void CGeorgesFormModel::loadFormData(UFormElm *root, CFormItem *parent) { + return; + } + + CFormItem *CGeorgesFormModel::addStruct (CFormItem *parent, + NLGEORGES::CFormElmStruct *_struct, + NLGEORGES::CFormDfn *parentDfn, + const char *name, + uint structId, + const char *formName, + uint slot) +{ + // The form pointer + NLGEORGES::CForm *formPtr = static_cast(m_form); + + // Add the new node + CFormItem *newNode = parent->add(CFormItem::Form, name, structId, formName, slot, m_form); + + // Can be NULL in virtual DFN + if (parentDfn) + { + // Get the parents + std::vector arrayDfn; + arrayDfn.reserve (parentDfn->countParentDfn ()); + parentDfn->getParentDfn (arrayDfn); + + // For each child + uint elm=0; + for (uint dfn=0; dfngetNumEntry (); i++) + { + // Get the entry ref + NLGEORGES::CFormDfn::CEntry &entry = arrayDfn[dfn]->getEntry (i); + + // Form entry name + std::string entryName = (std::string (formName)+"."+entry.getName ()); + + // Is a struct ? + if ( (entry.getType () == NLGEORGES::UFormDfn::EntryDfn) || (entry.getType () == NLGEORGES::UFormDfn::EntryVirtualDfn) ) + { + // Is an array of struct ? + if (entry.getArrayFlag ()) + { + // Get it from the form + CFormElmArray *nextArray = NULL; + if (_struct && _struct->Elements[elm].Element) + nextArray = NLMISC::safe_cast (_struct->Elements[elm].Element); + + // Else, get it from the parent if we are not a virtual DFN (don't inheritate) + + // todo array of virtual struct + if (!nextArray && (entry.getType () != NLGEORGES::UFormDfn::EntryVirtualDfn) ) + { + // For each parent form + for (uint parent=0; parentgetParentCount (); parent++) + { + // Get the node by name + NLGEORGES::UFormElm *uNode; + if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName.c_str(), NULL, false) && uNode) + { + nextArray = NLMISC::safe_cast (uNode); + } + } + } + + // Add the new struct + addArray (newNode, nextArray, entry.getDfnPtr (), entry.getName().c_str(), elm, entryName.c_str (), slot); + } + else + { + // Add it + NLGEORGES::CFormElmStruct *nextForm = NULL; + + // Get it from the form + if (_struct && _struct->Elements[elm].Element) + nextForm = NLMISC::safe_cast (_struct->Elements[elm].Element); + + // Else, get it from the parent + if (!nextForm) + { + // For each parent form + for (uint parent=0; parentgetParentCount (); parent++) + { + // Get the node by name + NLGEORGES::UFormElm *uNode; + if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName.c_str(), NULL, false) && uNode) + { + nextForm = NLMISC::safe_cast (uNode); + } + } + } + + // Virtual Dfn pointer + NLGEORGES::CFormElmVirtualStruct *vStruct = ((entry.getType () == NLGEORGES::UFormDfn::EntryVirtualDfn) && nextForm) ? + NLMISC::safe_cast (nextForm) : NULL; + + NLGEORGES::CFormDfn *tmpDfn = vStruct ? + ((NLGEORGES::CFormDfn*)vStruct->FormDfn) : entry.getDfnPtr(); + // Add the new struct + addStruct (newNode, nextForm, tmpDfn, entry.getName().c_str(), elm, entryName.c_str(), slot); + } + } + // Array of type ? + else if ( entry.getArrayFlag () ) + { + NLGEORGES::CFormElmArray *nextArray = NULL; + + // Get it from the form + if (_struct && _struct->Elements[elm].Element) + nextArray = NLMISC::safe_cast (_struct->Elements[elm].Element); + + // Else, get it from the parent + if (!nextArray) + { + // For each parent form + for (uint parent=0; parentgetParentCount (); parent++) + { + // Get the node by name + NLGEORGES::UFormElm *uNode; + if (formPtr->getParent (parent)->getRootNode ().getNodeByName (&uNode, entryName.c_str(), NULL, false) && uNode) + { + nextArray = NLMISC::safe_cast (uNode); + } + } + } + + // Add the new array + addArray ( newNode, nextArray, NULL, entry.getName().c_str(), elm, entryName.c_str(), slot ); + } + + // Next element + elm++; + } + } + } + + return newNode; +} + +// *************************************************************************** + +CFormItem *CGeorgesFormModel::addArray(CFormItem *parent, + NLGEORGES::CFormElmArray *array, + NLGEORGES::CFormDfn *rootDfn, + const char *name, + uint structId, + const char *formName, + uint slot) +{ + // Add the new node + CFormItem *newNode = parent->add (CFormItem::Form, name, structId, formName, slot, m_form); + + // The array exist + if (array) + { + // For each array element + for (uint elm=0; elmElements.size(); elm++) + { + // The form name + char formArrayElmName[512]; + NLMISC::smprintf (formArrayElmName, 512, "%s[%d]", formName, elm); + + // The name + char formArrayName[512]; + if (array->Elements[elm].Name.empty ()) + { + NLMISC::smprintf (formArrayName, 512, "#%d", elm); + } + else + { + NLMISC::smprintf (formArrayName, 512, "%s", array->Elements[elm].Name.c_str()); + } + + // Is a struct + if (rootDfn) + { + // Get struct ptr + NLGEORGES::CFormElmStruct *elmPtr = array->Elements[elm].Element ? static_cast(array->Elements[elm].Element) : NULL; + addStruct (newNode, elmPtr, rootDfn, formArrayName, elm, formArrayElmName, slot); + } + else + { + NLGEORGES::CFormElmArray *elmPtr = array->Elements[elm].Element ? static_cast(array->Elements[elm].Element) : NULL; + newNode->add (CFormItem::Form, formArrayName, elm, formArrayElmName, slot, m_form); + } + } + } + + return newNode; +} + + +void CGeorgesFormModel::arrayResized( const QString &name, int size ) +{ + CFormItem *item = m_rootItem->findItem( name ); + if( item == NULL ) + return; + + NLGEORGES::UFormElm *elm = NULL; + + item->form()->getRootNode().getNodeByName( &elm, name.toUtf8().constData() ); + + if( elm == NULL ) + return; + + NLGEORGES::CFormElmArray *celm = dynamic_cast< NLGEORGES::CFormElmArray* >( elm ); + if( celm == NULL ) + return; + + item->clearChildren(); + + for( int i = 0; i < celm->Elements.size(); i++ ) + { + NLGEORGES::CFormElmArray::CElement &e = celm->Elements[ i ]; + + QString formName = name; + formName += '['; + formName += QString::number( i ); + formName += ']'; + + QString n; + if( e.Name.empty() ) + n = "#" + QString::number( i ); + else + n = e.Name.c_str(); + + item->add( CFormItem::Form, n.toUtf8().constData(), i, formName.toUtf8().constData(), 0, item->form() ); + } + +} + + + + /******************************************************************************/ + + void CGeorgesFormModel::loadFormHeader() + { + + /* if (m_parents.size()) + { + CFormItem *fi_pars = new CFormItem(m_rootElm, QList() << "parents" << "" << "", m_rootItem); + m_rootItem->appendChild(fi_pars); + + Q_FOREACH(QString str, m_parents) + { + fi_pars->appendChild(new CFormItem(m_rootElm, QList() << str << "" << "", fi_pars)); + } + }*/ + + /*QStringList dfns = _dependencies["dfn"]; + QStringList typs = _dependencies["typ"]; + + _dependencies.remove("dfn"); + _dependencies.remove("typ"); + + CFormItem *fi_dep = new CFormItem(_rootElm, QList() << "dependencies", _rootItem); + _rootItem->appendChild(fi_dep); + + if (!dfns.isEmpty()) { + CFormItem *fi_dfn = new CFormItem(_rootElm, QList() << "dfn", fi_dep); + fi_dep->appendChild(fi_dfn); + foreach(QString str, dfns) { + fi_dfn->appendChild(new CFormItem(_rootElm, QList() << str, fi_dfn)); + } + } + if (!typs.isEmpty()) { + CFormItem *fi_typ = new CFormItem(_rootElm, QList() << "typ", fi_dep); + fi_dep->appendChild(fi_typ); + foreach(QString str, typs) { + fi_typ->appendChild(new CFormItem(_rootElm, QList() << str, fi_typ)); + } + } + if (!_dependencies.isEmpty()) { + CFormItem *fi_other = new CFormItem(_rootElm, QList() << "other", fi_dep); + fi_dep->appendChild(fi_other); + foreach(QStringList list, _dependencies) { + foreach(QString str, list) { + fi_other->appendChild(new CFormItem(_rootElm, QList() << str, fi_other)); + } + } + }*/ + } + + /******************************************************************************/ + + void CGeorgesFormModel::setupModelData() + { + m_rootElm = &((NLGEORGES::CForm*)m_form)->Elements; + NLGEORGES::CFormElmStruct *rootstruct = &((NLGEORGES::CForm*)m_form)->Elements; + //loadFormHeader(); + addStruct(m_rootItem, rootstruct, rootstruct->FormDfn, "Content", 0xffffffff, "", 0); + //loadFormData(m_rootElm, m_rootItem); + } + + /******************************************************************************/ + + void CGeorgesFormModel::setShowParents( bool show ) { + m_showParents = show; + Q_EMIT layoutAboutToBeChanged(); + Q_EMIT layoutChanged(); + } + void CGeorgesFormModel::setShowDefaults( bool show ) + { + m_showDefaults = show; + Q_EMIT layoutAboutToBeChanged(); + Q_EMIT layoutChanged(); + } + + void CGeorgesFormModel::addParentForm(QString parentForm) + { + beginResetModel(); + m_parents.push_back(parentForm); + delete m_rootItem; + m_rootItem = new CFormItem(); + setupModelData(); + endResetModel(); + } + + void CGeorgesFormModel::removeParentForm(QString parentForm) + { + beginResetModel(); + m_parents.removeOne(parentForm); + + delete m_rootItem; + m_rootItem = new CFormItem(); + setupModelData(); + endResetModel(); + } +} /* namespace GeorgesQt */ + +/* end of file */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_model.h b/code/studio/src/plugins/georges_editor/georgesform_model.h similarity index 74% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_model.h rename to code/studio/src/plugins/georges_editor/georgesform_model.h index 710598236..d133b5ec6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_model.h +++ b/code/studio/src/plugins/georges_editor/georgesform_model.h @@ -27,6 +27,10 @@ namespace NLGEORGES { class UFormElm; + class UForm; + class CFormElmStruct; + class CFormDfn; + class CFormElmArray; } namespace GeorgesQt @@ -36,9 +40,8 @@ namespace GeorgesQt class CGeorgesFormModel : public QAbstractItemModel { - public: - CGeorgesFormModel(NLGEORGES::UFormElm *root, QMap< QString, QStringList> deps, + CGeorgesFormModel(NLGEORGES::UForm *form, QMap< QString, QStringList> deps, QString comment, QStringList parents, bool* expanded, QObject *parent = 0); ~CGeorgesFormModel(); @@ -47,6 +50,7 @@ namespace GeorgesQt Qt::ItemFlags flags(const QModelIndex &index) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + QModelIndex index(int row, int column, CFormItem *item) const; QModelIndex parent(const QModelIndex &index) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; @@ -58,15 +62,29 @@ namespace GeorgesQt void setShowDefaults( bool show ); void addParentForm(QString parentForm); void removeParentForm(QString parentForm); - NLGEORGES::UFormElm *getRootForm() { return m_rootElm; } + NLGEORGES::UFormElm *getRootForm() { return m_rootElm; } + + CFormItem *addStruct (CFormItem *parent, NLGEORGES::CFormElmStruct *_struct, NLGEORGES::CFormDfn *parentDfn, + const char *name, uint structId, const char *formName, uint slot); + + CFormItem *addArray(CFormItem *parent, NLGEORGES::CFormElmArray *array, NLGEORGES::CFormDfn *rootDfn, + const char *name, uint structId, const char *formName, uint slot); + + void emitDataChanged(const QModelIndex &index) + { + Q_EMIT dataChanged(index, index); + } + + void arrayResized( const QString &name, int size ); private: void setupModelData(); void loadFormData(NLGEORGES::UFormElm *rootElm, CFormItem *parent); void loadFormHeader(); + NLGEORGES::UForm* m_form; CFormItem* m_rootItem; - NLGEORGES::UFormElm* m_rootElm; + NLGEORGES::UFormElm* m_rootElm; QList m_rootData; QMap< QString, QStringList> m_dependencies; QString m_comments; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_proxy_model.cpp b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_proxy_model.cpp rename to code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp index 2792699b0..81179f61c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_proxy_model.cpp +++ b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.cpp @@ -14,15 +14,17 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdpch.h" -#include "georgesform_proxy_model.h" -#include "formitem.h" -#include "georgesform_model.h" - // NeL includes #include #include +// project includes +#include "formitem.h" +#include "georgesform_proxy_model.h" +#include "georgesform_model.h" + +#if 0 + namespace GeorgesQt { @@ -78,4 +80,5 @@ namespace GeorgesQt } } /* namespace GeorgesQt */ +#endif // 0 /* end of file */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_proxy_model.h b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.h similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_proxy_model.h rename to code/studio/src/plugins/georges_editor/georgesform_proxy_model.h index cfe7fcca6..f4c968f80 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/georgesform_proxy_model.h +++ b/code/studio/src/plugins/georges_editor/georgesform_proxy_model.h @@ -20,6 +20,7 @@ // Qt includes #include +#if 0 namespace GeorgesQt { @@ -41,5 +42,5 @@ namespace GeorgesQt };/* class CGeorgesFormProxyModel */ } /* namespace GeorgesQt */ - +#endif // 0 #endif // GEORGESFORM_PROXY_MODEL_H diff --git a/code/studio/src/plugins/georges_editor/images/array.ico b/code/studio/src/plugins/georges_editor/images/array.ico new file mode 100644 index 000000000..923bec0bd Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/array.ico differ diff --git a/code/studio/src/plugins/georges_editor/images/header.ico b/code/studio/src/plugins/georges_editor/images/header.ico new file mode 100644 index 000000000..5ebb3632a Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/header.ico differ diff --git a/code/studio/src/plugins/georges_editor/images/hold.ico b/code/studio/src/plugins/georges_editor/images/hold.ico new file mode 100644 index 000000000..4b7f115f1 Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/hold.ico differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/images/ic_nel_georges_editor.png b/code/studio/src/plugins/georges_editor/images/ic_nel_georges_editor.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/images/ic_nel_georges_editor.png rename to code/studio/src/plugins/georges_editor/images/ic_nel_georges_editor.png diff --git a/code/studio/src/plugins/georges_editor/images/root.ico b/code/studio/src/plugins/georges_editor/images/root.ico new file mode 100644 index 000000000..3fa430766 Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/root.ico differ diff --git a/code/studio/src/plugins/georges_editor/images/struct.ico b/code/studio/src/plugins/georges_editor/images/struct.ico new file mode 100644 index 000000000..7e2244dc3 Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/struct.ico differ diff --git a/code/studio/src/plugins/georges_editor/images/vstruct.ico b/code/studio/src/plugins/georges_editor/images/vstruct.ico new file mode 100644 index 000000000..a184d8a37 Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/vstruct.ico differ diff --git a/code/studio/src/plugins/georges_editor/images/zfee51.ico b/code/studio/src/plugins/georges_editor/images/zfee51.ico new file mode 100644 index 000000000..ad6bbb756 Binary files /dev/null and b/code/studio/src/plugins/georges_editor/images/zfee51.ico differ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/stdpch.cpp b/code/studio/src/plugins/georges_editor/stdpch.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/stdpch.cpp rename to code/studio/src/plugins/georges_editor/stdpch.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/stdpch.h b/code/studio/src/plugins/georges_editor/stdpch.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/stdpch.h rename to code/studio/src/plugins/georges_editor/stdpch.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/ovqt_plugin_georges_editor.xml b/code/studio/src/plugins/georges_editor/studio_plugin_georges_editor.xml similarity index 77% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/ovqt_plugin_georges_editor.xml rename to code/studio/src/plugins/georges_editor/studio_plugin_georges_editor.xml index a1972dded..700373bf3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/ovqt_plugin_georges_editor.xml +++ b/code/studio/src/plugins/georges_editor/studio_plugin_georges_editor.xml @@ -1,5 +1,5 @@ - ovqt_plugin_georges_editor + studio_plugin_georges_editor GeorgesEditor 0.4 aquiles diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/studio/src/plugins/gui_editor/CMakeLists.txt similarity index 67% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt rename to code/studio/src/plugins/gui_editor/CMakeLists.txt index fd1283db8..4b50ec8d1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/studio/src/plugins/gui_editor/CMakeLists.txt @@ -24,13 +24,16 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR action_editor.h property_browser_ctrl.h project_window.h - nel3d_widget.h - nelgui_widget.h + nelgui_ctrl.h new_property_widget.h new_widget_widget.h add_widget_widget.h editor_selection_watcher.h editor_message_processor.h + action_list.h + texture_chooser.h + action_property_manager.h + texture_property_manager.h ) SET(OVQT_PLUGIN_GUI_EDITOR_UIS @@ -46,6 +49,8 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS new_property_widget.ui new_widget_widget.ui add_widget_widget.ui + action_list.ui + texture_chooser.ui ) SET(QT_USE_QTGUI TRUE) @@ -61,7 +66,7 @@ SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${OVQT_PLUGIN_GUI_EDITOR_MOC_SRC} OVQT_P SOURCE_GROUP("GUI Editor Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_gui_editor MODULE ${SRC} +ADD_LIBRARY(studio_plugin_gui_editor MODULE ${SRC} ${OVQT_PLUGIN_GUI_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUGIN_GUI_EDITOR_UI_HDRS} @@ -69,8 +74,8 @@ ADD_LIBRARY(ovqt_plugin_gui_editor MODULE ${SRC} ) TARGET_LINK_LIBRARIES( - ovqt_plugin_gui_editor - ovqt_plugin_core + studio_plugin_gui_editor + studio_plugin_core nelmisc nel3d nelgui @@ -80,24 +85,24 @@ TARGET_LINK_LIBRARIES( qt_property_browser ) -NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_gui_editor) -NL_ADD_LIB_SUFFIX(ovqt_plugin_gui_editor) +NL_DEFAULT_PROPS(studio_plugin_gui_editor "Tools: Studio Plugin: GUI Editor") +NL_ADD_RUNTIME_FLAGS(studio_plugin_gui_editor) +NL_ADD_LIB_SUFFIX(studio_plugin_gui_editor) ADD_DEFINITIONS(-DGUI_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_gui_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_gui_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_gui_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.cpp b/code/studio/src/plugins/gui_editor/action_editor.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.cpp rename to code/studio/src/plugins/gui_editor/action_editor.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.h b/code/studio/src/plugins/gui_editor/action_editor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.h rename to code/studio/src/plugins/gui_editor/action_editor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.ui b/code/studio/src/plugins/gui_editor/action_editor.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.ui rename to code/studio/src/plugins/gui_editor/action_editor.ui diff --git a/code/studio/src/plugins/gui_editor/action_list.cpp b/code/studio/src/plugins/gui_editor/action_list.cpp new file mode 100644 index 000000000..4cc30aecb --- /dev/null +++ b/code/studio/src/plugins/gui_editor/action_list.cpp @@ -0,0 +1,49 @@ +#include "action_list.h" +#include "nel/gui/action_handler.h" +#include +#include + +ActionList::ActionList( QDialog *parent ) : +QDialog( parent ) +{ + setupUi( this ); +} + +ActionList::~ActionList() +{ +} + +void ActionList::load() +{ + actionList->clear(); + + NLGUI::CAHManager *am = NLGUI::CAHManager::getInstance(); + std::vector< std::string > handlers; + am->getActionHandlers( handlers ); + + std::vector< std::string >::const_iterator itr = handlers.begin(); + while( itr != handlers.end() ) + { + actionList->addItem( itr->c_str() ); + ++itr; + } +} + +void ActionList::accept() +{ + QListWidgetItem *item = actionList->currentItem(); + if( item == NULL ) + return; + + selectedAction = item->text(); + + QDialog::accept(); +} + +void ActionList::reject() +{ + selectedAction = ""; + + QDialog::reject(); +} + diff --git a/code/studio/src/plugins/gui_editor/action_list.h b/code/studio/src/plugins/gui_editor/action_list.h new file mode 100644 index 000000000..f61e0d239 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/action_list.h @@ -0,0 +1,29 @@ +#ifndef ACTION_LIST_H +#define ACTION_LIST_H + + +#include "ui_action_list.h" +#include + + +class ActionList : public QDialog, public Ui::ActionListDialog +{ + Q_OBJECT + +public: + ActionList( QDialog *parent = NULL ); + ~ActionList(); + void load(); + + QString getSelectedAction(){ return selectedAction; } + + +public Q_SLOTS: + void accept(); + void reject(); + +private: + QString selectedAction; +}; + +#endif diff --git a/code/studio/src/plugins/gui_editor/action_list.ui b/code/studio/src/plugins/gui_editor/action_list.ui new file mode 100644 index 000000000..ba147cfc2 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/action_list.ui @@ -0,0 +1,94 @@ + + + ActionListDialog + + + + 0 + 0 + 359 + 258 + + + + Action List + + + + + + + + + 6 + + + 0 + + + + + Qt::Horizontal + + + + 131 + 31 + + + + + + + + OK + + + + + + + Cancel + + + + + + + + + + + okButton + clicked() + ActionListDialog + accept() + + + 278 + 253 + + + 96 + 254 + + + + + cancelButton + clicked() + ActionListDialog + reject() + + + 369 + 253 + + + 179 + 282 + + + + + diff --git a/code/studio/src/plugins/gui_editor/action_property_manager.cpp b/code/studio/src/plugins/gui_editor/action_property_manager.cpp new file mode 100644 index 000000000..9e7690a56 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/action_property_manager.cpp @@ -0,0 +1,333 @@ +// Ryzom Core Studio GUI Editor plugin +// 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 "action_property_manager.h" +#include "action_list.h" +#include +#include +#include +#include +#include + + +////////////////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// + + +struct ActionPropertyManagerPrivate +{ + QMap< const QtProperty*, QString > values; +}; + +ActionPropertyManager::ActionPropertyManager( QObject *parent ) : +QtAbstractPropertyManager( parent ) +{ + d_ptr = new ActionPropertyManagerPrivate(); +} + +ActionPropertyManager::~ActionPropertyManager() +{ + delete d_ptr; + d_ptr = NULL; +} + +QString ActionPropertyManager::value( const QtProperty *p ) const +{ + return valueText( p ); +} + +void ActionPropertyManager::setValue( QtProperty *p, const QString &value ) +{ + if( !d_ptr->values.contains( p ) ) + return; + + if( d_ptr->values[ p ] == value ) + return; + + d_ptr->values[ p ] = value; + + Q_EMIT propertyChanged( p ); + Q_EMIT valueChanged( p, value ); +} + +bool ActionPropertyManager::hasValue( const QtProperty *p ) const +{ + return d_ptr->values.contains( p ); +} + +QString ActionPropertyManager::valueText( const QtProperty *p ) const +{ + if( !d_ptr->values.contains( p ) ) + return ""; + + return d_ptr->values[ p ]; +} + +void ActionPropertyManager::initializeProperty( QtProperty *p ) +{ + if( d_ptr->values.contains( p ) ) + return; + + d_ptr->values[ p ] = ""; +} + +void ActionPropertyManager::uninitializeProperty( QtProperty *p ) +{ + d_ptr->values.remove( p ); +} + + + +//////////////////////////////////////////////////////////////////// Factory /////////////////////////////////////////////////////////////////////// + + + +struct ActionEditorFactoryPrivate +{ + QMap< QtProperty*, QList< ActionPropertyEditor* > > createdEditors; + QMap< ActionPropertyEditor*, QtProperty* > editorToProperty; + + ~ActionEditorFactoryPrivate() + { + createdEditors.clear(); + + QMap< ActionPropertyEditor*, QtProperty* >::iterator itr = editorToProperty.begin(); + while( itr != editorToProperty.end() ) + { + delete itr.key(); + ++itr; + } + editorToProperty.clear(); + } + + void addEditor( QtProperty *p, ActionPropertyEditor *editor ) + { + QMap< QtProperty*, QList< ActionPropertyEditor* > >::iterator itr = createdEditors.find( p ); + + if( itr != createdEditors.end() ) + { + itr->push_back( editor ); + } + else + { + QList< ActionPropertyEditor* > l; + l.push_back( editor ); + createdEditors.insert( p, l ); + } + + editorToProperty.insert( editor, p ); + } + + void removeEditor( QObject *o ) + { + // Remove from editorToProperty first + QMap< ActionPropertyEditor*, QtProperty* >::iterator itr1 = editorToProperty.begin(); + while( itr1 != editorToProperty.end() ) + { + if( itr1.key() == o ) + break; + + ++itr1; + } + if( itr1 != editorToProperty.end() ) + editorToProperty.erase( itr1 ); + + // Then from createdEditors + QMap< QtProperty*, QList< ActionPropertyEditor* > >::iterator itr2 = createdEditors.begin(); + while( itr2 != createdEditors.end() ) + { + QList< ActionPropertyEditor* > &l = *itr2; + QList< ActionPropertyEditor* >::iterator itr = l.begin(); + while( itr != l.end() ) + { + if( *itr == o ) + { + QList< ActionPropertyEditor* >::iterator d = itr; + ++itr; + l.erase( d ); + continue; + } + + ++itr; + } + + ++itr2; + } + } + +}; + +ActionEditorFactory::ActionEditorFactory( QObject *parent ) : +QtAbstractEditorFactory( parent ) +{ + d_ptr = new ActionEditorFactoryPrivate(); +} + +ActionEditorFactory::~ActionEditorFactory() +{ + delete d_ptr; + d_ptr = NULL; +} + +void ActionEditorFactory::connectPropertyManager( ActionPropertyManager *manager ) +{ + connect( manager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), this, SLOT( onPropertyChanged( QtProperty*, const QString& ) ) ); +} + +void ActionEditorFactory::disconnectPropertyManager( ActionPropertyManager *manager ) +{ + disconnect( manager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), this, SLOT( onPropertyChanged( QtProperty*, const QString& ) ) ); +} + +QWidget* ActionEditorFactory::createEditor( ActionPropertyManager *manager, QtProperty *p, QWidget *parent ) +{ + ActionPropertyEditor *editor = new ActionPropertyEditor( parent ); + editor->setValue( manager->value( p ) ); + + connect( editor, SIGNAL( valueChanged( const QString& ) ), this, SLOT( onSetValue( const QString& ) ) ); + connect( editor, SIGNAL( destroyed( QObject* ) ), this, SLOT( onEditorDestroyed( QObject* ) ) ); + + d_ptr->addEditor( p, editor ); + + return editor; +} + +void ActionEditorFactory::onPropertyChanged( QtProperty *p, const QString &value ) +{ + QMap< QtProperty*, QList< ActionPropertyEditor* > >::iterator itr = d_ptr->createdEditors.find( p ); + if( itr == d_ptr->createdEditors.end() ) + return; + + QList< ActionPropertyEditor* > &l = *itr; + QList< ActionPropertyEditor* >::iterator i = l.begin(); + while( i != l.end() ) + { + ActionPropertyEditor *editor = *i; + + editor->blockSignals( true ); + editor->setValue( value ); + editor->blockSignals( false ); + + ++i; + } +} + +void ActionEditorFactory::onSetValue( const QString &value ) +{ + QObject *s = sender(); + ActionPropertyEditor *editor = qobject_cast< ActionPropertyEditor* >( s ); + if( editor == NULL ) + return; + + QMap< ActionPropertyEditor*, QtProperty* >::iterator itr = d_ptr->editorToProperty.find( editor ); + if( itr == d_ptr->editorToProperty.end() ) + return; + + QtProperty *p = *itr; + + ActionPropertyManager *manager = qobject_cast< ActionPropertyManager* >( p->propertyManager() ); + if( manager == NULL ) + return; + + blockSignals( true ); + manager->setValue( p, value ); + blockSignals( false ); +} + +void ActionEditorFactory::onEditorDestroyed( QObject *editor ) +{ + d_ptr->removeEditor( editor ); +} + + + +//////////////////////////////////////////////////////////////////////// Editor ////////////////////////////////////////////////////////////////// + + + +ActionPropertyEditor::ActionPropertyEditor( QWidget *parent ) : +QWidget( parent ) +{ + setupUi(); + setupConnections(); +} + +ActionPropertyEditor::~ActionPropertyEditor() +{ +} + +void ActionPropertyEditor::setValue( const QString &value ) +{ + if( lineEdit->text() == value ) + return; + + disableConnections(); + lineEdit->setText( value ); + setupConnections(); +} + +void ActionPropertyEditor::showEvent( QShowEvent *e ) +{ + QWidget::showEvent( e ); +} + +void ActionPropertyEditor::onToolButtonClicked() +{ + ActionList d; + d.load(); + + int result = d.exec(); + if( QDialog::Accepted != result ) + return; + + lineEdit->setText( d.getSelectedAction() ); +} + +void ActionPropertyEditor::onTextChanged( const QString &text ) +{ + Q_EMIT valueChanged( text ); +} + +void ActionPropertyEditor::setupConnections() +{ + connect( toolButton, SIGNAL( clicked( bool ) ), this, SLOT( onToolButtonClicked() ) ); + connect( lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); +} + +void ActionPropertyEditor::disableConnections() +{ + disconnect( toolButton, SIGNAL( clicked( bool ) ), this, SLOT( onToolButtonClicked() ) ); + disconnect( lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); +} + +void ActionPropertyEditor::setupUi() +{ + lineEdit = new QLineEdit(); + toolButton = new QToolButton(); + toolButton->setText( "..." ); + + QHBoxLayout *lt = new QHBoxLayout( this ); + lt->setContentsMargins( 0, 0, 0, 0 ); + lt->setSpacing( 0 ); + lt->addWidget( lineEdit ); + lt->addWidget( toolButton ); + + setFocusProxy( lineEdit ); + setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Fixed ); + +} + + diff --git a/code/studio/src/plugins/gui_editor/action_property_manager.h b/code/studio/src/plugins/gui_editor/action_property_manager.h new file mode 100644 index 000000000..06cd714d7 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/action_property_manager.h @@ -0,0 +1,125 @@ +// Ryzom Core Studio GUI Editor plugin +// 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 ACTION_PROPERTY_MANAGER +#define ACTION_PROPERTY_MANAGER + +#define QT_QTPROPERTYBROWSER_IMPORT + +#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include + +/////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// + +struct ActionPropertyManagerPrivate; + +class ActionPropertyManager : public QtAbstractPropertyManager +{ + Q_OBJECT + +public: + ActionPropertyManager( QObject *parent = NULL ); + ~ActionPropertyManager(); + + QString value( const QtProperty *p ) const; + +public Q_SLOTS: + void setValue( QtProperty *p, const QString &value ); + +Q_SIGNALS: + void valueChanged( QtProperty *p, const QString &value ); + +protected: + bool hasValue( const QtProperty *p ) const; + QString valueText( const QtProperty *p ) const; + void initializeProperty( QtProperty *p ); + void uninitializeProperty( QtProperty *p ); + +private: + ActionPropertyManagerPrivate *d_ptr; + + Q_DISABLE_COPY( ActionPropertyManager ); +}; + + +////////////////////////////////////////////////////////////////// Factory ///////////////////////////////////////////////////////////////////////// + +struct ActionEditorFactoryPrivate; + +class ActionEditorFactory : public QtAbstractEditorFactory< ActionPropertyManager > +{ + Q_OBJECT + +public: + ActionEditorFactory( QObject *parent = NULL ); + ~ActionEditorFactory(); + +protected: + void connectPropertyManager( ActionPropertyManager *manager ); + void disconnectPropertyManager( ActionPropertyManager *manager ); + + QWidget* createEditor( ActionPropertyManager *manager, QtProperty *p, QWidget *parent ); + +private Q_SLOTS: + void onPropertyChanged( QtProperty *p, const QString &value ); + void onSetValue( const QString &value ); + void onEditorDestroyed( QObject *editor ); + +private: + ActionEditorFactoryPrivate *d_ptr; + + Q_DISABLE_COPY( ActionEditorFactory ); +}; + + +///////////////////////////////////////////////////////////////// Editor /////////////////////////////////////////////////////////////////////////// + +class QLineEdit; +class QToolButton; + +class ActionPropertyEditor : public QWidget +{ + Q_OBJECT +public: + ActionPropertyEditor( QWidget *parent = NULL ); + ~ActionPropertyEditor(); + +public Q_SLOTS: + void setValue( const QString &value ); + +protected: + void showEvent( QShowEvent *e ); + +private Q_SLOTS: + void onToolButtonClicked(); + void onTextChanged( const QString &text ); + +Q_SIGNALS: + void valueChanged( const QString &value ); + +private: + void setupUi(); + void setupConnections(); + void disableConnections(); + + + QLineEdit *lineEdit; + QToolButton *toolButton; +}; + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp b/code/studio/src/plugins/gui_editor/add_widget_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.cpp rename to code/studio/src/plugins/gui_editor/add_widget_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h b/code/studio/src/plugins/gui_editor/add_widget_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.h rename to code/studio/src/plugins/gui_editor/add_widget_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui b/code/studio/src/plugins/gui_editor/add_widget_widget.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/add_widget_widget.ui rename to code/studio/src/plugins/gui_editor/add_widget_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/studio/src/plugins/gui_editor/editor_message_processor.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp rename to code/studio/src/plugins/gui_editor/editor_message_processor.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h b/code/studio/src/plugins/gui_editor/editor_message_processor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.h rename to code/studio/src/plugins/gui_editor/editor_message_processor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp b/code/studio/src/plugins/gui_editor/editor_selection_watcher.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.cpp rename to code/studio/src/plugins/gui_editor/editor_selection_watcher.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h b/code/studio/src/plugins/gui_editor/editor_selection_watcher.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_selection_watcher.h rename to code/studio/src/plugins/gui_editor/editor_selection_watcher.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_constants.h b/code/studio/src/plugins/gui_editor/gui_editor_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_constants.h rename to code/studio/src/plugins/gui_editor/gui_editor_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_context.cpp b/code/studio/src/plugins/gui_editor/gui_editor_context.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_context.cpp rename to code/studio/src/plugins/gui_editor/gui_editor_context.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_context.h b/code/studio/src/plugins/gui_editor/gui_editor_context.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_context.h rename to code/studio/src/plugins/gui_editor/gui_editor_context.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_core_listener.cpp b/code/studio/src/plugins/gui_editor/gui_editor_core_listener.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_core_listener.cpp rename to code/studio/src/plugins/gui_editor/gui_editor_core_listener.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_core_listener.h b/code/studio/src/plugins/gui_editor/gui_editor_core_listener.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_core_listener.h rename to code/studio/src/plugins/gui_editor/gui_editor_core_listener.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_global.h b/code/studio/src/plugins/gui_editor/gui_editor_global.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_global.h rename to code/studio/src/plugins/gui_editor/gui_editor_global.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_plugin.cpp b/code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_plugin.cpp rename to code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp index d0fea4df3..d5f2403f1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_plugin.cpp +++ b/code/studio/src/plugins/gui_editor/gui_editor_plugin.cpp @@ -37,6 +37,9 @@ namespace GUIEditor qDeleteAll(m_autoReleaseObjects); m_autoReleaseObjects.clear(); + + delete m_libContext; + m_libContext = NULL; } bool GUIEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_plugin.h b/code/studio/src/plugins/gui_editor/gui_editor_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_plugin.h rename to code/studio/src/plugins/gui_editor/gui_editor_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/studio/src/plugins/gui_editor/gui_editor_window.cpp similarity index 90% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp rename to code/studio/src/plugins/gui_editor/gui_editor_window.cpp index 341338d8d..3f4e318db 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/studio/src/plugins/gui_editor/gui_editor_window.cpp @@ -40,10 +40,11 @@ #include "project_file_parser.h" #include "project_file_serializer.h" #include "project_window.h" -#include "nelgui_widget.h" +#include "nelgui_ctrl.h" #include "editor_selection_watcher.h" #include "editor_message_processor.h" #include "add_widget_widget.h" +#include "texture_chooser.h" namespace GUIEditor { @@ -55,6 +56,7 @@ namespace GUIEditor GUIEditorWindow::GUIEditorWindow(QWidget *parent) : QMainWindow(parent) { + menu = NULL; m_ui.setupUi(this); messageProcessor = new CEditorMessageProcessor; m_undoStack = new QUndoStack(this); @@ -64,11 +66,13 @@ namespace GUIEditor projectWindow = new ProjectWindow; addWidgetWidget = new AddWidgetWidget; connect( projectWindow, SIGNAL( projectFilesChanged() ), this, SLOT( onProjectFilesChanged() ) ); - viewPort = new NelGUIWidget; - setCentralWidget( viewPort ); + GUICtrl = new NelGUICtrl(); + setCentralWidget( GUICtrl->getViewPort() ); widgetInfoTree = new CWidgetInfoTree; + tc = new TextureChooser(); + createMenus(); readSettings(); @@ -96,9 +100,9 @@ namespace GUIEditor dock->setWidget( propBrowser ); addDockWidget( Qt::RightDockWidgetArea, dock ); - viewPort->init(); + GUICtrl->init(); - connect( viewPort, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) ); + connect( GUICtrl, SIGNAL( guiLoadComplete() ), this, SLOT( onGUILoaded() ) ); connect( widgetProps, SIGNAL( treeChanged() ), this, SLOT( onTreeChanged() ) ); connect( addWidgetWidget, @@ -112,6 +116,11 @@ namespace GUIEditor { writeSettings(); + removeMenus(); + + delete tc; + tc = NULL; + delete messageProcessor; messageProcessor = NULL; @@ -127,8 +136,8 @@ namespace GUIEditor delete projectWindow; projectWindow = NULL; - delete viewPort; - viewPort = NULL; + delete GUICtrl; + GUICtrl = NULL; delete addWidgetWidget; addWidgetWidget = NULL; @@ -178,7 +187,7 @@ namespace GUIEditor currentProject = projectFiles.projectName.c_str(); currentProjectFile = fileName; projectWindow->setupFiles( projectFiles ); - if( viewPort->parse( projectFiles ) ) + if( GUICtrl->parse( projectFiles ) ) { hierarchyView->buildHierarchy( projectFiles.masterGroup ); } @@ -279,14 +288,14 @@ namespace GUIEditor return false; - CEditorSelectionWatcher *w = viewPort->getWatcher(); + CEditorSelectionWatcher *w = GUICtrl->getWatcher(); disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) ); disconnect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); projectFiles.clearAll(); projectWindow->clear(); hierarchyView->clearHierarchy(); - viewPort->reset(); + GUICtrl->reset(); browserCtrl.clear(); linkList->clear(); procList->clear(); @@ -302,7 +311,7 @@ namespace GUIEditor setCursor( Qt::WaitCursor ); projectWindow->updateFiles( projectFiles ); - if( !viewPort->parse( projectFiles ) ) + if( !GUICtrl->parse( projectFiles ) ) { QMessageBox::critical( this, tr( "Error parsing GUI XML files" ), @@ -318,7 +327,7 @@ namespace GUIEditor procList->onGUILoaded(); linkList->onGUILoaded(); - CEditorSelectionWatcher *w = viewPort->getWatcher(); + CEditorSelectionWatcher *w = GUICtrl->getWatcher(); connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), hierarchyView, SLOT( onSelectionChanged( std::string& ) ) ); connect( w, SIGNAL( sgnSelectionChanged( std::string& ) ), &browserCtrl, SLOT( onSelectionChanged( std::string& ) ) ); } @@ -337,6 +346,25 @@ namespace GUIEditor addWidgetWidget->setupWidgetInfo( widgetInfoTree ); } + + void GUIEditorWindow::hideEvent( QHideEvent *evnt ) + { + QWidget::hideEvent( evnt ); + GUICtrl->hide(); + } + + void GUIEditorWindow::showEvent( QShowEvent *evnt ) + { + QWidget::showEvent( evnt ); + GUICtrl->show(); + } + + void GUIEditorWindow::onTCClicked() + { + tc->load(); + tc->exec(); + } + void GUIEditorWindow::createMenus() { Core::MenuManager *mm = Core::ICore::instance()->menuManager(); @@ -360,11 +388,9 @@ namespace GUIEditor connect( delAction, SIGNAL( triggered( bool ) ), messageProcessor, SLOT( onDelete() ) ); } - QMenu *menu = mm->menu( Core::Constants::M_TOOLS ); - if( menu != NULL ) + QMenu *m = mm->menuBar()->addMenu( "GUI Editor" ); + if( m != NULL ) { - QMenu *m = menu->addMenu( "GUI Editor" ); - QAction *a = new QAction( "Widget Properties", this ); connect( a, SIGNAL( triggered( bool ) ), widgetProps, SLOT( show() ) ); m->addAction( a ); @@ -384,8 +410,20 @@ namespace GUIEditor a = new QAction( "Add Widget", this ); connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onAddWidgetClicked() ) ); m->addAction( a ); + + a = new QAction( "Texture Chooser", this ); + connect( a, SIGNAL( triggered( bool ) ), this, SLOT( onTCClicked() ) ); + m->addAction( a ); + + menu = m; } } + + void GUIEditorWindow::removeMenus() + { + delete menu; + menu = NULL; + } void GUIEditorWindow::readSettings() { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h b/code/studio/src/plugins/gui_editor/gui_editor_window.h similarity index 89% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h rename to code/studio/src/plugins/gui_editor/gui_editor_window.h index e1a8b8b2d..d18a24813 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h +++ b/code/studio/src/plugins/gui_editor/gui_editor_window.h @@ -26,6 +26,10 @@ class QtTreePropertyBrowser; +class QMenu; + +class TextureChooser; + namespace GUIEditor { @@ -34,7 +38,7 @@ namespace GUIEditor class LinkList; class ProcList; class ProjectWindow; - class NelGUIWidget; + class NelGUICtrl; class CWidgetInfoTree; class CEditorMessageProcessor; class AddWidgetWidget; @@ -63,9 +67,16 @@ private Q_SLOTS: void onGUILoaded(); void onAddWidgetClicked(); void onTreeChanged(); + void onTCClicked(); + + +protected: + void hideEvent( QHideEvent *evnt ); + void showEvent( QShowEvent *evnt ); private: void createMenus(); + void removeMenus(); void readSettings(); @@ -80,7 +91,7 @@ private: LinkList *linkList; ProcList *procList; ProjectWindow *projectWindow; - NelGUIWidget *viewPort; + NelGUICtrl *GUICtrl; CWidgetInfoTree *widgetInfoTree; CEditorMessageProcessor *messageProcessor; AddWidgetWidget *addWidgetWidget; @@ -88,6 +99,10 @@ private: CPropBrowserCtrl browserCtrl; QString currentProject; QString currentProjectFile; + + QMenu *menu; + + TextureChooser *tc; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.ui b/code/studio/src/plugins/gui_editor/gui_editor_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.ui rename to code/studio/src/plugins/gui_editor/gui_editor_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.cpp b/code/studio/src/plugins/gui_editor/link_editor.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.cpp rename to code/studio/src/plugins/gui_editor/link_editor.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.h b/code/studio/src/plugins/gui_editor/link_editor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.h rename to code/studio/src/plugins/gui_editor/link_editor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.ui b/code/studio/src/plugins/gui_editor/link_editor.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.ui rename to code/studio/src/plugins/gui_editor/link_editor.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.cpp b/code/studio/src/plugins/gui_editor/link_list.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.cpp rename to code/studio/src/plugins/gui_editor/link_list.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.h b/code/studio/src/plugins/gui_editor/link_list.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.h rename to code/studio/src/plugins/gui_editor/link_list.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.ui b/code/studio/src/plugins/gui_editor/link_list.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_list.ui rename to code/studio/src/plugins/gui_editor/link_list.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp similarity index 75% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp rename to code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp index d86d31269..03f784944 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp @@ -15,13 +15,14 @@ // along with this program. If not, see . -#include "nelgui_widget.h" +#include "nelgui_ctrl.h" #include "nel/misc/path.h" #include "nel/gui/view_renderer.h" #include "nel/gui/interface_group.h" #include "nel/gui/widget_manager.h" #include "nel/gui/action_handler.h" #include "nel/gui/lua_manager.h" +#include "nel/gui/event_listener.h" #include "nel/misc/path.h" #include "nel/misc/i18n.h" #include @@ -29,19 +30,24 @@ #include #include "editor_selection_watcher.h" +#include "../core/Nel3DWidget/nel3d_widget.h" + namespace GUIEditor { std::set< std::string > hwCursors; - NelGUIWidget::NelGUIWidget( QWidget *parent ) : - Nel3DWidget( parent ) + NelGUICtrl::NelGUICtrl( QObject *parent ) : + QObject( parent ) { timerID = 0; guiLoaded = false; watcher = NULL; + w = new Nel3DWidget(); + eventListener = new NLGUI::CEventListener(); + listening = false; } - NelGUIWidget::~NelGUIWidget() + NelGUICtrl::~NelGUICtrl() { guiLoaded = false; if( timerID != 0 ) @@ -49,25 +55,27 @@ namespace GUIEditor NLGUI::CViewRenderer::release(); NLMISC::CI18N::setNoResolution( false ); - + + delete w; + w = NULL; } - void NelGUIWidget::init() + void NelGUICtrl::init() { NLMISC::CI18N::setNoResolution( true ); NLMISC::CPath::remapExtension( "dds", "tga", true ); NLMISC::CPath::remapExtension( "dds", "png", true ); NLMISC::CPath::remapExtension( "png", "tga", true ); - Nel3DWidget::init(); - createTextContext( "Ryzom.ttf" ); + w->init(); + w->createTextContext( "Ryzom.ttf" ); NLGUI::CAHManager::setEditorMode( true ); NLGUI::CLuaManager::setEditorMode( true ); NLGUI::CInterfaceElement::setEditorMode( true ); - NLGUI::CViewRenderer::setDriver( getDriver() ); - NLGUI::CViewRenderer::setTextContext( getTextContext() ); + NLGUI::CViewRenderer::setDriver( w->getDriver() ); + NLGUI::CViewRenderer::setTextContext( w->getTextContext() ); NLGUI::CViewRenderer::hwCursors = &hwCursors; NLGUI::CViewRenderer::getInstance()->init(); @@ -76,7 +84,7 @@ namespace GUIEditor watcher = new CEditorSelectionWatcher(); } - bool NelGUIWidget::parse( SProjectFiles &files ) + bool NelGUICtrl::parse( SProjectFiles &files ) { reset(); IParser *parser = CWidgetManager::getInstance()->getParser(); @@ -115,7 +123,7 @@ namespace GUIEditor return true; } - void NelGUIWidget::reset() + void NelGUICtrl::reset() { guiLoaded = false; if( timerID != 0 ) @@ -125,45 +133,63 @@ namespace GUIEditor CWidgetManager::getInstance()->reset(); CWidgetManager::getInstance()->getParser()->removeAll(); CViewRenderer::getInstance()->reset(); - clear(); + w->clear(); } - void NelGUIWidget::draw() + void NelGUICtrl::draw() { - getDriver()->clearBuffers( NLMISC::CRGBA::Black ); + w->getDriver()->clearBuffers( NLMISC::CRGBA::Black ); CWidgetManager::getInstance()->checkCoords(); CWidgetManager::getInstance()->drawViews( 0 ); - getDriver()->swapBuffers(); - } - - void NelGUIWidget::paintEvent( QPaintEvent *evnt ) - { - if( !guiLoaded ) - clear(); + w->getDriver()->swapBuffers(); } - void NelGUIWidget::timerEvent( QTimerEvent *evnt ) + void NelGUICtrl::timerEvent( QTimerEvent *evnt ) { if( evnt->timerId() == timerID ) { if( guiLoaded ) { - getDriver()->EventServer.pump(); + w->getDriver()->EventServer.pump(); draw(); } + else + { + w->clear(); + } } } - void NelGUIWidget::showEvent( QShowEvent *evnt ) + void NelGUICtrl::show() { if( timerID == 0 ) timerID = startTimer( 200 ); + + if( !listening ) + { + eventListener->addToServer( &w->getDriver()->EventServer ); + listening = true; + } } - void NelGUIWidget::hideEvent( QHideEvent *evnt ) + void NelGUICtrl::hide() { if( timerID != 0 ) + { killTimer( timerID ); + timerID = 0; + } + + if( listening ) + { + eventListener->removeFromServer(); + listening = false; + } + } + + QWidget* NelGUICtrl::getViewPort() + { + return w; } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h b/code/studio/src/plugins/gui_editor/nelgui_ctrl.h similarity index 77% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h rename to code/studio/src/plugins/gui_editor/nelgui_ctrl.h index 34c510507..b3c68ff32 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.h +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.h @@ -18,20 +18,28 @@ #ifndef NELGUI_WIDGET_H #define NELGUI_WIDGET_H -#include "nel3d_widget.h" +#include #include "project_files.h" +class QWidget; +class Nel3DWidget; + +namespace NLGUI +{ + class CEventListener; +} + namespace GUIEditor { class CEditorSelectionWatcher; - /// Qt viewport for the Nel GUI library - class NelGUIWidget : public Nel3DWidget + /// Qt viewport controller for the Nel GUI library + class NelGUICtrl : public QObject { Q_OBJECT public: - NelGUIWidget( QWidget *parent = NULL ); - ~NelGUIWidget(); + NelGUICtrl( QObject *parent = NULL ); + ~NelGUICtrl(); void init(); bool parse( SProjectFiles &files ); @@ -39,20 +47,27 @@ namespace GUIEditor void reset(); CEditorSelectionWatcher* getWatcher(){ return watcher; } + QWidget* getViewPort(); + + void show(); + void hide(); + Q_SIGNALS: void guiLoadComplete(); protected: - void paintEvent( QPaintEvent *evnt ); void timerEvent( QTimerEvent *evnt ); - void showEvent( QShowEvent *evnt ); - void hideEvent( QHideEvent *evnt ); - private: int timerID; bool guiLoaded; CEditorSelectionWatcher *watcher; + + NLGUI::CEventListener *eventListener; + + Nel3DWidget *w; + + bool listening; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.cpp b/code/studio/src/plugins/gui_editor/new_property_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.cpp rename to code/studio/src/plugins/gui_editor/new_property_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.h b/code/studio/src/plugins/gui_editor/new_property_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.h rename to code/studio/src/plugins/gui_editor/new_property_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.ui b/code/studio/src/plugins/gui_editor/new_property_widget.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_property_widget.ui rename to code/studio/src/plugins/gui_editor/new_property_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.cpp b/code/studio/src/plugins/gui_editor/new_widget_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.cpp rename to code/studio/src/plugins/gui_editor/new_widget_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.h b/code/studio/src/plugins/gui_editor/new_widget_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.h rename to code/studio/src/plugins/gui_editor/new_widget_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.ui b/code/studio/src/plugins/gui_editor/new_widget_widget.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/new_widget_widget.ui rename to code/studio/src/plugins/gui_editor/new_widget_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp b/code/studio/src/plugins/gui_editor/proc_editor.cpp similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp rename to code/studio/src/plugins/gui_editor/proc_editor.cpp index c36b16f64..e96a1cce1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.cpp +++ b/code/studio/src/plugins/gui_editor/proc_editor.cpp @@ -17,6 +17,7 @@ #include "proc_editor.h" #include "action_editor.h" +#include "action_list.h" #include #include #include "nel/gui/interface_group.h" @@ -35,10 +36,15 @@ namespace GUIEditor connect( removeButton, SIGNAL( clicked( bool ) ), this, SLOT( onRemoveButtonClicked() ) ); connect( upButton, SIGNAL( clicked( bool ) ), this, SLOT( onUpButtonClicked() ) ); connect( downButton, SIGNAL( clicked( bool ) ), this, SLOT( onDownButtonClicked() ) ); + + alist = new ActionList(); } ProcEditor::~ProcEditor() { + delete alist; + alist = NULL; + delete actionEditor; actionEditor = NULL; } @@ -84,17 +90,13 @@ namespace GUIEditor void ProcEditor::onAddButtonClicked() { - bool ok; - QString name = - QInputDialog::getText( this, - tr( "Adding new Action" ), - tr( "Please specify the name of the new action handler" ), - QLineEdit::Normal, - QString(), - &ok ); - - if( ok ) + alist->load(); + int result = alist->exec(); + + if( result == QDialog::Accepted ) { + QString name = alist->getSelectedAction(); + CProcedure *proc = CWidgetManager::getInstance()->getParser()->getProc( currentProc.toUtf8().constData() ); if( proc != NULL ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.h b/code/studio/src/plugins/gui_editor/proc_editor.h similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.h rename to code/studio/src/plugins/gui_editor/proc_editor.h index 90579daa4..8debfef02 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.h +++ b/code/studio/src/plugins/gui_editor/proc_editor.h @@ -20,6 +20,8 @@ #include "ui_proc_editor.h" +class ActionList; + namespace GUIEditor { class ActionEditor; @@ -46,6 +48,8 @@ namespace GUIEditor ActionEditor *actionEditor; QString currentProc; + + ActionList *alist; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.ui b/code/studio/src/plugins/gui_editor/proc_editor.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.ui rename to code/studio/src/plugins/gui_editor/proc_editor.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.cpp b/code/studio/src/plugins/gui_editor/proc_list.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.cpp rename to code/studio/src/plugins/gui_editor/proc_list.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.h b/code/studio/src/plugins/gui_editor/proc_list.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.h rename to code/studio/src/plugins/gui_editor/proc_list.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.ui b/code/studio/src/plugins/gui_editor/proc_list.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_list.ui rename to code/studio/src/plugins/gui_editor/proc_list.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.cpp b/code/studio/src/plugins/gui_editor/project_file_parser.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.cpp rename to code/studio/src/plugins/gui_editor/project_file_parser.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.h b/code/studio/src/plugins/gui_editor/project_file_parser.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_parser.h rename to code/studio/src/plugins/gui_editor/project_file_parser.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_serializer.cpp b/code/studio/src/plugins/gui_editor/project_file_serializer.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_serializer.cpp rename to code/studio/src/plugins/gui_editor/project_file_serializer.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_serializer.h b/code/studio/src/plugins/gui_editor/project_file_serializer.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_file_serializer.h rename to code/studio/src/plugins/gui_editor/project_file_serializer.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_files.h b/code/studio/src/plugins/gui_editor/project_files.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_files.h rename to code/studio/src/plugins/gui_editor/project_files.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_files/login.xml b/code/studio/src/plugins/gui_editor/project_files/login.xml similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_files/login.xml rename to code/studio/src/plugins/gui_editor/project_files/login.xml diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.cpp b/code/studio/src/plugins/gui_editor/project_window.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.cpp rename to code/studio/src/plugins/gui_editor/project_window.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.h b/code/studio/src/plugins/gui_editor/project_window.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.h rename to code/studio/src/plugins/gui_editor/project_window.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.ui b/code/studio/src/plugins/gui_editor/project_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/project_window.ui rename to code/studio/src/plugins/gui_editor/project_window.ui diff --git a/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp b/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp new file mode 100644 index 000000000..bd73fb7fa --- /dev/null +++ b/code/studio/src/plugins/gui_editor/property_browser_ctrl.cpp @@ -0,0 +1,976 @@ +// Object Viewer Qt GUI Editor plugin +// 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 "property_browser_ctrl.h" +#include "../../3rdparty/qtpropertybrowser/QtVariantPropertyManager" +#include "../../3rdparty/qtpropertybrowser/QtEnumPropertyManager" +#include "../../3rdparty/qtpropertybrowser/QtTreePropertyBrowser" +#include "../../3rdparty/qtpropertybrowser/QtEnumEditorFactory" +#include "nel/gui/interface_group.h" +#include "nel/gui/widget_manager.h" +#include +#include "widget_info_tree.h" +#include + +#include "action_property_manager.h" +#include "texture_property_manager.h" + +namespace +{ + class NelBMAlign + { + public: + + enum NELBMAlign + { + LB = 0, + RB = 1, + LT = 2, + RT = 3 + }; + + static int fromString( const std::string &s ) + { + int r = -1; + + if( s == "LB" ) + r = 0; + else + if( s == "RB" ) + r = 1; + else + if( s == "LT" ) + r = 2; + else + if( s == "RT" ) + r = 3; + + return r; + } + + static std::string toString( int value ) + { + std::string s; + + switch( value ) + { + case LB: s = "LB"; break; + case RB: s = "RB"; break; + case LT: s = "LT"; break; + case RT: s = "RT"; break; + } + + return s; + } + }; + + class NelTTParent + { + public: + + enum NELTTParent + { + TTPARENT_MOUSE = 0, + TTPARENT_CONTROL = 1, + TTPARENT_WINDOW = 2, + TTPARENT_SPECIAL_WINDOW = 3 + }; + + static int fromString( const std::string &s ) + { + int r = -1; + + if( s == "mouse" ) + r = TTPARENT_MOUSE; + else + if( s == "control" ) + r = TTPARENT_CONTROL; + else + if( s == "window" ) + r = TTPARENT_WINDOW; + else + if( s == "special" ) + r = TTPARENT_SPECIAL_WINDOW; + + return r; + } + + static std::string toString( int value ) + { + std::string s; + + switch( value ) + { + case TTPARENT_MOUSE: s = "mouse"; break; + case TTPARENT_CONTROL: s = "control"; break; + case TTPARENT_WINDOW: s = "window"; break; + case TTPARENT_SPECIAL_WINDOW: s = "special"; break; + } + + return s; + } + }; + + class NelPosRef + { + public: + + enum NELPosRef + { + POSREF_BL = 0, + POSREF_BM = 1, + POSREF_BR = 2, + POSREF_ML = 3, + POSREF_MM = 4, + POSREF_MR = 5, + POSREF_TL = 6, + POSREF_TM = 7, + POSREF_TR = 8 + }; + + static int fromString( const std::string &s ) + { + int r = -1; + + if( s == "BL" ) + r = POSREF_BL; + else + if( s == "BM" ) + r = POSREF_BM; + else + if( s == "BR" ) + r = POSREF_BR; + else + if( s == "ML" ) + r = POSREF_ML; + else + if( s == "MM" ) + r = POSREF_MM; + else + if( s == "MR" ) + r = POSREF_MR; + else + if( s == "TL" ) + r = POSREF_TL; + else + if( s == "TM" ) + r = POSREF_TM; + else + if( s == "TR" ) + r = POSREF_TR; + + return r; + } + + static std::string toString( int value ) + { + std::string v; + + switch( value ) + { + case POSREF_BL: v = "BL"; break; + case POSREF_BM: v = "BM"; break; + case POSREF_BR: v = "BR"; break; + case POSREF_ML: v = "ML"; break; + case POSREF_MM: v = "MM"; break; + case POSREF_MR: v = "MR"; break; + case POSREF_TL: v = "TL"; break; + case POSREF_TM: v = "TM"; break; + case POSREF_TR: v = "TR"; break; + } + + return v; + } + }; + + + class NelPosRefTT + { + public: + + enum NELPosRef + { + TTPOSREF_BL = 0, + TTPOSREF_BM = 1, + TTPOSREF_BR = 2, + TTPOSREF_ML = 3, + TTPOSREF_MM = 4, + TTPOSREF_MR = 5, + TTPOSREF_TL = 6, + TTPOSREF_TM = 7, + TTPOSREF_TR = 8, + TTPOSREF_AUTO = 9 + }; + + static int fromString( const std::string &s ) + { + int r = -1; + + if( s == "BL" ) + r = TTPOSREF_BL; + else + if( s == "BM" ) + r = TTPOSREF_BM; + else + if( s == "BR" ) + r = TTPOSREF_BR; + else + if( s == "ML" ) + r = TTPOSREF_ML; + else + if( s == "MM" ) + r = TTPOSREF_MM; + else + if( s == "MR" ) + r = TTPOSREF_MR; + else + if( s == "TL" ) + r = TTPOSREF_TL; + else + if( s == "TM" ) + r = TTPOSREF_TM; + else + if( s == "TR" ) + r = TTPOSREF_TR; + else + r = TTPOSREF_AUTO; + + return r; + } + + static std::string toString( int value ) + { + std::string v; + + switch( value ) + { + case TTPOSREF_BL: v = "BL"; break; + case TTPOSREF_BM: v = "BM"; break; + case TTPOSREF_BR: v = "BR"; break; + case TTPOSREF_ML: v = "ML"; break; + case TTPOSREF_MM: v = "MM"; break; + case TTPOSREF_MR: v = "MR"; break; + case TTPOSREF_TL: v = "TL"; break; + case TTPOSREF_TM: v = "TM"; break; + case TTPOSREF_TR: v = "TR"; break; + case TTPOSREF_AUTO: v = "auto"; break; + } + + return v; + } + }; + + + class NelButtonType + { + public: + + enum NELButtonTypes + { + BUTTON_TYPE_PUSH = 0, + BUTTON_TYPE_TOGGLE = 1, + BUTTON_TYPE_RADIO = 2 + }; + + static int fromString( const std::string &s ) + { + int r = -1; + + if( s == "push_button" ) + r = BUTTON_TYPE_PUSH; + else + if( s == "toggle_button" ) + r = BUTTON_TYPE_TOGGLE; + else + if( s == "radio_button" ) + r = BUTTON_TYPE_RADIO; + + return r; + } + + static std::string toString( int value ) + { + std::string v; + + switch( value ) + { + case BUTTON_TYPE_PUSH: v = "push_button"; break; + case BUTTON_TYPE_TOGGLE: v = "toggle_button"; break; + case BUTTON_TYPE_RADIO: v = "radio_button"; break; + } + + return v; + } + + }; + + class NelTxtJustification + { + public: + + enum NELTxtJustification + { + TEXT_CLIPWORD, + TEXT_DONTCLIPWORD, + TEXT_JUSTIFIED + }; + + static int fromString( const std::string &s ) + { + int r = -1; + + if( s == "clip_word" ) + r = TEXT_CLIPWORD; + else + if( s == "dont_clip_word" ) + r = TEXT_DONTCLIPWORD; + else + if( s == "justified" ) + r = TEXT_JUSTIFIED; + + return r; + } + + static std::string toString( int value ) + { + std::string v; + + switch( value ) + { + case TEXT_CLIPWORD: v = "clip_word"; break; + case TEXT_DONTCLIPWORD: v = "dont_clip_word"; break; + case TEXT_JUSTIFIED: v = "justified"; break; + } + + return v; + } + + }; + +} + +namespace GUIEditor +{ + + CPropBrowserCtrl::CPropBrowserCtrl() + { + browser = NULL; + propertyMgr = new QtVariantPropertyManager; + enumMgr = new QtEnumPropertyManager; + actionMgr = new ActionPropertyManager; + textureMgr = new TexturePropertyManager; + + variantFactory = new QtVariantEditorFactory; + enumFactory = new QtEnumEditorFactory; + actionFactory = new ActionEditorFactory; + textureFactory = new TextureEditorFactory; + + ttPairs[ "tooltip_posref" ] = "tooltip_parent_posref"; + ttPairs[ "tooltip_parent_posref" ] = "tooltip_posref"; + ttPairs[ "tooltip_posref_alt" ] = "tooltip_parent_posref_alt"; + ttPairs[ "tooltip_parent_posref_alt" ] = "tooltip_posref_alt"; + + } + + CPropBrowserCtrl::~CPropBrowserCtrl() + { + delete textureMgr; + textureMgr = NULL; + delete actionMgr; + actionMgr = NULL; + delete enumMgr; + enumMgr = NULL; + delete propertyMgr; + propertyMgr = NULL; + + delete textureFactory; + textureFactory = NULL; + delete actionFactory; + actionFactory = NULL; + delete variantFactory; + variantFactory = NULL; + delete enumFactory; + enumFactory = NULL; + + browser = NULL; + } + + void CPropBrowserCtrl::setBrowser( QtTreePropertyBrowser *b ) + { + browser = b; + } + + void CPropBrowserCtrl::setupWidgetInfo( CWidgetInfoTree *tree ) + { + widgetInfo.clear(); + + std::vector< std::string > names; + tree->getNames( names ); + + std::vector< std::string >::const_iterator itr; + for( itr = names.begin(); itr != names.end(); ++itr ) + { + CWidgetInfoTreeNode *node = tree->findNodeByName( *itr ); + const SWidgetInfo &w = node->getInfo(); + widgetInfo[ w.GUIName ] = w; + } + } + + void CPropBrowserCtrl::clear() + { + disablePropertyWatchers(); + browser->clear(); + } + + void CPropBrowserCtrl::onSelectionChanged( std::string &id ) + { + if( browser == NULL ) + return; + + disablePropertyWatchers(); + browser->clear(); + + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( id ); + if( e == NULL ) + { + enablePropertyWatchers(); + return; + } + + currentElement = id; + + std::string n = e->getClassName(); + + setupProperties( n, e ); + + + // Need to set these up every time, otherwise the editors won't work + // probably the clear() method clears them too... + browser->setFactoryForManager( propertyMgr, variantFactory ); + browser->setFactoryForManager( enumMgr, enumFactory ); + browser->setFactoryForManager( actionMgr, actionFactory ); + browser->setFactoryForManager( textureMgr, textureFactory ); + + enablePropertyWatchers(); + } + + void CPropBrowserCtrl::onPropertyChanged( QtProperty *prop, const QVariant &v ) + { + QString propName = prop->propertyName(); + QString propValue = prop->valueText(); + + // for some reason booleans cannot be extracted from a QtProperty :( + if( propValue.isEmpty() ) + { + QtVariantProperty *p = propertyMgr->variantProperty( prop ); + if( p != NULL ) + propValue = p->value().toString(); + } + + if( v.type() == QVariant::Color ) + { + QColor c = v.value< QColor >(); + QString val = "%1 %2 %3 %4"; + val = val.arg( c.red() ).arg( c.green() ).arg( c.blue() ).arg( c.alpha() ); + propValue = val; + } + + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + e->setProperty( propName.toUtf8().constData(), propValue.toUtf8().constData() ); + + + // Make sure the changes are applied + bool active = e->getActive(); + e->setActive( !active ); + e->setActive( active ); + } + + void CPropBrowserCtrl::onEnumPropertyChanged( QtProperty *prop, int value ) + { + QString propName = prop->propertyName(); + std::string n = propName.toUtf8().constData(); + + // Try to find the type for this property + std::map< std::string, std::string >::const_iterator itr = + nameToType.find( n ); + // Not found :( + if( itr == nameToType.end() ) + return; + std::string type = itr->second; + + + if( type == "button_type" ) + { + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + std::string v; + v = NelButtonType::toString( value ); + if( v.empty() ) + return; + + e->setProperty( propName.toUtf8().constData(), v ); + } + else + if( type == "text_justification" ) + { + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + std::string v; + v = NelTxtJustification::toString( value ); + if( v.empty() ) + return; + + e->setProperty( propName.toUtf8().constData(), v ); + } + else + if( type == "posref" ) + { + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + std::string v = NelPosRef::toString( value ); + if( v.empty() ) + return; + + e->setProperty( propName.toUtf8().constData(), v ); + } + else + if( type == "posreftt" ) + { + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + std::string v = NelPosRefTT::toString( value ); + if( v.empty() ) + return; + + e->setProperty( propName.toUtf8().constData(), v ); + + // When auto is set as posref for a tooltip, it's pair MUST be auto as well + // When we set anything other than auto, the pair MUST not be auto either + // Only need to set the widget here, since the actual property is changed in the GUI library automatically + { + // Find the pair + std::map< std::string, std::string >::const_iterator ttItr = + ttPairs.find( n ); + + // Found! + if( ttItr != ttPairs.end() ) + { + + // Find the QtProperty that belongs to the pair + std::map< std::string, QtProperty* >::const_iterator pItr = + ttPosRefProps.find( ttItr->second ); + + // Found! + if( pItr != ttPosRefProps.end() ) + { + disablePropertyWatchers(); + + if( value == NelPosRefTT::TTPOSREF_AUTO ) + enumMgr->setValue( pItr->second, NelPosRefTT::TTPOSREF_AUTO ); + else + { + int v = NelPosRefTT::fromString( pItr->second->valueText().toUtf8().constData() ); + if( v == NelPosRefTT::TTPOSREF_AUTO ) + { + enumMgr->setValue( pItr->second, value ); + } + } + + enablePropertyWatchers(); + } + } + } + } + else + if( type == "tooltip_parent" ) + { + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + std::string v = NelTTParent::toString( value ); + if( v.empty() ) + return; + + e->setProperty( propName.toUtf8().constData(), v ); + } + else + if( type == "bitmap_align" ) + { + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + std::string v = NelBMAlign::toString( value ); + if( v.empty() ) + return; + + e->setProperty( propName.toUtf8().constData(), v ); + } + } + + + void CPropBrowserCtrl::onActionPropertyChanged( QtProperty *p, const QString &v ) + { + QString propName = p->propertyName(); + + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + e->setProperty( propName.toUtf8().constData(), v.toUtf8().constData() ); + } + + void CPropBrowserCtrl::onTexturePropertyChanged( QtProperty *p, const QString &v ) + { + QString propName = p->propertyName(); + + CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement ); + if( e == NULL ) + return; + + e->setProperty( propName.toUtf8().constData(), v.toUtf8().constData() ); + } + + void CPropBrowserCtrl::enablePropertyWatchers() + { + connect( propertyMgr, SIGNAL( valueChanged( QtProperty*, const QVariant& ) ), + this, SLOT( onPropertyChanged( QtProperty*, const QVariant& ) ) ); + connect( enumMgr, SIGNAL( valueChanged( QtProperty*, int ) ), + this, SLOT( onEnumPropertyChanged( QtProperty*, int ) ) ); + + connect( actionMgr, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onActionPropertyChanged( QtProperty*, const QString& ) ) ); + connect( textureMgr, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onTexturePropertyChanged( QtProperty*, const QString& ) ) ); + } + + void CPropBrowserCtrl::disablePropertyWatchers() + { + disconnect( propertyMgr, SIGNAL( valueChanged( QtProperty*, const QVariant& ) ), + this, SLOT( onPropertyChanged( QtProperty*, const QVariant& ) ) ); + disconnect( enumMgr, SIGNAL( valueChanged( QtProperty*, int ) ), + this, SLOT( onEnumPropertyChanged( QtProperty*, int ) ) ); + + disconnect( actionMgr, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onActionPropertyChanged( QtProperty*, const QString& ) ) ); + disconnect( textureMgr, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onTexturePropertyChanged( QtProperty*, const QString& ) ) ); + } + + void CPropBrowserCtrl::setupProperties( const std::string &type, const CInterfaceElement *element ) + { + std::map< std::string, SWidgetInfo >::iterator itr = widgetInfo.find( type ); + if( itr == widgetInfo.end() ) + return; + SWidgetInfo &w = itr->second; + + nameToType.clear(); + ttPosRefProps.clear(); + + std::vector< SPropEntry >::const_iterator pItr; + for( pItr = w.props.begin(); pItr != w.props.end(); ++pItr ) + { + const SPropEntry &prop = *pItr; + nameToType[ prop.propName ] = prop.propType; + setupProperty( prop, element ); + } + } + + void CPropBrowserCtrl::setupProperty( const SPropEntry &prop, const CInterfaceElement *element ) + { + QtVariantProperty *p = NULL; + QVariant v; + + if( prop.propType == "texture" ) + { + std::string j = element->getProperty( prop.propName ); + + if( j.empty() ) + return; + + QtProperty *pp = textureMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + textureMgr->setValue( pp, j.c_str() ); + browser->addProperty( pp ); + } + else + if( prop.propType == "action" ) + { + std::string j = element->getProperty( prop.propName ); + + if( j.empty() ) + return; + + QtProperty *pp = actionMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + actionMgr->setValue( pp, j.c_str() ); + browser->addProperty( pp ); + } + else + if( prop.propType == "bitmap_align" ) + { + std::string j = element->getProperty( prop.propName ); + + if( j.empty() ) + return; + + int e = -1; + e = NelBMAlign::fromString( j ); + if( e == -1 ) + return; + + QtProperty *pp = enumMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + QStringList enums; + enums.push_back( "LB" ); + enums.push_back( "RB" ); + enums.push_back( "LT" ); + enums.push_back( "RT" ); + + enumMgr->setEnumNames( pp, enums ); + enumMgr->setValue( pp, e ); + browser->addProperty( pp ); + } + else + if( prop.propType == "tooltip_parent" ) + { + std::string j = element->getProperty( prop.propName ); + + if( j.empty() ) + return; + + int e = -1; + e = NelTTParent::fromString( j ); + if( e == -1 ) + return; + + QtProperty *pp = enumMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + QStringList enums; + enums.push_back( "mouse" ); + enums.push_back( "control" ); + enums.push_back( "window" ); + enums.push_back( "special window" ); + + enumMgr->setEnumNames( pp, enums ); + enumMgr->setValue( pp, e ); + browser->addProperty( pp ); + + } + else + if( prop.propType == "button_type" ) + { + std::string btype = element->getProperty( prop.propName ); + if( btype.empty() ) + return; + + int e = -1; + e = NelButtonType::fromString( btype ); + if( e == -1 ) + return; + + QtProperty *pp = enumMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + QStringList enums; + enums.push_back( "push_button" ); + enums.push_back( "toggle_button" ); + enums.push_back( "radio_button" ); + + enumMgr->setEnumNames( pp, enums ); + enumMgr->setValue( pp, e ); + browser->addProperty( pp ); + return; + } + else + if( prop.propType == "text_justification" ) + { + std::string j = element->getProperty( prop.propName ); + if( j.empty() ) + return; + + int e = -1; + e = NelTxtJustification::fromString( j ); + if( e == -1 ) + return; + + QtProperty *pp = enumMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + QStringList enums; + enums.push_back( "clip_word" ); + enums.push_back( "dont_clip_word" ); + enums.push_back( "justified" ); + + enumMgr->setEnumNames( pp, enums ); + enumMgr->setValue( pp, e ); + browser->addProperty( pp ); + + return; + } + else + if( prop.propType == "posref" ) + { + std::string j = element->getProperty( prop.propName ); + if( j.empty() ) + return; + + int e = -1; + e = NelPosRef::fromString( j ); + if( e == -1 ) + return; + + QtProperty *pp = enumMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + QStringList enums; + enums.push_back( "BL" ); + enums.push_back( "BM" ); + enums.push_back( "BR" ); + enums.push_back( "ML" ); + enums.push_back( "MM" ); + enums.push_back( "MR" ); + enums.push_back( "TL" ); + enums.push_back( "TM" ); + enums.push_back( "TR" ); + + enumMgr->setEnumNames( pp, enums ); + enumMgr->setValue( pp, e ); + browser->addProperty( pp ); + + return; + } + else + if( prop.propType == "posreftt" ) + { + std::string j = element->getProperty( prop.propName ); + if( j.empty() ) + return; + + int e = -1; + e = NelPosRefTT::fromString( j ); + if( e == -1 ) + return; + + QtProperty *pp = enumMgr->addProperty( prop.propName.c_str() ); + if( pp == NULL ) + return; + + QStringList enums; + enums.push_back( "BL" ); + enums.push_back( "BM" ); + enums.push_back( "BR" ); + enums.push_back( "ML" ); + enums.push_back( "MM" ); + enums.push_back( "MR" ); + enums.push_back( "TL" ); + enums.push_back( "TM" ); + enums.push_back( "TR" ); + enums.push_back( "auto" ); + + enumMgr->setEnumNames( pp, enums ); + enumMgr->setValue( pp, e ); + browser->addProperty( pp ); + + ttPosRefProps[ prop.propName ] = pp; + + return; + } + else + if( prop.propType == "string" ) + { + p = propertyMgr->addProperty( QVariant::String, prop.propName.c_str() ); + v = element->getProperty( prop.propName ).c_str(); + } + else + if( prop.propType == "bool" ) + { + p = propertyMgr->addProperty( QVariant::Bool, prop.propName.c_str() ); + bool value = false; + NLMISC::fromString( element->getProperty( prop.propName ), value ); + v = value; + } + else + if( prop.propType == "int" ) + { + p = propertyMgr->addProperty( QVariant::Int, prop.propName.c_str() ); + sint32 value = 0; + NLMISC::fromString( element->getProperty( prop.propName ), value ); + v = value; + } + else + if( prop.propType == "color" ) + { + p = propertyMgr->addProperty( QVariant::Color, prop.propName.c_str() ); + + std::string s = element->getProperty( prop.propName ); + // Parse string into a QColor + QString qs = s.c_str(); + QStringList l = qs.split( " " ); + int r = l[ 0 ].toInt(); + int g = l[ 1 ].toInt(); + int b = l[ 2 ].toInt(); + int a = l[ 3 ].toInt(); + + QColor value; + value.setRed( r ); + value.setGreen( g ); + value.setBlue( b ); + value.setAlpha( a ); + v = value; + + + // Remove the subproperties + QList< QtProperty* > pl = p->subProperties(); + QListIterator< QtProperty* > itr( pl ); + while( itr.hasNext() ) + { + delete itr.next(); + } + pl.clear(); + + } + + if( p == NULL ) + return; + + p->setValue( v ); + browser->addProperty( p ); + } +} diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.h b/code/studio/src/plugins/gui_editor/property_browser_ctrl.h similarity index 66% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.h rename to code/studio/src/plugins/gui_editor/property_browser_ctrl.h index 4c5ebce63..abf80d7de 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/property_browser_ctrl.h +++ b/code/studio/src/plugins/gui_editor/property_browser_ctrl.h @@ -25,7 +25,16 @@ class QtTreePropertyBrowser; class QtVariantPropertyManager; +class QtEnumPropertyManager; +class QtVariantEditorFactory; +class QtEnumEditorFactory; class QtProperty; +class QVariant; + +class ActionPropertyManager; +class ActionEditorFactory; +class TexturePropertyManager; +class TextureEditorFactory; namespace NLGUI { @@ -53,16 +62,34 @@ namespace GUIEditor void onSelectionChanged( std::string &id ); private Q_SLOTS: - void onPropertyChanged( QtProperty *prop ); + void onPropertyChanged( QtProperty *prop, const QVariant &v ); + void onEnumPropertyChanged( QtProperty *prop, int value ); + void onActionPropertyChanged( QtProperty *p, const QString &v ); + void onTexturePropertyChanged( QtProperty *p, const QString &v ); private: + void enablePropertyWatchers(); + void disablePropertyWatchers(); + void setupProperties( const std::string &type, const NLGUI::CInterfaceElement *element ); void setupProperty( const SPropEntry &prop, const NLGUI::CInterfaceElement *element ); QtTreePropertyBrowser *browser; QtVariantPropertyManager *propertyMgr; + QtEnumPropertyManager *enumMgr; + ActionPropertyManager *actionMgr; + TexturePropertyManager *textureMgr; + + QtVariantEditorFactory *variantFactory; + QtEnumEditorFactory *enumFactory; + ActionEditorFactory *actionFactory; + TextureEditorFactory *textureFactory; + std::string currentElement; std::map< std::string, SWidgetInfo > widgetInfo; + std::map< std::string, std::string > nameToType; + std::map< std::string, QtProperty * > ttPosRefProps; // Tooltip posref properties + std::map< std::string, std::string > ttPairs; }; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/ovqt_plugin_gui_editor.xml b/code/studio/src/plugins/gui_editor/studio_plugin_gui_editor.xml similarity index 77% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/ovqt_plugin_gui_editor.xml rename to code/studio/src/plugins/gui_editor/studio_plugin_gui_editor.xml index 3703509bb..9ba1452e9 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/ovqt_plugin_gui_editor.xml +++ b/code/studio/src/plugins/gui_editor/studio_plugin_gui_editor.xml @@ -1,5 +1,5 @@ - ovqt_plugin_gui_editor + studio_plugin_gui_editor GUI Editor 0.0.1 Ryzom Core diff --git a/code/studio/src/plugins/gui_editor/texture_chooser.cpp b/code/studio/src/plugins/gui_editor/texture_chooser.cpp new file mode 100644 index 000000000..3f988d4f3 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/texture_chooser.cpp @@ -0,0 +1,201 @@ +// Ryzom Core Studio GUI Editor plugin +// 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 "texture_chooser.h" +#include "nel/misc/path.h" +#include "nel/misc/bitmap.h" +#include "nel/misc/file.h" +#include +#include +#include +#include +#include + +#include "nel/gui/view_renderer.h" + +struct TextureChooserPrivate +{ + QListWidget *fileTextures; + QListWidget *atlasTextures; + + TextureChooserPrivate() + { + fileTextures = new QListWidget(); + atlasTextures = new QListWidget(); + } +}; + +TextureChooser::TextureChooser( QDialog *parent ) : +QDialog( parent ) +{ + setupUi( this ); + + d_ptr = new TextureChooserPrivate; + this->tabWidget->clear(); + this->tabWidget->addTab( d_ptr->fileTextures, tr( "File textures" ) ); + this->tabWidget->addTab( d_ptr->atlasTextures, tr( "Atlas texture" ) ); + + setupConnections(); +} + +TextureChooser::~TextureChooser() +{ + delete d_ptr; + d_ptr = NULL; +} + + +void TextureChooser::load() +{ + // Load the file textures + d_ptr->fileTextures->clear(); + + std::vector< std::string > textures; + //NLMISC::CPath::getFileList( "tga", textures ); + NLMISC::CPath::getFileListByPath( "dds", "interfaces", textures ); + NLMISC::CPath::getFileListByPath( "dds", "gamedev", textures ); + + std::sort( textures.begin(), textures.end() ); + + std::vector< std::string >::const_iterator itr = textures.begin(); + while( itr != textures.end() ) + { + d_ptr->fileTextures->addItem( itr->c_str() ); + ++itr; + } + + // Now load the atlas textures + d_ptr->atlasTextures->clear(); + textures.clear(); + + NLGUI::CViewRenderer::getInstance()->getTextureNames( textures ); + itr = textures.begin(); + while( itr != textures.end() ) + { + d_ptr->atlasTextures->addItem( itr->c_str() ); + ++itr; + } + + // set the file textures row after the atlas, because they are shown first + d_ptr->atlasTextures->setCurrentRow( 0 ); + d_ptr->fileTextures->setCurrentRow( 0 ); +} + +void TextureChooser::accept() +{ + QListWidgetItem *item = d_ptr->fileTextures->currentItem(); + if( item == NULL ) + return; + + selection = item->text(); + QDialog::accept(); +} + +void TextureChooser::reject() +{ + selection = ""; + + QDialog::reject(); +} + +void TextureChooser::onFileTxtRowChanged( int row ) +{ + if( row < 0 ) + return; + + QListWidgetItem *item = d_ptr->fileTextures->item( row ); + QString fn = item->text(); + + std::string rfn = fn.toUtf8().constData(); + rfn = NLMISC::CPath::lookup( rfn ); + + NLMISC::CIFile f; + bool b = f.open( rfn ); + if( !b ) + { + return; + } + + NLMISC::CBitmap bm; + uint8 depth = bm.load( f ); + f.close(); + b = bm.convertToType( NLMISC::CBitmap::RGBA ); + if( !b ) + { + return; + } + + setPreviewImage( bm ); +} + +void TextureChooser::onAtlasTxtRowChanged( int row ) +{ + if( row < 0 ) + return; + + QListWidgetItem *item = d_ptr->atlasTextures->item( row ); + QString fn = item->text(); + + std::string rfn = fn.toUtf8().constData(); + + NLMISC::CBitmap bm; + + bool b = NLGUI::CViewRenderer::getInstance()->getTexture( bm, rfn ); + if( !b ) + return; + + setPreviewImage( bm ); +} + + +void TextureChooser::setupConnections() +{ + connect( d_ptr->fileTextures, SIGNAL( currentRowChanged( int ) ), this, SLOT( onFileTxtRowChanged( int ) ) ); + connect( d_ptr->atlasTextures, SIGNAL( currentRowChanged( int ) ), this, SLOT( onAtlasTxtRowChanged( int ) ) ); +} + +void TextureChooser::setPreviewImage( NLMISC::CBitmap &bm ) +{ + // should be depth, but CBitmap always uses 32 bit to store the image + uint32 size = bm.getSize() * ( 32 / 8 ); + uint8 *data = new uint8[ size ]; + bm.getData( data ); + + /// Convert from ABGR to ARGB + { + int i = 0; + while( i < size ) + { + uint8 t = 0; + + /// ABGR + t = data[ i ]; + data[ i ] = data[ i + 2 ]; + data[ i + 2 ] = t; + + i += 4; + } + } + + QImage img( data, bm.getWidth(), bm.getHeight(), QImage::Format_ARGB32 ); + label->setPixmap( QPixmap::fromImage( img ) ); + + delete data; + data = NULL; +} + + + diff --git a/code/studio/src/plugins/gui_editor/texture_chooser.h b/code/studio/src/plugins/gui_editor/texture_chooser.h new file mode 100644 index 000000000..160b31481 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/texture_chooser.h @@ -0,0 +1,58 @@ +// Ryzom Core Studio GUI Editor plugin +// 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 TEXTURE_CHOOSER_H +#define TEXTURE_CHOOSER_H + +#include "ui_texture_chooser.h" + +namespace NLMISC +{ + class CBitmap; +} + +struct TextureChooserPrivate; + +class TextureChooser : public QDialog, public Ui::TextureChooser +{ + Q_OBJECT + +public: + TextureChooser( QDialog *parent = NULL ); + ~TextureChooser(); + + void load(); + QString getSelection(){ return selection; } + +public Q_SLOTS: + void accept(); + void reject(); + +private Q_SLOTS: + void onFileTxtRowChanged( int row ); + void onAtlasTxtRowChanged( int row ); + +private: + void setupConnections(); + void setPreviewImage( NLMISC::CBitmap &bm ); + + QString selection; + + TextureChooserPrivate *d_ptr; +}; + +#endif + diff --git a/code/studio/src/plugins/gui_editor/texture_chooser.ui b/code/studio/src/plugins/gui_editor/texture_chooser.ui new file mode 100644 index 000000000..a0837ee83 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/texture_chooser.ui @@ -0,0 +1,122 @@ + + + TextureChooser + + + Qt::ApplicationModal + + + + 0 + 0 + 686 + 300 + + + + Texture Chooser + + + + + + + tab + + + + + + + + + 0 + 0 + + + + + 351 + 231 + + + + + + + + + + + 6 + + + 0 + + + + + Qt::Horizontal + + + + 131 + 31 + + + + + + + + OK + + + + + + + Cancel + + + + + + + + + + + okButton + clicked() + TextureChooser + accept() + + + 278 + 253 + + + 96 + 254 + + + + + cancelButton + clicked() + TextureChooser + reject() + + + 369 + 253 + + + 179 + 282 + + + + + diff --git a/code/studio/src/plugins/gui_editor/texture_property_manager.cpp b/code/studio/src/plugins/gui_editor/texture_property_manager.cpp new file mode 100644 index 000000000..6b40abc7f --- /dev/null +++ b/code/studio/src/plugins/gui_editor/texture_property_manager.cpp @@ -0,0 +1,333 @@ +// Ryzom Core Studio GUI Editor plugin +// 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 "texture_property_manager.h" +#include "texture_chooser.h" +#include +#include +#include +#include +#include + + +////////////////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// + + +struct TexturePropertyManagerPrivate +{ + QMap< const QtProperty*, QString > values; +}; + +TexturePropertyManager::TexturePropertyManager( QObject *parent ) : +QtAbstractPropertyManager( parent ) +{ + d_ptr = new TexturePropertyManagerPrivate(); +} + +TexturePropertyManager::~TexturePropertyManager() +{ + delete d_ptr; + d_ptr = NULL; +} + +QString TexturePropertyManager::value( const QtProperty *p ) const +{ + return valueText( p ); +} + +void TexturePropertyManager::setValue( QtProperty *p, const QString &value ) +{ + if( !d_ptr->values.contains( p ) ) + return; + + if( d_ptr->values[ p ] == value ) + return; + + d_ptr->values[ p ] = value; + + Q_EMIT propertyChanged( p ); + Q_EMIT valueChanged( p, value ); +} + +bool TexturePropertyManager::hasValue( const QtProperty *p ) const +{ + return d_ptr->values.contains( p ); +} + +QString TexturePropertyManager::valueText( const QtProperty *p ) const +{ + if( !d_ptr->values.contains( p ) ) + return ""; + + return d_ptr->values[ p ]; +} + +void TexturePropertyManager::initializeProperty( QtProperty *p ) +{ + if( d_ptr->values.contains( p ) ) + return; + + d_ptr->values[ p ] = ""; +} + +void TexturePropertyManager::uninitializeProperty( QtProperty *p ) +{ + d_ptr->values.remove( p ); +} + + + +//////////////////////////////////////////////////////////////////// Factory /////////////////////////////////////////////////////////////////////// + + + +struct TextureEditorFactoryPrivate +{ + QMap< QtProperty*, QList< TexturePropertyEditor* > > createdEditors; + QMap< TexturePropertyEditor*, QtProperty* > editorToProperty; + + ~TextureEditorFactoryPrivate() + { + createdEditors.clear(); + + QMap< TexturePropertyEditor*, QtProperty* >::iterator itr = editorToProperty.begin(); + while( itr != editorToProperty.end() ) + { + delete itr.key(); + ++itr; + } + editorToProperty.clear(); + } + + void addEditor( QtProperty *p, TexturePropertyEditor *editor ) + { + QMap< QtProperty*, QList< TexturePropertyEditor* > >::iterator itr = createdEditors.find( p ); + + if( itr != createdEditors.end() ) + { + itr->push_back( editor ); + } + else + { + QList< TexturePropertyEditor* > l; + l.push_back( editor ); + createdEditors.insert( p, l ); + } + + editorToProperty.insert( editor, p ); + } + + void removeEditor( QObject *o ) + { + // Remove from editorToProperty first + QMap< TexturePropertyEditor*, QtProperty* >::iterator itr1 = editorToProperty.begin(); + while( itr1 != editorToProperty.end() ) + { + if( itr1.key() == o ) + break; + + ++itr1; + } + if( itr1 != editorToProperty.end() ) + editorToProperty.erase( itr1 ); + + // Then from createdEditors + QMap< QtProperty*, QList< TexturePropertyEditor* > >::iterator itr2 = createdEditors.begin(); + while( itr2 != createdEditors.end() ) + { + QList< TexturePropertyEditor* > &l = *itr2; + QList< TexturePropertyEditor* >::iterator itr = l.begin(); + while( itr != l.end() ) + { + if( *itr == o ) + { + QList< TexturePropertyEditor* >::iterator d = itr; + ++itr; + l.erase( d ); + continue; + } + + ++itr; + } + + ++itr2; + } + } + +}; + +TextureEditorFactory::TextureEditorFactory( QObject *parent ) : +QtAbstractEditorFactory( parent ) +{ + d_ptr = new TextureEditorFactoryPrivate(); +} + +TextureEditorFactory::~TextureEditorFactory() +{ + delete d_ptr; + d_ptr = NULL; +} + +void TextureEditorFactory::connectPropertyManager( TexturePropertyManager *manager ) +{ + connect( manager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), this, SLOT( onPropertyChanged( QtProperty*, const QString& ) ) ); +} + +void TextureEditorFactory::disconnectPropertyManager( TexturePropertyManager *manager ) +{ + disconnect( manager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), this, SLOT( onPropertyChanged( QtProperty*, const QString& ) ) ); +} + +QWidget* TextureEditorFactory::createEditor( TexturePropertyManager *manager, QtProperty *p, QWidget *parent ) +{ + TexturePropertyEditor *editor = new TexturePropertyEditor( parent ); + editor->setValue( manager->value( p ) ); + + connect( editor, SIGNAL( valueChanged( const QString& ) ), this, SLOT( onSetValue( const QString& ) ) ); + connect( editor, SIGNAL( destroyed( QObject* ) ), this, SLOT( onEditorDestroyed( QObject* ) ) ); + + d_ptr->addEditor( p, editor ); + + return editor; +} + +void TextureEditorFactory::onPropertyChanged( QtProperty *p, const QString &value ) +{ + QMap< QtProperty*, QList< TexturePropertyEditor* > >::iterator itr = d_ptr->createdEditors.find( p ); + if( itr == d_ptr->createdEditors.end() ) + return; + + QList< TexturePropertyEditor* > &l = *itr; + QList< TexturePropertyEditor* >::iterator i = l.begin(); + while( i != l.end() ) + { + TexturePropertyEditor *editor = *i; + + editor->blockSignals( true ); + editor->setValue( value ); + editor->blockSignals( false ); + + ++i; + } +} + +void TextureEditorFactory::onSetValue( const QString &value ) +{ + QObject *s = sender(); + TexturePropertyEditor *editor = qobject_cast< TexturePropertyEditor* >( s ); + if( editor == NULL ) + return; + + QMap< TexturePropertyEditor*, QtProperty* >::iterator itr = d_ptr->editorToProperty.find( editor ); + if( itr == d_ptr->editorToProperty.end() ) + return; + + QtProperty *p = *itr; + + TexturePropertyManager *manager = qobject_cast< TexturePropertyManager* >( p->propertyManager() ); + if( manager == NULL ) + return; + + blockSignals( true ); + manager->setValue( p, value ); + blockSignals( false ); +} + +void TextureEditorFactory::onEditorDestroyed( QObject *editor ) +{ + d_ptr->removeEditor( editor ); +} + + + +//////////////////////////////////////////////////////////////////////// Editor ////////////////////////////////////////////////////////////////// + + + +TexturePropertyEditor::TexturePropertyEditor( QWidget *parent ) : +QWidget( parent ) +{ + setupUi(); + setupConnections(); +} + +TexturePropertyEditor::~TexturePropertyEditor() +{ +} + +void TexturePropertyEditor::setValue( const QString &value ) +{ + if( lineEdit->text() == value ) + return; + + disableConnections(); + lineEdit->setText( value ); + setupConnections(); +} + +void TexturePropertyEditor::showEvent( QShowEvent *e ) +{ + QWidget::showEvent( e ); +} + +void TexturePropertyEditor::onToolButtonClicked() +{ + TextureChooser d; + d.load(); + + int result = d.exec(); + if( QDialog::Accepted != result ) + return; + + lineEdit->setText( d.getSelection() ); +} + +void TexturePropertyEditor::onTextChanged( const QString &text ) +{ + Q_EMIT valueChanged( text ); +} + +void TexturePropertyEditor::setupConnections() +{ + connect( toolButton, SIGNAL( clicked( bool ) ), this, SLOT( onToolButtonClicked() ) ); + connect( lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); +} + +void TexturePropertyEditor::disableConnections() +{ + disconnect( toolButton, SIGNAL( clicked( bool ) ), this, SLOT( onToolButtonClicked() ) ); + disconnect( lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); +} + +void TexturePropertyEditor::setupUi() +{ + lineEdit = new QLineEdit(); + toolButton = new QToolButton(); + toolButton->setText( "..." ); + + QHBoxLayout *lt = new QHBoxLayout( this ); + lt->setContentsMargins( 0, 0, 0, 0 ); + lt->setSpacing( 0 ); + lt->addWidget( lineEdit ); + lt->addWidget( toolButton ); + + setFocusProxy( lineEdit ); + setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Fixed ); + +} + + diff --git a/code/studio/src/plugins/gui_editor/texture_property_manager.h b/code/studio/src/plugins/gui_editor/texture_property_manager.h new file mode 100644 index 000000000..9b686ea04 --- /dev/null +++ b/code/studio/src/plugins/gui_editor/texture_property_manager.h @@ -0,0 +1,125 @@ +// Ryzom Core Studio GUI Editor plugin +// 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 TEXTURE_PROPERTY_MANAGER +#define TEXTURE_PROPERTY_MANAGER + +#define QT_QTPROPERTYBROWSER_IMPORT + +#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include + +/////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// + +struct TexturePropertyManagerPrivate; + +class TexturePropertyManager : public QtAbstractPropertyManager +{ + Q_OBJECT + +public: + TexturePropertyManager( QObject *parent = NULL ); + ~TexturePropertyManager(); + + QString value( const QtProperty *p ) const; + +public Q_SLOTS: + void setValue( QtProperty *p, const QString &value ); + +Q_SIGNALS: + void valueChanged( QtProperty *p, const QString &value ); + +protected: + bool hasValue( const QtProperty *p ) const; + QString valueText( const QtProperty *p ) const; + void initializeProperty( QtProperty *p ); + void uninitializeProperty( QtProperty *p ); + +private: + TexturePropertyManagerPrivate *d_ptr; + + Q_DISABLE_COPY( TexturePropertyManager ); +}; + + +////////////////////////////////////////////////////////////////// Factory ///////////////////////////////////////////////////////////////////////// + +struct TextureEditorFactoryPrivate; + +class TextureEditorFactory : public QtAbstractEditorFactory< TexturePropertyManager > +{ + Q_OBJECT + +public: + TextureEditorFactory( QObject *parent = NULL ); + ~TextureEditorFactory(); + +protected: + void connectPropertyManager( TexturePropertyManager *manager ); + void disconnectPropertyManager( TexturePropertyManager *manager ); + + QWidget* createEditor( TexturePropertyManager *manager, QtProperty *p, QWidget *parent ); + +private Q_SLOTS: + void onPropertyChanged( QtProperty *p, const QString &value ); + void onSetValue( const QString &value ); + void onEditorDestroyed( QObject *editor ); + +private: + TextureEditorFactoryPrivate *d_ptr; + + Q_DISABLE_COPY( TextureEditorFactory ); +}; + + +///////////////////////////////////////////////////////////////// Editor /////////////////////////////////////////////////////////////////////////// + +class QLineEdit; +class QToolButton; + +class TexturePropertyEditor : public QWidget +{ + Q_OBJECT +public: + TexturePropertyEditor( QWidget *parent = NULL ); + ~TexturePropertyEditor(); + +public Q_SLOTS: + void setValue( const QString &value ); + +protected: + void showEvent( QShowEvent *e ); + +private Q_SLOTS: + void onToolButtonClicked(); + void onTextChanged( const QString &text ); + +Q_SIGNALS: + void valueChanged( const QString &value ); + +private: + void setupUi(); + void setupConnections(); + void disableConnections(); + + + QLineEdit *lineEdit; + QToolButton *toolButton; +}; + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp b/code/studio/src/plugins/gui_editor/widget_hierarchy.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.cpp rename to code/studio/src/plugins/gui_editor/widget_hierarchy.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h b/code/studio/src/plugins/gui_editor/widget_hierarchy.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.h rename to code/studio/src/plugins/gui_editor/widget_hierarchy.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.ui b/code/studio/src/plugins/gui_editor/widget_hierarchy.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_hierarchy.ui rename to code/studio/src/plugins/gui_editor/widget_hierarchy.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h b/code/studio/src/plugins/gui_editor/widget_info.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info.h rename to code/studio/src/plugins/gui_editor/widget_info.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp b/code/studio/src/plugins/gui_editor/widget_info_serializer.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.cpp rename to code/studio/src/plugins/gui_editor/widget_info_serializer.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.h b/code/studio/src/plugins/gui_editor/widget_info_serializer.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_serializer.h rename to code/studio/src/plugins/gui_editor/widget_info_serializer.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h b/code/studio/src/plugins/gui_editor/widget_info_tree.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree.h rename to code/studio/src/plugins/gui_editor/widget_info_tree.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h b/code/studio/src/plugins/gui_editor/widget_info_tree_node.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_node.h rename to code/studio/src/plugins/gui_editor/widget_info_tree_node.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_visitor.h b/code/studio/src/plugins/gui_editor/widget_info_tree_visitor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_info_tree_visitor.h rename to code/studio/src/plugins/gui_editor/widget_info_tree_visitor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp b/code/studio/src/plugins/gui_editor/widget_properties.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.cpp rename to code/studio/src/plugins/gui_editor/widget_properties.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h b/code/studio/src/plugins/gui_editor/widget_properties.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.h rename to code/studio/src/plugins/gui_editor/widget_properties.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.ui b/code/studio/src/plugins/gui_editor/widget_properties.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties.ui rename to code/studio/src/plugins/gui_editor/widget_properties.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp b/code/studio/src/plugins/gui_editor/widget_properties_parser.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.cpp rename to code/studio/src/plugins/gui_editor/widget_properties_parser.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.h b/code/studio/src/plugins/gui_editor/widget_properties_parser.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_properties_parser.h rename to code/studio/src/plugins/gui_editor/widget_properties_parser.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_serializer.cpp b/code/studio/src/plugins/gui_editor/widget_serializer.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_serializer.cpp rename to code/studio/src/plugins/gui_editor/widget_serializer.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_serializer.h b/code/studio/src/plugins/gui_editor/widget_serializer.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widget_serializer.h rename to code/studio/src/plugins/gui_editor/widget_serializer.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBase.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlBase.xml similarity index 74% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBase.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlBase.xml index 5c334dea5..8ac372bdb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBase.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlBase.xml @@ -30,24 +30,34 @@ tooltip_parent - string + tooltip_parent tooltip_special_parent string - + tooltip_posref - string + posreftt auto - + + + tooltip_parent_posref + posreftt + auto + tooltip_posref_alt - string + posreftt auto - + + + tooltip_parent_posref_alt + posreftt + auto + instant_help bool diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlBaseButton.xml similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlBaseButton.xml index 42e2bdef1..33f9f3a3f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlBaseButton.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlBaseButton.xml @@ -10,8 +10,8 @@ button_type - string - push_button + button_type + toggle_button pushed @@ -30,17 +30,17 @@ color - string + color 255 255 255 255 col_pushed - string + color 255 255 255 255 col_over - string + color 255 255 255 255 @@ -60,7 +60,7 @@ onover - string + action @@ -70,7 +70,7 @@ onclick_l - string + action @@ -80,7 +80,7 @@ ondblclick_l - string + action @@ -90,7 +90,7 @@ onclick_r - string + action @@ -100,7 +100,7 @@ onlongclick_l - string + action @@ -110,7 +110,7 @@ onclock_tick - string + action diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml similarity index 83% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml index fb2514e7c..12b82e7f6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlButton.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlButton.xml @@ -2,7 +2,6 @@
CtrlButton CCtrlButton - button CtrlBaseButton false @@ -12,17 +11,17 @@ tx_normal string - log_but_r.tga + tx_pushed string - log_but_r.tga + tx_over string - log_but_over_r.tga + scale diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlColPick.xml similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlColPick.xml index 6ac05fbcc..ea2ba6171 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlColPick.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlColPick.xml @@ -2,7 +2,6 @@
CtrlColPick CCtrlColPick - colpick CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlScroll.xml similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlScroll.xml index a5c8dae1e..1ad970f31 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlScroll.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlScroll.xml @@ -2,7 +2,6 @@
CtrlScroll CCtrlScroll - scroll CtrlBase false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTabButton.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlTabButton.xml similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTabButton.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlTabButton.xml diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml b/code/studio/src/plugins/gui_editor/widgets/CtrlTextButton.xml similarity index 87% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml rename to code/studio/src/plugins/gui_editor/widgets/CtrlTextButton.xml index cacc45ccb..ca66dbd62 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/CtrlTextButton.xml +++ b/code/studio/src/plugins/gui_editor/widgets/CtrlTextButton.xml @@ -2,7 +2,6 @@
CtrlTextButton CCtrlTextButton - text_button CtrlBaseButton false @@ -12,27 +11,27 @@ tx_normal string - but + tx_pushed string - but + tx_over string - but_over + hardtext string - text + wmargin int - 20 + 0 wmin @@ -53,40 +52,45 @@ text_underlined bool false - - + + text_posref - string - MM MM - + posref + MM + + + text_parent_posref + posref + MM + text_color_normal - string + color 255 255 255 255 text_color_pushed - string + color 255 255 255 255 text_color_over - string + color 255 255 255 255 text_shadow_color_normal - string + color 0 0 0 255 text_shadow_color_pushed - string + color 0 0 0 255 text_shadow_color_over - string + color 0 0 0 255 @@ -116,7 +120,7 @@ color - string + color 255 255 255 255 @@ -136,7 +140,7 @@ shadow_color - string + color 0 0 0 255 @@ -146,13 +150,13 @@ justification - string + text_justification dont_clip_word line_maxw int - 200 + 0 multi_line_space diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml b/code/studio/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml rename to code/studio/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml index 63be51b5e..624ded887 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBGroupSelectNumber.xml @@ -2,7 +2,6 @@
DBGroupSelectNumber CDBGroupSelectNumber - select_number InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml b/code/studio/src/plugins/gui_editor/widgets/DBViewBar.xml similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml rename to code/studio/src/plugins/gui_editor/widgets/DBViewBar.xml index c7f2e488c..c7f644fa4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBViewBar.xml @@ -2,7 +2,6 @@
DBViewBar CDBViewBar - bar ViewBitmap false @@ -26,7 +25,7 @@ color_negative - string + color 0 0 0 0 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml b/code/studio/src/plugins/gui_editor/widgets/DBViewBar3.xml similarity index 89% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml rename to code/studio/src/plugins/gui_editor/widgets/DBViewBar3.xml index 9b12a637a..8295c5f30 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewBar3.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBViewBar3.xml @@ -2,7 +2,6 @@
DBViewBar3 CDBViewBar3 - bar3 ViewBitmap false @@ -41,32 +40,32 @@ color1 - string + color 255 255 255 255 color2 - string + color 255 255 255 255 color3 - string + color 255 255 255 255 color1_negative - string + color 0 0 0 0 color2_negative - string + color 0 0 0 0 color3_negative - string + color 0 0 0 0 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml b/code/studio/src/plugins/gui_editor/widgets/DBViewDigit.xml similarity index 88% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml rename to code/studio/src/plugins/gui_editor/widgets/DBViewDigit.xml index 8a2a28831..0c12445f9 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewDigit.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBViewDigit.xml @@ -2,7 +2,6 @@
DBViewDigit CDBViewDigit - digit CtrlBase false @@ -12,7 +11,7 @@ value string - 0 + numdigit @@ -26,7 +25,7 @@ color - string + color 255 255 255 255 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml b/code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml rename to code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml index 95a43025e..c1861df61 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewNumber.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBViewNumber.xml @@ -2,7 +2,6 @@
DBViewNumber CDBViewNumber - text_number ViewText false @@ -12,7 +11,7 @@ value string - 0 + positive diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml b/code/studio/src/plugins/gui_editor/widgets/DBViewQuantity.xml similarity index 79% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml rename to code/studio/src/plugins/gui_editor/widgets/DBViewQuantity.xml index 1b812bccf..c24379c96 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/DBViewQuantity.xml +++ b/code/studio/src/plugins/gui_editor/widgets/DBViewQuantity.xml @@ -2,7 +2,6 @@
DBViewQuantity CDBViewQuantity - text_quantity ViewText false @@ -12,17 +11,17 @@ value string - 0 + valuemax string - 100 + emptytext string - empty text + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupCell.xml b/code/studio/src/plugins/gui_editor/widgets/GroupCell.xml similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupCell.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupCell.xml index 8f8592771..ad0ae6e02 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupCell.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupCell.xml @@ -30,7 +30,7 @@ bgcolor - string + color 0 0 0 0 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml b/code/studio/src/plugins/gui_editor/widgets/GroupContainer.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupContainer.xml index bdbf9931a..3d879a150 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupContainer.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupContainer.xml @@ -2,7 +2,6 @@
GroupContainer CGroupContainer - container InterfaceGroup false @@ -46,7 +45,7 @@ header_color - string + color 255 255 255 255 @@ -111,7 +110,7 @@ on_open - string + action @@ -121,7 +120,7 @@ on_close - string + action @@ -131,7 +130,7 @@ on_close_button - string + action @@ -141,7 +140,7 @@ on_move - string + action @@ -151,7 +150,7 @@ on_deactive_check - string + action @@ -161,7 +160,7 @@ on_resize - string + action @@ -171,7 +170,7 @@ on_alpha_settings_changed - string + action @@ -181,7 +180,7 @@ on_begin_move - string + action diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml b/code/studio/src/plugins/gui_editor/widgets/GroupEditBox.xml similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupEditBox.xml index 603af6c04..31ca205c7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupEditBox.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupEditBox.xml @@ -2,7 +2,6 @@
GroupEditBox CGroupEditBox - edit_box InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupFrame.xml b/code/studio/src/plugins/gui_editor/widgets/GroupFrame.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupFrame.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupFrame.xml index f414e67e7..c7ac89fa2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupFrame.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupFrame.xml @@ -15,7 +15,7 @@ color - string + color 255 255 255 255 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml b/code/studio/src/plugins/gui_editor/widgets/GroupHTML.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupHTML.xml index b76fe4cd4..5f0521be8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHTML.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupHTML.xml @@ -2,7 +2,6 @@
GroupHTML CGroupHTML - html GroupScrollText false @@ -21,47 +20,47 @@ background_color - string + color 0 0 0 255 error_color - string + color 255 0 0 255 link_color - string + color 0 0 255 255 h1_color - string + color 255 255 255 255 h2_color - string + color 255 255 255 255 h3_color - string + color 255 255 255 255 h4_color - string + color 255 255 255 255 h5_color - string + color 255 255 255 255 h6_color - string + color 255 255 255 255 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml b/code/studio/src/plugins/gui_editor/widgets/GroupHeader.xml similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupHeader.xml index bcb517c66..cc96fd742 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupHeader.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupHeader.xml @@ -2,7 +2,6 @@
GroupHeader CGroupHeader - header GroupList false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml b/code/studio/src/plugins/gui_editor/widgets/GroupList.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupList.xml index 1858cd5b3..3ca2db95c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupList.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupList.xml @@ -2,7 +2,6 @@
GroupList CGroupList - list InterfaceGroup false @@ -41,7 +40,7 @@ col_over - string + color 255 255 255 32 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml b/code/studio/src/plugins/gui_editor/widgets/GroupMenu.xml similarity index 88% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupMenu.xml index 4739f0352..cdd42ba95 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupMenu.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupMenu.xml @@ -2,7 +2,6 @@
GroupMenu CGroupMenu - menu GroupModal false @@ -16,7 +15,7 @@ color - string + color 255 255 255 255 @@ -26,32 +25,32 @@ shadow_color - string + color 0 0 0 255 color_over - string + color 255 255 255 255 shadow_color_over - string + color 0 0 0 255 highlight_over - string + color 128 0 0 255 color_grayed - string + color 128 128 128 255 shadow_color_grayed - string + color 0 0 0 255 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml b/code/studio/src/plugins/gui_editor/widgets/GroupModal.xml similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupModal.xml index afc5005c8..034e3025e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupModal.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupModal.xml @@ -2,7 +2,6 @@
GroupModal CGroupModal - modal GroupFrame false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupParagraph.xml b/code/studio/src/plugins/gui_editor/widgets/GroupParagraph.xml similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupParagraph.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupParagraph.xml index f05806757..e561e8c5f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupParagraph.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupParagraph.xml @@ -30,7 +30,7 @@ col_over - string + color 255 255 255 32 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml b/code/studio/src/plugins/gui_editor/widgets/GroupScrollText.xml similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupScrollText.xml index 8cefb8df2..95719398d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupScrollText.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupScrollText.xml @@ -2,7 +2,6 @@
GroupScrollText CGroupScrollText - scroll_text InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml b/code/studio/src/plugins/gui_editor/widgets/GroupTab.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupTab.xml index 69db79466..df148a0a3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupTab.xml @@ -2,7 +2,6 @@
GroupTab CGroupTab - tab InterfaceGroup false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml b/code/studio/src/plugins/gui_editor/widgets/GroupTable.xml similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupTable.xml index 9c2240adc..9fa957741 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupTable.xml @@ -2,7 +2,6 @@
GroupTable CGroupTable - table InterfaceGroup false @@ -26,7 +25,7 @@ bgcolor - string + color 0 0 0 255 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml b/code/studio/src/plugins/gui_editor/widgets/GroupTree.xml similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml rename to code/studio/src/plugins/gui_editor/widgets/GroupTree.xml index 6bd10ad9f..73b1dea3b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTree.xml +++ b/code/studio/src/plugins/gui_editor/widgets/GroupTree.xml @@ -2,7 +2,6 @@
GroupTree CGroupTree - tree InterfaceGroup false @@ -11,17 +10,17 @@ col_over - string + color 255 255 255 128 col_select - string + color 255 128 128 128 col_over_back - string + color 64 64 64 255 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceElement.xml b/code/studio/src/plugins/gui_editor/widgets/InterfaceElement.xml similarity index 88% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceElement.xml rename to code/studio/src/plugins/gui_editor/widgets/InterfaceElement.xml index 856480dc7..b16de9ed0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceElement.xml +++ b/code/studio/src/plugins/gui_editor/widgets/InterfaceElement.xml @@ -36,12 +36,17 @@ h int 0 - + posref - string - BL BL - + posref + BL + + + parentposref + posref + BL + sizeref string diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml b/code/studio/src/plugins/gui_editor/widgets/InterfaceGroup.xml similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml rename to code/studio/src/plugins/gui_editor/widgets/InterfaceGroup.xml index c9a8c1546..ddcdf01e6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroup.xml +++ b/code/studio/src/plugins/gui_editor/widgets/InterfaceGroup.xml @@ -2,7 +2,6 @@
InterfaceGroup CInterfaceGroup - interface_group CtrlBase false @@ -41,7 +40,7 @@ on_active - string + action @@ -51,7 +50,7 @@ on_deactive - string + action @@ -81,7 +80,7 @@ group_onclick_r - string + action @@ -91,7 +90,7 @@ group_onclick_l - string + action @@ -101,7 +100,7 @@ on_enter - string + action handler diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml b/code/studio/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml similarity index 88% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml rename to code/studio/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml index 51590ee33..b095ecac5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml +++ b/code/studio/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml @@ -2,7 +2,6 @@
InterfaceGroupWheel CInterfaceGroupWheel - group_wheel InterfaceGroup false @@ -11,7 +10,7 @@ on_wheel_up - string + action @@ -21,7 +20,7 @@ on_wheel_down - string + action diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/RootGroup.xml b/code/studio/src/plugins/gui_editor/widgets/RootGroup.xml similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/RootGroup.xml rename to code/studio/src/plugins/gui_editor/widgets/RootGroup.xml diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml b/code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml similarity index 93% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml rename to code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml index 8b931f78b..21ef7daff 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmap.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewBitmap.xml @@ -2,7 +2,6 @@
ViewBitmap CViewBitmap - bitmap CtrlBase false @@ -11,7 +10,7 @@ color - string + color 255 255 255 255 @@ -36,7 +35,7 @@ texture - string + texture @@ -61,7 +60,7 @@ align - string + bitmap_align diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml b/code/studio/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml similarity index 87% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml rename to code/studio/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml index 190143be5..8fc579675 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewBitmapCombo.xml @@ -2,7 +2,6 @@
ViewBitmapCombo CViewBitmapCombo - bitmap_combo CtrlBase false @@ -26,17 +25,17 @@ col_normal - string + color col_over - string + color col_pushed - string + color diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml b/code/studio/src/plugins/gui_editor/widgets/ViewText.xml similarity index 93% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml rename to code/studio/src/plugins/gui_editor/widgets/ViewText.xml index 9490a1eee..415c3167e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewText.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewText.xml @@ -2,7 +2,6 @@
ViewText CViewText - text InterfaceElement false @@ -11,7 +10,7 @@ color - string + color 255 255 255 255 @@ -31,7 +30,7 @@ shadow_color - string + color 0 0 0 255 @@ -41,13 +40,13 @@ justification - string + text_justification dont_clip_word line_maxw int - 100 + 0 multi_line_space @@ -102,7 +101,7 @@ hardtext string - some text + hardtext_format diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml b/code/studio/src/plugins/gui_editor/widgets/ViewTextFormated.xml similarity index 90% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml rename to code/studio/src/plugins/gui_editor/widgets/ViewTextFormated.xml index c5749ca9c..cabd081f0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextFormated.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewTextFormated.xml @@ -2,7 +2,6 @@
ViewTextFormated CViewTextFormated - text_formated ViewText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml b/code/studio/src/plugins/gui_editor/widgets/ViewTextID.xml similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml rename to code/studio/src/plugins/gui_editor/widgets/ViewTextID.xml index b3edc86ab..52e010ec6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextID.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewTextID.xml @@ -2,7 +2,6 @@
ViewTextID CViewTextID - text_id ViewText false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml b/code/studio/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml similarity index 90% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml rename to code/studio/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml index 3ac6c7962..af8dd54eb 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml +++ b/code/studio/src/plugins/gui_editor/widgets/ViewTextIDFormated.xml @@ -2,7 +2,6 @@
ViewTextIDFormated CViewTextIDFormated - text_id_formated ViewTextID false diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt b/code/studio/src/plugins/landscape_editor/CMakeLists.txt similarity index 63% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt rename to code/studio/src/plugins/landscape_editor/CMakeLists.txt index 129f672c5..448d86a48 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt +++ b/code/studio/src/plugins/landscape_editor/CMakeLists.txt @@ -41,17 +41,17 @@ SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${OVQT_PLUGIN_LANDSCAPE_EDITOR_MOC_SRC} SOURCE_GROUP("Landscape Editor Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_landscape_editor SHARED ${SRC} +ADD_LIBRARY(studio_plugin_landscape_editor SHARED ${SRC} ${OVQT_PLUGIN_LANDSCAPE_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUGIN_LANDSCAPE_EDITOR_UI_HDRS} ${OVQT_PLUGIN_LANDSCAPE_EDITOR_RC_SRCS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_landscape_editor ovqt_plugin_core nelmisc nel3d nelgeorges nelligo ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) +TARGET_LINK_LIBRARIES(studio_plugin_landscape_editor studio_plugin_core nelmisc nel3d nelgeorges nelligo ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) -NL_DEFAULT_PROPS(ovqt_plugin_landscape_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: Landscape Editor") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_landscape_editor) -NL_ADD_LIB_SUFFIX(ovqt_plugin_landscape_editor) +NL_DEFAULT_PROPS(studio_plugin_landscape_editor "Tools: Studio Plugin: Landscape Editor") +NL_ADD_RUNTIME_FLAGS(studio_plugin_landscape_editor) +NL_ADD_LIB_SUFFIX(studio_plugin_landscape_editor) ADD_DEFINITIONS(-DLANDSCAPE_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) @@ -59,16 +59,16 @@ ADD_DEFINITIONS(-DLANDSCAPE_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -D IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone.cpp b/code/studio/src/plugins/landscape_editor/builder_zone.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone.cpp rename to code/studio/src/plugins/landscape_editor/builder_zone.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone.h b/code/studio/src/plugins/landscape_editor/builder_zone.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone.h rename to code/studio/src/plugins/landscape_editor/builder_zone.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_base.cpp b/code/studio/src/plugins/landscape_editor/builder_zone_base.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_base.cpp rename to code/studio/src/plugins/landscape_editor/builder_zone_base.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_base.h b/code/studio/src/plugins/landscape_editor/builder_zone_base.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_base.h rename to code/studio/src/plugins/landscape_editor/builder_zone_base.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_region.cpp b/code/studio/src/plugins/landscape_editor/builder_zone_region.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_region.cpp rename to code/studio/src/plugins/landscape_editor/builder_zone_region.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_region.h b/code/studio/src/plugins/landscape_editor/builder_zone_region.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/builder_zone_region.h rename to code/studio/src/plugins/landscape_editor/builder_zone_region.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_grid.png b/code/studio/src/plugins/landscape_editor/icons/ic_grid.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_grid.png rename to code/studio/src/plugins/landscape_editor/icons/ic_grid.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_landscape_item.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_landscape_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_landscape_item.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_landscape_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_landscape_settings.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_landscape_settings.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_landscape_settings.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_landscape_settings.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_transition_land.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_transition_land.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_transition_land.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_transition_land.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_world_editor.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_world_editor.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_world_editor.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_world_editor.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_zone.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_zone.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_zone.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_zone.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_zonel.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_zonel.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_zonel.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_zonel.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_zones.png b/code/studio/src/plugins/landscape_editor/icons/ic_nel_zones.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_nel_zones.png rename to code/studio/src/plugins/landscape_editor/icons/ic_nel_zones.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_snapshot.png b/code/studio/src/plugins/landscape_editor/icons/ic_snapshot.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/icons/ic_snapshot.png rename to code/studio/src/plugins/landscape_editor/icons/ic_snapshot.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_actions.cpp b/code/studio/src/plugins/landscape_editor/landscape_actions.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_actions.cpp rename to code/studio/src/plugins/landscape_editor/landscape_actions.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_actions.h b/code/studio/src/plugins/landscape_editor/landscape_actions.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_actions.h rename to code/studio/src/plugins/landscape_editor/landscape_actions.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor.qrc b/code/studio/src/plugins/landscape_editor/landscape_editor.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor.qrc rename to code/studio/src/plugins/landscape_editor/landscape_editor.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_constants.h b/code/studio/src/plugins/landscape_editor/landscape_editor_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_constants.h rename to code/studio/src/plugins/landscape_editor/landscape_editor_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_global.h b/code/studio/src/plugins/landscape_editor/landscape_editor_global.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_global.h rename to code/studio/src/plugins/landscape_editor/landscape_editor_global.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_plugin.cpp b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_plugin.cpp rename to code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp index 73a6f5b25..f97aff691 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_plugin.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.cpp @@ -39,6 +39,9 @@ LandscapeEditorPlugin::~LandscapeEditorPlugin() } qDeleteAll(m_autoReleaseObjects); m_autoReleaseObjects.clear(); + + delete m_libContext; + m_libContext = NULL; } bool LandscapeEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_plugin.h b/code/studio/src/plugins/landscape_editor/landscape_editor_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_plugin.h rename to code/studio/src/plugins/landscape_editor/landscape_editor_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.cpp b/code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp similarity index 99% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.cpp rename to code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp index bbc996b94..aeca41906 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.cpp +++ b/code/studio/src/plugins/landscape_editor/landscape_editor_window.cpp @@ -104,6 +104,10 @@ LandscapeEditorWindow::~LandscapeEditorWindow() { writeSettings(); delete m_zoneBuilder; + + Core::ICore::instance()->mainWindow()->statusBar()->removeWidget( m_statusInfo ); + delete m_statusInfo; + m_statusInfo = NULL; } QUndoStack *LandscapeEditorWindow::undoStack() const diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.h b/code/studio/src/plugins/landscape_editor/landscape_editor_window.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.h rename to code/studio/src/plugins/landscape_editor/landscape_editor_window.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.ui b/code/studio/src/plugins/landscape_editor/landscape_editor_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_editor_window.ui rename to code/studio/src/plugins/landscape_editor/landscape_editor_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene.cpp b/code/studio/src/plugins/landscape_editor/landscape_scene.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene.cpp rename to code/studio/src/plugins/landscape_editor/landscape_scene.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene.h b/code/studio/src/plugins/landscape_editor/landscape_scene.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene.h rename to code/studio/src/plugins/landscape_editor/landscape_scene.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene_base.cpp b/code/studio/src/plugins/landscape_editor/landscape_scene_base.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene_base.cpp rename to code/studio/src/plugins/landscape_editor/landscape_scene_base.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene_base.h b/code/studio/src/plugins/landscape_editor/landscape_scene_base.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_scene_base.h rename to code/studio/src/plugins/landscape_editor/landscape_scene_base.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_view.cpp b/code/studio/src/plugins/landscape_editor/landscape_view.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_view.cpp rename to code/studio/src/plugins/landscape_editor/landscape_view.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_view.h b/code/studio/src/plugins/landscape_editor/landscape_view.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/landscape_view.h rename to code/studio/src/plugins/landscape_editor/landscape_view.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_model.cpp b/code/studio/src/plugins/landscape_editor/list_zones_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_model.cpp rename to code/studio/src/plugins/landscape_editor/list_zones_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_model.h b/code/studio/src/plugins/landscape_editor/list_zones_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_model.h rename to code/studio/src/plugins/landscape_editor/list_zones_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_widget.cpp b/code/studio/src/plugins/landscape_editor/list_zones_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_widget.cpp rename to code/studio/src/plugins/landscape_editor/list_zones_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_widget.h b/code/studio/src/plugins/landscape_editor/list_zones_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_widget.h rename to code/studio/src/plugins/landscape_editor/list_zones_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_widget.ui b/code/studio/src/plugins/landscape_editor/list_zones_widget.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/list_zones_widget.ui rename to code/studio/src/plugins/landscape_editor/list_zones_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.cpp b/code/studio/src/plugins/landscape_editor/pixmap_database.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.cpp rename to code/studio/src/plugins/landscape_editor/pixmap_database.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.h b/code/studio/src/plugins/landscape_editor/pixmap_database.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.h rename to code/studio/src/plugins/landscape_editor/pixmap_database.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/project_settings_dialog.cpp b/code/studio/src/plugins/landscape_editor/project_settings_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/project_settings_dialog.cpp rename to code/studio/src/plugins/landscape_editor/project_settings_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/project_settings_dialog.h b/code/studio/src/plugins/landscape_editor/project_settings_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/project_settings_dialog.h rename to code/studio/src/plugins/landscape_editor/project_settings_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/project_settings_dialog.ui b/code/studio/src/plugins/landscape_editor/project_settings_dialog.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/project_settings_dialog.ui rename to code/studio/src/plugins/landscape_editor/project_settings_dialog.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/shapshot_dialog.ui b/code/studio/src/plugins/landscape_editor/shapshot_dialog.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/shapshot_dialog.ui rename to code/studio/src/plugins/landscape_editor/shapshot_dialog.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/snapshot_dialog.cpp b/code/studio/src/plugins/landscape_editor/snapshot_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/snapshot_dialog.cpp rename to code/studio/src/plugins/landscape_editor/snapshot_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/snapshot_dialog.h b/code/studio/src/plugins/landscape_editor/snapshot_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/snapshot_dialog.h rename to code/studio/src/plugins/landscape_editor/snapshot_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/ovqt_plugin_landscape_editor.xml b/code/studio/src/plugins/landscape_editor/studio_plugin_landscape_editor.xml similarity index 77% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/ovqt_plugin_landscape_editor.xml rename to code/studio/src/plugins/landscape_editor/studio_plugin_landscape_editor.xml index a0d32a22a..53dac537b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/ovqt_plugin_landscape_editor.xml +++ b/code/studio/src/plugins/landscape_editor/studio_plugin_landscape_editor.xml @@ -1,5 +1,5 @@ - ovqt_plugin_landscape_editor + studio_plugin_landscape_editor LandscapeEditor 0.8 GSoC2011_dnk-88 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/zone_region_editor.cpp b/code/studio/src/plugins/landscape_editor/zone_region_editor.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/zone_region_editor.cpp rename to code/studio/src/plugins/landscape_editor/zone_region_editor.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/zone_region_editor.h b/code/studio/src/plugins/landscape_editor/zone_region_editor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/zone_region_editor.h rename to code/studio/src/plugins/landscape_editor/zone_region_editor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt b/code/studio/src/plugins/log/CMakeLists.txt similarity index 55% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt rename to code/studio/src/plugins/log/CMakeLists.txt index 4cee3da24..7a27f370a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt +++ b/code/studio/src/plugins/log/CMakeLists.txt @@ -26,30 +26,30 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_LOG_MOC_SRC}) SOURCE_GROUP("Log Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_log MODULE ${SRC} ${OVQT_PLUG_LOG_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_LOG_UI_HDRS}) +ADD_LIBRARY(studio_plugin_log MODULE ${SRC} ${OVQT_PLUG_LOG_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_LOG_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_log ovqt_plugin_core nelmisc ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_log studio_plugin_core nelmisc ${QT_LIBRARIES}) -NL_DEFAULT_PROPS(ovqt_plugin_log "NeL, Tools, 3D: Object Viewer Qt Plugin: Log") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_log) -NL_ADD_LIB_SUFFIX(ovqt_plugin_log) +NL_DEFAULT_PROPS(studio_plugin_log "Tools: Studio Plugin: Log") +NL_ADD_RUNTIME_FLAGS(studio_plugin_log) +NL_ADD_LIB_SUFFIX(studio_plugin_log) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_log.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_log.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_form.ui b/code/studio/src/plugins/log/log_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_form.ui rename to code/studio/src/plugins/log/log_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp b/code/studio/src/plugins/log/log_plugin.cpp similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp rename to code/studio/src/plugins/log/log_plugin.cpp index 0f86ab90c..11da182a0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.cpp +++ b/code/studio/src/plugins/log/log_plugin.cpp @@ -45,6 +45,7 @@ namespace Plugin CLogPlugin::CLogPlugin(QWidget *parent): QDockWidget(parent) { m_ui.setupUi(this); + logMenu = NULL; } CLogPlugin::~CLogPlugin() @@ -62,6 +63,12 @@ namespace Plugin NLMISC::AssertLog->removeDisplayer(m_displayer); NLMISC::InfoLog->removeDisplayer(m_displayer); delete m_displayer; + + delete logMenu; + logMenu = NULL; + + delete m_libContext; + m_libContext = NULL; } bool CLogPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) @@ -79,13 +86,15 @@ namespace Plugin Core::ICore *core = Core::ICore::instance(); Core::MenuManager *menuManager = core->menuManager(); - QMenu *viewMenu = menuManager->menu(Core::Constants::M_VIEW); QMainWindow *wnd = Core::ICore::instance()->mainWindow(); wnd->addDockWidget(Qt::RightDockWidgetArea, this); hide(); - viewMenu->addAction(this->toggleViewAction()); + logMenu = menuManager->menuBar()->addMenu( "Log" ); + QAction *a = toggleViewAction(); + a->setText( tr( "View log" ) ); + logMenu->addAction( a ); } void CLogPlugin::setNelContext(NLMISC::INelContext *nelContext) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h b/code/studio/src/plugins/log/log_plugin.h similarity index 99% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h rename to code/studio/src/plugins/log/log_plugin.h index 2221195a8..9e4f64419 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_plugin.h +++ b/code/studio/src/plugins/log/log_plugin.h @@ -85,6 +85,8 @@ namespace Plugin NLQT::CQtDisplayer *m_displayer; + QMenu *logMenu; + }; } // namespace Plugin diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp b/code/studio/src/plugins/log/log_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.cpp rename to code/studio/src/plugins/log/log_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.h b/code/studio/src/plugins/log/log_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.h rename to code/studio/src/plugins/log/log_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.ui b/code/studio/src/plugins/log/log_settings_page.ui similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.ui rename to code/studio/src/plugins/log/log_settings_page.ui index 92faef8b6..09ead5c17 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/log_settings_page.ui +++ b/code/studio/src/plugins/log/log_settings_page.ui @@ -89,7 +89,7 @@ - + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/qt_displayer.cpp b/code/studio/src/plugins/log/qt_displayer.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/qt_displayer.cpp rename to code/studio/src/plugins/log/qt_displayer.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/qt_displayer.h b/code/studio/src/plugins/log/qt_displayer.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/qt_displayer.h rename to code/studio/src/plugins/log/qt_displayer.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/ovqt_plugin_log.xml b/code/studio/src/plugins/log/studio_plugin_log.xml similarity index 80% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/log/ovqt_plugin_log.xml rename to code/studio/src/plugins/log/studio_plugin_log.xml index 90b1b1e27..48d97bd87 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/ovqt_plugin_log.xml +++ b/code/studio/src/plugins/log/studio_plugin_log.xml @@ -1,5 +1,5 @@ - ovqt_plugin_log + studio_plugin_log LogPlugin 1.1 aquiles diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/studio/src/plugins/mission_compiler/CMakeLists.txt similarity index 59% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt rename to code/studio/src/plugins/mission_compiler/CMakeLists.txt index 1dcbebfa8..cbf35b9c7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt +++ b/code/studio/src/plugins/mission_compiler/CMakeLists.txt @@ -36,13 +36,13 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ryzom/tools/leveldesign/mission_compiler # Game Share Library INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common/src) -ADD_LIBRARY(ovqt_plugin_mission_compiler MODULE ${SRC} ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_PLUG_MISSION_COMPILER_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) +ADD_LIBRARY(studio_plugin_mission_compiler MODULE ${SRC} ${OVQT_PLUG_MISSION_COMPILER_MOC_SRC} ${OVQT_PLUG_MISSION_COMPILER_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_MISSION_COMPILER_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_mission_compiler ovqt_plugin_core nelmisc nelligo ryzom_mission_compiler_lib ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) +TARGET_LINK_LIBRARIES(studio_plugin_mission_compiler studio_plugin_core nelmisc nelligo ryzom_mission_compiler_lib ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) -NL_DEFAULT_PROPS(ovqt_plugin_mission_compiler "NeL, Tools, 3D: Object Viewer Qt Plugin: Mission Compiler") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_mission_compiler) -NL_ADD_LIB_SUFFIX(ovqt_plugin_mission_compiler) +NL_DEFAULT_PROPS(studio_plugin_mission_compiler "Tools: Studio Plugin: Mission Compiler") +NL_ADD_RUNTIME_FLAGS(studio_plugin_mission_compiler) +NL_ADD_LIB_SUFFIX(studio_plugin_mission_compiler) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) @@ -50,17 +50,17 @@ ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS} IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_mission_compiler.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_mission_compiler.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-2.png b/code/studio/src/plugins/mission_compiler/images/arrow-left-2.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-2.png rename to code/studio/src/plugins/mission_compiler/images/arrow-left-2.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-double-2.png b/code/studio/src/plugins/mission_compiler/images/arrow-left-double-2.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-left-double-2.png rename to code/studio/src/plugins/mission_compiler/images/arrow-left-double-2.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-2.png b/code/studio/src/plugins/mission_compiler/images/arrow-right-2.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-2.png rename to code/studio/src/plugins/mission_compiler/images/arrow-right-2.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-double-2.png b/code/studio/src/plugins/mission_compiler/images/arrow-right-double-2.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/arrow-right-double-2.png rename to code/studio/src/plugins/mission_compiler/images/arrow-right-double-2.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/document-export-4.png b/code/studio/src/plugins/mission_compiler/images/document-export-4.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/document-export-4.png rename to code/studio/src/plugins/mission_compiler/images/document-export-4.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_add_item.png b/code/studio/src/plugins/mission_compiler/images/ic_nel_add_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_add_item.png rename to code/studio/src/plugins/mission_compiler/images/ic_nel_add_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_delete_item.png b/code/studio/src/plugins/mission_compiler/images/ic_nel_delete_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_delete_item.png rename to code/studio/src/plugins/mission_compiler/images/ic_nel_delete_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_down_item.png b/code/studio/src/plugins/mission_compiler/images/ic_nel_down_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_down_item.png rename to code/studio/src/plugins/mission_compiler/images/ic_nel_down_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_generic_settings.png b/code/studio/src/plugins/mission_compiler/images/ic_nel_generic_settings.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_generic_settings.png rename to code/studio/src/plugins/mission_compiler/images/ic_nel_generic_settings.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_reset_all.png b/code/studio/src/plugins/mission_compiler/images/ic_nel_reset_all.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_reset_all.png rename to code/studio/src/plugins/mission_compiler/images/ic_nel_reset_all.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_up_item.png b/code/studio/src/plugins/mission_compiler/images/ic_nel_up_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/ic_nel_up_item.png rename to code/studio/src/plugins/mission_compiler/images/ic_nel_up_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/news-subscribe-2.png b/code/studio/src/plugins/mission_compiler/images/news-subscribe-2.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/news-subscribe-2.png rename to code/studio/src/plugins/mission_compiler/images/news-subscribe-2.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/run-build-2.png b/code/studio/src/plugins/mission_compiler/images/run-build-2.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/images/run-build-2.png rename to code/studio/src/plugins/mission_compiler/images/run-build-2.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler.qrc b/code/studio/src/plugins/mission_compiler/mission_compiler.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler.qrc rename to code/studio/src/plugins/mission_compiler/mission_compiler.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp b/code/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp rename to code/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp index e01f5f617..10985aa38 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.cpp +++ b/code/studio/src/plugins/mission_compiler/mission_compiler_main_window.cpp @@ -90,7 +90,14 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) : NLLIGO::Register(); // TODO try/catch exception. Crashes if path invalid. - m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); + try{ + m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false); + } + catch( NLMISC::Exception &e ) + { + nlinfo( "Exception occured during Mission Compiler LIGO startup: %s", e.what() ); + } + NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &m_ligoConfig; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h b/code/studio/src/plugins/mission_compiler/mission_compiler_main_window.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.h rename to code/studio/src/plugins/mission_compiler/mission_compiler_main_window.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui b/code/studio/src/plugins/mission_compiler/mission_compiler_main_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_main_window.ui rename to code/studio/src/plugins/mission_compiler/mission_compiler_main_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp b/code/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp rename to code/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp index 98b188fd3..46e51f36d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.cpp +++ b/code/studio/src/plugins/mission_compiler/mission_compiler_plugin.cpp @@ -30,6 +30,9 @@ MissionCompilerPlugin::~MissionCompilerPlugin() } qDeleteAll(m_autoReleaseObjects); m_autoReleaseObjects.clear(); + + delete m_LibContext; + m_LibContext = NULL; } bool MissionCompilerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h b/code/studio/src/plugins/mission_compiler/mission_compiler_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin.h rename to code/studio/src/plugins/mission_compiler/mission_compiler_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin_constants.h b/code/studio/src/plugins/mission_compiler/mission_compiler_plugin_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_plugin_constants.h rename to code/studio/src/plugins/mission_compiler/mission_compiler_plugin_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.cpp b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.cpp rename to code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp index ad115cffd..28dc4f9ce 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.cpp +++ b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.cpp @@ -191,7 +191,9 @@ void MissionCompilerSettingsPage::writeSettings() { for(int column = 0; column < m_ui.serversTableWidget->columnCount(); column++) { - items << m_ui.serversTableWidget->item(row, column)->text(); + QTableWidgetItem *item = m_ui.serversTableWidget->item(row, column); + if( item != NULL ) + items << item->text(); } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.h b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.h rename to code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.ui b/code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/mission_compiler_settings_page.ui rename to code/studio/src/plugins/mission_compiler/mission_compiler_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/server_entry_dialog.cpp b/code/studio/src/plugins/mission_compiler/server_entry_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/server_entry_dialog.cpp rename to code/studio/src/plugins/mission_compiler/server_entry_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/server_entry_dialog.h b/code/studio/src/plugins/mission_compiler/server_entry_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/server_entry_dialog.h rename to code/studio/src/plugins/mission_compiler/server_entry_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/server_entry_dialog.ui b/code/studio/src/plugins/mission_compiler/server_entry_dialog.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/server_entry_dialog.ui rename to code/studio/src/plugins/mission_compiler/server_entry_dialog.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/ovqt_plugin_mission_compiler.xml b/code/studio/src/plugins/mission_compiler/studio_plugin_mission_compiler.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/ovqt_plugin_mission_compiler.xml rename to code/studio/src/plugins/mission_compiler/studio_plugin_mission_compiler.xml index 072707e07..85bdca66f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/ovqt_plugin_mission_compiler.xml +++ b/code/studio/src/plugins/mission_compiler/studio_plugin_mission_compiler.xml @@ -1,5 +1,5 @@ - ovqt_plugin_mission_compiler + studio_plugin_mission_compiler MissionCompiler 0.1 Ryzom Core diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.cpp b/code/studio/src/plugins/mission_compiler/validation_file.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.cpp rename to code/studio/src/plugins/mission_compiler/validation_file.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.h b/code/studio/src/plugins/mission_compiler/validation_file.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/validation_file.h rename to code/studio/src/plugins/mission_compiler/validation_file.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt b/code/studio/src/plugins/object_viewer/CMakeLists.txt similarity index 85% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt rename to code/studio/src/plugins/object_viewer/CMakeLists.txt index b550e8ea0..3a4ce9c65 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt +++ b/code/studio/src/plugins/object_viewer/CMakeLists.txt @@ -165,7 +165,7 @@ SOURCE_GROUP("ovqt Plugin PS Src" FILES ${OVQT_PS_SRC}) SOURCE_GROUP("ovqt Plugin Vegetable Src" FILES ${OVQT_VEGETABLE_SRC}) SOURCE_GROUP("ovqt Plugin Widgets Src" FILES ${OVQT_WIDGETS_SRC}) -ADD_LIBRARY(ovqt_plugin_object_viewer MODULE ${SRC} +ADD_LIBRARY(studio_plugin_object_viewer MODULE ${SRC} ${OVQT_SCENE_SRC} ${OVQT_PS_SRC} ${OVQT_VEGETABLE_SRC} @@ -175,8 +175,8 @@ ADD_LIBRARY(ovqt_plugin_object_viewer MODULE ${SRC} ${OBJECT_VIEWER_PLUGIN_UI_HDRS} ${OBJECT_VIEWER_PLUGIN_RC_SRCS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_object_viewer - ovqt_plugin_core +TARGET_LINK_LIBRARIES(studio_plugin_object_viewer + studio_plugin_core nelmisc nel3d nelsound @@ -185,32 +185,32 @@ TARGET_LINK_LIBRARIES(ovqt_plugin_object_viewer ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) -NL_DEFAULT_PROPS(ovqt_plugin_object_viewer "NeL, Tools, 3D: Object Viewer Qt Plugin: Object Viewer") +NL_DEFAULT_PROPS(studio_plugin_object_viewer "Tools: Studio Plugin: Object Viewer") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_object_viewer) -NL_ADD_LIB_SUFFIX(ovqt_plugin_object_viewer) +NL_ADD_RUNTIME_FLAGS(studio_plugin_object_viewer) +NL_ADD_LIB_SUFFIX(studio_plugin_object_viewer) ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WITH_PCH) - ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) + ADD_NATIVE_PRECOMPILED_HEADER(studio_plugin_object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ENDIF(WITH_PCH) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_object_viewer.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_object_viewer.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_settings_page.cpp b/code/studio/src/plugins/object_viewer/graphics_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_settings_page.cpp rename to code/studio/src/plugins/object_viewer/graphics_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_settings_page.h b/code/studio/src/plugins/object_viewer/graphics_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_settings_page.h rename to code/studio/src/plugins/object_viewer/graphics_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_settings_page.ui b/code/studio/src/plugins/object_viewer/graphics_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_settings_page.ui rename to code/studio/src/plugins/object_viewer/graphics_settings_page.ui diff --git a/code/studio/src/plugins/object_viewer/graphics_viewport.cpp b/code/studio/src/plugins/object_viewer/graphics_viewport.cpp new file mode 100644 index 000000000..0cec0be10 --- /dev/null +++ b/code/studio/src/plugins/object_viewer/graphics_viewport.cpp @@ -0,0 +1,129 @@ +/* + 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 . + +*/ + +#include "stdpch.h" +#include "graphics_viewport.h" +#include "../core/Nel3DWidget/nel3d_widget.h" + +// STL includes + +// Qt includes +#include +#include +#include +#include + +// NeL includes +#include + +#include +#include + +#include +#include + +// Project includes +#include "modules.h" + +using namespace std; +using namespace NL3D; + +namespace NLQT +{ + +CGraphicsViewport::CGraphicsViewport(QObject *parent) + : QObject(parent) +{ + w = new Nel3DWidget(); + connect( w, SIGNAL( resize( int, int ) ), this, SLOT( onResize( int, int ) ) ); +} + +CGraphicsViewport::~CGraphicsViewport() +{ + disconnect( w, SIGNAL( resize( int, int ) ), this, SLOT( onResize( int, int ) ) ); + delete w; + w = NULL; +} + +void CGraphicsViewport::init() +{ + //H_AUTO2 + nldebug("CGraphicsViewport::init"); + + w->init(); + Modules::objView().init( w->getDriver() ); + Modules::psEdit().init(); + Modules::veget().init(); + + w->setMouseTracking(true); + w->setFocusPolicy(Qt::StrongFocus); +} + +void CGraphicsViewport::release() +{ + //H_AUTO2 + nldebug("CGraphicsViewport::release"); + + Modules::veget().release(); + Modules::psEdit().release(); + Modules::objView().release(); +} + + +QAction *CGraphicsViewport::createSaveScreenshotAction(QObject *parent) +{ + QAction *action = new QAction(parent); + connect(action, SIGNAL(triggered()), this, SLOT(saveScreenshot())); + return action; +} + +QAction *CGraphicsViewport::createSetBackgroundColor(QObject *parent) +{ + QAction *action = new QAction(parent); + connect(action, SIGNAL(triggered()), this, SLOT(setBackgroundColor())); + return action; +} + +QWidget* CGraphicsViewport::widget() +{ + return w; +} + +void CGraphicsViewport::saveScreenshot() +{ + Modules::objView().saveScreenshot("screenshot", false, true, false); +} + +void CGraphicsViewport::setBackgroundColor() +{ + QColor color = QColorDialog::getColor(QColor(Modules::objView().getBackgroundColor().R, + Modules::objView().getBackgroundColor().G, + Modules::objView().getBackgroundColor().B)); + if (color.isValid()) + Modules::objView().setBackgroundColor(NLMISC::CRGBA(color.red(), color.green(), color.blue())); +} + +void CGraphicsViewport::onResize( int width, int height ) +{ + if (Modules::objView().getDriver()) + Modules::objView().setSizeViewport( width, height ); +} + +} /* namespace NLQT */ + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_viewport.h b/code/studio/src/plugins/object_viewer/graphics_viewport.h similarity index 69% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_viewport.h rename to code/studio/src/plugins/object_viewer/graphics_viewport.h index 0c01fa1ad..9bbad9806 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/graphics_viewport.h +++ b/code/studio/src/plugins/object_viewer/graphics_viewport.h @@ -26,23 +26,14 @@ // STL includes // Qt includes -#include -#include +#include // NeL includes // Project includes - -/* TODO every platform should use QWidget */ -#if defined(NL_OS_WINDOWS) -typedef QWidget QNLWidget; -#elif defined(NL_OS_MAC) -typedef QWidget QNLWidget; -#elif defined(NL_OS_UNIX) -typedef QGLWidget QNLWidget; -#endif // NL_OS_UNIX - +class QWidget; class QAction; +class Nel3DWidget; namespace NLQT { @@ -51,25 +42,22 @@ namespace NLQT @class CGraphicsViewport @brief Responsible for interaction between Qt and NeL. Initializes CObjectViewer, CParticleEditor and CVegetableEditor subsystem. */ -class CGraphicsViewport : public QNLWidget, public NLMISC::IEventEmitter +class CGraphicsViewport : public QObject, public NLMISC::IEventEmitter { Q_OBJECT public: - CGraphicsViewport(QWidget *parent); + CGraphicsViewport(QObject *parent); virtual ~CGraphicsViewport(); - virtual QPaintEngine *paintEngine() const - { - return NULL; - } - void init(); void release(); QAction *createSaveScreenshotAction(QObject *parent); QAction *createSetBackgroundColor(QObject *parent); + QWidget* widget(); + private Q_SLOTS: void saveScreenshot(); void setBackgroundColor(); @@ -77,21 +65,15 @@ private Q_SLOTS: void submitEvents(NLMISC::CEventServer &server, bool allWindows) { } void emulateMouseRawMode(bool) { } -protected: - virtual void resizeEvent(QResizeEvent *resizeEvent); - -#if defined(NL_OS_WINDOWS) - virtual bool winEvent(MSG *message, long *result); -#elif defined(NL_OS_MAC) - virtual bool macEvent(EventHandlerCallRef caller, EventRef event); -#elif defined(NL_OS_UNIX) - virtual bool x11Event(XEvent *event); -#endif + void onResize( int width, int height ); private: CGraphicsViewport(const CGraphicsViewport &); CGraphicsViewport &operator=(const CGraphicsViewport &); + + Nel3DWidget *w; + }; /* class CGraphicsViewport */ } /* namespace NLQT */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_add_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_add_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_add_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_add_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_anim.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_anim.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_anim.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_anim.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_animset.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_animset.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_animset.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_animset.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_append_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_append_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_append_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_append_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_bgcolor.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_bgcolor.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_bgcolor.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_bgcolor.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_camera_3dedit.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_add.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_camera_add.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_add.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_camera_add.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_del.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_camera_del.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_del.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_camera_del.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_fps.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_camera_fps.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_camera_fps.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_camera_fps.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_daynight.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_daynight.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_daynight.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_daynight.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_delete_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_delete_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_delete_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_delete_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_down_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_down_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_down_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_down_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_framedelay.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_framedelay.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_framedelay.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_framedelay.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_insert_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_insert_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_insert_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_insert_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mixer.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_mixer.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mixer.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_mixer.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_mrm_mesh.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_new.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_new.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_new.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_new.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_open.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_open.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_open.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_open.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_particle_system.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_particle_system.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_particle_system_close.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particles.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_particles.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_particles.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_particles.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_pill.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_pill.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_pill.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_pill.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_all.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_reset_all.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_all.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_reset_all.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_camera.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_reset_camera.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_reset_camera.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_reset_camera.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_save.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_save.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save_as.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_save_as.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_save_as.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_save_as.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_skelscale.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_skelscale.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_skelscale.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_skelscale.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_sound.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_sound.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_sound.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_sound.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_up_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_up_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_up_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_up_item.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_veget.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_veget.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_veget.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_veget.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_vegetset.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_vegetset.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_vegetset.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_vegetset.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_water.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_water.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_water.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_water.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_wind.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_wind.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_wind.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_wind.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_workspace_item.png b/code/studio/src/plugins/object_viewer/icons/ic_nel_workspace_item.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/ic_nel_workspace_item.png rename to code/studio/src/plugins/object_viewer/icons/ic_nel_workspace_item.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_collision_zone_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_collision_zone_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_collision_zone_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_emitter_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_emitter_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_emitter_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_force_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_force_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_force_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_instance_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_instance_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_instance_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_light_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_light_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_light_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_located_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_located_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_located_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_close_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_close_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_particle_system_close_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_sound_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_sound_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_sound_item_24.png 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/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_workspace_item_24.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/icons/particles_system_24/ic_nel_workspace_item_24.png rename to code/studio/src/plugins/object_viewer/icons/particles_system_24/ic_nel_workspace_item_24.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/dqynight.png b/code/studio/src/plugins/object_viewer/images/dqynight.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/dqynight.png rename to code/studio/src/plugins/object_viewer/images/dqynight.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_mrm_mesh.png b/code/studio/src/plugins/object_viewer/images/ico_mrm_mesh.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/ico_mrm_mesh.png rename to code/studio/src/plugins/object_viewer/images/ico_mrm_mesh.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/mixer.png b/code/studio/src/plugins/object_viewer/images/mixer.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/mixer.png rename to code/studio/src/plugins/object_viewer/images/mixer.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/nel.png b/code/studio/src/plugins/object_viewer/images/nel.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/nel.png rename to code/studio/src/plugins/object_viewer/images/nel.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/pause.png b/code/studio/src/plugins/object_viewer/images/pause.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/pause.png rename to code/studio/src/plugins/object_viewer/images/pause.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/play.png b/code/studio/src/plugins/object_viewer/images/play.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/play.png rename to code/studio/src/plugins/object_viewer/images/play.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/polymode.png b/code/studio/src/plugins/object_viewer/images/polymode.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/polymode.png rename to code/studio/src/plugins/object_viewer/images/polymode.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/pqrticles.png b/code/studio/src/plugins/object_viewer/images/pqrticles.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/pqrticles.png rename to code/studio/src/plugins/object_viewer/images/pqrticles.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/refresh.png b/code/studio/src/plugins/object_viewer/images/refresh.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/refresh.png rename to code/studio/src/plugins/object_viewer/images/refresh.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/rmfill.png b/code/studio/src/plugins/object_viewer/images/rmfill.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/rmfill.png rename to code/studio/src/plugins/object_viewer/images/rmfill.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/rmline.png b/code/studio/src/plugins/object_viewer/images/rmline.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/rmline.png rename to code/studio/src/plugins/object_viewer/images/rmline.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/rmpoints.png b/code/studio/src/plugins/object_viewer/images/rmpoints.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/rmpoints.png rename to code/studio/src/plugins/object_viewer/images/rmpoints.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/seek-backward.png b/code/studio/src/plugins/object_viewer/images/seek-backward.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/seek-backward.png rename to code/studio/src/plugins/object_viewer/images/seek-backward.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/seek-forward.png b/code/studio/src/plugins/object_viewer/images/seek-forward.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/seek-forward.png rename to code/studio/src/plugins/object_viewer/images/seek-forward.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/skip-backward.png b/code/studio/src/plugins/object_viewer/images/skip-backward.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/skip-backward.png rename to code/studio/src/plugins/object_viewer/images/skip-backward.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/skip-forward.png b/code/studio/src/plugins/object_viewer/images/skip-forward.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/skip-forward.png rename to code/studio/src/plugins/object_viewer/images/skip-forward.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/sound.png b/code/studio/src/plugins/object_viewer/images/sound.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/sound.png rename to code/studio/src/plugins/object_viewer/images/sound.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/stop.png b/code/studio/src/plugins/object_viewer/images/stop.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/stop.png rename to code/studio/src/plugins/object_viewer/images/stop.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/water.png b/code/studio/src/plugins/object_viewer/images/water.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/water.png rename to code/studio/src/plugins/object_viewer/images/water.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/wind.png b/code/studio/src/plugins/object_viewer/images/wind.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/images/wind.png rename to code/studio/src/plugins/object_viewer/images/wind.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp b/code/studio/src/plugins/object_viewer/main_window.cpp similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp rename to code/studio/src/plugins/object_viewer/main_window.cpp index 2d45f0fb3..dc0c221cc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.cpp +++ b/code/studio/src/plugins/object_viewer/main_window.cpp @@ -66,17 +66,18 @@ CMainWindow::CMainWindow(QWidget *parent) _isGraphicsInitialized(false), _isGraphicsEnabled(false), _isSoundInitialized(false), - _isSoundEnabled(true), + _isSoundEnabled(false), // MTR workaround for sheet id nonsense _GraphicsViewport(NULL), _lastDir("."), _mouseMode(NL3D::U3dMouseListener::edit3d) { + menu = NULL; nldebug("CMainWindow::CMainWindow:"); setObjectName("CMainWindow"); // create NeL viewport _GraphicsViewport = new CGraphicsViewport(this); - setCentralWidget(_GraphicsViewport); + setCentralWidget(_GraphicsViewport->widget()); setDockNestingEnabled(true); @@ -116,7 +117,7 @@ CMainWindow::CMainWindow(QWidget *parent) _statusBarTimer = new QTimer(this); connect(_statusBarTimer, SIGNAL(timeout()), this, SLOT(updateStatusBar())); - _statusInfo = new QLabel(this); + _statusInfo = new QLabel(); _statusInfo->hide(); Core::ICore::instance()->mainWindow()->statusBar()->addPermanentWidget(_statusInfo); } @@ -134,6 +135,14 @@ CMainWindow::~CMainWindow() settings->endGroup(); settings->sync(); + removeMenus(); + + // If the status info widget isn't removed it miraclously crashes the application on shutdown... + // Somehow it's deleted while being owned by the status bar, then the status bar also tries to delete is... + Core::ICore::instance()->mainWindow()->statusBar()->removeWidget( _statusInfo ); + delete _statusInfo; + _statusInfo = NULL; + delete _AnimationDialog; delete _AnimationSetDialog; delete _SlotManagerDialog; @@ -270,55 +279,51 @@ void CMainWindow::createMenus() menuManager->registerAction(_reloadTexturesAction, "ObjectViewer.View.ReloadTextures"); menuManager->registerAction(_saveScreenshotAction, "ObjectViewer.View.SaveScreenshot"); - // add actions in view menu - QMenu *viewMenu = menuManager->menu(Core::Constants::M_VIEW); - viewMenu->addAction(_setBackColorAction); - viewMenu->addAction(_SetupFog->toggleViewAction()); - viewMenu->addAction(_resetSceneAction); - viewMenu->addAction(_reloadTexturesAction); - viewMenu->addAction(_saveScreenshotAction); - - // add actions in tools menu - QMenu *toolsMenu = menuManager->menu(Core::Constants::M_TOOLS); - QAction *settingsAction = menuManager->action(Core::Constants::SETTINGS); - QMenu *ovMenu = new QMenu("Object Viewer", this); + QMenu *ovMenu = menuManager->menuBar()->addMenu( "Object Viewer" ); menuManager->registerMenu(ovMenu, "ObjectViewerQt.ObjectViewer"); - toolsMenu->insertMenu(settingsAction, ovMenu); - ovMenu->insertAction(settingsAction ,_AnimationDialog->toggleViewAction()); + ovMenu->addAction(_setBackColorAction); + ovMenu->addAction(_SetupFog->toggleViewAction()); + ovMenu->addAction(_resetSceneAction); + ovMenu->addAction(_reloadTexturesAction); + ovMenu->addAction(_saveScreenshotAction); + + ovMenu->addSeparator(); + + ovMenu->addAction(_AnimationDialog->toggleViewAction() ); _AnimationDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIM)); - ovMenu->insertAction(settingsAction ,_AnimationSetDialog->toggleViewAction()); + ovMenu->addAction(_AnimationSetDialog->toggleViewAction()); _AnimationSetDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_ANIMSET)); - ovMenu->insertAction(settingsAction ,_SlotManagerDialog->toggleViewAction()); + ovMenu->addAction(_SlotManagerDialog->toggleViewAction()); _SlotManagerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MIXER)); - ovMenu->insertAction(settingsAction ,_ParticleControlDialog->toggleViewAction()); + ovMenu->addAction(_ParticleControlDialog->toggleViewAction()); _ParticleControlDialog->toggleViewAction()->setIcon(QIcon(":/images/pqrticles.png")); - ovMenu->insertAction(settingsAction ,_DayNightDialog->toggleViewAction()); + ovMenu->addAction(_DayNightDialog->toggleViewAction()); _DayNightDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_DAYNIGHT)); - ovMenu->insertAction(settingsAction ,_WaterPoolDialog->toggleViewAction()); + ovMenu->addAction(_WaterPoolDialog->toggleViewAction()); _WaterPoolDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WATER)); _WaterPoolDialog->toggleViewAction()->setEnabled(false); - ovMenu->insertAction(settingsAction ,_VegetableDialog->toggleViewAction()); + ovMenu->addAction(_VegetableDialog->toggleViewAction()); _VegetableDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_VEGET)); - ovMenu->insertAction(settingsAction ,_GlobalWindDialog->toggleViewAction()); + ovMenu->addAction(_GlobalWindDialog->toggleViewAction()); _GlobalWindDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_WIND)); - ovMenu->insertAction(settingsAction ,_SkeletonScaleDialog->toggleViewAction()); + ovMenu->addAction(_SkeletonScaleDialog->toggleViewAction()); _SkeletonScaleDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_SKELSCALE)); - ovMenu->insertAction(settingsAction ,_TuneTimerDialog->toggleViewAction()); + ovMenu->addAction(_TuneTimerDialog->toggleViewAction()); _TuneTimerDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_FRAMEDELAY)); - ovMenu->insertAction(settingsAction ,_SunColorDialog->toggleViewAction()); + ovMenu->addAction(_SunColorDialog->toggleViewAction()); - ovMenu->insertAction(settingsAction ,_TuneMRMDialog->toggleViewAction()); + ovMenu->addAction(_TuneMRMDialog->toggleViewAction()); _TuneMRMDialog->toggleViewAction()->setIcon(QIcon(Constants::ICON_MRM_MESH)); connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)), @@ -327,7 +332,14 @@ void CMainWindow::createMenus() connect(_ParticleControlDialog->toggleViewAction(), SIGNAL(triggered(bool)), _ParticleWorkspaceDialog->_PropertyDialog, SLOT(setVisible(bool))); - toolsMenu->insertSeparator(settingsAction); + menu = ovMenu; + +} + +void CMainWindow::removeMenus() +{ + delete menu; + menu = NULL; } void CMainWindow::createToolBars() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.h b/code/studio/src/plugins/object_viewer/main_window.h similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.h rename to code/studio/src/plugins/object_viewer/main_window.h index 5a392c191..dff4d9b4b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/main_window.h +++ b/code/studio/src/plugins/object_viewer/main_window.h @@ -95,6 +95,7 @@ protected: private: void createActions(); void createMenus(); + void removeMenus(); void createToolBars(); void createDialogs(); @@ -144,6 +145,8 @@ private: uint _numTri; float _texMem; sint _mouseMode; + + QMenu *menu; };/* class CMainWindow */ } /* namespace NLQT */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/modules.cpp b/code/studio/src/plugins/object_viewer/modules.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/modules.cpp rename to code/studio/src/plugins/object_viewer/modules.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/modules.h b/code/studio/src/plugins/object_viewer/modules.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/modules.h rename to code/studio/src/plugins/object_viewer/modules.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp b/code/studio/src/plugins/object_viewer/object_viewer.cpp similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp rename to code/studio/src/plugins/object_viewer/object_viewer.cpp index 48c679455..2cf803d3d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.cpp +++ b/code/studio/src/plugins/object_viewer/object_viewer.cpp @@ -70,20 +70,16 @@ CObjectViewer::~CObjectViewer() saveConfig(); } -void CObjectViewer::init(nlWindow wnd, uint16 w, uint16 h) +void CObjectViewer::init( NL3D::UDriver *driver ) { //H_AUTO2 nldebug("CObjectViewert::init"); // create the driver nlassert(!_Driver); - - _Driver = NL3D::UDriver::createDriver(0, _Direct3D, 0); + _Driver = driver; nlassert(_Driver); - // initialize the window with config file values - _Driver->setDisplay(wnd, NL3D::UDriver::CMode(w, h, 32)); - // Create a scene _Scene = _Driver->createScene(false); _Scene->setPolygonBalancingMode(NL3D::UScene::PolygonBalancingClamp); @@ -128,8 +124,8 @@ void CObjectViewer::init(nlWindow wnd, uint16 w, uint16 h) NL3D::CBloomEffect::instance().setDensityBloom(uint8(_BloomDensity)); NL3D::CBloomEffect::instance().setSquareBloom(_BloomSquare); - NL3D::CDriverUser *driver = dynamic_cast(Modules::objView().getDriver()); - _IDriver = driver->getDriver(); + NL3D::CDriverUser *udriver = dynamic_cast(Modules::objView().getDriver()); + _IDriver = udriver->getDriver(); NL3D::CSceneUser *scene = dynamic_cast(Modules::objView().getScene()); _CScene = &scene->getScene(); @@ -158,11 +154,8 @@ void CObjectViewer::release() // delete the light delete _Light; - // release driver - nlassert(_Driver); - _Driver->release(); - delete _Driver; _Driver = 0; + _IDriver = NULL; } void CObjectViewer::updateInput() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.h b/code/studio/src/plugins/object_viewer/object_viewer.h similarity index 99% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.h rename to code/studio/src/plugins/object_viewer/object_viewer.h index 5e978d7e0..e8cc7304e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.h +++ b/code/studio/src/plugins/object_viewer/object_viewer.h @@ -78,7 +78,7 @@ public: /// @param wnd - handle window. /// @param w - width window. /// @param h - height window. - void init(nlWindow wnd, uint16 w, uint16 h); + void init( NL3D::UDriver *driver ); /// Release class. void release(); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.qrc b/code/studio/src/plugins/object_viewer/object_viewer.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer.qrc rename to code/studio/src/plugins/object_viewer/object_viewer.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h b/code/studio/src/plugins/object_viewer/object_viewer_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_constants.h rename to code/studio/src/plugins/object_viewer/object_viewer_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp b/code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp similarity index 95% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp rename to code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp index 34fc0f1b4..dce7ad08f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.cpp +++ b/code/studio/src/plugins/object_viewer/object_viewer_plugin.cpp @@ -23,6 +23,9 @@ ObjectViewerPlugin::~ObjectViewerPlugin() qDeleteAll(_autoReleaseObjects); _autoReleaseObjects.clear(); Modules::release(); + + delete _LibContext; + _LibContext = NULL; } bool ObjectViewerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.h b/code/studio/src/plugins/object_viewer/object_viewer_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/object_viewer_plugin.h rename to code/studio/src/plugins/object_viewer/object_viewer_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/attrib_form.ui b/code/studio/src/plugins/object_viewer/particle_system/attrib_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/attrib_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/attrib_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/attrib_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/attrib_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/attrib_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/attrib_widget.h b/code/studio/src/plugins/object_viewer/particle_system/attrib_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/attrib_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/attrib_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/auto_lod_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/auto_lod_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/auto_lod_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/auto_lod_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/auto_lod_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/auto_lod_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/auto_lod_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/auto_lod_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/auto_lod_form.ui b/code/studio/src/plugins/object_viewer/particle_system/auto_lod_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/auto_lod_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/auto_lod_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/basic_edit_form.ui b/code/studio/src/plugins/object_viewer/particle_system/basic_edit_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/basic_edit_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/basic_edit_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/basic_edit_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/basic_edit_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/basic_edit_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/basic_edit_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/basic_edit_widget.h b/code/studio/src/plugins/object_viewer/particle_system/basic_edit_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/basic_edit_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/basic_edit_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/bin_op_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/bin_op_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/bin_op_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/bin_op_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/bin_op_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/constraint_mesh_form.ui b/code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/constraint_mesh_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/constraint_mesh_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/constraint_mesh_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/constraint_mesh_widget.h b/code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/constraint_mesh_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/constraint_mesh_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/curve_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/curve_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/curve_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/curve_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/curve_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/curve_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/curve_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/curve_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/curve_form.ui b/code/studio/src/plugins/object_viewer/particle_system/curve_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/curve_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/curve_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/direction_form.ui b/code/studio/src/plugins/object_viewer/particle_system/direction_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/direction_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/direction_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/direction_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/direction_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/direction_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/direction_widget.h b/code/studio/src/plugins/object_viewer/particle_system/direction_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/direction_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/direction_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/dup_ps.cpp b/code/studio/src/plugins/object_viewer/particle_system/dup_ps.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/dup_ps.cpp rename to code/studio/src/plugins/object_viewer/particle_system/dup_ps.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/dup_ps.h b/code/studio/src/plugins/object_viewer/particle_system/dup_ps.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/dup_ps.h rename to code/studio/src/plugins/object_viewer/particle_system/dup_ps.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/emitter_form.ui b/code/studio/src/plugins/object_viewer/particle_system/emitter_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/emitter_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/emitter_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/emitter_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/emitter_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/emitter_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/emitter_page.h b/code/studio/src/plugins/object_viewer/particle_system/emitter_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/emitter_page.h rename to code/studio/src/plugins/object_viewer/particle_system/emitter_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/follow_path_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/follow_path_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/follow_path_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/follow_path_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/follow_path_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_bindable_form.ui b/code/studio/src/plugins/object_viewer/particle_system/located_bindable_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_bindable_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/located_bindable_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_bindable_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/located_bindable_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_bindable_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/located_bindable_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_bindable_page.h b/code/studio/src/plugins/object_viewer/particle_system/located_bindable_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_bindable_page.h rename to code/studio/src/plugins/object_viewer/particle_system/located_bindable_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_form.ui b/code/studio/src/plugins/object_viewer/particle_system/located_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/located_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/located_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/located_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_page.h b/code/studio/src/plugins/object_viewer/particle_system/located_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/located_page.h rename to code/studio/src/plugins/object_viewer/particle_system/located_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/mesh_form.ui b/code/studio/src/plugins/object_viewer/particle_system/mesh_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/mesh_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/mesh_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/mesh_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/mesh_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/mesh_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/mesh_widget.h b/code/studio/src/plugins/object_viewer/particle_system/mesh_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/mesh_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/mesh_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/morph_mesh_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/morph_mesh_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/morph_mesh_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/morph_mesh_form.ui b/code/studio/src/plugins/object_viewer/particle_system/morph_mesh_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/morph_mesh_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/morph_mesh_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/multi_tex_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/multi_tex_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/multi_tex_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/multi_tex_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/multi_tex_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/multi_tex_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/multi_tex_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/multi_tex_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/multi_tex_form.ui b/code/studio/src/plugins/object_viewer/particle_system/multi_tex_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/multi_tex_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/multi_tex_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_control_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_control_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_control_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_control_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_control_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/particle_control_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_control_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_control_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_control_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_control_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_control_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_control_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_editor.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_editor.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_editor.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_editor.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_editor.h b/code/studio/src/plugins/object_viewer/particle_system/particle_editor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_editor.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_editor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_force_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_force_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_force_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_force_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_force_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_force_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_force_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_force_page.h b/code/studio/src/plugins/object_viewer/particle_system/particle_force_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_force_page.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_force_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_light_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_light_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_light_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_light_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_light_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_light_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_light_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_light_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_light_page.h b/code/studio/src/plugins/object_viewer/particle_system/particle_light_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_light_page.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_light_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_link_skeleton_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_link_skeleton_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_link_skeleton_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_node.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_node.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_node.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_node.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_node.h b/code/studio/src/plugins/object_viewer/particle_system/particle_node.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_node.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_node.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_property_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_property_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_property_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_property_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_property_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_sound_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_sound_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_sound_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_sound_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_sound_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_sound_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_sound_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_sound_page.h b/code/studio/src/plugins/object_viewer/particle_system/particle_sound_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_sound_page.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_sound_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_system_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_system_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_system_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_system_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_system_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_system_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_system_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_system_page.h b/code/studio/src/plugins/object_viewer/particle_system/particle_system_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_system_page.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_system_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_anim_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_anim_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.h b/code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_texture_anim_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_texture_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_texture_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_widget.h b/code/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_texture_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_texture_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_tree_model.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_tree_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_tree_model.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_tree_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_tree_model.h b/code/studio/src/plugins/object_viewer/particle_system/particle_tree_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_tree_model.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_tree_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_workspace_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_workspace_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_workspace_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_page.h b/code/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_workspace_page.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_workspace_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_zone_form.ui b/code/studio/src/plugins/object_viewer/particle_system/particle_zone_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_zone_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/particle_zone_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_zone_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/particle_zone_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_zone_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/particle_zone_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_zone_page.h b/code/studio/src/plugins/object_viewer/particle_system/particle_zone_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/particle_zone_page.h rename to code/studio/src/plugins/object_viewer/particle_system/particle_zone_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp b/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp rename to code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_initial_pos.h b/code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_initial_pos.h rename to code/studio/src/plugins/object_viewer/particle_system/ps_initial_pos.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_mover_form.ui b/code/studio/src/plugins/object_viewer/particle_system/ps_mover_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_mover_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/ps_mover_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_mover_page.cpp b/code/studio/src/plugins/object_viewer/particle_system/ps_mover_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_mover_page.cpp rename to code/studio/src/plugins/object_viewer/particle_system/ps_mover_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_mover_page.h b/code/studio/src/plugins/object_viewer/particle_system/ps_mover_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_mover_page.h rename to code/studio/src/plugins/object_viewer/particle_system/ps_mover_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_wrapper.h b/code/studio/src/plugins/object_viewer/particle_system/ps_wrapper.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/ps_wrapper.h rename to code/studio/src/plugins/object_viewer/particle_system/ps_wrapper.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/scheme_bank_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_bank_form.ui b/code/studio/src/plugins/object_viewer/particle_system/scheme_bank_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_bank_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/scheme_bank_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_manager.cpp b/code/studio/src/plugins/object_viewer/particle_system/scheme_manager.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_manager.cpp rename to code/studio/src/plugins/object_viewer/particle_system/scheme_manager.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_manager.h b/code/studio/src/plugins/object_viewer/particle_system/scheme_manager.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/scheme_manager.h rename to code/studio/src/plugins/object_viewer/particle_system/scheme_manager.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/spinner_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/spinner_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/spinner_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/spinner_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/spinner_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/spinner_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/spinner_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/tail_form.ui b/code/studio/src/plugins/object_viewer/particle_system/tail_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/tail_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/tail_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/tail_particle_widget.cpp b/code/studio/src/plugins/object_viewer/particle_system/tail_particle_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/tail_particle_widget.cpp rename to code/studio/src/plugins/object_viewer/particle_system/tail_particle_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/tail_particle_widget.h b/code/studio/src/plugins/object_viewer/particle_system/tail_particle_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/tail_particle_widget.h rename to code/studio/src/plugins/object_viewer/particle_system/tail_particle_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_blender_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_blender_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_blender_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_blender_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/value_blender_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/value_from_emitter_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp rename to code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_gradient_dialog.h b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_gradient_dialog.h rename to code/studio/src/plugins/object_viewer/particle_system/value_gradient_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_gradient_form.ui b/code/studio/src/plugins/object_viewer/particle_system/value_gradient_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/value_gradient_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/value_gradient_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/workspace_form.ui b/code/studio/src/plugins/object_viewer/particle_system/workspace_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/particle_system/workspace_form.ui rename to code/studio/src/plugins/object_viewer/particle_system/workspace_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/animation_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/animation_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_dialog.h b/code/studio/src/plugins/object_viewer/scene/animation_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_dialog.h rename to code/studio/src/plugins/object_viewer/scene/animation_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_form.ui b/code/studio/src/plugins/object_viewer/scene/animation_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_form.ui rename to code/studio/src/plugins/object_viewer/scene/animation_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_set_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_set_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/animation_set_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_set_dialog.h b/code/studio/src/plugins/object_viewer/scene/animation_set_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_set_dialog.h rename to code/studio/src/plugins/object_viewer/scene/animation_set_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_set_form.ui b/code/studio/src/plugins/object_viewer/scene/animation_set_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/animation_set_form.ui rename to code/studio/src/plugins/object_viewer/scene/animation_set_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/camera_control.cpp b/code/studio/src/plugins/object_viewer/scene/camera_control.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/camera_control.cpp rename to code/studio/src/plugins/object_viewer/scene/camera_control.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/camera_control.h b/code/studio/src/plugins/object_viewer/scene/camera_control.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/camera_control.h rename to code/studio/src/plugins/object_viewer/scene/camera_control.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/day_night_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/day_night_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/day_night_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/day_night_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/day_night_dialog.h b/code/studio/src/plugins/object_viewer/scene/day_night_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/day_night_dialog.h rename to code/studio/src/plugins/object_viewer/scene/day_night_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/day_night_form.ui b/code/studio/src/plugins/object_viewer/scene/day_night_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/day_night_form.ui rename to code/studio/src/plugins/object_viewer/scene/day_night_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/entity.cpp b/code/studio/src/plugins/object_viewer/scene/entity.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/entity.cpp rename to code/studio/src/plugins/object_viewer/scene/entity.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/entity.h b/code/studio/src/plugins/object_viewer/scene/entity.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/entity.h rename to code/studio/src/plugins/object_viewer/scene/entity.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/global_wind_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/global_wind_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/global_wind_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/global_wind_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/global_wind_dialog.h b/code/studio/src/plugins/object_viewer/scene/global_wind_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/global_wind_dialog.h rename to code/studio/src/plugins/object_viewer/scene/global_wind_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/global_wind_form.ui b/code/studio/src/plugins/object_viewer/scene/global_wind_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/global_wind_form.ui rename to code/studio/src/plugins/object_viewer/scene/global_wind_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/setup_fog_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/setup_fog_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/setup_fog_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/setup_fog_dialog.h b/code/studio/src/plugins/object_viewer/scene/setup_fog_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/setup_fog_dialog.h rename to code/studio/src/plugins/object_viewer/scene/setup_fog_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/setup_fog_form.ui b/code/studio/src/plugins/object_viewer/scene/setup_fog_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/setup_fog_form.ui rename to code/studio/src/plugins/object_viewer/scene/setup_fog_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_scale_dialog.h b/code/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_scale_dialog.h rename to code/studio/src/plugins/object_viewer/scene/skeleton_scale_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_scale_form.ui b/code/studio/src/plugins/object_viewer/scene/skeleton_scale_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_scale_form.ui rename to code/studio/src/plugins/object_viewer/scene/skeleton_scale_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_tree_model.cpp b/code/studio/src/plugins/object_viewer/scene/skeleton_tree_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_tree_model.cpp rename to code/studio/src/plugins/object_viewer/scene/skeleton_tree_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_tree_model.h b/code/studio/src/plugins/object_viewer/scene/skeleton_tree_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/skeleton_tree_model.h rename to code/studio/src/plugins/object_viewer/scene/skeleton_tree_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/slot_form.ui b/code/studio/src/plugins/object_viewer/scene/slot_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/slot_form.ui rename to code/studio/src/plugins/object_viewer/scene/slot_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/slot_manager_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/slot_manager_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/slot_manager_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/slot_manager_dialog.h b/code/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/slot_manager_dialog.h rename to code/studio/src/plugins/object_viewer/scene/slot_manager_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/sun_color_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/sun_color_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/sun_color_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/sun_color_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/sun_color_dialog.h b/code/studio/src/plugins/object_viewer/scene/sun_color_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/sun_color_dialog.h rename to code/studio/src/plugins/object_viewer/scene/sun_color_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/sun_color_form.ui b/code/studio/src/plugins/object_viewer/scene/sun_color_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/sun_color_form.ui rename to code/studio/src/plugins/object_viewer/scene/sun_color_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_mrm_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/tune_mrm_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_mrm_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/tune_mrm_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_mrm_dialog.h b/code/studio/src/plugins/object_viewer/scene/tune_mrm_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_mrm_dialog.h rename to code/studio/src/plugins/object_viewer/scene/tune_mrm_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_mrm_form.ui b/code/studio/src/plugins/object_viewer/scene/tune_mrm_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_mrm_form.ui rename to code/studio/src/plugins/object_viewer/scene/tune_mrm_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_timer_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/tune_timer_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_timer_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/tune_timer_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_timer_dialog.h b/code/studio/src/plugins/object_viewer/scene/tune_timer_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_timer_dialog.h rename to code/studio/src/plugins/object_viewer/scene/tune_timer_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_timer_form.ui b/code/studio/src/plugins/object_viewer/scene/tune_timer_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/tune_timer_form.ui rename to code/studio/src/plugins/object_viewer/scene/tune_timer_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/water_pool_dialog.cpp b/code/studio/src/plugins/object_viewer/scene/water_pool_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/water_pool_dialog.cpp rename to code/studio/src/plugins/object_viewer/scene/water_pool_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/water_pool_dialog.h b/code/studio/src/plugins/object_viewer/scene/water_pool_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/water_pool_dialog.h rename to code/studio/src/plugins/object_viewer/scene/water_pool_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/water_pool_form.ui b/code/studio/src/plugins/object_viewer/scene/water_pool_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/scene/water_pool_form.ui rename to code/studio/src/plugins/object_viewer/scene/water_pool_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_settings_page.cpp b/code/studio/src/plugins/object_viewer/sound_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_settings_page.cpp rename to code/studio/src/plugins/object_viewer/sound_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_settings_page.h b/code/studio/src/plugins/object_viewer/sound_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_settings_page.h rename to code/studio/src/plugins/object_viewer/sound_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_settings_page.ui b/code/studio/src/plugins/object_viewer/sound_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_settings_page.ui rename to code/studio/src/plugins/object_viewer/sound_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp b/code/studio/src/plugins/object_viewer/sound_system.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.cpp rename to code/studio/src/plugins/object_viewer/sound_system.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.h b/code/studio/src/plugins/object_viewer/sound_system.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/sound_system.h rename to code/studio/src/plugins/object_viewer/sound_system.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/stdpch.cpp b/code/studio/src/plugins/object_viewer/stdpch.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/stdpch.cpp rename to code/studio/src/plugins/object_viewer/stdpch.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/stdpch.h b/code/studio/src/plugins/object_viewer/stdpch.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/stdpch.h rename to code/studio/src/plugins/object_viewer/stdpch.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml b/code/studio/src/plugins/object_viewer/studio_plugin_object_viewer.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml rename to code/studio/src/plugins/object_viewer/studio_plugin_object_viewer.xml index 6033c3985..c5ae8c081 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/ovqt_plugin_object_viewer.xml +++ b/code/studio/src/plugins/object_viewer/studio_plugin_object_viewer.xml @@ -1,5 +1,5 @@ - ovqt_plugin_object_viewer + studio_plugin_object_viewer ObjectViewer 0.8 Ryzom Core diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_appearance_page.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_appearance_page.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_appearance_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_apperance_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_apperance_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_apperance_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_apperance_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_density_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_density_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_density_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_density_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_density_page.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_density_page.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_density_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_dialog.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_dialog.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_dialog_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_dialog_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_dialog_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_editor.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_editor.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_editor.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_editor.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_editor.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_editor.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_editor.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_landscape_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_landscape_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_landscape_page.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_landscape_page.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_landscape_page.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_landscape_page.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_landscape_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_node.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_node.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_node.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_node.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_node.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_node.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_node.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_node.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_noise_value_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_noise_value_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_noise_value_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_rotate_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_rotate_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_rotate_page.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_rotate_page.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_rotate_page.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_rotate_page.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_rotate_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_scale_form.ui b/code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_scale_form.ui rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_scale_page.cpp b/code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_scale_page.cpp rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_scale_page.h b/code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable/vegetable_scale_page.h rename to code/studio/src/plugins/object_viewer/vegetable/vegetable_scale_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.cpp b/code/studio/src/plugins/object_viewer/vegetable_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.cpp rename to code/studio/src/plugins/object_viewer/vegetable_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.h b/code/studio/src/plugins/object_viewer/vegetable_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.h rename to code/studio/src/plugins/object_viewer/vegetable_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui b/code/studio/src/plugins/object_viewer/vegetable_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/vegetable_settings_page.ui rename to code/studio/src/plugins/object_viewer/vegetable_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/color_edit_form.ui b/code/studio/src/plugins/object_viewer/widgets/color_edit_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/color_edit_form.ui rename to code/studio/src/plugins/object_viewer/widgets/color_edit_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/color_edit_widget.cpp b/code/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/color_edit_widget.cpp rename to code/studio/src/plugins/object_viewer/widgets/color_edit_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/color_edit_widget.h b/code/studio/src/plugins/object_viewer/widgets/color_edit_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/color_edit_widget.h rename to code/studio/src/plugins/object_viewer/widgets/color_edit_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_float_form.ui b/code/studio/src/plugins/object_viewer/widgets/edit_range_float_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_float_form.ui rename to code/studio/src/plugins/object_viewer/widgets/edit_range_float_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_uint_form.ui b/code/studio/src/plugins/object_viewer/widgets/edit_range_uint_form.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_uint_form.ui rename to code/studio/src/plugins/object_viewer/widgets/edit_range_uint_form.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_widget.cpp b/code/studio/src/plugins/object_viewer/widgets/edit_range_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_widget.cpp rename to code/studio/src/plugins/object_viewer/widgets/edit_range_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_widget.h b/code/studio/src/plugins/object_viewer/widgets/edit_range_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/edit_range_widget.h rename to code/studio/src/plugins/object_viewer/widgets/edit_range_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/hoverpoints.cpp b/code/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/hoverpoints.cpp rename to code/studio/src/plugins/object_viewer/widgets/hoverpoints.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/hoverpoints.h b/code/studio/src/plugins/object_viewer/widgets/hoverpoints.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/widgets/hoverpoints.h rename to code/studio/src/plugins/object_viewer/widgets/hoverpoints.h diff --git a/code/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/code/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt new file mode 100644 index 000000000..a543421c5 --- /dev/null +++ b/code/studio/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -0,0 +1,48 @@ +INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${QT_INCLUDES}) + +FILE(GLOB SRC *.cpp *.h) +SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) + +SET(OVQT_PLUG_SHEET_BUILDER_HDR sheetbuilderconfgdialog.h sheetbuilderdialog.h ovqt_sheet_builder.h) + +SET(QT_USE_QTGUI TRUE) +SET(QT_USE_QTOPENGL TRUE) + +QT4_WRAP_CPP(OVQT_PLUG_SHEET_BUILDER_MOC_SRC ${OVQT_PLUG_SHEET_BUILDER_HDR}) + +SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC}) +SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC}) +SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) + +ADD_LIBRARY(studio_plugin_sheet_builder MODULE ${SRC} ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC} ${OVQT_EXT_SYS_SRC}) + +TARGET_LINK_LIBRARIES(studio_plugin_sheet_builder studio_plugin_core nelmisc ${QT_LIBRARIES}) + +NL_DEFAULT_PROPS(studio_plugin_sheet_builder "Tools: Studio Plugin: Sheet builder") +NL_ADD_RUNTIME_FLAGS(studio_plugin_sheet_builder) +NL_ADD_LIB_SUFFIX(studio_plugin_sheet_builder) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) + + +IF(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ELSE(WIN32) + IF(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ELSE(WITH_INSTALL_LIBRARIES) + INSTALL(TARGETS studio_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + ENDIF(WITH_INSTALL_LIBRARIES) +ENDIF(WIN32) + +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_sheet_builder.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp similarity index 88% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp rename to code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp index 4fd7dfb11..21358ec6f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp +++ b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.cpp @@ -35,6 +35,21 @@ using namespace Plugin; +SheetBuilderPlugin::SheetBuilderPlugin() +{ +} + +SheetBuilderPlugin::~SheetBuilderPlugin() +{ + Core::MenuManager *menuManager = Core::ICore::instance()->menuManager(); + QAction *a = menuManager->action( "SheetBuilder" ); + menuManager->unregisterAction( "SheetBuilder" ); + delete a; + + delete m_LibContext; + m_LibContext = NULL; +} + bool SheetBuilderPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) { Q_UNUSED(errorString); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h rename to code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h index 504d0914d..21e2855c1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h +++ b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.h @@ -36,6 +36,8 @@ class SheetBuilderPlugin : public QObject, public ExtensionSystem::IPlugin Q_OBJECT Q_INTERFACES(ExtensionSystem::IPlugin) public: + SheetBuilderPlugin(); + ~SheetBuilderPlugin(); bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); void extensionsInitialized(); void setNelContext(NLMISC::INelContext *nelContext); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.pro b/code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.pro similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.pro rename to code/studio/src/plugins/ovqt_sheet_builder/ovqt_sheet_builder.pro diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilder.h b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilder.h rename to code/studio/src/plugins/ovqt_sheet_builder/sheetbuilder.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp rename to code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h rename to code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderconfgdialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp rename to code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h b/code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h rename to code/studio/src/plugins/ovqt_sheet_builder/sheetbuilderdialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_plugin_sheet_builder.xml b/code/studio/src/plugins/ovqt_sheet_builder/studio_plugin_sheet_builder.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_plugin_sheet_builder.xml rename to code/studio/src/plugins/ovqt_sheet_builder/studio_plugin_sheet_builder.xml index 01dbefa8a..4f1f3210d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/ovqt_plugin_sheet_builder.xml +++ b/code/studio/src/plugins/ovqt_sheet_builder/studio_plugin_sheet_builder.xml @@ -1,5 +1,5 @@ - ovqt_plugin_sheet_builder + studio_plugin_sheet_builder SheetBuilder 1.0 kharvd diff --git a/code/studio/src/plugins/tile_editor/CMakeLists.txt b/code/studio/src/plugins/tile_editor/CMakeLists.txt new file mode 100644 index 000000000..78cc5ef49 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/CMakeLists.txt @@ -0,0 +1,50 @@ +INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${LIBXML2_INCLUDE_DIR} + ${QT_INCLUDES}) + +FILE(GLOB SRC *.cpp *.h) +SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h + ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) + +SET(OVQT_TILE_EDITOR_PLUGIN_HDR + tile_model.h + tile_editor_main_window.h + tile_editor_plugin.h + land_edit_dialog.h) + +SET(OVQT_TILE_EDITOR_PLUGIN_UIS + tile_editor_main_window.ui + land_edit_dialog.ui) + +SET(OVQT_PLUG_TILE_EDITOR_RCS tile_editor.qrc) + +SET(QT_USE_QTGUI TRUE) +SET(QT_USE_QTOPENGL TRUE) + +QT4_WRAP_CPP(OVQT_TILE_EDITOR_PLUGIN_MOC_SRC ${OVQT_TILE_EDITOR_PLUGIN_HDR}) +QT4_ADD_RESOURCES( OVQT_PLUG_TILE_EDITOR_RC_SRCS ${OVQT_PLUG_TILE_EDITOR_RCS}) +QT4_WRAP_UI(OVQT_TILE_EDITOR_PLUGIN_UI_HDRS ${OVQT_TILE_EDITOR_PLUGIN_UIS}) + +SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_TILE_EDITOR_PLUGIN_UI_HDRS}) +SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_TILE_EDITOR_PLUGIN_MOC_SRC} ${OVQT_PLUG_TILE_EDITOR_RC_SRCS}) +SOURCE_GROUP("Tile Editor Plugin" FILES ${SRC}) +SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) + +ADD_LIBRARY(studio_plugin_tile_editor MODULE ${SRC} ${OVQT_TILE_EDITOR_PLUGIN_MOC_SRC} ${OVQT_PLUG_TILE_EDITOR_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_TILE_EDITOR_PLUGIN_UI_HDRS}) + +TARGET_LINK_LIBRARIES(studio_plugin_tile_editor studio_plugin_core nelmisc ${QT_LIBRARIES}) + +IF(WITH_STLPORT) + TARGET_LINK_LIBRARIES(studio_plugin_tile_editor ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(WITH_STLPORT) + +NL_DEFAULT_PROPS(studio_plugin_tile_editor "Tools: Studio Plugin: Tile Editor") +NL_ADD_RUNTIME_FLAGS(studio_plugin_tile_editor) +NL_ADD_LIB_SUFFIX(studio_plugin_tile_editor) + +ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) + +INSTALL(TARGETS studio_plugin_tile_editor LIBRARY DESTINATION lib RUNTIME DESTINATION bin ARCHIVE DESTINATION lib COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_tile_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/studio/src/plugins/tile_editor/images/add_tile.png b/code/studio/src/plugins/tile_editor/images/add_tile.png new file mode 100644 index 000000000..a9de8f51d Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/add_tile.png differ diff --git a/code/studio/src/plugins/tile_editor/images/delete_image.png b/code/studio/src/plugins/tile_editor/images/delete_image.png new file mode 100644 index 000000000..1bc3b4e84 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/delete_image.png differ diff --git a/code/studio/src/plugins/tile_editor/images/delete_tile.png b/code/studio/src/plugins/tile_editor/images/delete_tile.png new file mode 100644 index 000000000..613c6a5f8 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/delete_tile.png differ diff --git a/code/studio/src/plugins/tile_editor/images/down.png b/code/studio/src/plugins/tile_editor/images/down.png new file mode 100644 index 000000000..b0033cf64 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/down.png differ diff --git a/code/studio/src/plugins/tile_editor/images/empty_image.png b/code/studio/src/plugins/tile_editor/images/empty_image.png new file mode 100644 index 000000000..9a2e358ab Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/empty_image.png differ diff --git a/code/studio/src/plugins/tile_editor/images/ic_nel_add_item.png b/code/studio/src/plugins/tile_editor/images/ic_nel_add_item.png new file mode 100644 index 000000000..bde338f78 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/ic_nel_add_item.png differ diff --git a/code/studio/src/plugins/tile_editor/images/ic_nel_delete_item.png b/code/studio/src/plugins/tile_editor/images/ic_nel_delete_item.png new file mode 100644 index 000000000..a5a1787d5 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/ic_nel_delete_item.png differ diff --git a/code/studio/src/plugins/tile_editor/images/ic_nel_new.png b/code/studio/src/plugins/tile_editor/images/ic_nel_new.png new file mode 100644 index 000000000..d45dcb467 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/ic_nel_new.png differ diff --git a/code/studio/src/plugins/tile_editor/images/ic_nel_open.png b/code/studio/src/plugins/tile_editor/images/ic_nel_open.png new file mode 100644 index 000000000..c4992affd Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/ic_nel_open.png differ diff --git a/code/studio/src/plugins/tile_editor/images/ic_nel_save.png b/code/studio/src/plugins/tile_editor/images/ic_nel_save.png new file mode 100644 index 000000000..7f7d35e9a Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/ic_nel_save.png differ diff --git a/code/studio/src/plugins/tile_editor/images/ic_nel_save_as.png b/code/studio/src/plugins/tile_editor/images/ic_nel_save_as.png new file mode 100644 index 000000000..1558632b9 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/ic_nel_save_as.png differ diff --git a/code/studio/src/plugins/tile_editor/images/left.png b/code/studio/src/plugins/tile_editor/images/left.png new file mode 100644 index 000000000..9c94db1aa Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/left.png differ diff --git a/code/studio/src/plugins/tile_editor/images/nel.png b/code/studio/src/plugins/tile_editor/images/nel.png new file mode 100644 index 000000000..d2139bb25 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/nel.png differ diff --git a/code/studio/src/plugins/tile_editor/images/replace_image.png b/code/studio/src/plugins/tile_editor/images/replace_image.png new file mode 100644 index 000000000..94d9b76c8 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/replace_image.png differ diff --git a/code/studio/src/plugins/tile_editor/images/reset.png b/code/studio/src/plugins/tile_editor/images/reset.png new file mode 100644 index 000000000..6693e842c Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/reset.png differ diff --git a/code/studio/src/plugins/tile_editor/images/right.png b/code/studio/src/plugins/tile_editor/images/right.png new file mode 100644 index 000000000..eb51b8385 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/right.png differ diff --git a/code/studio/src/plugins/tile_editor/images/rotation0.png b/code/studio/src/plugins/tile_editor/images/rotation0.png new file mode 100644 index 000000000..7434c4959 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/rotation0.png differ diff --git a/code/studio/src/plugins/tile_editor/images/rotation180.png b/code/studio/src/plugins/tile_editor/images/rotation180.png new file mode 100644 index 000000000..7ce524883 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/rotation180.png differ diff --git a/code/studio/src/plugins/tile_editor/images/rotation270.png b/code/studio/src/plugins/tile_editor/images/rotation270.png new file mode 100644 index 000000000..32b47a97c Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/rotation270.png differ diff --git a/code/studio/src/plugins/tile_editor/images/rotation90.png b/code/studio/src/plugins/tile_editor/images/rotation90.png new file mode 100644 index 000000000..2eb11b322 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/rotation90.png differ diff --git a/code/studio/src/plugins/tile_editor/images/up.png b/code/studio/src/plugins/tile_editor/images/up.png new file mode 100644 index 000000000..e5145d052 Binary files /dev/null and b/code/studio/src/plugins/tile_editor/images/up.png differ diff --git a/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp b/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp new file mode 100644 index 000000000..025e55730 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp @@ -0,0 +1,105 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 "land_edit_dialog.h" + +LandEditDialog::LandEditDialog( QWidget *parent ) : +QDialog( parent ) +{ + setupUi( this ); + setupConnections(); +} + +LandEditDialog::~LandEditDialog() +{ +} + +void LandEditDialog::getSelectedTileSets( QStringList &l ) const +{ + int c = tilesetLV->count(); + for( int i = 0; i < c; i++ ) + { + l.push_back( tilesetLV->item( i )->text() ); + } +} + +void LandEditDialog::setSelectedTileSets( QStringList &l ) +{ + tilesetLV->clear(); + + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + tilesetLV->addItem( itr.next() ); + } +} + +void LandEditDialog::setTileSets( const QStringList &l ) +{ + tilesetCB->clear(); + + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + tilesetCB->addItem( itr.next() ); + } +} + +void LandEditDialog::setupConnections() +{ + connect( okButton, SIGNAL( clicked( bool ) ), this, SLOT( onOkClicked() ) ); + connect( cancelButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) ); + connect( addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddClicked() ) ); + connect( removeButton, SIGNAL( clicked( bool ) ), this, SLOT( onRemoveClicked() ) ); +} + +void LandEditDialog::onOkClicked() +{ + accept(); +} + +void LandEditDialog::onCancelClicked() +{ + reject(); +} + +void LandEditDialog::onAddClicked() +{ + if( tilesetCB->currentIndex() < 0 ) + return; + + QString text = tilesetCB->currentText(); + + int c = tilesetLV->count(); + for( int i = 0; i < c; i++ ) + { + if( text == tilesetLV->item( i )->text() ) + return; + } + + tilesetLV->addItem( text ); +} + +void LandEditDialog::onRemoveClicked() +{ + if( tilesetLV->currentItem() == NULL ) + return; + + QListWidgetItem *item = tilesetLV->currentItem(); + delete item; +} + diff --git a/code/studio/src/plugins/tile_editor/land_edit_dialog.h b/code/studio/src/plugins/tile_editor/land_edit_dialog.h new file mode 100644 index 000000000..3873c6df5 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/land_edit_dialog.h @@ -0,0 +1,51 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 LAND_EDIT_DLG_H +#define LAND_EDIT_DLG_H + + +#include "ui_land_edit_dialog.h" +#include + +class LandEditDialog : public QDialog, public Ui::LandEditDialog +{ + Q_OBJECT +public: + LandEditDialog( QWidget *parent = NULL ); + ~LandEditDialog(); + + void getSelectedTileSets( QStringList &l ) const; + void setSelectedTileSets( QStringList &l ); + + void setTileSets( const QStringList &l ); + +private: + void setupConnections(); + + +private Q_SLOTS: + void onOkClicked(); + void onCancelClicked(); + void onAddClicked(); + void onRemoveClicked(); + +}; + + +#endif + diff --git a/code/studio/src/plugins/tile_editor/land_edit_dialog.ui b/code/studio/src/plugins/tile_editor/land_edit_dialog.ui new file mode 100644 index 000000000..7eb707528 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/land_edit_dialog.ui @@ -0,0 +1,99 @@ + + + LandEditDialog + + + Qt::WindowModal + + + + 0 + 0 + 402 + 311 + + + + Editing land + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Add + + + + + + + + 0 + 0 + + + + Remove + + + + + + + + 0 + 0 + + + + OK + + + + + + + + 0 + 0 + + + + Cancel + + + + + + + + + + diff --git a/code/studio/src/plugins/tile_editor/studio_plugin_tile_editor.xml b/code/studio/src/plugins/tile_editor/studio_plugin_tile_editor.xml new file mode 100644 index 000000000..0e5727896 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/studio_plugin_tile_editor.xml @@ -0,0 +1,10 @@ + + studio_plugin_tile_editor + TileEditor + 1.0 + Ryzom Core + Tile bank editing plugin. + + + + \ No newline at end of file diff --git a/code/studio/src/plugins/tile_editor/tile_bank.cpp b/code/studio/src/plugins/tile_editor/tile_bank.cpp new file mode 100644 index 000000000..8e3578eeb --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_bank.cpp @@ -0,0 +1,642 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 "tile_bank.h" +#include "nel/3d/tile_bank.h" + +#include + +namespace{ + + bool pixmapToCBGRA( QPixmap &pixmap, std::vector< NLMISC::CBGRA >& pixels ) + { + QImage img = pixmap.toImage(); + if( img.format() != QImage::Format_ARGB32 ) + img = img.convertToFormat( QImage::Format_ARGB32 ); + + if( img.format() != QImage::Format_ARGB32 ) + return false; + + int c = img.width() * img.height(); + + const unsigned char *data = img.bits(); + const unsigned int *idata = reinterpret_cast< const unsigned int* >( data ); + + NLMISC::CBGRA bgra; + pixels.clear(); + + int i = 0; + while( i < c ) + { + bgra.A = ( idata[ i ] & 0xFF000000 ) >> 24; + bgra.R = ( idata[ i ] & 0x00FF0000 ) >> 16; + bgra.G = ( idata[ i ] & 0x0000FF00 ) >> 8; + bgra.B = ( idata[ i ] & 0x000000FF ); + pixels.push_back( bgra ); + + i++; + } + + return true; + } + + + NL3D::CTile::TBitmap channelToTBitmap( TileConstants::TTileChannel channel ) + { + return NL3D::CTile::TBitmap( int( channel ) ); + } + + +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +class TileBankPvt +{ +public: + + bool checkSize( TileConstants::TNodeTileType type, TileConstants::TTileChannel channel, int w, int h ) + { + int width = -1; + + switch( type ) + { + case TileConstants::Tile128: + width = 128; + break; + + case TileConstants::Tile256: + width = 256; + break; + + case TileConstants::TileTransition: + { + if( channel == TileConstants::TileAlpha ) + width = 64; + else + width = 128; + + } + break; + + case TileConstants::TileDisplacement: + width = 32; + break; + } + + if( width == w ) + return true; + + return false; + } + + NL3D::CTileSet::TError checkTile( NL3D::CTileSet *set, int tile, TileConstants::TNodeTileType type, NL3D::CTileBorder &border, NL3D::CTile::TBitmap bitmap, QString &msg ) + { + NL3D::CTileSet::TError error; + + if( bitmap == NL3D::CTile::additive ) + return NL3D::CTileSet::ok; + + if( type == TileConstants::TileDisplacement ) + return NL3D::CTileSet::ok; + + int component; + int pixel; + int idx; + + switch( type ) + { + case TileConstants::Tile128: + error = set->checkTile128( bitmap, border, pixel, component ); + break; + + case TileConstants::Tile256: + error = set->checkTile256( bitmap, border, pixel, component ); + break; + + case TileConstants::TileTransition: + { + if( bitmap != NL3D::CTile::alpha ) + error = set->checkTile128( bitmap, border, pixel, component ); + else + error = set->checkTileTransition( NL3D::CTileSet::TTransition( tile ), bitmap, border, idx, pixel, component ); + + break; + } + } + + if( ( error != NL3D::CTileSet::ok ) && ( error != NL3D::CTileSet::addFirstA128128 ) ) + { + static const char* comp[]={"Red", "Green", "Blue", "Alpha", ""}; + + msg = NL3D::CTileSet::getErrorMessage( error ); + msg += "\n"; + msg += " pixel %1 component %2"; + msg = msg.arg( pixel ); + msg = msg.arg( comp[ component ] ); + } + + return error; + } + + void setTile( NL3D::CTileSet *set, int tile, int rotation, const QString &name, NL3D::CTile::TBitmap bm, TileConstants::TNodeTileType type, NL3D::CTileBorder &border ) + { + switch( type ) + { + case TileConstants::Tile128: + set->setTile128( tile, name.toUtf8().constData(), bm, m_bank ); + break; + + case TileConstants::Tile256: + set->setTile256( tile, name.toUtf8().constData(), bm, m_bank ); + break; + + case TileConstants::TileTransition: + if( bm != NL3D::CTile::alpha ) + set->setTileTransition( NL3D::CTileSet::TTransition( tile ), name.toUtf8().constData(), bm, m_bank, border ); + else + set->setTileTransitionAlpha( NL3D::CTileSet::TTransition( tile ), name.toUtf8().constData(), m_bank, border, rotation ); + break; + + case TileConstants::TileDisplacement: + set->setDisplacement( NL3D::CTileSet::TDisplacement( tile ), name.toUtf8().constData(), m_bank ); + break; + } + + } + + void buildBorder( QPixmap &pm, NL3D::CTileBorder &border ) + { + std::vector< NLMISC::CBGRA > pixels; + pixmapToCBGRA( pm, pixels ); + border.set( pm.width(), pm.height(), pixels ); + } + + NL3D::CTileBank m_bank; +}; + + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +TileBank::TileBank() +{ + m_pvt = new TileBankPvt(); + resetError(); + m_rotation = 0; +} + +TileBank::~TileBank() +{ + delete m_pvt; +} + +void TileBank::addTileSet( const QString &name ) +{ + m_pvt->m_bank.addTileSet( name.toUtf8().constData() ); + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( 0 ); +} + +void TileBank::removeTileSet( int idx ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( idx ); + if( set == NULL ) + return; + + int c = m_pvt->m_bank.getLandCount(); + for( int i = 0; i < c; i++ ) + { + NL3D::CTileLand *land = m_pvt->m_bank.getLand( i ); + land->removeTileSet( set->getName() ); + } + + m_pvt->m_bank.removeTileSet( idx ); +} + +void TileBank::renameTileSet( int idx, const QString &newName ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( idx ); + if( set == NULL ) + return; + + std::string oldName = set->getName(); + set->setName( newName.toUtf8().constData() ); + + int c = m_pvt->m_bank.getLandCount(); + for( int i = 0; i < c; i++ ) + { + NL3D::CTileLand *land = m_pvt->m_bank.getLand( i ); + land->removeTileSet( oldName ); + land->addTileSet( newName.toUtf8().constData() ); + } + +} + +void TileBank::getTileSets( QStringList &l ) +{ + int c = m_pvt->m_bank.getTileSetCount(); + for( int i = 0; i < c; i++ ) + { + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( i ); + l.push_back( set->getName().c_str() ); + } +} + +void TileBank::addLand( const QString &name ) +{ + m_pvt->m_bank.addLand( name.toUtf8().constData() ); +} + +void TileBank::removeLand( int idx ) +{ + m_pvt->m_bank.removeLand( idx ); +} + +void TileBank::getLands( QStringList &l ) +{ + l.clear(); + + int c = m_pvt->m_bank.getLandCount(); + for( int i = 0; i < c; i++ ) + { + NL3D::CTileLand *land = m_pvt->m_bank.getLand( i ); + l.push_back( land->getName().c_str() ); + } +} + +void TileBank::setLandSets( int idx, const QStringList &l ) +{ + NL3D::CTileLand *land = m_pvt->m_bank.getLand( idx ); + land->clear(); + + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + land->addTileSet( itr.next().toUtf8().constData() ); + } +} + +void TileBank::getLandSets( int idx, QStringList &l ) +{ + NL3D::CTileLand *land = m_pvt->m_bank.getLand( idx ); + if( land == NULL ) + return; + + l.clear(); + + std::set< std::string> sets = land->getTileSets(); + std::set< std::string >::const_iterator itr = sets.begin(); + while( itr != sets.end() ) + { + l.push_back( itr->c_str() ); + ++itr; + } +} + +bool TileBank::addTile( int setIdx, const QString &name, const QVariant &pixmap, TileConstants::TTileChannel channel, TileConstants::TNodeTileType type ) +{ + resetError(); + + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( setIdx ); + + int tile; + switch( type ) + { + case TileConstants::Tile128: set->addTile128( tile, m_pvt->m_bank ); break; + case TileConstants::Tile256: set->addTile256( tile, m_pvt->m_bank ); break; + } + + bool b = setTile( setIdx, tile, name, pixmap, channel, type ); + if( b ) + return true; + + // There was an error, roll back + switch( type ) + { + case TileConstants::Tile128: set->removeTile128( tile, m_pvt->m_bank ); break; + case TileConstants::Tile256: set->removeTile256( tile, m_pvt->m_bank ); break; + } + + return false; +} + +void TileBank::removeTile( int ts, int type, int tile ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( ts ); + + switch( type ) + { + case TileConstants::Tile128: set->removeTile128( tile, m_pvt->m_bank ); break; + case TileConstants::Tile256: set->removeTile256( tile, m_pvt->m_bank ); break; + } +} + +bool TileBank::setTile( int tileset, int tile, const QString &name, const QVariant &pixmap, TileConstants::TTileChannel channel, TileConstants::TNodeTileType type ) +{ + resetError(); + + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileset ); + if( set == NULL ) + return false; + + QPixmap pm = pixmap.value< QPixmap >(); + if( pm.isNull() ) + { + m_hasError = true; + m_lastError = "Failed to load image."; + return false; + } + + if( pm.width() != pm.height() ) + { + m_hasError = true; + m_lastError = "Image isn't square."; + return false; + } + + if( !m_pvt->checkSize( type, channel, pm.width(), pm.height() ) ) + { + m_hasError = true; + m_lastError = "Invalid image size."; + return false; + } + + NL3D::CTileBorder border; + m_pvt->buildBorder( pm, border ); + + if( ( type == TileConstants::TileTransition ) && ( channel == TileConstants::TileAlpha ) ) + { + int rotBits = m_rotation; + while( rotBits > 0 ) + { + border.rotate(); + rotBits--; + } + } + + QString msg; + NL3D::CTileSet::TError error = m_pvt->checkTile( set, tile, type, border, channelToTBitmap( channel ), msg ); + + // Tile checks out fine, set it + if( ( error == NL3D::CTileSet::ok ) || ( error == NL3D::CTileSet::addFirstA128128 ) ) + { + if( error == NL3D::CTileSet::addFirstA128128 ) + set->setBorder( channelToTBitmap( channel ), border ); + + m_pvt->setTile( set, tile, m_rotation, name, channelToTBitmap( channel ), type, border ); + + return true; + } + + setError( msg ); + + return false; +} + +void TileBank::replaceImage( int ts, int type, int tile, TileConstants::TTileChannel channel, const QString &name, const QVariant &pixmap ) +{ + setTile( ts, tile, name, pixmap, channel, TileConstants::TNodeTileType( type ) ); +} + +void TileBank::clearImage( int ts, int type, int tile, TileConstants::TTileChannel channel ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( ts ); + + int tileId; + + NL3D::CTile::TBitmap bm = channelToTBitmap( channel ); + + switch( type ) + { + case TileConstants::Tile128: + set->clearTile128( tile, bm, m_pvt->m_bank ); + break; + + case TileConstants::Tile256: + set->clearTile256( tile, bm, m_pvt->m_bank ); + break; + + case TileConstants::TileTransition: + set->clearTransition( NL3D::CTileSet::TTransition( tile ), bm, m_pvt->m_bank ); + break; + + case TileConstants::TileDisplacement: + set->clearDisplacement( NL3D::CTileSet::TDisplacement( tile ), m_pvt->m_bank ); + break; + } + +} + +int TileBank::getTileCount( int tileSet, TileConstants::TNodeTileType type ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return -1; + + int c = 0; + + switch( type ) + { + case TileConstants::Tile128: + c = set->getNumTile128(); + break; + + case TileConstants::Tile256: + c = set->getNumTile256(); + break; + + case TileConstants::TileTransition: + c = NL3D::CTileSet::count; + break; + + case TileConstants::TileDisplacement: + c = NL3D::CTileSet::CountDisplace; + break; + } + + return c; +} + +int TileBank::getRealTileId( int tileSet, TileConstants::TNodeTileType type, int tileIdInSet ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return -1; + + int tile = -1; + + switch( type ) + { + case TileConstants::Tile128: + tile = set->getTile128( tileIdInSet ); + break; + + case TileConstants::Tile256: + tile = set->getTile256( tileIdInSet ); + break; + + case TileConstants::TileTransition: + tile = set->getTransition( tileIdInSet )->getTile(); + break; + + case TileConstants::TileDisplacement: + tile = set->getDisplacementTile( NL3D::CTileSet::TDisplacement( tileIdInSet ) ); + break; + } + + return tile; +} + +void TileBank::getTileImages( int tileSet, TileConstants::TNodeTileType type, int tileId, TileImages &images ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return; + + switch( type ) + { + case TileConstants::Tile128: + case TileConstants::Tile256: + case TileConstants::TileTransition: + { + NL3D::CTile *t = m_pvt->m_bank.getTile( tileId ); + if( t == NULL ) + return; + + images.diffuse = t->getFileName( channelToTBitmap( TileConstants::TileDiffuse ) ).c_str(); + images.additive = t->getFileName( channelToTBitmap( TileConstants::TileAdditive ) ).c_str(); + images.alpha = t->getFileName( channelToTBitmap( TileConstants::TileAlpha ) ).c_str(); + } + break; + + case TileConstants::TileDisplacement: + { + images.diffuse = m_pvt->m_bank.getDisplacementMap( tileId ); + } + break; + } + +} + +void TileBank::getTileImages( int tileSet, TileConstants::TNodeTileType type, QList< TileImages > &l ) +{ + l.clear(); + + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return; + + int c = getTileCount( tileSet, type ); + + TileImages images; + + for( int i = 0; i < c; i++ ) + { + images.clear(); + + int id = getRealTileId( tileSet, type, i ); + if( id < 0 ) + { + l.push_back( images ); + continue; + } + + getTileImages( tileSet, type, id, images ); + + l.push_back( images ); + } + +} + +void TileBank::setVegetation( int tileSet, const QString &vegetation ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return; + + set->setTileVegetableDescFileName( vegetation.toUtf8().constData() ); +} + + +QString TileBank::getVegetation( int tileSet ) const +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return ""; + + return set->getTileVegetableDescFileName().c_str(); +} + +void TileBank::setOriented( int tileSet, bool b ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return; + + set->setOriented( b ); +} + +bool TileBank::getOriented( int tileSet ) const +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return false; + + return set->getOriented(); +} + + +void TileBank::setSurfaceData( int tileSet, unsigned long data ) +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return; + + set->SurfaceData = data; +} + +unsigned long TileBank::getSurfaceData( int tileSet ) const +{ + NL3D::CTileSet *set = m_pvt->m_bank.getTileSet( tileSet ); + if( set == NULL ) + return 0; + + return set->SurfaceData; +} + +void TileBank::setTexturePath( const QString &path ) +{ + m_pvt->m_bank.setAbsPath( path.toUtf8().constData() ); +} + +QString TileBank::getTexturePath() const +{ + return m_pvt->m_bank.getAbsPath().c_str(); +} + +void TileBank::setRotation( int rotation ) +{ + m_rotation = rotation; +} + +void TileBank::serial( NLMISC::IStream &f ) +{ + m_pvt->m_bank.serial( f ); +} + + diff --git a/code/studio/src/plugins/tile_editor/tile_bank.h b/code/studio/src/plugins/tile_editor/tile_bank.h new file mode 100644 index 000000000..9d765b8ae --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_bank.h @@ -0,0 +1,102 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 TILE_BANK_H +#define TILE_BANK_H + +#include +#include +#include +#include + +#include "tile_constants.h" +#include "tile_images.h" + +namespace NLMISC +{ + class IStream; +} + +class TileBankPvt; + +class TileBank +{ +public: + TileBank(); + ~TileBank(); + + void addTileSet( const QString &name ); + void removeTileSet( int idx ); + void renameTileSet( int idx, const QString &newName ); + void getTileSets( QStringList &l ); + + void addLand( const QString &name ); + void removeLand( int idx ); + void getLands( QStringList &l ); + void setLandSets( int idx, const QStringList &l ); + void getLandSets( int idx, QStringList &l ); + + bool addTile( int setIdx, const QString &name, const QVariant &pixmap, TileConstants::TTileChannel channel, TileConstants::TNodeTileType type ); + void removeTile( int ts, int type, int tile ); + bool setTile( int tileset, int tile, const QString &name, const QVariant &pixmap, TileConstants::TTileChannel channel, TileConstants::TNodeTileType type ); + void replaceImage( int ts, int type, int tile, TileConstants::TTileChannel channel, const QString &name, const QVariant &pixmap ); + void clearImage( int ts, int type, int tile, TileConstants::TTileChannel channel ); + + + int getTileCount( int tileSet, TileConstants::TNodeTileType type ); + int getRealTileId( int tileSet, TileConstants::TNodeTileType type, int tileIdInSet ); + void getTileImages( int tileSet, TileConstants::TNodeTileType type, int tileId, TileImages &images ); + void getTileImages( int tileSet, TileConstants::TNodeTileType type, QList< TileImages > &l ); + + void setVegetation( int tileSet, const QString &vegetation ); + QString getVegetation( int tileSet ) const; + + void setOriented( int tileSet, bool b ); + bool getOriented( int tileSet ) const; + + void setSurfaceData( int tileSet, unsigned long data ); + unsigned long getSurfaceData( int tileSet ) const; + + void setTexturePath( const QString &path ); + QString getTexturePath() const; + + void setRotation( int rotation ); + + void serial( NLMISC::IStream &f ); + + bool hasError() const{ return m_hasError; } + QString getLastError() const{ return m_lastError; } + void resetError(){ + m_hasError = false; + m_lastError = ""; + } + + void setError( const QString &msg ) + { + m_hasError = true; + m_lastError = msg; + } + +private: + TileBankPvt *m_pvt; + QString m_lastError; + bool m_hasError; + int m_rotation; +}; + +#endif + diff --git a/code/studio/src/plugins/tile_editor/tile_constants.h b/code/studio/src/plugins/tile_editor/tile_constants.h new file mode 100644 index 000000000..56748cb58 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_constants.h @@ -0,0 +1,43 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 TILE_CONSTANTS_H +#define TILE_CONSTANTS_H + + +namespace TileConstants +{ + enum TTileChannel + { + TileDiffuse = 0, + TileAdditive = 1, + TileAlpha = 2, + TileChannelCount = 3 + }; + + enum TNodeTileType + { + Tile128 = 0, + Tile256 = 1, + TileTransition = 2, + TileDisplacement = 3, + TileNodeTypeCount = 4 + }; +} + + +#endif diff --git a/code/studio/src/plugins/tile_editor/tile_editor.qrc b/code/studio/src/plugins/tile_editor/tile_editor.qrc new file mode 100644 index 000000000..55950d217 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_editor.qrc @@ -0,0 +1,29 @@ + + + images/add_tile.png + images/delete_image.png + images/delete_tile.png + images/replace_image.png + + + images/ic_nel_add_item.png + images/ic_nel_new.png + images/ic_nel_open.png + images/ic_nel_save.png + images/ic_nel_save_as.png + images/down.png + images/left.png + images/reset.png + images/right.png + images/up.png + + + images/rotation0.png + images/rotation90.png + images/rotation180.png + images/rotation270.png + + + images/empty_image.png + + diff --git a/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp new file mode 100644 index 000000000..4b00fb044 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp @@ -0,0 +1,957 @@ +// Object Viewer Qt - 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 "tile_editor_main_window.h" + +#include "nel/misc/path.h" + +#include +#include +#include +#include +#include + +#include "../core/icore.h" +#include "../core/core_constants.h" +#include "../core/menu_manager.h" + +#include "tile_model.h" +#include "tile_item.h" +#include "tile_item_delegate.h" + +#include "tilebank_saver.h" +#include "tilebank_loader.h" + +#include "land_edit_dialog.h" + +#include + +TileEditorMainWindow::TileEditorMainWindow(QWidget *parent) + : QMainWindow(parent), + m_ui(new Ui::TileEditorMainWindow) +{ + m_ui->setupUi(this); + m_undoStack = new QUndoStack(this); + + if( !TileItemNode::loadEmptyPixmap() ) + { + QTimer::singleShot( 0, this, SLOT( onEmptyImageLoadFailed() ) ); + } + + // Retrieve the menu manager + Core::ICore *core = Core::ICore::instance(); + Core::MenuManager *menuManager = core->menuManager(); + + // Create tile rotation drop down toolbar menu. + m_rotationMenu = new QMenu(tr("Rotate Tile"), m_ui->toolBar); + m_rotationMenu->setIcon(QIcon(":/tileRotation/images/rotation0.png")); + QList rotateActions; + rotateActions.push_back(m_ui->actionRotateTile0); + rotateActions.push_back(m_ui->actionRotateTile90); + rotateActions.push_back(m_ui->actionRotateTile180); + rotateActions.push_back(m_ui->actionRotateTile270); + m_rotationMenu->addActions(rotateActions); + m_ui->toolBar->addAction(m_rotationMenu->menuAction()); + m_rotateSM = new QSignalMapper(); + m_rotateAG = new QActionGroup(this); + m_rotateAG->addAction(m_ui->actionRotateTile0); + m_rotateAG->addAction(m_ui->actionRotateTile90); + m_rotateAG->addAction(m_ui->actionRotateTile180); + m_rotateAG->addAction(m_ui->actionRotateTile270); + m_ui->actionRotateTile0->setChecked( true ); + + connect( m_ui->actionRotateTile0, SIGNAL( triggered() ), m_rotateSM, SLOT( map() ) ); + connect( m_ui->actionRotateTile90, SIGNAL( triggered() ), m_rotateSM, SLOT( map() ) ); + connect( m_ui->actionRotateTile180, SIGNAL( triggered() ), m_rotateSM, SLOT( map() ) ); + connect( m_ui->actionRotateTile270, SIGNAL( triggered() ), m_rotateSM, SLOT( map() ) ); + m_rotateSM->setMapping( m_ui->actionRotateTile0, 0 ); + m_rotateSM->setMapping( m_ui->actionRotateTile90, 1 ); + m_rotateSM->setMapping( m_ui->actionRotateTile180, 2 ); + m_rotateSM->setMapping( m_ui->actionRotateTile270, 3 ); + connect( m_rotateSM, SIGNAL( mapped( int ) ), this, SLOT( onRotate( int ) ) ); + + // Create the tile zoom menu. + m_zoomMenu = new QMenu(tr("Zoom"), m_ui->toolBar); + m_zoomActionGroup = new QActionGroup(this); + m_zoomSignalMapper = new QSignalMapper(this); + QList zoomActions; + zoomActions.push_back(m_ui->actionZoom50); + zoomActions.push_back(m_ui->actionZoom100); + zoomActions.push_back(m_ui->actionZoom200); + m_zoomActionGroup->addAction(m_ui->actionZoom50); + m_zoomActionGroup->addAction(m_ui->actionZoom100); + m_zoomActionGroup->addAction(m_ui->actionZoom200); + m_zoomMenu->addActions(zoomActions); + m_ui->toolBar->addAction(m_zoomMenu->menuAction()); + + m_tileEditorMenu = new QMenu(tr("Tile Editor"), core->menuManager()->menuBar()); + m_tileDisplayMenu = new QMenu(tr("Tile Display"), m_ui->toolBar); + QList displayActions; + displayActions.push_back(m_ui->actionTileDisplayFilename); + displayActions.push_back(m_ui->actionTileDisplayIndex); + m_ui->actionTileDisplayIndex->setChecked(true); + m_tileDisplayMenu->addActions(displayActions); + m_tileEditorMenu->addMenu(m_tileDisplayMenu); + core->menuManager()->menuBar()->addMenu(m_tileEditorMenu); + + // Set up the list views. + m_tileItemDelegate = new TileItemDelegate(); + + // Set up the tile set list view. + //m_ui->tileSetLV->setModel(m_model); + //m_ui->tileSetLV->setRootIndex(m_model->index(0,0)); + + connect(m_ui->tileSetAddTB, SIGNAL(clicked()), this, SLOT(onTileSetAdd())); + connect(m_ui->tileSetDeleteTB, SIGNAL(clicked()), this, SLOT(onTileSetDelete())); + connect(m_ui->tileSetEditTB, SIGNAL(clicked()), this, SLOT(onTileSetEdit())); + + connect(m_ui->landAddTB, SIGNAL(clicked()), this, SLOT(onLandAdd())); + connect(m_ui->landRemoveTB, SIGNAL(clicked()), this, SLOT(onLandRemove())); + connect(m_ui->landEditTB, SIGNAL(clicked()), this, SLOT(onLandEdit())); + + connect(m_ui->chooseVegetPushButton, SIGNAL(clicked()), this, SLOT(onChooseVegetation())); + connect(m_ui->resetVegetPushButton, SIGNAL(clicked()), this, SLOT(onResetVegetation())); + + connect(m_ui->tileBankTexturePathPB, SIGNAL(clicked()), this, SLOT(onChooseTexturePath())); + + m_tileModel = createTileModel(); + m_ui->tileSetLV->setModel( m_tileModel ); + + // 128x128 List View + //m_ui->listView128->setItemDelegate(m_tileItemDelegate); + m_ui->listView128->setModel( m_tileModel ); + m_ui->listView128->addAction(m_ui->actionAddTile); + m_ui->listView128->addAction(m_ui->actionDeleteTile); + m_ui->listView128->addAction(m_ui->actionReplaceImage); + m_ui->listView128->addAction(m_ui->actionDeleteImage); + + // 256x256 List View + //m_ui->listView256->setItemDelegate(m_tileItemDelegate); + m_ui->listView256->setModel( m_tileModel ); + m_ui->listView256->addAction(m_ui->actionAddTile); + m_ui->listView256->addAction(m_ui->actionDeleteTile); + m_ui->listView256->addAction(m_ui->actionReplaceImage); + m_ui->listView256->addAction(m_ui->actionDeleteImage); + + // Transition List View + //m_ui->listViewTransition->setItemDelegate(m_tileItemDelegate); + m_ui->listViewTransition->setModel( m_tileModel ); + m_ui->listViewTransition->addAction(m_ui->actionReplaceImage); + m_ui->listViewTransition->addAction(m_ui->actionDeleteImage); + + // Displacement List View + //m_ui->listViewDisplacement->setItemDelegate(m_tileItemDelegate); + m_ui->listViewDisplacement->setModel( m_tileModel ); + m_ui->listViewDisplacement->addAction(m_ui->actionReplaceImage); + m_ui->listViewDisplacement->addAction(m_ui->actionDeleteImage); + + + // Connect context menu actions up. + connect(m_ui->actionAddTile, SIGNAL(triggered(bool)), this, SLOT(onActionAddTile(bool))); + connect(m_ui->actionDeleteTile, SIGNAL(triggered(bool)), this, SLOT(onActionDeleteTile(bool))); + connect(m_ui->actionReplaceImage, SIGNAL(triggered(bool)), this, SLOT(onActionReplaceImage(bool))); + connect(m_ui->actionDeleteImage, SIGNAL(triggered(bool)), this, SLOT(onActionDeleteImage(bool))); + + //connect(m_ui->tileViewTabWidget, SIGNAL(currentChanged(int)), m_tileItemDelegate, SLOT(currentTab(int))); + connect( m_ui->tileSetLV->selectionModel(), SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ), + this, SLOT( changeActiveTileSet( const QModelIndex &, const QModelIndex & ) ) ); + + // Connect the zoom buttons. + connect(m_ui->actionZoom50, SIGNAL(triggered()), m_zoomSignalMapper, SLOT(map())); + m_zoomSignalMapper->setMapping(m_ui->actionZoom50, 0); + connect(m_ui->actionZoom100, SIGNAL(triggered()), m_zoomSignalMapper, SLOT(map())); + m_zoomSignalMapper->setMapping(m_ui->actionZoom100, 1); + connect(m_ui->actionZoom200, SIGNAL(triggered()), m_zoomSignalMapper, SLOT(map())); + m_zoomSignalMapper->setMapping(m_ui->actionZoom200, 2); + connect(m_zoomSignalMapper, SIGNAL(mapped(int)), this, SLOT(onZoomFactor(int))); + + QAction *saveAction = Core::ICore::instance()->menuManager()->action( Core::Constants::SAVE ); + saveAction->setEnabled( true ); + QAction *saveAsAction = Core::ICore::instance()->menuManager()->action( Core::Constants::SAVE_AS ); + saveAsAction->setEnabled( true ); + QAction *openAction = Core::ICore::instance()->menuManager()->action( Core::Constants::OPEN ); + openAction->setEnabled( true ); + + connect( m_ui->actionSaveTileBank, SIGNAL( triggered() ), this, SLOT( save() ) ); + connect( m_ui->actionSaveTileBankAs, SIGNAL( triggered() ), this, SLOT( saveAs() ) ); + connect( m_ui->actionOpenTileBank, SIGNAL( triggered() ), this, SLOT( open() ) ); + + connect( m_ui->orientedCheckBox, SIGNAL( stateChanged( int ) ), this, SLOT( onOrientedStateChanged( int ) ) ); + connect( m_ui->surfaceDataLineEdit, SIGNAL( textEdited( const QString& ) ), this, SLOT( onSurfaceDataChanged( const QString& ) ) ); + + connect( m_ui->diffuse128BT, SIGNAL( toggled( bool ) ), this, SLOT( onDiffuseToggled( bool ) ) ); + connect( m_ui->diffuse256BT, SIGNAL( toggled( bool ) ), this, SLOT( onDiffuseToggled( bool ) ) ); + connect( m_ui->diffuseTrBT, SIGNAL( toggled( bool ) ), this, SLOT( onDiffuseToggled( bool ) ) ); + connect( m_ui->additive128BT, SIGNAL( toggled( bool ) ), this, SLOT( onAdditiveToggled( bool ) ) ); + connect( m_ui->additive256BT, SIGNAL( toggled( bool ) ), this, SLOT( onAdditiveToggled( bool ) ) ); + connect( m_ui->additiveTrBT, SIGNAL( toggled( bool ) ), this, SLOT( onAdditiveToggled( bool ) ) ); + connect( m_ui->alphaTrBT, SIGNAL( toggled( bool ) ), this, SLOT( onAlphaToggled( bool ) ) ); + + connect( m_ui->tileViewTabWidget, SIGNAL( currentChanged( int ) ), this, SLOT( onTabChanged( int ) ) ); + +} + +TileEditorMainWindow::~TileEditorMainWindow() +{ + delete m_ui; + delete m_undoStack; + delete m_rotationMenu; + delete m_rotateSM; + delete m_rotateAG; + + delete m_tileDisplayMenu; + delete m_tileEditorMenu; + + delete m_zoomMenu; + delete m_zoomActionGroup; + delete m_zoomSignalMapper; + + delete m_tileModel; + m_tileModel = NULL; +} + +void TileEditorMainWindow::save() +{ + if( m_fileName.isEmpty() ) + saveAs(); + else + saveAs( m_fileName ); +} + +void TileEditorMainWindow::saveAs() +{ + QString fn = QFileDialog::getSaveFileName( this, + tr( "Save TileBank as..." ), + "", + tr( "TileBank files (*.tilebank)" ) ); + + if( fn.isEmpty() ) + return; + + saveAs( fn ); + +} + +void TileEditorMainWindow::saveAs( const QString &fn ) +{ + QList< QString > landNames; + + int c = m_ui->landLW->count(); + for( int i = 0; i < c; i++ ) + { + QListWidgetItem *item = m_ui->landLW->item( i ); + landNames.push_back( item->text() ); + } + + TileBankSaver saver; + bool ok = saver.save( fn.toUtf8().constData(), m_tileModel ); + + if( !ok ) + { + QMessageBox::critical( this, + tr( "Saving tilebank" ), + tr( "Failed to save tilebank :(" ) ); + } +} + +void TileEditorMainWindow::open() +{ + QString fn = QFileDialog::getOpenFileName( this, + tr( "Loading tilebank" ), + m_lastOpenDir, + tr( "tilebank files (*.tilebank)" ) ); + + if( fn.isEmpty() ) + return; + + TileBankLoader loader; + bool b = loader.load( fn.toUtf8().constData(), m_tileModel ); + + if( !b ) + { + QMessageBox::critical( this, + tr( "Loading tilebank" ), + tr( "Failed to load tilebank %1" ).arg( fn ) ); + } + + // Put the loaded data into the GUI + onTileBankLoaded(); + + m_fileName = fn; + + int idx = fn.lastIndexOf( '/' ); + m_lastOpenDir = fn.left( idx ); +} + +void TileEditorMainWindow::onZoomFactor(int level) +{ + int tile128Scaled=TileModel::TILE_128_BASE_SIZE; + int tile256Scaled=TileModel::TILE_256_BASE_SIZE; + int tileTransScaled=TileModel::TILE_TRANSITION_BASE_SIZE; + int tileDispScaled=TileModel::TILE_DISPLACE_BASE_SIZE; + switch(level) + { + // Zoom Level 50% + case 0: + nlinfo("zooming to 50%"); + TileModel::CurrentZoomFactor = TileModel::TileZoom50; + tile128Scaled /= 2; + tile256Scaled /= 2; + tileTransScaled /= 2; + tileDispScaled /= 2; + break; + case 1: + nlinfo("zooming to 100%"); + TileModel::CurrentZoomFactor = TileModel::TileZoom100; + break; + case 2: + nlinfo("zooming to 200%"); + TileModel::CurrentZoomFactor = TileModel::TileZoom200; + tile128Scaled *= 2; + tile256Scaled *= 2; + tileTransScaled *= 2; + tileDispScaled *= 2; + break; + default: + nlwarning("Invalid Time Zoom Factor passed."); + break; + }; + + nlinfo("resizing transition view. base size: %d factor %d to: %d", TileModel::TILE_TRANSITION_BASE_SIZE, level, tileTransScaled); + + m_ui->listView128->setIconSize(QSize(tile128Scaled, tile128Scaled)); + m_ui->listView128->setCurrentIndex(m_ui->listView128->model()->index(0, 0, m_ui->listView128->rootIndex())); + m_ui->listView256->setIconSize(QSize(tile256Scaled, tile256Scaled)); + m_ui->listView256->setCurrentIndex(m_ui->listView256->model()->index(0, 0, m_ui->listView256->rootIndex())); + m_ui->listViewTransition->setIconSize(QSize(tileTransScaled, tileTransScaled)); + m_ui->listViewTransition->setCurrentIndex(m_ui->listViewTransition->model()->index(0, 0, m_ui->listViewTransition->rootIndex())); + m_ui->listViewDisplacement->setIconSize(QSize(tileDispScaled, tileDispScaled)); + m_ui->listViewDisplacement->setCurrentIndex(m_ui->listViewDisplacement->model()->index(0, 0, m_ui->listViewDisplacement->rootIndex())); + m_ui->listViewTransition->repaint(); +} + +void TileEditorMainWindow::onRotate( int id ) +{ + m_tileModel->setAlphaRot( id ); +} + +void TileEditorMainWindow::onEmptyImageLoadFailed() +{ + QMessageBox::critical( this, + tr( "Empty image load failed" ), + tr( "Couldn't load the image for empty tiles :(" ) ); +} + +void TileEditorMainWindow::onActionAddTile(bool triggered) +{ + onActionAddTile(m_ui->tileViewTabWidget->currentIndex()); +} + +void TileEditorMainWindow::onActionDeleteTile(bool triggered) +{ + onActionDeleteTile(m_ui->tileViewTabWidget->currentIndex()); +} + +void TileEditorMainWindow::onActionReplaceImage(bool triggered) +{ + onActionReplaceImage(m_ui->tileViewTabWidget->currentIndex()); +} + +void TileEditorMainWindow::onActionDeleteImage(bool triggered) +{ + onActionDeleteImage(m_ui->tileViewTabWidget->currentIndex()); +} + +void TileEditorMainWindow::onTileSetAdd() +{ + bool ok; + QString text = QInputDialog::getText(this, tr("Add Tile Set"), tr("Enter Tile Set name:"), QLineEdit::Normal, "", &ok); + if (ok && !text.isEmpty()) + { + TileModel *model = static_cast(m_ui->tileSetLV->model()); + + if( model->hasTileSet( text ) ) + { + QMessageBox::information( this, tr("Error Adding Tile Set"), tr("This name already exists") ); + return; + } + + // Create and append the new tile set to the model. + m_tileModel->addTileSet( text ); + + // Retrieve how many rows there currently are and set the current index using that. + uint32 rows = model->rowCount(); + m_ui->tileSetLV->setCurrentIndex(model->index(rows-1, 0)); + } +} + +void TileEditorMainWindow::onTileSetDelete() +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + return; + + int reply = QMessageBox::question( this, + tr( "Removing tile set" ), + tr( "Are you sure you want to remove this tile set?" ), + QMessageBox::Yes | QMessageBox::Cancel ); + + if( reply != QMessageBox::Yes ) + return; + + QString set = reinterpret_cast< TileSetNode* >( idx.internalPointer() )->getTileSetName(); + + m_tileModel->removeTileSet( idx.row() ); +} + +void TileEditorMainWindow::onTileSetEdit() +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + return; + + TileSetNode *node = reinterpret_cast< TileSetNode* >( idx.internalPointer() ); + QString name = node->getTileSetName(); + + bool ok = false; + + QString newName = QInputDialog::getText( this, + tr( "Edit tileset" ), + tr( "Enter tileset name" ), + QLineEdit::Normal, + name, + &ok ); + + if( !ok ) + return; + + TileModel *model = static_cast(m_ui->tileSetLV->model()); + if( model->hasTileSet( newName ) ) + { + QMessageBox::information( this, + tr("Tileset already exists"), + tr("A tileset with that name already exists!") ); + return; + } + + QString oldName = node->getTileSetName(); + node->setTileSetName( newName ); + m_ui->tileSetLV->reset(); + + m_tileModel->renameTileSet( idx.row(), newName ); +} + +void TileEditorMainWindow::onLandAdd() +{ + QString name = QInputDialog::getText( this, + tr("Adding new land"), + tr("Please specify the new land's name") ); + + if( name.isEmpty() ) + return; + + for( int i = 0; i < m_ui->landLW->count(); i++ ) + { + QListWidgetItem *item = m_ui->landLW->item( i ); + if( item->text() == name ) + { + QMessageBox::information( this, + tr( "Error adding new land" ), + tr( "A land with that name already exists." ) ); + return; + } + } + + m_ui->landLW->addItem( name ); + + m_tileModel->addLand( name ); +} + +void TileEditorMainWindow::onLandRemove() +{ + QListWidgetItem *item = m_ui->landLW->currentItem(); + if( item == NULL ) + return; + + int idx = m_ui->landLW->currentRow(); + + int reply = QMessageBox::question( this, + tr( "Removing land" ), + tr( "Are you sure you want to remove this land?" ), + QMessageBox::Yes | QMessageBox::Cancel ); + + if( reply != QMessageBox::Yes ) + return; + + delete item; + + m_tileModel->removeLand( idx ); +} + +void TileEditorMainWindow::onLandEdit() +{ + QListWidgetItem *item = m_ui->landLW->currentItem(); + if( item == NULL ) + return; + + QStringList ts; + int c = m_tileModel->rowCount(); + for( int i = 0; i < c; i++ ) + { + QModelIndex idx = m_tileModel->index( i, 0 ); + if( !idx.isValid() ) + continue; + + TileSetNode *n = reinterpret_cast< TileSetNode* >( idx.internalPointer() ); + ts.push_back( n->getTileSetName() ); + } + + int r = m_ui->landLW->currentRow(); + + QStringList sts; + m_tileModel->getLandSets( r, sts ); + + LandEditDialog d; + d.setSelectedTileSets( sts ); + d.setTileSets( ts ); + int result = d.exec(); + + if( result != QDialog::Accepted ) + return; + + // Update the tileset of the land + sts.clear(); + d.getSelectedTileSets( sts ); + + m_tileModel->setLandSets( r, sts ); +} + +void TileEditorMainWindow::onChooseVegetation() +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + { + QMessageBox::information( this, + tr("Choosing a vegetation set"), + tr("You need to select a tileset before choosing a vegetation set!") ); + return; + } + + QString vegetSet = QFileDialog::getOpenFileName( this, + tr( "Choose vegetation set" ), + "", + tr( "Nel vegetset files (*.vegetset)" ) ); + + if( vegetSet.isEmpty() ) + return; + + m_tileModel->setVegetation( idx.row(), vegetSet ); + + m_ui->chooseVegetPushButton->setText( vegetSet ); +} + +void TileEditorMainWindow::onResetVegetation() +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + { + QMessageBox::information( this, + tr("Resetting a vegetation set"), + tr("You need to select a tileset before resetting a vegetation set!") ); + return; + } + m_ui->chooseVegetPushButton->setText( "..." ); + + m_tileModel->setVegetation( idx.row(), "" ); +} + +void TileEditorMainWindow::onChooseTexturePath() +{ + QString path = QFileDialog::getExistingDirectory( this, + tr("Choose tilebank absolute texture path "), + "" ); + + if( path.isEmpty() ) + return; + + int reply = QMessageBox::question( this, + tr("tilebank texture path"), + tr("Are you sure you want to make '%1' the tilebank absolute texture path?").arg( path ), + QMessageBox::Yes | QMessageBox::Cancel ); + + if( reply != QMessageBox::Yes ) + return; + + m_texturePath = path; + m_ui->tileBankTexturePathPB->setText( path ); + m_tileModel->setTexturePath( path ); +} + +void TileEditorMainWindow::onOrientedStateChanged( int state ) +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + return; + + int row = idx.row(); + + if( state == Qt::Checked ) + m_tileModel->setOriented( row, true ); + else + m_tileModel->setOriented( row, false ); +} + +void TileEditorMainWindow::onSurfaceDataChanged( const QString &text ) +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + return; + + bool ok = false; + unsigned long data = text.toUInt( &ok ); + if( !ok ) + return; + + m_tileModel->setSurfaceData( idx.row(), data ); +} + +void TileEditorMainWindow::onDiffuseToggled( bool b ) +{ + if( !b ) + return; + + TileItemNode::setDisplayChannel( TileConstants::TileDiffuse ); + updateTab(); +} + +void TileEditorMainWindow::onAdditiveToggled( bool b ) +{ + if( !b ) + return; + + TileItemNode::setDisplayChannel( TileConstants::TileAdditive ); + updateTab(); +} + +void TileEditorMainWindow::onAlphaToggled( bool b ) +{ + if( !b ) + return; + + TileItemNode::setDisplayChannel( TileConstants::TileAlpha ); + updateTab(); +} + +void TileEditorMainWindow::onTabChanged( int tab ) +{ + if( tab == -1 ) + return; + + m_ui->diffuse128BT->setChecked( true ); + m_ui->diffuse256BT->setChecked( true ); + m_ui->diffuseTrBT->setChecked( true ); +} + +TileConstants::TNodeTileType tabToType( int tabId ) +{ + if( tabId >= TileConstants::TileNodeTypeCount ) + return TileConstants::TileNodeTypeCount; + + return TileConstants::TNodeTileType( tabId ); +} + +void TileEditorMainWindow::onActionAddTile(int tabId) +{ + QModelIndex idx = m_ui->tileSetLV->currentIndex(); + if( !idx.isValid() ) + { + QMessageBox::information( this, + tr( "Adding new tiles" ), + tr( "You need to have a tileset selected before you can add tiles!" ) ); + return; + } + + int tileSet = idx.row(); + + idx = m_tileModel->index( tileSet, 0 ); + if( !idx.isValid() ) + return; + + int setId = idx.row(); + + TileSetNode *tsn = reinterpret_cast< TileSetNode* >( idx.internalPointer() ); + + Node *n = tsn->child( tabId ); + + QFileDialog::Options options; + QString selectedFilter; + QStringList fileNames = QFileDialog::getOpenFileNames(this, "Choose Tile Texture", m_lastTileDir , "Images (*.png);;All Files (*.*)", &selectedFilter, options); + if( fileNames.empty() ) + return; + + TileConstants::TNodeTileType type = tabToType( tabId ); + + QStringListIterator itr( fileNames ); + QString error; + + while( itr.hasNext() ) + { + bool b = m_tileModel->addTile( setId, type, itr.next(), TileConstants::TileDiffuse ); + + if( !b ) + { + if( m_tileModel->hasError() ) + error = m_tileModel->getLastError(); + + int reply = QMessageBox::question( this, + tr( "Error adding tile" ), + error + "\nContinue?", + QMessageBox::Yes, QMessageBox::No ); + if( reply != QMessageBox::Yes ) + break; + else + continue; + } + + } + + QModelIndex rootIdx = m_tileModel->index( tabId, 0, m_ui->tileSetLV->currentIndex()); + + QListView *lv = getListViewByTab( tabId ); + + lv->reset(); + lv->setRootIndex( rootIdx ); + lv->setCurrentIndex( lv->model()->index( 0, 0, rootIdx ) ); + + QString fn = fileNames[ 0 ].replace( '\\', '/' ); + int slashIdx = fn.lastIndexOf( '/' ); + m_lastTileDir = fn.left( slashIdx ); +} + +void TileEditorMainWindow::onActionDeleteTile( int tabId ) +{ + QListView *lv = getListViewByTab( tabId ); + + QModelIndex idx = lv->currentIndex(); + if( !idx.isValid() ) + { + QMessageBox::information( this, + tr( "Deleting a tile" ), + tr( "You need to select a tile to delete is!" ) ); + return; + } + + QModelIndex tsidx = m_ui->tileSetLV->currentIndex(); + if( !tsidx.isValid() ) + return; + int ts = tsidx.row(); + int tile = idx.row(); + + m_tileModel->removeTile( ts, tabId, tile ); +} + +void TileEditorMainWindow::onActionDeleteImage( int tabId ) +{ + QListView *lv = getListViewByTab( tabId ); + + QModelIndex idx = lv->currentIndex(); + if( !idx.isValid() ) + { + QMessageBox::information( this, + tr( "Deleting tile image" ), + tr( "No tile selected!" ) ); + return; + } + + QModelIndex tsidx = m_ui->tileSetLV->currentIndex(); + if( !tsidx.isValid() ) + return; + int ts = tsidx.row(); + + TileItemNode *n = reinterpret_cast< TileItemNode* >( idx.internalPointer() ); + int tile = n->id(); + + m_tileModel->clearImage( ts, tabId, tile, TileItemNode::displayChannel() ); +} + +void TileEditorMainWindow::onActionReplaceImage( int tabId ) +{ + QListView *lv = getListViewByTab( tabId ); + + QModelIndex tsidx = m_ui->tileSetLV->currentIndex(); + if( !tsidx.isValid() ) + return; + int set = tsidx.row(); + + QModelIndex idx = lv->currentIndex(); + if( !idx.isValid() ) + { + QMessageBox::information( this, + tr( "Replacing tile image" ), + tr( "No tile selected!" ) ); + return; + } + + QString fileName = QFileDialog::getOpenFileName( this, + tr( "Select tile image" ), + m_lastTileDir, + tr( "PNG files (*.png)" ) ); + if( fileName.isEmpty() ) + return; + + TileItemNode *n = reinterpret_cast< TileItemNode* >( idx.internalPointer() ); + int tile = n->id(); + + m_tileModel->replaceImage( set, tabId, tile, TileItemNode::displayChannel(), fileName ); + if( m_tileModel->hasError() ) + { + QString error = m_tileModel->getLastError(); + QMessageBox::information( this, + tr( "Error replacing tile image" ), + error ); + } + + QString fn = fileName.replace( '\\', '/' ); + int slashIdx = fn.lastIndexOf( '/' ); + m_lastTileDir = fn.left( slashIdx ); + + updateTab(); +} + +void TileEditorMainWindow::onTileBankLoaded() +{ + m_ui->landLW->clear(); + QStringList lands; + m_tileModel->getLands( lands ); + QStringListIterator itr( lands ); + while( itr.hasNext() ) + { + m_ui->landLW->addItem( itr.next() ); + } + + m_tileModel->onTBLoaded(); + + m_ui->listView128->reset(); + m_ui->listView256->reset(); + m_ui->listViewTransition->reset(); + + QString path = m_tileModel->getTexturePath(); + if( path.isEmpty() ) + m_ui->tileBankTexturePathPB->setText( "..." ); + else + m_ui->tileBankTexturePathPB->setText( path ); + + QModelIndex idx = m_tileModel->index( 0, 0 ); + if( idx.isValid() ) + m_ui->tileSetLV->setCurrentIndex( idx ); + + if( m_ui->landLW->count() > 0 ) + m_ui->landLW->setCurrentRow( 0 ); +} + +void TileEditorMainWindow::updateTab() +{ + int idx = m_ui->tileViewTabWidget->currentIndex(); + + switch( idx ) + { + case 0: m_ui->listView128->viewport()->repaint(); break; + case 1: m_ui->listView256->viewport()->repaint(); break; + case 2: m_ui->listViewTransition->viewport()->repaint(); break; + case 3: m_ui->listViewDisplacement->viewport()->repaint(); break; + } +} + +TileModel* TileEditorMainWindow::createTileModel() +{ + QStringList headers; + headers << "Tile Set"; + TileModel *m = new TileModel( headers ); + + connect( m_ui->actionTileDisplayFilename, SIGNAL( toggled( bool )), m, SLOT( selectFilenameDisplay( bool ) ) ); + connect( m_ui->actionTileDisplayIndex, SIGNAL( toggled( bool )), m, SLOT( selectIndexDisplay( bool ) ) ); + + return m; +} + +void TileEditorMainWindow::changeActiveTileSet(const QModelIndex &newIndex, const QModelIndex &oldIndex) +{ + TileModel *model = static_cast(m_ui->tileSetLV->model()); + + QModelIndex tile128Idx = model->index(0, 0, newIndex); + QModelIndex tile256Idx = model->index(1, 0, newIndex); + QModelIndex tileTransIdx = model->index(2, 0, newIndex); + QModelIndex tileDispIdx = model->index(3, 0, newIndex); + + m_ui->listView128->setRootIndex(tile128Idx); + m_ui->listView128->setCurrentIndex(m_ui->listView128->model()->index(0, 0, m_ui->listView128->rootIndex())); + m_ui->listView256->setRootIndex(tile256Idx); + m_ui->listView256->setCurrentIndex(m_ui->listView256->model()->index(0, 0, m_ui->listView256->rootIndex())); + m_ui->listViewTransition->setRootIndex(tileTransIdx); + m_ui->listViewTransition->setCurrentIndex(m_ui->listViewTransition->model()->index(0, 0, m_ui->listViewTransition->rootIndex())); + m_ui->listViewDisplacement->setRootIndex(tileDispIdx); + m_ui->listViewDisplacement->setCurrentIndex(m_ui->listViewDisplacement->model()->index(0, 0, m_ui->listViewDisplacement->rootIndex())); + + TileSetNode *oldNode = NULL; + TileSetNode *newNode = NULL; + + if( oldIndex.isValid() ) + oldNode = reinterpret_cast< TileSetNode* >( oldIndex.internalPointer() ); + if( newIndex.isValid() ) + newNode = reinterpret_cast< TileSetNode* >( newIndex.internalPointer() ); + + if( newIndex.isValid() ) + { + QString vegetSet = m_tileModel->getVegetation( newIndex.row() ); + + if( !vegetSet.isEmpty() ) + m_ui->chooseVegetPushButton->setText( vegetSet ); + else + m_ui->chooseVegetPushButton->setText( "..." ); + + m_ui->orientedCheckBox->setChecked( m_tileModel->getOriented( newIndex.row() ) ); + m_ui->surfaceDataLineEdit->setText( QString::number( m_tileModel->getSurfaceData( newIndex.row() ) ) ); + } + else + { + m_ui->chooseVegetPushButton->setText( "..." ); + } + + //nlinfo("number of rows in displacement: %d", tileDispIdx.model()->rowCount(tileDispIdx)); + + //m_ui->listView128->reset(); + //m_ui->listView256->reset(); + //m_ui->listViewTransition->reset(); + //m_ui->listViewDisplacement->reset(); +} + + +QListView* TileEditorMainWindow::getListViewByTab( int tab ) const +{ + QListView *lv = NULL; + + switch( tab ) + { + case TAB_128: lv = m_ui->listView128; break; + case TAB_256: lv = m_ui->listView256; break; + case TAB_TRANSITION: lv = m_ui->listViewTransition; break; + case TAB_DISPLACEMENT: lv = m_ui->listViewDisplacement; break; + } + + return lv; +} + + diff --git a/code/studio/src/plugins/tile_editor/tile_editor_main_window.h b/code/studio/src/plugins/tile_editor/tile_editor_main_window.h new file mode 100644 index 000000000..d06d6deca --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.h @@ -0,0 +1,131 @@ +// Object Viewer Qt - 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 TILE_EDITOR_MAIN_WINDOW_H +#define TILE_EDITOR_MAIN_WINDOW_H + +#include "ui_tile_editor_main_window.h" + +#include "nel/misc/types_nl.h" +#include "nel/misc/sheet_id.h" + +#include +#include + +namespace Ui { + class TileEditorMainWindow; +} + +class TileModel; +class TileItemDelegate; + +class TileEditorMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit TileEditorMainWindow(QWidget *parent = 0); + ~TileEditorMainWindow(); + + QUndoStack *getUndoStack() { return m_undoStack; } + +public Q_SLOTS: + void save(); + void saveAs(); + void saveAs( const QString &fn ); + void open(); + +private Q_SLOTS: + void onActionAddTile(bool triggered); + void onActionDeleteTile(bool triggered); + void onActionReplaceImage(bool triggered); + void onActionDeleteImage(bool triggered); + + void onTileSetAdd(); + void onTileSetDelete(); + void onTileSetEdit(); + + void onLandAdd(); + void onLandRemove(); + void onLandEdit(); + + void onResetVegetation(); + void onChooseVegetation(); + + void onChooseTexturePath(); + + void onOrientedStateChanged( int state ); + void onSurfaceDataChanged( const QString &text ); + + void onDiffuseToggled( bool b ); + void onAdditiveToggled( bool b ); + void onAlphaToggled( bool b ); + + void onTabChanged( int tab ); + + void changeActiveTileSet(const QModelIndex &newIndex, const QModelIndex &oldIndex); + void onZoomFactor(int level); + void onRotate(int id); + + void onEmptyImageLoadFailed(); + +private: + void onActionAddTile(int tabId); + void onActionDeleteTile(int tabId); + void onActionDeleteImage(int tabId); + void onActionReplaceImage(int tabId); + + void onTileBankLoaded(); + + void updateTab(); + + TileModel* createTileModel(); + QListView* getListViewByTab( int tab ) const; + + Ui::TileEditorMainWindow *m_ui; + QUndoStack *m_undoStack; + QMenu *m_rotationMenu; + + QMenu *m_tileDisplayMenu; + QMenu *m_tileEditorMenu; + + QMenu *m_zoomMenu; + QActionGroup *m_zoomActionGroup; + QSignalMapper *m_zoomSignalMapper; + QActionGroup *m_rotateAG; + QSignalMapper *m_rotateSM; + + TileItemDelegate *m_tileItemDelegate; + + TileModel *m_tileModel; + + QString m_texturePath; + + enum Tabs + { + TAB_128 = 0, + TAB_256 = 1, + TAB_TRANSITION = 2, + TAB_DISPLACEMENT = 3, + TAB_DETAILS = 4 + }; + + QString m_fileName; + QString m_lastOpenDir; + QString m_lastTileDir; +}; + +#endif // TILE_EDITOR_MAIN_WINDOW_H diff --git a/code/studio/src/plugins/tile_editor/tile_editor_main_window.ui b/code/studio/src/plugins/tile_editor/tile_editor_main_window.ui new file mode 100644 index 000000000..08d14ca79 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.ui @@ -0,0 +1,748 @@ + + + TileEditorMainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + + 0 + + + + 128x128 + + + + + + Qt::ActionsContextMenu + + + + 128 + 128 + + + + QListView::LeftToRight + + + true + + + QListView::IconMode + + + true + + + + + + + Edit Channel + + + + + + Diffuse + + + true + + + + + + + Additive + + + + + + + + + + + 256x256 + + + + + + Qt::ActionsContextMenu + + + + 256 + 256 + + + + QListView::LeftToRight + + + true + + + QListView::IconMode + + + true + + + + + + + Edit Channel + + + + + + Diffuse + + + true + + + true + + + + + + + Additive + + + + + + + + + + + Transition + + + + + + Qt::ActionsContextMenu + + + + 64 + 64 + + + + QListView::Static + + + QListView::LeftToRight + + + true + + + QListView::Adjust + + + QListView::SinglePass + + + QListView::IconMode + + + true + + + + + + + Edit Channel + + + + + + Diffuse + + + true + + + + + + + Additive + + + + + + + Alpha + + + + + + + + + + + Displacement + + + + + + Qt::ActionsContextMenu + + + + 32 + 32 + + + + QListView::Static + + + QListView::LeftToRight + + + true + + + QListView::Fixed + + + QListView::IconMode + + + false + + + + + + + + Tile Set Details + + + + + + Qt::LeftToRight + + + Oriented + + + + + + + + + + Surface Data: + + + + + + + Vegetation Set: + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + ... + + + + + + + Reset + + + + :/newPrefix/reset.png:/newPrefix/reset.png + + + + + + + + + + + + + Tile Editor Tool Bar + + + TopToolBarArea + + + false + + + + + + + + + Tile Bank + + + 1 + + + + + + + Lands + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + ... + + + + :/movementIcons/images/ic_nel_add_item.png:/movementIcons/images/ic_nel_add_item.png + + + + + + + ... + + + + :/movementIcons/images/reset.png:/movementIcons/images/reset.png + + + + + + + ... + + + + :/movementIcons/images/ic_nel_open.png:/movementIcons/images/ic_nel_open.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Tile Sets + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + ... + + + + :/movementIcons/images/ic_nel_add_item.png:/movementIcons/images/ic_nel_add_item.png + + + + + + + ... + + + + :/movementIcons/images/reset.png:/movementIcons/images/reset.png + + + + + + + ... + + + + :/movementIcons/images/ic_nel_open.png:/movementIcons/images/ic_nel_open.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Tile Bank Texture Path + + + + + + + + + + + + ... + + + + + + + + + + + + + + + :/movementIcons/images/ic_nel_open.png:/movementIcons/images/ic_nel_open.png + + + Open Tile Bank + + + Open Tile Bank + + + + + true + + + + :/tileRotation/images/rotation0.png:/tileRotation/images/rotation0.png + + + 0 + + + Rotate Tile 0 Degrees + + + + + + :/movementIcons/images/ic_nel_save.png:/movementIcons/images/ic_nel_save.png + + + Save Tile Bank + + + Save Tile Bank + + + + + + :/movementIcons/images/ic_nel_save_as.png:/movementIcons/images/ic_nel_save_as.png + + + Save Tile Bank As... + + + Save Tile Bank As... + + + + + true + + + + :/tileRotation/images/rotation90.png:/tileRotation/images/rotation90.png + + + 90 + + + Rotate Tile 90 Degrees + + + + + true + + + + :/tileRotation/images/rotation180.png:/tileRotation/images/rotation180.png + + + 180 + + + Rotate Tile180 Degrees + + + + + true + + + + :/tileRotation/images/rotation270.png:/tileRotation/images/rotation270.png + + + 270 + + + Rotate Tile 270 Degrees + + + + + Batch Load + + + Batch Load + + + + + Import Border + + + Import Border + + + + + Export Border + + + Export Border + + + + + true + + + true + + + Index + + + Display Tile Index + + + + + true + + + true + + + Filename + + + Display Tile Filename + + + + + + :/tileTools/images/add_tile.png:/tileTools/images/add_tile.png + + + Add Tile + + + Add Tile + + + + + + :/tileTools/images/delete_tile.png:/tileTools/images/delete_tile.png + + + Delete Tile + + + Delete Tile + + + + + + :/tileTools/images/replace_image.png:/tileTools/images/replace_image.png + + + Replace Image + + + Replace Image + + + + + + :/tileTools/images/delete_image.png:/tileTools/images/delete_image.png + + + Delete Image + + + Delete Image + + + + + true + + + Zoom 50% + + + + + true + + + true + + + Zoom 100% + + + + + true + + + Zoom 200% + + + + + + + + + diff --git a/code/studio/src/plugins/tile_editor/tile_editor_plugin.cpp b/code/studio/src/plugins/tile_editor/tile_editor_plugin.cpp new file mode 100644 index 000000000..b10eb6074 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_editor_plugin.cpp @@ -0,0 +1,78 @@ +// Object Viewer Qt - 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 "tile_editor_plugin.h" +#include "tile_editor_main_window.h" +#include "../core/icore.h" +#include "../core/menu_manager.h" +#include "../core/core_constants.h" + +// Qt includes +#include +#include +#include +#include +#include +#include + +// NeL includes +#include "nel/misc/debug.h" + +using namespace TileEditorPluginQt; + +TileEditorPlugin::~TileEditorPlugin() +{ + Q_FOREACH(QObject *obj, m_autoReleaseObjects) + { + m_plugMan->removeObject(obj); + } + qDeleteAll(m_autoReleaseObjects); + m_autoReleaseObjects.clear(); + + delete m_LibContext; + m_LibContext = NULL; +} + +bool TileEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) +{ + Q_UNUSED(errorString); + m_plugMan = pluginManager; + addAutoReleasedObject(new TileEditorContext()); + return true; +} + +void TileEditorPlugin::extensionsInitialized() +{ +} + +void TileEditorPlugin::setNelContext(NLMISC::INelContext *nelContext) +{ +#ifdef NL_OS_WINDOWS + // Ensure that a context doesn't exist yet. + // This only applies to platforms without PIC, e.g. Windows. + nlassert(!NLMISC::INelContext::isContextInitialised()); +#endif // NL_OS_WINDOWS + m_LibContext = new NLMISC::CLibraryContext(*nelContext); +} + +void TileEditorPlugin::addAutoReleasedObject(QObject *obj) +{ + m_plugMan->addObject(obj); + m_autoReleaseObjects.prepend(obj); +} + +Q_EXPORT_PLUGIN(TileEditorPlugin) diff --git a/code/studio/src/plugins/tile_editor/tile_editor_plugin.h b/code/studio/src/plugins/tile_editor/tile_editor_plugin.h new file mode 100644 index 000000000..70fb38e77 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_editor_plugin.h @@ -0,0 +1,120 @@ +// Object Viewer Qt - 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 TILE_EDITOR_PLUGIN_H +#define TILE_EDITOR_PLUGIN_H + +#include "../../extension_system/iplugin.h" +#include "../core/icontext.h" + +#include "nel/misc/app_context.h" + +#include "tile_editor_main_window.h" + +#include + +namespace NLMISC +{ +class CLibraryContext; +} + +namespace TileEditorPluginQt +{ + +class TileEditorPlugin : public QObject, public ExtensionSystem::IPlugin +{ + Q_OBJECT + Q_INTERFACES(ExtensionSystem::IPlugin) +public: + + ~TileEditorPlugin(); + + bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString); + void extensionsInitialized(); + void setNelContext(NLMISC::INelContext *nelContext); + + void addAutoReleasedObject(QObject *obj); + +protected: + NLMISC::CLibraryContext *m_LibContext; + +private: + ExtensionSystem::IPluginManager *m_plugMan; + QList m_autoReleaseObjects; + +}; + +class TileEditorContext: public Core::IContext +{ + Q_OBJECT +public: + TileEditorContext(QObject *parent = 0) : IContext(parent) + { + m_tileEditorMainWindow = new TileEditorMainWindow(); + } + + virtual ~TileEditorContext() + { + m_tileEditorMainWindow = NULL; + } + + virtual QString id() const + { + return QLatin1String("TileEditor"); + } + + virtual QString trName() const + { + return tr("Tile Editor"); + } + + virtual QIcon icon() const + { + return QIcon(":/tileRotation/images/rotation0.png"); + } + + virtual QUndoStack *undoStack() + { + return m_tileEditorMainWindow->getUndoStack(); + } + + virtual void open() + { + m_tileEditorMainWindow->open(); + } + + void save() + { + m_tileEditorMainWindow->save(); + } + + void saveAs() + { + m_tileEditorMainWindow->saveAs(); + } + + virtual QWidget *widget() + { + return m_tileEditorMainWindow; + } + +private: + TileEditorMainWindow *m_tileEditorMainWindow; +}; + +} // namespace TileEditorPluginQt + +#endif // TILE_EDITOR_PLUGIN_H diff --git a/code/studio/src/plugins/tile_editor/tile_images.h b/code/studio/src/plugins/tile_editor/tile_images.h new file mode 100644 index 000000000..280e0a126 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_images.h @@ -0,0 +1,40 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 TILE_IMAGES_H +#define TILE_IMAGES_H + +#include + +struct TileImages +{ + QString diffuse; + QString additive; + QString alpha; + + void clear() + { + diffuse.clear(); + additive.clear(); + alpha.clear(); + } +}; + + + +#endif + diff --git a/code/studio/src/plugins/tile_editor/tile_item.cpp b/code/studio/src/plugins/tile_editor/tile_item.cpp new file mode 100644 index 000000000..71fe336a2 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_item.cpp @@ -0,0 +1,422 @@ +// Object Viewer Qt - 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 + +#include "tile_item.h" + +#include + +Node::Node() : m_parentItem(0) +{ +} + +Node::Node(const QVector &data, Node *parent) +{ + m_parentItem = parent; + m_itemData = data; +} + +Node::~Node() +{ + qDeleteAll(m_childItems); + m_childItems.clear(); +} + +void Node::appendChild(Node *item) +{ + item->setParent( this ); + m_childItems.append(item); +} + +Node *Node::child(int row) +{ + //nlinfo("row %d and size %d", row, childItems.size()); + return m_childItems.value(row); +} + +int Node::childCount() const +{ + return m_childItems.count(); +} + +int Node::childNumber() const +{ + if(m_parentItem) + return m_parentItem->m_childItems.indexOf(const_cast(this)); + return 0; +} + +bool Node::insertChildren(int position, int count, int columns) +{ + if(position<0 || position>m_childItems.size()) + return false; + + for(int row = 0; row < count; row++) + { + QVector data(columns); + Node *item = new Node(data, this); + m_childItems.insert(position, item); + } + + return true; +} + +bool Node::removeChildren(int position, int count) +{ + if(position<0 || position+count>m_childItems.size()) + return false; + + for(int row=0; row m_itemData.size()) + return false; + + for(int column=0; columninsertColumns(position, columns); + + return true; +} + +int Node::row() const +{ + if(m_parentItem) + return m_parentItem->m_childItems.indexOf(const_cast(this)); + + return 0; +} + +int Node::columnCount() const +{ + return m_itemData.count(); +} + +QVariant Node::data(int column, int role) const +{ + if(role == Qt::DisplayRole || + role == TileModel::TileFilenameIndexRole || + role == TileModel::TileFilenameRole || + role == TileModel::TileIndexRole) + return m_itemData.value(column); + return QVariant(); +} + +bool Node::setData(int column, const QVariant &value) +{ + if(column < 0 || column >= m_itemData.size()) + return false; + + m_itemData[column] = value; + return true; +} + +Node *Node::parent() +{ + return m_parentItem; +} + +void Node::setParent(Node *parent) +{ + m_parentItem = parent; +} + +void Node::appendRow(const QList &items) +{ + Q_FOREACH(Node *item, items) + appendRow(item); +} + +void Node::appendRow(Node *item) +{ + item->setParent(this); + m_childItems.append(item); +} + +void Node::swapRows( int a, int b ) +{ + Node *temp = m_childItems[ a ]; + m_childItems[ a ] = m_childItems[ b ]; + m_childItems[ b ] = temp; +} + +void Node::clear() +{ + qDeleteAll( m_childItems ); + m_childItems.clear(); + m_itemData.clear(); +} + +/////////////////////////////////////////////////// + +TileSetNode::TileSetNode(QString tileSetName, Node *parent) : m_tileSetName(tileSetName) +{ + m_parentItem = parent; +} + +TileSetNode::~TileSetNode() +{ + qDeleteAll(m_childItems); + m_childItems.clear(); +} + +QVariant TileSetNode::data(int column, int role) const +{ + if(role == Qt::DisplayRole || + role == TileModel::TileFilenameIndexRole || + role == TileModel::TileFilenameRole || + role == TileModel::TileIndexRole) + return QVariant(m_tileSetName); + return QVariant(); +} + +int TileSetNode::columnCount() const +{ + return 1; +} + +/////////////////////////////////////////////////// + +TileTypeNode::TileTypeNode(TileConstants::TNodeTileType type, Node *parent) : m_nodeTileType(type) +{ + m_parentItem = parent; +} + +TileTypeNode::~TileTypeNode() +{ + qDeleteAll(m_childItems); + m_childItems.clear(); +} + +QVariant TileTypeNode::data(int column, int role) const +{ + if(role == Qt::DisplayRole || + role == TileModel::TileFilenameIndexRole || + role == TileModel::TileFilenameRole || + role == TileModel::TileIndexRole) + return QVariant(TileModel::getTileTypeName(m_nodeTileType)); + return QVariant(); + +} + +int TileTypeNode::columnCount() const +{ + return 1; +} + +TileConstants::TNodeTileType TileTypeNode::getTileType() +{ + return m_nodeTileType; +} + +bool TileTypeNode::removeChildren( int position, int count ) +{ + bool ok = Node::removeChildren( position, count ); + if( !ok ) + return false; + + reindex(); + + return true; +} + +void TileTypeNode::reindex() +{ + int i = 0; + + QListIterator< Node* > itr( m_childItems ); + while( itr.hasNext() ) + { + TileItemNode *n = dynamic_cast< TileItemNode* >( itr.next() ); + if( n == NULL ) + continue; + + n->setId( i ); + + i++; + } +} + + +/////////////////////////////////////////////////// + +class TileItemNodePvt +{ +public: + + TileItemNodePvt() + { + } + + bool loadImage( TileConstants::TTileChannel channel, const QString &fn ) + { + if( fn.isEmpty() ) + { + pixmaps[ channel ] = TileItemNodePvt::emptyPm(); + return true; + } + + QPixmap temp; + bool b = temp.load( fn ); + + if( !b ) + { + return false; + } + + pixmaps[ channel ] = temp; + + return true; + } + + static bool loadEmptyImage() + { + bool b = empty.load( ":/placeHolder/images/empty_image.png" ); + if( !b ) + { + empty = QPixmap(); + } + + return b; + } + + void clearImage( TileConstants::TTileChannel channel ) + { + pixmaps[ channel ] = QPixmap(); + } + + const QPixmap& pixMap( TileConstants::TTileChannel channel ) const{ + return pixmaps[ channel ]; + } + + static QPixmap& emptyPm(){ return empty; } + +private: + QPixmap pixmaps[ TileConstants::TileChannelCount ]; + static QPixmap empty; + +}; + +QPixmap TileItemNodePvt::empty = QPixmap(); +TileConstants::TTileChannel TileItemNode::s_displayChannel = TileConstants::TileDiffuse; + +TileItemNode::TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent ) +{ + m_id = tileId; + m_parentItem = parent; + pvt = new TileItemNodePvt(); + + for( int i = 0; i < TileConstants::TileChannelCount; i++ ) + { + setTileFilename( TileConstants::TTileChannel( i ), "" ); + } +} + +TileItemNode::~TileItemNode() +{ + delete pvt; + pvt = NULL; + + qDeleteAll(m_childItems); +} + +bool TileItemNode::setTileFilename(TileConstants::TTileChannel channel, QString filename) +{ + bool b = pvt->loadImage( channel, filename ); + if( !b ) + return false; + + m_tileFilename[channel] = filename; + return true; +} + +QString TileItemNode::getTileFilename(TileConstants::TTileChannel channel) +{ + QMap< TileConstants::TTileChannel, QString >::const_iterator itr + = m_tileFilename.find( channel ); + if( itr == m_tileFilename.end() ) + return ""; + + return itr.value(); +} + +bool TileItemNode::loadEmptyPixmap() +{ + return TileItemNodePvt::loadEmptyImage(); +} + +QVariant TileItemNode::data(int column, int role) const +{ + QString tileFilename = m_tileFilename[ TileItemNode::s_displayChannel ]; + + if(role == TileModel::TilePixmapRole || role == Qt::DecorationRole) + { + TileTypeNode *parent = dynamic_cast(m_parentItem); + if(parent == NULL) + return QVariant(); + + // Retrieve the target tile size. + uint32 tileSize = TileModel::getTileTypeSize(parent->getTileType()); + + if(TileModel::CurrentZoomFactor == TileModel::TileZoom200) + tileSize *= 2; + else if(TileModel::CurrentZoomFactor == TileModel::TileZoom50) + tileSize /= 2; + + QPixmap pixmap = pvt->pixMap( TileItemNode::s_displayChannel ); + + pixmap = pixmap.scaled(tileSize, tileSize); + + return pixmap; + } + else if(role == Qt::DisplayRole) + { + return QVariant(tileFilename); + } + else if(role == TileModel::TileFilenameRole) + { + return QVariant(tileFilename); + } + else if(role == TileModel::TileIndexRole) + { + return QVariant("("+QString::number(m_id)+")"); + } + else if(role == TileModel::TileFilenameIndexRole) + { + return QVariant(tileFilename + " ("+QString::number(m_id)+")"); + } + + return QVariant(); +} + +int TileItemNode::columnCount() const +{ + return 1; +} + +QVariant TileItemNode::pixmap( TileConstants::TTileChannel channel ) const +{ + return pvt->pixMap( channel ); +} + diff --git a/code/studio/src/plugins/tile_editor/tile_item.h b/code/studio/src/plugins/tile_editor/tile_item.h new file mode 100644 index 000000000..5387a710d --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_item.h @@ -0,0 +1,136 @@ +// Object Viewer Qt - 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 TILE_ITEM_H +#define TILE_ITEM_H + +#include "nel/misc/types_nl.h" + +#include +#include + +#include "tile_model.h" + +namespace NL3D +{ + class CTileBorder; +} + +class TileWidget; + +class Node +{ +public: + Node(); + Node(const QVector &data, Node *parent=0); + virtual ~Node(); + + void appendChild(Node *child); + + Node *child(int row); + int childCount() const; + int childNumber() const; + virtual int columnCount() const; + bool setData(int column, const QVariant &value); + virtual QVariant data(int column, int role) const; + + bool insertChildren(int position, int count, int columns); + virtual bool removeChildren(int position, int count); + bool insertColumns(int position, int columns); + + int row() const; + Node *parent(); + void setParent(Node *parent); + + void appendRow(const QList &items); + void appendRow(Node *item); + + void swapRows( int a, int b ); + + void clear(); + +protected: + QList m_childItems; + QVector m_itemData; + Node *m_parentItem; +}; + +class TileSetNode : public Node +{ +public: + TileSetNode(QString tileSetName, Node *parent=0); + virtual ~TileSetNode(); + QVariant data(int column, int role) const; + int columnCount() const; + + const QString &getTileSetName(){ return m_tileSetName; } + void setTileSetName( const QString &name ){ m_tileSetName = name; } + +private: + QString m_tileSetName; +}; + +class TileTypeNode : public Node +{ +public: + + TileTypeNode(TileConstants::TNodeTileType type, Node *parent=0); + virtual ~TileTypeNode(); + QVariant data(int column, int role) const; + int columnCount() const; + + TileConstants::TNodeTileType getTileType(); + + bool removeChildren( int position, int count ); + +private: + void reindex(); + TileConstants::TNodeTileType m_nodeTileType; +}; + +class TileItemNodePvt; + +class TileItemNode : public Node +{ +public: + TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent=0); + virtual ~TileItemNode(); + QVariant data(int column, int role) const; + int columnCount() const; + bool setTileFilename(TileConstants::TTileChannel channel, QString filename); + QString getTileFilename(TileConstants::TTileChannel channel); + void setId( int id ){ m_id = id; } + int id() const{ return m_id; } + + static void setDisplayChannel( TileConstants::TTileChannel channel ){ s_displayChannel = channel; } + static TileConstants::TTileChannel displayChannel(){ return s_displayChannel; } + static bool loadEmptyPixmap(); + + QVariant pixmap( TileConstants::TTileChannel channel ) const; + +private: + QMap m_tileFilename; + QMap m_tileWidget; + + static TileConstants::TTileChannel s_displayChannel; + + int m_id; + + TileItemNodePvt *pvt; + +}; + +#endif // TILE_ITEM_H diff --git a/code/studio/src/plugins/tile_editor/tile_item_delegate.cpp b/code/studio/src/plugins/tile_editor/tile_item_delegate.cpp new file mode 100644 index 000000000..6f9479354 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_item_delegate.cpp @@ -0,0 +1,122 @@ +// Object Viewer Qt - 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 + +#include + +#include "tile_item_delegate.h" + +#include "tile_model.h" + +TileItemDelegate::TileItemDelegate() +{ + m_zoomFactor = ZoomNormal; + m_imageHint = 128; +} + +TileItemDelegate::~TileItemDelegate() +{ +} + +void TileItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const +{ + QStyledItemDelegate::paint(painter,option,index); + + painter->save(); + + QFont font = QApplication::font(); + + //font.setBold(true); + //SubFont.setWeight(SubFont.weight()-2); + QFontMetrics fm(font); + + QPixmap tile = qvariant_cast(index.data(TileModel::TilePixmapRole)); + QString tileFileText = qvariant_cast(index.data(TileModel::TileFilenameRole)); + QString tileIdText = qvariant_cast(index.data(TileModel::TileIndexRole)); + + QSize tileSize = tile.size(); + + //QRect headerRect = option.rect; + QRect rect(option.rect); + //QRect tileRect(option.rect); + int textHeight = fm.height(); + int iconPosModX = PIXMAP_MARGIN + (tile.width() / 2); + int iconPosModY = (option.rect.height() - tile.height()) / 2; + + painter->drawPixmap(rect.adjusted(iconPosModX, iconPosModY, iconPosModX, iconPosModY).topLeft(), tile); + + + + //tileRect.setRight(tileSize.width()+30); + //tileRect.setTop(tileRect.top()+5); + //headerRect.setLeft(tileRect.right()); + //subheaderRect.setLeft(tileRect.right()); + //headerRect.setTop(headerRect.top()+5); + //headerRect.setBottom(headerRect.top()+fm.height()); + + //subheaderRect.setTop(headerRect.bottom()+2); + + //painter->drawPixmap(targetrect, pixmap, sourcerect) + + //painter->drawPixmap(QPoint(iconRect.right()/2,iconRect.top()/2),icon.pixmap(iconsize.width(),iconsize.height())); + //painter->drawPixmap(QPoint(tileRect.left()+tileSize.width()/2+2,tileRect.top()+tileSize.height()/2+3),tile); + + //painter->setFont(font); + //painter->drawText(headerRect,headerText); + + + //painter->setFont(SubFont); + //painter->drawText(subheaderRect.left(),subheaderRect.top()+17,subText); + + painter->restore(); +} + +QSize TileItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index ) const +{ + QPixmap tile = qvariant_cast(index.data(TileModel::TilePixmapRole)); + QSize tileSize = tile.size(); + QFont font = QApplication::font(); + QFontMetrics fm(font); + + return(QSize(tileSize.width()+(2*PIXMAP_MARGIN), tileSize.height()+fm.height()+(2*PIXMAP_MARGIN))); +} + +TileItemDelegate::TZoomFactor TileItemDelegate::getZoomFactor() +{ + return m_zoomFactor; +} + +void TileItemDelegate::setZoomFactor(TileItemDelegate::TZoomFactor zoomFactor) +{ + m_zoomFactor = zoomFactor; +} + +// SLOTS + +void TileItemDelegate::currentTab(int index) +{ + if(index == 1) + { + nlinfo("switching delegate to 1 or 256"); + m_imageHint = 256; + } + else + { + nlinfo("switching delegate to 0,2,3 or 128"); + m_imageHint = 128; + } +} \ No newline at end of file diff --git a/code/studio/src/plugins/tile_editor/tile_item_delegate.h b/code/studio/src/plugins/tile_editor/tile_item_delegate.h new file mode 100644 index 000000000..015f32021 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_item_delegate.h @@ -0,0 +1,55 @@ +// Object Viewer Qt - 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 TILE_ITEM_DELEGATE_H +#define TILE_ITEM_DELEGATE_H + +#include +#include +#include + +#include + +class TileItemDelegate : public QStyledItemDelegate + { + public: + + enum TZoomFactor + { + ZoomSmall = 0, + ZoomNormal = 1, + ZoomLarge = 2 + }; + + static const int PIXMAP_MARGIN = 5; + + TileItemDelegate(); + virtual ~TileItemDelegate(); + + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index ) const; + + TZoomFactor getZoomFactor(); + void setZoomFactor(TZoomFactor zoomFactor); + +public Q_SLOTS: + void currentTab(int index); + + private: + TZoomFactor m_zoomFactor; + int m_imageHint; + }; + +#endif // TILE_ITEM_DELEGATE_H diff --git a/code/studio/src/plugins/tile_editor/tile_model.cpp b/code/studio/src/plugins/tile_editor/tile_model.cpp new file mode 100644 index 000000000..2af4c6a84 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_model.cpp @@ -0,0 +1,564 @@ +// Object Viewer Qt - 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 "tile_model.h" +#include "tile_item.h" +#include "tile_bank.h" + +#include + +#include + +// Initialize the static members +TileModel::TTileZoomFactor TileModel::CurrentZoomFactor; + +TileModel::TileModel(const QStringList &headers, QObject *parent) : QAbstractItemModel(parent) +{ + QVector rootData; + Q_FOREACH(QString header, headers) + rootData << header; + + rootItem = new Node(rootData); + + TileModel::CurrentZoomFactor = TileModel::TileZoom100; + m_indexDisplay = true; + m_fileDisplay = true; + + m_tileBank = new TileBank(); +} + +TileModel::~TileModel() +{ + delete rootItem; +} + +Node *TileModel::getItem(const QModelIndex &index) const +{ + if(index.isValid()) + { + Node *item = static_cast(index.internalPointer()); + if(item) return item; + } + return rootItem; +} + +QModelIndex TileModel::index(int row, int column, const QModelIndex &parent) const +{ + if(parent.isValid() && parent.column() != 0) + return QModelIndex(); + + Node *parentItem = getItem(parent); + + Node *childItem = parentItem->child(row); + if(childItem) + return createIndex(row, column, childItem); + else + return QModelIndex(); +} + +QModelIndex TileModel::parent(const QModelIndex &index) const +{ + if(!index.isValid()) + return QModelIndex(); + + Node *childItem = getItem(index); + Node *parentItem = childItem->parent(); + + if(parentItem == rootItem) + return QModelIndex(); + + return createIndex(parentItem->childNumber(), 0, parentItem); +} + +int TileModel::rowCount(const QModelIndex &parent) const +{ + Node *parentItem = getItem(parent); + return parentItem->childCount(); +} + +int TileModel::columnCount(const QModelIndex &parent) const +{ + Node *parentItem = getItem(parent); + return parentItem->columnCount(); +} + +QVariant TileModel::data(const QModelIndex &index, int role) const +{ + if(!index.isValid()) + return QVariant(); + + Node *item = static_cast(index.internalPointer()); + + // Translate the display role to the settings-specific role. + + if(role == Qt::DisplayRole) + { + if(m_indexDisplay && m_fileDisplay) + role = TileFilenameIndexRole; + else if(m_fileDisplay) + role = TileFilenameRole; + else if(m_indexDisplay) + role = TileIndexRole; + } + return item->data(index.column(), role); +} + +Qt::ItemFlags TileModel::flags(const QModelIndex &index) const +{ + if(!index.isValid()) + return Qt::ItemIsEnabled; + + return Qt::ItemIsEnabled|Qt::ItemIsSelectable; +} + +QVariant TileModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if(orientation == Qt::Horizontal && role == Qt::DisplayRole) + return rootItem->data(section,role); + + return QVariant(); +} + +void TileModel::appendRow(const QList &items) +{ + rootItem->appendRow(items); +} + + +void TileModel::appendRow(Node *item) +{ + int c = rootItem->childCount(); + + beginInsertRows( QModelIndex(), c, c ); + + rootItem->appendRow(item); + + endInsertRows(); +} + +bool TileModel::removeRows( int row, int count, const QModelIndex &parent ) +{ + Node *parentNode = NULL; + + if( !parent.isValid() ) + parentNode = rootItem; + else + parentNode = getItem( parent ); + + if( parentNode == NULL ) + return false; + + int c = parentNode->childCount(); + if( row + count > c ) + return false; + + beginRemoveRows( parent, row, row + count - 1 ); + + bool ok = parentNode->removeChildren( row, count ); + + endRemoveRows(); + + return ok; +} + +void TileModel::swapRows( int a, int b ) +{ + rootItem->swapRows( a, b ); +} + +TileSetNode *TileModel::createTileSetNode(QString tileSetName) +{ + // Create the new tile set. + TileSetNode *tileSet = new TileSetNode(tileSetName); + + // child for 128x128 tiles + TileTypeNode *tile128= new TileTypeNode( TileConstants::Tile128); + tileSet->appendRow(tile128); + + // child for 256x256 tiles + TileTypeNode *tile256= new TileTypeNode( TileConstants::Tile256); + tileSet->appendRow(tile256); + + // child for transition tiles. + TileTypeNode *tileTrans= new TileTypeNode( TileConstants::TileTransition); + tileSet->appendRow(tileTrans); + + // Add the default transition tiles. + // TODO tie this to CTileSet::count from NeL + for(int transPos=0; transPos<48; transPos++) + { + TileItemNode *transTile= new TileItemNode( TileConstants::TileTransition, transPos ); + tileTrans->appendRow(transTile); + } + + // child for displacement tiles + TileTypeNode *tileDisp= new TileTypeNode( TileConstants::TileDisplacement); + tileSet->appendRow(tileDisp); + + // Add the default displacement tiles. + // TODO tie this to CTileSet::CountDisplace from NeL + for(int dispPos=0; dispPos<16; dispPos++) + { + TileItemNode *dispTile= new TileItemNode( TileConstants::TileDisplacement, dispPos ); + tileDisp->appendRow(dispTile); + } + + // Append them in the correct order to the tile set. + this->appendRow(tileSet); + + return tileSet; +} + +const char *TileModel::getTileTypeName(TileConstants::TNodeTileType type) +{ + switch(type) + { + case TileConstants::Tile128: + return "128"; + case TileConstants::Tile256: + return "256"; + case TileConstants::TileTransition: + return "Transition"; + case TileConstants::TileDisplacement: + return "Displacement"; + default: + break; + } + return "UNKNOWN"; +} + +uint32 TileModel::getTileTypeSize(TileConstants::TNodeTileType type) +{ + switch(type) + { + case TileConstants::Tile128: + return 128; + case TileConstants::Tile256: + return 256; + case TileConstants::TileTransition: + return 64; + case TileConstants::TileDisplacement: + return 32; + default: + break; + } + return 0; +} + +bool TileModel::hasTileSet( const QString &name ) +{ + for( int i = 0; i < rowCount(); i++ ) + { + QModelIndex idx = index( i, 0 ); + if( !idx.isValid() ) + { + continue; + } + + TileSetNode *n = reinterpret_cast< TileSetNode* >( idx.internalPointer() ); + if( n->getTileSetName() == name ) + return true; + } + + return false; +} + +void TileModel::clear() +{ + int c = rootItem->childCount(); + if( c == 0 ) + return; + + removeRows( 0, c ); +} + +void TileModel::onTBLoaded() +{ + clear(); + loadTileSets(); +} + + +void TileModel::addLand( const QString &name ) +{ + m_tileBank->addLand( name ); +} + +void TileModel::removeLand( int idx ) +{ + m_tileBank->removeLand( idx ); +} + +void TileModel::getLands( QStringList &l ) +{ + m_tileBank->getLands( l ); +} + +void TileModel::setLandSets( int idx, const QStringList &l ) +{ + m_tileBank->setLandSets( idx, l ); +} + +void TileModel::getLandSets( int idx, QStringList &l ) +{ + m_tileBank->getLandSets( idx, l ); +} + + +bool TileModel::addTileSet( const QString &name ) +{ + m_tileBank->addTileSet( name ); + TileSetNode *tsn = createTileSetNode( name ); + + return false; +} + +void TileModel::removeTileSet( int idx ) +{ + TileSetNode *set = static_cast< TileSetNode* >( rootItem->child( idx ) ); + if( set == NULL ) + return; + + removeRow( idx ); + + m_tileBank->removeTileSet( idx ); +} + +void TileModel::renameTileSet( int idx, const QString &newName ) +{ + m_tileBank->renameTileSet( idx, newName ); +} + +bool TileModel::addTile( int ts, int type, const QString &fileName, TileConstants::TTileChannel channel ) +{ + TileSetNode *tsn = static_cast< TileSetNode* >( rootItem->child( ts ) ); + if( tsn == NULL ) + return false; + + TileTypeNode *ttn = static_cast< TileTypeNode* >( tsn->child( type ) ); + if( ttn == NULL ) + return false; + + int tile = ttn->childCount(); + + TileConstants::TNodeTileType t = TileConstants::TNodeTileType( type ); + + TileItemNode *item = new TileItemNode( t, tile ); + item->setTileFilename( channel, fileName ); + + bool b = m_tileBank->addTile( ts, fileName, item->pixmap( channel ), channel, t ); + if( !b ) + { + delete item; + return false; + } + + item->setParent( ttn ); + ttn->appendRow( item ); + + return true; +} + +void TileModel::removeTile( int ts, int type, int tile ) +{ + TileSetNode *set = static_cast< TileSetNode* >( rootItem->child( ts ) ); + if( set == NULL ) + return; + + TileTypeNode *typeNode = static_cast< TileTypeNode* >( set->child( type ) ); + if( typeNode == NULL ) + return; + + TileItemNode *tileNode = static_cast< TileItemNode* >( typeNode->child( tile ) ); + if( tileNode == NULL ) + return; + + QModelIndex tileIdx = createIndex( tile, 0, tileNode ); + removeRow( tile, tileIdx.parent() ); + + m_tileBank->removeTile( ts, type, tile ); +} + +bool TileModel::replaceImage( int ts, int type, int tile, TileConstants::TTileChannel channel, const QString &name ) +{ + Node *set = rootItem->child( ts ); + Node *tn = set->child( type ); + Node *n = tn->child( tile ); + + TileItemNode *tin = static_cast< TileItemNode* >( n ); + QString old = tin->getTileFilename( channel ); + + bool b = tin->setTileFilename( channel, name ); + if( !b ) + return false; + + m_tileBank->replaceImage( ts, type, tile, channel, name, tin->pixmap( channel ) ); + if( m_tileBank->hasError() ) + { + tin->setTileFilename( channel, old ); + return false; + } + + return true; +} + +void TileModel::clearImage( int ts, int type, int tile, TileConstants::TTileChannel channel ) +{ + Node *set = rootItem->child( ts ); + Node *tn = set->child( type ); + Node *n = tn->child( tile ); + + TileItemNode *tin = static_cast< TileItemNode* >( n ); + tin->setTileFilename( channel, "" ); + + m_tileBank->clearImage( ts, type, tile, channel ); +} + +void TileModel::setVegetation( int tileSet, const QString &vegetation ) +{ + m_tileBank->setVegetation( tileSet, vegetation ); +} + +QString TileModel::getVegetation( int tileSet ) const +{ + return m_tileBank->getVegetation( tileSet ); +} + +void TileModel::setOriented( int tileSet, bool b ) +{ + m_tileBank->setOriented( tileSet, b ); +} + +bool TileModel::getOriented( int tileSet ) const +{ + return m_tileBank->getOriented( tileSet ); +} + +void TileModel::setSurfaceData( int tileSet, unsigned long data ) +{ + m_tileBank->setSurfaceData( tileSet, data ); +} + +unsigned long TileModel::getSurfaceData( int tileSet ) const +{ + return m_tileBank->getSurfaceData( tileSet ); +} + +void TileModel::setTexturePath( const QString &path ) +{ + m_tileBank->setTexturePath( path ); +} + +void TileModel::serial( NLMISC::IStream &f ) +{ + m_tileBank->serial( f ); +} + +QString TileModel::getTexturePath() const +{ + return m_tileBank->getTexturePath(); +} + +void TileModel::setAlphaRot( int rotation ) +{ + m_tileBank->setRotation( rotation ); +} + +QString TileModel::getLastError() const{ + return m_tileBank->getLastError(); +} + +bool TileModel::hasError() const +{ + return m_tileBank->hasError(); +} + +void TileModel::selectFilenameDisplay(bool selected) +{ + m_fileDisplay = selected; +} + +void TileModel::selectIndexDisplay(bool selected) +{ + m_indexDisplay = selected; +} + +void TileModel::loadTileSets() +{ + QStringList l; + m_tileBank->getTileSets( l ); + + // Create tile sets + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + createTileSetNode( itr.next() ); + } + + // Loads sets + int c = rootItem->childCount(); + for( int i = 0; i < c; i++ ) + { + loadTileSet( i ); + } +} + + +void TileModel::loadTileSet( int tileSet ) +{ + TileSetNode *set = static_cast< TileSetNode* >( rootItem->child( tileSet ) ); + + QList< TileImages > l; + for( int i = TileConstants::Tile128; i < TileConstants::TileNodeTypeCount; i++ ) + { + TileConstants::TNodeTileType type = TileConstants::TNodeTileType( i ); + l.clear(); + m_tileBank->getTileImages( tileSet, type, l ); + + loadTileTypeNode( tileSet, type, l ); + } +} + +void TileModel::loadTileTypeNode( int tileSet, int type, const QList< TileImages > &l ) +{ + TileSetNode *set = static_cast< TileSetNode* >( rootItem->child( tileSet ) ); + TileTypeNode *ttn = static_cast< TileTypeNode* >( set->child( type ) ); + + int tile = 0; + + QList< TileImages >::const_iterator itr = l.begin(); + while( itr != l.end() ) + { + const TileImages &images = *itr; + + TileItemNode *item = NULL; + + if( ( type == TileConstants::Tile128 ) || ( type == TileConstants::Tile256 ) ) + item = new TileItemNode( TileConstants::TNodeTileType( type ), tile, ttn ); + else + item = static_cast< TileItemNode* >( ttn->child( tile ) ); + + item->setTileFilename( TileConstants::TileDiffuse, images.diffuse ); + item->setTileFilename( TileConstants::TileAdditive, images.additive ); + item->setTileFilename( TileConstants::TileAlpha, images.alpha ); + + if( ( type == TileConstants::Tile128 ) || ( type == TileConstants::Tile256 ) ) + ttn->appendRow( item ); + + ++itr; + tile++; + } +} diff --git a/code/studio/src/plugins/tile_editor/tile_model.h b/code/studio/src/plugins/tile_editor/tile_model.h new file mode 100644 index 000000000..c6bfc8788 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tile_model.h @@ -0,0 +1,150 @@ +// Object Viewer Qt - 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 TILE_MODEL_H +#define TILE_MODEL_H + +#include "nel/misc/types_nl.h" + +#include + +#include "tile_constants.h" +#include "tile_images.h" + +namespace NLMISC +{ + class IStream; +} + +class Node; +class TileSetNode; +class TileItemNode; +class TileBank; +class TileModelPvt; + +class TileModel : public QAbstractItemModel +{ + Q_OBJECT + +public: + enum TTileItemRole + { + TilePixmapRole = Qt::UserRole+1, + TileFilenameRole = Qt::UserRole+2, + TileIndexRole = Qt::UserRole+3, + TileFilenameIndexRole = Qt::UserRole+4 + }; + + enum TTileZoomFactor + { + TileZoom50 = 0, + TileZoom100 = 1, + TileZoom200 = 2 + }; + + static const int TILE_DISPLACE_BASE_SIZE = 32; + static const int TILE_TRANSITION_BASE_SIZE = 64; + static const int TILE_128_BASE_SIZE = 128; + static const int TILE_256_BASE_SIZE = 256; + + TileModel(const QStringList &headers, QObject *parent = NULL); + ~TileModel(); + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + Qt::ItemFlags flags(const QModelIndex &index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex &parent= QModelIndex()) const; + QModelIndex parent(const QModelIndex &index) const; + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + + // Tile Model specific functions + void appendRow(const QList &items); + void appendRow(Node *item); + + bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() ); + + void swapRows( int a, int b ); + + static const char *getTileTypeName(TileConstants::TNodeTileType type); + static uint32 getTileTypeSize(TileConstants::TNodeTileType type); + + static TTileZoomFactor CurrentZoomFactor; + + bool hasTileSet( const QString &name ); + + void clear(); + void onTBLoaded(); + + void addLand( const QString &name ); + void removeLand( int idx ); + void getLands( QStringList &l ); + + bool addTileSet( const QString &name ); + + void removeTileSet( int idx ); + void renameTileSet( int idx, const QString &newName ); + void setLandSets( int idx, const QStringList &l ); + void getLandSets( int idx, QStringList &l ); + + bool addTile( int ts, int type, const QString &fileName, TileConstants::TTileChannel channel ); + void removeTile( int ts, int type, int tile ); + bool replaceImage( int ts, int type, int tile, TileConstants::TTileChannel channel, const QString &name ); + void clearImage( int ts, int type, int tile, TileConstants::TTileChannel channel ); + + void setVegetation( int tileSet, const QString &vegetation ); + QString getVegetation( int tileSet ) const; + + void setOriented( int tileSet, bool b ); + bool getOriented( int tileSet ) const; + + void setSurfaceData( int tileSet, unsigned long data ); + unsigned long getSurfaceData( int tileSet ) const; + + void setTexturePath( const QString &path ); + QString getTexturePath() const; + + void setAlphaRot( int rotation ); + + void serial( NLMISC::IStream &f ); + + QString getLastError() const; + bool hasError() const; + +public Q_SLOTS: + void selectFilenameDisplay(bool selected); + void selectIndexDisplay(bool selected); + +private: + TileSetNode *createTileSetNode(QString tileSetName); + Node *getItem(const QModelIndex &index) const; + void loadTileSets(); + void loadTileSet( int tileSet ); + void loadTileTypeNode( int tileSet, int type, const QList< TileImages > &l ); + + bool m_fileDisplay; + bool m_indexDisplay; + //TTileZoomFactor m_tileZoomFactor; + + //QList m_tiles; + //int m_activeEditChannel; + Node *rootItem; + + TileBank *m_tileBank; + TileModelPvt *pvt; +}; + +#endif // TILE_MODEL_H diff --git a/code/studio/src/plugins/tile_editor/tilebank_loader.cpp b/code/studio/src/plugins/tile_editor/tilebank_loader.cpp new file mode 100644 index 000000000..ceae137cc --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tilebank_loader.cpp @@ -0,0 +1,42 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 "tilebank_loader.h" + +#include "tile_model.h" +#include "nel/misc/file.h" + +TileBankLoader::TileBankLoader() +{ +} + +TileBankLoader::~TileBankLoader() +{ +} + +bool TileBankLoader::load( const char *filename, TileModel *model ) +{ + NLMISC::CIFile file; + if( !file.open( filename, false ) ) + return false; + + model->serial( file ); + + file.close(); + + return true; +} diff --git a/code/studio/src/plugins/tile_editor/tilebank_loader.h b/code/studio/src/plugins/tile_editor/tilebank_loader.h new file mode 100644 index 000000000..6f41234ba --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tilebank_loader.h @@ -0,0 +1,35 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 TILEBANK_LOADER_H +#define TILEBANK_LOADER_H + +class TileModel; + +class TileBankLoader +{ +public: + TileBankLoader(); + ~TileBankLoader(); + + bool load( const char *filename, TileModel *model ); + +private: +}; + + +#endif + diff --git a/code/studio/src/plugins/tile_editor/tilebank_saver.cpp b/code/studio/src/plugins/tile_editor/tilebank_saver.cpp new file mode 100644 index 000000000..85c96ee94 --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tilebank_saver.cpp @@ -0,0 +1,48 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 "tilebank_saver.h" +#include "tile_model.h" +#include "tile_item.h" + +#include "nel/3d/tile_bank.h" +#include "nel/misc/file.h" + +TileBankSaver::TileBankSaver() +{ +} + +TileBankSaver::~TileBankSaver() +{ +} + +bool TileBankSaver::save( const char *fileName, TileModel* model ) +{ + // Save to file + NLMISC::COFile f; + bool b = f.open( fileName, false, false, false ); + if( !b ) + return false; + + model->serial( f ); + + f.flush(); + f.close(); + + return true; +} + diff --git a/code/studio/src/plugins/tile_editor/tilebank_saver.h b/code/studio/src/plugins/tile_editor/tilebank_saver.h new file mode 100644 index 000000000..ba9c3c7fd --- /dev/null +++ b/code/studio/src/plugins/tile_editor/tilebank_saver.h @@ -0,0 +1,39 @@ +// Ryzom Core Studio - Tile Editor plugin +// 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 TILEBANK_SAVER_H +#define TILEBANK_SAVER_H + +#include +#include + +class TileModel; + +class TileBankSaver +{ +public: + TileBankSaver(); + ~TileBankSaver(); + + bool save( const char *filename, TileModel* model ); + +private: + +}; + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt b/code/studio/src/plugins/translation_manager/CMakeLists.txt similarity index 57% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt rename to code/studio/src/plugins/translation_manager/CMakeLists.txt index 1d96ebc77..b35c64735 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt +++ b/code/studio/src/plugins/translation_manager/CMakeLists.txt @@ -17,6 +17,7 @@ SET(OVQT_PLUG_TRANSLATION_MANAGER_HDR translation_manager_plugin.h ftp_selection.h editor_worksheet.h editor_phrase.h + uxt_editor.h ) SET(OVQT_PLUG_TRANSLATION_MANAGER_UIS translation_manager_settings_page.ui @@ -38,29 +39,29 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC}) SOURCE_GROUP("Translation Manager Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_translation_manager MODULE ${SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) +ADD_LIBRARY(studio_plugin_translation_manager MODULE ${SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_TRANSLATION_MANAGER_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_translation_manager ovqt_plugin_core nelmisc nelligo nelgeorges ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${QT_QTNETWORK_LIBRARY} ) +TARGET_LINK_LIBRARIES(studio_plugin_translation_manager studio_plugin_core nelmisc nelligo nelgeorges ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${QT_QTNETWORK_LIBRARY} ) -NL_DEFAULT_PROPS(ovqt_plugin_translation_manager "NeL, Tools, 3D: Object Viewer Qt Plugin: Translation Manager") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_translation_manager) -NL_ADD_LIB_SUFFIX(ovqt_plugin_translation_manager) +NL_DEFAULT_PROPS(studio_plugin_translation_manager "Tools: Studio Plugin: Translation Manager") +NL_ADD_RUNTIME_FLAGS(studio_plugin_translation_manager) +NL_ADD_LIB_SUFFIX(studio_plugin_translation_manager) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_translation_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_translation_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/README b/code/studio/src/plugins/translation_manager/README similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/README rename to code/studio/src/plugins/translation_manager/README diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_phrase.cpp b/code/studio/src/plugins/translation_manager/editor_phrase.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_phrase.cpp rename to code/studio/src/plugins/translation_manager/editor_phrase.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_phrase.h b/code/studio/src/plugins/translation_manager/editor_phrase.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_phrase.h rename to code/studio/src/plugins/translation_manager/editor_phrase.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_worksheet.cpp b/code/studio/src/plugins/translation_manager/editor_worksheet.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_worksheet.cpp rename to code/studio/src/plugins/translation_manager/editor_worksheet.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_worksheet.h b/code/studio/src/plugins/translation_manager/editor_worksheet.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/editor_worksheet.h rename to code/studio/src/plugins/translation_manager/editor_worksheet.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.cpp b/code/studio/src/plugins/translation_manager/extract_bot_names.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.cpp rename to code/studio/src/plugins/translation_manager/extract_bot_names.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.h b/code/studio/src/plugins/translation_manager/extract_bot_names.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_bot_names.h rename to code/studio/src/plugins/translation_manager/extract_bot_names.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_new_sheet_names.cpp b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_new_sheet_names.cpp rename to code/studio/src/plugins/translation_manager/extract_new_sheet_names.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_new_sheet_names.h b/code/studio/src/plugins/translation_manager/extract_new_sheet_names.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/extract_new_sheet_names.h rename to code/studio/src/plugins/translation_manager/extract_new_sheet_names.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.cpp b/code/studio/src/plugins/translation_manager/ftp_selection.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.cpp rename to code/studio/src/plugins/translation_manager/ftp_selection.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.h b/code/studio/src/plugins/translation_manager/ftp_selection.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.h rename to code/studio/src/plugins/translation_manager/ftp_selection.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.qrc b/code/studio/src/plugins/translation_manager/ftp_selection.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.qrc rename to code/studio/src/plugins/translation_manager/ftp_selection.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.ui b/code/studio/src/plugins/translation_manager/ftp_selection.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ftp_selection.ui rename to code/studio/src/plugins/translation_manager/ftp_selection.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/images/cdtoparent.png b/code/studio/src/plugins/translation_manager/images/cdtoparent.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/images/cdtoparent.png rename to code/studio/src/plugins/translation_manager/images/cdtoparent.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/images/dir.png b/code/studio/src/plugins/translation_manager/images/dir.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/images/dir.png rename to code/studio/src/plugins/translation_manager/images/dir.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/images/file.png b/code/studio/src/plugins/translation_manager/images/file.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/images/file.png rename to code/studio/src/plugins/translation_manager/images/file.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/source_selection.cpp b/code/studio/src/plugins/translation_manager/source_selection.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/source_selection.cpp rename to code/studio/src/plugins/translation_manager/source_selection.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/source_selection.h b/code/studio/src/plugins/translation_manager/source_selection.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/source_selection.h rename to code/studio/src/plugins/translation_manager/source_selection.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/source_selection.ui b/code/studio/src/plugins/translation_manager/source_selection.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/source_selection.ui rename to code/studio/src/plugins/translation_manager/source_selection.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ovqt_plugin_translation_manager.xml b/code/studio/src/plugins/translation_manager/studio_plugin_translation_manager.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ovqt_plugin_translation_manager.xml rename to code/studio/src/plugins/translation_manager/studio_plugin_translation_manager.xml index c5574777a..261fbe65a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/ovqt_plugin_translation_manager.xml +++ b/code/studio/src/plugins/translation_manager/studio_plugin_translation_manager.xml @@ -1,5 +1,5 @@ - ovqt_plugin_translation_manager + studio_plugin_translation_manager TranslationManager 0.8 Ryzom Core diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_constants.h b/code/studio/src/plugins/translation_manager/translation_manager_constants.h similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_constants.h rename to code/studio/src/plugins/translation_manager/translation_manager_constants.h index d72a2b223..7ff813d40 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_constants.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_constants.h @@ -21,8 +21,9 @@ namespace TranslationManager { namespace Constants { -const int ED_SHEET = 1; +const int ED_SHEET = 1; const int ED_PHRASE = 2; +const int ED_UXT = 3; const char *const WK_BOTNAMES = "bot_names_wk.txt"; const char *const WK_ITEM = "item_words_wk.txt"; @@ -32,6 +33,7 @@ const char *const WK_SPHRASE = "sphrase_words_wk.txt"; const char *const WK_PLACE = "place_words_wk.txt"; const char *const WK_CONTINENT = "place_words_wk.txt"; const char *const WK_STABLE = "place_words_wk.txt"; +const char *const WK_UXT = "wk.uxt"; } } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_editor.h b/code/studio/src/plugins/translation_manager/translation_manager_editor.h similarity index 91% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_editor.h rename to code/studio/src/plugins/translation_manager/translation_manager_editor.h index fd53ba863..3ded2c3af 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_editor.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_editor.h @@ -32,8 +32,8 @@ class CEditor : public QMdiSubWindow Q_OBJECT public: - CEditor(QMdiArea *parent) : QMdiSubWindow(parent) {} - CEditor() : QMdiSubWindow() {} + CEditor(QMdiArea *parent) : QMdiSubWindow(parent) { current_stack = NULL; } + CEditor() : QMdiSubWindow() { current_stack = NULL; } virtual void open(QString filename) =0; virtual void save() =0; virtual void saveAs(QString filename) =0; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp b/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp similarity index 93% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp rename to code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp index 9fcb9626a..c5228fae6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.cpp +++ b/code/studio/src/plugins/translation_manager/translation_manager_main_window.cpp @@ -41,16 +41,20 @@ #include #include +#include "uxt_editor.h" + namespace TranslationManager { CMainWindow::CMainWindow(QWidget *parent) : QMainWindow(parent) { + menu = NULL; _ui.setupUi(this); _ui.mdiArea->closeAllSubWindows(); windowMapper = new QSignalMapper(this); + m_UXTMapper = new QSignalMapper(this); connect(windowMapper, SIGNAL(mapped(QWidget *)), this, SLOT(setActiveSubWindow(QWidget *))); initialize_settings["georges"] = false; @@ -59,10 +63,53 @@ CMainWindow::CMainWindow(QWidget *parent) connect(Core::ICore::instance(), SIGNAL(changeSettings()), this, SLOT(readSettings())); readSettings(); createToolbar(); + createMenus(); m_undoStack = new QUndoStack(this); } +CMainWindow::~CMainWindow() +{ + removeMenus(); +} + +void CMainWindow::removeMenus() +{ + delete menu; + menu = NULL; +} + +void CMainWindow::createMenus() +{ + // Windows menu + Core::MenuManager *menuManager = Core::ICore::instance()->menuManager(); + QMenu *m = menuManager->menuBar()->addMenu( "Translation Manager" ); + if( m != NULL ) + { + windowMenu = m->addMenu("Window"); + + QMenu *mm = m->addMenu( "UI translation" ); + if( mm != NULL ) + { + QStringListIterator itr( languages ); + while( itr.hasNext() ) + { + QString lang = itr.next(); + QAction *a = mm->addAction( lang ); + connect( a, SIGNAL( triggered() ), m_UXTMapper, SLOT( map() ) ); + m_UXTMapper->setMapping( a, lang ); + } + + connect( m_UXTMapper, SIGNAL( mapped( QString ) ), this, SLOT( onUxtMapped( QString ) ) ); + } + + menu = m; + } + + updateWindowsList(); + connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowsList())); +} + // Functions that will insert the plugin buttons void CMainWindow::createToolbar() { @@ -126,12 +173,8 @@ void CMainWindow::createToolbar() mergeSingleFileAct->setStatusTip(tr("Merge worksheet file from local or remote directory")); connect(mergeSingleFileAct, SIGNAL(triggered()), this, SLOT(mergeSingleFile())); - // Windows menu Core::ICore *core = Core::ICore::instance(); Core::MenuManager *menuManager = core->menuManager(); - windowMenu = menuManager->menuBar()->addMenu("Window"); - updateWindowsList(); - connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowsList())); // Undo, Redo actions QAction *undoAction = menuManager->action(Core::Constants::UNDO); @@ -256,6 +299,7 @@ void CMainWindow::openWorkFile(QString file) if(isWorksheetEditor(file_path->filePath())) { CEditorWorksheet *new_window = new CEditorWorksheet(_ui.mdiArea); + new_window->setUndoStack( m_undoStack ); new_window->open(file_path->filePath()); new_window->activateWindow(); } @@ -519,6 +563,20 @@ void CMainWindow::mergeSingleFile() } } +void CMainWindow::onUxtMapped( QString lang ) +{ + QString path = translation_path + "/" + lang + ".uxt"; + path.replace( "\\", "/" ); + + if( getEditorByWindowFilePath( path ) != NULL ) + return; + + UXTEditor *e = new UXTEditor(); + e->open( path ); + _ui.mdiArea->addSubWindow( e ); + e->activateWindow(); +} + // Read the settings from QSettings void CMainWindow::readSettings() { @@ -533,7 +591,7 @@ void CMainWindow::readSettings() // core settings settings->beginGroup(Core::Constants::DATA_PATH_SECTION); level_design_path = settings->value(Core::Constants::LEVELDESIGN_PATH).toString(); - primitives_path = QString(Core::Constants::PRIMITIVES_PATH); //TODO + primitives_path = settings->value( Core::Constants::PRIMITIVES_PATH ).toString(); settings->endGroup(); } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.h b/code/studio/src/plugins/translation_manager/translation_manager_main_window.h similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.h rename to code/studio/src/plugins/translation_manager/translation_manager_main_window.h index c67f282e0..34f60ff19 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.h +++ b/code/studio/src/plugins/translation_manager/translation_manager_main_window.h @@ -58,7 +58,7 @@ class CMainWindow : public QMainWindow public: CMainWindow(QWidget *parent = 0); - virtual ~CMainWindow() {} + ~CMainWindow(); QUndoStack *m_undoStack; public: @@ -71,6 +71,7 @@ private: QAction *saveAsAct; QMenu *windowMenu; QSignalMapper *windowMapper; + QSignalMapper *m_UXTMapper; // config QMap initialize_settings; QList filters; @@ -90,12 +91,14 @@ private Q_SLOTS: void setActiveSubWindow(QWidget *window); void updateWindowsList(); void mergeSingleFile(); + void onUxtMapped( QString lang ); private: void openWorkFile(QString file); void updateToolbar(QMdiSubWindow *window); bool verifySettings(); void readSettings(); + void removeMenus(); void createMenus(); void createToolbar(); void initializeSettings(bool georges); @@ -105,6 +108,9 @@ private: CEditorWorksheet *getEditorByWorksheetType(const QString &type); bool isWorksheetEditor(QString filename); bool isPhraseEditor(QString filename); + + + QMenu *menu; }; class CCoreListener : public Core::ICoreListener diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.ui b/code/studio/src/plugins/translation_manager/translation_manager_main_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_main_window.ui rename to code/studio/src/plugins/translation_manager/translation_manager_main_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp b/code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp similarity index 96% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp rename to code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp index 20359ccbd..3fafc7510 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.cpp +++ b/code/studio/src/plugins/translation_manager/translation_manager_plugin.cpp @@ -48,6 +48,9 @@ TranslationManagerPlugin::~TranslationManagerPlugin() } qDeleteAll(_autoReleaseObjects); _autoReleaseObjects.clear(); + + delete _LibContext; + _LibContext = NULL; } bool TranslationManagerPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h b/code/studio/src/plugins/translation_manager/translation_manager_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_plugin.h rename to code/studio/src/plugins/translation_manager/translation_manager_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.cpp rename to code/studio/src/plugins/translation_manager/translation_manager_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.h rename to code/studio/src/plugins/translation_manager/translation_manager_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui b/code/studio/src/plugins/translation_manager/translation_manager_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/translation_manager_settings_page.ui rename to code/studio/src/plugins/translation_manager/translation_manager_settings_page.ui diff --git a/code/studio/src/plugins/translation_manager/uxt_editor.cpp b/code/studio/src/plugins/translation_manager/uxt_editor.cpp new file mode 100644 index 000000000..06e6f98b4 --- /dev/null +++ b/code/studio/src/plugins/translation_manager/uxt_editor.cpp @@ -0,0 +1,472 @@ +// Ryzom Core Studio - Translation Manager Plugin +// 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 "translation_manager_constants.h" +#include "uxt_editor.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "nel/misc/diff_tool.h" +#include "nel/misc/i18n.h" + +namespace +{ + +QString getLang( const QString &fn ) +{ + QString lang = fn; + int idx = lang.lastIndexOf( '/' ); + if( idx == -1 ) + return ""; + + lang = lang.mid( idx + 1 ); + idx = lang.lastIndexOf( '.' ); + if( idx == -1 ) + return ""; + + lang = lang.left( idx ); + return lang; +} + +} + +namespace TranslationManager +{ + +void markItemTranslated( QTableWidgetItem *item ) +{ + item->setBackground( QColor::fromRgb( 126, 247, 134 ) ); +} + +void markItemUntranslated( QTableWidgetItem *item ) +{ + item->setBackground( QColor::fromRgb( 247, 126, 126 ) ); +} + +class UXTEditorPvt +{ +public: + + UXTEditorPvt() + { + t = new QTableWidget(); + loadedFromWK = false; + } + + QTableWidget *t; + std::vector< STRING_MANAGER::TStringInfo > infos; + bool loadedFromWK; +}; + + +UXTEditor::UXTEditor( QMdiArea *parent ) : +CEditor( parent ) +{ + editor_type = Constants::ED_UXT; + setAttribute( Qt::WA_DeleteOnClose ); + + d_ptr = new UXTEditorPvt(); + + blockTableSignals( false ); +} + +UXTEditor::~UXTEditor() +{ + delete d_ptr; + d_ptr = NULL; +} + +void UXTEditor::open( QString filename ) +{ + std::vector< STRING_MANAGER::TStringInfo > &infos = d_ptr->infos; + QString lang = getLang( filename ); + + infos.clear(); + STRING_MANAGER::loadStringFile( filename.toUtf8().constData(), infos, false ); + + if( d_ptr->infos.size() == 0 ) + { + // The work file cannot be found, cannot proceed + if( filename.endsWith( "wk.uxt" ) ) + { + QMessageBox::critical( this, + tr( "Error opening file.." ), + tr( "There was an error opening wk.uxt" ) ); + return; + } + + int l = filename.lastIndexOf( "/" ); + if( l == -1 ) + return; + + QString fn = filename.left( l ); + fn += "/wk.uxt"; + + // The work file cannot be found, cannot proceed + STRING_MANAGER::loadStringFile( fn.toUtf8().constData(), infos, true ); + if( d_ptr->infos.size() == 0 ) + { + QMessageBox::critical( this, + tr( "Error opening Uxt file" ), + tr( "Neither the specified file nor wk.uxt could be opened." ) ); + return; + } + + d_ptr->loadedFromWK = true; + } + + blockTableSignals( true ); + + d_ptr->t->clear(); + d_ptr->t->setColumnCount( 2 ); + d_ptr->t->setRowCount( infos.size() ); + + setHeaderText( "Id", lang.toUpper() + " Text" ); + + int i = 0; + + std::vector< STRING_MANAGER::TStringInfo >::const_iterator itr = infos.begin(); + while( itr != infos.end() ) + { + const STRING_MANAGER::TStringInfo &info = *itr; + + QTableWidgetItem *name = new QTableWidgetItem( info.Identifier.c_str() ); + QTableWidgetItem *text1 = new QTableWidgetItem( info.Text.toUtf8().c_str() ); + + d_ptr->t->setItem( i, 0, name ); + d_ptr->t->setItem( i, 1, text1 ); + + if( ( info.HashValue != 0 ) && !d_ptr->loadedFromWK ) + { + markItemTranslated( name ); + markItemTranslated( text1 ); + } + else + { + markItemUntranslated( name ); + markItemUntranslated( text1 ); + } + + ++itr; + i++; + } + + d_ptr->t->resizeColumnsToContents(); + + blockTableSignals( false ); + + setWidget( d_ptr->t ); + + current_file = filename; + setWindowTitle( filename + "[*]" ); + setWindowFilePath( filename ); +} + +void UXTEditor::save() +{ + saveAs( current_file ); +} + +void UXTEditor::saveAs( QString filename ) +{ + QFile f( filename ); + if( !f.open( QIODevice::WriteOnly ) ) + return; + + QTextStream out( &f ); + + int idx = 0; + std::vector< STRING_MANAGER::TStringInfo >::const_iterator itr = d_ptr->infos.begin(); + while( itr != d_ptr->infos.end() ) + { + uint64 hash = 0; + + // If text2 is not empty we can assume the string was translated, so we store with the correct hash + // If text2 is empty, it wasn't translated so we can just use the old hash. + // Additionally, if the strings were loaded from the wk.uxt file, we use a hash of 0 so we know it was not translated + if( itr->Text2.empty() ) + { + if( d_ptr->loadedFromWK ) + hash = 0; + else + hash = itr->HashValue; + } + else + { + hash = NLMISC::CI18N::makeHash( itr->Text2 ); + } + + QString hashLine = "// HASH_VALUE "; + hashLine += QString( NLMISC::CI18N::hashToString( hash ).c_str() ).toUpper(); + hashLine += "\r\n"; + + QString idxLine = "// INDEX "; + idxLine += QString::number( idx ); + idxLine += "\r\n"; + + + QString trLine = ""; + trLine += itr->Identifier.c_str(); + trLine += "\t"; + trLine += "["; + + if( itr->Text2.empty() ) + trLine += itr->Text.toUtf8().c_str(); + else + trLine += itr->Text2.toUtf8().c_str(); + + trLine += "]"; + trLine += "\r\n"; + + QString newLine = "\r\n"; + + out << hashLine; + out << idxLine; + out << trLine; + out << newLine; + + ++itr; + idx++; + } + + f.close(); + + setWindowModified( false ); +} + +void UXTEditor::activateWindow() +{ + showMaximized(); +} + + +void UXTEditor::insertRow() +{ + blockTableSignals( true ); + + d_ptr->infos.push_back( STRING_MANAGER::TStringInfo() ); + d_ptr->t->setRowCount( d_ptr->t->rowCount() + 1 ); + int row = d_ptr->t->rowCount() - 1; + + QTableWidgetItem *item1 = new QTableWidgetItem(); + QTableWidgetItem *item2 = new QTableWidgetItem(); + d_ptr->t->setItem( row, 0, item1 ); + d_ptr->t->setItem( row, 1, item2 ); + + markRowUntranslated( row ); + + setWindowModified( true ); + + blockTableSignals( false ); +} + + +void UXTEditor::deleteRow() +{ + int r = d_ptr->t->currentRow(); + if( r < 0 ) + return; + + int answer = QMessageBox::question( this, + tr( "Deleting a row" ), + tr( "Are you sure you want to delete this row?" ), + QMessageBox::Yes, + QMessageBox::Cancel ); + if( QMessageBox::Yes != answer ) + return; + + std::vector< STRING_MANAGER::TStringInfo >::iterator itr = d_ptr->infos.begin(); + itr += r; + d_ptr->infos.erase( itr ); + + d_ptr->t->removeRow( r ); + + setWindowModified( true ); +} + +void UXTEditor::closeEvent( QCloseEvent *e ) +{ + if( isWindowModified() ) + { + int reply = QMessageBox::question( this, + tr( "Table changed" ), + tr( "The table has changed. Would you like to save your changes?" ), + QMessageBox::Yes, + QMessageBox::No + ); + + if( reply == QMessageBox::Yes ) + save(); + + } + + e->accept(); + close(); +} + +void UXTEditor::contextMenuEvent( QContextMenuEvent *e ) +{ + QMenu *menu = new QMenu( this ); + QAction *insertAction = new QAction( "Insert row", menu ); + QAction *deleteAction = new QAction( "Delete row", menu ); + QAction *markAction = new QAction( "Mark translated", menu ); + QAction *unmarkAction = new QAction( "Mark not-translated", menu ); + QAction *saveAction = new QAction( "Save", menu ); + QAction *saveAsAction = new QAction( "Save as..", menu ); + + connect( insertAction, SIGNAL( triggered( bool ) ), this, SLOT( insertRow() ) ); + connect( deleteAction, SIGNAL( triggered( bool ) ), this, SLOT( deleteRow() ) ); + connect( markAction, SIGNAL( triggered( bool ) ), this, SLOT( markTranslated() ) ); + connect( unmarkAction, SIGNAL( triggered( bool ) ), this, SLOT( markUntranslated() ) ); + connect( saveAction, SIGNAL( triggered( bool ) ), this, SLOT( onSaveClicked() ) ); + connect( saveAsAction, SIGNAL( triggered( bool ) ), this, SLOT( onSaveAsClicked() ) ); + + menu->addAction( insertAction ); + menu->addAction( deleteAction ); + menu->addAction( markAction ); + menu->addAction( unmarkAction ); + menu->addAction( saveAction ); + menu->addAction( saveAsAction ); + menu->exec( e->globalPos() ); +} + +void UXTEditor::onCellChanged( int row, int column ) +{ + QTableWidgetItem *item = d_ptr->t->item( row, column ); + STRING_MANAGER::TStringInfo &info = d_ptr->infos[ row ]; + + if( column == 0 ) + info.Identifier = item->text().toUtf8().constData(); + else + if( column == 1 ) + info.Text2 = item->text().toUtf8().constData(); + + setWindowModified( true ); + + markRowTranslated( row ); +} + +void UXTEditor::markTranslated() +{ + int r = d_ptr->t->currentRow(); + if( r < 0 ) + return; + + STRING_MANAGER::TStringInfo &info = d_ptr->infos[ r ]; + if( !info.Text2.empty() ) + return; + + info.Text2 = info.Text; + + setWindowModified( true ); + + markRowTranslated( r ); +} + +void UXTEditor::markUntranslated() +{ + int r = d_ptr->t->currentRow(); + if( r < 0 ) + return; + + STRING_MANAGER::TStringInfo &info = d_ptr->infos[ r ]; + + info.Text2.clear(); + info.HashValue = 0; + + setWindowModified( true ); + + markRowUntranslated( r ); +} + +void UXTEditor::onSaveClicked() +{ + save(); +} + +void UXTEditor::onSaveAsClicked() +{ + QString path = current_file; + int idx = path.lastIndexOf( '/' ); + if( idx < 0 ) + path = ""; + else + path = path.left( idx + 1 ); + + QString file = QFileDialog::getSaveFileName( this, + tr( "Save Uxt as.." ), + path, + tr( "Uxt files ( *.uxt)" ) ); + + if( file.isEmpty() ) + return; + + saveAs( file ); +} + +void UXTEditor::setHeaderText( const QString &id, const QString &text ) +{ + QTableWidgetItem *h1 = new QTableWidgetItem( id ); + QTableWidgetItem *h2 = new QTableWidgetItem( text ); + h1->setTextAlignment( Qt::AlignLeft ); + h2->setTextAlignment( Qt::AlignLeft ); + d_ptr->t->setHorizontalHeaderItem( 0, h1 ); + d_ptr->t->setHorizontalHeaderItem( 1, h2 ); +} + +void UXTEditor::blockTableSignals( bool block ) +{ + if( block ) + disconnect( d_ptr->t, SIGNAL( cellChanged( int, int ) ), this, SLOT( onCellChanged( int, int ) ) ); + else + connect( d_ptr->t, SIGNAL( cellChanged( int, int ) ), this, SLOT( onCellChanged( int, int ) ) ); +} + +void UXTEditor::markRowTranslated( int row ) +{ + blockTableSignals( true ); + + QTableWidgetItem *item1 = d_ptr->t->item( row, 0 ); + QTableWidgetItem *item2 = d_ptr->t->item( row, 1 ); + markItemTranslated( item1 ); + markItemTranslated( item2 ); + + blockTableSignals( false ); +} + +void UXTEditor::markRowUntranslated( int row ) +{ + blockTableSignals( true ); + + QTableWidgetItem *item1 = d_ptr->t->item( row, 0 ); + QTableWidgetItem *item2 = d_ptr->t->item( row, 1 ); + markItemUntranslated( item1 ); + markItemUntranslated( item2 ); + + blockTableSignals( false ); +} + +} diff --git a/code/studio/src/plugins/translation_manager/uxt_editor.h b/code/studio/src/plugins/translation_manager/uxt_editor.h new file mode 100644 index 000000000..b749e65e3 --- /dev/null +++ b/code/studio/src/plugins/translation_manager/uxt_editor.h @@ -0,0 +1,67 @@ +// Ryzom Core Studio - Translation Manager Plugin +// 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 UXT_EDITOR_H +#define UXT_EDITOR_H + +#include "translation_manager_editor.h" + +namespace TranslationManager +{ + +class UXTEditorPvt; + +class UXTEditor : public CEditor +{ + Q_OBJECT +public: + UXTEditor( QMdiArea *parent = NULL ); + ~UXTEditor(); + + void open( QString filename ); + void save(); + void saveAs( QString filename ); + void activateWindow(); + +public Q_SLOTS: + void insertRow(); + void deleteRow(); + +protected: + void closeEvent( QCloseEvent *e ); + void contextMenuEvent( QContextMenuEvent *e ); + +private Q_SLOTS: + void onCellChanged( int row, int column ); + void markTranslated(); + void markUntranslated(); + void onSaveClicked(); + void onSaveAsClicked(); + +private: + void setHeaderText( const QString &id, const QString &text ); + void blockTableSignals( bool block = false ); + void markRowTranslated( int row ); + void markRowUntranslated( int row ); + + UXTEditorPvt *d_ptr; +}; + +} + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt b/code/studio/src/plugins/world_editor/CMakeLists.txt similarity index 64% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt rename to code/studio/src/plugins/world_editor/CMakeLists.txt index 150cc4c4f..441ff5d02 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/CMakeLists.txt +++ b/code/studio/src/plugins/world_editor/CMakeLists.txt @@ -20,12 +20,15 @@ SET(OVQT_PLUGIN_WORLD_EDITOR_HDR world_editor_plugin.h project_settings_dialog.h property_editor_widget.h world_editor_settings_page.h + const_string_array_property.h + const_string_array_editor.h ) SET(OVQT_PLUGIN_WORLD_EDITOR_UIS world_editor_window.ui project_settings_dialog.ui property_editor_widget.ui world_editor_settings_page.ui + const_string_array_editor.ui ) SET(OVQT_PLUGIN_WORLD_EDITOR_RCS world_editor.qrc) @@ -43,41 +46,42 @@ SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${OVQT_PLUGIN_WORLD_EDITOR_MOC_SRC} OVQT SOURCE_GROUP("World Editor Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_world_editor MODULE ${SRC} +ADD_LIBRARY(studio_plugin_world_editor MODULE ${SRC} ${OVQT_PLUGIN_WORLD_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS} ${OVQT_PLUGIN_WORLD_EDITOR_RC_SRCS}) -TARGET_LINK_LIBRARIES( ovqt_plugin_world_editor - ovqt_plugin_core - ovqt_plugin_landscape_editor +TARGET_LINK_LIBRARIES( studio_plugin_world_editor + studio_plugin_core + studio_plugin_landscape_editor nelmisc nel3d qt_property_browser ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} + ${LIBXML2_LIBRARIES} ) -NL_DEFAULT_PROPS(ovqt_plugin_world_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: World Editor") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_world_editor) -NL_ADD_LIB_SUFFIX(ovqt_plugin_world_editor) +NL_DEFAULT_PROPS(studio_plugin_world_editor "Tools: Studio Plugin: World Editor") +NL_ADD_RUNTIME_FLAGS(studio_plugin_world_editor) +NL_ADD_LIB_SUFFIX(studio_plugin_world_editor) ADD_DEFINITIONS(-DWORLD_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_world_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_world_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_world_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/studio/src/plugins/world_editor/const_string_array_editor.cpp b/code/studio/src/plugins/world_editor/const_string_array_editor.cpp new file mode 100644 index 000000000..1f9907646 --- /dev/null +++ b/code/studio/src/plugins/world_editor/const_string_array_editor.cpp @@ -0,0 +1,106 @@ +// Ryzom Core Studio World Editor plugin +// 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 "const_string_array_editor.h" + +ConstStrArrEditDialog::ConstStrArrEditDialog( QDialog *parent ) : +QDialog( parent ) +{ + setupUi( this ); + setupConnections(); +} + +ConstStrArrEditDialog::~ConstStrArrEditDialog() +{ +} + +void ConstStrArrEditDialog::setStrings( const QStringList &strings ) +{ + cb->clear(); + + QStringListIterator itr( strings ); + while( itr.hasNext() ) + { + cb->addItem( itr.next() ); + } + + cb->setCurrentIndex( 0 ); +} + +void ConstStrArrEditDialog::setValue( const QString &value ) +{ + listWidget->clear(); + + if( value.isEmpty() ) + return; + + QStringList l = value.split( '\n' ); + + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + listWidget->addItem( itr.next() ); + } +} + +QString ConstStrArrEditDialog::getValue() const +{ + QString value; + + for( int i = 0; i < listWidget->count(); i++ ) + { + QListWidgetItem *item = listWidget->item( i ); + value += item->text(); + + if( i < ( listWidget->count() - 1 ) ) + value += '\n'; + } + + return value; +} + +void ConstStrArrEditDialog::accept() +{ + QDialog::accept(); +} + +void ConstStrArrEditDialog::reject() +{ + QDialog::reject(); +} + +void ConstStrArrEditDialog::onAddClicked() +{ + listWidget->addItem( cb->currentText() ); +} + +void ConstStrArrEditDialog::onRemoveClicked() +{ + QListWidgetItem *item = listWidget->currentItem(); + if( item == NULL ) + return; + + delete item; +} + +void ConstStrArrEditDialog::setupConnections() +{ + connect( addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddClicked() ) ); + connect( removeButton, SIGNAL( clicked( bool ) ), this, SLOT( onRemoveClicked() ) ); +} + + diff --git a/code/studio/src/plugins/world_editor/const_string_array_editor.h b/code/studio/src/plugins/world_editor/const_string_array_editor.h new file mode 100644 index 000000000..a2c458e7c --- /dev/null +++ b/code/studio/src/plugins/world_editor/const_string_array_editor.h @@ -0,0 +1,50 @@ +// Ryzom Core Studio World Editor plugin +// 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 CONST_STR_ARR_EDIT_DLG +#define CONST_STR_ARR_EDIT_DLG + +#include "ui_const_string_array_editor.h" +#include + +class ConstStrArrEditDialog : public QDialog, public Ui::ConstStrArrEditorDialog +{ + Q_OBJECT +public: + ConstStrArrEditDialog( QDialog *parent = NULL ); + ~ConstStrArrEditDialog(); + + void setStrings( const QStringList &strings ); + void setValue( const QString &value ); + QString getValue() const; + +public Q_SLOTS: + void accept(); + void reject(); + +private Q_SLOTS: + void onAddClicked(); + void onRemoveClicked(); + +private: + void setupConnections(); +}; + + +#endif + + diff --git a/code/studio/src/plugins/world_editor/const_string_array_editor.ui b/code/studio/src/plugins/world_editor/const_string_array_editor.ui new file mode 100644 index 000000000..6aec02352 --- /dev/null +++ b/code/studio/src/plugins/world_editor/const_string_array_editor.ui @@ -0,0 +1,130 @@ + + + ConstStrArrEditorDialog + + + + 0 + 0 + 392 + 293 + + + + Dialog + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Add + + + + + + + + 0 + 0 + + + + Remove + + + + + + + + + + 6 + + + 0 + + + + + Qt::Horizontal + + + + 131 + 31 + + + + + + + + OK + + + + + + + Cancel + + + + + + + + + + + okButton + clicked() + ConstStrArrEditorDialog + accept() + + + 278 + 253 + + + 96 + 254 + + + + + cancelButton + clicked() + ConstStrArrEditorDialog + reject() + + + 369 + 253 + + + 179 + 282 + + + + + diff --git a/code/studio/src/plugins/world_editor/const_string_array_property.cpp b/code/studio/src/plugins/world_editor/const_string_array_property.cpp new file mode 100644 index 000000000..5ef7566d8 --- /dev/null +++ b/code/studio/src/plugins/world_editor/const_string_array_property.cpp @@ -0,0 +1,363 @@ +// Ryzom Core Studio World Editor plugin +// 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 "const_string_array_property.h" +#include "const_string_array_editor.h" +#include +#include +#include +#include +#include + + +////////////////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// + + +struct ConstStrArrPropMgrPriv +{ + QMap< const QtProperty*, QString > values; +}; + +ConstStrArrPropMgr::ConstStrArrPropMgr( QObject *parent ) : +QtAbstractPropertyManager( parent ) +{ + d_ptr = new ConstStrArrPropMgrPriv(); +} + +ConstStrArrPropMgr::~ConstStrArrPropMgr() +{ + delete d_ptr; + d_ptr = NULL; +} + +QString ConstStrArrPropMgr::value( const QtProperty *p ) const +{ + return valueText( p ); +} + +void ConstStrArrPropMgr::setValue( QtProperty *p, const QString &value ) +{ + if( !d_ptr->values.contains( p ) ) + return; + + if( d_ptr->values[ p ] == value ) + return; + + d_ptr->values[ p ] = value; + + Q_EMIT propertyChanged( p ); + Q_EMIT valueChanged( p, value ); +} + +void ConstStrArrPropMgr::setStrings( QtProperty *p, const QStringList &strings ) +{ + Q_EMIT stringsChanged( p, strings ); +} + +bool ConstStrArrPropMgr::hasValue( const QtProperty *p ) const +{ + return d_ptr->values.contains( p ); +} + +QString ConstStrArrPropMgr::valueText( const QtProperty *p ) const +{ + if( !d_ptr->values.contains( p ) ) + return ""; + + return d_ptr->values[ p ]; +} + +void ConstStrArrPropMgr::initializeProperty( QtProperty *p ) +{ + if( d_ptr->values.contains( p ) ) + return; + + d_ptr->values[ p ] = ""; +} + +void ConstStrArrPropMgr::uninitializeProperty( QtProperty *p ) +{ + d_ptr->values.remove( p ); +} + + + +//////////////////////////////////////////////////////////////////// Factory /////////////////////////////////////////////////////////////////////// + + + +struct ConstStrArrEditorFactoryPriv +{ + QMap< QtProperty*, QList< ConstStrArrEditor* > > createdEditors; + QMap< ConstStrArrEditor*, QtProperty* > editorToProperty; + QMap< QtProperty*, QStringList > strings; + + ~ConstStrArrEditorFactoryPriv() + { + createdEditors.clear(); + + QMap< ConstStrArrEditor*, QtProperty* >::iterator itr = editorToProperty.begin(); + while( itr != editorToProperty.end() ) + { + delete itr.key(); + ++itr; + } + editorToProperty.clear(); + } + + void addEditor( QtProperty *p, ConstStrArrEditor *editor ) + { + QMap< QtProperty*, QList< ConstStrArrEditor* > >::iterator itr = createdEditors.find( p ); + + if( itr != createdEditors.end() ) + { + itr->push_back( editor ); + } + else + { + QList< ConstStrArrEditor* > l; + l.push_back( editor ); + createdEditors.insert( p, l ); + } + + editorToProperty.insert( editor, p ); + } + + void removeEditor( QObject *o ) + { + // Remove from editorToProperty first + QMap< ConstStrArrEditor*, QtProperty* >::iterator itr1 = editorToProperty.begin(); + while( itr1 != editorToProperty.end() ) + { + if( itr1.key() == o ) + break; + + ++itr1; + } + if( itr1 != editorToProperty.end() ) + editorToProperty.erase( itr1 ); + + // Then from createdEditors + QMap< QtProperty*, QList< ConstStrArrEditor* > >::iterator itr2 = createdEditors.begin(); + while( itr2 != createdEditors.end() ) + { + QList< ConstStrArrEditor* > &l = *itr2; + QList< ConstStrArrEditor* >::iterator itr = l.begin(); + while( itr != l.end() ) + { + if( *itr == o ) + { + QList< ConstStrArrEditor* >::iterator d = itr; + ++itr; + l.erase( d ); + continue; + } + + ++itr; + } + + ++itr2; + } + } + +}; + +ConstStrArrEditorFactory::ConstStrArrEditorFactory( QObject *parent ) : +QtAbstractEditorFactory( parent ) +{ + d_ptr = new ConstStrArrEditorFactoryPriv(); +} + +ConstStrArrEditorFactory::~ConstStrArrEditorFactory() +{ + delete d_ptr; + d_ptr = NULL; +} + +void ConstStrArrEditorFactory::connectPropertyManager( ConstStrArrPropMgr *manager ) +{ + connect( manager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), this, SLOT( onPropertyChanged( QtProperty*, const QString& ) ) ); + connect( manager, SIGNAL( stringsChanged( QtProperty*, const QStringList& ) ), this, SLOT( onStringsChanged( QtProperty*, const QStringList & ) ) ); +} + +void ConstStrArrEditorFactory::disconnectPropertyManager( ConstStrArrPropMgr *manager ) +{ + disconnect( manager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), this, SLOT( onPropertyChanged( QtProperty*, const QString& ) ) ); + disconnect( manager, SIGNAL( stringsChanged( const QStringList& ) ), this, SLOT( onStringsChanged( const QStringList & ) ) ); +} + +QWidget* ConstStrArrEditorFactory::createEditor( ConstStrArrPropMgr *manager, QtProperty *p, QWidget *parent ) +{ + ConstStrArrEditor *editor = new ConstStrArrEditor( parent ); + editor->setValue( manager->value( p ) ); + + QMap< QtProperty*, QStringList >::iterator itr = d_ptr->strings.find( p ); + if( itr != d_ptr->strings.end() ) + { + editor->setStrings( *itr ); + } + + connect( editor, SIGNAL( valueChanged( const QString& ) ), this, SLOT( onSetValue( const QString& ) ) ); + connect( editor, SIGNAL( destroyed( QObject* ) ), this, SLOT( onEditorDestroyed( QObject* ) ) ); + + d_ptr->addEditor( p, editor ); + + return editor; +} + +void ConstStrArrEditorFactory::onPropertyChanged( QtProperty *p, const QString &value ) +{ + QMap< QtProperty*, QList< ConstStrArrEditor* > >::iterator itr = d_ptr->createdEditors.find( p ); + if( itr == d_ptr->createdEditors.end() ) + return; + + QList< ConstStrArrEditor* > &l = *itr; + QList< ConstStrArrEditor* >::iterator i = l.begin(); + while( i != l.end() ) + { + ConstStrArrEditor *editor = *i; + + editor->blockSignals( true ); + editor->setValue( value ); + editor->blockSignals( false ); + + ++i; + } +} + +void ConstStrArrEditorFactory::onStringsChanged( QtProperty *p, const QStringList &strings ) +{ + if( p == NULL ) + return; + + d_ptr->strings[ p ] = strings; +} + +void ConstStrArrEditorFactory::onSetValue( const QString &value ) +{ + QObject *s = sender(); + ConstStrArrEditor *editor = qobject_cast< ConstStrArrEditor* >( s ); + if( editor == NULL ) + return; + + QMap< ConstStrArrEditor*, QtProperty* >::iterator itr = d_ptr->editorToProperty.find( editor ); + if( itr == d_ptr->editorToProperty.end() ) + return; + + QtProperty *p = *itr; + + ConstStrArrPropMgr *manager = qobject_cast< ConstStrArrPropMgr* >( p->propertyManager() ); + if( manager == NULL ) + return; + + blockSignals( true ); + manager->setValue( p, value ); + blockSignals( false ); +} + +void ConstStrArrEditorFactory::onEditorDestroyed( QObject *editor ) +{ + d_ptr->removeEditor( editor ); +} + + + +//////////////////////////////////////////////////////////////////////// Editor ////////////////////////////////////////////////////////////////// + +ConstStrArrEditor::ConstStrArrEditor( QWidget *parent ) : +QWidget( parent ) +{ + setupUi(); + setupConnections(); +} + +ConstStrArrEditor::~ConstStrArrEditor() +{ +} + +void ConstStrArrEditor::setStrings( const QStringList &strings ) +{ + this->strings.clear(); + + QStringListIterator itr( strings ); + while( itr.hasNext() ) + { + this->strings.push_back( itr.next() ); + } +} + +void ConstStrArrEditor::setValue( const QString &value ) +{ + if( lineEdit->text() == value ) + return; + + disableConnections(); + lineEdit->setText( value ); + setupConnections(); +} + +void ConstStrArrEditor::showEvent( QShowEvent *e ) +{ + QWidget::showEvent( e ); +} + +void ConstStrArrEditor::onToolButtonClicked() +{ + ConstStrArrEditDialog d; + d.setStrings( strings ); + d.setValue( lineEdit->text() ); + int result = d.exec(); + if( QDialog::Accepted != result ) + return; + lineEdit->setText( d.getValue() ); +} + +void ConstStrArrEditor::onTextChanged( const QString &text ) +{ + Q_EMIT valueChanged( text ); +} + +void ConstStrArrEditor::setupConnections() +{ + connect( toolButton, SIGNAL( clicked( bool ) ), this, SLOT( onToolButtonClicked() ) ); + connect( lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); +} + +void ConstStrArrEditor::disableConnections() +{ + disconnect( toolButton, SIGNAL( clicked( bool ) ), this, SLOT( onToolButtonClicked() ) ); + disconnect( lineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); +} + +void ConstStrArrEditor::setupUi() +{ + lineEdit = new QLineEdit(); + toolButton = new QToolButton(); + toolButton->setText( "..." ); + + QHBoxLayout *lt = new QHBoxLayout( this ); + lt->setContentsMargins( 0, 0, 0, 0 ); + lt->setSpacing( 0 ); + lt->addWidget( lineEdit ); + lt->addWidget( toolButton ); + + setFocusProxy( lineEdit ); + setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Fixed ); + +} + + diff --git a/code/studio/src/plugins/world_editor/const_string_array_property.h b/code/studio/src/plugins/world_editor/const_string_array_property.h new file mode 100644 index 000000000..a079f4802 --- /dev/null +++ b/code/studio/src/plugins/world_editor/const_string_array_property.h @@ -0,0 +1,131 @@ +// Ryzom Core Studio World Editor plugin +// 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 CONST_STR_ARR_PROP_H +#define CONST_STR_ARR_PROP_H + +#define QT_QTPROPERTYBROWSER_IMPORT + +#include "3rdparty/qtpropertybrowser/qtpropertybrowser.h" +#include +#include + +/////////////////////////////////////////////////////// Manager /////////////////////////////////////////////////////////////////////////// + +struct ConstStrArrPropMgrPriv; + +class ConstStrArrPropMgr : public QtAbstractPropertyManager +{ + Q_OBJECT + +public: + ConstStrArrPropMgr( QObject *parent = NULL ); + ~ConstStrArrPropMgr(); + + QString value( const QtProperty *p ) const; + +public Q_SLOTS: + void setValue( QtProperty *p, const QString &value ); + void setStrings( QtProperty *p, const QStringList &strings ); + +Q_SIGNALS: + void valueChanged( QtProperty *p, const QString &value ); + void stringsChanged( QtProperty *p, const QStringList &strings ); + +protected: + bool hasValue( const QtProperty *p ) const; + QString valueText( const QtProperty *p ) const; + void initializeProperty( QtProperty *p ); + void uninitializeProperty( QtProperty *p ); + +private: + ConstStrArrPropMgrPriv *d_ptr; + + Q_DISABLE_COPY( ConstStrArrPropMgr ); +}; + + +////////////////////////////////////////////////////////////////// Factory ///////////////////////////////////////////////////////////////////////// + +struct ConstStrArrEditorFactoryPriv; + +class ConstStrArrEditorFactory : public QtAbstractEditorFactory< ConstStrArrPropMgr > +{ + Q_OBJECT + +public: + ConstStrArrEditorFactory( QObject *parent = NULL ); + ~ConstStrArrEditorFactory(); + +protected: + void connectPropertyManager( ConstStrArrPropMgr *manager ); + void disconnectPropertyManager( ConstStrArrPropMgr *manager ); + + QWidget* createEditor( ConstStrArrPropMgr *manager, QtProperty *p, QWidget *parent ); + +private Q_SLOTS: + void onPropertyChanged( QtProperty *p, const QString &value ); + void onStringsChanged( QtProperty *p, const QStringList &strings ); + void onSetValue( const QString &value ); + void onEditorDestroyed( QObject *editor ); + +private: + ConstStrArrEditorFactoryPriv *d_ptr; + + Q_DISABLE_COPY( ConstStrArrEditorFactory ); +}; + + +///////////////////////////////////////////////////////////////// Editor /////////////////////////////////////////////////////////////////////////// + +class QLineEdit; +class QToolButton; + +class ConstStrArrEditor : public QWidget +{ + Q_OBJECT +public: + ConstStrArrEditor( QWidget *parent = NULL ); + ~ConstStrArrEditor(); + void setStrings( const QStringList &strings ); + +public Q_SLOTS: + void setValue( const QString &value ); + +protected: + void showEvent( QShowEvent *e ); + +private Q_SLOTS: + void onToolButtonClicked(); + void onTextChanged( const QString &text ); + +Q_SIGNALS: + void valueChanged( const QString &value ); + +private: + void setupUi(); + void setupConnections(); + void disableConnections(); + + + QLineEdit *lineEdit; + QToolButton *toolButton; + QStringList strings; +}; + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_move.png b/code/studio/src/plugins/world_editor/icons/ic_nel_move.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_move.png rename to code/studio/src/plugins/world_editor/icons/ic_nel_move.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_rotate.png b/code/studio/src/plugins/world_editor/icons/ic_nel_rotate.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_rotate.png rename to code/studio/src/plugins/world_editor/icons/ic_nel_rotate.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_scale.png b/code/studio/src/plugins/world_editor/icons/ic_nel_scale.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_scale.png rename to code/studio/src/plugins/world_editor/icons/ic_nel_scale.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_select.png b/code/studio/src/plugins/world_editor/icons/ic_nel_select.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_select.png rename to code/studio/src/plugins/world_editor/icons/ic_nel_select.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_turn.png b/code/studio/src/plugins/world_editor/icons/ic_nel_turn.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_turn.png rename to code/studio/src/plugins/world_editor/icons/ic_nel_turn.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_world_editor.png b/code/studio/src/plugins/world_editor/icons/ic_nel_world_editor.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/icons/ic_nel_world_editor.png rename to code/studio/src/plugins/world_editor/icons/ic_nel_world_editor.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitive_item.cpp b/code/studio/src/plugins/world_editor/primitive_item.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitive_item.cpp rename to code/studio/src/plugins/world_editor/primitive_item.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitive_item.h b/code/studio/src/plugins/world_editor/primitive_item.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitive_item.h rename to code/studio/src/plugins/world_editor/primitive_item.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_model.cpp b/code/studio/src/plugins/world_editor/primitives_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_model.cpp rename to code/studio/src/plugins/world_editor/primitives_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_model.h b/code/studio/src/plugins/world_editor/primitives_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_model.h rename to code/studio/src/plugins/world_editor/primitives_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_view.cpp b/code/studio/src/plugins/world_editor/primitives_view.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_view.cpp rename to code/studio/src/plugins/world_editor/primitives_view.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_view.h b/code/studio/src/plugins/world_editor/primitives_view.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/primitives_view.h rename to code/studio/src/plugins/world_editor/primitives_view.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/project_settings_dialog.cpp b/code/studio/src/plugins/world_editor/project_settings_dialog.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/project_settings_dialog.cpp rename to code/studio/src/plugins/world_editor/project_settings_dialog.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/project_settings_dialog.h b/code/studio/src/plugins/world_editor/project_settings_dialog.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/project_settings_dialog.h rename to code/studio/src/plugins/world_editor/project_settings_dialog.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/project_settings_dialog.ui b/code/studio/src/plugins/world_editor/project_settings_dialog.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/project_settings_dialog.ui rename to code/studio/src/plugins/world_editor/project_settings_dialog.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp b/code/studio/src/plugins/world_editor/property_editor_widget.cpp similarity index 65% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp rename to code/studio/src/plugins/world_editor/property_editor_widget.cpp index 6d3fdaec1..9c24c8452 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp +++ b/code/studio/src/plugins/world_editor/property_editor_widget.cpp @@ -28,10 +28,48 @@ // Qt includes #include +#include + +#include "const_string_array_property.h" namespace WorldEditor { +struct PropertyEditorWidgetPrivate +{ + QMap< QtProperty*, NLLIGO::IPrimitive* > propToPrim; + + void clearPrimitives() + { + propToPrim.clear(); + } + + void addPrimitive( QtProperty *p, NLLIGO::IPrimitive *prim ) + { + QMap< QtProperty*, NLLIGO::IPrimitive* >::const_iterator itr + = propToPrim.find( p ); + if( itr != propToPrim.end() ) + return; + + propToPrim[ p ] = prim; + } + + NLLIGO::IPrimitive* getPrimitive( QtProperty *p ) + { + NLLIGO::IPrimitive *prim = NULL; + + QMap< QtProperty*, NLLIGO::IPrimitive* >::const_iterator itr + = propToPrim.find( p ); + + if( itr != propToPrim.end() ) + { + prim = itr.value(); + } + + return prim; + } +}; + PropertyEditorWidget::PropertyEditorWidget(QWidget *parent) : QWidget(parent) { @@ -42,6 +80,9 @@ PropertyEditorWidget::PropertyEditorWidget(QWidget *parent) m_enumManager = new QtEnumPropertyManager(this); m_stringArrayManager = new QtTextPropertyManager(this); + m_constStrArrPropMgr = new ConstStrArrPropMgr(this); + m_constStrArrEditorFactory = new ConstStrArrEditorFactory(this); + QtLineEditFactory *lineEditFactory = new QtLineEditFactory(this); QtCheckBoxFactory *boolFactory = new QtCheckBoxFactory(this); QtEnumEditorFactory *enumFactory = new QtEnumEditorFactory(this); @@ -51,13 +92,17 @@ PropertyEditorWidget::PropertyEditorWidget(QWidget *parent) m_ui.treePropertyBrowser->setFactoryForManager(m_boolManager, boolFactory); m_ui.treePropertyBrowser->setFactoryForManager(m_enumManager, enumFactory); m_ui.treePropertyBrowser->setFactoryForManager(m_stringArrayManager, textFactory); + m_ui.treePropertyBrowser->setFactoryForManager(m_constStrArrPropMgr, m_constStrArrEditorFactory); m_groupManager = new QtGroupPropertyManager(this); + d_ptr = new PropertyEditorWidgetPrivate(); + connect(m_stringManager, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); connect(m_boolManager, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); connect(m_enumManager, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); connect(m_stringArrayManager, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); + connect(m_constStrArrPropMgr, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); connect(m_boolManager, SIGNAL(resetProperty(QtProperty *)), this, SLOT(resetProperty(QtProperty *))); connect(m_stringManager, SIGNAL(resetProperty(QtProperty *)), this, SLOT(resetProperty(QtProperty *))); @@ -67,10 +112,13 @@ PropertyEditorWidget::PropertyEditorWidget(QWidget *parent) PropertyEditorWidget::~PropertyEditorWidget() { + delete d_ptr; + d_ptr = NULL; } void PropertyEditorWidget::clearProperties() { + d_ptr->clearPrimitives(); m_ui.treePropertyBrowser->clear(); } @@ -163,6 +211,8 @@ void PropertyEditorWidget::updateSelection(Node *node) else prop = addBoolProperty(ligoProperty, parameter, primitive); + d_ptr->addPrimitive( prop, const_cast< NLLIGO::IPrimitive* >( primitive ) ); + // Default value ? if ((ligoProperty == NULL) || (ligoProperty->Default)) prop->setModified(false); @@ -188,9 +238,9 @@ void PropertyEditorWidget::updateSelection(Node *node) blockSignalsOfProperties(false); } -void PropertyEditorWidget::propertyChanged(QtProperty *property) +void PropertyEditorWidget::propertyChanged(QtProperty *p) { - nlinfo(QString("property %1 changed").arg(property->propertyName()).toUtf8().constData()); + nlinfo(QString("property %1 changed").arg(p->propertyName()).toUtf8().constData()); } void PropertyEditorWidget::resetProperty(QtProperty *property) @@ -198,6 +248,115 @@ void PropertyEditorWidget::resetProperty(QtProperty *property) nlinfo(QString("property %1 reset").arg(property->propertyName()).toUtf8().constData()); } +NLLIGO::IProperty* PropertyEditorWidget::getLigoProperty( QtProperty *p ) +{ + NLLIGO::IPrimitive *prim = d_ptr->getPrimitive( p ); + if( prim == NULL ) + { + return NULL; + } + + NLLIGO::IProperty *prop = NULL; + prim->getPropertyByName( p->propertyName().toUtf8().constData(), prop ); + if( prop == NULL ) + { + return NULL; + } + + return prop; +} + +void PropertyEditorWidget::onBoolValueChanged( QtProperty *p, bool v ) +{ + NLLIGO::IProperty *prop = getLigoProperty( p ); + if( prop == NULL ) + return; + + NLLIGO::CPropertyString *pp = dynamic_cast< NLLIGO::CPropertyString* >( prop ); + if( pp == NULL ) + return; + + if( v ) + pp->String = "true"; + else + pp->String = "false"; + + pp->Default = false; +} + +void PropertyEditorWidget::onStringValueChanged( QtProperty *p, const QString &v ) +{ + NLLIGO::IProperty *prop = getLigoProperty( p ); + if( prop == NULL ) + return; + + NLLIGO::CPropertyString *pp = dynamic_cast< NLLIGO::CPropertyString* >( prop ); + if( pp == NULL ) + return; + + pp->String = v.toUtf8().constData(); + pp->Default = false; +} + +void PropertyEditorWidget::onEnumValueChanged( QtProperty *p, int v ) +{ + NLLIGO::IProperty *prop = getLigoProperty( p ); + if( prop == NULL ) + return; + + NLLIGO::CPropertyString *pp = dynamic_cast< NLLIGO::CPropertyString* >( prop ); + if( pp == NULL ) + return; + + pp->String = p->valueText().toUtf8().constData(); + pp->Default = false; +} + +void PropertyEditorWidget::onStrArrValueChanged( QtProperty *p, const QString &v ) +{ + NLLIGO::IProperty *prop = getLigoProperty( p ); + if( prop == NULL ) + return; + + NLLIGO::CPropertyStringArray *pp = dynamic_cast< NLLIGO::CPropertyStringArray* >( prop ); + if( pp == NULL ) + return; + + pp->StringArray.clear(); + + QStringList l = v.split( '\n' ); + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + pp->StringArray.push_back( itr.next().toUtf8().constData() ); + } + + pp->Default = false; +} + +void PropertyEditorWidget::onConstStrArrValueChanged( QtProperty *p, const QString &v ) +{ + NLLIGO::IProperty *prop = getLigoProperty( p ); + if( prop == NULL ) + return; + + NLLIGO::CPropertyStringArray *pp = dynamic_cast< NLLIGO::CPropertyStringArray* >( prop ); + if( pp == NULL ) + return; + + pp->StringArray.clear(); + + QStringList l = v.split( '\n' ); + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + pp->StringArray.push_back( itr.next().toUtf8().constData() ); + } + + pp->Default = false; +} + + QtProperty *PropertyEditorWidget::addBoolProperty(const NLLIGO::IProperty *property, const NLLIGO::CPrimitiveClass::CParameter ¶meter, const NLLIGO::IPrimitive *primitive) @@ -326,62 +485,47 @@ QtProperty *PropertyEditorWidget::addConstStringArrayProperty(const NLLIGO::IPro primitive->getPropertyByName(name.c_str(), value); // Create qt property -// QtProperty *prop = m_enumManager->addProperty(parameter.Name.c_str()); - QtProperty *prop = m_stringArrayManager->addProperty(parameter.Name.c_str()); + QtProperty *prop = m_constStrArrPropMgr->addProperty(parameter.Name.c_str()); QStringList listEnums = getComboValues(parameter); if (listEnums.isEmpty()) { -// listEnums << QString(value.c_str()) + tr(" (WRN: Check leveldesign!)"); -// m_enumManager->setEnumNames(prop, listEnums); -// m_enumManager->setValue(prop, 0); prop->setEnabled(false); } else { // Fill qt property - m_enumManager->setEnumNames(prop, listEnums); + m_constStrArrPropMgr->setStrings(prop, listEnums); - // Find index of current value - //for (int i = 0; i < listEnums.size(); i++) - //{ - // if (value == std::string(listEnums[i].toUtf8().constData())) - // { - // m_enumManager->setValue(prop, i); - // break; - // } - //} - - const NLLIGO::IProperty *ligoProperty; - std::vector vectString; + const NLLIGO::IProperty *ligoProperty; + std::vector vectString; - if (primitive->getPropertyByName (parameter.Name.c_str(), ligoProperty)) - { - const NLLIGO::CPropertyStringArray *const propStringArray = dynamic_cast (ligoProperty); - if (propStringArray) + if (primitive->getPropertyByName (parameter.Name.c_str(), ligoProperty)) { - const std::vector &vectString = propStringArray->StringArray; - if (!vectString.empty()) + const NLLIGO::CPropertyStringArray *const propStringArray = dynamic_cast (ligoProperty); + if (propStringArray) { - std::string temp; - for (size_t i = 0; i < vectString.size(); i++) + const std::vector &vectString = propStringArray->StringArray; + if (!vectString.empty()) { - temp += vectString[i]; - if (i != (vectString.size() - 1)) - temp += '\n'; + std::string temp; + for (size_t i = 0; i < vectString.size(); i++) + { + temp += vectString[i]; + if (i != (vectString.size() - 1)) + temp += '\n'; + } + m_constStrArrPropMgr->setValue(prop, temp.c_str()); + prop->setToolTip(temp.c_str()); } - m_stringArrayManager->setValue(prop, temp.c_str()); - prop->setToolTip(temp.c_str()); + } + else + { + m_constStrArrPropMgr->setValue(prop, "StringArray :("); } } - else - { - m_stringArrayManager->setValue(prop, "StringArray :("); - } - } - m_enumManager->setValue(prop, 0); } return prop; @@ -430,5 +574,44 @@ void PropertyEditorWidget::blockSignalsOfProperties(bool block) m_boolManager->blockSignals(block); m_enumManager->blockSignals(block); m_stringArrayManager->blockSignals(block); + + if( block ) + { + disconnect(m_constStrArrPropMgr, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); + + disconnect(m_boolManager, SIGNAL( valueChanged( QtProperty*, bool ) ), + this, SLOT( onBoolValueChanged( QtProperty*, bool ) ) ); + + disconnect(m_stringManager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onStringValueChanged( QtProperty*, const QString& ) ) ); + + disconnect(m_enumManager, SIGNAL( valueChanged( QtProperty*, int ) ), + this, SLOT( onEnumValueChanged( QtProperty*, int ) ) ); + + disconnect(m_stringArrayManager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onStrArrValueChanged( QtProperty*, const QString& ) ) ); + + disconnect(m_constStrArrPropMgr, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onConstStrArrValueChanged( QtProperty*, const QString& ) ) ); + } + else + { + connect(m_constStrArrPropMgr, SIGNAL(propertyChanged(QtProperty *)), this, SLOT(propertyChanged(QtProperty *))); + + connect(m_boolManager, SIGNAL( valueChanged( QtProperty*, bool ) ), + this, SLOT( onBoolValueChanged( QtProperty*, bool ) ) ); + + connect(m_stringManager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onStringValueChanged( QtProperty*, const QString& ) ) ); + + connect(m_enumManager, SIGNAL( valueChanged( QtProperty*, int ) ), + this, SLOT( onEnumValueChanged( QtProperty*, int ) ) ); + + connect(m_stringArrayManager, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onStrArrValueChanged( QtProperty*, const QString& ) ) ); + + connect(m_constStrArrPropMgr, SIGNAL( valueChanged( QtProperty*, const QString& ) ), + this, SLOT( onConstStrArrValueChanged( QtProperty*, const QString& ) ) ); + } } } /* namespace WorldEditor */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.h b/code/studio/src/plugins/world_editor/property_editor_widget.h similarity index 82% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.h rename to code/studio/src/plugins/world_editor/property_editor_widget.h index 85935cccd..dae7ad13e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.h +++ b/code/studio/src/plugins/world_editor/property_editor_widget.h @@ -33,8 +33,14 @@ // Qt includes +class ConstStrArrPropMgr; +class ConstStrArrEditorFactory; + namespace WorldEditor { + +struct PropertyEditorWidgetPrivate; + /** @class PropertyEditorWidget @brief PropertyEditorWidget @@ -54,9 +60,18 @@ public Q_SLOTS: /// Update of selections void updateSelection(Node *node); - void propertyChanged(QtProperty *property); + void propertyChanged(QtProperty *p); void resetProperty(QtProperty *property); + NLLIGO::IProperty* getLigoProperty( QtProperty *p ); + + void onBoolValueChanged( QtProperty *p, bool v ); + void onStringValueChanged( QtProperty *p, const QString &v ); + void onEnumValueChanged( QtProperty *p, int v ); + void onStrArrValueChanged( QtProperty *p, const QString &v ); + void onConstStrArrValueChanged( QtProperty *p, const QString &v ); + + private: QtProperty *addBoolProperty(const NLLIGO::IProperty *property, const NLLIGO::CPrimitiveClass::CParameter ¶meter, @@ -84,7 +99,12 @@ private: QtGroupPropertyManager *m_groupManager; QtTextPropertyManager *m_stringArrayManager; + ConstStrArrPropMgr *m_constStrArrPropMgr; + ConstStrArrEditorFactory *m_constStrArrEditorFactory; + Ui::PropertyEditorWidget m_ui; + + PropertyEditorWidgetPrivate *d_ptr; }; /* PropertyEditorWidget */ } /* namespace WorldEditor */ diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.ui b/code/studio/src/plugins/world_editor/property_editor_widget.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.ui rename to code/studio/src/plugins/world_editor/property_editor_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/ovqt_plugin_world_editor.xml b/code/studio/src/plugins/world_editor/studio_plugin_world_editor.xml similarity index 81% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/ovqt_plugin_world_editor.xml rename to code/studio/src/plugins/world_editor/studio_plugin_world_editor.xml index 13a157a7e..1b15af6a0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/ovqt_plugin_world_editor.xml +++ b/code/studio/src/plugins/world_editor/studio_plugin_world_editor.xml @@ -1,5 +1,5 @@ - ovqt_plugin_world_editor + studio_plugin_world_editor WorldEditor 0.6 GSoC2011_dnk-88 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor.qrc b/code/studio/src/plugins/world_editor/world_editor.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor.qrc rename to code/studio/src/plugins/world_editor/world_editor.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_actions.cpp b/code/studio/src/plugins/world_editor/world_editor_actions.cpp similarity index 83% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_actions.cpp rename to code/studio/src/plugins/world_editor/world_editor_actions.cpp index e10e15745..5255e976f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_actions.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_actions.cpp @@ -209,6 +209,178 @@ void CreateWorldCommand::redo() m_model->createWorldEditNode(m_fileName); } + +WorldSaver::WorldSaver( PrimitivesTreeModel *model, LandscapeEditor::ZoneBuilderBase *zoneBuilder, const std::string &dataDir, const std::string &context ) +{ + m_model = model; + m_zoneBuilder = zoneBuilder; + m_dataDir = dataDir; + m_context = context; +} + +bool WorldSaver::save() +{ + QModelIndex pidx = m_model->index( 0, 0 ); + if( !pidx.isValid() ) + { + lastError = "No root node."; + return false; + } + + int rows = m_model->rowCount( pidx ); + bool ok = false; + + for( int i = 0; i < rows; i++ ) + { + QModelIndex idx = m_model->index( i, 0, pidx ); + + Node *node = reinterpret_cast< Node* >( idx.internalPointer() ); + Node::NodeType t = node->type(); + + switch( t ) + { + case Node::LandscapeNodeType: ok = saveLandscapeNode( node ); break; + case Node::RootPrimitiveNodeType: ok = savePrimitiveNode( node ); break; + } + + if( !ok ) + return false; + } + + ok = saveWorldEditFile(); + return ok; +} + +bool WorldSaver::saveLandscapeNode( Node *node ) +{ + LandscapeNode *n = dynamic_cast< LandscapeNode* >( node ); + if( n == NULL ) + { + lastError = "Trying to save a non-landscape node as landscape."; + return false; + } + + LandscapeEditor::ZoneRegionObject *z = m_zoneBuilder->zoneRegion( n->id() ); + if( z == NULL ) + { + lastError = "The specified zoneregion doesn't exist."; + return false; + } + + z->setFileName( n->fileName().toUtf8().constData() ); + bool ok = z->save(); + + if( ok ) + { + std::pair< std::string, std::string > p; + p.first = "landscape"; + p.second = n->fileName().toUtf8().constData(); + + m_data.push_back( p ); + } + else + { + lastError = "Couldn't save landscape file " + std::string( n->fileName().toUtf8().constData() ); + } + + return ok; +} + +bool WorldSaver::savePrimitiveNode( Node *node ) +{ + RootPrimitiveNode *n = dynamic_cast< RootPrimitiveNode* >( node ); + if( n == NULL ) + { + lastError = "Trying to save a non-primitive node as primitive."; + return false; + } + + bool ok = NLLIGO::saveXmlPrimitiveFile( *(n->primitives()), n->fileName().toUtf8().constData() ); + + if( ok ) + { + std::pair< std::string, std::string > p; + p.first = "primitive"; + p.second = n->fileName().toUtf8().constData(); + + m_data.push_back( p ); + } + else + { + lastError = "Couldn't save primitive file " + std::string( n->fileName().toUtf8().constData() ); + } + + return ok; +} + +bool WorldSaver::saveWorldEditFile() +{ + QModelIndex idx = m_model->index( 0, 0 ); + Node *node = reinterpret_cast< Node* >( idx.internalPointer() ); + Node::NodeType t = node->type(); + + WorldEditNode *n = dynamic_cast< WorldEditNode* >( node ); + if( n == NULL ) + { + lastError = "Not a worldedit node."; + return false; + } + + std::string fn = n->data( 0 ).toString().toUtf8().constData(); + bool ok = writeWorldEditFile( fn ); + + return ok; +} + +bool WorldSaver::writeWorldEditFile( const std::string &fn ) +{ + if( fn.empty() ) + return false; + + NLMISC::COFile of; + if( !of.open( fn, false, true, false ) ) + { + lastError = "Couldn't open file " + fn + " for writing."; + return false; + } + + NLMISC::COXml xml; + xml.init( &of ); + + xmlNodePtr rootNode = xmlNewDocNode (xml.getDocument (), NULL, (const xmlChar*)"NEL_WORLD_EDITOR_PROJECT", NULL); + xmlDocSetRootElement (xml.getDocument (), rootNode); + xmlNodePtr node = xmlNewChild ( rootNode, NULL, (const xmlChar*)"VERSION", NULL); + xmlNodePtr text = xmlNewText ((const xmlChar *) NLMISC::toString( WORLD_EDITOR_FILE_VERSION ).c_str ()); + xmlAddChild( node, text ); + node = xmlNewChild ( rootNode, NULL, (const xmlChar*)"DATA_DIRECTORY", NULL); + xmlSetProp (node, (const xmlChar*)"VALUE", (const xmlChar*)m_dataDir.c_str ()); + node = xmlNewChild ( rootNode, NULL, (const xmlChar*)"CONTEXT", NULL); + xmlSetProp (node, (const xmlChar*)"VALUE", (const xmlChar*)m_context.c_str ()); + + std::vector< std::pair< std::string, std::string > >::const_iterator itr = m_data.begin(); + while( itr != m_data.end() ) + { + const std::pair< std::string, std::string > &p = *itr; + + node = xmlNewChild ( rootNode, NULL, (const xmlChar*)"DATABASE_ELEMENT", NULL); + xmlSetProp (node, (const xmlChar*)"FILENAME", (const xmlChar*)p.second.c_str ()); + + if( p.first == "landscape" ) + xmlSetProp (node, (const xmlChar*)"TYPE", (const xmlChar*)("landscape")); + else + xmlSetProp (node, (const xmlChar*)"TYPE", (const xmlChar*)("primitive")); + + ++itr; + } + + xml.flush(); + + of.close(); + + + return true; +} + LoadLandscapeCommand::LoadLandscapeCommand(const QString &fileName, PrimitivesTreeModel *model, LandscapeEditor::ZoneBuilderBase *zoneBuilder, QUndoCommand *parent) : QUndoCommand(parent), diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_actions.h b/code/studio/src/plugins/world_editor/world_editor_actions.h similarity index 93% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_actions.h rename to code/studio/src/plugins/world_editor/world_editor_actions.h index 89de14e9a..95ce093e2 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_actions.h +++ b/code/studio/src/plugins/world_editor/world_editor_actions.h @@ -72,6 +72,31 @@ private: PrimitivesTreeModel *const m_model; }; + +class WorldSaver +{ +public: + WorldSaver( PrimitivesTreeModel *model, LandscapeEditor::ZoneBuilderBase *zoneBuilder, const std::string &dataDir, const std::string &context ); + bool save(); + + std::string getLastError() const{ return lastError; } + +private: + bool saveLandscapeNode( Node *node ); + bool savePrimitiveNode( Node *node ); + bool saveWorldEditFile(); + bool writeWorldEditFile( const std::string &fn ); + + std::string m_dataDir; + std::string m_context; + PrimitivesTreeModel *m_model; + LandscapeEditor::ZoneBuilderBase *m_zoneBuilder; + + std::vector< std::pair< std::string, std::string > > m_data; + + std::string lastError; +}; + /** @class LoadLandscapeCommand @brief diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_constants.h b/code/studio/src/plugins/world_editor/world_editor_constants.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_constants.h rename to code/studio/src/plugins/world_editor/world_editor_constants.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_global.h b/code/studio/src/plugins/world_editor/world_editor_global.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_global.h rename to code/studio/src/plugins/world_editor/world_editor_global.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_misc.cpp b/code/studio/src/plugins/world_editor/world_editor_misc.cpp similarity index 90% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_misc.cpp rename to code/studio/src/plugins/world_editor/world_editor_misc.cpp index 7401f49fb..5d6b7f94e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_misc.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_misc.cpp @@ -34,35 +34,11 @@ namespace WorldEditor namespace Utils { -void syntaxError(const char *filename, xmlNodePtr xmlNode, const char *format, ...) -{ - char buffer[1024]; - - if (format) - { - va_list args; - va_start( args, format ); - sint ret = vsnprintf( buffer, 1024, format, args ); - va_end( args ); - } - else - { - strcpy(buffer, "Unknown error"); - } - - nlerror("(%s), node (%s), line (%s) :\n%s", filename, xmlNode->name, xmlNode->content, buffer); -} +std::string lastError; -bool getPropertyString(std::string &result, const char *filename, xmlNodePtr xmlNode, const char *propName) +std::string getLastError() { - // Call the CIXml version - if (!NLMISC::CIXml::getPropertyString(result, xmlNode, propName)) - { - // Output a formated error - syntaxError(filename, xmlNode, "Missing XML node property (%s)", propName); - return false; - } - return true; + return lastError; } uint32 getUniqueId() @@ -81,6 +57,8 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList { bool result = false; + lastError = ""; + // Load the document NLMISC::CIFile file; if (file.open(fileName)) @@ -110,20 +88,31 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList } if (version == -1) - syntaxError(fileName.c_str(), rootNode, "No version node"); + { + std::string error = "No version node in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; + } else { // Old format, if (version <= 1) { - syntaxError(fileName.c_str(), rootNode, "Old version node"); + std::string error = "Old version node in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; } else { // Read it if (version > WORLD_EDITOR_FILE_VERSION) { - syntaxError(fileName.c_str(), node, "Unknown file version"); + std::string error = "Unknown file version in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; } else { @@ -153,11 +142,12 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList { // Get the type std::string type; - if (getPropertyString(type, fileName.c_str(), node, "TYPE")) + + if ( NLMISC::CIXml::getPropertyString(type, node, "TYPE")) { // Read the filename std::string filenameChild; - if (getPropertyString(filenameChild, fileName.c_str(), node, "FILENAME")) + if ( NLMISC::CIXml::getPropertyString(filenameChild, node, "FILENAME")) { // Is it a landscape ? if (type == "landscape") @@ -179,11 +169,34 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList } } else + if ( type == "primitive" ) { worldEditList.push_back(WorldEditItem(PrimitiveType, filenameChild)); } + else + if( type.empty() ) + { + std::string error = "Empty type node property in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; + } } + else + { + std::string error = "Missing filename node property in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; + } + } + else + { + std::string error = "Missing type node property in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; } } while (node = NLMISC::CIXml::getNextChildNode(node, "DATABASE_ELEMENT")); @@ -197,18 +210,26 @@ bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList } else { - // Error - syntaxError(fileName.c_str(), rootNode, "Unknown file header : %s", rootNode->name); + std::string error = "Unknown file header in file " + fileName; + lastError = error; + nlinfo( "%s", error.c_str() ); + return false; } } } catch (NLMISC::Exception &e) { - nlerror("Error reading file %s : %s", fileName.c_str(), e.what()); + std::string error = "Error reading file " + fileName + " : " + std::string( e.what() ); + lastError = error; + nlinfo( "%s", error.c_str() ); } } else - nlerror("Can't open the file %s for reading.", fileName.c_str()); + { + std::string error = "Can't open the file " + fileName + " for reading."; + lastError = error; + nlinfo( "%s", error.c_str() ); + } return result; } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_misc.h b/code/studio/src/plugins/world_editor/world_editor_misc.h similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_misc.h rename to code/studio/src/plugins/world_editor/world_editor_misc.h index d29b2553b..36c7b1a6a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_misc.h +++ b/code/studio/src/plugins/world_editor/world_editor_misc.h @@ -49,6 +49,8 @@ typedef std::vector WorldEditList; // Generate unique identificator uint32 getUniqueId(); +std::string getLastError(); + // Load *.worldedit file and return list primitives and landscapes. bool loadWorldEditFile(const std::string &fileName, WorldEditList &worldEditList); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_plugin.cpp b/code/studio/src/plugins/world_editor/world_editor_plugin.cpp similarity index 97% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_plugin.cpp rename to code/studio/src/plugins/world_editor/world_editor_plugin.cpp index 301939cb6..3170bce60 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_plugin.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_plugin.cpp @@ -43,6 +43,9 @@ WorldEditorPlugin::~WorldEditorPlugin() } qDeleteAll(m_autoReleaseObjects); m_autoReleaseObjects.clear(); + + delete m_libContext; + m_libContext = NULL; } bool WorldEditorPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_plugin.h b/code/studio/src/plugins/world_editor/world_editor_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_plugin.h rename to code/studio/src/plugins/world_editor/world_editor_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.cpp b/code/studio/src/plugins/world_editor/world_editor_scene.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.cpp rename to code/studio/src/plugins/world_editor/world_editor_scene.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.h b/code/studio/src/plugins/world_editor/world_editor_scene.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.h rename to code/studio/src/plugins/world_editor/world_editor_scene.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene_item.cpp b/code/studio/src/plugins/world_editor/world_editor_scene_item.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene_item.cpp rename to code/studio/src/plugins/world_editor/world_editor_scene_item.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene_item.h b/code/studio/src/plugins/world_editor/world_editor_scene_item.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene_item.h rename to code/studio/src/plugins/world_editor/world_editor_scene_item.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_settings_page.cpp b/code/studio/src/plugins/world_editor/world_editor_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_settings_page.cpp rename to code/studio/src/plugins/world_editor/world_editor_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_settings_page.h b/code/studio/src/plugins/world_editor/world_editor_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_settings_page.h rename to code/studio/src/plugins/world_editor/world_editor_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_settings_page.ui b/code/studio/src/plugins/world_editor/world_editor_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_settings_page.ui rename to code/studio/src/plugins/world_editor/world_editor_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp b/code/studio/src/plugins/world_editor/world_editor_window.cpp similarity index 94% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp rename to code/studio/src/plugins/world_editor/world_editor_window.cpp index b23e62063..cec3baee1 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.cpp +++ b/code/studio/src/plugins/world_editor/world_editor_window.cpp @@ -121,6 +121,10 @@ WorldEditorWindow::~WorldEditorWindow() writeSettings(); delete m_zoneBuilderBase; + + Core::ICore::instance()->mainWindow()->statusBar()->removeWidget( m_statusInfo ); + delete m_statusInfo; + m_statusInfo = NULL; } QUndoStack *WorldEditorWindow::undoStack() const @@ -170,7 +174,12 @@ void WorldEditorWindow::loadWorldEditFile(const QString &fileName) Utils::WorldEditList worldEditList; if (!Utils::loadWorldEditFile(fileName.toUtf8().constData(), worldEditList)) { - // TODO: add the message box + std::string error = Utils::getLastError(); + + QMessageBox::critical( this, + tr( "Error opening world editor file" ), + tr( error.c_str() ) ); + return; } @@ -185,8 +194,10 @@ void WorldEditorWindow::loadWorldEditFile(const QString &fileName) { case Utils::DataDirectoryType: m_zoneBuilderBase->init(QString(worldEditList[i].second.c_str()), true); + m_dataDir = worldEditList[i].second.c_str(); break; case Utils::ContextType: + m_context = worldEditList[i].second.c_str(); break; case Utils::LandscapeType: m_undoStack->push(new LoadLandscapeCommand(QString(worldEditList[i].second.c_str()), m_primitivesModel, m_zoneBuilderBase)); @@ -212,6 +223,16 @@ void WorldEditorWindow::newWorldEditFile() void WorldEditorWindow::saveWorldEditFile() { + WorldSaver saver( m_primitivesModel, m_zoneBuilderBase, m_dataDir.toUtf8().constData(), m_context.toUtf8().constData() ); + bool ok = saver.save(); + QString error = saver.getLastError().c_str(); + + if( !ok ) + { + QMessageBox::critical( this, + tr( "Failed to save world editor files" ), + tr( "Failed to save world editor files.\nError:\n " ) + error ); + } } void WorldEditorWindow::openProjectSettings() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h b/code/studio/src/plugins/world_editor/world_editor_window.h similarity index 98% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h rename to code/studio/src/plugins/world_editor/world_editor_window.h index f289e6c2a..60a6a988a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.h +++ b/code/studio/src/plugins/world_editor/world_editor_window.h @@ -76,6 +76,9 @@ private: void loadWorldEditFile(const QString &fileName); void checkCurrentWorld(); + QString m_context; + QString m_dataDir; + QString m_lastDir; QLabel *m_statusInfo; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.ui b/code/studio/src/plugins/world_editor/world_editor_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_window.ui rename to code/studio/src/plugins/world_editor/world_editor_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt b/code/studio/src/plugins/zone_painter/CMakeLists.txt similarity index 58% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt rename to code/studio/src/plugins/zone_painter/CMakeLists.txt index 729658ab4..94f5e85f7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt +++ b/code/studio/src/plugins/zone_painter/CMakeLists.txt @@ -32,30 +32,30 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_ZONE_PAINTER_MOC_SRC} ${OVQT_PL SOURCE_GROUP("Zone Painter Plugin" FILES ${SRC}) SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) -ADD_LIBRARY(ovqt_plugin_zone_painter MODULE ${SRC} ${OVQT_PLUG_ZONE_PAINTER_MOC_SRC} ${OVQT_PLUG_ZONE_PAINTER_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_ZONE_PAINTER_UI_HDRS}) +ADD_LIBRARY(studio_plugin_zone_painter MODULE ${SRC} ${OVQT_PLUG_ZONE_PAINTER_MOC_SRC} ${OVQT_PLUG_ZONE_PAINTER_RC_SRCS} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_ZONE_PAINTER_UI_HDRS}) -TARGET_LINK_LIBRARIES(ovqt_plugin_zone_painter ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) +TARGET_LINK_LIBRARIES(studio_plugin_zone_painter studio_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY}) -NL_DEFAULT_PROPS(ovqt_plugin_zone_painter "NeL, Tools, 3D: Object Viewer Qt Plugin: Zone Painter") -NL_ADD_RUNTIME_FLAGS(ovqt_plugin_zone_painter) -NL_ADD_LIB_SUFFIX(ovqt_plugin_zone_painter) +NL_DEFAULT_PROPS(studio_plugin_zone_painter "Tools: Studio Plugin: Zone Painter") +NL_ADD_RUNTIME_FLAGS(studio_plugin_zone_painter) +NL_ADD_LIB_SUFFIX(studio_plugin_zone_painter) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) IF(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ELSE(WIN32) IF(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} ARCHIVE DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ELSE(WITH_INSTALL_LIBRARIES) - INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) + INSTALL(TARGETS studio_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT tools3d) ENDIF(WITH_INSTALL_LIBRARIES) ENDIF(WIN32) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_zone_painter.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/studio_plugin_zone_painter.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/color-fill.png b/code/studio/src/plugins/zone_painter/images/color-fill.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/color-fill.png rename to code/studio/src/plugins/zone_painter/images/color-fill.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/color-picker-black.png b/code/studio/src/plugins/zone_painter/images/color-picker-black.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/color-picker-black.png rename to code/studio/src/plugins/zone_painter/images/color-picker-black.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/colorize.png b/code/studio/src/plugins/zone_painter/images/colorize.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/colorize.png rename to code/studio/src/plugins/zone_painter/images/colorize.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/draw-brush.png b/code/studio/src/plugins/zone_painter/images/draw-brush.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/draw-brush.png rename to code/studio/src/plugins/zone_painter/images/draw-brush.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/go-down-7.png b/code/studio/src/plugins/zone_painter/images/go-down-7.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/go-down-7.png rename to code/studio/src/plugins/zone_painter/images/go-down-7.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/go-jump-4.png b/code/studio/src/plugins/zone_painter/images/go-jump-4.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/go-jump-4.png rename to code/studio/src/plugins/zone_painter/images/go-jump-4.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/lock-6.png b/code/studio/src/plugins/zone_painter/images/lock-6.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/lock-6.png rename to code/studio/src/plugins/zone_painter/images/lock-6.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/lock-silver.png b/code/studio/src/plugins/zone_painter/images/lock-silver.png similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/images/lock-silver.png rename to code/studio/src/plugins/zone_painter/images/lock-silver.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/painter_dock_widget.cpp b/code/studio/src/plugins/zone_painter/painter_dock_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/painter_dock_widget.cpp rename to code/studio/src/plugins/zone_painter/painter_dock_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/painter_dock_widget.h b/code/studio/src/plugins/zone_painter/painter_dock_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/painter_dock_widget.h rename to code/studio/src/plugins/zone_painter/painter_dock_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/painter_dock_widget.ui b/code/studio/src/plugins/zone_painter/painter_dock_widget.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/painter_dock_widget.ui rename to code/studio/src/plugins/zone_painter/painter_dock_widget.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/qnel_widget.cpp b/code/studio/src/plugins/zone_painter/qnel_widget.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/qnel_widget.cpp rename to code/studio/src/plugins/zone_painter/qnel_widget.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/qnel_widget.h b/code/studio/src/plugins/zone_painter/qnel_widget.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/qnel_widget.h rename to code/studio/src/plugins/zone_painter/qnel_widget.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/ovqt_plugin_zone_painter.xml b/code/studio/src/plugins/zone_painter/studio_plugin_zone_painter.xml similarity index 76% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/ovqt_plugin_zone_painter.xml rename to code/studio/src/plugins/zone_painter/studio_plugin_zone_painter.xml index 9a07a6be6..eb796aa42 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/ovqt_plugin_zone_painter.xml +++ b/code/studio/src/plugins/zone_painter/studio_plugin_zone_painter.xml @@ -1,5 +1,5 @@ - ovqt_plugin_zone_painter + studio_plugin_zone_painter ZonePainter 0.0 Ryzom Core diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter.qrc b/code/studio/src/plugins/zone_painter/zone_painter.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter.qrc rename to code/studio/src/plugins/zone_painter/zone_painter.qrc diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.cpp b/code/studio/src/plugins/zone_painter/zone_painter_main_window.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.cpp rename to code/studio/src/plugins/zone_painter/zone_painter_main_window.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.h b/code/studio/src/plugins/zone_painter/zone_painter_main_window.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.h rename to code/studio/src/plugins/zone_painter/zone_painter_main_window.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.ui b/code/studio/src/plugins/zone_painter/zone_painter_main_window.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_main_window.ui rename to code/studio/src/plugins/zone_painter/zone_painter_main_window.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.cpp b/code/studio/src/plugins/zone_painter/zone_painter_model.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.cpp rename to code/studio/src/plugins/zone_painter/zone_painter_model.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.h b/code/studio/src/plugins/zone_painter/zone_painter_model.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_model.h rename to code/studio/src/plugins/zone_painter/zone_painter_model.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp b/code/studio/src/plugins/zone_painter/zone_painter_plugin.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp rename to code/studio/src/plugins/zone_painter/zone_painter_plugin.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h b/code/studio/src/plugins/zone_painter/zone_painter_plugin.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h rename to code/studio/src/plugins/zone_painter/zone_painter_plugin.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_settings_page.cpp b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.cpp similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_settings_page.cpp rename to code/studio/src/plugins/zone_painter/zone_painter_settings_page.cpp diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_settings_page.h b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.h similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_settings_page.h rename to code/studio/src/plugins/zone_painter/zone_painter_settings_page.h diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_settings_page.ui b/code/studio/src/plugins/zone_painter/zone_painter_settings_page.ui similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_settings_page.ui rename to code/studio/src/plugins/zone_painter/zone_painter_settings_page.ui diff --git a/code/studio/src/pm_watcher.cpp b/code/studio/src/pm_watcher.cpp new file mode 100644 index 000000000..0bbd28ca1 --- /dev/null +++ b/code/studio/src/pm_watcher.cpp @@ -0,0 +1,103 @@ +// Ryzom Core - 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 "pm_watcher.h" +#include "extension_system/iplugin_manager.h" +#include "splash_screen.h" + +namespace +{ + enum Progress + { + PLUGINS_LOADED = 10, + PLUGINS_INITIALIZED = 90, + PLUGINS_STARTED = 100 + }; +} + +void PluginManagerWatcher::connect() +{ + QObject::connect( pm, SIGNAL( pluginLoading( const char * ) ), this, SLOT( onPluginLoading( const char * ) ) ); + QObject::connect( pm, SIGNAL( pluginInitializing( const char * ) ), this, SLOT( onPluginInitializing( const char * ) ) ); + QObject::connect( pm, SIGNAL( pluginStarting( const char * ) ), this, SLOT( onPluginStarting( const char * ) ) ); + QObject::connect( pm, SIGNAL( pluginsLoaded() ), this, SLOT( onPluginsLoaded() ) ); + QObject::connect( pm, SIGNAL( pluginsInitialized() ), this, SLOT( onPluginsInitialized() ) ); + QObject::connect( pm, SIGNAL( pluginsStarted() ), this, SLOT( onPluginsStarted() ) ); + QObject::connect( pm, SIGNAL( pluginCount( int ) ), this, SLOT( onPluginCount( int ) ) ); +} + +void PluginManagerWatcher::disconnect() +{ + QObject::disconnect( pm, SIGNAL( pluginLoading( const char * ) ), this, SLOT( onPluginLoading( const char * ) ) ); + QObject::disconnect( pm, SIGNAL( pluginInitializing( const char * ) ), this, SLOT( onPluginInitializing( const char * ) ) ); + QObject::disconnect( pm, SIGNAL( pluginStarting( const char * ) ), this, SLOT( onPluginStarting( const char * ) ) ); + QObject::disconnect( pm, SIGNAL( pluginsLoaded() ), this, SLOT( onPluginsLoaded() ) ); + QObject::disconnect( pm, SIGNAL( pluginsInitialized() ), this, SLOT( onPluginsInitialized() ) ); + QObject::disconnect( pm, SIGNAL( pluginsStarted() ), this, SLOT( onPluginsStarted() ) ); + QObject::disconnect( pm, SIGNAL( pluginCount( int ) ), this, SLOT( onPluginCount( int ) ) ); +} + +void PluginManagerWatcher::onPluginLoading( const char *plugin ) +{ + QString s = "Loading plugin "; + s += plugin; + s += "..."; + sp->setText( s ); + + sp->advanceProgress( PLUGINS_LOADED / pluginCount ); +} + +void PluginManagerWatcher::onPluginInitializing( const char *plugin ) +{ + QString s = "Initializing plugin "; + s += plugin; + s += "..."; + sp->setText( s ); + + sp->advanceProgress( ( PLUGINS_INITIALIZED - PLUGINS_LOADED ) / pluginCount ); +} + +void PluginManagerWatcher::onPluginStarting( const char *plugin ) +{ + QString s = "Starting plugin "; + s += plugin; + s += "..."; + sp->setText( s ); + + sp->advanceProgress( ( PLUGINS_STARTED - PLUGINS_INITIALIZED ) / pluginCount ); +} + + +void PluginManagerWatcher::onPluginsLoaded() +{ + sp->setProgress( PLUGINS_LOADED ); +} + +void PluginManagerWatcher::onPluginsInitialized() +{ + sp->setProgress( PLUGINS_INITIALIZED ); +} + +void PluginManagerWatcher::onPluginsStarted() +{ + sp->setProgress( PLUGINS_STARTED ); +} + +void PluginManagerWatcher::onPluginCount( int count ) +{ + pluginCount = count; +} \ No newline at end of file diff --git a/code/studio/src/pm_watcher.h b/code/studio/src/pm_watcher.h new file mode 100644 index 000000000..e37e81401 --- /dev/null +++ b/code/studio/src/pm_watcher.h @@ -0,0 +1,72 @@ +// Ryzom Core - 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 PM_WATCHER_H +#define PM_WATCHER_H + +#include + +namespace ExtensionSystem +{ + class IPluginManager; +} + +class SplashScreen; +class PluginManager; + +class PluginManagerWatcher : public QObject +{ + Q_OBJECT +public: + + PluginManagerWatcher(){ + sp = NULL; + pm = NULL; + pluginCount = 0; + } + + ~PluginManagerWatcher(){ + sp = NULL; + pm = NULL; + } + + void setSplashScreen( SplashScreen *s ){ sp = s; } + void setPluginManager( ExtensionSystem::IPluginManager *m ){ pm = m; } + + void connect(); + void disconnect(); + +private Q_SLOTS: + void onPluginLoading( const char *plugin ); + void onPluginInitializing( const char *plugin ); + void onPluginStarting( const char *plugin ); + + void onPluginsLoaded(); + void onPluginsInitialized(); + void onPluginsStarted(); + + void onPluginCount( int count ); + +private: + SplashScreen *sp; + ExtensionSystem::IPluginManager *pm; + int pluginCount; +}; + + +#endif + diff --git a/code/studio/src/settings_dialog.cpp b/code/studio/src/settings_dialog.cpp new file mode 100644 index 000000000..78773a666 --- /dev/null +++ b/code/studio/src/settings_dialog.cpp @@ -0,0 +1,236 @@ +// Ryzom Core - 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 "settings_dialog.h" +#include +#include +#include + +int findListItem( QListWidget *l, const QString &s ) +{ + for( int i = 0; i < l->count(); i++ ) + { + QListWidgetItem *item = l->item( i ); + if( item->text() == s ) + return i; + } + + return -1; +} + +SettingsDialog::SettingsDialog( QDialog *parent ) : +QDialog( parent ) +{ + setupUi( this ); + setupConnections(); + settings = NULL; +} + +SettingsDialog::~SettingsDialog() +{ +} + +void SettingsDialog::load() +{ + pluginsLE->setText( settings->value( "PluginPath" ).toString() ); + + settings->beginGroup( "DataPath" ); + + sheetsLE->setText( settings->value( "LevelDesignPath" ).toString() ); + assetsLE->setText( settings->value( "AssetsPath" ).toString() ); + primitivesLE->setText( settings->value( "PrimitivesPath" ).toString() ); + ligoLE->setText( settings->value( "LigoConfigFile" ).toString() ); + + QStringList l = settings->value( "SearchPaths" ).toStringList(); + { + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + QString p = itr.next(); + if( findListItem( searchLW, p ) == -1 ) + searchLW->addItem( p ); + } + } + + l.clear(); + + l = settings->value( "RecursiveSearchPathes" ).toStringList(); + { + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + QString p = itr.next(); + if( findListItem( recursiveLW, p ) == -1 ) + recursiveLW->addItem( p ); + } + } + + settings->endGroup(); +} + +void SettingsDialog::saveSearchPaths() +{ + QStringList l; + for( int i = 0; i < searchLW->count(); i++ ) + { + l.push_back( searchLW->item( i )->text() ); + } + + settings->setValue( "SearchPaths", l ); +} + +void SettingsDialog::saveRecursivePaths() +{ + QStringList l; + for( int i = 0; i < recursiveLW->count(); i++ ) + { + l.push_back( recursiveLW->item( i )->text() ); + } + + settings->setValue( "RecursiveSearchPathes", l ); +} + +void SettingsDialog::save() +{ + settings->setValue( "PluginPath", pluginsLE->text() ); + + settings->beginGroup( "DataPath" ); + + settings->setValue( "LevelDesignPath", sheetsLE->text() ); + settings->setValue( "AssetsPath", assetsLE->text() ); + settings->setValue( "PrimitivesPath", primitivesLE->text() ); + settings->setValue( "LigoConfigFile", ligoLE->text() ); + + saveSearchPaths(); + saveRecursivePaths(); + + settings->endGroup(); + + settings->sync(); +} + +void SettingsDialog::accept() +{ + save(); + QDialog::accept(); +} + +void SettingsDialog::reject() +{ + QDialog::reject(); +} + +void SettingsDialog::onOKClicked() +{ + accept(); +} + +void SettingsDialog::onCancelClicked() +{ + reject(); +} + +void SettingsDialog::onPluginBClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "Plugins directory" ), "" ); + pluginsLE->setText( p ); +} + +void SettingsDialog::onSheetsBClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "Sheets directory" ), "" ); + sheetsLE->setText( p ); +} + +void SettingsDialog::onAssetsBClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "Assets directory" ), "" ); + assetsLE->setText( p ); +} + +void SettingsDialog::onPrimitivesBClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "Primitives directory" ), "" ); + primitivesLE->setText( p ); +} + +void SettingsDialog::onLigoBClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "LIGO directory" ), "" ); + ligoLE->setText( p ); +} + +void SettingsDialog::onPathAddClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "Search path" ), "" ); + if( p.isEmpty() ) + return; + + if( findListItem( searchLW, p ) != -1 ) + return; + + searchLW->addItem( p ); +} + +void SettingsDialog::onPathRemoveClicked() +{ + QListWidgetItem *i = searchLW->currentItem(); + if( i == NULL ) + return; + + delete i; +} + +void SettingsDialog::onRecursiveAddClicked() +{ + QString p = QFileDialog::getExistingDirectory( this, tr( "Recursive search path" ), "" ); + if( p.isEmpty() ) + return; + + if( findListItem( recursiveLW, p ) != -1 ) + return; + + recursiveLW->addItem( p ); +} + +void SettingsDialog::onRecursiveRemoveClicked() +{ + QListWidgetItem *i = recursiveLW->currentItem(); + if( i == NULL ) + return; + + delete i; +} + + +void SettingsDialog::setupConnections() +{ + connect( bb, SIGNAL( accepted() ), this, SLOT( onOKClicked() ) ); + connect( bb, SIGNAL( rejected() ), this, SLOT( onCancelClicked() ) ); + + connect( pluginsB, SIGNAL( clicked( bool ) ), this, SLOT( onPluginBClicked() ) ); + connect( sheetsB, SIGNAL( clicked( bool ) ), this, SLOT( onSheetsBClicked() ) ); + connect( assetsB, SIGNAL( clicked( bool ) ), this, SLOT( onAssetsBClicked() ) ); + connect( primitivesB, SIGNAL( clicked( bool ) ), this, SLOT( onPrimitivesBClicked() ) ); + connect( ligoB, SIGNAL( clicked( bool ) ), this, SLOT( onLigoBClicked() ) ); + + connect( pathAddB, SIGNAL( clicked( bool ) ), this, SLOT( onPathAddClicked() ) ); + connect( pathRemoveB, SIGNAL( clicked( bool ) ), this, SLOT( onPathRemoveClicked() ) ); + connect( recAddB, SIGNAL( clicked( bool ) ), this, SLOT( onRecursiveAddClicked() ) ); + connect( recRemoveB, SIGNAL( clicked( bool ) ), this, SLOT( onRecursiveRemoveClicked() ) ); +} + diff --git a/code/studio/src/settings_dialog.h b/code/studio/src/settings_dialog.h new file mode 100644 index 000000000..173ba37d4 --- /dev/null +++ b/code/studio/src/settings_dialog.h @@ -0,0 +1,62 @@ +// Ryzom Core - 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 SETTINGS_DIALOG_H +#define SETTINGS_DIALOG_H + +#include "ui_settings_dialog.h" + +class QSettings; + +class SettingsDialog : public QDialog, public Ui::SettingsDialog +{ + Q_OBJECT +public: + SettingsDialog( QDialog *parent = NULL ); + ~SettingsDialog(); + + void setSettings( QSettings *s ){ settings = s; } + + void load(); + +public Q_SLOTS: + void accept(); + void reject(); + + void onOKClicked(); + void onCancelClicked(); + + void onPluginBClicked(); + void onSheetsBClicked(); + void onAssetsBClicked(); + void onPrimitivesBClicked(); + void onLigoBClicked(); + + void onPathAddClicked(); + void onPathRemoveClicked(); + void onRecursiveAddClicked(); + void onRecursiveRemoveClicked(); + +private: + void setupConnections(); + void save(); + void saveSearchPaths(); + void saveRecursivePaths(); + + QSettings *settings; +}; + +#endif diff --git a/code/studio/src/settings_dialog.ui b/code/studio/src/settings_dialog.ui new file mode 100644 index 000000000..2fb6151d3 --- /dev/null +++ b/code/studio/src/settings_dialog.ui @@ -0,0 +1,255 @@ + + + SettingsDialog + + + Qt::ApplicationModal + + + + 0 + 0 + 451 + 539 + + + + Ryzom Core Studio settings + + + + + + Paths + + + + + + Plugins + + + + + + + + + + ... + + + + + + + Sheets + + + + + + + + + + ... + + + + + + + Assets database + + + + + + + + + + ... + + + + + + + Primitives + + + + + + + + + + ... + + + + + + + LIGO config file + + + + + + + + + + ... + + + + + + + + + + Search paths + + + + + + + + + + 0 + 0 + + + + Add + + + Qt::ToolButtonTextOnly + + + + + + + + 0 + 0 + + + + Remove + + + Qt::ToolButtonTextOnly + + + + + + + Qt::Vertical + + + + 20 + 75 + + + + + + + + + + + Recursive search paths + + + + + + + + + + 0 + 0 + + + + Add + + + Qt::ToolButtonTextOnly + + + + + + + + 0 + 0 + + + + Remove + + + Qt::ToolButtonTextOnly + + + + + + + Qt::Vertical + + + + 20 + 76 + + + + + + + + + + + Qt::Horizontal + + + + 120 + 20 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + diff --git a/code/studio/src/splash_screen.cpp b/code/studio/src/splash_screen.cpp new file mode 100644 index 000000000..36f7b3bc0 --- /dev/null +++ b/code/studio/src/splash_screen.cpp @@ -0,0 +1,109 @@ +// Ryzom Core - 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 "splash_screen.h" +#include +#include +#include +#include + +SplashScreen::SplashScreen() : +QSplashScreen() +{ + progress = 0; + textX = 5; + textY = 20; + pbLeft = 2; + pbTop = 0; + pbWidth = 100; + pbHeight = 20; +} + +SplashScreen::~SplashScreen() +{ +} + +void SplashScreen::setPixmap( const QPixmap &pixmap ) +{ + QSplashScreen::setPixmap( pixmap ); + + if( this->pixmap().width() > 0 ) + pbWidth = this->pixmap().width() - 4; + + if( this->pixmap().height() > 0 ) + pbTop = this->pixmap().height() - pbHeight - 2; + + textY = pbTop - pbHeight / 2; +} + +void SplashScreen::setText( const QString &text ) +{ + this->text = text; + repaint(); + QCoreApplication::instance()->processEvents(); +} + +void SplashScreen::clearText() +{ + setText( "" ); +} + +void SplashScreen::setProgress( int percent ) +{ + progress = percent; + repaint(); + QCoreApplication::instance()->processEvents(); +} + +void SplashScreen::advanceProgress( int percent ) +{ + progress += percent; + repaint(); + QCoreApplication::instance()->processEvents(); +} + +void SplashScreen::drawContents( QPainter *painter ) +{ + QSplashScreen::drawContents( painter ); + + if( progressBarEnabled ) + { + QStyleOptionProgressBarV2 pbStyle; + pbStyle.initFrom( this ); + pbStyle.state = QStyle::State_Enabled; + pbStyle.textVisible = false; + pbStyle.minimum = 0; + pbStyle.maximum = 100; + pbStyle.progress = progress; + pbStyle.invertedAppearance = false; + pbStyle.rect = QRect( pbLeft, pbTop, pbWidth, pbHeight ); + + style()->drawControl( QStyle::CE_ProgressBar, &pbStyle, painter, this ); + } + + if( !text.isEmpty() ) + { + QPen oldPen = painter->pen(); + QPen pen; + pen.setColor( Qt::white ); + painter->setPen( pen ); + painter->drawText( textX, textY, text ); + painter->setPen( oldPen ); + } +} + + diff --git a/code/studio/src/splash_screen.h b/code/studio/src/splash_screen.h new file mode 100644 index 000000000..c4ba0f648 --- /dev/null +++ b/code/studio/src/splash_screen.h @@ -0,0 +1,60 @@ +// Ryzom Core - 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 SPLASH_SCREEN_H +#define SPLASH_SCREEN_H + + +#include + +class SplashScreen : public QSplashScreen +{ + Q_OBJECT +public: + SplashScreen(); + ~SplashScreen(); + + void setPixmap( const QPixmap &pixmap ); + + void setText( const QString &text ); + void clearText(); + void setTextXY( int x, int y ){ textX = x; textY = y; } + void setProgress( int percent ); + void advanceProgress( int percent ); + + void setProgressBarEnabled( bool b ){ progressBarEnabled = b; } + void setProgressBarRect( int left, int top, int width, int height ){} + +protected: + void drawContents( QPainter *painter ); + +private: + int progress; + int pbLeft; + int pbTop; + int pbWidth; + int pbHeight; + + QString text; + int textX; + int textY; + + bool progressBarEnabled; +}; + +#endif + diff --git a/code/nel/tools/3d/object_viewer_qt/src/ic_nel_pill.ico b/code/studio/src/studio.ico similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/ic_nel_pill.ico rename to code/studio/src/studio.ico diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc b/code/studio/src/studio.qrc similarity index 56% rename from code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc rename to code/studio/src/studio.qrc index 13d47d75b..17306e2cc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.qrc +++ b/code/studio/src/studio.qrc @@ -1,5 +1,5 @@ - images/nel_ide_load.png + images/studio_splash.png diff --git a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.rc b/code/studio/src/studio.rc similarity index 83% rename from code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.rc rename to code/studio/src/studio.rc index a0f0e7099..05ade2766 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/object_viewer_qt.rc +++ b/code/studio/src/studio.rc @@ -28,12 +28,12 @@ BEGIN VALUE "CompanyName", "Ryzom Core\0" VALUE "FileDescription", "\0" VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "Object_Viewer_Qt\0" + VALUE "InternalName", "Ryzom Core Studio\0" VALUE "LegalCopyright", "Copyright (C) 2011\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "\0" VALUE "PrivateBuild", "\0" - VALUE "ProductName", "Object Viewer Qt\0" + VALUE "ProductName", "Ryzom Core Studio\0" VALUE "ProductVersion", "1, 0, 0, 1\0" VALUE "SpecialBuild", "\0" END @@ -51,4 +51,4 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "ic_nel_pill.ico" +IDR_MAINFRAME ICON DISCARDABLE "studio.ico" diff --git a/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_de.ts b/code/studio/src/translations/object_viewer_qt_de.ts similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_de.ts rename to code/studio/src/translations/object_viewer_qt_de.ts diff --git a/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_en.ts b/code/studio/src/translations/object_viewer_qt_en.ts similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_en.ts rename to code/studio/src/translations/object_viewer_qt_en.ts diff --git a/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_fr.ts b/code/studio/src/translations/object_viewer_qt_fr.ts similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_fr.ts rename to code/studio/src/translations/object_viewer_qt_fr.ts diff --git a/code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_ru.ts b/code/studio/src/translations/object_viewer_qt_ru.ts similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/translations/object_viewer_qt_ru.ts rename to code/studio/src/translations/object_viewer_qt_ru.ts diff --git a/code/nel/tools/3d/object_viewer_qt/src/translations/translations.qrc b/code/studio/src/translations/translations.qrc similarity index 100% rename from code/nel/tools/3d/object_viewer_qt/src/translations/translations.qrc rename to code/studio/src/translations/translations.qrc diff --git a/code/web/docs/ams/doxygen/Doxyfile b/code/web/docs/ams/doxygen/Doxyfile index 8c4cad40f..fc764ef01 100644 --- a/code/web/docs/ams/doxygen/Doxyfile +++ b/code/web/docs/ams/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "Ryzom Account Management System" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.0 +PROJECT_NUMBER = 1.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -721,7 +721,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = warnfile.log #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -733,8 +733,8 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = ../../ryzom_ams \ - info.php +INPUT = ../../../private_php/ams \ + ../../../public_php/ams # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -769,11 +769,8 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = ../../ryzom_ams/ams_lib/smarty \ - ../../ryzom_ams/ams_lib/plugins \ - ../../ryzom_ams/www/html/misc \ - ../../ryzom_ams/www/html/templates_c \ - ../../ryzom_ams/drupal +EXCLUDE = ../../../private_php/ams/smarty \ + ../../../public_php/ams/misc/elfinder-connector # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -894,7 +891,7 @@ USE_MDFILE_AS_MAINPAGE = # also VERBATIM_HEADERS is set to NO. # The default value is: NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. @@ -2309,4 +2306,3 @@ GENERATE_LEGEND = YES # This tag requires that the tag HAVE_DOT is set to YES. DOT_CLEANUP = YES - diff --git a/code/web/docs/ams/html/add__sgroup_8php.html b/code/web/docs/ams/html/add__sgroup_8php.html deleted file mode 100644 index f525076f5..000000000 --- a/code/web/docs/ams/html/add__sgroup_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php File Reference
-
-
- - - - -

-Functions

 add_sgroup ()
 This function is beign used to add a new Support Group to the database.
-

Function Documentation

- -
-
- - - - - - - -
add_sgroup ()
-
-
- -

This function is beign used to add a new Support Group to the database.

-

What it will do is check if the user who executed the function is an Admin, if so then it will filter all POST'ed data and use it to create a new Support_Group entry. if not logged in or not an admin, an appropriate redirection to an error page will take place.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/add__user_8php.html b/code/web/docs/ams/html/add__user_8php.html deleted file mode 100644 index 0b89554f9..000000000 --- a/code/web/docs/ams/html/add__user_8php.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php File Reference
-
-
- - - - - -

-Functions

 add_user ()
 This function is beign used to add a new user to the www database.
 write_user ($newUser)
-

Function Documentation

- -
-
- - - - - - - -
add_user ()
-
-
- -

This function is beign used to add a new user to the www database.

-

it will first check if the sent $_POST variables are valid for registering, if one or more rules are broken (eg the username is too short) the template will be reloaded but this time with the appropriate error messages. If the checking was successful it will call the write_user() function (located in this same file). That function will create a new www user and matching ticket_user. It will also push the newly created user to the shard. In case the shard is offline, the new user will be temporary stored in the ams_querycache, waiting for the sync cron job to update it.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
- -
-
- - - - - - - - -
write_user (newUser)
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/add__user__to__sgroup_8php.html b/code/web/docs/ams/html/add__user__to__sgroup_8php.html deleted file mode 100644 index 878ce18d0..000000000 --- a/code/web/docs/ams/html/add__user__to__sgroup_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php File Reference
-
-
- - - - -

-Functions

 add_user_to_sgroup ()
 This function is beign used to add a user to a support group.
-

Function Documentation

- -
-
- - - - - - - -
add_user_to_sgroup ()
-
-
- -

This function is beign used to add a user to a support group.

-

It will first check if the user who executed this function is an admin. If the user exists it will try to add it to the supportgroup, in case it's not a mod or admin it will not add it to the group. if the executing user is not an admin or not logged in, the page will be redirected to the error page.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/annotated.html b/code/web/docs/ams/html/annotated.html deleted file mode 100644 index dd7fc058c..000000000 --- a/code/web/docs/ams/html/annotated.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - -Ryzom Account Management System: Data Structures - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
Data Structures
-
-
-
Here are the data structures with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - -
AssignedHandles the assigning of a ticket to a user
DBLayerHandles the database connections
ForwardedHandles the forwarding of a ticket to a support_group
Gui_ElementsHelper class for generating gui related elements
HelpersHelper class for more site specific functions
In_Support_GroupHandles the linkage of users being in a support group
Mail_HandlerHandles the mailing functionality
MyCryptBasic encryption/decryption class
PaginationHandles returning arrays based on a given pagenumber
QuerycacheClass for storing changes when shard is offline
Support_GroupGroups moderators & admins together
SyncHandler for performing changes when shard is back online after being offline
TicketClass that handles most ticket related functions
Ticket_CategoryClass related to the ticket categories
Ticket_ContentClass that handles the content of a reply
Ticket_InfoClass that handles additional info sent by ticket creation ingame
Ticket_LogClass that handles the logging
Ticket_QueueData class that holds a lot of queries that load specific tickets
Ticket_Queue_HandlerReturns tickets (queues) that are related in some way
Ticket_ReplyHandles functions related to replies on tickets
Ticket_UserUser entry point in the ticket system
UsersHandles basic user registration & management functions (shard related)
WebUsersHandles CMS/WWW related functions regarding user management & registration
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/assigned_8php.html b/code/web/docs/ams/html/assigned_8php.html deleted file mode 100644 index 54e26a775..000000000 --- a/code/web/docs/ams/html/assigned_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/assigned.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/assigned.php File Reference
-
-
- - - - -

-Data Structures

class  Assigned
 Handles the assigning of a ticket to a user. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/bc_s.png b/code/web/docs/ams/html/bc_s.png deleted file mode 100644 index e4018628b..000000000 Binary files a/code/web/docs/ams/html/bc_s.png and /dev/null differ diff --git a/code/web/docs/ams/html/change__info_8php.html b/code/web/docs/ams/html/change__info_8php.html deleted file mode 100644 index 4b5bb8b4b..000000000 --- a/code/web/docs/ams/html/change__info_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_info.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_info.php File Reference
-
-
- - - - -

-Functions

 change_info ()
 This function is beign used to change the users personal info.
-

Function Documentation

- -
-
- - - - - - - -
change_info ()
-
-
- -

This function is beign used to change the users personal info.

-

It will first check if the user who executed this function is the person of whom the information is or if it's a mod/admin. If this is not the case the page will be redirected to an error page. afterwards the current info will be loaded, which will be used to determine what to update. After updating the information, the settings template will be reloaded. Errors made by invalid data will be shown also after reloading the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/change__mail_8php.html b/code/web/docs/ams/html/change__mail_8php.html deleted file mode 100644 index 1a177af49..000000000 --- a/code/web/docs/ams/html/change__mail_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_mail.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_mail.php File Reference
-
-
- - - - -

-Functions

 change_mail ()
 This function is beign used to change the users emailaddress info.
-

Function Documentation

- -
-
- - - - - - - -
change_mail ()
-
-
- -

This function is beign used to change the users emailaddress info.

-

It will first check if the user who executed this function is the person of whom the emailaddress is or if it's a mod/admin. If this is not the case the page will be redirected to an error page. The emailaddress will be validated first. If the checking was successful the email will be updated and the settings template will be reloaded. Errors made by invalid data will be shown also after reloading the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/change__password_8php.html b/code/web/docs/ams/html/change__password_8php.html deleted file mode 100644 index a8cc2bbc1..000000000 --- a/code/web/docs/ams/html/change__password_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_password.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_password.php File Reference
-
-
- - - - -

-Functions

 change_password ()
 This function is beign used to change the users password.
-

Function Documentation

- -
-
- - - - - - - -
change_password ()
-
-
- -

This function is beign used to change the users password.

-

It will first check if the user who executed this function is the person of whom the emailaddress is or if it's a mod/admin. If this is not the case the page will be redirected to an error page. If the executing user tries to change someone elses password, he doesn't has to fill in the previous password. The password will be validated first. If the checking was successful the password will be updated and the settings template will be reloaded. Errors made by invalid data will be shown also after reloading the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/change__permission_8php.html b/code/web/docs/ams/html/change__permission_8php.html deleted file mode 100644 index f8eccb214..000000000 --- a/code/web/docs/ams/html/change__permission_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/change_permission.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/change_permission.php File Reference
-
-
- - - - -

-Functions

 change_permission ()
 This function is beign used to change the permission of a ticket_user.
-

Function Documentation

- -
-
- - - - - - - -
change_permission ()
-
-
- -

This function is beign used to change the permission of a ticket_user.

-

It will first check if the user who executed this function is an admin. If this is not the case the page will be redirected to an error page. in case the $_GET['value'] is smaller than 4 and the user whoes permission is being changed is different from the admin(id 1), the change will be executed and the page will redirect to the users profile page.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/change__receivemail_8php.html b/code/web/docs/ams/html/change__receivemail_8php.html deleted file mode 100644 index fbb0d77e5..000000000 --- a/code/web/docs/ams/html/change__receivemail_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_receivemail.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_receivemail.php File Reference
-
-
- - - - -

-Functions

 change_receivemail ()
 This function is beign used to change the users receiveMail setting.
-

Function Documentation

- -
-
- - - - - - - -
change_receivemail ()
-
-
- -

This function is beign used to change the users receiveMail setting.

-

It will first check if the user who executed this function is the person of whom the setting is or if it's a mod/admin. If this is not the case the page will be redirected to an error page. it will check if the new value equals 1 or 0 and it will update the setting and redirect the page again.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classAssigned.html b/code/web/docs/ams/html/classAssigned.html deleted file mode 100644 index e91a4c362..000000000 --- a/code/web/docs/ams/html/classAssigned.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - -Ryzom Account Management System: Assigned Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

Handles the assigning of a ticket to a user. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'assigned' entry.
 delete ()
 deletes an existing 'assigned' entry.
 load ($ticket_id)
 loads the object's attributes.
 getUser ()
 get user attribute of the object.
 getTicket ()
 get ticket attribute of the object.
 setUser ($u)
 set user attribute of the object.
 setTicket ($t)
 set ticket attribute of the object.

-Static Public Member Functions

static assignTicket ($user_id, $ticket_id)
 Assigns a ticket to a user or returns an error message.
static unAssignTicket ($user_id, $ticket_id)
 Unassign a ticket being coupled to a user or return an error message.
static getUserAssignedToTicket ($ticket_id)
 Get the (external) id of the user assigned to a ticket.
static isAssigned ($ticket_id, $user_id=0)
 Check if a ticket is already assigned (in case the user_id param is used, it will check if it's assigned to that user)

-Private Attributes

 $user
 The id of the user being assigned.
 $ticket
 The id of the ticket being assigned.
-

Detailed Description

-

Handles the assigning of a ticket to a user.

-

This is being used to make someone responsible for the handling and solving of a ticket. The idea is that someone can easily assign a ticket to himself and by doing that, he makes aware to the other moderators that he will deal with the ticket in the future.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
static assignTicket (user_id,
ticket_id 
) [static]
-
-
- -

Assigns a ticket to a user or returns an error message.

-

It will first check if the ticket isn't already assigned, if not, it will create a new 'assigned' entry.

-
Parameters:
- - - -
$user_idthe id of the user we want to assign to the ticket
$ticket_idthe id of the ticket.
-
-
-
Returns:
A string, if assigning succeedded "SUCCESS_ASSIGNED" will be returned, else "ALREADY_ASSIGNED" will be returned.
- -
-
- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'assigned' entry.

-

this method will use the object's attributes for creating a new 'assigned' entry in the database.

- -
-
- -
-
- - - - - - - -
delete ()
-
-
- -

deletes an existing 'assigned' entry.

-

this method will use the object's attributes for deleting an existing 'assigned' entry in the database.

- -
-
- -
-
- - - - - - - -
getTicket ()
-
-
- -

get ticket attribute of the object.

- -
-
- -
-
- - - - - - - -
getUser ()
-
-
- -

get user attribute of the object.

- -
-
- -
-
- - - - - - - - -
static getUserAssignedToTicket (ticket_id) [static]
-
-
- -

Get the (external) id of the user assigned to a ticket.

-
Parameters:
- - -
$ticket_idthe Id of the ticket that's being queried
-
-
-
Returns:
The (external)id of the user being assigned to the ticket
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static isAssigned (ticket_id,
user_id = 0 
) [static]
-
-
- -

Check if a ticket is already assigned (in case the user_id param is used, it will check if it's assigned to that user)

-
Parameters:
- - - -
$ticket_idthe Id of the ticket that's being queried
$user_idthe id of the user, default parameter = 0, by using a user_id, it will check if that user is assigned to the ticket.
-
-
-
Returns:
true in case it's assigned, false in case it isn't.
- -
-
- -
-
- - - - - - - - -
load (ticket_id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a ticket_id, it will put the matching user_id and the ticket_id into the attributes.

-
Parameters:
- - -
$ticket_idthe id of the ticket that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('User' => user_id, 'Ticket' => ticket_id).
-
-
- -
-
- -
-
- - - - - - - - -
setTicket (t)
-
-
- -

set ticket attribute of the object.

-
Parameters:
- - -
$tinteger id of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setUser (u)
-
-
- -

set user attribute of the object.

-
Parameters:
- - -
$uinteger id of the user
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static unAssignTicket (user_id,
ticket_id 
) [static]
-
-
- -

Unassign a ticket being coupled to a user or return an error message.

-

It will first check if the ticket is assigned, if this is indeed the case it will delete the 'assigned' entry.

-
Parameters:
- - - -
$user_idthe id of the user we want to unassign from the ticket
$ticket_idthe id of the ticket.
-
-
-
Returns:
A string, if unassigning succeedded "SUCCESS_UNASSIGNED" will be returned, else "NOT_ASSIGNED" will be returned.
- -
-
-

Field Documentation

- -
-
- - - - -
$ticket [private]
-
-
- -

The id of the ticket being assigned.

- -
-
- -
-
- - - - -
$user [private]
-
-
- -

The id of the user being assigned.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/assigned.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classDBLayer.html b/code/web/docs/ams/html/classDBLayer.html deleted file mode 100644 index 8d405ef53..000000000 --- a/code/web/docs/ams/html/classDBLayer.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - -Ryzom Account Management System: DBLayer Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
DBLayer Class Reference
-
-
- -

Handles the database connections. - More...

- - - - - - - - - - - - - -

-Public Member Functions

 __construct ($db)
 The constructor.
 executeWithoutParams ($query)
 execute a query that doesn't have any parameters
 execute ($query, $params)
 execute a query that has parameters
 executeReturnId ($query, $params)
 execute a query (an insertion query) that has parameters and return the id of it's insertion

-Private Attributes

 $PDO
 The PDO object, instantiated by the constructor.
-

Detailed Description

-

Handles the database connections.

-

It uses PDO to connect to the different databases. It will use the argument of the constructor to setup a connection to the database with the matching entry in the $cfg global variable.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
__construct (db)
-
-
- -

The constructor.

-

Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var)

-
Parameters:
- - -
$dbString, the name of the databases entry in the $cfg global var.
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
execute (query,
params 
)
-
-
- -

execute a query that has parameters

-
Parameters:
- - - -
$querythe mysql query
$paramsthe parameters that are being used by the query
-
-
-
Returns:
returns a PDOStatement object
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
executeReturnId (query,
params 
)
-
-
- -

execute a query (an insertion query) that has parameters and return the id of it's insertion

-
Parameters:
- - - -
$querythe mysql query
$paramsthe parameters that are being used by the query
-
-
-
Returns:
returns the id of the last inserted element.
- -
-
- -
-
- - - - - - - - -
executeWithoutParams (query)
-
-
- -

execute a query that doesn't have any parameters

-
Parameters:
- - -
$querythe mysql query
-
-
-
Returns:
returns a PDOStatement object
- -
-
-

Field Documentation

- -
-
- - - - -
$PDO [private]
-
-
- -

The PDO object, instantiated by the constructor.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/dblayer.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classForwarded.html b/code/web/docs/ams/html/classForwarded.html deleted file mode 100644 index be376db96..000000000 --- a/code/web/docs/ams/html/classForwarded.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - -Ryzom Account Management System: Forwarded Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

Handles the forwarding of a ticket to a support_group. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'forwarded' entry.
 delete ()
 deletes an existing 'forwarded' entry.
 load ($ticket_id)
 loads the object's attributes.
 getGroup ()
 get group attribute of the object.
 getTicket ()
 get ticket attribute of the object.
 setGroup ($g)
 set group attribute of the object.
 setTicket ($t)
 set ticket attribute of the object.

-Static Public Member Functions

static forwardTicket ($group_id, $ticket_id)
 Forward a ticket to a group, also removes the previous group where it was forwarded to.
static getSGroupOfTicket ($ticket_id)
 get the id of the group a ticket is forwarded to.
static isForwarded ($ticket_id)
 check if the ticket is forwarded

-Private Attributes

 $group
 The id of the group to which the ticket is being forwarded.
 $ticket
 The id of the ticket being forwarded.
-

Detailed Description

-

Handles the forwarding of a ticket to a support_group.

-

This is being used to transfer tickets to different groups (eg Developers, Website-Team, SupportGroup etc..) The idea is that someone can easily forward a ticket to a group and by doing that, the moderators that are in that group will receive the ticket in their todo queue.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'forwarded' entry.

-

this method will use the object's attributes for creating a new 'forwarded' entry in the database.

- -
-
- -
-
- - - - - - - -
delete ()
-
-
- -

deletes an existing 'forwarded' entry.

-

this method will use the object's attributes for deleting an existing 'forwarded' entry in the database.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static forwardTicket (group_id,
ticket_id 
) [static]
-
-
- -

Forward a ticket to a group, also removes the previous group where it was forwarded to.

-

It will first check if the ticket is already forwarded, if that's the case, it will delete that entry. Afterwards it creates the new forward entry

-
Parameters:
- - - -
$group_idthe id of the support group we want to forward the ticket to.
$ticket_idthe id of the ticket.
-
-
-
Returns:
A string, if assigning succeedded "SUCCESS_FORWARDED" will be returned.
- -
-
- -
-
- - - - - - - -
getGroup ()
-
-
- -

get group attribute of the object.

- -
-
- -
-
- - - - - - - - -
static getSGroupOfTicket (ticket_id) [static]
-
-
- -

get the id of the group a ticket is forwarded to.

-
Parameters:
- - -
$ticket_idthe id of the ticket.
-
-
-
Returns:
the id of the group
- -
-
- -
-
- - - - - - - -
getTicket ()
-
-
- -

get ticket attribute of the object.

- -
-
- -
-
- - - - - - - - -
static isForwarded (ticket_id) [static]
-
-
- -

check if the ticket is forwarded

-
Parameters:
- - -
$ticket_idthe id of the ticket.
-
-
-
Returns:
returns true if the ticket is forwarded, else return false;
- -
-
- -
-
- - - - - - - - -
load (ticket_id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a ticket_id, it will put the matching group_id and the ticket_id into the attributes.

-
Parameters:
- - -
$ticket_idthe id of the ticket that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('Group' => group_id, 'Ticket' => ticket_id).
-
-
- -
-
- -
-
- - - - - - - - -
setGroup (g)
-
-
- -

set group attribute of the object.

-
Parameters:
- - -
$ginteger id of the group
-
-
- -
-
- -
-
- - - - - - - - -
setTicket (t)
-
-
- -

set ticket attribute of the object.

-
Parameters:
- - -
$tinteger id of the ticket
-
-
- -
-
-

Field Documentation

- -
-
- - - - -
$group [private]
-
-
- -

The id of the group to which the ticket is being forwarded.

- -
-
- -
-
- - - - -
$ticket [private]
-
-
- -

The id of the ticket being forwarded.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/forwarded.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classGui__Elements.html b/code/web/docs/ams/html/classGui__Elements.html deleted file mode 100644 index 98e30a949..000000000 --- a/code/web/docs/ams/html/classGui__Elements.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - -Ryzom Account Management System: Gui_Elements Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Gui_Elements Class Reference
-
-
- -

Helper class for generating gui related elements. - More...

- - - - - - - - -

-Static Public Member Functions

static make_table ($inputList, $funcArray, $fieldArray)
 creates an array of information out of a list of objects which can be used to form a table.
static make_table_with_key_is_id ($inputList, $funcArray, $idFunction)
 creates an array of information out of a list of objects which can be used to form a table with a key as id.
static time_elapsed_string ($ptime)
 returns the elapsed time from a timestamp up till now.
-

Detailed Description

-

Helper class for generating gui related elements.

-

This class contains functions that generate data-arrays for tables, or other visual entities

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static make_table (inputList,
funcArray,
fieldArray 
) [static]
-
-
- -

creates an array of information out of a list of objects which can be used to form a table.

-

The idea of this is that you can pass an array of objects, an array of functions to perform on each object and a name for the index of the returning array to store the result.

-
Parameters:
- - - - -
$inputListthe list of objects of which we want to make a table.
$funcArraya list of methods of that object we want to perform.
$fieldArraya list of strings, that will be used to store our result into.
-
-
-
Returns:
an array with the indexes listed in $fieldArray and which holds the results of the methods in $funcArray on each object in the $inputList
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static make_table_with_key_is_id (inputList,
funcArray,
idFunction 
) [static]
-
-
- -

creates an array of information out of a list of objects which can be used to form a table with a key as id.

-

The idea is comparable to the make_table() function, though this time the results are stored in the index that is returned by the idFunction()

-
Parameters:
- - - - -
$inputListthe list of objects of which we want to make a table.
$funcArraya list of methods of that object we want to perform.
$idFunctiona function that returns an id that will be used as index to store our result
-
-
-
Returns:
an array which holds the results of the methods in $funcArray on each object in the $inputList, though thearrays indexes are formed by using the idFunction.
- -
-
- -
-
- - - - - - - - -
static time_elapsed_string (ptime) [static]
-
-
- -

returns the elapsed time from a timestamp up till now.

-
Parameters:
- - -
$ptimea timestamp.
-
-
-
Returns:
a string in the form of A years, B months, C days, D hours, E minutes, F seconds ago.
- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/gui_elements.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classHelpers.html b/code/web/docs/ams/html/classHelpers.html deleted file mode 100644 index e0109cd70..000000000 --- a/code/web/docs/ams/html/classHelpers.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - -Ryzom Account Management System: Helpers Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Helpers Class Reference
-
-
- -

Helper class for more site specific functions. - More...

- - - - - - - - - - - - - - -

-Static Public Member Functions

static loadTemplate ($template, $vars=array(), $returnHTML=false)
 workhorse of the website, it loads the template and shows it or returns th html.
static create_folders ()
 creates the folders that are needed for smarty.
static check_if_game_client ()
 check if the http request is sent ingame or not.
static handle_language ()
 Handles the language specific aspect.
static outputTime ($time, $str=1)
 Time output function for handling the time display.
static check_login_ingame ()
 Auto login function for ingame use.
-

Detailed Description

-

Helper class for more site specific functions.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Member Function Documentation

- -
-
- - - - - - - -
static check_if_game_client () [static]
-
-
- -

check if the http request is sent ingame or not.

-
Returns:
returns true in case it's sent ingame, else false is returned.
- -
-
- -
-
- - - - - - - -
static check_login_ingame () [static]
-
-
- -

Auto login function for ingame use.

-

This function will allow users who access the website ingame, to log in without entering the username and password. It uses the COOKIE entry in the open_ring db. it checks if the cookie sent by the http request matches the one in the db. This cookie in the db is changed everytime the user relogs.

-
Returns:
returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name.
- -
-
- -
-
- - - - - - - -
static create_folders () [static]
-
-
- -

creates the folders that are needed for smarty.

-
Todo:
for the drupal module it might be possible that drupal_mkdir needs to be used instead of mkdir, also this should be in the install.php instead.
- -
-
- -
-
- - - - - - - -
static handle_language () [static]
-
-
- -

Handles the language specific aspect.

-

The language can be changed by setting the $_GET['Language'] & $_GET['setLang'] together. This will also change the language entry of the user in the db. Cookies are also being used in case the user isn't logged in.

-
Returns:
returns the parsed content of the language .ini file related to the users language setting.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static loadTemplate (template,
vars = array (),
returnHTML = false 
) [static]
-
-
- -

workhorse of the website, it loads the template and shows it or returns th html.

-

it uses smarty to load the $template, but before displaying the template it will pass the $vars to smarty. Also based on your language settings a matching array of words & sentences for that page will be loaded. In case the $returnHTML parameter is set to true, it will return the html instead of displaying the template.

-
Parameters:
- - - - -
$templatethe name of the template(page) that we want to load.
$varsan array of variables that should be loaded by smarty before displaying or returning the html.
$returnHTML(default=false) if set to true, the html that should have been displayed, will be returned.
-
-
-
Returns:
in case $returnHTML=true, it returns the html of the template being loaded.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static outputTime (time,
str = 1 
) [static]
-
-
- -

Time output function for handling the time display.

-
Returns:
returns the time in the format specified in the $TIME_FORMAT global variable.
- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classIn__Support__Group.html b/code/web/docs/ams/html/classIn__Support__Group.html deleted file mode 100644 index 206752abf..000000000 --- a/code/web/docs/ams/html/classIn__Support__Group.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - -Ryzom Account Management System: In_Support_Group Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
In_Support_Group Class Reference
-
-
- -

Handles the linkage of users being in a support group. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'in_support_group' entry.
 delete ()
 deletes an existing 'in_support_group' entry.
 getUser ()
 get user attribute of the object.
 getGroup ()
 get group attribute of the object.
 setUser ($u)
 set user attribute of the object.
 setGroup ($g)
 set group attribute of the object.

-Static Public Member Functions

static userExistsInSGroup ($user_id, $group_id)
 Check if user is in in_support_group.

-Private Attributes

 $user
 The id of the user being in a support group.
 $group
 The id of the support group.
-

Detailed Description

-

Handles the linkage of users being in a support group.

-

Moderators and Admins can be part of a support group, this class offers functionality to check if a link between a user and group is existing.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'in_support_group' entry.

-

this method will use the object's attributes for creating a new 'in_support_group' entry in the database.

- -
-
- -
-
- - - - - - - -
delete ()
-
-
- -

deletes an existing 'in_support_group' entry.

-

this method will use the object's attributes for deleting an existing 'in_support_group' entry in the database.

- -
-
- -
-
- - - - - - - -
getGroup ()
-
-
- -

get group attribute of the object.

- -
-
- -
-
- - - - - - - -
getUser ()
-
-
- -

get user attribute of the object.

- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('User' => user_id, 'Group' => support_groups_id).
-
-
- -
-
- -
-
- - - - - - - - -
setGroup (g)
-
-
- -

set group attribute of the object.

-
Parameters:
- - -
$ginteger id of the support group
-
-
- -
-
- -
-
- - - - - - - - -
setUser (u)
-
-
- -

set user attribute of the object.

-
Parameters:
- - -
$uinteger id of the user
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static userExistsInSGroup (user_id,
group_id 
) [static]
-
-
- -

Check if user is in in_support_group.

-
Parameters:
- - - -
$user_idthe id of the user.
$group_idthe id of the support group.
-
-
-
Returns:
true is returned in case the user is in the support group, else false is returned.
- -
-
-

Field Documentation

- -
-
- - - - -
$group [private]
-
-
- -

The id of the support group.

- -
-
- -
-
- - - - -
$user [private]
-
-
- -

The id of the user being in a support group.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/in_support_group.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classMail__Handler.html b/code/web/docs/ams/html/classMail__Handler.html deleted file mode 100644 index a11be88a0..000000000 --- a/code/web/docs/ams/html/classMail__Handler.html +++ /dev/null @@ -1,524 +0,0 @@ - - - - - -Ryzom Account Management System: Mail_Handler Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

Handles the mailing functionality. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 cron ()
 the cron funtion (workhorse of the mailing system).
 new_message_id ($ticketId)
 creates a new message id for a email about to send.
 get_ticket_id_from_subject ($subject)
 try to fetch the ticket_id out of the subject.
 incoming_mail_handler ($mbox, $i, $group)
 Handles an incomming email Read the content of one email by using imap's functionality.
 decode_utf8 ($str)
 decode utf8
 get_mime_type (&$structure)
 returns the mime type of a structure of a email
 get_part ($stream, $msg_number, $mime_type, $structure=false, $part_number=false)

-Static Public Member Functions

static send_ticketing_mail ($receiver, $ticketObj, $content, $type, $sender=0)
 Wrapper for sending emails, creates the content of the email Based on the type of the ticketing mail it will create a specific email, it will use the language.ini files to load the correct language of the email for the receiver.
static send_mail ($recipient, $subject, $body, $ticket_id=0, $from=NULL)
 send mail function that will add the email to the db.

-Private Member Functions

 mail_fork ()
 Start a new child process and return the process id this is used because imap might take some time, we dont want the cron parent process waiting on that.

-Private Attributes

 $db
 db object used by various methods.
-

Detailed Description

-

Handles the mailing functionality.

-

This class covers the reading of the mail boxes of the support_groups, handling those emails, updating tickets accoring to the content & title of the emails, but also the sending of emails after creating a new ticket and when someone else replies on your ticket.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Member Function Documentation

- -
-
- - - - - - - -
cron ()
-
-
- -

the cron funtion (workhorse of the mailing system).

-

The cron job will create a child process, which will first send the emails that are in the email table in the database, we use some kind of semaphore (a temp file) to make sure that if the cron job is called multiple times, it wont email those mails multiple times. After this, we will read the mail inboxes of the support groups and the default group using IMAP and we will add new tickets or new replies according to the incoming emails.

- -
-
- -
-
- - - - - - - - -
decode_utf8 (str)
-
-
- -

decode utf8

-
Parameters:
- - -
$strstr to be decoded
-
-
-
Returns:
decoded string
- -
-
- -
-
- - - - - - - - -
get_mime_type (&$ structure)
-
-
- -

returns the mime type of a structure of a email

-
Parameters:
- - -
&$structurethe structure of an email message.
-
-
-
Returns:
"TEXT", "MULTIPART","MESSAGE", "APPLICATION", "AUDIO","IMAGE", "VIDEO", "OTHER","TEXT/PLAIN"
-
Todo:
take care of the HTML part of incoming emails.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get_part (stream,
msg_number,
mime_type,
structure = false,
part_number = false 
)
-
-
- -
-
- -
-
- - - - - - - - -
get_ticket_id_from_subject (subject)
-
-
- -

try to fetch the ticket_id out of the subject.

-

The subject should have a substring of the form [Ticket #ticket_id], where ticket_id should be the integer ID of the ticket.

-
Parameters:
- - -
$subjectthe subject of an incomming email.
-
-
-
Returns:
if the ticket's id is succesfully parsed, it will return the ticket_id, else it returns 0.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
incoming_mail_handler (mbox,
i,
group 
)
-
-
- -

Handles an incomming email Read the content of one email by using imap's functionality.

-

If a ticket id is found inside the message_id or else in the subject line, then a reply will be added (if the email is not being sent from the authors email address it won't be added though and a warning will be sent to both parties). If no ticket id is found, then a new ticket will be created.

-
Parameters:
- - - - -
$mboxa mailbox object
$ithe email's id in the mailbox (integer)
$groupthe group object that owns the inbox.
-
-
-
Returns:
a string based on the found ticket i and timestamp (will be used to store a copy of the email locally)
- -
-
- -
-
- - - - - - - -
mail_fork () [private]
-
-
- -

Start a new child process and return the process id this is used because imap might take some time, we dont want the cron parent process waiting on that.

-
Returns:
return the child process id
- -
-
- -
-
- - - - - - - - -
new_message_id (ticketId)
-
-
- -

creates a new message id for a email about to send.

-
Parameters:
- - -
$ticketIdthe ticket id of the ticket that is mentioned in the email.
-
-
-
Returns:
returns a string, that consist out of some variable parts, a consistent part and the ticket_id. The ticket_id will be used lateron, if someone replies on the message, to see to which ticket the reply should be added.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static send_mail (recipient,
subject,
body,
ticket_id = 0,
from = NULL 
) [static]
-
-
- -

send mail function that will add the email to the db.

-

this function is being used by the send_ticketing_mail() function. It adds the email as an entry to the `email` table in the database, which will be sent later on when we run the cron job.

-
Parameters:
- - - - - - -
$recipientif integer, then it refers to the id of the user to whom we want to mail, if it's a string(email-address) then we will use that.
$subjectthe subject of the email
$bodythe body of the email
$ticket_idthe id of the ticket
$fromthe sending support_group's id (NULL in case the default group is sending))
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static send_ticketing_mail (receiver,
ticketObj,
content,
type,
sender = 0 
) [static]
-
-
- -

Wrapper for sending emails, creates the content of the email Based on the type of the ticketing mail it will create a specific email, it will use the language.ini files to load the correct language of the email for the receiver.

-

Also if the $TICKET_MAILING_SUPPORT is set to false or if the user's personal 'ReceiveMail' entry is set to false then no mail will be sent.

-
Parameters:
- - - - - - -
$receiverif integer, then it refers to the id of the user to whom we want to mail, if it's a string(email-address) then we will use that.
$ticketObjthe ticket object itself, this is being used for including ticket related information into the email.
$contentthe content of a reply or new ticket
$typeREPLY, NEW, WARNAUTHOR, WARNSENDER, WARNUNKNOWNSENDER
$sender(default = 0 (if it is not forwarded)) else use the id of the support group to which the ticket is currently forwarded, the support groups email address will be used to send the ticket.
-
-
- -
-
-

Field Documentation

- -
-
- - - - -
$db [private]
-
-
- -

db object used by various methods.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classMyCrypt.html b/code/web/docs/ams/html/classMyCrypt.html deleted file mode 100644 index f08d22b88..000000000 --- a/code/web/docs/ams/html/classMyCrypt.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - -Ryzom Account Management System: MyCrypt Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

Basic encryption/decryption class. - More...

- - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ($cryptinfo)
 constructor.
 encrypt ($data)
 encrypts by using the given enc_method and hash_method.
 decrypt ($edata)
 decrypts by using the given enc_method and hash_method.

-Static Private Member Functions

static hashIV ($key, $method, $iv_size)
 hashes the key by using a hash method specified.
static check_methods ($enc, $hash)
 checks if the encryption and hash methods are supported

-Private Attributes

 $config
 array that should contain the enc_method & hash_method & key
-

Detailed Description

-

Basic encryption/decryption class.

-

We use this class atm for encrypting & decrypting the imap passwords.

-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
__construct (cryptinfo)
-
-
- -

constructor.

-

loads the config array with the given argument.

-
Parameters:
- - -
$cryptinfoan array containing the info needed to encrypt & decrypt.(enc_method & hash_method & key)
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
static check_methods (enc,
hash 
) [static, private]
-
-
- -

checks if the encryption and hash methods are supported

-
Parameters:
- - - -
$encthe encryption method.
$hashthe hash method.
-
-
-
Exceptions:
- - -
Exceptionin case a method is not supported.
-
-
- -
-
- -
-
- - - - - - - - -
decrypt (edata)
-
-
- -

decrypts by using the given enc_method and hash_method.

-
Parameters:
- - -
$edatathe encrypted string that we want to decrypt
-
-
-
Returns:
the decrypted string.
- -
-
- -
-
- - - - - - - - -
encrypt (data)
-
-
- -

encrypts by using the given enc_method and hash_method.

-

It will first check if the methods are supported, if not it will throw an error, if so it will encrypt the $data

-
Parameters:
- - -
$datathe string that we want to encrypt.
-
-
-
Returns:
the encrypted string.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static hashIV (key,
method,
iv_size 
) [static, private]
-
-
- -

hashes the key by using a hash method specified.

-
Parameters:
- - - - -
$keythe key to be hashed
$methodthe metho of hashing to be used
$iv_sizethe size of the initialization vector.
-
-
-
Returns:
return the hashed key up till the size of the iv_size param.
- -
-
-

Field Documentation

- -
-
- - - - -
$config [private]
-
-
- -

array that should contain the enc_method & hash_method & key

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mycrypt.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classPagination.html b/code/web/docs/ams/html/classPagination.html deleted file mode 100644 index 3623ac807..000000000 --- a/code/web/docs/ams/html/classPagination.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - -Ryzom Account Management System: Pagination Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Pagination Class Reference
-
-
- -

Handles returning arrays based on a given pagenumber. - More...

- - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ($query, $db, $nrDisplayed, $resultClass, $params=array())
 Constructor.
 getLast ()
 return the number of the 'last' object attribute
 getCurrent ()
 return the number of the 'current' object attribute
 getElements ()
 return the elements array of the object
 getAmountOfRows ()
 return total amount of rows for the original query
 getLinks ($nrOfLinks)
 return the page links.

-Private Attributes

 $element_array
 Array containing the elements that are extracted for that specific page number.
 $last
 The last page number.
 $current
 The current page number (read from $_GET['pagenum'])
 $amountOfRows
 Total amount of rows that a query would return (if no limits would be used)
-

Detailed Description

-

Handles returning arrays based on a given pagenumber.

-

By specifing a $_GET['pagenum'] or if not(page = 1 will be used) a few elements from a specific query will be returned. Not all elements have to be loaded into objects, only the elements needed for that specific page, this is a good thing performance wise. This is done by passign the query to the constructor and specifying how many you want to display.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__construct (query,
db,
nrDisplayed,
resultClass,
params = array() 
)
-
-
- -

Constructor.

-

will fetch the correct elements that match to a specific page (specified by the $_GET['pagenum'] variable). The query has to be passed as a string to the function that way it will only load the specific elements that are related to the pagenumber. The $params, parameter is optional and is used to pass the parameters for the query. The result class will be used to instantiate the found elements with, their set() function will be called. The class its getters can be later used to get the info out of the object.

-
Parameters:
- - - - - - -
$querythe query to be paginated
$dbthe db on which the query should be performed
$nrDisplayedthe amount of elements that should be displayed /page
$resultClassthe elements that should be returned should be of that specific class.
$paramsthe parameters used by the query (optional)
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
getAmountOfRows ()
-
-
- -

return total amount of rows for the original query

-
Returns:
the total amount of rows for the original query
- -
-
- -
-
- - - - - - - -
getCurrent ()
-
-
- -

return the number of the 'current' object attribute

-
Returns:
the number of the current page
- -
-
- -
-
- - - - - - - -
getElements ()
-
-
- -

return the elements array of the object

-
Returns:
the elements of a specific page (these are instantiations of the class passed as parameter ($resultClass) to the constructor)
- -
-
- -
-
- - - - - - - -
getLast ()
-
-
- -

return the number of the 'last' object attribute

-
Returns:
the number of the last page
- -
-
- -
-
- - - - - - - - -
getLinks (nrOfLinks)
-
-
- -

return the page links.

-

(for browsing the pages, placed under a table for example) the $nrOfLinks parameter specifies the amount of links you want to return. it will show the links closest to the current page on both sides (in case one side can't show more, it will show more on the other side)

-
Returns:
an array of integerswhich refer to the clickable pagenumbers for browsing other pages.
- -
-
-

Field Documentation

- -
-
- - - - -
$amountOfRows [private]
-
-
- -

Total amount of rows that a query would return (if no limits would be used)

- -
-
- -
-
- - - - -
$current [private]
-
-
- -

The current page number (read from $_GET['pagenum'])

- -
-
- -
-
- - - - -
$element_array [private]
-
-
- -

Array containing the elements that are extracted for that specific page number.

- -
-
- -
-
- - - - -
$last [private]
-
-
- -

The last page number.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/pagination.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classQuerycache.html b/code/web/docs/ams/html/classQuerycache.html deleted file mode 100644 index 320125d43..000000000 --- a/code/web/docs/ams/html/classQuerycache.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - -Ryzom Account Management System: Querycache Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Querycache Class Reference
-
-
- -

class for storing changes when shard is offline. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 load_With_SID ($id)
 loads the object's attributes.
 update ()
 updates the entry.
 getSID ()
 get SID attribute of the object.
 getType ()
 get type attribute of the object.
 getQuery ()
 get query attribute of the object.
 getDb ()
 get db attribute of the object.
 setSID ($s)
 set SID attribute of the object.
 setType ($t)
 set type attribute of the object.
 setQuery ($q)
 set query attribute of the object.
 setDb ($d)
 set db attribute of the object.

-Private Attributes

 $SID
 The queries ID.
 $type
 The type of query.
 $query
 The query itself (json encoded)
 $db
 the db where the query should be performed
-

Detailed Description

-

class for storing changes when shard is offline.

-
Todo:
make sure that the querycache class is being used by the sync class and also for inserting the queries themselfs into it. Atm this class isn't used yet if I remember correctly
-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
getDb ()
-
-
- -

get db attribute of the object.

- -
-
- -
-
- - - - - - - -
getQuery ()
-
-
- -

get query attribute of the object.

- -
-
- -
-
- - - - - - - -
getSID ()
-
-
- -

get SID attribute of the object.

- -
-
- -
-
- - - - - - - -
getType ()
-
-
- -

get type attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_SID (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a SID as parameter

-
Parameters:
- - -
$idthe id of the querycaches row
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('SID' => sid, 'type' => type, 'query' => query, 'db' => db).
-
-
- -
-
- -
-
- - - - - - - - -
setDb (d)
-
-
- -

set db attribute of the object.

-
Parameters:
- - -
$dthe name of the database in the config global var that we want to use.
-
-
- -
-
- -
-
- - - - - - - - -
setQuery (q)
-
-
- -

set query attribute of the object.

-
Parameters:
- - -
$qquery string
-
-
- -
-
- -
-
- - - - - - - - -
setSID (s)
-
-
- -

set SID attribute of the object.

-
Parameters:
- - -
$sinteger id
-
-
- -
-
- -
-
- - - - - - - - -
setType (t)
-
-
- -

set type attribute of the object.

-
Parameters:
- - -
$ttype of the query, could be changePassword, changePermissions, changeEmail, createUser
-
-
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

updates the entry.

- -
-
-

Field Documentation

- -
-
- - - - -
$db [private]
-
-
- -

the db where the query should be performed

- -
-
- -
-
- - - - -
$query [private]
-
-
- -

The query itself (json encoded)

- -
-
- -
-
- - - - -
$SID [private]
-
-
- -

The queries ID.

- -
-
- -
-
- - - - -
$type [private]
-
-
- -

The type of query.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/querycache.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classSupport__Group.html b/code/web/docs/ams/html/classSupport__Group.html deleted file mode 100644 index badfc9e03..000000000 --- a/code/web/docs/ams/html/classSupport__Group.html +++ /dev/null @@ -1,1082 +0,0 @@ - - - - - -Ryzom Account Management System: Support_Group Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

groups moderators & admins together. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'support_group' entry.
 load_With_SGroupId ($id)
 loads the object's attributes.
 update ()
 update the objects attributes to the db.
 delete ()
 deletes an existing 'support_group' entry.
 getSGroupId ()
 get sGroupId attribute of the object.
 getName ()
 get name attribute of the object.
 getTag ()
 get tag attribute of the object.
 getGroupEmail ()
 get groupEmail attribute of the object.
 getIMAP_MailServer ()
 get iMAP_MailServer attribute of the object.
 getIMAP_Username ()
 get iMAP_Username attribute of the object.
 getIMAP_Password ()
 get iMAP_Password attribute of the object.
 setSGroupId ($id)
 set sGroupId attribute of the object.
 setName ($n)
 set name attribute of the object.
 setTag ($t)
 set tag attribute of the object.
 setGroupEmail ($ge)
 set groupEmail attribute of the object.
 setIMAP_MailServer ($ms)
 set iMAP_MailServer attribute of the object.
 setIMAP_Username ($u)
 set iMAP_Username attribute of the object.
 setIMAP_Password ($p)
 set iMAP_Password attribute of the object.

-Static Public Member Functions

static getGroup ($id)
 return a specific support_group object.
static getGroups ()
 return all support_group objects.
static createSupportGroup ($name, $tag, $groupemail, $imap_mailserver, $imap_username, $imap_password)
 Wrapper for creating a support group.
static supportGroup_EntryNotExists ($name, $tag)
 check if support group name/tag doesn't exist yet.
static supportGroup_Exists ($id)
 check if support group entry coupled to a given id exist or not.
static constr_SGroupId ($id)
 construct an object based on the SGroupId.
static getAllUsersOfSupportGroup ($group_id)
 get list of all users that are enlisted to a support group.
static deleteSupportGroup ($group_id)
 wrapper for deleting a support group.
static deleteUserOfSupportGroup ($user_id, $group_id)
 wrapper for deleting a user that's in a specified support group.
static addUserToSupportGroup ($user_id, $group_id)
 wrapper for adding a user to a specified support group.
static getAllSupportGroups ()
 return all support_group objects.

-Private Attributes

 $sGroupId
 The id of the support group.
 $name
 The name of the support group.
 $tag
 The tag of the support group, a tag is max 4 letters big, and will be used in the future as easy reference to indicate what group it is refered to (eg [DEV])
 $groupEmail
 The email address of the group.
 $iMAP_MailServer
 The imap server connection string.
 $iMAP_Username
 The imap username of the account.
 $iMAP_Password
 The imap matching password.
-

Detailed Description

-

groups moderators & admins together.

-

A Support Group is a group of people with the same skills or knowledge. A typical example will be the (Developers group, webteam group, management, etc..) The idea is that tickets can be forwarded to a group of persons that might be able to answer that specific question. Support Groups are also the key of handling the emails, because the email addresses of the support groups will be used by the Mail_Handler class.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
static addUserToSupportGroup (user_id,
group_id 
) [static]
-
-
- -

wrapper for adding a user to a specified support group.

-

We will first check if the group really exists, if not than "GROUP_NOT_EXISING" will be returned. Afterwards we will check if the user exists in the support group, if so "ALREADY_ADDED" will be returned. Else the user will be added to the in_support_group table and "SUCCESS" will be returned.

-
Parameters:
- - - -
$user_idthe id of the user we want to add to the group.
$group_idthe id of the group the user wants to be in
-
-
-
Returns:
a string (SUCCESS, ALREADY_ADDED or GROUP_NOT_EXISTING)
- -
-
- -
-
- - - - - - - - -
static constr_SGroupId (id) [static]
-
-
- -

construct an object based on the SGroupId.

-
Parameters:
- - -
$idthe id of the group we want to construct
-
-
-
Returns:
the constructed support group object
- -
-
- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'support_group' entry.

-

this method will use the object's attributes for creating a new 'support_group' entry in the database.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static createSupportGroup (name,
tag,
groupemail,
imap_mailserver,
imap_username,
imap_password 
) [static]
-
-
- -

Wrapper for creating a support group.

-

It will check if the support group doesn't exist yet, if the tag or name already exists then NAME_TAKEN or TAG_TAKEN will be returned. If the name is bigger than 20 characters or smaller than 4 and the tag greater than 7 or smaller than 2 a SIZE_ERROR will be returned. Else it will return SUCCESS

-
Returns:
a string that specifies if it was a success or not (SUCCESS, SIZE_ERROR, NAME_TAKEN or TAG_TAKEN )
- -
-
- -
-
- - - - - - - -
delete ()
-
-
- -

deletes an existing 'support_group' entry.

-

this method will use the object's attributes for deleting an existing 'support_group' entry in the database.

- -
-
- -
-
- - - - - - - - -
static deleteSupportGroup (group_id) [static]
-
-
- -

wrapper for deleting a support group.

-

We will first check if the group really exists, if not than "GROUP_NOT_EXISING" will be returned.

-
Parameters:
- - -
$group_idthe id of the group we want to delete
-
-
-
Returns:
an array of ticket_user objects that are in the support group.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static deleteUserOfSupportGroup (user_id,
group_id 
) [static]
-
-
- -

wrapper for deleting a user that's in a specified support group.

-

We will first check if the group really exists, if not than "GROUP_NOT_EXISING" will be returned. Afterwards we will check if the user exists in the support group, if not "USER_NOT_IN_GROUP" will be returned. Else the users entry in the in_support_group table will be deleted and "SUCCESS" will be returned.

-
Parameters:
- - - -
$user_idthe id of the user we want to remove out of the group.
$group_idthe id of the group the user should be in
-
-
-
Returns:
a string (SUCCESS, USER_NOT_IN_GROUP or GROUP_NOT_EXISTING)
- -
-
- -
-
- - - - - - - -
static getAllSupportGroups () [static]
-
-
- -

return all support_group objects.

-
Returns:
an array containing all support_group objects.
-
Deprecated:
should be removed in the future, because getGroups does the same.
- -
-
- -
-
- - - - - - - - -
static getAllUsersOfSupportGroup (group_id) [static]
-
-
- -

get list of all users that are enlisted to a support group.

-
Parameters:
- - -
$group_idthe id of the group we want to query
-
-
-
Returns:
an array of ticket_user objects that are in the support group.
- -
-
- -
-
- - - - - - - - -
static getGroup (id) [static]
-
-
- -

return a specific support_group object.

-
Parameters:
- - -
$idthe id of the support group that we want to return
-
-
-
Returns:
a support_group object.
- -
-
- -
-
- - - - - - - -
getGroupEmail ()
-
-
- -

get groupEmail attribute of the object.

- -
-
- -
-
- - - - - - - -
static getGroups () [static]
-
-
- -

return all support_group objects.

-
Returns:
an array containing all support_group objects.
- -
-
- -
-
- - - - - - - -
getIMAP_MailServer ()
-
-
- -

get iMAP_MailServer attribute of the object.

- -
-
- -
-
- - - - - - - -
getIMAP_Password ()
-
-
- -

get iMAP_Password attribute of the object.

- -
-
- -
-
- - - - - - - -
getIMAP_Username ()
-
-
- -

get iMAP_Username attribute of the object.

- -
-
- -
-
- - - - - - - -
getName ()
-
-
- -

get name attribute of the object.

- -
-
- -
-
- - - - - - - -
getSGroupId ()
-
-
- -

get sGroupId attribute of the object.

- -
-
- -
-
- - - - - - - -
getTag ()
-
-
- -

get tag attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_SGroupId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a group id, it will put the matching groups attributes in the object.

-
Parameters:
- - -
$idthe id of the support group that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('SGroupId' => groupid, 'Name' => name, 'Tag' => tag, 'GroupEmail' => mail, 'IMAP_MailServer' => server, 'IMAP_Username' => username,'IMAP_Password' => pass).
-
-
- -
-
- -
-
- - - - - - - - -
setGroupEmail (ge)
-
-
- -

set groupEmail attribute of the object.

-
Parameters:
- - -
$geemail of the group
-
-
- -
-
- -
-
- - - - - - - - -
setIMAP_MailServer (ms)
-
-
- -

set iMAP_MailServer attribute of the object.

-
Parameters:
- - -
$msmailserver of the group
-
-
- -
-
- -
-
- - - - - - - - -
setIMAP_Password (p)
-
-
- -

set iMAP_Password attribute of the object.

-
Parameters:
- - -
$pimap password of the group
-
-
- -
-
- -
-
- - - - - - - - -
setIMAP_Username (u)
-
-
- -

set iMAP_Username attribute of the object.

-
Parameters:
- - -
$uimap username of the group
-
-
- -
-
- -
-
- - - - - - - - -
setName (n)
-
-
- -

set name attribute of the object.

-
Parameters:
- - -
$nname of the group
-
-
- -
-
- -
-
- - - - - - - - -
setSGroupId (id)
-
-
- -

set sGroupId attribute of the object.

-
Parameters:
- - -
$idinteger id of the group
-
-
- -
-
- -
-
- - - - - - - - -
setTag (t)
-
-
- -

set tag attribute of the object.

-
Parameters:
- - -
$ttag of the group
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static supportGroup_EntryNotExists (name,
tag 
) [static]
-
-
- -

check if support group name/tag doesn't exist yet.

-
Parameters:
- - - -
$namethe name of the group we want to check
$tagthe tag of the group we want to check
-
-
-
Returns:
if name is already taken return NAME_TAKEN, else if tag is already taken return TAG_TAKEN, else return success.
- -
-
- -
-
- - - - - - - - -
static supportGroup_Exists (id) [static]
-
-
- -

check if support group entry coupled to a given id exist or not.

-
Parameters:
- - -
$idthe id of the group we want to check
-
-
-
Returns:
true or false.
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

update the objects attributes to the db.

- -
-
-

Field Documentation

- -
-
- - - - -
$groupEmail [private]
-
-
- -

The email address of the group.

- -
-
- -
-
- - - - -
$iMAP_MailServer [private]
-
-
- -

The imap server connection string.

- -
-
- -
-
- - - - -
$iMAP_Password [private]
-
-
- -

The imap matching password.

- -
-
- -
-
- - - - -
$iMAP_Username [private]
-
-
- -

The imap username of the account.

- -
-
- -
-
- - - - -
$name [private]
-
-
- -

The name of the support group.

- -
-
- -
-
- - - - -
$sGroupId [private]
-
-
- -

The id of the support group.

- -
-
- -
-
- - - - -
$tag [private]
-
-
- -

The tag of the support group, a tag is max 4 letters big, and will be used in the future as easy reference to indicate what group it is refered to (eg [DEV])

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classSync.html b/code/web/docs/ams/html/classSync.html deleted file mode 100644 index a8dd8f45e..000000000 --- a/code/web/docs/ams/html/classSync.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -Ryzom Account Management System: Sync Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Sync Class Reference
-
-
- -

handler for performing changes when shard is back online after being offline. - More...

- - - - -

-Static Public Member Functions

static syncdata ()
 performs the actions listed in the querycache.
-

Detailed Description

-

handler for performing changes when shard is back online after being offline.

-

the sync class is responsible for the syncdata function, which will synchronise the website with the shard (when the shard is offline, users can still change their password, email or even register)

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Member Function Documentation

- -
-
- - - - - - - -
static syncdata () [static]
-
-
- -

performs the actions listed in the querycache.

-

All entries in the querycache will be read and performed depending on their type. This is done because the shard could have been offline and we want changes made on the website (which is still online) to eventually hit the shard. These changes are: createPermissions, createUser, change_pass, change_mail

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sync.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket.html b/code/web/docs/ams/html/classTicket.html deleted file mode 100644 index 939c11d57..000000000 --- a/code/web/docs/ams/html/classTicket.html +++ /dev/null @@ -1,1429 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

class that handles most ticket related functions. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'ticket' entry.
 load_With_TId ($id)
 loads the object's attributes.
 update ()
 update the objects attributes to the db.
 hasInfo ()
 check if a ticket has a ticket_info page or not.
 getTId ()
 get tId attribute of the object.
 getTimestamp ()
 get timestamp attribute of the object in the format defined in the outputTime function of the Helperclass.
 getTitle ()
 get title attribute of the object.
 getStatus ()
 get status attribute of the object.
 getStatusText ()
 get status attribute of the object in the form of text (string).
 getCategoryName ()
 get category attribute of the object in the form of text (string).
 getQueue ()
 get queue attribute of the object.
 getTicket_Category ()
 get ticket_category attribute of the object (int).
 getAuthor ()
 get author attribute of the object (int).
 getPriority ()
 get priority attribute of the object (int).
 getPriorityText ()
 get priority attribute of the object in the form of text (string).
 getAssigned ()
 get the user assigned to the ticket.
 getForwardedGroupName ()
 get the name of the support group to whom the ticket is forwarded or return 0 in case not forwarded.
 getForwardedGroupId ()
 get the id of the support group to whom the ticket is forwarded or return 0 in case not forwarded.
 setTId ($id)
 set tId attribute of the object.
 setTimestamp ($ts)
 set timestamp attribute of the object.
 setTitle ($t)
 set title attribute of the object.
 setStatus ($s)
 set status attribute of the object.
 setQueue ($q)
 set queue attribute of the object.
 setTicket_Category ($tc)
 set ticket_category attribute of the object.
 setAuthor ($a)
 set author attribute of the object.
 setPriority ($p)
 set priority attribute of the object.

-Static Public Member Functions

static ticketExists ($id)
 check if a ticket exists.
static getStatusArray ()
 return an array of the possible statuses
static getPriorityArray ()
 return an array of the possible priorities
static getEntireTicket ($id, $view_as_admin)
 return an entire ticket.
static getTicketsOf ($author)
 return all tickets of a specific user.
static create_Ticket ($title, $content, $category, $author, $real_author, $for_support_group=0, $extra_info=0)
 function that creates a new ticket.
static updateTicketStatus ($ticket_id, $newStatus, $author)
 updates the ticket's status.
static updateTicketStatusAndPriority ($ticket_id, $newStatus, $newPriority, $author)
 updates the ticket's status & priority.
static getLatestReply ($ticket_id)
 return the latest reply of a ticket
static createReply ($content, $author, $ticket_id, $hidden)
 create a new reply for a ticket.
static assignTicket ($user_id, $ticket_id)
 assign a ticket to a user.
static unAssignTicket ($user_id, $ticket_id)
 unassign a ticket of a user.
static forwardTicket ($user_id, $ticket_id, $group_id)
 forward a ticket to a specific support group.

-Private Attributes

 $tId
 The id of ticket.
 $timestamp
 Timestamp of the ticket.
 $title
 Title of the ticket.
 $status
 Status of the ticket (0 = waiting on user reply, 1 = waiting on support, (2= not used atm), 3 = closed.
 $queue
 (not in use atm)
 $ticket_category
 the id of the category belonging to the ticket
 $author
 The ticket_users id.
 $priority
 The priority of the ticket where 0 = low, 3= supadupahigh.
-

Detailed Description

-

class that handles most ticket related functions.

-

the ticket class is used for most ticketing related functions, it also holds some wrapper functions.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
static assignTicket (user_id,
ticket_id 
) [static]
-
-
- -

assign a ticket to a user.

-

Checks if the ticket exists, if so then it will try to assign the user to it, a log entry will be written about this.

-
Parameters:
- - - -
$user_idthe id of user trying to be assigned to the ticket.
$ticket_idthe id of the ticket that we try to assign to the user.
-
-
-
Returns:
SUCCESS_ASSIGNED, TICKET_NOT_EXISTING or ALREADY_ASSIGNED
- -
-
- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'ticket' entry.

-

this method will use the object's attributes for creating a new 'ticket' entry in the database.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static create_Ticket (title,
content,
category,
author,
real_author,
for_support_group = 0,
extra_info = 0 
) [static]
-
-
- -

function that creates a new ticket.

-

A new ticket will be created, in case the extra_info != 0 and the http request came from ingame, then a ticket_info page will be created. A log entry will be written, depending on the $real_authors value. In case the for_support_group parameter is set, the ticket will be forwarded immediately. Also the mail handler will create a new email that will be sent to the author to notify him that his ticket is freshly created.

-
Parameters:
- - - - - - - - -
$titlethe title we want to give to the ticket.
$contentthe content we want to give to the starting post of the ticket.
$categorythe id of the category that should be related to the ticket.
$authorthe person who's id will be stored in the database as creator of the ticket.
$real_authorshould be the same id, or a moderator/admin who creates a ticket for another user (this is used for logging purposes).
$for_support_groupin case you directly want to forward the ticket after creating it. (default value = 0 = don't forward)
$extra_infoused for creating an ticket_info page related to the ticket, this only happens when the ticket is made ingame.
-
-
-
Returns:
the created tickets id.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static createReply (content,
author,
ticket_id,
hidden 
) [static]
-
-
- -

create a new reply for a ticket.

-

A reply will only be added if the content isn't empty and if the ticket isn't closed. The ticket creator will be notified by email that someone else replied on his ticket.

-
Parameters:
- - - - - -
$contentthe content of the reply
$authorthe author of the reply
$ticket_idthe id of the ticket to which we want to add the reply.
$hiddenboolean that specifies if the reply should only be shown to mods/admins or all users.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static forwardTicket (user_id,
ticket_id,
group_id 
) [static]
-
-
- -

forward a ticket to a specific support group.

-

Checks if the ticket exists, if so then it will try to forward the ticket to the support group specified, a log entry will be written about this. if no log entry should be written then the user_id should be 0, else te $user_id will be used in the log to specify who forwarded it.

-
Parameters:
- - - - -
$user_idthe id of user trying to forward the ticket.
$ticket_idthe id of the ticket that we try to forward to a support group.
$group_idthe id of the support group.
-
-
-
Returns:
SUCCESS_FORWARDED, TICKET_NOT_EXISTING or INVALID_SGROUP
- -
-
- -
-
- - - - - - - -
getAssigned ()
-
-
- -

get the user assigned to the ticket.

-

or return 0 in case not assigned.

- -
-
- -
-
- - - - - - - -
getAuthor ()
-
-
- -

get author attribute of the object (int).

- -
-
- -
-
- - - - - - - -
getCategoryName ()
-
-
- -

get category attribute of the object in the form of text (string).

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static getEntireTicket (id,
view_as_admin 
) [static]
-
-
- -

return an entire ticket.

-

returns the ticket object and an array of all replies to that ticket.

-
Parameters:
- - - -
$idthe id of the ticket.
$view_as_admintrue if the viewer of the ticket is a mod, else false (depending on this it will also show the hidden comments)
-
-
-
Returns:
an array containing the 'ticket_obj' and a 'reply_array', which is an array containing all replies to that ticket.
- -
-
- -
-
- - - - - - - -
getForwardedGroupId ()
-
-
- -

get the id of the support group to whom the ticket is forwarded or return 0 in case not forwarded.

- -
-
- -
-
- - - - - - - -
getForwardedGroupName ()
-
-
- -

get the name of the support group to whom the ticket is forwarded or return 0 in case not forwarded.

- -
-
- -
-
- - - - - - - - -
static getLatestReply (ticket_id) [static]
-
-
- -

return the latest reply of a ticket

-
Parameters:
- - -
$ticket_idthe id of the ticket.
-
-
-
Returns:
a ticket_reply object.
- -
-
- -
-
- - - - - - - -
getPriority ()
-
-
- -

get priority attribute of the object (int).

- -
-
- -
-
- - - - - - - -
static getPriorityArray () [static]
-
-
- -

return an array of the possible priorities

-
Returns:
an array containing the string values that represent the different priorities.
- -
-
- -
-
- - - - - - - -
getPriorityText ()
-
-
- -

get priority attribute of the object in the form of text (string).

- -
-
- -
-
- - - - - - - -
getQueue ()
-
-
- -

get queue attribute of the object.

- -
-
- -
-
- - - - - - - -
getStatus ()
-
-
- -

get status attribute of the object.

- -
-
- -
-
- - - - - - - -
static getStatusArray () [static]
-
-
- -

return an array of the possible statuses

-
Returns:
an array containing the string values that represent the different statuses.
- -
-
- -
-
- - - - - - - -
getStatusText ()
-
-
- -

get status attribute of the object in the form of text (string).

- -
-
- -
-
- - - - - - - -
getTicket_Category ()
-
-
- -

get ticket_category attribute of the object (int).

- -
-
- -
-
- - - - - - - - -
static getTicketsOf (author) [static]
-
-
- -

return all tickets of a specific user.

-

an array of all tickets created by a specific user are returned by this function.

-
Parameters:
- - -
$authorthe id of the user of whom we want all tickets from.
-
-
-
Returns:
an array containing all ticket objects related to a user.
- -
-
- -
-
- - - - - - - -
getTId ()
-
-
- -

get tId attribute of the object.

- -
-
- -
-
- - - - - - - -
getTimestamp ()
-
-
- -

get timestamp attribute of the object in the format defined in the outputTime function of the Helperclass.

- -
-
- -
-
- - - - - - - -
getTitle ()
-
-
- -

get title attribute of the object.

- -
-
- -
-
- - - - - - - -
hasInfo ()
-
-
- -

check if a ticket has a ticket_info page or not.

-
Returns:
true or false
- -
-
- -
-
- - - - - - - - -
load_With_TId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a TId (ticket id).

-
Parameters:
- - -
$idthe id of the ticket that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('TId' => ticket_id, 'Title' => title, 'Status'=> status, 'Timestamp' => ts, 'Queue' => queue, 'Ticket_Category' => tc, 'Author' => author, 'Priority' => priority).
-
-
- -
-
- -
-
- - - - - - - - -
setAuthor (a)
-
-
- -

set author attribute of the object.

-
Parameters:
- - -
$aauthor of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setPriority (p)
-
-
- -

set priority attribute of the object.

-
Parameters:
- - -
$ppriority of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setQueue (q)
-
-
- -

set queue attribute of the object.

-
Parameters:
- - -
$qqueue of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setStatus (s)
-
-
- -

set status attribute of the object.

-
Parameters:
- - -
$sstatus of the ticket(int)
-
-
- -
-
- -
-
- - - - - - - - -
setTicket_Category (tc)
-
-
- -

set ticket_category attribute of the object.

-
Parameters:
- - -
$tcticket_category id of the ticket(int)
-
-
- -
-
- -
-
- - - - - - - - -
setTId (id)
-
-
- -

set tId attribute of the object.

-
Parameters:
- - -
$idinteger id of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setTimestamp (ts)
-
-
- -

set timestamp attribute of the object.

-
Parameters:
- - -
$tstimestamp of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setTitle (t)
-
-
- -

set title attribute of the object.

-
Parameters:
- - -
$ttitle of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
static ticketExists (id) [static]
-
-
- -

check if a ticket exists.

-
Parameters:
- - -
$idthe id of the ticket to be checked.
-
-
-
Returns:
true if the ticket exists, else false.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static unAssignTicket (user_id,
ticket_id 
) [static]
-
-
- -

unassign a ticket of a user.

-

Checks if the ticket exists, if so then it will try to unassign the user of it, a log entry will be written about this.

-
Parameters:
- - - -
$user_idthe id of user trying to be assigned to the ticket.
$ticket_idthe id of the ticket that we try to assign to the user.
-
-
-
Returns:
SUCCESS_UNASSIGNED, TICKET_NOT_EXISTING or NOT_ASSIGNED
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

update the objects attributes to the db.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static updateTicketStatus (ticket_id,
newStatus,
author 
) [static]
-
-
- -

updates the ticket's status.

-

A log entry about this will be created only if the newStatus is different from the current status.

-
Parameters:
- - - - -
$ticket_idthe id of the ticket of which we want to change the status.
$newStatusthe new status value (integer)
$authorthe user (id) that performed the update status action
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static updateTicketStatusAndPriority (ticket_id,
newStatus,
newPriority,
author 
) [static]
-
-
- -

updates the ticket's status & priority.

-

A log entry about this will be created only if the newStatus is different from the current status and also when the newPriority is different from the current priority.

-
Todo:
break this function up into a updateStatus (already exists) and updatePriority function and perhaps write a wrapper function for the combo.
-
Parameters:
- - - - - -
$ticket_idthe id of the ticket of which we want to change the status & priority
$newStatusthe new status value (integer)
$newPrioritythe new priority value (integer)
$authorthe user (id) that performed the update
-
-
- -
-
-

Field Documentation

- -
-
- - - - -
$author [private]
-
-
- -

The ticket_users id.

- -
-
- -
-
- - - - -
$priority [private]
-
-
- -

The priority of the ticket where 0 = low, 3= supadupahigh.

- -
-
- -
-
- - - - -
$queue [private]
-
-
- -

(not in use atm)

- -
-
- -
-
- - - - -
$status [private]
-
-
- -

Status of the ticket (0 = waiting on user reply, 1 = waiting on support, (2= not used atm), 3 = closed.

- -
-
- -
-
- - - - -
$ticket_category [private]
-
-
- -

the id of the category belonging to the ticket

- -
-
- -
-
- - - - -
$tId [private]
-
-
- -

The id of ticket.

- -
-
- -
-
- - - - -
$timestamp [private]
-
-
- -

Timestamp of the ticket.

- -
-
- -
-
- - - - -
$title [private]
-
-
- -

Title of the ticket.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Category.html b/code/web/docs/ams/html/classTicket__Category.html deleted file mode 100644 index 4a04b6b8d..000000000 --- a/code/web/docs/ams/html/classTicket__Category.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Category Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Ticket_Category Class Reference
-
-
- -

Class related to the ticket categories. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 load_With_TCategoryId ($id)
 loads the object's attributes.
 update ()
 update object attributes to the DB.
 getName ()
 get name attribute of the object.
 getTCategoryId ()
 get tCategoryId attribute of the object.
 setName ($n)
 set name attribute of the object.
 setTCategoryId ($id)
 set tCategoryId attribute of the object.

-Static Public Member Functions

static createTicketCategory ($name)
 creates a ticket_Catergory in the DB.
static constr_TCategoryId ($id)
 construct a category object based on the TCategoryId.
static getAllCategories ()
 return a list of all category objects.

-Private Attributes

 $tCategoryId
 The id of the category.
 $name
 The name of the category.
-

Detailed Description

-

Class related to the ticket categories.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - -
static constr_TCategoryId (id) [static]
-
-
- -

construct a category object based on the TCategoryId.

-
Returns:
constructed element based on TCategoryId
- -
-
- -
-
- - - - - - - - -
static createTicketCategory (name) [static]
-
-
- -

creates a ticket_Catergory in the DB.

-
Parameters:
- - -
$namename we want to give to the new category.
-
-
- -
-
- -
-
- - - - - - - -
static getAllCategories () [static]
-
-
- -

return a list of all category objects.

-
Returns:
an array consisting of all category objects.
- -
-
- -
-
- - - - - - - -
getName ()
-
-
- -

get name attribute of the object.

- -
-
- -
-
- - - - - - - -
getTCategoryId ()
-
-
- -

get tCategoryId attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_TCategoryId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a categories id.

-
Parameters:
- - -
$idthe id of the ticket_category that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
setName (n)
-
-
- -

set name attribute of the object.

-
Parameters:
- - -
$nname of the category
-
-
- -
-
- -
-
- - - - - - - - -
setTCategoryId (id)
-
-
- -

set tCategoryId attribute of the object.

-
Parameters:
- - -
$idinteger id of the category
-
-
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

update object attributes to the DB.

- -
-
-

Field Documentation

- -
-
- - - - -
$name [private]
-
-
- -

The name of the category.

- -
-
- -
-
- - - - -
$tCategoryId [private]
-
-
- -

The id of the category.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_category.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Content.html b/code/web/docs/ams/html/classTicket__Content.html deleted file mode 100644 index 0f375bbb7..000000000 --- a/code/web/docs/ams/html/classTicket__Content.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Content Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Ticket_Content Class Reference
-
-
- -

Class that handles the content of a reply. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 create ()
 creates a new 'tickt_content' entry.
 load_With_TContentId ($id)
 loads the object's attributes.
 update ()
 update the object's attributes to the database.
 getContent ()
 get content attribute of the object.
 getTContentId ()
 get tContentId attribute of the object.
 setContent ($c)
 set content attribute of the object.
 setTContentId ($c)
 set tContentId attribute of the object.

-Static Public Member Functions

static constr_TContentId ($id)
 return constructed element based on TContentId.

-Private Attributes

 $tContentId
 The id of ticket_content entry.
 $content
 The content of an entry.
-

Detailed Description

-

Class that handles the content of a reply.

-

The Ticket_Content has a one-to-one relation with a ticket_reply, it contains the content of a reply, this way the content doesn't always have to be loaded when we query the database when we only need information regarding to the replies basic information.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - -
static constr_TContentId (id) [static]
-
-
- -

return constructed element based on TContentId.

-
Parameters:
- - -
$idthe id of ticket_content entry.
-
-
-
Returns:
a constructed ticket_content object by specifying the TContentId.
- -
-
- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'tickt_content' entry.

-

this method will use the object's attributes for creating a new 'ticket_content' entry in the database.

- -
-
- -
-
- - - - - - - -
getContent ()
-
-
- -

get content attribute of the object.

- -
-
- -
-
- - - - - - - -
getTContentId ()
-
-
- -

get tContentId attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_TContentId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a ticket_content's id,

-
Parameters:
- - -
$idthe id of the ticket_content entry that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
setContent (c)
-
-
- -

set content attribute of the object.

-
Parameters:
- - -
$ccontent of a reply
-
-
- -
-
- -
-
- - - - - - - - -
setTContentId (c)
-
-
- -

set tContentId attribute of the object.

-
Parameters:
- - -
$cinteger id of ticket_content entry
-
-
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

update the object's attributes to the database.

- -
-
-

Field Documentation

- -
-
- - - - -
$content [private]
-
-
- -

The content of an entry.

- -
-
- -
-
- - - - -
$tContentId [private]
-
-
- -

The id of ticket_content entry.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_content.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Info.html b/code/web/docs/ams/html/classTicket__Info.html deleted file mode 100644 index c88c41481..000000000 --- a/code/web/docs/ams/html/classTicket__Info.html +++ /dev/null @@ -1,1463 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Info Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

Class that handles additional info sent by ticket creation ingame. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 load_With_TInfoId ($id)
 loads the object's attributes by using a ticket_info id.
 load_With_Ticket ($id)
 loads the object's attributes by using a ticket's id.
 create ()
 creates a new 'ticket_info' entry.
 getTInfoId ()
 get tInfoId attribute of the object.
 getTicket ()
 get ticket attribute of the object.
 getShardId ()
 get shardid attribute of the object.
 getUser_Position ()
 get user_position attribute of the object.
 getView_Position ()
 get view_position attribute of the object.
 getClient_Version ()
 get client_version attribute of the object.
 getPatch_Version ()
 get patch_version attribute of the object.
 getServer_Tick ()
 get server_tick attribute of the object.
 getConnect_State ()
 get connect_state attribute of the object.
 getLocal_Address ()
 get local_address attribute of the object.
 getMemory ()
 get memory attribute of the object.
 getOS ()
 get os attribute of the object.
 getProcessor ()
 get processor attribute of the object.
 getCPUId ()
 get cpu_id attribute of the object.
 getCPU_Mask ()
 get cpu_mask attribute of the object.
 getHT ()
 get ht attribute of the object.
 getNel3D ()
 get nel3d attribute of the object.
 getUser_Id ()
 get user_id attribute of the object.
 setTInfoId ($id)
 set tInfoId attribute of the object.
 setTicket ($t)
 set ticket attribute of the object.
 setShardId ($s)
 set shardid attribute of the object.
 setUser_Position ($u)
 set user_position attribute of the object.
 setView_Position ($v)
 set view_position attribute of the object.
 setClient_Version ($c)
 set client_version attribute of the object.
 setPatch_Version ($p)
 set patch_version attribute of the object.
 setServer_Tick ($s)
 set server_tick attribute of the object.
 setConnect_State ($c)
 set connect_state attribute of the object.
 setLocal_Address ($l)
 set local_address attribute of the object.
 setMemory ($m)
 set memory attribute of the object.
 setOS ($o)
 set os attribute of the object.
 setProcessor ($p)
 set processor attribute of the object.
 setCPUId ($c)
 set cpu_id attribute of the object.
 setCPU_Mask ($c)
 set cpu_mask attribute of the object.
 setHT ($h)
 set ht attribute of the object.
 setNel3D ($n)
 set nel3d attribute of the object.
 setUser_Id ($u)
 set user_id attribute of the object.

-Static Public Member Functions

static create_Ticket_Info ($info_array)
 create a ticket_info entry.
static TicketHasInfo ($ticket_id)
 check if a specific ticket has extra info or not.

-Private Attributes

 $tInfoId
 The id of ticket_info entry.
 $ticket
 The ticket linked to this ticket_info entry.
 $shardid
 The shard id.
 $user_position
 The user's character position.
 $view_position
 The view position of the character.
 $client_version
 The client version in use.
 $patch_version
 The patch version in use.
 $server_tick
 The current server tick.
 $connect_state
 The connect state.
 $local_address
 local ip
 $memory
 memory usage information
 $os
 os information
 $processor
 processor information
 $cpu_id
 the cpu id
 $cpu_mask
 the cpu mask
 $ht
 tbh I have no idea :D
 $nel3d
 the nel3d version
 $user_id
 The users id.
-

Detailed Description

-

Class that handles additional info sent by ticket creation ingame.

-

If a user creates a ticket ingame, there are a lot of extra $_GET parameters being sent inside the http request that might have something todo with the ticket. for example the OS the user uses or the processor of it's computer, but also the current client version etc. This information can be stored and retrieved by using the ticket_info class.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'ticket_info' entry.

-

this method will use the object's attributes for creating a new 'ticket_info' entry in the database.

- -
-
- -
-
- - - - - - - - -
static create_Ticket_Info (info_array) [static]
-
-
- -

create a ticket_info entry.

-
Parameters:
- - -
$info_arraythe info array (this can be the entire $_GET array being sent by the ingame browser)
-
-
- -
-
- -
-
- - - - - - - -
getClient_Version ()
-
-
- -

get client_version attribute of the object.

- -
-
- -
-
- - - - - - - -
getConnect_State ()
-
-
- -

get connect_state attribute of the object.

- -
-
- -
-
- - - - - - - -
getCPU_Mask ()
-
-
- -

get cpu_mask attribute of the object.

- -
-
- -
-
- - - - - - - -
getCPUId ()
-
-
- -

get cpu_id attribute of the object.

- -
-
- -
-
- - - - - - - -
getHT ()
-
-
- -

get ht attribute of the object.

- -
-
- -
-
- - - - - - - -
getLocal_Address ()
-
-
- -

get local_address attribute of the object.

- -
-
- -
-
- - - - - - - -
getMemory ()
-
-
- -

get memory attribute of the object.

- -
-
- -
-
- - - - - - - -
getNel3D ()
-
-
- -

get nel3d attribute of the object.

- -
-
- -
-
- - - - - - - -
getOS ()
-
-
- -

get os attribute of the object.

- -
-
- -
-
- - - - - - - -
getPatch_Version ()
-
-
- -

get patch_version attribute of the object.

- -
-
- -
-
- - - - - - - -
getProcessor ()
-
-
- -

get processor attribute of the object.

- -
-
- -
-
- - - - - - - -
getServer_Tick ()
-
-
- -

get server_tick attribute of the object.

- -
-
- -
-
- - - - - - - -
getShardId ()
-
-
- -

get shardid attribute of the object.

- -
-
- -
-
- - - - - - - -
getTicket ()
-
-
- -

get ticket attribute of the object.

- -
-
- -
-
- - - - - - - -
getTInfoId ()
-
-
- -

get tInfoId attribute of the object.

- -
-
- -
-
- - - - - - - -
getUser_Id ()
-
-
- -

get user_id attribute of the object.

- -
-
- -
-
- - - - - - - -
getUser_Position ()
-
-
- -

get user_position attribute of the object.

- -
-
- -
-
- - - - - - - -
getView_Position ()
-
-
- -

get view_position attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_Ticket (id)
-
-
- -

loads the object's attributes by using a ticket's id.

-

loads the object's attributes by giving a ticket's entry id.

-
Parameters:
- - -
$idthe id of the ticket, the ticket_info entry of that ticket should be loaded.
-
-
- -
-
- -
-
- - - - - - - - -
load_With_TInfoId (id)
-
-
- -

loads the object's attributes by using a ticket_info id.

-

loads the object's attributes by giving a ticket_info's entry id.

-
Parameters:
- - -
$idthe id of the ticket_info entry that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array.
-
-
- -
-
- -
-
- - - - - - - - -
setClient_Version (c)
-
-
- -

set client_version attribute of the object.

-
Parameters:
- - -
$cclient version number
-
-
- -
-
- -
-
- - - - - - - - -
setConnect_State (c)
-
-
- -

set connect_state attribute of the object.

-
Parameters:
- - -
$cstring that defines the connect state.
-
-
- -
-
- -
-
- - - - - - - - -
setCPU_Mask (c)
-
-
- -

set cpu_mask attribute of the object.

-
Parameters:
- - -
$cmask of the cpu
-
-
- -
-
- -
-
- - - - - - - - -
setCPUId (c)
-
-
- -

set cpu_id attribute of the object.

-
Parameters:
- - -
$ccpu id information
-
-
- -
-
- -
-
- - - - - - - - -
setHT (h)
-
-
- -

set ht attribute of the object.

- -
-
- -
-
- - - - - - - - -
setLocal_Address (l)
-
-
- -

set local_address attribute of the object.

-
Parameters:
- - -
$llocal address
-
-
- -
-
- -
-
- - - - - - - - -
setMemory (m)
-
-
- -

set memory attribute of the object.

-
Parameters:
- - -
$mmemory usage
-
-
- -
-
- -
-
- - - - - - - - -
setNel3D (n)
-
-
- -

set nel3d attribute of the object.

-
Parameters:
- - -
$nversion information about NeL3D
-
-
- -
-
- -
-
- - - - - - - - -
setOS (o)
-
-
- -

set os attribute of the object.

-
Parameters:
- - -
$oset os version information
-
-
- -
-
- -
-
- - - - - - - - -
setPatch_Version (p)
-
-
- -

set patch_version attribute of the object.

-
Parameters:
- - -
$ppatch version number
-
-
- -
-
- -
-
- - - - - - - - -
setProcessor (p)
-
-
- -

set processor attribute of the object.

-
Parameters:
- - -
$pprocessor information
-
-
- -
-
- -
-
- - - - - - - - -
setServer_Tick (s)
-
-
- -

set server_tick attribute of the object.

-
Parameters:
- - -
$sinteger that resembles the server tick
-
-
- -
-
- -
-
- - - - - - - - -
setShardId (s)
-
-
- -

set shardid attribute of the object.

-
Parameters:
- - -
$s(integer) shard id
-
-
- -
-
- -
-
- - - - - - - - -
setTicket (t)
-
-
- -

set ticket attribute of the object.

-
Parameters:
- - -
$tinteger id of the ticket linked to the info object
-
-
- -
-
- -
-
- - - - - - - - -
setTInfoId (id)
-
-
- -

set tInfoId attribute of the object.

-
Parameters:
- - -
$idinteger id of ticket_info object itself
-
-
- -
-
- -
-
- - - - - - - - -
setUser_Id (u)
-
-
- -

set user_id attribute of the object.

-
Parameters:
- - -
$uthe user_id.
-
-
- -
-
- -
-
- - - - - - - - -
setUser_Position (u)
-
-
- -

set user_position attribute of the object.

-
Parameters:
- - -
$uthe users position
-
-
- -
-
- -
-
- - - - - - - - -
setView_Position (v)
-
-
- -

set view_position attribute of the object.

-
Parameters:
- - -
$vthe view position
-
-
- -
-
- -
-
- - - - - - - - -
static TicketHasInfo (ticket_id) [static]
-
-
- -

check if a specific ticket has extra info or not.

-

Not all tickets have extra info, only tickets made ingame do. This function checks if a specific ticket does have a ticket_info entry linked to it.

-
Parameters:
- - -
$ticket_idthe id of the ticket that we want to query
-
-
-
Returns:
true or false
- -
-
-

Field Documentation

- -
-
- - - - -
$client_version [private]
-
-
- -

The client version in use.

- -
-
- -
-
- - - - -
$connect_state [private]
-
-
- -

The connect state.

- -
-
- -
-
- - - - -
$cpu_id [private]
-
-
- -

the cpu id

- -
-
- -
-
- - - - -
$cpu_mask [private]
-
-
- -

the cpu mask

- -
-
- -
-
- - - - -
$ht [private]
-
-
- -

tbh I have no idea :D

- -
-
- -
-
- - - - -
$local_address [private]
-
-
- -

local ip

- -
-
- -
-
- - - - -
$memory [private]
-
-
- -

memory usage information

- -
-
- -
-
- - - - -
$nel3d [private]
-
-
- -

the nel3d version

- -
-
- -
-
- - - - -
$os [private]
-
-
- -

os information

- -
-
- -
-
- - - - -
$patch_version [private]
-
-
- -

The patch version in use.

- -
-
- -
-
- - - - -
$processor [private]
-
-
- -

processor information

- -
-
- -
-
- - - - -
$server_tick [private]
-
-
- -

The current server tick.

- -
-
- -
-
- - - - -
$shardid [private]
-
-
- -

The shard id.

- -
-
- -
-
- - - - -
$ticket [private]
-
-
- -

The ticket linked to this ticket_info entry.

- -
-
- -
-
- - - - -
$tInfoId [private]
-
-
- -

The id of ticket_info entry.

- -
-
- -
-
- - - - -
$user_id [private]
-
-
- -

The users id.

- -
-
- -
-
- - - - -
$user_position [private]
-
-
- -

The user's character position.

- -
-
- -
-
- - - - -
$view_position [private]
-
-
- -

The view position of the character.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Log.html b/code/web/docs/ams/html/classTicket__Log.html deleted file mode 100644 index 59efe7def..000000000 --- a/code/web/docs/ams/html/classTicket__Log.html +++ /dev/null @@ -1,763 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Log Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

Class that handles the logging. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 load_With_TLogId ($id)
 loads the object's attributes.
 update ()
 update attributes of the object to the DB.
 getTLogId ()
 get tLogId attribute of the object.
 getTimestamp ()
 get timestamp attribute of the object.
 getQuery ()
 get query attribute of the object.
 getAuthor ()
 get author attribute of the object.
 getTicket ()
 get ticket attribute of the object.
 getAction ()
 get the action id out of the query by decoding it.
 getArgument ()
 get the argument out of the query by decoding it.
 getActionTextArray ()
 get the action text(string) array.
 setTLogId ($id)
 set tLogId attribute of the object.
 setTimestamp ($t)
 set timestamp attribute of the object.
 setQuery ($q)
 set query attribute of the object.
 setAuthor ($a)
 set author attribute of the object.
 setTicket ($t)
 set ticket attribute of the object.

-Static Public Member Functions

static getLogsOfTicket ($ticket_id)
 return all log entries related to a ticket.
static createLogEntry ($ticket_id, $author_id, $action, $arg=-1)
 create a new log entry.
static constr_TLogId ($id)
 return constructed element based on TLogId
static getAllLogs ($ticket_id)
 return all log entries related to a ticket.

-Private Attributes

 $tLogId
 The id of the log entry.
 $timestamp
 The timestamp of the log entry.
 $query
 The query (json encoded array containing action id & argument)
 $author
 author of the log
 $ticket
 the id of the ticket related to the log entry
-

Detailed Description

-

Class that handles the logging.

-

The logging will be used when a ticket is created, a reply is added, if someone views a ticket, if someone assigns a ticket to him or if someone forwards a ticket. This class provides functions to get retrieve those logs and also make them.

-

-the Action IDs being used are:

-
    -
  1. User X Created ticket
  2. -
  3. Admin X created ticket for arg
  4. -
  5. Read ticket
  6. -
  7. Added Reply ID: arg to ticket
  8. -
  9. Changed status to arg
  10. -
  11. Changed Priority to arg
  12. -
  13. assigned to the ticket
  14. -
  15. forwarded ticket to support group arg
  16. -
  17. unassigned to the ticket
  18. -
-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - -
static constr_TLogId (id) [static]
-
-
- -

return constructed element based on TLogId

-
Parameters:
- - -
$idticket_log id of the entry that we want to load into our object.
-
-
-
Returns:
constructed ticket_log object.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static createLogEntry (ticket_id,
author_id,
action,
arg = -1 
) [static]
-
-
- -

create a new log entry.

-

It will check if the $TICKET_LOGGING global var is true, this var is used to turn logging on and off. In case it's on, the log message will be stored. the action id and argument (which is -1 by default), will be json encoded and stored in the query field in the db.

-
Parameters:
- - - - - -
$ticket_idthe id of the ticket related to the new log entry
$author_idthe id of the user that instantiated the logging.
$actionthe action id (see the list in the class description)
$argargument for the action (default = -1)
-
-
- -
-
- -
-
- - - - - - - -
getAction ()
-
-
- -

get the action id out of the query by decoding it.

- -
-
- -
-
- - - - - - - -
getActionTextArray ()
-
-
- -

get the action text(string) array.

-

this is being read from the language .ini files.

- -
-
- -
-
- - - - - - - - -
static getAllLogs (ticket_id) [static]
-
-
- -

return all log entries related to a ticket.

-
Parameters:
- - -
$ticket_idthe id of the ticket of which we want all related log entries returned.
-
-
-
Returns:
an array of ticket_log objects, here the author is an integer.
-
Todo:
only use one of the 2 comparable functions in the future and make the other depricated.
- -
-
- -
-
- - - - - - - -
getArgument ()
-
-
- -

get the argument out of the query by decoding it.

- -
-
- -
-
- - - - - - - -
getAuthor ()
-
-
- -

get author attribute of the object.

- -
-
- -
-
- - - - - - - - -
static getLogsOfTicket (ticket_id) [static]
-
-
- -

return all log entries related to a ticket.

-
Parameters:
- - -
$ticket_idthe id of the ticket of which we want all related log entries returned.
-
-
-
Returns:
an array of ticket_log objects, be aware that the author in the ticket_log object is a ticket_user object on its own (so not a simple integer).
- -
-
- -
-
- - - - - - - -
getQuery ()
-
-
- -

get query attribute of the object.

- -
-
- -
-
- - - - - - - -
getTicket ()
-
-
- -

get ticket attribute of the object.

- -
-
- -
-
- - - - - - - -
getTimestamp ()
-
-
- -

get timestamp attribute of the object.

- -
-
- -
-
- - - - - - - -
getTLogId ()
-
-
- -

get tLogId attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_TLogId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a ticket_log entries ID (TLogId).

-
Parameters:
- - -
idthe id of the ticket_log entry that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array.
-
-
- -
-
- -
-
- - - - - - - - -
setAuthor (a)
-
-
- -

set author attribute of the object.

-
Parameters:
- - -
$ainteger id of the user who created the log entry
-
-
- -
-
- -
-
- - - - - - - - -
setQuery (q)
-
-
- -

set query attribute of the object.

-
Parameters:
- - -
$qthe encoded query
-
-
- -
-
- -
-
- - - - - - - - -
setTicket (t)
-
-
- -

set ticket attribute of the object.

-
Parameters:
- - -
$tinteger id of ticket of which the log entry is related to.
-
-
- -
-
- -
-
- - - - - - - - -
setTimestamp (t)
-
-
- -

set timestamp attribute of the object.

-
Parameters:
- - -
$ttimestamp of the log entry
-
-
- -
-
- -
-
- - - - - - - - -
setTLogId (id)
-
-
- -

set tLogId attribute of the object.

-
Parameters:
- - -
$idinteger id of the log entry
-
-
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

update attributes of the object to the DB.

- -
-
-

Field Documentation

- -
-
- - - - -
$author [private]
-
-
- -

author of the log

- -
-
- -
-
- - - - -
$query [private]
-
-
- -

The query (json encoded array containing action id & argument)

- -
-
- -
-
- - - - -
$ticket [private]
-
-
- -

the id of the ticket related to the log entry

- -
-
- -
-
- - - - -
$timestamp [private]
-
-
- -

The timestamp of the log entry.

- -
-
- -
-
- - - - -
$tLogId [private]
-
-
- -

The id of the log entry.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Queue.html b/code/web/docs/ams/html/classTicket__Queue.html deleted file mode 100644 index 63ebf5e09..000000000 --- a/code/web/docs/ams/html/classTicket__Queue.html +++ /dev/null @@ -1,401 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Queue Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Ticket_Queue Class Reference
-
-
- -

Data class that holds a lot of queries that load specific tickets. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 loadAllNotAssignedTickets ()
 loads the not yet assigned tickets query into the objects attributes.
 loadAllTickets ()
 loads the 'all' tickets query into the objects attributes.
 loadAllOpenTickets ()
 loads the 'all open' tickets query into the objects attributes.
 loadAllClosedTickets ()
 loads the 'closed' tickets query into the objects attributes.
 loadToDoTickets ($user_id)
 loads the 'todo' tickets query & params into the objects attributes.
 loadAssignedandWaiting ($user_id)
 loads the 'tickets asssigned to a user and waiting on support' query & params into the objects attributes.
 createQueue ($userid, $groupid, $what, $how, $who)
 loads the 'created' query & params into the objects attributes.
 getQuery ()
 get query attribute of the object.
 getParams ()
 get params attribute of the object.

-Private Attributes

 $query
 The query that loads specific tickets.
 $params
 The parameter array that's being needed by the query.
-

Detailed Description

-

Data class that holds a lot of queries that load specific tickets.

-

These queries are being used by the ticket_queue_handler class. An object of this class holds 2 attributes: the query and the params used for the query.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
createQueue (userid,
groupid,
what,
how,
who 
)
-
-
- -

loads the 'created' query & params into the objects attributes.

-

This function creates dynamically a query based on the selected features.

-
Parameters:
- - - - - - -
$whospecifies if we want to user the user_id or group_id to form the query.
$useridthe user's id to whom the tickets should be assigned/not assigned
$groupidthe group's id to whom the tickets should be forwarded/not forwarded
$whatspecifies what kind of tickets we want to return: waiting for support, waiting on user, closed
$howspecifies if the tickets should be or shouldn't be assigned/forwarded to the group/user selected.
-
-
- -
-
- -
-
- - - - - - - -
getParams ()
-
-
- -

get params attribute of the object.

- -
-
- -
-
- - - - - - - -
getQuery ()
-
-
- -

get query attribute of the object.

- -
-
- -
-
- - - - - - - -
loadAllClosedTickets ()
-
-
- -

loads the 'closed' tickets query into the objects attributes.

- -
-
- -
-
- - - - - - - -
loadAllNotAssignedTickets ()
-
-
- -

loads the not yet assigned tickets query into the objects attributes.

- -
-
- -
-
- - - - - - - -
loadAllOpenTickets ()
-
-
- -

loads the 'all open' tickets query into the objects attributes.

- -
-
- -
-
- - - - - - - -
loadAllTickets ()
-
-
- -

loads the 'all' tickets query into the objects attributes.

- -
-
- -
-
- - - - - - - - -
loadAssignedandWaiting (user_id)
-
-
- -

loads the 'tickets asssigned to a user and waiting on support' query & params into the objects attributes.

-
Parameters:
- - -
$user_idthe user's id to whom the tickets should be assigned
-
-
- -
-
- -
-
- - - - - - - - -
loadToDoTickets (user_id)
-
-
- -

loads the 'todo' tickets query & params into the objects attributes.

-

first: find the tickets assigned to the user with status = waiting on support, second find all not assigned tickets that aren't forwarded yet. find all tickets assigned to someone else witht status waiting on support, with timestamp of last reply > 1 day, find all non-assigned tickets forwarded to the support groups to which that user belongs

-
Parameters:
- - -
$user_idthe user's id to whom the tickets should be assigned
-
-
- -
-
-

Field Documentation

- -
-
- - - - -
$params [private]
-
-
- -

The parameter array that's being needed by the query.

- -
-
- -
-
- - - - -
$query [private]
-
-
- -

The query that loads specific tickets.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Queue__Handler.html b/code/web/docs/ams/html/classTicket__Queue__Handler.html deleted file mode 100644 index 93d3cb996..000000000 --- a/code/web/docs/ams/html/classTicket__Queue__Handler.html +++ /dev/null @@ -1,395 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Queue_Handler Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
Ticket_Queue_Handler Class Reference
-
-
- -

returns tickets (queues) that are related in some way. - More...

- - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 getTickets ($input, $user_id)
 returns the tickets that are related in someway defined by $input.
 getPagination ()
 get pagination attribute of the object.
 createQueue ($userid, $groupid, $what, $how, $who)
 creates the queue.

-Static Public Member Functions

static getNrOfTicketsToDo ($user_id)
 get the number of tickets in the todo queue for a specific user.
static getNrOfTicketsAssignedWaiting ($user_id)
 get the number of tickets assigned to a specific user and waiting for support.
static getNrOfTickets ()
 get the total number of tickets.
static getNewestTicket ()
 get the ticket object of the latest added ticket.

-Private Attributes

 $pagination
 Pagination object, this way only a few tickets (related to that pagenumber) will be shown.
 $queue
 The queue object, being used to get the queries and parameters.
-

Detailed Description

-

returns tickets (queues) that are related in some way.

-

This class handles the creation and returning of existing ticket queues. Normally a $_GET['get'] parameter is being used to identify what kind of tickets should be shown. the getTickets() function uses this parameter($input) and uses the ticket_queue class to load the specific query.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Instantiates the queue object.

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
createQueue (userid,
groupid,
what,
how,
who 
)
-
-
- -

creates the queue.

-

afterwards the getTickets function should be called, else a lot of extra parameters had to be added to the getTickets function..

- -
-
- -
-
- - - - - - - -
static getNewestTicket () [static]
-
-
- -

get the ticket object of the latest added ticket.

- -
-
- -
-
- - - - - - - -
static getNrOfTickets () [static]
-
-
- -

get the total number of tickets.

- -
-
- -
-
- - - - - - - - -
static getNrOfTicketsAssignedWaiting (user_id) [static]
-
-
- -

get the number of tickets assigned to a specific user and waiting for support.

-
Parameters:
- - -
$user_idthe user being queried
-
-
- -
-
- -
-
- - - - - - - - -
static getNrOfTicketsToDo (user_id) [static]
-
-
- -

get the number of tickets in the todo queue for a specific user.

-
Parameters:
- - -
$user_idthe user being queried
-
-
- -
-
- -
-
- - - - - - - -
getPagination ()
-
-
- -

get pagination attribute of the object.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
getTickets (input,
user_id 
)
-
-
- -

returns the tickets that are related in someway defined by $input.

-

The $input parameter should be a string that defines what kind of queue should be loaded. A new pagination object will be instantiated and will load 10 entries, related to the $_GET['pagenum'] variable.

-
Parameters:
- - - -
$inputidentifier that defines what queue to load.
$user_idthe id of the user that browses the queues, some queues can be depending on this.
-
-
-
Returns:
an array consisting of ticket objects, beware, the author & category of a ticket, are objects on their own (no integers are used this time).
- -
-
-

Field Documentation

- -
-
- - - - -
$pagination [private]
-
-
- -

Pagination object, this way only a few tickets (related to that pagenumber) will be shown.

- -
-
- -
-
- - - - -
$queue [private]
-
-
- -

The queue object, being used to get the queries and parameters.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__Reply.html b/code/web/docs/ams/html/classTicket__Reply.html deleted file mode 100644 index eed01a154..000000000 --- a/code/web/docs/ams/html/classTicket__Reply.html +++ /dev/null @@ -1,764 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_Reply Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

handles functions related to replies on tickets. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 create ()
 creates a new 'ticket_reply' entry.
 load_With_TReplyId ($id)
 loads the object's attributes.
 update ()
 updates a ticket_reply entry based on the objects attributes.
 getTicket ()
 get ticket attribute of the object.
 getContent ()
 get content attribute of the object.
 getAuthor ()
 get author attribute of the object.
 getTimestamp ()
 get timestamp attribute of the object.
 getTReplyId ()
 get tReplyId attribute of the object.
 getHidden ()
 get hidden attribute of the object.
 setTicket ($t)
 set ticket attribute of the object.
 setContent ($c)
 set content attribute of the object.
 setAuthor ($a)
 set author attribute of the object.
 setTimestamp ($t)
 set timestamp attribute of the object.
 setTReplyId ($i)
 set tReplyId attribute of the object.
 setHidden ($h)
 set hidden attribute of the object.

-Static Public Member Functions

static constr_TReplyId ($id)
 return constructed element based on TReplyId.
static getRepliesOfTicket ($ticket_id, $view_as_admin)
 return all replies on a specific ticket.
static createReply ($content, $author, $ticket_id, $hidden, $ticket_creator)
 creates a new reply on a ticket.

-Private Attributes

 $tReplyId
 The id of the reply.
 $ticket
 the ticket id related to the reply
 $content
 the content of the reply
 $author
 The id of the user that made the reply.
 $timestamp
 The timestamp of the reply.
 $hidden
 indicates if reply should be hidden for normal users or not
-

Detailed Description

-

handles functions related to replies on tickets.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - -
static constr_TReplyId (id) [static]
-
-
- -

return constructed element based on TReplyId.

-
Parameters:
- - -
$idthe Id the reply we want to load.
-
-
-
Returns:
the loaded object.
- -
-
- -
-
- - - - - - - -
create ()
-
-
- -

creates a new 'ticket_reply' entry.

-

this method will use the object's attributes for creating a new 'ticket_reply' entry in the database (the now() function will create the timestamp).

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static createReply (content,
author,
ticket_id,
hidden,
ticket_creator 
) [static]
-
-
- -

creates a new reply on a ticket.

-

Creates a ticket_content entry and links it with a new created ticket_reply, a log entry will be written about this. In case the ticket creator replies on a ticket, he will set the status by default to 'waiting on support'.

-
Parameters:
- - - - - - -
$contentthe content of the reply
$authorthe id of the reply creator.
$ticket_idthe id of the ticket of which we want the replies.
$hiddenshould be 0 or 1
$ticket_creatorthe ticket's starter his id.
-
-
- -
-
- -
-
- - - - - - - -
getAuthor ()
-
-
- -

get author attribute of the object.

- -
-
- -
-
- - - - - - - -
getContent ()
-
-
- -

get content attribute of the object.

- -
-
- -
-
- - - - - - - -
getHidden ()
-
-
- -

get hidden attribute of the object.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static getRepliesOfTicket (ticket_id,
view_as_admin 
) [static]
-
-
- -

return all replies on a specific ticket.

-
Parameters:
- - - -
$ticket_idthe id of the ticket of which we want the replies.
$view_as_adminif the browsing user is an admin/mod it should be 1, this will also show the hidden replies.
-
-
-
Returns:
an array with ticket_reply objects (beware the author and content are objects on their own, not integers!)
- -
-
- -
-
- - - - - - - -
getTicket ()
-
-
- -

get ticket attribute of the object.

- -
-
- -
-
- - - - - - - -
getTimestamp ()
-
-
- -

get timestamp attribute of the object.

-

The output format is defined by the Helpers class function, outputTime().

- -
-
- -
-
- - - - - - - -
getTReplyId ()
-
-
- -

get tReplyId attribute of the object.

- -
-
- -
-
- - - - - - - - -
load_With_TReplyId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a ticket_reply's id.

-
Parameters:
- - -
$idthe id of the ticket_reply that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array.
-
-
- -
-
- -
-
- - - - - - - - -
setAuthor (a)
-
-
- -

set author attribute of the object.

-
Parameters:
- - -
$ainteger id of the user
-
-
- -
-
- -
-
- - - - - - - - -
setContent (c)
-
-
- -

set content attribute of the object.

-
Parameters:
- - -
$cinteger id of the ticket_content entry
-
-
- -
-
- -
-
- - - - - - - - -
setHidden (h)
-
-
- -

set hidden attribute of the object.

-
Parameters:
- - -
$hshould be 0 or 1
-
-
- -
-
- -
-
- - - - - - - - -
setTicket (t)
-
-
- -

set ticket attribute of the object.

-
Parameters:
- - -
$tinteger id of the ticket
-
-
- -
-
- -
-
- - - - - - - - -
setTimestamp (t)
-
-
- -

set timestamp attribute of the object.

-
Parameters:
- - -
$ttimestamp of the reply
-
-
- -
-
- -
-
- - - - - - - - -
setTReplyId (i)
-
-
- -

set tReplyId attribute of the object.

-
Parameters:
- - -
$iinteger id of the ticket_reply
-
-
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

updates a ticket_reply entry based on the objects attributes.

- -
-
-

Field Documentation

- -
-
- - - - -
$author [private]
-
-
- -

The id of the user that made the reply.

- -
-
- -
-
- - - - -
$content [private]
-
-
- -

the content of the reply

- -
-
- -
-
- - - - -
$hidden [private]
-
-
- -

indicates if reply should be hidden for normal users or not

- -
-
- -
-
- - - - -
$ticket [private]
-
-
- -

the ticket id related to the reply

- -
-
- -
-
- - - - -
$timestamp [private]
-
-
- -

The timestamp of the reply.

- -
-
- -
-
- - - - -
$tReplyId [private]
-
-
- -

The id of the reply.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_reply.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classTicket__User.html b/code/web/docs/ams/html/classTicket__User.html deleted file mode 100644 index 3e74dc034..000000000 --- a/code/web/docs/ams/html/classTicket__User.html +++ /dev/null @@ -1,745 +0,0 @@ - - - - - -Ryzom Account Management System: Ticket_User Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

user entry point in the ticket system. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ()
 A constructor.
 set ($values)
 sets the object's attributes.
 load_With_TUserId ($id)
 loads the object's attributes.
 update ()
 update the object's attributes to the db.
 getPermission ()
 get permission attribute of the object.
 getExternId ()
 get externId attribute of the object.
 getTUserId ()
 get tUserId attribute of the object.
 setPermission ($perm)
 set permission attribute of the object.
 setExternId ($id)
 set externId attribute of the object.
 setTUserId ($id)
 set tUserId attribute of the object.

-Static Public Member Functions

static createTicketUser ($extern_id, $permission)
 create a new ticket user.
static isMod ($user)
 check if a ticket_user object is a mod or not.
static isAdmin ($user)
 check if a ticket_user object is an admin or not.
static constr_TUserId ($id)
 return constructed ticket_user object based on TUserId.
static getModsAndAdmins ()
 return a list of all mods/admins.
static constr_ExternId ($id)
 return constructed ticket_user object based on ExternId.
static change_permission ($user_id, $perm)
 change the permission of a ticket_user.
static get_email_by_user_id ($id)
 return the email address of a ticket_user.
static get_username_from_id ($id)
 return the username of a ticket_user.
static get_id_from_username ($username)
 return the TUserId of a ticket_user by giving a username.
static get_id_from_email ($email)
 return the ticket_user id from an email address.

-Private Attributes

 $tUserId
 The id of the user inside the ticket system.
 $permission
 The permission of the user.
 $externId
 The id of the user account in the www (could be drupal,...) that is linked to the ticket_user.
-

Detailed Description

-

user entry point in the ticket system.

-

The ticket_user makes a link between the entire ticket system's lib db and the www user, which is stored in another db (this is the external ID). The externalID could be the ID of a drupal user or wordpress user,.. The ticket_user also stores the permission of that user, this way the permission system is inside the lib itself and can be used in any www version that you like. permission 1 = user, 2 = mod, 3 = admin.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
__construct ()
-
-
- -

A constructor.

-

Empty constructor

- -
-
-

Member Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
static change_permission (user_id,
perm 
) [static]
-
-
- -

change the permission of a ticket_user.

-
Parameters:
- - - -
$user_idthe TUserId of the entry.
$permthe new permission value.
-
-
- -
-
- -
-
- - - - - - - - -
static constr_ExternId (id) [static]
-
-
- -

return constructed ticket_user object based on ExternId.

-
Parameters:
- - -
$idthe ExternId of the entry.
-
-
-
Returns:
constructed ticket_user object
- -
-
- -
-
- - - - - - - - -
static constr_TUserId (id) [static]
-
-
- -

return constructed ticket_user object based on TUserId.

-
Parameters:
- - -
$idthe TUserId of the entry.
-
-
-
Returns:
constructed ticket_user object
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static createTicketUser (extern_id,
permission 
) [static]
-
-
- -

create a new ticket user.

-
Parameters:
- - - -
$extern_idthe id of the user account in the www version (drupal,...)
$permissionthe permission that will be given to the user. 1=user, 2=mod, 3=admin
-
-
- -
-
- -
-
- - - - - - - - -
static get_email_by_user_id (id) [static]
-
-
- -

return the email address of a ticket_user.

-
Parameters:
- - -
$idthe TUserId of the entry.
-
-
-
Returns:
string containing the email address of that user.
- -
-
- -
-
- - - - - - - - -
static get_id_from_email (email) [static]
-
-
- -

return the ticket_user id from an email address.

-
Parameters:
- - -
$emailthe emailaddress of a user.
-
-
-
Returns:
the ticket_user id related to that email address, in case none, return "FALSE".
- -
-
- -
-
- - - - - - - - -
static get_id_from_username (username) [static]
-
-
- -

return the TUserId of a ticket_user by giving a username.

-
Parameters:
- - -
$usernamethe username of a user.
-
-
-
Returns:
the TUserId related to that username.
- -
-
- -
-
- - - - - - - - -
static get_username_from_id (id) [static]
-
-
- -

return the username of a ticket_user.

-
Parameters:
- - -
$idthe TUserId of the entry.
-
-
-
Returns:
string containing username of that user.
- -
-
- -
-
- - - - - - - -
getExternId ()
-
-
- -

get externId attribute of the object.

- -
-
- -
-
- - - - - - - -
static getModsAndAdmins () [static]
-
-
- -

return a list of all mods/admins.

-
Returns:
an array consisting of ticket_user objects that are mods & admins.
- -
-
- -
-
- - - - - - - -
getPermission ()
-
-
- -

get permission attribute of the object.

- -
-
- -
-
- - - - - - - -
getTUserId ()
-
-
- -

get tUserId attribute of the object.

- -
-
- -
-
- - - - - - - - -
static isAdmin (user) [static]
-
-
- -

check if a ticket_user object is an admin or not.

-
Parameters:
- - -
$userthe ticket_user object itself
-
-
-
Returns:
true or false
- -
-
- -
-
- - - - - - - - -
static isMod (user) [static]
-
-
- -

check if a ticket_user object is a mod or not.

-
Parameters:
- - -
$userthe ticket_user object itself
-
-
-
Returns:
true or false
- -
-
- -
-
- - - - - - - - -
load_With_TUserId (id)
-
-
- -

loads the object's attributes.

-

loads the object's attributes by giving a TUserId.

-
Parameters:
- - -
$idthe id of the ticket_user that should be loaded
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array of the form array('TUserId' => id, 'Permission' => perm, 'ExternId' => ext_id).
-
-
- -
-
- -
-
- - - - - - - - -
setExternId (id)
-
-
- -

set externId attribute of the object.

-
Parameters:
- - -
$idthe external id.
-
-
- -
-
- -
-
- - - - - - - - -
setPermission (perm)
-
-
- -

set permission attribute of the object.

-
Parameters:
- - -
$perminteger that indicates the permission level. (1= user, 2= mod, 3= admin)
-
-
- -
-
- -
-
- - - - - - - - -
setTUserId (id)
-
-
- -

set tUserId attribute of the object.

-
Parameters:
- - -
$idthe ticket_user id
-
-
- -
-
- -
-
- - - - - - - -
update ()
-
-
- -

update the object's attributes to the db.

- -
-
-

Field Documentation

- -
-
- - - - -
$externId [private]
-
-
- -

The id of the user account in the www (could be drupal,...) that is linked to the ticket_user.

- -
-
- -
-
- - - - -
$permission [private]
-
-
- -

The permission of the user.

- -
-
- -
-
- - - - -
$tUserId [private]
-
-
- -

The id of the user inside the ticket system.

- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classUsers.html b/code/web/docs/ams/html/classUsers.html deleted file mode 100644 index 4083fde9c..000000000 --- a/code/web/docs/ams/html/classUsers.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - - -Ryzom Account Management System: Users Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

handles basic user registration & management functions (shard related). - More...

-
-Inheritance diagram for Users:
-
-
- - -WebUsers -WebUsers - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 check_Register ($values)
 checks if entered values before registering are valid.
 checkUser ($username)
 checks if entered username is valid.
 checkPassword ($pass)
 checks if the password is valid.
 checkEmail ($email)
 wrapper to check if the email address is valid.
 validEmail ($email)
 check if the emailaddress structure is valid.
 check_change_password ($values)
 check if the changing of a password is valid.

-Static Public Member Functions

static generateSALT ($length=2)
 generate a SALT.
static createUser ($values, $user_id)
 creates a user in the shard.
static createPermissions ($pvalues)
 creates permissions in the shard db for a user.

-Protected Member Functions

 checkUserNameExists ($username)
 check if username already exists.
 checkEmailExists ($email)
 check if email already exists.
 checkLoginMatch ($user, $pass)
 check if username and password matches.
 setAmsPassword ($user, $pass)
 sets the shards password.
 setAmsEmail ($user, $mail)
 sets the shards email.

-Private Member Functions

 confirmPassword ($pass_result, $pass, $confirmpass)
 checks if the confirmPassword matches the original.
-

Detailed Description

-

handles basic user registration & management functions (shard related).

-

The Users class is the basis class of WebUsers, this class provides functions being used by all CMS's and our own www version. The WebUsers class however needs to be reimplemented by using the CMS's it's funcionality. This class handles the writing to the shard db mainly, and in case it's offline: writing to the ams_querycache.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Member Function Documentation

- -
-
- - - - - - - - -
check_change_password (values)
-
-
- -

check if the changing of a password is valid.

-

a mod/admin doesn't has to fill in the previous password when he wants to change the password, however for changing his own password he has to fill it in.

-
Parameters:
- - -
$valuesan array containing the CurrentPass, ConfirmNewPass, NewPass and adminChangesOthers
-
-
-
Returns:
if it is valid "success will be returned, else an array with errors will be returned.
- -
-
- -
-
- - - - - - - - -
check_Register (values)
-
-
- -

checks if entered values before registering are valid.

-
Parameters:
- - -
$valuesarray with Username,Password, ConfirmPass and Email.
-
-
-
Returns:
string Info: Returns a string, if input data is valid then "success" is returned, else an array with errors
- -
-
- -
-
- - - - - - - - -
checkEmail (email)
-
-
- -

wrapper to check if the email address is valid.

-
Parameters:
- - -
$emailthe email address
-
-
-
Returns:
"success", else in case it isn't valid an error will be returned.
- -
-
- -
-
- - - - - - - - -
checkEmailExists (email) [protected]
-
-
- -

check if email already exists.

-

This is the base function, it should be overwritten by the WebUsers class.

-
Parameters:
- - -
$emailthe email address
-
-
-
Returns:
string Info: Returns true or false if the email is in the www db.
- -

Reimplemented in WebUsers, and WebUsers.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
checkLoginMatch (user,
pass 
) [protected]
-
-
- -

check if username and password matches.

-

This is the base function, it should be overwritten by the WebUsers class.

-
Parameters:
- - - -
$userthe inserted username
$passthe inserted password
-
-
- -

Reimplemented in WebUsers, and WebUsers.

- -
-
- -
-
- - - - - - - - -
checkPassword (pass)
-
-
- -

checks if the password is valid.

-
Parameters:
- - -
$passthe password willing to be used.
-
-
-
Returns:
string Info: Returns a string based on if the password is valid, if valid then "success" is returned
- -
-
- -
-
- - - - - - - - -
checkUser (username)
-
-
- -

checks if entered username is valid.

-
Parameters:
- - -
$usernamethe username that the user wants to use.
-
-
-
Returns:
string Info: Returns a string based on if the username is valid, if valid then "success" is returned
- -
-
- -
-
- - - - - - - - -
checkUserNameExists (username) [protected]
-
-
- -

check if username already exists.

-

This is the base function, it should be overwritten by the WebUsers class.

-
Parameters:
- - -
$usernamethe username
-
-
-
Returns:
string Info: Returns true or false if the user is in the www db.
- -

Reimplemented in WebUsers, and WebUsers.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
confirmPassword (pass_result,
pass,
confirmpass 
) [private]
-
-
- -

checks if the confirmPassword matches the original.

-
Parameters:
- - - - -
$pass_resultthe result of the previous password check.
$passthe original pass.
$confirmpassthe confirmation password.
-
-
-
Returns:
string Info: Verify's $_POST["Password"] is the same as $_POST["ConfirmPass"]
- -
-
- -
-
- - - - - - - - -
static createPermissions (pvalues) [static]
-
-
- -

creates permissions in the shard db for a user.

-

incase the shard is offline it will place it in the ams_querycache.

-
Parameters:
- - -
$pvalueswith username
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static createUser (values,
user_id 
) [static]
-
-
- -

creates a user in the shard.

-

incase the shard is offline it will place it in the ams_querycache. You have to create a user first in the CMS/WWW and use the id for this function.

-
Parameters:
- - - -
$valueswith name,pass and mail
$user_idthe extern id of the user (the id given by the www/CMS)
-
-
-
Returns:
ok if it's get correctly added to the shard, else return lib offline and put in libDB, if libDB is also offline return liboffline.
- -
-
- -
-
- - - - - - - - -
static generateSALT (length = 2) [static]
-
-
- -

generate a SALT.

-
Parameters:
- - -
$lengththe length of the SALT which is by default 2
-
-
-
Returns:
a random salt of 2 chars
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
setAmsEmail (user,
mail 
) [protected]
-
-
- -

sets the shards email.

-

in case the shard is offline, the entry will be stored in the ams_querycache.

-
Parameters:
- - - -
$userthe usersname of the account of which we want to change the emailaddress.
$mailthe new email address
-
-
-
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
setAmsPassword (user,
pass 
) [protected]
-
-
- -

sets the shards password.

-

in case the shard is offline, the entry will be stored in the ams_querycache.

-
Parameters:
- - - -
$userthe usersname of the account of which we want to change the password.
$passthe new password.
-
-
-
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
- -
-
- -
-
- - - - - - - - -
validEmail (email)
-
-
- -

check if the emailaddress structure is valid.

-
Parameters:
- - -
$emailthe email address
-
-
-
Returns:
true or false
- -
-
-
The documentation for this class was generated from the following file:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classUsers.png b/code/web/docs/ams/html/classUsers.png deleted file mode 100644 index 85efb81d9..000000000 Binary files a/code/web/docs/ams/html/classUsers.png and /dev/null differ diff --git a/code/web/docs/ams/html/classWebUsers.html b/code/web/docs/ams/html/classWebUsers.html deleted file mode 100644 index edb9aed56..000000000 --- a/code/web/docs/ams/html/classWebUsers.html +++ /dev/null @@ -1,1509 +0,0 @@ - - - - - -Ryzom Account Management System: WebUsers Class Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
- -
- -

handles CMS/WWW related functions regarding user management & registration. - More...

-
-Inheritance diagram for WebUsers:
-
-
- - -Users -Users - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

 __construct ($UId=0)
 A constructor.
 set ($values)
 sets the object's attributes.
 checkLoginMatch ($username, $password)
 check if the login username and password match the db.
 getUId ()
 get uId attribute of the object.
 getUsername ()
 get login attribute of the object.
 getEmail ()
 get email attribute of the object.
 getInfo ()
 get basic info of the object.
 getReceiveMail ()
 get receiveMail attribute of the object.
 getLanguage ()
 get language attribute of the object.
 isLoggedIn ()
 check if the user is logged in.
 setPassword ($user, $pass)
 update the password.
 setEmail ($user, $mail)
 update the emailaddress.
 getUsers ()
 return all users.
 __construct ($UId=0)
 A constructor.
 set ($values)
 sets the object's attributes.
 checkLoginMatch ($username, $password)
 check if the login username and password match the db.
 getUId ()
 get uId attribute of the object.
 getUsername ()
 get login attribute of the object.
 getEmail ()
 get email attribute of the object.
 getInfo ()
 get basic info of the object.
 getReceiveMail ()
 get receiveMail attribute of the object.
 getLanguage ()
 get language attribute of the object.
 isLoggedIn ()
 check if the user is logged in.
 setPassword ($user, $pass)
 update the password.
 setEmail ($user, $mail)
 update the emailaddress.
 getUsers ()
 return all users.

-Static Public Member Functions

static getId ($username)
 returns te id for a given username
static getIdFromEmail ($email)
 returns te id for a given emailaddress
static setReceiveMail ($user, $receivemail)
 update the setReceiveMail value in the db.
static setLanguage ($user, $language)
 update the language value in the db.
static getAllUsersQuery ()
 return the query that should get all users.
static createWebuser ($name, $pass, $mail)
 creates a webuser.
static getId ($username)
 returns te id for a given username
static getIdFromEmail ($email)
 returns te id for a given emailaddress
static setReceiveMail ($user, $receivemail)
 update the setReceiveMail value in the db.
static setLanguage ($user, $language)
 update the language value in the db.
static getAllUsersQuery ()
 return the query that should get all users.
static createWebuser ($name, $pass, $mail)
 creates a webuser.

-Protected Member Functions

 checkUserNameExists ($username)
 function that checks if a username exists already or not.
 checkEmailExists ($email)
 function that checks if a email exists already or not.
 checkUserNameExists ($username)
 function that checks if a username exists already or not.
 checkEmailExists ($email)
 function that checks if a email exists already or not.

-Private Attributes

 $uId
 The user id.
 $login
 The username.
 $email
 The email address.
 $firstname
 The users first name.
 $lastname
 The users last name.
 $gender
 The gender.
 $country
 2 letter word matching the country of the user
 $receiveMail
 configuration regarding if the user wants to receive email notifications or not.
 $language
 Language of the user.
-

Detailed Description

-

handles CMS/WWW related functions regarding user management & registration.

-

inherits from the Users class. The methods of this class have to be rewritten according to the CMS's functionality that you wish to use. The drupal_module has a webusers class of its own in the module itself.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
-

Constructor & Destructor Documentation

- -
-
- - - - - - - - -
__construct (UId = 0)
-
-
- -

A constructor.

-

loads the object with the UID, if none is given it will use 0.

-
Parameters:
- - -
$UIdthe UID of the user you want to instantiate.
-
-
- -
-
- -
-
- - - - - - - - -
__construct (UId = 0)
-
-
- -

A constructor.

-

loads the object with the UID, if none is given it will use 0.

-
Parameters:
- - -
$UIdthe UID of the user you want to instantiate.
-
-
- -
-
-

Member Function Documentation

- -
-
- - - - - - - - -
checkEmailExists (email) [protected]
-
-
- -

function that checks if a email exists already or not.

-

This function overrides the function of the base class.

-
Parameters:
- - -
$emailthe email address in question.
-
-
-
Returns:
string Info: Returns 0 if the email address is not in the web db, else a positive number is returned.
- -

Reimplemented from Users.

- -
-
- -
-
- - - - - - - - -
checkEmailExists (email) [protected]
-
-
- -

function that checks if a email exists already or not.

-

This function overrides the function of the base class.

-
Parameters:
- - -
$emailthe email address in question.
-
-
-
Returns:
string Info: Returns 0 if the email address is not in the web db, else a positive number is returned.
- -

Reimplemented from Users.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
checkLoginMatch (username,
password 
)
-
-
- -

check if the login username and password match the db.

-
Parameters:
- - - -
$usernamethe inserted username
$passwordthe inserted password (unhashed)
-
-
-
Returns:
the logged in user's db row as array if login was a success, else "fail" will be returned.
- -

Reimplemented from Users.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
checkLoginMatch (username,
password 
)
-
-
- -

check if the login username and password match the db.

-
Parameters:
- - - -
$usernamethe inserted username
$passwordthe inserted password (unhashed)
-
-
-
Returns:
the logged in user's db row as array if login was a success, else "fail" will be returned.
- -

Reimplemented from Users.

- -
-
- -
-
- - - - - - - - -
checkUserNameExists (username) [protected]
-
-
- -

function that checks if a username exists already or not.

-

This function overrides the function of the base class.

-
Parameters:
- - -
$usernamethe username in question
-
-
-
Returns:
string Info: Returns 0 if the user is not in the web db, else a positive number is returned.
- -

Reimplemented from Users.

- -
-
- -
-
- - - - - - - - -
checkUserNameExists (username) [protected]
-
-
- -

function that checks if a username exists already or not.

-

This function overrides the function of the base class.

-
Parameters:
- - -
$usernamethe username in question
-
-
-
Returns:
string Info: Returns 0 if the user is not in the web db, else a positive number is returned.
- -

Reimplemented from Users.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static createWebuser (name,
pass,
mail 
) [static]
-
-
- -

creates a webuser.

-

it will set the language matching to the language cookie setting and add it to the www/CMS's DB.

-
Parameters:
- - - - -
$namethe username
$passthe unhashed password
$mailthe email address
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
static createWebuser (name,
pass,
mail 
) [static]
-
-
- -

creates a webuser.

-

it will set the language matching to the language cookie setting and add it to the www/CMS's DB.

-
Parameters:
- - - - -
$namethe username
$passthe unhashed password
$mailthe email address
-
-
- -
-
- -
-
- - - - - - - -
static getAllUsersQuery () [static]
-
-
- -

return the query that should get all users.

-
Returns:
string: the query to receive all users.
- -
-
- -
-
- - - - - - - -
static getAllUsersQuery () [static]
-
-
- -

return the query that should get all users.

-
Returns:
string: the query to receive all users.
- -
-
- -
-
- - - - - - - -
getEmail ()
-
-
- -

get email attribute of the object.

- -
-
- -
-
- - - - - - - -
getEmail ()
-
-
- -

get email attribute of the object.

- -
-
- -
-
- - - - - - - - -
static getId (username) [static]
-
-
- -

returns te id for a given username

-
Parameters:
- - -
$usernamethe username
-
-
-
Returns:
the user's id linked to the username
- -
-
- -
-
- - - - - - - - -
static getId (username) [static]
-
-
- -

returns te id for a given username

-
Parameters:
- - -
$usernamethe username
-
-
-
Returns:
the user's id linked to the username
- -
-
- -
-
- - - - - - - - -
static getIdFromEmail (email) [static]
-
-
- -

returns te id for a given emailaddress

-
Parameters:
- - -
$emailthe emailaddress
-
-
-
Returns:
the user's id linked to the emailaddress
- -
-
- -
-
- - - - - - - - -
static getIdFromEmail (email) [static]
-
-
- -

returns te id for a given emailaddress

-
Parameters:
- - -
$emailthe emailaddress
-
-
-
Returns:
the user's id linked to the emailaddress
- -
-
- -
-
- - - - - - - -
getInfo ()
-
-
- -

get basic info of the object.

-
Returns:
returns an array in the form of Array('FirstName' => $this->firstname, 'LastName' => $this->lastname, 'Gender' => $this->gender, 'Country' => $this->country, 'ReceiveMail' => $this->receiveMail)
- -
-
- -
-
- - - - - - - -
getInfo ()
-
-
- -

get basic info of the object.

-
Returns:
returns an array in the form of Array('FirstName' => $this->firstname, 'LastName' => $this->lastname, 'Gender' => $this->gender, 'Country' => $this->country, 'ReceiveMail' => $this->receiveMail)
- -
-
- -
-
- - - - - - - -
getLanguage ()
-
-
- -

get language attribute of the object.

- -
-
- -
-
- - - - - - - -
getLanguage ()
-
-
- -

get language attribute of the object.

- -
-
- -
-
- - - - - - - -
getReceiveMail ()
-
-
- -

get receiveMail attribute of the object.

- -
-
- -
-
- - - - - - - -
getReceiveMail ()
-
-
- -

get receiveMail attribute of the object.

- -
-
- -
-
- - - - - - - -
getUId ()
-
-
- -

get uId attribute of the object.

- -
-
- -
-
- - - - - - - -
getUId ()
-
-
- -

get uId attribute of the object.

- -
-
- -
-
- - - - - - - -
getUsername ()
-
-
- -

get login attribute of the object.

-

(username)

- -
-
- -
-
- - - - - - - -
getUsername ()
-
-
- -

get login attribute of the object.

-

(username)

- -
-
- -
-
- - - - - - - -
getUsers ()
-
-
- -

return all users.

-
Returns:
return an array of users
- -
-
- -
-
- - - - - - - -
getUsers ()
-
-
- -

return all users.

-
Returns:
return an array of users
- -
-
- -
-
- - - - - - - -
isLoggedIn ()
-
-
- -

check if the user is logged in.

-
Returns:
true or false
- -
-
- -
-
- - - - - - - -
isLoggedIn ()
-
-
- -

check if the user is logged in.

-
Returns:
true or false
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array.
-
-
- -
-
- -
-
- - - - - - - - -
set (values)
-
-
- -

sets the object's attributes.

-
Parameters:
- - -
$valuesshould be an array.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
setEmail (user,
mail 
)
-
-
- -

update the emailaddress.

-

update the emailaddress in the shard + update the emailaddress in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$mailthe new emailaddress.
-
-
-
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
setEmail (user,
mail 
)
-
-
- -

update the emailaddress.

-

update the emailaddress in the shard + update the emailaddress in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$mailthe new emailaddress.
-
-
-
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static setLanguage (user,
language 
) [static]
-
-
- -

update the language value in the db.

-

update the language in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$languagethe new language value.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static setLanguage (user,
language 
) [static]
-
-
- -

update the language value in the db.

-

update the language in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$languagethe new language value.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
setPassword (user,
pass 
)
-
-
- -

update the password.

-

update the password in the shard + update the password in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$passthe new password.
-
-
-
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
setPassword (user,
pass 
)
-
-
- -

update the password.

-

update the password in the shard + update the password in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$passthe new password.
-
-
-
Returns:
ok if it worked, if the lib or shard is offline it will return liboffline or shardoffline.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static setReceiveMail (user,
receivemail 
) [static]
-
-
- -

update the setReceiveMail value in the db.

-

update the receiveMail in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$receivemailthe receivemail setting .
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
static setReceiveMail (user,
receivemail 
) [static]
-
-
- -

update the setReceiveMail value in the db.

-

update the receiveMail in the www/CMS version.

-
Parameters:
- - - -
$userthe username
$receivemailthe receivemail setting .
-
-
- -
-
-

Field Documentation

- -
-
- - - - -
$country [private]
-
-
- -

2 letter word matching the country of the user

- -
-
- -
-
- - - - -
$email [private]
-
-
- -

The email address.

- -
-
- -
-
- - - - -
$firstname [private]
-
-
- -

The users first name.

- -
-
- -
-
- - - - -
$gender [private]
-
-
- -

The gender.

- -
-
- -
-
- - - - -
$language [private]
-
-
- -

Language of the user.

- -
-
- -
-
- - - - -
$lastname [private]
-
-
- -

The users last name.

- -
-
- -
-
- - - - -
$login [private]
-
-
- -

The username.

- -
-
- -
-
- - - - -
$receiveMail [private]
-
-
- -

configuration regarding if the user wants to receive email notifications or not.

- -
-
- -
-
- - - - -
$uId [private]
-
-
- -

The user id.

- -
-
-
The documentation for this class was generated from the following files:
    -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php
  • -
  • /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/classWebUsers.png b/code/web/docs/ams/html/classWebUsers.png deleted file mode 100644 index 8aca4ddb0..000000000 Binary files a/code/web/docs/ams/html/classWebUsers.png and /dev/null differ diff --git a/code/web/docs/ams/html/classes.html b/code/web/docs/ams/html/classes.html deleted file mode 100644 index 33b1ba697..000000000 --- a/code/web/docs/ams/html/classes.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - -Ryzom Account Management System: Data Structure Index - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
Data Structure Index
-
-
-
A | D | F | G | H | I | M | P | Q | S | T | U | W
- - - - - - - - - - - - - - -
  A  
-
  H  
-
  P  
-
  T  
-
Ticket_User   
  U  
-
Assigned   Helpers   Pagination   Ticket   
  D  
-
  I  
-
  Q  
-
Ticket_Category   Users   
Ticket_Content   
  W  
-
DBLayer   In_Support_Group   Querycache   Ticket_Info   
  F  
-
  M  
-
  S  
-
Ticket_Log   WebUsers   
Ticket_Queue   
Forwarded   Mail_Handler   Support_Group   Ticket_Queue_Handler   
  G  
-
MyCrypt   Sync   Ticket_Reply   
Gui_Elements   
-
A | D | F | G | H | I | M | P | Q | S | T | U | W
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/closed.png b/code/web/docs/ams/html/closed.png deleted file mode 100644 index b7d4bd9fe..000000000 Binary files a/code/web/docs/ams/html/closed.png and /dev/null differ diff --git a/code/web/docs/ams/html/create__ticket_8php.html b/code/web/docs/ams/html/create__ticket_8php.html deleted file mode 100644 index ba969a5eb..000000000 --- a/code/web/docs/ams/html/create__ticket_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php File Reference
-
-
- - - - -

-Functions

 create_ticket ()
 This function is beign used to create a new ticket.
-

Function Documentation

- -
-
- - - - - - - -
create_ticket ()
-
-
- -

This function is beign used to create a new ticket.

-

It will first check if the user who executed this function is the person of whom the setting is or if it's a mod/admin. If this is not the case the page will be redirected to an error page. next it will filter the POST data and it will try to create the new ticket. Afterwards a redirecion to the ticket will occur.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/createticket_8php.html b/code/web/docs/ams/html/createticket_8php.html deleted file mode 100644 index 8b9fd9b2f..000000000 --- a/code/web/docs/ams/html/createticket_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php File Reference
-
-
- - - - -

-Functions

 createticket ()
 This function is beign used to load info that's needed for the createticket page.
-

Function Documentation

- -
-
- - - - - - - -
createticket ()
-
-
- -

This function is beign used to load info that's needed for the createticket page.

-

the $_GET['user_id'] identifies for which user you try to create a ticket. A normal user can only create a ticket for himself, a mod/admin however can also create tickets for other users. It will also load all categories and return these, they will be used by the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/dashboard_8php.html b/code/web/docs/ams/html/dashboard_8php.html deleted file mode 100644 index 593ae1be9..000000000 --- a/code/web/docs/ams/html/dashboard_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/dashboard.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/dashboard.php File Reference
-
-
- - - - -

-Functions

 dashboard ()
 This function is beign used to load info that's needed for the dashboard page.
-

Function Documentation

- -
-
- - - - - - - -
dashboard ()
-
-
- -

This function is beign used to load info that's needed for the dashboard page.

-

check if the person who wants to view this page is a mod/admin, if this is not the case, he will be redirected to an error page. next it will fetch a lot of information regarding to the status of the ticket system (eg return the total amount of tickets) and return this information so it can be used by the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/db.png b/code/web/docs/ams/html/db.png deleted file mode 100644 index 63cb4c92b..000000000 Binary files a/code/web/docs/ams/html/db.png and /dev/null differ diff --git a/code/web/docs/ams/html/dblayer_8php.html b/code/web/docs/ams/html/dblayer_8php.html deleted file mode 100644 index 278d76934..000000000 --- a/code/web/docs/ams/html/dblayer_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/dblayer.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/dblayer.php File Reference
-
-
- - - - -

-Data Structures

class  DBLayer
 Handles the database connections. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/deprecated.html b/code/web/docs/ams/html/deprecated.html deleted file mode 100644 index 932150748..000000000 --- a/code/web/docs/ams/html/deprecated.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - -Ryzom Account Management System: Deprecated List - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - -
-
-
-
Deprecated List
-
-
-
-
Global Support_Group ()
-
should be removed in the future, because getGroups does the same.
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/design.html b/code/web/docs/ams/html/design.html deleted file mode 100644 index 5c3f1db25..000000000 --- a/code/web/docs/ams/html/design.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - -Ryzom Account Management System: Design Info - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - -
-
-
-
Design Info
-
-
-

-A brief introduction to the design of the AMS

-

We will take a look at the current db design, the way the classes are designed, the way the WWW version works and how it was reused in the drupal module.

-

-The database structure

-

My project started with the design of our database. I had to think about the advanced AMS features in advance. This is the reason why there are still a few unused DB tables in the design, the plan however is to use those as soon as possible by implementing the extra features.

-

The tables that are unused are the following:

-
    -
  • -ticket_group
  • -
  • -in_group
  • -
  • -tag
  • -
  • -tagged
  • -
-

The idea for the ticket_groups was to provide the ability to bundle multiple tickets together in groups, this could be used for tickets that are alike or are in a weird way related. The idea for the tagging was to provide an extra system that allows to query tickets based on their tags (datamining). These features can be easily added in the future!

-

Let's take a look at the 'used' tables. The database structure is shown in the image below. For each table I made a matching class that handles the info of that table.

-

Quite central you can see the ticket table. As you can see, a ticket has a ticket_category field and author field, these hold the id of the related row in the ticket_category and ticket_user table. There's also the relation between a ticket and it's log entries, this is done by the ticket foreign key in the ticket_log table. The same counts for most other tables that are related to the ticket, they all got a ticket column used as foreign key.

-

Another thing that you might notice is the separation between ticket_reply and ticket_content, this is a 1-to-1 relation and this makes it easier to search between the replies if we only need their general information without having to take care of the content. The ticket_user is another quite important table that's being foreigned keyed by the others. It holds the permission of a user and the externID links to an ID given by the CMS(or our own www version)

-

Most things are pretty clear and straight forward, you can find the MYSQL Workbench file in the ryzom_ams/www/html/sql folder, which might give a better overview and can be used to update the DB easily when adding/modifying features in the future.

-
-db.png -
-

-Technologies used

- -

-Information regarding the structure

-

As you might have noticed, the ryzom_ams directory contains 3 directories: the ams_lib dir, the www dir and a drupal_module dir.

-

the ams_lib contains the following important dirs/files:

-
    -
  • -autoload dir holds all classes of the lib
  • -
  • -cron dir holds the cron functions regarding email and the ams_querycache
  • -
  • -ingame_templates dir holds the templates that are being used while ingame
  • -
  • -smarty dir the smarty files (http://www.smarty.net/)
  • -
  • -translations dir multiple .ini files, one for each language that's being supported.
  • -
  • -libinclude.php php file that holds the __autoload function
  • -
-

the www contains the following important dirs/files:

-
    -
  • -autoload dir holds the webusers.php file (which extends the Users.php file in the lib)
  • -
  • -func dir holds php files that contain a function that is being executed after filling in a form.
  • -
  • -inc dir holds php files that contain a function that is being executed before loading a specific file.
  • -
  • -templates dir holds the templates being used outgame.
  • -
  • -config.php php file that holds configuration settings
  • -
-

the drupal_module contains the following important dirs/files:

-
    -
  • -autoload dir holds the webusers.php file that uses drupal functions (which extends the Users.php file in the lib)
  • -
  • -func dir holds php files that contain a function that is being executed after filling in a form.
  • -
  • -inc dir holds php files that contain a function that is being executed before loading a specific file.
  • -
  • -templates dir holds the templates being used outgame.
  • -
  • -config.php php file that holds configuration settings
  • -
  • -ryzommanage.info drupal file that holds information being used by drupal
  • -
  • -ryzommanage.install drupal file thats being used for installing the module
  • -
  • -ryzommanage.module drupal file that holds all functionality that's being needed to handle the AMS in drupal. (read more about it at the wiki page)
  • -
-

Important: the func dir and inc dir in the drupal_module are almost empty, that's because the inc/func directories of the WWW version can be copied to the drupal version, they are exactly the same. However, because the drupal_module isn't completely up to date, the settings page doesn't has the extra fields (like gender,country,..) therefore the ingame template file, inc files related to that are still in the module.

-

-How does the page loading work?

-
-info.jpg -
-

-How are the classes being used?

-

Like I mentioned above, each DB table has a class related that handles the data linked to that table and has functions working with that data.

-

The private attributes of each class are similar to the fields in the DB table. Every class also has the following functions:

-
    -
  • -function __construct()
  • -
  • -function set($values)
  • -
  • -function create()
  • -
  • -function delete()
  • -
  • -function load( $id) or named similar
  • -
  • -some also have: update ()
  • -
-

These methods are being used by the public static functions of that class, which represent the 'real' AMS-functions, the ones being used by the inc/func files.

-

You can reference for example the Support_Group class's information, which shows this setup!

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/doxygen.css b/code/web/docs/ams/html/doxygen.css deleted file mode 100644 index cee0d06b5..000000000 --- a/code/web/docs/ams/html/doxygen.css +++ /dev/null @@ -1,949 +0,0 @@ -/* The standard CSS for doxygen */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 13px; - line-height: 1.3; -} - -/* @group Heading Levels */ - -h1 { - font-size: 150%; -} - -.title { - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2 { - font-size: 120%; -} - -h3 { - font-size: 100%; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd, p.starttd { - margin-top: 2px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -.fragment { - font-family: monospace, fixed; - font-size: 105%; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 8px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4CFE5; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; -} - -.memname { - white-space: nowrap; - font-weight: bold; - margin-left: 6px; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 8px; - border-top-left-radius: 8px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 2px 5px; - background-color: #FBFCFD; - border-top-width: 0; - /* opera specific markup */ - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -.params, .retval, .exception, .tparams { - border-spacing: 6px 2px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - - - - -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ - -.ftvtree { - font-family: sans-serif; - margin: 0px; -} - -/* these are for tree view when used as main index */ - -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} - -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ - -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ - -.directory > h3 { - margin-top: 0; -} - -.directory p { - margin: 0px; - white-space: nowrap; -} - -.directory div { - display: none; - margin: 0px; -} - -.directory img { - vertical-align: -30%; -} - -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; -} - -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -.directory-alt > h3 { - margin-top: 0; -} - -.directory-alt p { - margin: 0px; - white-space: nowrap; -} - -.directory-alt div { - display: none; - margin: 0px; -} - -.directory-alt img { - vertical-align: -30%; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; -} - -table.fieldtable { - width: 100%; - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - width: 100%; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - margin-left: 5px; - font-size: 8pt; - padding-left: 5px; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 7px; -} - -dl -{ - padding: 0 0 0 10px; -} - -dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug -{ - border-left:4px solid; - padding: 0 0 0 6px; -} - -dl.note -{ - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - border-color: #00D000; -} - -dl.deprecated -{ - border-color: #505050; -} - -dl.todo -{ - border-color: #00C0E0; -} - -dl.test -{ - border-color: #3030E0; -} - -dl.bug -{ - border-color: #C08050; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } - pre.fragment - { - overflow: visible; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - } -} - diff --git a/code/web/docs/ams/html/doxygen.png b/code/web/docs/ams/html/doxygen.png deleted file mode 100644 index 635ed52fc..000000000 Binary files a/code/web/docs/ams/html/doxygen.png and /dev/null differ diff --git a/code/web/docs/ams/html/drupal__module_2ryzommanage_2autoload_2webusers_8php.html b/code/web/docs/ams/html/drupal__module_2ryzommanage_2autoload_2webusers_8php.html deleted file mode 100644 index 6cd2773c7..000000000 --- a/code/web/docs/ams/html/drupal__module_2ryzommanage_2autoload_2webusers_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php File Reference
-
-
- - - - -

-Data Structures

class  WebUsers
 handles CMS/WWW related functions regarding user management & registration. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/drupal__module_2ryzommanage_2config_8php.html b/code/web/docs/ams/html/drupal__module_2ryzommanage_2config_8php.html deleted file mode 100644 index 612e717e2..000000000 --- a/code/web/docs/ams/html/drupal__module_2ryzommanage_2config_8php.html +++ /dev/null @@ -1,820 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.php File Reference
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Variables

 $cfg ['db']['web']['host'] = variable_get('ryzommanage_webserverurl', 'localhost')
 This file contains all variables needed by other php scripts.
 $cfg ['db']['web']['port'] = variable_get('ryzommanage_webmysqlport', '3306')
 $cfg ['db']['web']['name'] = variable_get('ryzommanage_webdbname', 'drupal')
 $cfg ['db']['web']['user'] = variable_get('ryzommanage_webusername', 'shard')
 $cfg ['db']['web']['pass'] = variable_get('ryzommanage_webpassword', '')
 $cfg ['db']['lib']['host'] = variable_get('ryzommanage_libserverurl', 'localhost')
 $cfg ['db']['lib']['port'] = variable_get('ryzommanage_libmysqlport', '3306')
 $cfg ['db']['lib']['name'] = variable_get('ryzommanage_libdbname', 'ryzom_ams_lib')
 $cfg ['db']['lib']['user'] = variable_get('ryzommanage_libusername', 'shard')
 $cfg ['db']['lib']['pass'] = variable_get('ryzommanage_libpassword', '')
 $cfg ['db']['shard']['host'] = variable_get('ryzommanage_shardserverurl', 'localhost')
 $cfg ['db']['shard']['port'] = variable_get('ryzommanage_shardmysqlport', '3306')
 $cfg ['db']['shard']['name'] = variable_get('ryzommanage_sharddbname', 'nel')
 $cfg ['db']['shard']['user'] = variable_get('ryzommanage_shardusername', 'shard')
 $cfg ['db']['shard']['pass'] = variable_get('ryzommanage_shardpassword', '')
 $cfg ['db']['ring']['host'] = variable_get('ryzommanage_ringserverurl', 'localhost')
 $cfg ['db']['ring']['port'] = variable_get('ryzommanage_ringmysqlport', '3306')
 $cfg ['db']['ring']['name'] = variable_get('ryzommanage_ringdbname', 'ring_open')
 $cfg ['db']['ring']['user'] = variable_get('ryzommanage_ringusername', 'shard')
 $cfg ['db']['ring']['pass'] = variable_get('ryzommanage_ringpassword', '')
 $cfg ['mail']['default_mailserver'] = '{imap.gmail.com:993/imap/ssl}INBOX'
 $cfg ['mail']['default_groupemail'] = 'amsryzom@gmail.com'
 $cfg ['mail']['default_groupname'] = 'Ryzomcore Support'
 $cfg ['mail']['default_username'] = 'amsryzom@gmail.com'
 $cfg ['mail']['default_password'] = 'lol123bol'
 $cfg ['mail']['host'] = "ryzomcore.com"
 $SUPPORT_GROUP_IMAP_CRYPTKEY = "azerty"
 $TICKET_MAILING_SUPPORT = false
 $MAIL_DIR = "/tmp/mail"
 $MAIL_LOG_PATH = "/tmp/mail/cron_mail.log"
 $cfg ['crypt']['key'] = 'Sup3rS3cr3tStuff'
 $cfg ['crypt']['enc_method'] = 'AES-256-CBC'
 $cfg ['crypt']['hash_method'] = "SHA512"
 $TOS_URL = variable_get('ryzommanage_TOS', 'www.mytosurlhere.com')
 $ALLOW_UNKNOWN = true
 $CREATE_RING = true
 $AMS_LIB = dirname( __FILE__ ) . '/ams_lib'
 $AMS_TRANS = $AMS_LIB . '/translations'
 $AMS_CACHEDIR = $AMS_LIB . '/cache'
 $SITEBASE = dirname( __FILE__ )
 $BASE_WEBPATH = 'http://localhost:40917/drupal'
 $IMAGELOC_WEBPATH = $BASE_WEBPATH. '/sites/all/modules/ryzommanage/ams_lib/img'
 $WEBPATH = $BASE_WEBPATH .'/ams'
 $INGAME_WEBPATH = $BASE_WEBPATH . '/ingame'
 $CONFIG_PATH = dirname( __FILE__ )
 $DEFAULT_LANGUAGE = 'en'
 $TICKET_LOGGING = true
 $TIME_FORMAT = "m-d-Y H:i:s"
 $INGAME_LAYOUT = "basic"
 $FORCE_INGAME = false
-

Variable Documentation

- -
-
- - - - -
$ALLOW_UNKNOWN = true
-
-
- -
-
- -
-
- - - - -
$AMS_CACHEDIR = $AMS_LIB . '/cache'
-
-
- -
-
- -
-
- - - - -
$AMS_LIB = dirname( __FILE__ ) . '/ams_lib'
-
-
- -
-
- -
-
- - - - -
$AMS_TRANS = $AMS_LIB . '/translations'
-
-
- -
-
- -
-
- - - - -
$BASE_WEBPATH = 'http://localhost:40917/drupal'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['host'] = variable_get('ryzommanage_webserverurl', 'localhost')
-
-
- -

This file contains all variables needed by other php scripts.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
- -
-
- - - - -
$cfg['db']['web']['port'] = variable_get('ryzommanage_webmysqlport', '3306')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['name'] = variable_get('ryzommanage_webdbname', 'drupal')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['user'] = variable_get('ryzommanage_webusername', 'shard')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['pass'] = variable_get('ryzommanage_webpassword', '')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['host'] = variable_get('ryzommanage_libserverurl', 'localhost')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['port'] = variable_get('ryzommanage_libmysqlport', '3306')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['name'] = variable_get('ryzommanage_libdbname', 'ryzom_ams_lib')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['user'] = variable_get('ryzommanage_libusername', 'shard')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['pass'] = variable_get('ryzommanage_libpassword', '')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['host'] = variable_get('ryzommanage_shardserverurl', 'localhost')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['port'] = variable_get('ryzommanage_shardmysqlport', '3306')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['name'] = variable_get('ryzommanage_sharddbname', 'nel')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['user'] = variable_get('ryzommanage_shardusername', 'shard')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['pass'] = variable_get('ryzommanage_shardpassword', '')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['host'] = variable_get('ryzommanage_ringserverurl', 'localhost')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['port'] = variable_get('ryzommanage_ringmysqlport', '3306')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['name'] = variable_get('ryzommanage_ringdbname', 'ring_open')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['user'] = variable_get('ryzommanage_ringusername', 'shard')
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['pass'] = variable_get('ryzommanage_ringpassword', '')
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_mailserver'] = '{imap.gmail.com:993/imap/ssl}INBOX'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_groupemail'] = 'amsryzom@gmail.com'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_groupname'] = 'Ryzomcore Support'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_username'] = 'amsryzom@gmail.com'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_password'] = 'lol123bol'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['host'] = "ryzomcore.com"
-
-
- -
-
- -
-
- - - - -
$cfg['crypt']['key'] = 'Sup3rS3cr3tStuff'
-
-
- -
-
- -
-
- - - - -
$cfg['crypt']['enc_method'] = 'AES-256-CBC'
-
-
- -
-
- -
-
- - - - -
$cfg['crypt']['hash_method'] = "SHA512"
-
-
- -
-
- -
-
- - - - -
$CONFIG_PATH = dirname( __FILE__ )
-
-
- -
-
- -
-
- - - - -
$CREATE_RING = true
-
-
- -
-
- -
-
- - - - -
$DEFAULT_LANGUAGE = 'en'
-
-
- -
-
- -
-
- - - - -
$FORCE_INGAME = false
-
-
- -
-
- -
-
- - - - -
$IMAGELOC_WEBPATH = $BASE_WEBPATH. '/sites/all/modules/ryzommanage/ams_lib/img'
-
-
- -
-
- -
-
- - - - -
$INGAME_LAYOUT = "basic"
-
-
- -
-
- -
-
- - - - -
$INGAME_WEBPATH = $BASE_WEBPATH . '/ingame'
-
-
- -
-
- -
-
- - - - -
$MAIL_DIR = "/tmp/mail"
-
-
- -
-
- -
-
- - - - -
$MAIL_LOG_PATH = "/tmp/mail/cron_mail.log"
-
-
- -
-
- -
-
- - - - -
$SITEBASE = dirname( __FILE__ )
-
-
- -
-
- -
-
- - - - -
$SUPPORT_GROUP_IMAP_CRYPTKEY = "azerty"
-
-
- -
-
- -
-
- - - - -
$TICKET_LOGGING = true
-
-
- -
-
- -
-
- - - - -
$TICKET_MAILING_SUPPORT = false
-
-
- -
-
- -
-
- - - - -
$TIME_FORMAT = "m-d-Y H:i:s"
-
-
- -
-
- -
-
- - - - -
$TOS_URL = variable_get('ryzommanage_TOS', 'www.mytosurlhere.com')
-
-
- -
-
- -
-
- - - - -
$WEBPATH = $BASE_WEBPATH .'/ams'
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2logout_8php.html b/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2logout_8php.html deleted file mode 100644 index 5bfd6bf13..000000000 --- a/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2logout_8php.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/logout.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/logout.php File Reference
-
-
- - - -

-Functions

 logout ()
-

Function Documentation

- -
-
- - - - - - - -
logout ()
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2settings_8php.html b/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2settings_8php.html deleted file mode 100644 index 6c4aad8c5..000000000 --- a/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2settings_8php.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/settings.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/settings.php File Reference
-
-
- - - - -

-Functions

 settings ()
 getCountryArray ()
-

Function Documentation

- -
-
- - - - - - - -
getCountryArray ()
-
-
- -
-
- -
-
- - - - - - - -
settings ()
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2show__user_8php.html b/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2show__user_8php.html deleted file mode 100644 index 089184d66..000000000 --- a/code/web/docs/ams/html/drupal__module_2ryzommanage_2inc_2show__user_8php.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php File Reference
-
-
- - - -

-Functions

 show_user ()
-

Function Documentation

- -
-
- - - - - - - -
show_user ()
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/error_8php.html b/code/web/docs/ams/html/error_8php.html deleted file mode 100644 index 18103076e..000000000 --- a/code/web/docs/ams/html/error_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/error.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/error.php File Reference
-
-
- - - - -

-Functions

 error ()
 This function is beign used to load info that's needed for the error page.
-

Function Documentation

- -
-
- - - - - - - -
error ()
-
-
- -

This function is beign used to load info that's needed for the error page.

-

if a error_code session var is set it will unset it (else 404 is used), and it will return the error code so it can be used in the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/files.html b/code/web/docs/ams/html/files.html deleted file mode 100644 index ac4afa38c..000000000 --- a/code/web/docs/ams/html/files.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - -Ryzom Account Management System: File List - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
File List
-
-
-
Here is a list of all files with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/libinclude.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/assigned.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/dblayer.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/forwarded.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/gui_elements.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/in_support_group.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mycrypt.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/pagination.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/querycache.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sync.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_category.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_content.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue_handler.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_reply.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/cron/mail_cron.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/cron/sync_cron.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/config.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/autoload/webusers.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/logout.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/settings.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/drupal_module/ryzommanage/inc/show_user.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/config.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/index.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_sgroup.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/add_user_to_sgroup.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_info.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_mail.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_password.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/change_receivemail.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/create_ticket.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/modify_email_of_sgroup.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/reply_on_ticket.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/change_permission.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/createticket.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/dashboard.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/error.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/login.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/logout.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/settings.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_queue.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_reply.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_info.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_user.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/syncing.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/userlist.php
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php
info.php
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/forwarded_8php.html b/code/web/docs/ams/html/forwarded_8php.html deleted file mode 100644 index c63feb786..000000000 --- a/code/web/docs/ams/html/forwarded_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/forwarded.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/forwarded.php File Reference
-
-
- - - - -

-Data Structures

class  Forwarded
 Handles the forwarding of a ticket to a support_group. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/func_2login_8php.html b/code/web/docs/ams/html/func_2login_8php.html deleted file mode 100644 index 42c3b2cfc..000000000 --- a/code/web/docs/ams/html/func_2login_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/login.php File Reference
-
-
- - - - -

-Functions

 login ()
 This function is beign used to login a user.
-

Function Documentation

- -
-
- - - - - - - -
login ()
-
-
- -

This function is beign used to login a user.

-

It will first check if the sent POST data returns a match with the DB, if it does, some session variables will be appointed to the user and he will be redirected to the index page again. If it didn't match, the template will be reloaded and a matching error message will be shown.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions.html b/code/web/docs/ams/html/functions.html deleted file mode 100644 index 15739f418..000000000 --- a/code/web/docs/ams/html/functions.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- $ -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x5f.html b/code/web/docs/ams/html/functions_0x5f.html deleted file mode 100644 index d3ed223bd..000000000 --- a/code/web/docs/ams/html/functions_0x5f.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- _ -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x61.html b/code/web/docs/ams/html/functions_0x61.html deleted file mode 100644 index 71b75926d..000000000 --- a/code/web/docs/ams/html/functions_0x61.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- a -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x63.html b/code/web/docs/ams/html/functions_0x63.html deleted file mode 100644 index e54bfdd94..000000000 --- a/code/web/docs/ams/html/functions_0x63.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- c -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x64.html b/code/web/docs/ams/html/functions_0x64.html deleted file mode 100644 index ccb18fba0..000000000 --- a/code/web/docs/ams/html/functions_0x64.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- d -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x65.html b/code/web/docs/ams/html/functions_0x65.html deleted file mode 100644 index 5b0059440..000000000 --- a/code/web/docs/ams/html/functions_0x65.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- e -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x66.html b/code/web/docs/ams/html/functions_0x66.html deleted file mode 100644 index a3f6b19ed..000000000 --- a/code/web/docs/ams/html/functions_0x66.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- f -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x67.html b/code/web/docs/ams/html/functions_0x67.html deleted file mode 100644 index 6545e7d84..000000000 --- a/code/web/docs/ams/html/functions_0x67.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- g -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x68.html b/code/web/docs/ams/html/functions_0x68.html deleted file mode 100644 index 50b2e6fd2..000000000 --- a/code/web/docs/ams/html/functions_0x68.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- h -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x69.html b/code/web/docs/ams/html/functions_0x69.html deleted file mode 100644 index 10bdba341..000000000 --- a/code/web/docs/ams/html/functions_0x69.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- i -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x6c.html b/code/web/docs/ams/html/functions_0x6c.html deleted file mode 100644 index b3146013a..000000000 --- a/code/web/docs/ams/html/functions_0x6c.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- l -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x6d.html b/code/web/docs/ams/html/functions_0x6d.html deleted file mode 100644 index 69ab3be22..000000000 --- a/code/web/docs/ams/html/functions_0x6d.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- m -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x6e.html b/code/web/docs/ams/html/functions_0x6e.html deleted file mode 100644 index 78bc0f4c2..000000000 --- a/code/web/docs/ams/html/functions_0x6e.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- n -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x6f.html b/code/web/docs/ams/html/functions_0x6f.html deleted file mode 100644 index f33e2ca29..000000000 --- a/code/web/docs/ams/html/functions_0x6f.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- o -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x73.html b/code/web/docs/ams/html/functions_0x73.html deleted file mode 100644 index eb3fce49c..000000000 --- a/code/web/docs/ams/html/functions_0x73.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- s -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x74.html b/code/web/docs/ams/html/functions_0x74.html deleted file mode 100644 index 737b1e6f0..000000000 --- a/code/web/docs/ams/html/functions_0x74.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- t -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x75.html b/code/web/docs/ams/html/functions_0x75.html deleted file mode 100644 index 76a7f2de4..000000000 --- a/code/web/docs/ams/html/functions_0x75.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- u -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_0x76.html b/code/web/docs/ams/html/functions_0x76.html deleted file mode 100644 index 4eea14d7c..000000000 --- a/code/web/docs/ams/html/functions_0x76.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all struct and union fields with links to the structures/unions they belong to:
- -

- v -

    -
  • validEmail() -: Users -
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func.html b/code/web/docs/ams/html/functions_func.html deleted file mode 100644 index 95c9509f0..000000000 --- a/code/web/docs/ams/html/functions_func.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
- - - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x61.html b/code/web/docs/ams/html/functions_func_0x61.html deleted file mode 100644 index eecdf704b..000000000 --- a/code/web/docs/ams/html/functions_func_0x61.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- a -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x63.html b/code/web/docs/ams/html/functions_func_0x63.html deleted file mode 100644 index 4601329e1..000000000 --- a/code/web/docs/ams/html/functions_func_0x63.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- c -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x64.html b/code/web/docs/ams/html/functions_func_0x64.html deleted file mode 100644 index 1b13f2d4f..000000000 --- a/code/web/docs/ams/html/functions_func_0x64.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- d -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x65.html b/code/web/docs/ams/html/functions_func_0x65.html deleted file mode 100644 index ccaad6ae0..000000000 --- a/code/web/docs/ams/html/functions_func_0x65.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- e -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x66.html b/code/web/docs/ams/html/functions_func_0x66.html deleted file mode 100644 index 5db22a523..000000000 --- a/code/web/docs/ams/html/functions_func_0x66.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- f -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x67.html b/code/web/docs/ams/html/functions_func_0x67.html deleted file mode 100644 index 1737c3390..000000000 --- a/code/web/docs/ams/html/functions_func_0x67.html +++ /dev/null @@ -1,460 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- g -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x68.html b/code/web/docs/ams/html/functions_func_0x68.html deleted file mode 100644 index 9904982e0..000000000 --- a/code/web/docs/ams/html/functions_func_0x68.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- h -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x69.html b/code/web/docs/ams/html/functions_func_0x69.html deleted file mode 100644 index dc34cf2ba..000000000 --- a/code/web/docs/ams/html/functions_func_0x69.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- i -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x6c.html b/code/web/docs/ams/html/functions_func_0x6c.html deleted file mode 100644 index 714735a9f..000000000 --- a/code/web/docs/ams/html/functions_func_0x6c.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- l -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x6d.html b/code/web/docs/ams/html/functions_func_0x6d.html deleted file mode 100644 index d9e0a3d0f..000000000 --- a/code/web/docs/ams/html/functions_func_0x6d.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- m -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x6e.html b/code/web/docs/ams/html/functions_func_0x6e.html deleted file mode 100644 index e63e0096d..000000000 --- a/code/web/docs/ams/html/functions_func_0x6e.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- n -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x6f.html b/code/web/docs/ams/html/functions_func_0x6f.html deleted file mode 100644 index 052a9e878..000000000 --- a/code/web/docs/ams/html/functions_func_0x6f.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- o -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x73.html b/code/web/docs/ams/html/functions_func_0x73.html deleted file mode 100644 index e54b1d413..000000000 --- a/code/web/docs/ams/html/functions_func_0x73.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- s -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x74.html b/code/web/docs/ams/html/functions_func_0x74.html deleted file mode 100644 index 01dc511f8..000000000 --- a/code/web/docs/ams/html/functions_func_0x74.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- t -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x75.html b/code/web/docs/ams/html/functions_func_0x75.html deleted file mode 100644 index 8461fb53c..000000000 --- a/code/web/docs/ams/html/functions_func_0x75.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- u -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_func_0x76.html b/code/web/docs/ams/html/functions_func_0x76.html deleted file mode 100644 index df3e6c9d6..000000000 --- a/code/web/docs/ams/html/functions_func_0x76.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Functions - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- v -

    -
  • validEmail() -: Users -
  • -
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/functions_vars.html b/code/web/docs/ams/html/functions_vars.html deleted file mode 100644 index 3e1822ad5..000000000 --- a/code/web/docs/ams/html/functions_vars.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - -Ryzom Account Management System: Data Fields - Variables - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- $ -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/globals.html b/code/web/docs/ams/html/globals.html deleted file mode 100644 index e47399641..000000000 --- a/code/web/docs/ams/html/globals.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - -Ryzom Account Management System: Globals - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- $ -

- - -

- _ -

- - -

- a -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- g -

- - -

- l -

- - -

- m -

- - -

- r -

- - -

- s -

- - -

- u -

- - -

- w -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/globals_func.html b/code/web/docs/ams/html/globals_func.html deleted file mode 100644 index 72b667802..000000000 --- a/code/web/docs/ams/html/globals_func.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - -Ryzom Account Management System: Globals - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- _ -

- - -

- a -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- g -

- - -

- l -

- - -

- m -

- - -

- r -

- - -

- s -

- - -

- u -

- - -

- w -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/globals_vars.html b/code/web/docs/ams/html/globals_vars.html deleted file mode 100644 index 3bf8fc1ea..000000000 --- a/code/web/docs/ams/html/globals_vars.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - -Ryzom Account Management System: Globals - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - - - -
-
-  - -

- $ -

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/gui__elements_8php.html b/code/web/docs/ams/html/gui__elements_8php.html deleted file mode 100644 index 871ced11e..000000000 --- a/code/web/docs/ams/html/gui__elements_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/gui_elements.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/gui_elements.php File Reference
-
-
- - - - -

-Data Structures

class  Gui_Elements
 Helper class for generating gui related elements. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/helpers_8php.html b/code/web/docs/ams/html/helpers_8php.html deleted file mode 100644 index c69ac3d2d..000000000 --- a/code/web/docs/ams/html/helpers_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/helpers.php File Reference
-
-
- - - - -

-Data Structures

class  Helpers
 Helper class for more site specific functions. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/hierarchy.html b/code/web/docs/ams/html/hierarchy.html deleted file mode 100644 index d4224c3d0..000000000 --- a/code/web/docs/ams/html/hierarchy.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - -Ryzom Account Management System: Class Hierarchy - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
Class Hierarchy
-
- - - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/in__support__group_8php.html b/code/web/docs/ams/html/in__support__group_8php.html deleted file mode 100644 index 3df89eb62..000000000 --- a/code/web/docs/ams/html/in__support__group_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/in_support_group.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/in_support_group.php File Reference
-
-
- - - - -

-Data Structures

class  In_Support_Group
 Handles the linkage of users being in a support group. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/inc_2login_8php.html b/code/web/docs/ams/html/inc_2login_8php.html deleted file mode 100644 index 428266ea6..000000000 --- a/code/web/docs/ams/html/inc_2login_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/login.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/login.php File Reference
-
-
- - - - -

-Functions

 login ()
 This function is beign used to load info that's needed for the login page.
-

Function Documentation

- -
-
- - - - - - - -
login ()
-
-
- -

This function is beign used to load info that's needed for the login page.

-

it will try to auto-login, this can only be used while ingame, the web browser sends additional cookie information that's also stored in the open_ring db. We will compare the values and if they match, the user will be automatically logged in!

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/index.html b/code/web/docs/ams/html/index.html deleted file mode 100644 index 82188ca7c..000000000 --- a/code/web/docs/ams/html/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - -Ryzom Account Management System: The Ryzom AMS information pages. - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - -
-
-
-
The Ryzom AMS information pages.
-
-
-

-Introduction

-

Welcome to the documentation pages of the ryzom account management system library.
- Doxygen is being used to generate these webpages. They should offer a good reference for anyone who is interested in working with the AMS library.

-

-More info?

-

if you want more information take a look at the ryzomcore wikipages and the design pages

-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/index_8php.html b/code/web/docs/ams/html/index_8php.html deleted file mode 100644 index 1a7125c9f..000000000 --- a/code/web/docs/ams/html/index_8php.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/index.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/index.php File Reference
-
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/info.jpg b/code/web/docs/ams/html/info.jpg deleted file mode 100644 index 9c9f05092..000000000 Binary files a/code/web/docs/ams/html/info.jpg and /dev/null differ diff --git a/code/web/docs/ams/html/info_8php.html b/code/web/docs/ams/html/info_8php.html deleted file mode 100644 index 815bd4679..000000000 --- a/code/web/docs/ams/html/info_8php.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - -Ryzom Account Management System: info.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
info.php File Reference
-
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/install_8php.html b/code/web/docs/ams/html/install_8php.html deleted file mode 100644 index e05c51d76..000000000 --- a/code/web/docs/ams/html/install_8php.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/sql/install.php File Reference
-
-
- - - -

-Variables

global $cfg
-

Variable Documentation

- -
-
- - - - -
global $cfg
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/installdox b/code/web/docs/ams/html/installdox deleted file mode 100644 index edf5bbfe3..000000000 --- a/code/web/docs/ams/html/installdox +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/perl - -%subst = ( ); -$quiet = 0; - -while ( @ARGV ) { - $_ = shift @ARGV; - if ( s/^-// ) { - if ( /^l(.*)/ ) { - $v = ($1 eq "") ? shift @ARGV : $1; - ($v =~ /\/$/) || ($v .= "/"); - $_ = $v; - if ( /(.+)\@(.+)/ ) { - if ( exists $subst{$1} ) { - $subst{$1} = $2; - } else { - print STDERR "Unknown tag file $1 given with option -l\n"; - &usage(); - } - } else { - print STDERR "Argument $_ is invalid for option -l\n"; - &usage(); - } - } - elsif ( /^q/ ) { - $quiet = 1; - } - elsif ( /^\?|^h/ ) { - &usage(); - } - else { - print STDERR "Illegal option -$_\n"; - &usage(); - } - } - else { - push (@files, $_ ); - } -} - -foreach $sub (keys %subst) -{ - if ( $subst{$sub} eq "" ) - { - print STDERR "No substitute given for tag file `$sub'\n"; - &usage(); - } - elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) - { - print "Substituting $subst{$sub} for each occurrence of tag file $sub\n"; - } -} - -if ( ! @files ) { - if (opendir(D,".")) { - foreach $file ( readdir(D) ) { - $match = ".html"; - next if ( $file =~ /^\.\.?$/ ); - ($file =~ /$match/) && (push @files, $file); - ($file =~ /\.svg/) && (push @files, $file); - ($file =~ "navtree.js") && (push @files, $file); - } - closedir(D); - } -} - -if ( ! @files ) { - print STDERR "Warning: No input files given and none found!\n"; -} - -foreach $f (@files) -{ - if ( ! $quiet ) { - print "Editing: $f...\n"; - } - $oldf = $f; - $f .= ".bak"; - unless (rename $oldf,$f) { - print STDERR "Error: cannot rename file $oldf\n"; - exit 1; - } - if (open(F,"<$f")) { - unless (open(G,">$oldf")) { - print STDERR "Error: opening file $oldf for writing\n"; - exit 1; - } - if ($oldf ne "tree.js") { - while () { - s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (xlink:href|href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; - print G "$_"; - } - } - else { - while () { - s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; - print G "$_"; - } - } - } - else { - print STDERR "Warning file $f does not exist\n"; - } - unlink $f; -} - -sub usage { - print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; - print STDERR "Options:\n"; - print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; - print STDERR " -q Quiet mode\n\n"; - exit 1; -} diff --git a/code/web/docs/ams/html/jquery.js b/code/web/docs/ams/html/jquery.js deleted file mode 100644 index 90b3a2bc3..000000000 --- a/code/web/docs/ams/html/jquery.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) -{I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() -{G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); - -/* - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' -
- - - - - - - diff --git a/code/web/docs/ams/html/logo.png b/code/web/docs/ams/html/logo.png deleted file mode 100644 index a072d6eaf..000000000 Binary files a/code/web/docs/ams/html/logo.png and /dev/null differ diff --git a/code/web/docs/ams/html/mail__cron_8php.html b/code/web/docs/ams/html/mail__cron_8php.html deleted file mode 100644 index d08742e2a..000000000 --- a/code/web/docs/ams/html/mail__cron_8php.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/cron/mail_cron.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/cron/mail_cron.php File Reference
-
-
- - - - -

-Variables

 $mail_handler = new Mail_Handler()
 This small piece of php code calls the cron() function of the Mail_Handler.
-

Variable Documentation

- -
-
- - - - -
$mail_handler = new Mail_Handler()
-
-
- -

This small piece of php code calls the cron() function of the Mail_Handler.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/mail__handler_8php.html b/code/web/docs/ams/html/mail__handler_8php.html deleted file mode 100644 index 51c5ead9e..000000000 --- a/code/web/docs/ams/html/mail__handler_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mail_handler.php File Reference
-
-
- - - - -

-Data Structures

class  Mail_Handler
 Handles the mailing functionality. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/modify__email__of__sgroup_8php.html b/code/web/docs/ams/html/modify__email__of__sgroup_8php.html deleted file mode 100644 index 12cc4f71b..000000000 --- a/code/web/docs/ams/html/modify__email__of__sgroup_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/modify_email_of_sgroup.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/modify_email_of_sgroup.php File Reference
-
-
- - - - -

-Functions

 modify_email_of_sgroup ()
 This function is beign used to modify the email related to a support group.
-

Function Documentation

- -
-
- - - - - - - -
modify_email_of_sgroup ()
-
-
- -

This function is beign used to modify the email related to a support group.

-

It will first check if the user who executed this function is an admin. If this is not the case the page will be redirected to an error page. the new email will be validated and in case it's valid we'll add it to the db. Before adding it, we will encrypt the password by using the MyCrypt class. Afterwards the password gets updated and the page redirected again.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/mycrypt_8php.html b/code/web/docs/ams/html/mycrypt_8php.html deleted file mode 100644 index 6c440fabe..000000000 --- a/code/web/docs/ams/html/mycrypt_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mycrypt.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mycrypt.php File Reference
-
-
- - - - -

-Data Structures

class  MyCrypt
 Basic encryption/decryption class. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/nav_f.png b/code/web/docs/ams/html/nav_f.png deleted file mode 100644 index 1b07a1620..000000000 Binary files a/code/web/docs/ams/html/nav_f.png and /dev/null differ diff --git a/code/web/docs/ams/html/nav_h.png b/code/web/docs/ams/html/nav_h.png deleted file mode 100644 index 01f5fa6a5..000000000 Binary files a/code/web/docs/ams/html/nav_h.png and /dev/null differ diff --git a/code/web/docs/ams/html/open.png b/code/web/docs/ams/html/open.png deleted file mode 100644 index 7b35d2c2c..000000000 Binary files a/code/web/docs/ams/html/open.png and /dev/null differ diff --git a/code/web/docs/ams/html/pages.html b/code/web/docs/ams/html/pages.html deleted file mode 100644 index 493c8b632..000000000 --- a/code/web/docs/ams/html/pages.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - -Ryzom Account Management System: Related Pages - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - -
-
-
-
Related Pages
-
-
-
Here is a list of all related documentation pages:
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/pagination_8php.html b/code/web/docs/ams/html/pagination_8php.html deleted file mode 100644 index 880e06a36..000000000 --- a/code/web/docs/ams/html/pagination_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/pagination.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/pagination.php File Reference
-
-
- - - - -

-Data Structures

class  Pagination
 Handles returning arrays based on a given pagenumber. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/querycache_8php.html b/code/web/docs/ams/html/querycache_8php.html deleted file mode 100644 index 0a9593825..000000000 --- a/code/web/docs/ams/html/querycache_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/querycache.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/querycache.php File Reference
-
-
- - - - -

-Data Structures

class  Querycache
 class for storing changes when shard is offline. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/register_8php.html b/code/web/docs/ams/html/register_8php.html deleted file mode 100644 index d326886af..000000000 --- a/code/web/docs/ams/html/register_8php.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/register.php File Reference
-
-
- - - - -

-Functions

 register ()
 This function is beign used to load info that's needed for the register page.
-

Function Documentation

- -
-
- - - - - - - -
register ()
-
-
- -

This function is beign used to load info that's needed for the register page.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/reply__on__ticket_8php.html b/code/web/docs/ams/html/reply__on__ticket_8php.html deleted file mode 100644 index aed5249ba..000000000 --- a/code/web/docs/ams/html/reply__on__ticket_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/reply_on_ticket.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/func/reply_on_ticket.php File Reference
-
-
- - - - -

-Functions

 reply_on_ticket ()
 This function is beign used to reply on a ticket.
-

Function Documentation

- -
-
- - - - - - - -
reply_on_ticket ()
-
-
- -

This function is beign used to reply on a ticket.

-

It will first check if the user who executed this function is a mod/admin or the topic creator himself. If this is not the case the page will be redirected to an error page. in case the isset($_POST['hidden'] is set and the user is a mod, the message will be hidden for the topic starter. The reply will be created. If $_POST['ChangeStatus']) & $_POST['ChangePriority'] is set it will try to update the status and priority. Afterwards the page is being redirecte to the ticket again.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/search/all_24.html b/code/web/docs/ams/html/search/all_24.html deleted file mode 100644 index 476d13496..000000000 --- a/code/web/docs/ams/html/search/all_24.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_24.js b/code/web/docs/ams/html/search/all_24.js deleted file mode 100644 index 8e8a493e9..000000000 --- a/code/web/docs/ams/html/search/all_24.js +++ /dev/null @@ -1,91 +0,0 @@ -var searchData= -[ - ['_24allow_5funknown',['$ALLOW_UNKNOWN',['../drupal__module_2ryzommanage_2config_8php.html#a384355265e4331097d55252f901eddff',1,'$ALLOW_UNKNOWN(): config.php'],['../www_2config_8php.html#a384355265e4331097d55252f901eddff',1,'$ALLOW_UNKNOWN(): config.php']]], - ['_24amountofrows',['$amountOfRows',['../classPagination.html#a6b5c716eec440d8dc5b9754c53c545ec',1,'Pagination']]], - ['_24ams_5fcachedir',['$AMS_CACHEDIR',['../drupal__module_2ryzommanage_2config_8php.html#a92879a931e7a7d0ae6919e70a1529747',1,'$AMS_CACHEDIR(): config.php'],['../www_2config_8php.html#a92879a931e7a7d0ae6919e70a1529747',1,'$AMS_CACHEDIR(): config.php']]], - ['_24ams_5flib',['$AMS_LIB',['../drupal__module_2ryzommanage_2config_8php.html#a75086b9c8602bf3417773bae7ef0cdc8',1,'$AMS_LIB(): config.php'],['../www_2config_8php.html#a75086b9c8602bf3417773bae7ef0cdc8',1,'$AMS_LIB(): config.php']]], - ['_24ams_5ftrans',['$AMS_TRANS',['../drupal__module_2ryzommanage_2config_8php.html#acc96a0076127356b4f9f00f4bdfa9b65',1,'$AMS_TRANS(): config.php'],['../www_2config_8php.html#acc96a0076127356b4f9f00f4bdfa9b65',1,'$AMS_TRANS(): config.php']]], - ['_24author',['$author',['../classTicket.html#ac35b828f7d4064a7c9f849c255468ee3',1,'Ticket\$author()'],['../classTicket__Log.html#ac35b828f7d4064a7c9f849c255468ee3',1,'Ticket_Log\$author()'],['../classTicket__Reply.html#ac35b828f7d4064a7c9f849c255468ee3',1,'Ticket_Reply\$author()']]], - ['_24base_5fwebpath',['$BASE_WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#a2e954ee09fb5f52b9d05caf9dfc3d5ad',1,'$BASE_WEBPATH(): config.php'],['../www_2config_8php.html#a2e954ee09fb5f52b9d05caf9dfc3d5ad',1,'$BASE_WEBPATH(): config.php']]], - ['_24cfg',['$cfg',['../drupal__module_2ryzommanage_2config_8php.html#a32f90fc68bcb40de0bae38354fd0a5fe',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a6b776651fa7defe140c03ed3bd86aa96',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a68f172c430a17022c9f74ae1acd24a00',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1805c74760836f682459a12a17d50589',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a94213b6df61b8a6b62abbe7c956493a4',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a4b555022064138fee1d7edea873c5e9e',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1b49c1f0de42e603443bea2c93276c13',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7c5f3fd8aea7ae8363c6cdc9addd9b62',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7b5bbf5b3c541b46d06deaffeeb76424',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1dca44c652dd54f6879957cf8d4a039c',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a56e7e53dac48b99f62d41d387c8624e6',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#adc2648938b5135f1f2aab1d92d33418e',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1324eeda6b288c0a26d7071db555090c',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a63d97fffb2ff86525bb6cacb74113a73',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7147f422b8150cd3f3c8a68325208607',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a53f42728714b4e86b885c12f7846cd06',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#aa68c438d0b6b38d756d8724bac554f1b',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#ae4ae1095a3543d5607464a88e6330a07',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7cf20f61de759c233272150b12e866d8',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#aed7bed5da2b934c742cb60d23c06f752',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1606e0620d5a628b865e0df5c217ce7e',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a41e3a386ec52e0f05bdcad04acecf619',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#ac2c263a1e16ebd69dbf247e8d82c9f63',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a9996bf49f150442cf9d564725d0dea24',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#aa7eb09eb019c344553a61b54606cb650',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a79b711e7ee81b7435a8dba7cb132b34a',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a8578ffa00c2dbcf5d34a97bcff79058b',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a50d80d35dbd37739f844a93a36fce557',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a55031a1c3c2b9d87e37558811b311ff8',1,'$cfg(): config.php'],['../www_2config_8php.html#a32f90fc68bcb40de0bae38354fd0a5fe',1,'$cfg(): config.php'],['../www_2config_8php.html#a6b776651fa7defe140c03ed3bd86aa96',1,'$cfg(): config.php'],['../www_2config_8php.html#a68f172c430a17022c9f74ae1acd24a00',1,'$cfg(): config.php'],['../www_2config_8php.html#a1805c74760836f682459a12a17d50589',1,'$cfg(): config.php'],['../www_2config_8php.html#a94213b6df61b8a6b62abbe7c956493a4',1,'$cfg(): config.php'],['../www_2config_8php.html#a4b555022064138fee1d7edea873c5e9e',1,'$cfg(): config.php'],['../www_2config_8php.html#a1b49c1f0de42e603443bea2c93276c13',1,'$cfg(): config.php'],['../www_2config_8php.html#a7c5f3fd8aea7ae8363c6cdc9addd9b62',1,'$cfg(): config.php'],['../www_2config_8php.html#a7b5bbf5b3c541b46d06deaffeeb76424',1,'$cfg(): config.php'],['../www_2config_8php.html#a1dca44c652dd54f6879957cf8d4a039c',1,'$cfg(): config.php'],['../www_2config_8php.html#a56e7e53dac48b99f62d41d387c8624e6',1,'$cfg(): config.php'],['../www_2config_8php.html#adc2648938b5135f1f2aab1d92d33418e',1,'$cfg(): config.php'],['../www_2config_8php.html#a1324eeda6b288c0a26d7071db555090c',1,'$cfg(): config.php'],['../www_2config_8php.html#a63d97fffb2ff86525bb6cacb74113a73',1,'$cfg(): config.php'],['../www_2config_8php.html#a7147f422b8150cd3f3c8a68325208607',1,'$cfg(): config.php'],['../www_2config_8php.html#a53f42728714b4e86b885c12f7846cd06',1,'$cfg(): config.php'],['../www_2config_8php.html#aa68c438d0b6b38d756d8724bac554f1b',1,'$cfg(): config.php'],['../www_2config_8php.html#ae4ae1095a3543d5607464a88e6330a07',1,'$cfg(): config.php'],['../www_2config_8php.html#a7cf20f61de759c233272150b12e866d8',1,'$cfg(): config.php'],['../www_2config_8php.html#aed7bed5da2b934c742cb60d23c06f752',1,'$cfg(): config.php'],['../www_2config_8php.html#a1606e0620d5a628b865e0df5c217ce7e',1,'$cfg(): config.php'],['../www_2config_8php.html#a41e3a386ec52e0f05bdcad04acecf619',1,'$cfg(): config.php'],['../www_2config_8php.html#ac2c263a1e16ebd69dbf247e8d82c9f63',1,'$cfg(): config.php'],['../www_2config_8php.html#a9996bf49f150442cf9d564725d0dea24',1,'$cfg(): config.php'],['../www_2config_8php.html#aa7eb09eb019c344553a61b54606cb650',1,'$cfg(): config.php'],['../www_2config_8php.html#a79b711e7ee81b7435a8dba7cb132b34a',1,'$cfg(): config.php'],['../www_2config_8php.html#a8578ffa00c2dbcf5d34a97bcff79058b',1,'$cfg(): config.php'],['../www_2config_8php.html#a50d80d35dbd37739f844a93a36fce557',1,'$cfg(): config.php'],['../www_2config_8php.html#a55031a1c3c2b9d87e37558811b311ff8',1,'$cfg(): config.php'],['../install_8php.html#a449cc4bf6cfd310810993b3ef5251aa5',1,'$cfg(): install.php']]], - ['_24client_5fversion',['$client_version',['../classTicket__Info.html#ac43fbb88dcd0696ad49d5f805f369a61',1,'Ticket_Info']]], - ['_24config',['$config',['../classMyCrypt.html#a49c7011be9c979d9174c52a8b83e5d8e',1,'MyCrypt']]], - ['_24config_5fpath',['$CONFIG_PATH',['../drupal__module_2ryzommanage_2config_8php.html#ae15921e2ebd5885ecf37d31a2cf6ab7a',1,'$CONFIG_PATH(): config.php'],['../www_2config_8php.html#ae15921e2ebd5885ecf37d31a2cf6ab7a',1,'$CONFIG_PATH(): config.php']]], - ['_24connect_5fstate',['$connect_state',['../classTicket__Info.html#a33f4c9badf7f0c5c6728bba0ffacd66e',1,'Ticket_Info']]], - ['_24content',['$content',['../classTicket__Content.html#a57b284fe00866494b33afa80ba729bed',1,'Ticket_Content\$content()'],['../classTicket__Reply.html#a57b284fe00866494b33afa80ba729bed',1,'Ticket_Reply\$content()']]], - ['_24country',['$country',['../classWebUsers.html#a1437a5f6eb157f0eb267a26e0ad4f1ba',1,'WebUsers']]], - ['_24cpu_5fid',['$cpu_id',['../classTicket__Info.html#abea88d0d04f0d548115a0e85eef42e42',1,'Ticket_Info']]], - ['_24cpu_5fmask',['$cpu_mask',['../classTicket__Info.html#a9b0c63551b567630d1aa82f33c328ab0',1,'Ticket_Info']]], - ['_24create_5fring',['$CREATE_RING',['../drupal__module_2ryzommanage_2config_8php.html#a16031d9d4e5065229bc3b00dfd4202fa',1,'$CREATE_RING(): config.php'],['../www_2config_8php.html#a16031d9d4e5065229bc3b00dfd4202fa',1,'$CREATE_RING(): config.php']]], - ['_24current',['$current',['../classPagination.html#a2c4c58e377f6c66ca38c8ea97666fc5e',1,'Pagination']]], - ['_24db',['$db',['../classMail__Handler.html#a1fa3127fc82f96b1436d871ef02be319',1,'Mail_Handler\$db()'],['../classQuerycache.html#a1fa3127fc82f96b1436d871ef02be319',1,'Querycache\$db()']]], - ['_24default_5flanguage',['$DEFAULT_LANGUAGE',['../drupal__module_2ryzommanage_2config_8php.html#a7b56c2ed5a82ceb21fc73cef77beb150',1,'$DEFAULT_LANGUAGE(): config.php'],['../www_2config_8php.html#a7b56c2ed5a82ceb21fc73cef77beb150',1,'$DEFAULT_LANGUAGE(): config.php']]], - ['_24element_5farray',['$element_array',['../classPagination.html#a8fa0f6a15481ba69e7be913eaa15594c',1,'Pagination']]], - ['_24email',['$email',['../classWebUsers.html#ad634f418b20382e2802f80532d76d3cd',1,'WebUsers']]], - ['_24externid',['$externId',['../classTicket__User.html#af51400fe5820e964cb38fcc60b3afd84',1,'Ticket_User']]], - ['_24firstname',['$firstname',['../classWebUsers.html#a55793c72c535d153ffd3f0e43377898b',1,'WebUsers']]], - ['_24force_5fingame',['$FORCE_INGAME',['../drupal__module_2ryzommanage_2config_8php.html#aabd939b29ed900f5fc489f1a957fc6ce',1,'$FORCE_INGAME(): config.php'],['../www_2config_8php.html#aabd939b29ed900f5fc489f1a957fc6ce',1,'$FORCE_INGAME(): config.php']]], - ['_24gender',['$gender',['../classWebUsers.html#a0f1d7cfb9dc6f494b9014885205fc47e',1,'WebUsers']]], - ['_24group',['$group',['../classForwarded.html#ad530a85733b0ec1dc321859fd8faa0dc',1,'Forwarded\$group()'],['../classIn__Support__Group.html#ad530a85733b0ec1dc321859fd8faa0dc',1,'In_Support_Group\$group()']]], - ['_24groupemail',['$groupEmail',['../classSupport__Group.html#ab7ad611af238b28f1f65a32cb152acd1',1,'Support_Group']]], - ['_24hidden',['$hidden',['../classTicket__Reply.html#a4a374564d2858d8ae869a8fb890aad56',1,'Ticket_Reply']]], - ['_24ht',['$ht',['../classTicket__Info.html#a969583a6605ed731abf5849a5202db1e',1,'Ticket_Info']]], - ['_24imageloc_5fwebpath',['$IMAGELOC_WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#a16820074dcd11e4881ca6461377db000',1,'$IMAGELOC_WEBPATH(): config.php'],['../www_2config_8php.html#a16820074dcd11e4881ca6461377db000',1,'$IMAGELOC_WEBPATH(): config.php']]], - ['_24imap_5fmailserver',['$iMAP_MailServer',['../classSupport__Group.html#ad9f2ef2089fe446a9ac49a19a450d636',1,'Support_Group']]], - ['_24imap_5fpassword',['$iMAP_Password',['../classSupport__Group.html#a4166a2fc4b594ee425d7f40870e16455',1,'Support_Group']]], - ['_24imap_5fusername',['$iMAP_Username',['../classSupport__Group.html#a2b549eb4d5773efd741a2990817af0ea',1,'Support_Group']]], - ['_24ingame_5flayout',['$INGAME_LAYOUT',['../drupal__module_2ryzommanage_2config_8php.html#a0deedf69fea8c97030373e15a68c4cc5',1,'$INGAME_LAYOUT(): config.php'],['../www_2config_8php.html#a0deedf69fea8c97030373e15a68c4cc5',1,'$INGAME_LAYOUT(): config.php']]], - ['_24ingame_5fwebpath',['$INGAME_WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#ae9f6aa9c61501bca7b8851925c636d87',1,'$INGAME_WEBPATH(): config.php'],['../www_2config_8php.html#ae9f6aa9c61501bca7b8851925c636d87',1,'$INGAME_WEBPATH(): config.php']]], - ['_24language',['$language',['../classWebUsers.html#a83170d318260a5a2e2a79dccdd371b10',1,'WebUsers']]], - ['_24last',['$last',['../classPagination.html#acf48db609a946d13953d8060363fd1d3',1,'Pagination']]], - ['_24lastname',['$lastname',['../classWebUsers.html#a1d2ddb6354180329b59e8b90ed94dc7f',1,'WebUsers']]], - ['_24local_5faddress',['$local_address',['../classTicket__Info.html#a467dca5673d4c9f737dac972ab05720c',1,'Ticket_Info']]], - ['_24login',['$login',['../classWebUsers.html#afc31993e855f9631572adfedcfe6f34b',1,'WebUsers']]], - ['_24mail_5fdir',['$MAIL_DIR',['../drupal__module_2ryzommanage_2config_8php.html#a9f8fc644554910de5434f78a5f23044e',1,'$MAIL_DIR(): config.php'],['../www_2config_8php.html#a9f8fc644554910de5434f78a5f23044e',1,'$MAIL_DIR(): config.php']]], - ['_24mail_5fhandler',['$mail_handler',['../mail__cron_8php.html#a160a75d95407d877e9c2542e3ddd8c43',1,'mail_cron.php']]], - ['_24mail_5flog_5fpath',['$MAIL_LOG_PATH',['../drupal__module_2ryzommanage_2config_8php.html#afe6e9ed40480c14cb7a119fb84cb557a',1,'$MAIL_LOG_PATH(): config.php'],['../www_2config_8php.html#afe6e9ed40480c14cb7a119fb84cb557a',1,'$MAIL_LOG_PATH(): config.php']]], - ['_24memory',['$memory',['../classTicket__Info.html#a5e20a9a3e12271b3b8d685805590c9e0',1,'Ticket_Info']]], - ['_24name',['$name',['../classSupport__Group.html#ab2fc40d43824ea3e1ce5d86dee0d763b',1,'Support_Group\$name()'],['../classTicket__Category.html#ab2fc40d43824ea3e1ce5d86dee0d763b',1,'Ticket_Category\$name()']]], - ['_24nel3d',['$nel3d',['../classTicket__Info.html#a9b616e5fbafadc93aa4bdf3ccbf31498',1,'Ticket_Info']]], - ['_24os',['$os',['../classTicket__Info.html#a292791d5d8e3ded85cb2e8ec80dea0d9',1,'Ticket_Info']]], - ['_24pagination',['$pagination',['../classTicket__Queue__Handler.html#a388a4a950e936f746d3b9c1b56450ce7',1,'Ticket_Queue_Handler']]], - ['_24params',['$params',['../classTicket__Queue.html#afe68e6fbe7acfbffc0af0c84a1996466',1,'Ticket_Queue']]], - ['_24patch_5fversion',['$patch_version',['../classTicket__Info.html#a55fc0854f90ed36ab9774ba7bd2af53f',1,'Ticket_Info']]], - ['_24pdo',['$PDO',['../classDBLayer.html#acdb2149c05a21fe144fb05ec524a51f3',1,'DBLayer']]], - ['_24permission',['$permission',['../classTicket__User.html#aad04b6f3304fe6a13d5be37f7cd28938',1,'Ticket_User']]], - ['_24priority',['$priority',['../classTicket.html#a2677e505e860db863720ac4e216fd3f2',1,'Ticket']]], - ['_24processor',['$processor',['../classTicket__Info.html#a11fe8ad69d64b596f8b712b0b7e7e1e3',1,'Ticket_Info']]], - ['_24query',['$query',['../classQuerycache.html#af59a5f7cd609e592c41dc3643efd3c98',1,'Querycache\$query()'],['../classTicket__Log.html#af59a5f7cd609e592c41dc3643efd3c98',1,'Ticket_Log\$query()'],['../classTicket__Queue.html#af59a5f7cd609e592c41dc3643efd3c98',1,'Ticket_Queue\$query()']]], - ['_24queue',['$queue',['../classTicket.html#a4a0b48f6ae2fcb248a4f0288c7c344a6',1,'Ticket\$queue()'],['../classTicket__Queue__Handler.html#a4a0b48f6ae2fcb248a4f0288c7c344a6',1,'Ticket_Queue_Handler\$queue()']]], - ['_24receivemail',['$receiveMail',['../classWebUsers.html#a3c74ba660e348124f36d978b137f691d',1,'WebUsers']]], - ['_24server_5ftick',['$server_tick',['../classTicket__Info.html#aeac33ccad750e9ee81a22414db1224ab',1,'Ticket_Info']]], - ['_24sgroupid',['$sGroupId',['../classSupport__Group.html#a23265908fce0f131e03ba1ede7f42647',1,'Support_Group']]], - ['_24shardid',['$shardid',['../classTicket__Info.html#ac73283a0a8308fb7594543e4a049942c',1,'Ticket_Info']]], - ['_24sid',['$SID',['../classQuerycache.html#a69c31f890638fa4930097cf55ae27995',1,'Querycache']]], - ['_24sitebase',['$SITEBASE',['../drupal__module_2ryzommanage_2config_8php.html#a9eb41824afc2b8150c27648859f07357',1,'$SITEBASE(): config.php'],['../www_2config_8php.html#a9eb41824afc2b8150c27648859f07357',1,'$SITEBASE(): config.php']]], - ['_24status',['$status',['../classTicket.html#a58391ea75f2d29d5d708d7050b641c33',1,'Ticket']]], - ['_24support_5fgroup_5fimap_5fcryptkey',['$SUPPORT_GROUP_IMAP_CRYPTKEY',['../drupal__module_2ryzommanage_2config_8php.html#a3ed2ac4433023af3e95f8912f00125ea',1,'$SUPPORT_GROUP_IMAP_CRYPTKEY(): config.php'],['../www_2config_8php.html#a3ed2ac4433023af3e95f8912f00125ea',1,'$SUPPORT_GROUP_IMAP_CRYPTKEY(): config.php']]], - ['_24tag',['$tag',['../classSupport__Group.html#a81d5015d41ed8ec66e9db8cdc5db9555',1,'Support_Group']]], - ['_24tcategoryid',['$tCategoryId',['../classTicket__Category.html#a0111df4559c9f524272d94df0b7f9d6b',1,'Ticket_Category']]], - ['_24tcontentid',['$tContentId',['../classTicket__Content.html#a2249787a24edd706ae7a54609a601d6f',1,'Ticket_Content']]], - ['_24ticket',['$ticket',['../classAssigned.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Assigned\$ticket()'],['../classForwarded.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Forwarded\$ticket()'],['../classTicket__Info.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Ticket_Info\$ticket()'],['../classTicket__Log.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Ticket_Log\$ticket()'],['../classTicket__Reply.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Ticket_Reply\$ticket()']]], - ['_24ticket_5fcategory',['$ticket_category',['../classTicket.html#a86e470072892575063c478122fb65184',1,'Ticket']]], - ['_24ticket_5flogging',['$TICKET_LOGGING',['../drupal__module_2ryzommanage_2config_8php.html#aa59491d29009336d89423cccd3adc5de',1,'$TICKET_LOGGING(): config.php'],['../www_2config_8php.html#aa59491d29009336d89423cccd3adc5de',1,'$TICKET_LOGGING(): config.php']]], - ['_24ticket_5fmailing_5fsupport',['$TICKET_MAILING_SUPPORT',['../drupal__module_2ryzommanage_2config_8php.html#a23c3d413e56a57bc04d69627a4ed2b14',1,'$TICKET_MAILING_SUPPORT(): config.php'],['../www_2config_8php.html#a23c3d413e56a57bc04d69627a4ed2b14',1,'$TICKET_MAILING_SUPPORT(): config.php']]], - ['_24tid',['$tId',['../classTicket.html#a3eda2fecc2433b6b6b3b957110e937ca',1,'Ticket']]], - ['_24time_5fformat',['$TIME_FORMAT',['../drupal__module_2ryzommanage_2config_8php.html#a613b2c043c06772e7119587b26eb9989',1,'$TIME_FORMAT(): config.php'],['../www_2config_8php.html#a613b2c043c06772e7119587b26eb9989',1,'$TIME_FORMAT(): config.php']]], - ['_24timestamp',['$timestamp',['../classTicket.html#a2b69de9676dd97c675cd4d9bcceb684c',1,'Ticket\$timestamp()'],['../classTicket__Log.html#a2b69de9676dd97c675cd4d9bcceb684c',1,'Ticket_Log\$timestamp()'],['../classTicket__Reply.html#a2b69de9676dd97c675cd4d9bcceb684c',1,'Ticket_Reply\$timestamp()']]], - ['_24tinfoid',['$tInfoId',['../classTicket__Info.html#a4c2ae13b7827d13b9629e3fc57335f8f',1,'Ticket_Info']]], - ['_24title',['$title',['../classTicket.html#ada57e7bb7c152edad18fe2f166188691',1,'Ticket']]], - ['_24tlogid',['$tLogId',['../classTicket__Log.html#a734657bd8aac85b5a33e03646c17eb65',1,'Ticket_Log']]], - ['_24tos_5furl',['$TOS_URL',['../drupal__module_2ryzommanage_2config_8php.html#aef688ce4c627fa2fbd8037fd2cceef78',1,'$TOS_URL(): config.php'],['../www_2config_8php.html#aef688ce4c627fa2fbd8037fd2cceef78',1,'$TOS_URL(): config.php']]], - ['_24treplyid',['$tReplyId',['../classTicket__Reply.html#a29f22c2783e510d4764a99a648a0cc36',1,'Ticket_Reply']]], - ['_24tuserid',['$tUserId',['../classTicket__User.html#a2f1828693b198682ae3e926e63a4c110',1,'Ticket_User']]], - ['_24type',['$type',['../classQuerycache.html#a9a4a6fba2208984cabb3afacadf33919',1,'Querycache']]], - ['_24uid',['$uId',['../classWebUsers.html#a8f11c60ae8f70a5059b97bc0ea9d0de5',1,'WebUsers']]], - ['_24user',['$user',['../classAssigned.html#a598ca4e71b15a1313ec95f0df1027ca5',1,'Assigned\$user()'],['../classIn__Support__Group.html#a598ca4e71b15a1313ec95f0df1027ca5',1,'In_Support_Group\$user()']]], - ['_24user_5fid',['$user_id',['../classTicket__Info.html#af0fcd925f00973e32f7214859dfb3c6b',1,'Ticket_Info']]], - ['_24user_5fposition',['$user_position',['../classTicket__Info.html#afc9fcd144a71e56898632daf43854aa7',1,'Ticket_Info']]], - ['_24view_5fposition',['$view_position',['../classTicket__Info.html#ae325cbe2a7e27757b90b12d595c4dfe9',1,'Ticket_Info']]], - ['_24webpath',['$WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#a562d30b98806af1e001a3ff855e8890a',1,'$WEBPATH(): config.php'],['../www_2config_8php.html#a562d30b98806af1e001a3ff855e8890a',1,'$WEBPATH(): config.php']]] -]; diff --git a/code/web/docs/ams/html/search/all_5f.html b/code/web/docs/ams/html/search/all_5f.html deleted file mode 100644 index 1f27755ab..000000000 --- a/code/web/docs/ams/html/search/all_5f.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_5f.js b/code/web/docs/ams/html/search/all_5f.js deleted file mode 100644 index 844048eb7..000000000 --- a/code/web/docs/ams/html/search/all_5f.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['_5f_5fautoload',['__autoload',['../libinclude_8php.html#a2ecfde85f554ea0b3fef0993aef304a9',1,'libinclude.php']]], - ['_5f_5fconstruct',['__construct',['../classAssigned.html#a095c5d389db211932136b53f25f39685',1,'Assigned\__construct()'],['../classDBLayer.html#a800f8efee13692788b13ee57c5960092',1,'DBLayer\__construct()'],['../classForwarded.html#a095c5d389db211932136b53f25f39685',1,'Forwarded\__construct()'],['../classIn__Support__Group.html#a095c5d389db211932136b53f25f39685',1,'In_Support_Group\__construct()'],['../classMyCrypt.html#af200cbfd49bfea2fecf5629ab2361033',1,'MyCrypt\__construct()'],['../classPagination.html#a2a1aecb8f526796b3d62e8278edc07c3',1,'Pagination\__construct()'],['../classQuerycache.html#a095c5d389db211932136b53f25f39685',1,'Querycache\__construct()'],['../classSupport__Group.html#a095c5d389db211932136b53f25f39685',1,'Support_Group\__construct()'],['../classTicket.html#a095c5d389db211932136b53f25f39685',1,'Ticket\__construct()'],['../classTicket__Category.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Category\__construct()'],['../classTicket__Content.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Content\__construct()'],['../classTicket__Info.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Info\__construct()'],['../classTicket__Log.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Log\__construct()'],['../classTicket__Queue__Handler.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Queue_Handler\__construct()'],['../classTicket__Reply.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Reply\__construct()'],['../classTicket__User.html#a095c5d389db211932136b53f25f39685',1,'Ticket_User\__construct()'],['../classWebUsers.html#a4e63742e531873e01e1e97dd7530539b',1,'WebUsers\__construct($UId=0)'],['../classWebUsers.html#a4e63742e531873e01e1e97dd7530539b',1,'WebUsers\__construct($UId=0)']]] -]; diff --git a/code/web/docs/ams/html/search/all_61.html b/code/web/docs/ams/html/search/all_61.html deleted file mode 100644 index a3164d553..000000000 --- a/code/web/docs/ams/html/search/all_61.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_61.js b/code/web/docs/ams/html/search/all_61.js deleted file mode 100644 index a077db22c..000000000 --- a/code/web/docs/ams/html/search/all_61.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['add_5fsgroup',['add_sgroup',['../add__sgroup_8php.html#a45490c056bdd114ef28893fc29286d2b',1,'add_sgroup.php']]], - ['add_5fsgroup_2ephp',['add_sgroup.php',['../add__sgroup_8php.html',1,'']]], - ['add_5fuser',['add_user',['../add__user_8php.html#a69e8de25de7560db0292bb474882a489',1,'add_user.php']]], - ['add_5fuser_2ephp',['add_user.php',['../add__user_8php.html',1,'']]], - ['add_5fuser_5fto_5fsgroup',['add_user_to_sgroup',['../add__user__to__sgroup_8php.html#a6ad0c5a1bfd563e11a107bf0023b6150',1,'add_user_to_sgroup.php']]], - ['add_5fuser_5fto_5fsgroup_2ephp',['add_user_to_sgroup.php',['../add__user__to__sgroup_8php.html',1,'']]], - ['addusertosupportgroup',['addUserToSupportGroup',['../classSupport__Group.html#a4616317379ffef08dbaeea2a9dbba02c',1,'Support_Group']]], - ['assigned',['Assigned',['../classAssigned.html',1,'']]], - ['assigned_2ephp',['assigned.php',['../assigned_8php.html',1,'']]], - ['assignticket',['assignTicket',['../classAssigned.html#a51c3d5b6f78de455619581fd3e591f17',1,'Assigned\assignTicket()'],['../classTicket.html#a51c3d5b6f78de455619581fd3e591f17',1,'Ticket\assignTicket()']]] -]; diff --git a/code/web/docs/ams/html/search/all_63.html b/code/web/docs/ams/html/search/all_63.html deleted file mode 100644 index 56b5ad1e9..000000000 --- a/code/web/docs/ams/html/search/all_63.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_63.js b/code/web/docs/ams/html/search/all_63.js deleted file mode 100644 index c54f2f697..000000000 --- a/code/web/docs/ams/html/search/all_63.js +++ /dev/null @@ -1,51 +0,0 @@ -var searchData= -[ - ['change_5finfo',['change_info',['../change__info_8php.html#a1bbc74a7da07012d55b0b45726534265',1,'change_info.php']]], - ['change_5finfo_2ephp',['change_info.php',['../change__info_8php.html',1,'']]], - ['change_5fmail',['change_mail',['../change__mail_8php.html#a03d0bca67a96c8744bd74623e128ab83',1,'change_mail.php']]], - ['change_5fmail_2ephp',['change_mail.php',['../change__mail_8php.html',1,'']]], - ['change_5fpassword',['change_password',['../change__password_8php.html#a888360ab43db15eba1d5cc3623d4100f',1,'change_password.php']]], - ['change_5fpassword_2ephp',['change_password.php',['../change__password_8php.html',1,'']]], - ['change_5fpermission',['change_permission',['../classTicket__User.html#a78d4d6de74b1ee26cb9192f36e022416',1,'Ticket_User\change_permission()'],['../change__permission_8php.html#a9ad639fafd67bdc579cf3170cd0d26e7',1,'change_permission(): change_permission.php']]], - ['change_5fpermission_2ephp',['change_permission.php',['../change__permission_8php.html',1,'']]], - ['change_5freceivemail',['change_receivemail',['../change__receivemail_8php.html#a22ae748f60d7b4200dce30c94a52c421',1,'change_receivemail.php']]], - ['change_5freceivemail_2ephp',['change_receivemail.php',['../change__receivemail_8php.html',1,'']]], - ['check_5fchange_5fpassword',['check_change_password',['../classUsers.html#a9c78408d50465957eeb8068810315a8e',1,'Users']]], - ['check_5fif_5fgame_5fclient',['check_if_game_client',['../classHelpers.html#a4e3e5309a66456d81a1effdabcc9cd79',1,'Helpers']]], - ['check_5flogin_5fingame',['check_login_ingame',['../classHelpers.html#abd01528a1145831a4fc98eae7ffaca36',1,'Helpers']]], - ['check_5fmethods',['check_methods',['../classMyCrypt.html#ad72fefc790b0bb1ac6edc252427b0970',1,'MyCrypt']]], - ['check_5fregister',['check_Register',['../classUsers.html#a740de04dc3aa7cf3bed959540ffab8f8',1,'Users']]], - ['checkemail',['checkEmail',['../classUsers.html#a76646237ab053cdde386c06aa5437d8a',1,'Users']]], - ['checkemailexists',['checkEmailExists',['../classUsers.html#a37275e677004927b6b1a30e16c5b5b38',1,'Users\checkEmailExists()'],['../classWebUsers.html#a37275e677004927b6b1a30e16c5b5b38',1,'WebUsers\checkEmailExists($email)'],['../classWebUsers.html#a37275e677004927b6b1a30e16c5b5b38',1,'WebUsers\checkEmailExists($email)']]], - ['checkloginmatch',['checkLoginMatch',['../classUsers.html#af0b98012abb190cf4617999f008de27e',1,'Users\checkLoginMatch()'],['../classWebUsers.html#a11894eb69bb2f172baf5186e8f92246d',1,'WebUsers\checkLoginMatch($username, $password)'],['../classWebUsers.html#a11894eb69bb2f172baf5186e8f92246d',1,'WebUsers\checkLoginMatch($username, $password)']]], - ['checkpassword',['checkPassword',['../classUsers.html#a4cb5e34b56fb6de0ec318fb59e90838f',1,'Users']]], - ['checkuser',['checkUser',['../classUsers.html#adfffce17947a9f72d68838db250c9ab8',1,'Users']]], - ['checkusernameexists',['checkUserNameExists',['../classUsers.html#ac3a8cb9a038f6aef0bd98be091274122',1,'Users\checkUserNameExists()'],['../classWebUsers.html#ac3a8cb9a038f6aef0bd98be091274122',1,'WebUsers\checkUserNameExists($username)'],['../classWebUsers.html#ac3a8cb9a038f6aef0bd98be091274122',1,'WebUsers\checkUserNameExists($username)']]], - ['config_2ephp',['config.php',['../www_2config_8php.html',1,'']]], - ['config_2ephp',['config.php',['../drupal__module_2ryzommanage_2config_8php.html',1,'']]], - ['confirmpassword',['confirmPassword',['../classUsers.html#a2f5349025bed3874f08d80652cab2fe0',1,'Users']]], - ['constr_5fexternid',['constr_ExternId',['../classTicket__User.html#a4e5c577ed0a9da4b1c56397912f02ba0',1,'Ticket_User']]], - ['constr_5fsgroupid',['constr_SGroupId',['../classSupport__Group.html#a873beb80bd0b5d572704cdb6d2ec34eb',1,'Support_Group']]], - ['constr_5ftcategoryid',['constr_TCategoryId',['../classTicket__Category.html#a332d2dd59b46fc933a3c9a1b2967803a',1,'Ticket_Category']]], - ['constr_5ftcontentid',['constr_TContentId',['../classTicket__Content.html#aa28ad9a063c1914ff75d19afd25c707f',1,'Ticket_Content']]], - ['constr_5ftlogid',['constr_TLogId',['../classTicket__Log.html#a001ec13f64bb026b1c8a3b3bd02ee22b',1,'Ticket_Log']]], - ['constr_5ftreplyid',['constr_TReplyId',['../classTicket__Reply.html#a4b4493d28e8518a87667d285c49e5e24',1,'Ticket_Reply']]], - ['constr_5ftuserid',['constr_TUserId',['../classTicket__User.html#a10939bce9b667f26d3827993b4e3df1d',1,'Ticket_User']]], - ['create',['create',['../classAssigned.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Assigned\create()'],['../classForwarded.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Forwarded\create()'],['../classIn__Support__Group.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'In_Support_Group\create()'],['../classSupport__Group.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Support_Group\create()'],['../classTicket.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket\create()'],['../classTicket__Content.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket_Content\create()'],['../classTicket__Info.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket_Info\create()'],['../classTicket__Reply.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket_Reply\create()']]], - ['create_5ffolders',['create_folders',['../classHelpers.html#add8ef9ce82106c505f6f04c2a8e3b2b4',1,'Helpers']]], - ['create_5fticket',['create_Ticket',['../classTicket.html#a81b3285033bc3c9e89adfa8da34d61de',1,'Ticket\create_Ticket()'],['../create__ticket_8php.html#a65bcbfccf737c72927d15c06783cd9f4',1,'create_ticket(): create_ticket.php']]], - ['create_5fticket_2ephp',['create_ticket.php',['../create__ticket_8php.html',1,'']]], - ['create_5fticket_5finfo',['create_Ticket_Info',['../classTicket__Info.html#aaa4e26c92338b70e874135af9c02bba9',1,'Ticket_Info']]], - ['createlogentry',['createLogEntry',['../classTicket__Log.html#a345a2da9c23780c7e6aef7134baa1749',1,'Ticket_Log']]], - ['createpermissions',['createPermissions',['../classUsers.html#aeac9f32fd53c97c92e5c774e154399df',1,'Users']]], - ['createqueue',['createQueue',['../classTicket__Queue.html#af077496b6071af47c19a873bf025c1f3',1,'Ticket_Queue\createQueue()'],['../classTicket__Queue__Handler.html#af077496b6071af47c19a873bf025c1f3',1,'Ticket_Queue_Handler\createQueue()']]], - ['createreply',['createReply',['../classTicket.html#af6568341f5052034440f79c0e74707a3',1,'Ticket\createReply()'],['../classTicket__Reply.html#aa6fa056fff4ddafc3eabf3ed72143e1b',1,'Ticket_Reply\createReply()']]], - ['createsupportgroup',['createSupportGroup',['../classSupport__Group.html#a31ee7c68c0ffb77438bb9ff095962568',1,'Support_Group']]], - ['createticket',['createticket',['../createticket_8php.html#aa8253d883a3ba14c6449a13ed2bb9c8f',1,'createticket.php']]], - ['createticket_2ephp',['createticket.php',['../createticket_8php.html',1,'']]], - ['createticketcategory',['createTicketCategory',['../classTicket__Category.html#a506fc7f32de9547e91a5dbb68c391907',1,'Ticket_Category']]], - ['createticketuser',['createTicketUser',['../classTicket__User.html#a37c416f7d3723874f3ac49c7f9f5a21c',1,'Ticket_User']]], - ['createuser',['createUser',['../classUsers.html#ac93aebf1960fb12975b120a2c394a8af',1,'Users']]], - ['createwebuser',['createWebuser',['../classWebUsers.html#a0cb7168a6b8358106512804ff28cea17',1,'WebUsers\createWebuser($name, $pass, $mail)'],['../classWebUsers.html#a0cb7168a6b8358106512804ff28cea17',1,'WebUsers\createWebuser($name, $pass, $mail)']]], - ['cron',['cron',['../classMail__Handler.html#a1b65890aa4eb8c0c6129c3e787a53405',1,'Mail_Handler']]] -]; diff --git a/code/web/docs/ams/html/search/all_64.html b/code/web/docs/ams/html/search/all_64.html deleted file mode 100644 index b53ff083e..000000000 --- a/code/web/docs/ams/html/search/all_64.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_64.js b/code/web/docs/ams/html/search/all_64.js deleted file mode 100644 index a897983e6..000000000 --- a/code/web/docs/ams/html/search/all_64.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['dashboard',['dashboard',['../dashboard_8php.html#a54d0c80ff20df9df6439bb87608c375a',1,'dashboard.php']]], - ['dashboard_2ephp',['dashboard.php',['../dashboard_8php.html',1,'']]], - ['dblayer',['DBLayer',['../classDBLayer.html',1,'']]], - ['dblayer_2ephp',['dblayer.php',['../dblayer_8php.html',1,'']]], - ['decode_5futf8',['decode_utf8',['../classMail__Handler.html#a6fc5947eaa45b0724f8720b374481275',1,'Mail_Handler']]], - ['decrypt',['decrypt',['../classMyCrypt.html#aed69cdc691e1155856c905ee1c08d9b7',1,'MyCrypt']]], - ['delete',['delete',['../classAssigned.html#a13bdffdd926f26b825ea57066334ff01',1,'Assigned\delete()'],['../classForwarded.html#a13bdffdd926f26b825ea57066334ff01',1,'Forwarded\delete()'],['../classIn__Support__Group.html#a13bdffdd926f26b825ea57066334ff01',1,'In_Support_Group\delete()'],['../classSupport__Group.html#a13bdffdd926f26b825ea57066334ff01',1,'Support_Group\delete()']]], - ['deletesupportgroup',['deleteSupportGroup',['../classSupport__Group.html#ab4a7d3ba86333a058027c7d58b9137f1',1,'Support_Group']]], - ['deleteuserofsupportgroup',['deleteUserOfSupportGroup',['../classSupport__Group.html#ad2d1a010903640e39545085b93b9a4f1',1,'Support_Group']]] -]; diff --git a/code/web/docs/ams/html/search/all_65.html b/code/web/docs/ams/html/search/all_65.html deleted file mode 100644 index 66cc83487..000000000 --- a/code/web/docs/ams/html/search/all_65.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_65.js b/code/web/docs/ams/html/search/all_65.js deleted file mode 100644 index 537250038..000000000 --- a/code/web/docs/ams/html/search/all_65.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['encrypt',['encrypt',['../classMyCrypt.html#a07bcc8ef1d23370470ecb5ae8fc07dfa',1,'MyCrypt']]], - ['error',['error',['../error_8php.html#a43b8d30b879d4f09ceb059b02af2bc02',1,'error.php']]], - ['error_2ephp',['error.php',['../error_8php.html',1,'']]], - ['execute',['execute',['../classDBLayer.html#a9a0e3ecb193fecd94263eda79c54bcc4',1,'DBLayer']]], - ['executereturnid',['executeReturnId',['../classDBLayer.html#a9a8137347ec2d551de3ec54cfb3bdb1a',1,'DBLayer']]], - ['executewithoutparams',['executeWithoutParams',['../classDBLayer.html#a33552c5325c469ac1aa0d049d2312468',1,'DBLayer']]] -]; diff --git a/code/web/docs/ams/html/search/all_66.html b/code/web/docs/ams/html/search/all_66.html deleted file mode 100644 index 3d1f8b35e..000000000 --- a/code/web/docs/ams/html/search/all_66.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_66.js b/code/web/docs/ams/html/search/all_66.js deleted file mode 100644 index 9959a693e..000000000 --- a/code/web/docs/ams/html/search/all_66.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['forwarded',['Forwarded',['../classForwarded.html',1,'']]], - ['forwarded_2ephp',['forwarded.php',['../forwarded_8php.html',1,'']]], - ['forwardticket',['forwardTicket',['../classForwarded.html#aa6f01e425a0f845ce55c2d90aeb11db0',1,'Forwarded\forwardTicket()'],['../classTicket.html#a3fdc6def6a0feaf4c2458811b8c75050',1,'Ticket\forwardTicket()']]] -]; diff --git a/code/web/docs/ams/html/search/all_67.html b/code/web/docs/ams/html/search/all_67.html deleted file mode 100644 index 41a459ae7..000000000 --- a/code/web/docs/ams/html/search/all_67.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_67.js b/code/web/docs/ams/html/search/all_67.js deleted file mode 100644 index d55d29ded..000000000 --- a/code/web/docs/ams/html/search/all_67.js +++ /dev/null @@ -1,108 +0,0 @@ -var searchData= -[ - ['generatesalt',['generateSALT',['../classUsers.html#afb7603ac9556c1069fbf1c0062251203',1,'Users']]], - ['get_5femail_5fby_5fuser_5fid',['get_email_by_user_id',['../classTicket__User.html#a7274bc305ccce731091c68d1607cb6e9',1,'Ticket_User']]], - ['get_5fid_5ffrom_5femail',['get_id_from_email',['../classTicket__User.html#a7feeb7a909bf6733de21300d0ea0e1bd',1,'Ticket_User']]], - ['get_5fid_5ffrom_5fusername',['get_id_from_username',['../classTicket__User.html#a0bcfa281f41b948eb42dd18992724543',1,'Ticket_User']]], - ['get_5fmime_5ftype',['get_mime_type',['../classMail__Handler.html#a719c5051ef00fbb0d7c7ce2c78e3b4e1',1,'Mail_Handler']]], - ['get_5fpart',['get_part',['../classMail__Handler.html#ab3a5e8f69692826c6dae96f873859642',1,'Mail_Handler']]], - ['get_5fticket_5fid_5ffrom_5fsubject',['get_ticket_id_from_subject',['../classMail__Handler.html#a8604569b1e012ea3b1fe466018f75ce2',1,'Mail_Handler']]], - ['get_5fusername_5ffrom_5fid',['get_username_from_id',['../classTicket__User.html#a266ff1e60e08dcd8c7e70f22f5a33e93',1,'Ticket_User']]], - ['getaction',['getAction',['../classTicket__Log.html#a189a4abe5faf11f4320d5d3f1d3d1715',1,'Ticket_Log']]], - ['getactiontextarray',['getActionTextArray',['../classTicket__Log.html#ac760071c0ce36337c16d8146fcb3bade',1,'Ticket_Log']]], - ['getallcategories',['getAllCategories',['../classTicket__Category.html#a1e4b8ecfd737337e35976126b521499f',1,'Ticket_Category']]], - ['getalllogs',['getAllLogs',['../classTicket__Log.html#aeaf1c995cc807afe241f6e7bdc684921',1,'Ticket_Log']]], - ['getallsupportgroups',['getAllSupportGroups',['../classSupport__Group.html#ad3fc18cb894f789d19a768ea63d9b673',1,'Support_Group']]], - ['getallusersofsupportgroup',['getAllUsersOfSupportGroup',['../classSupport__Group.html#a7f1662394a31e2a05e9863def178df12',1,'Support_Group']]], - ['getallusersquery',['getAllUsersQuery',['../classWebUsers.html#a2f8e928ed02e462b40e909965250fb7d',1,'WebUsers\getAllUsersQuery()'],['../classWebUsers.html#a2f8e928ed02e462b40e909965250fb7d',1,'WebUsers\getAllUsersQuery()']]], - ['getamountofrows',['getAmountOfRows',['../classPagination.html#ae43f78382809e3cd2aaa3c455cb0b2b4',1,'Pagination']]], - ['getargument',['getArgument',['../classTicket__Log.html#a88ec9370bcbdb60301f89e401c9e64e1',1,'Ticket_Log']]], - ['getassigned',['getAssigned',['../classTicket.html#a8234a4e23319778d234b3957f8b5d06c',1,'Ticket']]], - ['getauthor',['getAuthor',['../classTicket.html#a5286e30390ae3e1b274940286493dd24',1,'Ticket\getAuthor()'],['../classTicket__Log.html#a5286e30390ae3e1b274940286493dd24',1,'Ticket_Log\getAuthor()'],['../classTicket__Reply.html#a5286e30390ae3e1b274940286493dd24',1,'Ticket_Reply\getAuthor()']]], - ['getcategoryname',['getCategoryName',['../classTicket.html#a689e9d131777e7f1219ee0d65b088cb3',1,'Ticket']]], - ['getclient_5fversion',['getClient_Version',['../classTicket__Info.html#a5a9884f9f9b63d4a6ed8c6112704277d',1,'Ticket_Info']]], - ['getconnect_5fstate',['getConnect_State',['../classTicket__Info.html#a51a5247b7c82f60479ccdcfa33041c27',1,'Ticket_Info']]], - ['getcontent',['getContent',['../classTicket__Content.html#a58e43f09a06ce4e29b192c4e17ce7915',1,'Ticket_Content\getContent()'],['../classTicket__Reply.html#a58e43f09a06ce4e29b192c4e17ce7915',1,'Ticket_Reply\getContent()']]], - ['getcountryarray',['getCountryArray',['../drupal__module_2ryzommanage_2inc_2settings_8php.html#a9342547984d3c9a5ece41572951f8edf',1,'getCountryArray(): settings.php'],['../www_2html_2inc_2settings_8php.html#a9342547984d3c9a5ece41572951f8edf',1,'getCountryArray(): settings.php']]], - ['getcpu_5fmask',['getCPU_Mask',['../classTicket__Info.html#ae85e54574e6e0b17cd33b8c49255d228',1,'Ticket_Info']]], - ['getcpuid',['getCPUId',['../classTicket__Info.html#aba21caccb000efb673b8b66ca70a36c7',1,'Ticket_Info']]], - ['getcurrent',['getCurrent',['../classPagination.html#ad926899d7cac34a3f1a90e552d8eb27d',1,'Pagination']]], - ['getdb',['getDb',['../classQuerycache.html#aceb656ee5135578ab3a9947252caa772',1,'Querycache']]], - ['getelements',['getElements',['../classPagination.html#a97a3a3e912139aa222a7ca13fdb27d33',1,'Pagination']]], - ['getemail',['getEmail',['../classWebUsers.html#a02a01849f28e2535e888ae4ec87b20f2',1,'WebUsers\getEmail()'],['../classWebUsers.html#a02a01849f28e2535e888ae4ec87b20f2',1,'WebUsers\getEmail()']]], - ['getentireticket',['getEntireTicket',['../classTicket.html#a00572e06f01ae1cadb5949f1b45e8f04',1,'Ticket']]], - ['getexternid',['getExternId',['../classTicket__User.html#ace230deb485c9f115f7fea4ce92442a3',1,'Ticket_User']]], - ['getforwardedgroupid',['getForwardedGroupId',['../classTicket.html#aedbfa4efd5aaa96ac713817d12156f7e',1,'Ticket']]], - ['getforwardedgroupname',['getForwardedGroupName',['../classTicket.html#a34e17d1cc053a7b86ce2b58a3a347c7e',1,'Ticket']]], - ['getgroup',['getGroup',['../classForwarded.html#a4f44e7bc9de772c21b4304d11e87bf16',1,'Forwarded\getGroup()'],['../classIn__Support__Group.html#a4f44e7bc9de772c21b4304d11e87bf16',1,'In_Support_Group\getGroup()'],['../classSupport__Group.html#af6697615443145a2981e62aa741c3afa',1,'Support_Group\getGroup()']]], - ['getgroupemail',['getGroupEmail',['../classSupport__Group.html#a9d0f36a53db49c1f57e3cab8a61a7d90',1,'Support_Group']]], - ['getgroups',['getGroups',['../classSupport__Group.html#a562142b89699a1063ea9769030250365',1,'Support_Group']]], - ['gethidden',['getHidden',['../classTicket__Reply.html#a1d032efbce2b4edb7c269a1e13562f40',1,'Ticket_Reply']]], - ['getht',['getHT',['../classTicket__Info.html#a90d3c0edc1e767875c7fb98880886e73',1,'Ticket_Info']]], - ['getid',['getId',['../classWebUsers.html#a585ef354b38d0fad9d92f45e183b639f',1,'WebUsers\getId($username)'],['../classWebUsers.html#a585ef354b38d0fad9d92f45e183b639f',1,'WebUsers\getId($username)']]], - ['getidfromemail',['getIdFromEmail',['../classWebUsers.html#aee8d6b322defc5dfe8e47f382becca62',1,'WebUsers\getIdFromEmail($email)'],['../classWebUsers.html#aee8d6b322defc5dfe8e47f382becca62',1,'WebUsers\getIdFromEmail($email)']]], - ['getimap_5fmailserver',['getIMAP_MailServer',['../classSupport__Group.html#a30d67354e52f95489b93923440ff0661',1,'Support_Group']]], - ['getimap_5fpassword',['getIMAP_Password',['../classSupport__Group.html#a4983db184794db8f05ce93f5ba11ba7e',1,'Support_Group']]], - ['getimap_5fusername',['getIMAP_Username',['../classSupport__Group.html#a0ace9f66f2541d29e060cb7728030e93',1,'Support_Group']]], - ['getinfo',['getInfo',['../classWebUsers.html#a164026f74736817927e1cacd282a2e28',1,'WebUsers\getInfo()'],['../classWebUsers.html#a164026f74736817927e1cacd282a2e28',1,'WebUsers\getInfo()']]], - ['getlanguage',['getLanguage',['../classWebUsers.html#afcef2403c4111bc44ef0530f1e493909',1,'WebUsers\getLanguage()'],['../classWebUsers.html#afcef2403c4111bc44ef0530f1e493909',1,'WebUsers\getLanguage()']]], - ['getlast',['getLast',['../classPagination.html#a9316ede6960667d832997c8e20223623',1,'Pagination']]], - ['getlatestreply',['getLatestReply',['../classTicket.html#a3a4ce7e9c445dd245b3370304d0afd92',1,'Ticket']]], - ['getlinks',['getLinks',['../classPagination.html#aeecf550e63b55ecd5d737ecc46e07d3a',1,'Pagination']]], - ['getlocal_5faddress',['getLocal_Address',['../classTicket__Info.html#a49b4c851eff2f3d06531a39baa8423f5',1,'Ticket_Info']]], - ['getlogsofticket',['getLogsOfTicket',['../classTicket__Log.html#a37ad4d95b0bb2d5a6dfc2dd7c3744292',1,'Ticket_Log']]], - ['getmemory',['getMemory',['../classTicket__Info.html#a144248575cd034a40315155a9b48ff87',1,'Ticket_Info']]], - ['getmodsandadmins',['getModsAndAdmins',['../classTicket__User.html#a71099747902fb7e064ec1d4128ea4576',1,'Ticket_User']]], - ['getname',['getName',['../classSupport__Group.html#a3d0963e68bb313b163a73f2803c64600',1,'Support_Group\getName()'],['../classTicket__Category.html#a3d0963e68bb313b163a73f2803c64600',1,'Ticket_Category\getName()']]], - ['getnel3d',['getNel3D',['../classTicket__Info.html#abe3ae528bfd5495720c3adeff59fe11e',1,'Ticket_Info']]], - ['getnewestticket',['getNewestTicket',['../classTicket__Queue__Handler.html#ab5a79318a0c771083f03400093b3b2ec',1,'Ticket_Queue_Handler']]], - ['getnroftickets',['getNrOfTickets',['../classTicket__Queue__Handler.html#ada8f87ed8466c5e0477fa20359c3c8ad',1,'Ticket_Queue_Handler']]], - ['getnrofticketsassignedwaiting',['getNrOfTicketsAssignedWaiting',['../classTicket__Queue__Handler.html#a0d3daaaf5c79188eb62bb3adda11fa2a',1,'Ticket_Queue_Handler']]], - ['getnrofticketstodo',['getNrOfTicketsToDo',['../classTicket__Queue__Handler.html#ae8d1a2a66991583c05c173147e8dc657',1,'Ticket_Queue_Handler']]], - ['getos',['getOS',['../classTicket__Info.html#a9a1b88474ad97701d67a752d0c4d65c5',1,'Ticket_Info']]], - ['getpagination',['getPagination',['../classTicket__Queue__Handler.html#ab45a102a508e9727b108e8f24486c464',1,'Ticket_Queue_Handler']]], - ['getparams',['getParams',['../classTicket__Queue.html#ae32cd7c32721b02d676bb63b4b1366db',1,'Ticket_Queue']]], - ['getpatch_5fversion',['getPatch_Version',['../classTicket__Info.html#a6e41e115b03a1f152bd2c28c77d5fbac',1,'Ticket_Info']]], - ['getpermission',['getPermission',['../classTicket__User.html#a478067ecf173884c2ee3e5b94e746200',1,'Ticket_User']]], - ['getpriority',['getPriority',['../classTicket.html#a1e7a3c168dcd0901a0d2669c67575b55',1,'Ticket']]], - ['getpriorityarray',['getPriorityArray',['../classTicket.html#a509625cccc0b41f4ab3a658df705b3dc',1,'Ticket']]], - ['getprioritytext',['getPriorityText',['../classTicket.html#ae07f7808a12f2789593722f3293bd105',1,'Ticket']]], - ['getprocessor',['getProcessor',['../classTicket__Info.html#a3ace868ad456ff61f545cb44ee01c562',1,'Ticket_Info']]], - ['getquery',['getQuery',['../classQuerycache.html#a55f162785567258fe5138af282e588c2',1,'Querycache\getQuery()'],['../classTicket__Log.html#a55f162785567258fe5138af282e588c2',1,'Ticket_Log\getQuery()'],['../classTicket__Queue.html#a55f162785567258fe5138af282e588c2',1,'Ticket_Queue\getQuery()']]], - ['getqueue',['getQueue',['../classTicket.html#aa7a8055e5ee1eb792f29443ddb79c4d3',1,'Ticket']]], - ['getreceivemail',['getReceiveMail',['../classWebUsers.html#ae4680f622bd8d571530615fb616d37e7',1,'WebUsers\getReceiveMail()'],['../classWebUsers.html#ae4680f622bd8d571530615fb616d37e7',1,'WebUsers\getReceiveMail()']]], - ['getrepliesofticket',['getRepliesOfTicket',['../classTicket__Reply.html#a7e80a6437bb6ee90be42a32f3a82fe76',1,'Ticket_Reply']]], - ['getserver_5ftick',['getServer_Tick',['../classTicket__Info.html#a5a5799e4e54d3fa4858716b4464710c0',1,'Ticket_Info']]], - ['getsgroupid',['getSGroupId',['../classSupport__Group.html#a77d0961efe9609ebb268f8672e71bba4',1,'Support_Group']]], - ['getsgroupofticket',['getSGroupOfTicket',['../classForwarded.html#a4de002d45322cf62ce493f49933d33bd',1,'Forwarded']]], - ['getshardid',['getShardId',['../classTicket__Info.html#a36306b5367015050fb516fcaaff8351f',1,'Ticket_Info']]], - ['getsid',['getSID',['../classQuerycache.html#a5bac91964d19751986cccad6fad28dda',1,'Querycache']]], - ['getstatus',['getStatus',['../classTicket.html#a9d21636071f529e2154051d3ea6e5921',1,'Ticket']]], - ['getstatusarray',['getStatusArray',['../classTicket.html#aa728c6a1f8ddd7030acbf5a4ca913b50',1,'Ticket']]], - ['getstatustext',['getStatusText',['../classTicket.html#aab26af198dc3a59295747084b85435ff',1,'Ticket']]], - ['gettag',['getTag',['../classSupport__Group.html#ab86ba36154b20e6bbfa3ba705f12f9d6',1,'Support_Group']]], - ['gettcategoryid',['getTCategoryId',['../classTicket__Category.html#acb530a119e5e52230a92ece95cc7ec82',1,'Ticket_Category']]], - ['gettcontentid',['getTContentId',['../classTicket__Content.html#a9245dceab917ad08e5244c9395b347ae',1,'Ticket_Content']]], - ['getticket',['getTicket',['../classAssigned.html#a42ddf34a72af750b7013fa309b67e46c',1,'Assigned\getTicket()'],['../classForwarded.html#a42ddf34a72af750b7013fa309b67e46c',1,'Forwarded\getTicket()'],['../classTicket__Info.html#a42ddf34a72af750b7013fa309b67e46c',1,'Ticket_Info\getTicket()'],['../classTicket__Log.html#a42ddf34a72af750b7013fa309b67e46c',1,'Ticket_Log\getTicket()'],['../classTicket__Reply.html#a42ddf34a72af750b7013fa309b67e46c',1,'Ticket_Reply\getTicket()']]], - ['getticket_5fcategory',['getTicket_Category',['../classTicket.html#addff2fc457fe07664f4eb39efcea45f9',1,'Ticket']]], - ['gettickets',['getTickets',['../classTicket__Queue__Handler.html#a45e8c11ba9485041fa92c7c470a8f9f9',1,'Ticket_Queue_Handler']]], - ['getticketsof',['getTicketsOf',['../classTicket.html#aa426904463cd0eb50d9b2f4becdd242f',1,'Ticket']]], - ['gettid',['getTId',['../classTicket.html#aa7af74696d9898008992c494cec136dd',1,'Ticket']]], - ['gettimestamp',['getTimestamp',['../classTicket.html#a92aa1d82129ec8cd803d64c28efcb30f',1,'Ticket\getTimestamp()'],['../classTicket__Log.html#a92aa1d82129ec8cd803d64c28efcb30f',1,'Ticket_Log\getTimestamp()'],['../classTicket__Reply.html#a92aa1d82129ec8cd803d64c28efcb30f',1,'Ticket_Reply\getTimestamp()']]], - ['gettinfoid',['getTInfoId',['../classTicket__Info.html#ad7c7ccc1926763c252d32d1fee5a7f69',1,'Ticket_Info']]], - ['gettitle',['getTitle',['../classTicket.html#a95e859a4588a39a1824b717378a84c29',1,'Ticket']]], - ['gettlogid',['getTLogId',['../classTicket__Log.html#ab174d340ee116d8cc3aa377003421fc5',1,'Ticket_Log']]], - ['gettreplyid',['getTReplyId',['../classTicket__Reply.html#ade0c35755c1a1af8fa4c9bae8b4c51f1',1,'Ticket_Reply']]], - ['gettuserid',['getTUserId',['../classTicket__User.html#a4a31c27c61f9794200b647bf810461f5',1,'Ticket_User']]], - ['gettype',['getType',['../classQuerycache.html#a830b5c75df72b32396701bc563fbe3c7',1,'Querycache']]], - ['getuid',['getUId',['../classWebUsers.html#aa36a98da4146d85e7813e99df7d97497',1,'WebUsers\getUId()'],['../classWebUsers.html#aa36a98da4146d85e7813e99df7d97497',1,'WebUsers\getUId()']]], - ['getuser',['getUser',['../classAssigned.html#ae81b7186fb97a7c6457edcc68c9aa2ef',1,'Assigned\getUser()'],['../classIn__Support__Group.html#ae81b7186fb97a7c6457edcc68c9aa2ef',1,'In_Support_Group\getUser()']]], - ['getuser_5fid',['getUser_Id',['../classTicket__Info.html#a9c2fe31c14609e2255773d5a4dd154d8',1,'Ticket_Info']]], - ['getuser_5fposition',['getUser_Position',['../classTicket__Info.html#a3f5a46d846543219d6321d2f8751d1f0',1,'Ticket_Info']]], - ['getuserassignedtoticket',['getUserAssignedToTicket',['../classAssigned.html#afcfb156712a9477a97423a49238d13c5',1,'Assigned']]], - ['getusername',['getUsername',['../classWebUsers.html#a81b37a3c9d639574e394f80c1138c75e',1,'WebUsers\getUsername()'],['../classWebUsers.html#a81b37a3c9d639574e394f80c1138c75e',1,'WebUsers\getUsername()']]], - ['getusers',['getUsers',['../classWebUsers.html#a0fc10b64683021b70c7eb95fb514c119',1,'WebUsers\getUsers()'],['../classWebUsers.html#a0fc10b64683021b70c7eb95fb514c119',1,'WebUsers\getUsers()']]], - ['getview_5fposition',['getView_Position',['../classTicket__Info.html#a525dbd26fc788c7c152f6c686a9a5d11',1,'Ticket_Info']]], - ['gui_5felements',['Gui_Elements',['../classGui__Elements.html',1,'']]], - ['gui_5felements_2ephp',['gui_elements.php',['../gui__elements_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_68.html b/code/web/docs/ams/html/search/all_68.html deleted file mode 100644 index 6df909782..000000000 --- a/code/web/docs/ams/html/search/all_68.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_68.js b/code/web/docs/ams/html/search/all_68.js deleted file mode 100644 index 551ff1628..000000000 --- a/code/web/docs/ams/html/search/all_68.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['handle_5flanguage',['handle_language',['../classHelpers.html#a334920d0652c160c6145d3bd7be31a22',1,'Helpers']]], - ['hashiv',['hashIV',['../classMyCrypt.html#a1bdf94a5906655bf0965338c9d17ab27',1,'MyCrypt']]], - ['hasinfo',['hasInfo',['../classTicket.html#afca07df3cc25a0e1a15d3f69bd6afa62',1,'Ticket']]], - ['helpers',['Helpers',['../classHelpers.html',1,'']]], - ['helpers_2ephp',['helpers.php',['../helpers_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_69.html b/code/web/docs/ams/html/search/all_69.html deleted file mode 100644 index 1a00b554d..000000000 --- a/code/web/docs/ams/html/search/all_69.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_69.js b/code/web/docs/ams/html/search/all_69.js deleted file mode 100644 index a0e19a9ec..000000000 --- a/code/web/docs/ams/html/search/all_69.js +++ /dev/null @@ -1,14 +0,0 @@ -var searchData= -[ - ['in_5fsupport_5fgroup',['In_Support_Group',['../classIn__Support__Group.html',1,'']]], - ['in_5fsupport_5fgroup_2ephp',['in_support_group.php',['../in__support__group_8php.html',1,'']]], - ['incoming_5fmail_5fhandler',['incoming_mail_handler',['../classMail__Handler.html#a2896dabadb8e435de7ba7bbb258f8a96',1,'Mail_Handler']]], - ['index_2ephp',['index.php',['../index_8php.html',1,'']]], - ['info_2ephp',['info.php',['../info_8php.html',1,'']]], - ['install_2ephp',['install.php',['../install_8php.html',1,'']]], - ['isadmin',['isAdmin',['../classTicket__User.html#ae8a7d91474cde916fced2127fab426d2',1,'Ticket_User']]], - ['isassigned',['isAssigned',['../classAssigned.html#ade127364a5e5635077119b7217b6059c',1,'Assigned']]], - ['isforwarded',['isForwarded',['../classForwarded.html#ac1fa2045188edf04b07c523e1c6f68a0',1,'Forwarded']]], - ['isloggedin',['isLoggedIn',['../classWebUsers.html#a33bdd79e5da367ebddd4cfbdbbfc7cff',1,'WebUsers\isLoggedIn()'],['../classWebUsers.html#a33bdd79e5da367ebddd4cfbdbbfc7cff',1,'WebUsers\isLoggedIn()']]], - ['ismod',['isMod',['../classTicket__User.html#a8d88cdbf205bf7d24be03157d25bb7d8',1,'Ticket_User']]] -]; diff --git a/code/web/docs/ams/html/search/all_6c.html b/code/web/docs/ams/html/search/all_6c.html deleted file mode 100644 index f6383cc22..000000000 --- a/code/web/docs/ams/html/search/all_6c.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_6c.js b/code/web/docs/ams/html/search/all_6c.js deleted file mode 100644 index d76ada768..000000000 --- a/code/web/docs/ams/html/search/all_6c.js +++ /dev/null @@ -1,28 +0,0 @@ -var searchData= -[ - ['libinclude_2ephp',['libinclude.php',['../libinclude_8php.html',1,'']]], - ['load',['load',['../classAssigned.html#a689011be59ec3d216ebe6852f07ab37f',1,'Assigned\load()'],['../classForwarded.html#a689011be59ec3d216ebe6852f07ab37f',1,'Forwarded\load()']]], - ['load_5fwith_5fsgroupid',['load_With_SGroupId',['../classSupport__Group.html#a6beae177f45da42a57b100b5481f49bf',1,'Support_Group']]], - ['load_5fwith_5fsid',['load_With_SID',['../classQuerycache.html#ae960510ccb242704233c38d787242f53',1,'Querycache']]], - ['load_5fwith_5ftcategoryid',['load_With_TCategoryId',['../classTicket__Category.html#ab3a70940917530d91a39536a6d45a21d',1,'Ticket_Category']]], - ['load_5fwith_5ftcontentid',['load_With_TContentId',['../classTicket__Content.html#ad8b1226537a055701bcc3fe4af87257b',1,'Ticket_Content']]], - ['load_5fwith_5fticket',['load_With_Ticket',['../classTicket__Info.html#afcf4006cdd19b05919b5df34d3345ad2',1,'Ticket_Info']]], - ['load_5fwith_5ftid',['load_With_TId',['../classTicket.html#ac17d9e1158fb77707da1f6cd3e425d54',1,'Ticket']]], - ['load_5fwith_5ftinfoid',['load_With_TInfoId',['../classTicket__Info.html#a1681685f76483b7944bf6848b29caa4a',1,'Ticket_Info']]], - ['load_5fwith_5ftlogid',['load_With_TLogId',['../classTicket__Log.html#a76e8e991002c7e408f7b182556cdeade',1,'Ticket_Log']]], - ['load_5fwith_5ftreplyid',['load_With_TReplyId',['../classTicket__Reply.html#ac9a387c63aad0b81a8161d2515f697d9',1,'Ticket_Reply']]], - ['load_5fwith_5ftuserid',['load_With_TUserId',['../classTicket__User.html#af43df1ba39e073e4b3a0120e6e4d3140',1,'Ticket_User']]], - ['loadallclosedtickets',['loadAllClosedTickets',['../classTicket__Queue.html#af2a9b20ac9dc0e1992f717abbb418be7',1,'Ticket_Queue']]], - ['loadallnotassignedtickets',['loadAllNotAssignedTickets',['../classTicket__Queue.html#a771627a0bd387cd666474a6ef0d5eaaf',1,'Ticket_Queue']]], - ['loadallopentickets',['loadAllOpenTickets',['../classTicket__Queue.html#a3a1cf8a88a3604e093f7d276050f1c49',1,'Ticket_Queue']]], - ['loadalltickets',['loadAllTickets',['../classTicket__Queue.html#a80542bde30a8a589f1d088422cb7719b',1,'Ticket_Queue']]], - ['loadassignedandwaiting',['loadAssignedandWaiting',['../classTicket__Queue.html#a348c76f7ae32437b7e91b57671d6f33d',1,'Ticket_Queue']]], - ['loadtemplate',['loadTemplate',['../classHelpers.html#a78997ab39ba0237dc7a5441b58601211',1,'Helpers']]], - ['loadtodotickets',['loadToDoTickets',['../classTicket__Queue.html#ad88848edf9a9132eb0cfcac904a8459f',1,'Ticket_Queue']]], - ['login',['login',['../func_2login_8php.html#aa311da27ba5706f5710cea7706c8eae1',1,'login(): login.php'],['../inc_2login_8php.html#aa311da27ba5706f5710cea7706c8eae1',1,'login(): login.php']]], - ['login_2ephp',['login.php',['../func_2login_8php.html',1,'']]], - ['login_2ephp',['login.php',['../inc_2login_8php.html',1,'']]], - ['logout',['logout',['../drupal__module_2ryzommanage_2inc_2logout_8php.html#a082405d89acd6835c3a7c7a08a7adbab',1,'logout(): logout.php'],['../www_2html_2inc_2logout_8php.html#a082405d89acd6835c3a7c7a08a7adbab',1,'logout(): logout.php']]], - ['logout_2ephp',['logout.php',['../www_2html_2inc_2logout_8php.html',1,'']]], - ['logout_2ephp',['logout.php',['../drupal__module_2ryzommanage_2inc_2logout_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_6d.html b/code/web/docs/ams/html/search/all_6d.html deleted file mode 100644 index 2e27d4d64..000000000 --- a/code/web/docs/ams/html/search/all_6d.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_6d.js b/code/web/docs/ams/html/search/all_6d.js deleted file mode 100644 index fb08a60ab..000000000 --- a/code/web/docs/ams/html/search/all_6d.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['mail_5fcron_2ephp',['mail_cron.php',['../mail__cron_8php.html',1,'']]], - ['mail_5ffork',['mail_fork',['../classMail__Handler.html#ac6f9bcfab65cc93fdd4723284fff6b7a',1,'Mail_Handler']]], - ['mail_5fhandler',['Mail_Handler',['../classMail__Handler.html',1,'']]], - ['mail_5fhandler_2ephp',['mail_handler.php',['../mail__handler_8php.html',1,'']]], - ['make_5ftable',['make_table',['../classGui__Elements.html#a639930203d81ff01840ac90a51cbbfe7',1,'Gui_Elements']]], - ['make_5ftable_5fwith_5fkey_5fis_5fid',['make_table_with_key_is_id',['../classGui__Elements.html#ae3c8c19fce4cdd7d87d4ae759ab06f24',1,'Gui_Elements']]], - ['modify_5femail_5fof_5fsgroup',['modify_email_of_sgroup',['../modify__email__of__sgroup_8php.html#acb8c4a7ad3e36662d1d22ba56a98d0ab',1,'modify_email_of_sgroup.php']]], - ['modify_5femail_5fof_5fsgroup_2ephp',['modify_email_of_sgroup.php',['../modify__email__of__sgroup_8php.html',1,'']]], - ['mycrypt',['MyCrypt',['../classMyCrypt.html',1,'']]], - ['mycrypt_2ephp',['mycrypt.php',['../mycrypt_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_6e.html b/code/web/docs/ams/html/search/all_6e.html deleted file mode 100644 index 1f92ee5b6..000000000 --- a/code/web/docs/ams/html/search/all_6e.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_6e.js b/code/web/docs/ams/html/search/all_6e.js deleted file mode 100644 index 0831ed960..000000000 --- a/code/web/docs/ams/html/search/all_6e.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['new_5fmessage_5fid',['new_message_id',['../classMail__Handler.html#a667ca75b6c659157d855c3d19978a436',1,'Mail_Handler']]] -]; diff --git a/code/web/docs/ams/html/search/all_6f.html b/code/web/docs/ams/html/search/all_6f.html deleted file mode 100644 index 61827e82e..000000000 --- a/code/web/docs/ams/html/search/all_6f.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_6f.js b/code/web/docs/ams/html/search/all_6f.js deleted file mode 100644 index f8a8b3016..000000000 --- a/code/web/docs/ams/html/search/all_6f.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['outputtime',['outputTime',['../classHelpers.html#a4370c805a72fe32c03b178b03ad2e393',1,'Helpers']]] -]; diff --git a/code/web/docs/ams/html/search/all_70.html b/code/web/docs/ams/html/search/all_70.html deleted file mode 100644 index 0340151b6..000000000 --- a/code/web/docs/ams/html/search/all_70.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_70.js b/code/web/docs/ams/html/search/all_70.js deleted file mode 100644 index e09f3f7d0..000000000 --- a/code/web/docs/ams/html/search/all_70.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['pagination',['Pagination',['../classPagination.html',1,'']]], - ['pagination_2ephp',['pagination.php',['../pagination_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_71.html b/code/web/docs/ams/html/search/all_71.html deleted file mode 100644 index b4dc1e6ee..000000000 --- a/code/web/docs/ams/html/search/all_71.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_71.js b/code/web/docs/ams/html/search/all_71.js deleted file mode 100644 index 8b0805dd8..000000000 --- a/code/web/docs/ams/html/search/all_71.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['querycache',['Querycache',['../classQuerycache.html',1,'']]], - ['querycache_2ephp',['querycache.php',['../querycache_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_72.html b/code/web/docs/ams/html/search/all_72.html deleted file mode 100644 index 0ab18d65f..000000000 --- a/code/web/docs/ams/html/search/all_72.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_72.js b/code/web/docs/ams/html/search/all_72.js deleted file mode 100644 index ece0a9538..000000000 --- a/code/web/docs/ams/html/search/all_72.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['register',['register',['../register_8php.html#acc294a6cc8e69743746820e3d15e3f78',1,'register.php']]], - ['register_2ephp',['register.php',['../register_8php.html',1,'']]], - ['reply_5fon_5fticket',['reply_on_ticket',['../reply__on__ticket_8php.html#a79f0a445c77e8e1e59eb9e72cbf39dba',1,'reply_on_ticket.php']]], - ['reply_5fon_5fticket_2ephp',['reply_on_ticket.php',['../reply__on__ticket_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_73.html b/code/web/docs/ams/html/search/all_73.html deleted file mode 100644 index 1ec8f174d..000000000 --- a/code/web/docs/ams/html/search/all_73.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_73.js b/code/web/docs/ams/html/search/all_73.js deleted file mode 100644 index aee17ff0a..000000000 --- a/code/web/docs/ams/html/search/all_73.js +++ /dev/null @@ -1,90 +0,0 @@ -var searchData= -[ - ['send_5fmail',['send_mail',['../classMail__Handler.html#a50308ad0711aee080dacef7e3f574699',1,'Mail_Handler']]], - ['send_5fticketing_5fmail',['send_ticketing_mail',['../classMail__Handler.html#abe649044c8b8bd8eb05787a401865e6d',1,'Mail_Handler']]], - ['set',['set',['../classAssigned.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Assigned\set()'],['../classForwarded.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Forwarded\set()'],['../classIn__Support__Group.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'In_Support_Group\set()'],['../classQuerycache.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Querycache\set()'],['../classSupport__Group.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Support_Group\set()'],['../classTicket.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket\set()'],['../classTicket__Info.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_Info\set()'],['../classTicket__Log.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_Log\set()'],['../classTicket__Reply.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_Reply\set()'],['../classTicket__User.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_User\set()'],['../classWebUsers.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'WebUsers\set($values)'],['../classWebUsers.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'WebUsers\set($values)']]], - ['setamsemail',['setAmsEmail',['../classUsers.html#ad1cbb1fe6ee72f46dc385bec6e274363',1,'Users']]], - ['setamspassword',['setAmsPassword',['../classUsers.html#ab89812058b0a71baf492af4652d67501',1,'Users']]], - ['setauthor',['setAuthor',['../classTicket.html#a0c8f116992af7c8737c70119dae00d45',1,'Ticket\setAuthor()'],['../classTicket__Log.html#a0c8f116992af7c8737c70119dae00d45',1,'Ticket_Log\setAuthor()'],['../classTicket__Reply.html#a0c8f116992af7c8737c70119dae00d45',1,'Ticket_Reply\setAuthor()']]], - ['setclient_5fversion',['setClient_Version',['../classTicket__Info.html#af06e75f73ae40120cc371f6ddd9ab49c',1,'Ticket_Info']]], - ['setconnect_5fstate',['setConnect_State',['../classTicket__Info.html#a4de823fc3a051d3aac3d526badef313c',1,'Ticket_Info']]], - ['setcontent',['setContent',['../classTicket__Content.html#a76e94f05c5cc0044993a35492097df4d',1,'Ticket_Content\setContent()'],['../classTicket__Reply.html#a76e94f05c5cc0044993a35492097df4d',1,'Ticket_Reply\setContent()']]], - ['setcpu_5fmask',['setCPU_Mask',['../classTicket__Info.html#a5f19999ab39a2ac0b7d6f2ced9223ae6',1,'Ticket_Info']]], - ['setcpuid',['setCPUId',['../classTicket__Info.html#af1f04d3bdcbaf28b246eb94a484f397c',1,'Ticket_Info']]], - ['setdb',['setDb',['../classQuerycache.html#afa9c249972ca269a2b1a399ed2faf9b4',1,'Querycache']]], - ['setemail',['setEmail',['../classWebUsers.html#a0cd214763f395718db166fbd598689f4',1,'WebUsers\setEmail($user, $mail)'],['../classWebUsers.html#a0cd214763f395718db166fbd598689f4',1,'WebUsers\setEmail($user, $mail)']]], - ['setexternid',['setExternId',['../classTicket__User.html#ad38846bb954052a5293ae2d26cf810d2',1,'Ticket_User']]], - ['setgroup',['setGroup',['../classForwarded.html#a3116db27c2e2f33cbb10a9488db34da3',1,'Forwarded\setGroup()'],['../classIn__Support__Group.html#a3116db27c2e2f33cbb10a9488db34da3',1,'In_Support_Group\setGroup()']]], - ['setgroupemail',['setGroupEmail',['../classSupport__Group.html#abbb0e975fd21a42439970ebb3eba5fea',1,'Support_Group']]], - ['sethidden',['setHidden',['../classTicket__Reply.html#a0b67f1016974c7b153b8944a94c88045',1,'Ticket_Reply']]], - ['setht',['setHT',['../classTicket__Info.html#a9ef93ff2fede4bd9b1cb8da2129dee20',1,'Ticket_Info']]], - ['setimap_5fmailserver',['setIMAP_MailServer',['../classSupport__Group.html#a71f266f2bba1fc4fb6df4cf083988938',1,'Support_Group']]], - ['setimap_5fpassword',['setIMAP_Password',['../classSupport__Group.html#ad6fcb63d4ae129567e8bea8786a75d87',1,'Support_Group']]], - ['setimap_5fusername',['setIMAP_Username',['../classSupport__Group.html#a6856519261b543f27bc001616c2881eb',1,'Support_Group']]], - ['setlanguage',['setLanguage',['../classWebUsers.html#a5ab1bd5f0959a3c33a46c176d9412c80',1,'WebUsers\setLanguage($user, $language)'],['../classWebUsers.html#a5ab1bd5f0959a3c33a46c176d9412c80',1,'WebUsers\setLanguage($user, $language)']]], - ['setlocal_5faddress',['setLocal_Address',['../classTicket__Info.html#a144b42f39cea6b24624c6c547df6aeeb',1,'Ticket_Info']]], - ['setmemory',['setMemory',['../classTicket__Info.html#a6f6f6925a18d24d2ecd5166a325be609',1,'Ticket_Info']]], - ['setname',['setName',['../classSupport__Group.html#aa3dcc220094e19fef1f918a3a917dba7',1,'Support_Group\setName()'],['../classTicket__Category.html#aa3dcc220094e19fef1f918a3a917dba7',1,'Ticket_Category\setName()']]], - ['setnel3d',['setNel3D',['../classTicket__Info.html#a77fbf6da57aa02e075be0905dc6cdd48',1,'Ticket_Info']]], - ['setos',['setOS',['../classTicket__Info.html#aacb7cbb0f04959ae64ba1c3aac36df54',1,'Ticket_Info']]], - ['setpassword',['setPassword',['../classWebUsers.html#a91506e5f74c9884045e865ef7c314fed',1,'WebUsers\setPassword($user, $pass)'],['../classWebUsers.html#a91506e5f74c9884045e865ef7c314fed',1,'WebUsers\setPassword($user, $pass)']]], - ['setpatch_5fversion',['setPatch_Version',['../classTicket__Info.html#a1d0f55ed3b50a72bf882591474d2ff72',1,'Ticket_Info']]], - ['setpermission',['setPermission',['../classTicket__User.html#adf7c497fb026ee6e05f6ece91f541839',1,'Ticket_User']]], - ['setpriority',['setPriority',['../classTicket.html#a3080d0b46978a8f82022bbb6e5fc0c1c',1,'Ticket']]], - ['setprocessor',['setProcessor',['../classTicket__Info.html#a8b66f72ec1928b89058cd0a9b4dd8c11',1,'Ticket_Info']]], - ['setquery',['setQuery',['../classQuerycache.html#adbd6075ec5d3bd84122e52b0134ed8e7',1,'Querycache\setQuery()'],['../classTicket__Log.html#adbd6075ec5d3bd84122e52b0134ed8e7',1,'Ticket_Log\setQuery()']]], - ['setqueue',['setQueue',['../classTicket.html#a1595d3fe708fe4f453922054407a1c03',1,'Ticket']]], - ['setreceivemail',['setReceiveMail',['../classWebUsers.html#aa0f439ff7a5cd6377a557f545fbeb45c',1,'WebUsers\setReceiveMail($user, $receivemail)'],['../classWebUsers.html#aa0f439ff7a5cd6377a557f545fbeb45c',1,'WebUsers\setReceiveMail($user, $receivemail)']]], - ['setserver_5ftick',['setServer_Tick',['../classTicket__Info.html#ab6ff52082590b43d90f8f37fd5b31086',1,'Ticket_Info']]], - ['setsgroupid',['setSGroupId',['../classSupport__Group.html#aa49cb914be98fc354a45584c6f2b8be1',1,'Support_Group']]], - ['setshardid',['setShardId',['../classTicket__Info.html#a4026e593012113e253b80e3bbd5f6c13',1,'Ticket_Info']]], - ['setsid',['setSID',['../classQuerycache.html#a2f536a1f8c8e463eb0346ac375f2a24d',1,'Querycache']]], - ['setstatus',['setStatus',['../classTicket.html#a66605893c4afc9855f1e0cf8ccccac09',1,'Ticket']]], - ['settag',['setTag',['../classSupport__Group.html#a4de944a53debc51843530fe96296f220',1,'Support_Group']]], - ['settcategoryid',['setTCategoryId',['../classTicket__Category.html#a39a64c3f7ab33ba3f5a67c31647e889f',1,'Ticket_Category']]], - ['settcontentid',['setTContentId',['../classTicket__Content.html#ae07366727208e060372063e96591c5d4',1,'Ticket_Content']]], - ['setticket',['setTicket',['../classAssigned.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Assigned\setTicket()'],['../classForwarded.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Forwarded\setTicket()'],['../classTicket__Info.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Ticket_Info\setTicket()'],['../classTicket__Log.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Ticket_Log\setTicket()'],['../classTicket__Reply.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Ticket_Reply\setTicket()']]], - ['setticket_5fcategory',['setTicket_Category',['../classTicket.html#a4e38b2a263b5a934b76cd77f026308c3',1,'Ticket']]], - ['settid',['setTId',['../classTicket.html#a8c72dc7b09645b390043f5a4664e7c7f',1,'Ticket']]], - ['settimestamp',['setTimestamp',['../classTicket.html#a4e05995d5cc78cdc9ffe72d864811ac6',1,'Ticket\setTimestamp()'],['../classTicket__Log.html#aa8903a0020a17d745524806f4e751f4c',1,'Ticket_Log\setTimestamp()'],['../classTicket__Reply.html#aa8903a0020a17d745524806f4e751f4c',1,'Ticket_Reply\setTimestamp()']]], - ['settinfoid',['setTInfoId',['../classTicket__Info.html#a5e98fba0b50f74645a2fdaa8f4d0c1ea',1,'Ticket_Info']]], - ['settings',['settings',['../drupal__module_2ryzommanage_2inc_2settings_8php.html#ad7354383714c6ae99d6ee1bfb95ab49f',1,'settings(): settings.php'],['../www_2html_2inc_2settings_8php.html#ad7354383714c6ae99d6ee1bfb95ab49f',1,'settings(): settings.php']]], - ['settings_2ephp',['settings.php',['../drupal__module_2ryzommanage_2inc_2settings_8php.html',1,'']]], - ['settings_2ephp',['settings.php',['../www_2html_2inc_2settings_8php.html',1,'']]], - ['settitle',['setTitle',['../classTicket.html#ac765da6fa83b06ea39c0edc9b3e6c6c0',1,'Ticket']]], - ['settlogid',['setTLogId',['../classTicket__Log.html#aca708aae8c7320e11d9e08936ec74dec',1,'Ticket_Log']]], - ['settreplyid',['setTReplyId',['../classTicket__Reply.html#a7b91b481de87eb1515212d62b298cb94',1,'Ticket_Reply']]], - ['settuserid',['setTUserId',['../classTicket__User.html#a0faf8954e86346e7b566870b1a3c0a4a',1,'Ticket_User']]], - ['settype',['setType',['../classQuerycache.html#a0f29af8d4b9fdd8959739727a33acee5',1,'Querycache']]], - ['setuser',['setUser',['../classAssigned.html#af560ca7f201e2f871384a150e8ffd9aa',1,'Assigned\setUser()'],['../classIn__Support__Group.html#af560ca7f201e2f871384a150e8ffd9aa',1,'In_Support_Group\setUser()']]], - ['setuser_5fid',['setUser_Id',['../classTicket__Info.html#aec77405f6e096f2c0493383724f33034',1,'Ticket_Info']]], - ['setuser_5fposition',['setUser_Position',['../classTicket__Info.html#a41cfb7786d3252b2ec7aec42d77add9f',1,'Ticket_Info']]], - ['setview_5fposition',['setView_Position',['../classTicket__Info.html#a58912ec04451ab232d88bd78b6a8c2ea',1,'Ticket_Info']]], - ['sgroup_5flist',['sgroup_list',['../sgroup__list_8php.html#ab3af46486585b0ddced2de27a5d7a000',1,'sgroup_list.php']]], - ['sgroup_5flist_2ephp',['sgroup_list.php',['../sgroup__list_8php.html',1,'']]], - ['show_5fqueue',['show_queue',['../show__queue_8php.html#a48695b07fef725dbf0b4f261b1fe1547',1,'show_queue.php']]], - ['show_5fqueue_2ephp',['show_queue.php',['../show__queue_8php.html',1,'']]], - ['show_5freply',['show_reply',['../show__reply_8php.html#ad8e51d3b3a4bf996fb07199a08ca9a3e',1,'show_reply.php']]], - ['show_5freply_2ephp',['show_reply.php',['../show__reply_8php.html',1,'']]], - ['show_5fsgroup',['show_sgroup',['../show__sgroup_8php.html#a118719426cb30ed43e39c2af24cfea2d',1,'show_sgroup.php']]], - ['show_5fsgroup_2ephp',['show_sgroup.php',['../show__sgroup_8php.html',1,'']]], - ['show_5fticket',['show_ticket',['../show__ticket_8php.html#a1249d6cae97f6949ce3a7754fa1b7016',1,'show_ticket.php']]], - ['show_5fticket_2ephp',['show_ticket.php',['../show__ticket_8php.html',1,'']]], - ['show_5fticket_5finfo',['show_ticket_info',['../show__ticket__info_8php.html#a579a5c89b55189455a8237369a78f0d8',1,'show_ticket_info.php']]], - ['show_5fticket_5finfo_2ephp',['show_ticket_info.php',['../show__ticket__info_8php.html',1,'']]], - ['show_5fticket_5flog',['show_ticket_log',['../show__ticket__log_8php.html#ab37298a659581e85338601f2259ead49',1,'show_ticket_log.php']]], - ['show_5fticket_5flog_2ephp',['show_ticket_log.php',['../show__ticket__log_8php.html',1,'']]], - ['show_5fuser',['show_user',['../drupal__module_2ryzommanage_2inc_2show__user_8php.html#ac755ca62882d4caca41c7822793b8812',1,'show_user(): show_user.php'],['../www_2html_2inc_2show__user_8php.html#ac755ca62882d4caca41c7822793b8812',1,'show_user(): show_user.php']]], - ['show_5fuser_2ephp',['show_user.php',['../drupal__module_2ryzommanage_2inc_2show__user_8php.html',1,'']]], - ['show_5fuser_2ephp',['show_user.php',['../www_2html_2inc_2show__user_8php.html',1,'']]], - ['support_5fgroup',['Support_Group',['../classSupport__Group.html',1,'']]], - ['support_5fgroup_2ephp',['support_group.php',['../support__group_8php.html',1,'']]], - ['supportgroup_5fentrynotexists',['supportGroup_EntryNotExists',['../classSupport__Group.html#aa557f337f57a3bb530f1f04df78c0f1e',1,'Support_Group']]], - ['supportgroup_5fexists',['supportGroup_Exists',['../classSupport__Group.html#ac235662693dcc9c2be51e6f1a2c426b6',1,'Support_Group']]], - ['sync',['Sync',['../classSync.html',1,'']]], - ['sync_2ephp',['sync.php',['../sync_8php.html',1,'']]], - ['sync_5fcron_2ephp',['sync_cron.php',['../sync__cron_8php.html',1,'']]], - ['syncdata',['syncdata',['../classSync.html#ad1211cc677b7aafcc4ebcc25f3cacdda',1,'Sync']]], - ['syncing',['syncing',['../syncing_8php.html#a8d4df31796dab54a8d0c9c9ec32cf7f9',1,'syncing.php']]], - ['syncing_2ephp',['syncing.php',['../syncing_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_74.html b/code/web/docs/ams/html/search/all_74.html deleted file mode 100644 index fdc6589d0..000000000 --- a/code/web/docs/ams/html/search/all_74.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_74.js b/code/web/docs/ams/html/search/all_74.js deleted file mode 100644 index 4c4c97839..000000000 --- a/code/web/docs/ams/html/search/all_74.js +++ /dev/null @@ -1,24 +0,0 @@ -var searchData= -[ - ['ticket',['Ticket',['../classTicket.html',1,'']]], - ['ticket_2ephp',['ticket.php',['../ticket_8php.html',1,'']]], - ['ticket_5fcategory',['Ticket_Category',['../classTicket__Category.html',1,'']]], - ['ticket_5fcategory_2ephp',['ticket_category.php',['../ticket__category_8php.html',1,'']]], - ['ticket_5fcontent',['Ticket_Content',['../classTicket__Content.html',1,'']]], - ['ticket_5fcontent_2ephp',['ticket_content.php',['../ticket__content_8php.html',1,'']]], - ['ticket_5finfo',['Ticket_Info',['../classTicket__Info.html',1,'']]], - ['ticket_5finfo_2ephp',['ticket_info.php',['../ticket__info_8php.html',1,'']]], - ['ticket_5flog',['Ticket_Log',['../classTicket__Log.html',1,'']]], - ['ticket_5flog_2ephp',['ticket_log.php',['../ticket__log_8php.html',1,'']]], - ['ticket_5fqueue',['Ticket_Queue',['../classTicket__Queue.html',1,'']]], - ['ticket_5fqueue_2ephp',['ticket_queue.php',['../ticket__queue_8php.html',1,'']]], - ['ticket_5fqueue_5fhandler',['Ticket_Queue_Handler',['../classTicket__Queue__Handler.html',1,'']]], - ['ticket_5fqueue_5fhandler_2ephp',['ticket_queue_handler.php',['../ticket__queue__handler_8php.html',1,'']]], - ['ticket_5freply',['Ticket_Reply',['../classTicket__Reply.html',1,'']]], - ['ticket_5freply_2ephp',['ticket_reply.php',['../ticket__reply_8php.html',1,'']]], - ['ticket_5fuser',['Ticket_User',['../classTicket__User.html',1,'']]], - ['ticket_5fuser_2ephp',['ticket_user.php',['../ticket__user_8php.html',1,'']]], - ['ticketexists',['ticketExists',['../classTicket.html#a091d7ec56d4dc4bf980b81e8069b76d0',1,'Ticket']]], - ['tickethasinfo',['TicketHasInfo',['../classTicket__Info.html#a361217eb1d85e13aa534dabfbbd64a86',1,'Ticket_Info']]], - ['time_5felapsed_5fstring',['time_elapsed_string',['../classGui__Elements.html#a04d9bc70e65231a470426f0a94b7583d',1,'Gui_Elements']]] -]; diff --git a/code/web/docs/ams/html/search/all_75.html b/code/web/docs/ams/html/search/all_75.html deleted file mode 100644 index ab8455ed5..000000000 --- a/code/web/docs/ams/html/search/all_75.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_75.js b/code/web/docs/ams/html/search/all_75.js deleted file mode 100644 index ad5f4cb36..000000000 --- a/code/web/docs/ams/html/search/all_75.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['unassignticket',['unAssignTicket',['../classAssigned.html#a8263a9c223957bb558a2c16d4431ca29',1,'Assigned\unAssignTicket()'],['../classTicket.html#a8263a9c223957bb558a2c16d4431ca29',1,'Ticket\unAssignTicket()']]], - ['update',['update',['../classQuerycache.html#a842e4774e3b3601a005b995c02f7e883',1,'Querycache\update()'],['../classSupport__Group.html#a842e4774e3b3601a005b995c02f7e883',1,'Support_Group\update()'],['../classTicket.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket\update()'],['../classTicket__Category.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Category\update()'],['../classTicket__Content.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Content\update()'],['../classTicket__Log.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Log\update()'],['../classTicket__Reply.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Reply\update()'],['../classTicket__User.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_User\update()']]], - ['updateticketstatus',['updateTicketStatus',['../classTicket.html#a6da2625040e9f06c583e9303082c556f',1,'Ticket']]], - ['updateticketstatusandpriority',['updateTicketStatusAndPriority',['../classTicket.html#a64f08c8987c9eb00d4bfc9ef94e45326',1,'Ticket']]], - ['userexistsinsgroup',['userExistsInSGroup',['../classIn__Support__Group.html#a1a25afa24efc6c01ffd236f735281543',1,'In_Support_Group']]], - ['userlist',['userlist',['../userlist_8php.html#a55709a05f18e09358e2b02531eb859ad',1,'userlist.php']]], - ['userlist_2ephp',['userlist.php',['../userlist_8php.html',1,'']]], - ['users',['Users',['../classUsers.html',1,'']]], - ['users_2ephp',['users.php',['../users_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/all_76.html b/code/web/docs/ams/html/search/all_76.html deleted file mode 100644 index 0ff5edd34..000000000 --- a/code/web/docs/ams/html/search/all_76.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_76.js b/code/web/docs/ams/html/search/all_76.js deleted file mode 100644 index 1566125d3..000000000 --- a/code/web/docs/ams/html/search/all_76.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['validemail',['validEmail',['../classUsers.html#a73637e760498c5cea55074896ec982ac',1,'Users']]] -]; diff --git a/code/web/docs/ams/html/search/all_77.html b/code/web/docs/ams/html/search/all_77.html deleted file mode 100644 index 73323d316..000000000 --- a/code/web/docs/ams/html/search/all_77.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/all_77.js b/code/web/docs/ams/html/search/all_77.js deleted file mode 100644 index 5a36cb483..000000000 --- a/code/web/docs/ams/html/search/all_77.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['webusers',['WebUsers',['../classWebUsers.html',1,'']]], - ['webusers_2ephp',['webusers.php',['../drupal__module_2ryzommanage_2autoload_2webusers_8php.html',1,'']]], - ['webusers_2ephp',['webusers.php',['../www_2html_2autoload_2webusers_8php.html',1,'']]], - ['write_5fuser',['write_user',['../add__user_8php.html#a09df49f177966f5b08af71ec43760e0c',1,'add_user.php']]] -]; diff --git a/code/web/docs/ams/html/search/classes_61.html b/code/web/docs/ams/html/search/classes_61.html deleted file mode 100644 index 85e5d72a3..000000000 --- a/code/web/docs/ams/html/search/classes_61.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_61.js b/code/web/docs/ams/html/search/classes_61.js deleted file mode 100644 index 39d4914a1..000000000 --- a/code/web/docs/ams/html/search/classes_61.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['assigned',['Assigned',['../classAssigned.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_64.html b/code/web/docs/ams/html/search/classes_64.html deleted file mode 100644 index 590270830..000000000 --- a/code/web/docs/ams/html/search/classes_64.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_64.js b/code/web/docs/ams/html/search/classes_64.js deleted file mode 100644 index db9b214c1..000000000 --- a/code/web/docs/ams/html/search/classes_64.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['dblayer',['DBLayer',['../classDBLayer.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_66.html b/code/web/docs/ams/html/search/classes_66.html deleted file mode 100644 index 941988c65..000000000 --- a/code/web/docs/ams/html/search/classes_66.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_66.js b/code/web/docs/ams/html/search/classes_66.js deleted file mode 100644 index 518614d90..000000000 --- a/code/web/docs/ams/html/search/classes_66.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['forwarded',['Forwarded',['../classForwarded.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_67.html b/code/web/docs/ams/html/search/classes_67.html deleted file mode 100644 index 78b514df0..000000000 --- a/code/web/docs/ams/html/search/classes_67.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_67.js b/code/web/docs/ams/html/search/classes_67.js deleted file mode 100644 index e85658e41..000000000 --- a/code/web/docs/ams/html/search/classes_67.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['gui_5felements',['Gui_Elements',['../classGui__Elements.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_68.html b/code/web/docs/ams/html/search/classes_68.html deleted file mode 100644 index 475eeb738..000000000 --- a/code/web/docs/ams/html/search/classes_68.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_68.js b/code/web/docs/ams/html/search/classes_68.js deleted file mode 100644 index 9e86cb7a3..000000000 --- a/code/web/docs/ams/html/search/classes_68.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['helpers',['Helpers',['../classHelpers.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_69.html b/code/web/docs/ams/html/search/classes_69.html deleted file mode 100644 index 961dbea27..000000000 --- a/code/web/docs/ams/html/search/classes_69.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_69.js b/code/web/docs/ams/html/search/classes_69.js deleted file mode 100644 index 49e6133b0..000000000 --- a/code/web/docs/ams/html/search/classes_69.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['in_5fsupport_5fgroup',['In_Support_Group',['../classIn__Support__Group.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_6d.html b/code/web/docs/ams/html/search/classes_6d.html deleted file mode 100644 index abe6f0d1d..000000000 --- a/code/web/docs/ams/html/search/classes_6d.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_6d.js b/code/web/docs/ams/html/search/classes_6d.js deleted file mode 100644 index ae1e0f417..000000000 --- a/code/web/docs/ams/html/search/classes_6d.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['mail_5fhandler',['Mail_Handler',['../classMail__Handler.html',1,'']]], - ['mycrypt',['MyCrypt',['../classMyCrypt.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_70.html b/code/web/docs/ams/html/search/classes_70.html deleted file mode 100644 index e4b520874..000000000 --- a/code/web/docs/ams/html/search/classes_70.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_70.js b/code/web/docs/ams/html/search/classes_70.js deleted file mode 100644 index 157d7c6b6..000000000 --- a/code/web/docs/ams/html/search/classes_70.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['pagination',['Pagination',['../classPagination.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_71.html b/code/web/docs/ams/html/search/classes_71.html deleted file mode 100644 index 80a4fbb83..000000000 --- a/code/web/docs/ams/html/search/classes_71.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_71.js b/code/web/docs/ams/html/search/classes_71.js deleted file mode 100644 index e2ca060ac..000000000 --- a/code/web/docs/ams/html/search/classes_71.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['querycache',['Querycache',['../classQuerycache.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_73.html b/code/web/docs/ams/html/search/classes_73.html deleted file mode 100644 index a1bf0b912..000000000 --- a/code/web/docs/ams/html/search/classes_73.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_73.js b/code/web/docs/ams/html/search/classes_73.js deleted file mode 100644 index 8941e45df..000000000 --- a/code/web/docs/ams/html/search/classes_73.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['support_5fgroup',['Support_Group',['../classSupport__Group.html',1,'']]], - ['sync',['Sync',['../classSync.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_74.html b/code/web/docs/ams/html/search/classes_74.html deleted file mode 100644 index f7f27cea7..000000000 --- a/code/web/docs/ams/html/search/classes_74.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_74.js b/code/web/docs/ams/html/search/classes_74.js deleted file mode 100644 index 90ec7727d..000000000 --- a/code/web/docs/ams/html/search/classes_74.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['ticket',['Ticket',['../classTicket.html',1,'']]], - ['ticket_5fcategory',['Ticket_Category',['../classTicket__Category.html',1,'']]], - ['ticket_5fcontent',['Ticket_Content',['../classTicket__Content.html',1,'']]], - ['ticket_5finfo',['Ticket_Info',['../classTicket__Info.html',1,'']]], - ['ticket_5flog',['Ticket_Log',['../classTicket__Log.html',1,'']]], - ['ticket_5fqueue',['Ticket_Queue',['../classTicket__Queue.html',1,'']]], - ['ticket_5fqueue_5fhandler',['Ticket_Queue_Handler',['../classTicket__Queue__Handler.html',1,'']]], - ['ticket_5freply',['Ticket_Reply',['../classTicket__Reply.html',1,'']]], - ['ticket_5fuser',['Ticket_User',['../classTicket__User.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_75.html b/code/web/docs/ams/html/search/classes_75.html deleted file mode 100644 index 807d7426e..000000000 --- a/code/web/docs/ams/html/search/classes_75.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_75.js b/code/web/docs/ams/html/search/classes_75.js deleted file mode 100644 index 432c5d270..000000000 --- a/code/web/docs/ams/html/search/classes_75.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['users',['Users',['../classUsers.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/classes_77.html b/code/web/docs/ams/html/search/classes_77.html deleted file mode 100644 index e3967e972..000000000 --- a/code/web/docs/ams/html/search/classes_77.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/classes_77.js b/code/web/docs/ams/html/search/classes_77.js deleted file mode 100644 index 0e579ee3d..000000000 --- a/code/web/docs/ams/html/search/classes_77.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['webusers',['WebUsers',['../classWebUsers.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/close.png b/code/web/docs/ams/html/search/close.png deleted file mode 100644 index 9342d3dfe..000000000 Binary files a/code/web/docs/ams/html/search/close.png and /dev/null differ diff --git a/code/web/docs/ams/html/search/files_61.html b/code/web/docs/ams/html/search/files_61.html deleted file mode 100644 index 5a8e45499..000000000 --- a/code/web/docs/ams/html/search/files_61.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_61.js b/code/web/docs/ams/html/search/files_61.js deleted file mode 100644 index db9b27c9e..000000000 --- a/code/web/docs/ams/html/search/files_61.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['add_5fsgroup_2ephp',['add_sgroup.php',['../add__sgroup_8php.html',1,'']]], - ['add_5fuser_2ephp',['add_user.php',['../add__user_8php.html',1,'']]], - ['add_5fuser_5fto_5fsgroup_2ephp',['add_user_to_sgroup.php',['../add__user__to__sgroup_8php.html',1,'']]], - ['assigned_2ephp',['assigned.php',['../assigned_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_63.html b/code/web/docs/ams/html/search/files_63.html deleted file mode 100644 index 6611a5b91..000000000 --- a/code/web/docs/ams/html/search/files_63.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_63.js b/code/web/docs/ams/html/search/files_63.js deleted file mode 100644 index 47c38c050..000000000 --- a/code/web/docs/ams/html/search/files_63.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['change_5finfo_2ephp',['change_info.php',['../change__info_8php.html',1,'']]], - ['change_5fmail_2ephp',['change_mail.php',['../change__mail_8php.html',1,'']]], - ['change_5fpassword_2ephp',['change_password.php',['../change__password_8php.html',1,'']]], - ['change_5fpermission_2ephp',['change_permission.php',['../change__permission_8php.html',1,'']]], - ['change_5freceivemail_2ephp',['change_receivemail.php',['../change__receivemail_8php.html',1,'']]], - ['config_2ephp',['config.php',['../www_2config_8php.html',1,'']]], - ['config_2ephp',['config.php',['../drupal__module_2ryzommanage_2config_8php.html',1,'']]], - ['create_5fticket_2ephp',['create_ticket.php',['../create__ticket_8php.html',1,'']]], - ['createticket_2ephp',['createticket.php',['../createticket_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_64.html b/code/web/docs/ams/html/search/files_64.html deleted file mode 100644 index 1a32bf882..000000000 --- a/code/web/docs/ams/html/search/files_64.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_64.js b/code/web/docs/ams/html/search/files_64.js deleted file mode 100644 index 8307e204b..000000000 --- a/code/web/docs/ams/html/search/files_64.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['dashboard_2ephp',['dashboard.php',['../dashboard_8php.html',1,'']]], - ['dblayer_2ephp',['dblayer.php',['../dblayer_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_65.html b/code/web/docs/ams/html/search/files_65.html deleted file mode 100644 index 1eadd1b02..000000000 --- a/code/web/docs/ams/html/search/files_65.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_65.js b/code/web/docs/ams/html/search/files_65.js deleted file mode 100644 index ec7451ee2..000000000 --- a/code/web/docs/ams/html/search/files_65.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['error_2ephp',['error.php',['../error_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_66.html b/code/web/docs/ams/html/search/files_66.html deleted file mode 100644 index c05640363..000000000 --- a/code/web/docs/ams/html/search/files_66.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_66.js b/code/web/docs/ams/html/search/files_66.js deleted file mode 100644 index ab77df41b..000000000 --- a/code/web/docs/ams/html/search/files_66.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['forwarded_2ephp',['forwarded.php',['../forwarded_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_67.html b/code/web/docs/ams/html/search/files_67.html deleted file mode 100644 index d5df283f3..000000000 --- a/code/web/docs/ams/html/search/files_67.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_67.js b/code/web/docs/ams/html/search/files_67.js deleted file mode 100644 index e6e52c243..000000000 --- a/code/web/docs/ams/html/search/files_67.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['gui_5felements_2ephp',['gui_elements.php',['../gui__elements_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_68.html b/code/web/docs/ams/html/search/files_68.html deleted file mode 100644 index 8ead5893f..000000000 --- a/code/web/docs/ams/html/search/files_68.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_68.js b/code/web/docs/ams/html/search/files_68.js deleted file mode 100644 index 05d1801f3..000000000 --- a/code/web/docs/ams/html/search/files_68.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['helpers_2ephp',['helpers.php',['../helpers_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_69.html b/code/web/docs/ams/html/search/files_69.html deleted file mode 100644 index 7fbd757cd..000000000 --- a/code/web/docs/ams/html/search/files_69.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_69.js b/code/web/docs/ams/html/search/files_69.js deleted file mode 100644 index 74065c1ec..000000000 --- a/code/web/docs/ams/html/search/files_69.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['in_5fsupport_5fgroup_2ephp',['in_support_group.php',['../in__support__group_8php.html',1,'']]], - ['index_2ephp',['index.php',['../index_8php.html',1,'']]], - ['info_2ephp',['info.php',['../info_8php.html',1,'']]], - ['install_2ephp',['install.php',['../install_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_6c.html b/code/web/docs/ams/html/search/files_6c.html deleted file mode 100644 index 642a54585..000000000 --- a/code/web/docs/ams/html/search/files_6c.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_6c.js b/code/web/docs/ams/html/search/files_6c.js deleted file mode 100644 index 3b8359fc2..000000000 --- a/code/web/docs/ams/html/search/files_6c.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['libinclude_2ephp',['libinclude.php',['../libinclude_8php.html',1,'']]], - ['login_2ephp',['login.php',['../inc_2login_8php.html',1,'']]], - ['login_2ephp',['login.php',['../func_2login_8php.html',1,'']]], - ['logout_2ephp',['logout.php',['../www_2html_2inc_2logout_8php.html',1,'']]], - ['logout_2ephp',['logout.php',['../drupal__module_2ryzommanage_2inc_2logout_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_6d.html b/code/web/docs/ams/html/search/files_6d.html deleted file mode 100644 index d9d93006b..000000000 --- a/code/web/docs/ams/html/search/files_6d.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_6d.js b/code/web/docs/ams/html/search/files_6d.js deleted file mode 100644 index b19770b9b..000000000 --- a/code/web/docs/ams/html/search/files_6d.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['mail_5fcron_2ephp',['mail_cron.php',['../mail__cron_8php.html',1,'']]], - ['mail_5fhandler_2ephp',['mail_handler.php',['../mail__handler_8php.html',1,'']]], - ['modify_5femail_5fof_5fsgroup_2ephp',['modify_email_of_sgroup.php',['../modify__email__of__sgroup_8php.html',1,'']]], - ['mycrypt_2ephp',['mycrypt.php',['../mycrypt_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_70.html b/code/web/docs/ams/html/search/files_70.html deleted file mode 100644 index abcae9a6f..000000000 --- a/code/web/docs/ams/html/search/files_70.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_70.js b/code/web/docs/ams/html/search/files_70.js deleted file mode 100644 index f1c0593fa..000000000 --- a/code/web/docs/ams/html/search/files_70.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['pagination_2ephp',['pagination.php',['../pagination_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_71.html b/code/web/docs/ams/html/search/files_71.html deleted file mode 100644 index bb4ccc7cc..000000000 --- a/code/web/docs/ams/html/search/files_71.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_71.js b/code/web/docs/ams/html/search/files_71.js deleted file mode 100644 index c2eeb72ca..000000000 --- a/code/web/docs/ams/html/search/files_71.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['querycache_2ephp',['querycache.php',['../querycache_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_72.html b/code/web/docs/ams/html/search/files_72.html deleted file mode 100644 index 609fb48fc..000000000 --- a/code/web/docs/ams/html/search/files_72.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_72.js b/code/web/docs/ams/html/search/files_72.js deleted file mode 100644 index 721d27957..000000000 --- a/code/web/docs/ams/html/search/files_72.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['register_2ephp',['register.php',['../register_8php.html',1,'']]], - ['reply_5fon_5fticket_2ephp',['reply_on_ticket.php',['../reply__on__ticket_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_73.html b/code/web/docs/ams/html/search/files_73.html deleted file mode 100644 index e0de9e6b5..000000000 --- a/code/web/docs/ams/html/search/files_73.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_73.js b/code/web/docs/ams/html/search/files_73.js deleted file mode 100644 index 2ce5655bb..000000000 --- a/code/web/docs/ams/html/search/files_73.js +++ /dev/null @@ -1,18 +0,0 @@ -var searchData= -[ - ['settings_2ephp',['settings.php',['../drupal__module_2ryzommanage_2inc_2settings_8php.html',1,'']]], - ['settings_2ephp',['settings.php',['../www_2html_2inc_2settings_8php.html',1,'']]], - ['sgroup_5flist_2ephp',['sgroup_list.php',['../sgroup__list_8php.html',1,'']]], - ['show_5fqueue_2ephp',['show_queue.php',['../show__queue_8php.html',1,'']]], - ['show_5freply_2ephp',['show_reply.php',['../show__reply_8php.html',1,'']]], - ['show_5fsgroup_2ephp',['show_sgroup.php',['../show__sgroup_8php.html',1,'']]], - ['show_5fticket_2ephp',['show_ticket.php',['../show__ticket_8php.html',1,'']]], - ['show_5fticket_5finfo_2ephp',['show_ticket_info.php',['../show__ticket__info_8php.html',1,'']]], - ['show_5fticket_5flog_2ephp',['show_ticket_log.php',['../show__ticket__log_8php.html',1,'']]], - ['show_5fuser_2ephp',['show_user.php',['../www_2html_2inc_2show__user_8php.html',1,'']]], - ['show_5fuser_2ephp',['show_user.php',['../drupal__module_2ryzommanage_2inc_2show__user_8php.html',1,'']]], - ['support_5fgroup_2ephp',['support_group.php',['../support__group_8php.html',1,'']]], - ['sync_2ephp',['sync.php',['../sync_8php.html',1,'']]], - ['sync_5fcron_2ephp',['sync_cron.php',['../sync__cron_8php.html',1,'']]], - ['syncing_2ephp',['syncing.php',['../syncing_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_74.html b/code/web/docs/ams/html/search/files_74.html deleted file mode 100644 index 017b3fe9f..000000000 --- a/code/web/docs/ams/html/search/files_74.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_74.js b/code/web/docs/ams/html/search/files_74.js deleted file mode 100644 index 47b5068e4..000000000 --- a/code/web/docs/ams/html/search/files_74.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['ticket_2ephp',['ticket.php',['../ticket_8php.html',1,'']]], - ['ticket_5fcategory_2ephp',['ticket_category.php',['../ticket__category_8php.html',1,'']]], - ['ticket_5fcontent_2ephp',['ticket_content.php',['../ticket__content_8php.html',1,'']]], - ['ticket_5finfo_2ephp',['ticket_info.php',['../ticket__info_8php.html',1,'']]], - ['ticket_5flog_2ephp',['ticket_log.php',['../ticket__log_8php.html',1,'']]], - ['ticket_5fqueue_2ephp',['ticket_queue.php',['../ticket__queue_8php.html',1,'']]], - ['ticket_5fqueue_5fhandler_2ephp',['ticket_queue_handler.php',['../ticket__queue__handler_8php.html',1,'']]], - ['ticket_5freply_2ephp',['ticket_reply.php',['../ticket__reply_8php.html',1,'']]], - ['ticket_5fuser_2ephp',['ticket_user.php',['../ticket__user_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_75.html b/code/web/docs/ams/html/search/files_75.html deleted file mode 100644 index 8ea7b3d4b..000000000 --- a/code/web/docs/ams/html/search/files_75.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_75.js b/code/web/docs/ams/html/search/files_75.js deleted file mode 100644 index 2d05f2341..000000000 --- a/code/web/docs/ams/html/search/files_75.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['userlist_2ephp',['userlist.php',['../userlist_8php.html',1,'']]], - ['users_2ephp',['users.php',['../users_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/files_77.html b/code/web/docs/ams/html/search/files_77.html deleted file mode 100644 index 69f689782..000000000 --- a/code/web/docs/ams/html/search/files_77.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/files_77.js b/code/web/docs/ams/html/search/files_77.js deleted file mode 100644 index 5c7ec501b..000000000 --- a/code/web/docs/ams/html/search/files_77.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['webusers_2ephp',['webusers.php',['../drupal__module_2ryzommanage_2autoload_2webusers_8php.html',1,'']]], - ['webusers_2ephp',['webusers.php',['../www_2html_2autoload_2webusers_8php.html',1,'']]] -]; diff --git a/code/web/docs/ams/html/search/functions_5f.html b/code/web/docs/ams/html/search/functions_5f.html deleted file mode 100644 index cb54e927d..000000000 --- a/code/web/docs/ams/html/search/functions_5f.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_5f.js b/code/web/docs/ams/html/search/functions_5f.js deleted file mode 100644 index 844048eb7..000000000 --- a/code/web/docs/ams/html/search/functions_5f.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['_5f_5fautoload',['__autoload',['../libinclude_8php.html#a2ecfde85f554ea0b3fef0993aef304a9',1,'libinclude.php']]], - ['_5f_5fconstruct',['__construct',['../classAssigned.html#a095c5d389db211932136b53f25f39685',1,'Assigned\__construct()'],['../classDBLayer.html#a800f8efee13692788b13ee57c5960092',1,'DBLayer\__construct()'],['../classForwarded.html#a095c5d389db211932136b53f25f39685',1,'Forwarded\__construct()'],['../classIn__Support__Group.html#a095c5d389db211932136b53f25f39685',1,'In_Support_Group\__construct()'],['../classMyCrypt.html#af200cbfd49bfea2fecf5629ab2361033',1,'MyCrypt\__construct()'],['../classPagination.html#a2a1aecb8f526796b3d62e8278edc07c3',1,'Pagination\__construct()'],['../classQuerycache.html#a095c5d389db211932136b53f25f39685',1,'Querycache\__construct()'],['../classSupport__Group.html#a095c5d389db211932136b53f25f39685',1,'Support_Group\__construct()'],['../classTicket.html#a095c5d389db211932136b53f25f39685',1,'Ticket\__construct()'],['../classTicket__Category.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Category\__construct()'],['../classTicket__Content.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Content\__construct()'],['../classTicket__Info.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Info\__construct()'],['../classTicket__Log.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Log\__construct()'],['../classTicket__Queue__Handler.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Queue_Handler\__construct()'],['../classTicket__Reply.html#a095c5d389db211932136b53f25f39685',1,'Ticket_Reply\__construct()'],['../classTicket__User.html#a095c5d389db211932136b53f25f39685',1,'Ticket_User\__construct()'],['../classWebUsers.html#a4e63742e531873e01e1e97dd7530539b',1,'WebUsers\__construct($UId=0)'],['../classWebUsers.html#a4e63742e531873e01e1e97dd7530539b',1,'WebUsers\__construct($UId=0)']]] -]; diff --git a/code/web/docs/ams/html/search/functions_61.html b/code/web/docs/ams/html/search/functions_61.html deleted file mode 100644 index 7f395337e..000000000 --- a/code/web/docs/ams/html/search/functions_61.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_61.js b/code/web/docs/ams/html/search/functions_61.js deleted file mode 100644 index 8bc0ff34b..000000000 --- a/code/web/docs/ams/html/search/functions_61.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['add_5fsgroup',['add_sgroup',['../add__sgroup_8php.html#a45490c056bdd114ef28893fc29286d2b',1,'add_sgroup.php']]], - ['add_5fuser',['add_user',['../add__user_8php.html#a69e8de25de7560db0292bb474882a489',1,'add_user.php']]], - ['add_5fuser_5fto_5fsgroup',['add_user_to_sgroup',['../add__user__to__sgroup_8php.html#a6ad0c5a1bfd563e11a107bf0023b6150',1,'add_user_to_sgroup.php']]], - ['addusertosupportgroup',['addUserToSupportGroup',['../classSupport__Group.html#a4616317379ffef08dbaeea2a9dbba02c',1,'Support_Group']]], - ['assignticket',['assignTicket',['../classAssigned.html#a51c3d5b6f78de455619581fd3e591f17',1,'Assigned\assignTicket()'],['../classTicket.html#a51c3d5b6f78de455619581fd3e591f17',1,'Ticket\assignTicket()']]] -]; diff --git a/code/web/docs/ams/html/search/functions_63.html b/code/web/docs/ams/html/search/functions_63.html deleted file mode 100644 index 9ebe11d69..000000000 --- a/code/web/docs/ams/html/search/functions_63.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_63.js b/code/web/docs/ams/html/search/functions_63.js deleted file mode 100644 index dfdf9b93d..000000000 --- a/code/web/docs/ams/html/search/functions_63.js +++ /dev/null @@ -1,42 +0,0 @@ -var searchData= -[ - ['change_5finfo',['change_info',['../change__info_8php.html#a1bbc74a7da07012d55b0b45726534265',1,'change_info.php']]], - ['change_5fmail',['change_mail',['../change__mail_8php.html#a03d0bca67a96c8744bd74623e128ab83',1,'change_mail.php']]], - ['change_5fpassword',['change_password',['../change__password_8php.html#a888360ab43db15eba1d5cc3623d4100f',1,'change_password.php']]], - ['change_5fpermission',['change_permission',['../classTicket__User.html#a78d4d6de74b1ee26cb9192f36e022416',1,'Ticket_User\change_permission()'],['../change__permission_8php.html#a9ad639fafd67bdc579cf3170cd0d26e7',1,'change_permission(): change_permission.php']]], - ['change_5freceivemail',['change_receivemail',['../change__receivemail_8php.html#a22ae748f60d7b4200dce30c94a52c421',1,'change_receivemail.php']]], - ['check_5fchange_5fpassword',['check_change_password',['../classUsers.html#a9c78408d50465957eeb8068810315a8e',1,'Users']]], - ['check_5fif_5fgame_5fclient',['check_if_game_client',['../classHelpers.html#a4e3e5309a66456d81a1effdabcc9cd79',1,'Helpers']]], - ['check_5flogin_5fingame',['check_login_ingame',['../classHelpers.html#abd01528a1145831a4fc98eae7ffaca36',1,'Helpers']]], - ['check_5fmethods',['check_methods',['../classMyCrypt.html#ad72fefc790b0bb1ac6edc252427b0970',1,'MyCrypt']]], - ['check_5fregister',['check_Register',['../classUsers.html#a740de04dc3aa7cf3bed959540ffab8f8',1,'Users']]], - ['checkemail',['checkEmail',['../classUsers.html#a76646237ab053cdde386c06aa5437d8a',1,'Users']]], - ['checkemailexists',['checkEmailExists',['../classUsers.html#a37275e677004927b6b1a30e16c5b5b38',1,'Users\checkEmailExists()'],['../classWebUsers.html#a37275e677004927b6b1a30e16c5b5b38',1,'WebUsers\checkEmailExists($email)'],['../classWebUsers.html#a37275e677004927b6b1a30e16c5b5b38',1,'WebUsers\checkEmailExists($email)']]], - ['checkloginmatch',['checkLoginMatch',['../classUsers.html#af0b98012abb190cf4617999f008de27e',1,'Users\checkLoginMatch()'],['../classWebUsers.html#a11894eb69bb2f172baf5186e8f92246d',1,'WebUsers\checkLoginMatch($username, $password)'],['../classWebUsers.html#a11894eb69bb2f172baf5186e8f92246d',1,'WebUsers\checkLoginMatch($username, $password)']]], - ['checkpassword',['checkPassword',['../classUsers.html#a4cb5e34b56fb6de0ec318fb59e90838f',1,'Users']]], - ['checkuser',['checkUser',['../classUsers.html#adfffce17947a9f72d68838db250c9ab8',1,'Users']]], - ['checkusernameexists',['checkUserNameExists',['../classUsers.html#ac3a8cb9a038f6aef0bd98be091274122',1,'Users\checkUserNameExists()'],['../classWebUsers.html#ac3a8cb9a038f6aef0bd98be091274122',1,'WebUsers\checkUserNameExists($username)'],['../classWebUsers.html#ac3a8cb9a038f6aef0bd98be091274122',1,'WebUsers\checkUserNameExists($username)']]], - ['confirmpassword',['confirmPassword',['../classUsers.html#a2f5349025bed3874f08d80652cab2fe0',1,'Users']]], - ['constr_5fexternid',['constr_ExternId',['../classTicket__User.html#a4e5c577ed0a9da4b1c56397912f02ba0',1,'Ticket_User']]], - ['constr_5fsgroupid',['constr_SGroupId',['../classSupport__Group.html#a873beb80bd0b5d572704cdb6d2ec34eb',1,'Support_Group']]], - ['constr_5ftcategoryid',['constr_TCategoryId',['../classTicket__Category.html#a332d2dd59b46fc933a3c9a1b2967803a',1,'Ticket_Category']]], - ['constr_5ftcontentid',['constr_TContentId',['../classTicket__Content.html#aa28ad9a063c1914ff75d19afd25c707f',1,'Ticket_Content']]], - ['constr_5ftlogid',['constr_TLogId',['../classTicket__Log.html#a001ec13f64bb026b1c8a3b3bd02ee22b',1,'Ticket_Log']]], - ['constr_5ftreplyid',['constr_TReplyId',['../classTicket__Reply.html#a4b4493d28e8518a87667d285c49e5e24',1,'Ticket_Reply']]], - ['constr_5ftuserid',['constr_TUserId',['../classTicket__User.html#a10939bce9b667f26d3827993b4e3df1d',1,'Ticket_User']]], - ['create',['create',['../classAssigned.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Assigned\create()'],['../classForwarded.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Forwarded\create()'],['../classIn__Support__Group.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'In_Support_Group\create()'],['../classSupport__Group.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Support_Group\create()'],['../classTicket.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket\create()'],['../classTicket__Content.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket_Content\create()'],['../classTicket__Info.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket_Info\create()'],['../classTicket__Reply.html#a435e7d7525d4bcd0ed5e34a469f3adf6',1,'Ticket_Reply\create()']]], - ['create_5ffolders',['create_folders',['../classHelpers.html#add8ef9ce82106c505f6f04c2a8e3b2b4',1,'Helpers']]], - ['create_5fticket',['create_Ticket',['../classTicket.html#a81b3285033bc3c9e89adfa8da34d61de',1,'Ticket\create_Ticket()'],['../create__ticket_8php.html#a65bcbfccf737c72927d15c06783cd9f4',1,'create_ticket(): create_ticket.php']]], - ['create_5fticket_5finfo',['create_Ticket_Info',['../classTicket__Info.html#aaa4e26c92338b70e874135af9c02bba9',1,'Ticket_Info']]], - ['createlogentry',['createLogEntry',['../classTicket__Log.html#a345a2da9c23780c7e6aef7134baa1749',1,'Ticket_Log']]], - ['createpermissions',['createPermissions',['../classUsers.html#aeac9f32fd53c97c92e5c774e154399df',1,'Users']]], - ['createqueue',['createQueue',['../classTicket__Queue.html#af077496b6071af47c19a873bf025c1f3',1,'Ticket_Queue\createQueue()'],['../classTicket__Queue__Handler.html#af077496b6071af47c19a873bf025c1f3',1,'Ticket_Queue_Handler\createQueue()']]], - ['createreply',['createReply',['../classTicket.html#af6568341f5052034440f79c0e74707a3',1,'Ticket\createReply()'],['../classTicket__Reply.html#aa6fa056fff4ddafc3eabf3ed72143e1b',1,'Ticket_Reply\createReply()']]], - ['createsupportgroup',['createSupportGroup',['../classSupport__Group.html#a31ee7c68c0ffb77438bb9ff095962568',1,'Support_Group']]], - ['createticket',['createticket',['../createticket_8php.html#aa8253d883a3ba14c6449a13ed2bb9c8f',1,'createticket.php']]], - ['createticketcategory',['createTicketCategory',['../classTicket__Category.html#a506fc7f32de9547e91a5dbb68c391907',1,'Ticket_Category']]], - ['createticketuser',['createTicketUser',['../classTicket__User.html#a37c416f7d3723874f3ac49c7f9f5a21c',1,'Ticket_User']]], - ['createuser',['createUser',['../classUsers.html#ac93aebf1960fb12975b120a2c394a8af',1,'Users']]], - ['createwebuser',['createWebuser',['../classWebUsers.html#a0cb7168a6b8358106512804ff28cea17',1,'WebUsers\createWebuser($name, $pass, $mail)'],['../classWebUsers.html#a0cb7168a6b8358106512804ff28cea17',1,'WebUsers\createWebuser($name, $pass, $mail)']]], - ['cron',['cron',['../classMail__Handler.html#a1b65890aa4eb8c0c6129c3e787a53405',1,'Mail_Handler']]] -]; diff --git a/code/web/docs/ams/html/search/functions_64.html b/code/web/docs/ams/html/search/functions_64.html deleted file mode 100644 index d8b63943c..000000000 --- a/code/web/docs/ams/html/search/functions_64.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_64.js b/code/web/docs/ams/html/search/functions_64.js deleted file mode 100644 index da5e1ad06..000000000 --- a/code/web/docs/ams/html/search/functions_64.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['dashboard',['dashboard',['../dashboard_8php.html#a54d0c80ff20df9df6439bb87608c375a',1,'dashboard.php']]], - ['decode_5futf8',['decode_utf8',['../classMail__Handler.html#a6fc5947eaa45b0724f8720b374481275',1,'Mail_Handler']]], - ['decrypt',['decrypt',['../classMyCrypt.html#aed69cdc691e1155856c905ee1c08d9b7',1,'MyCrypt']]], - ['delete',['delete',['../classAssigned.html#a13bdffdd926f26b825ea57066334ff01',1,'Assigned\delete()'],['../classForwarded.html#a13bdffdd926f26b825ea57066334ff01',1,'Forwarded\delete()'],['../classIn__Support__Group.html#a13bdffdd926f26b825ea57066334ff01',1,'In_Support_Group\delete()'],['../classSupport__Group.html#a13bdffdd926f26b825ea57066334ff01',1,'Support_Group\delete()']]], - ['deletesupportgroup',['deleteSupportGroup',['../classSupport__Group.html#ab4a7d3ba86333a058027c7d58b9137f1',1,'Support_Group']]], - ['deleteuserofsupportgroup',['deleteUserOfSupportGroup',['../classSupport__Group.html#ad2d1a010903640e39545085b93b9a4f1',1,'Support_Group']]] -]; diff --git a/code/web/docs/ams/html/search/functions_65.html b/code/web/docs/ams/html/search/functions_65.html deleted file mode 100644 index a77debae0..000000000 --- a/code/web/docs/ams/html/search/functions_65.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_65.js b/code/web/docs/ams/html/search/functions_65.js deleted file mode 100644 index 348a0bc5f..000000000 --- a/code/web/docs/ams/html/search/functions_65.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['encrypt',['encrypt',['../classMyCrypt.html#a07bcc8ef1d23370470ecb5ae8fc07dfa',1,'MyCrypt']]], - ['error',['error',['../error_8php.html#a43b8d30b879d4f09ceb059b02af2bc02',1,'error.php']]], - ['execute',['execute',['../classDBLayer.html#a9a0e3ecb193fecd94263eda79c54bcc4',1,'DBLayer']]], - ['executereturnid',['executeReturnId',['../classDBLayer.html#a9a8137347ec2d551de3ec54cfb3bdb1a',1,'DBLayer']]], - ['executewithoutparams',['executeWithoutParams',['../classDBLayer.html#a33552c5325c469ac1aa0d049d2312468',1,'DBLayer']]] -]; diff --git a/code/web/docs/ams/html/search/functions_66.html b/code/web/docs/ams/html/search/functions_66.html deleted file mode 100644 index 319a5316a..000000000 --- a/code/web/docs/ams/html/search/functions_66.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_66.js b/code/web/docs/ams/html/search/functions_66.js deleted file mode 100644 index 608fb4187..000000000 --- a/code/web/docs/ams/html/search/functions_66.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['forwardticket',['forwardTicket',['../classForwarded.html#aa6f01e425a0f845ce55c2d90aeb11db0',1,'Forwarded\forwardTicket()'],['../classTicket.html#a3fdc6def6a0feaf4c2458811b8c75050',1,'Ticket\forwardTicket()']]] -]; diff --git a/code/web/docs/ams/html/search/functions_67.html b/code/web/docs/ams/html/search/functions_67.html deleted file mode 100644 index d0ab42a3f..000000000 --- a/code/web/docs/ams/html/search/functions_67.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_67.js b/code/web/docs/ams/html/search/functions_67.js deleted file mode 100644 index 6f68d029b..000000000 --- a/code/web/docs/ams/html/search/functions_67.js +++ /dev/null @@ -1,106 +0,0 @@ -var searchData= -[ - ['generatesalt',['generateSALT',['../classUsers.html#afb7603ac9556c1069fbf1c0062251203',1,'Users']]], - ['get_5femail_5fby_5fuser_5fid',['get_email_by_user_id',['../classTicket__User.html#a7274bc305ccce731091c68d1607cb6e9',1,'Ticket_User']]], - ['get_5fid_5ffrom_5femail',['get_id_from_email',['../classTicket__User.html#a7feeb7a909bf6733de21300d0ea0e1bd',1,'Ticket_User']]], - ['get_5fid_5ffrom_5fusername',['get_id_from_username',['../classTicket__User.html#a0bcfa281f41b948eb42dd18992724543',1,'Ticket_User']]], - ['get_5fmime_5ftype',['get_mime_type',['../classMail__Handler.html#a719c5051ef00fbb0d7c7ce2c78e3b4e1',1,'Mail_Handler']]], - ['get_5fpart',['get_part',['../classMail__Handler.html#ab3a5e8f69692826c6dae96f873859642',1,'Mail_Handler']]], - ['get_5fticket_5fid_5ffrom_5fsubject',['get_ticket_id_from_subject',['../classMail__Handler.html#a8604569b1e012ea3b1fe466018f75ce2',1,'Mail_Handler']]], - ['get_5fusername_5ffrom_5fid',['get_username_from_id',['../classTicket__User.html#a266ff1e60e08dcd8c7e70f22f5a33e93',1,'Ticket_User']]], - ['getaction',['getAction',['../classTicket__Log.html#a189a4abe5faf11f4320d5d3f1d3d1715',1,'Ticket_Log']]], - ['getactiontextarray',['getActionTextArray',['../classTicket__Log.html#ac760071c0ce36337c16d8146fcb3bade',1,'Ticket_Log']]], - ['getallcategories',['getAllCategories',['../classTicket__Category.html#a1e4b8ecfd737337e35976126b521499f',1,'Ticket_Category']]], - ['getalllogs',['getAllLogs',['../classTicket__Log.html#aeaf1c995cc807afe241f6e7bdc684921',1,'Ticket_Log']]], - ['getallsupportgroups',['getAllSupportGroups',['../classSupport__Group.html#ad3fc18cb894f789d19a768ea63d9b673',1,'Support_Group']]], - ['getallusersofsupportgroup',['getAllUsersOfSupportGroup',['../classSupport__Group.html#a7f1662394a31e2a05e9863def178df12',1,'Support_Group']]], - ['getallusersquery',['getAllUsersQuery',['../classWebUsers.html#a2f8e928ed02e462b40e909965250fb7d',1,'WebUsers\getAllUsersQuery()'],['../classWebUsers.html#a2f8e928ed02e462b40e909965250fb7d',1,'WebUsers\getAllUsersQuery()']]], - ['getamountofrows',['getAmountOfRows',['../classPagination.html#ae43f78382809e3cd2aaa3c455cb0b2b4',1,'Pagination']]], - ['getargument',['getArgument',['../classTicket__Log.html#a88ec9370bcbdb60301f89e401c9e64e1',1,'Ticket_Log']]], - ['getassigned',['getAssigned',['../classTicket.html#a8234a4e23319778d234b3957f8b5d06c',1,'Ticket']]], - ['getauthor',['getAuthor',['../classTicket.html#a5286e30390ae3e1b274940286493dd24',1,'Ticket\getAuthor()'],['../classTicket__Log.html#a5286e30390ae3e1b274940286493dd24',1,'Ticket_Log\getAuthor()'],['../classTicket__Reply.html#a5286e30390ae3e1b274940286493dd24',1,'Ticket_Reply\getAuthor()']]], - ['getcategoryname',['getCategoryName',['../classTicket.html#a689e9d131777e7f1219ee0d65b088cb3',1,'Ticket']]], - ['getclient_5fversion',['getClient_Version',['../classTicket__Info.html#a5a9884f9f9b63d4a6ed8c6112704277d',1,'Ticket_Info']]], - ['getconnect_5fstate',['getConnect_State',['../classTicket__Info.html#a51a5247b7c82f60479ccdcfa33041c27',1,'Ticket_Info']]], - ['getcontent',['getContent',['../classTicket__Content.html#a58e43f09a06ce4e29b192c4e17ce7915',1,'Ticket_Content\getContent()'],['../classTicket__Reply.html#a58e43f09a06ce4e29b192c4e17ce7915',1,'Ticket_Reply\getContent()']]], - ['getcountryarray',['getCountryArray',['../drupal__module_2ryzommanage_2inc_2settings_8php.html#a9342547984d3c9a5ece41572951f8edf',1,'getCountryArray(): settings.php'],['../www_2html_2inc_2settings_8php.html#a9342547984d3c9a5ece41572951f8edf',1,'getCountryArray(): settings.php']]], - ['getcpu_5fmask',['getCPU_Mask',['../classTicket__Info.html#ae85e54574e6e0b17cd33b8c49255d228',1,'Ticket_Info']]], - ['getcpuid',['getCPUId',['../classTicket__Info.html#aba21caccb000efb673b8b66ca70a36c7',1,'Ticket_Info']]], - ['getcurrent',['getCurrent',['../classPagination.html#ad926899d7cac34a3f1a90e552d8eb27d',1,'Pagination']]], - ['getdb',['getDb',['../classQuerycache.html#aceb656ee5135578ab3a9947252caa772',1,'Querycache']]], - ['getelements',['getElements',['../classPagination.html#a97a3a3e912139aa222a7ca13fdb27d33',1,'Pagination']]], - ['getemail',['getEmail',['../classWebUsers.html#a02a01849f28e2535e888ae4ec87b20f2',1,'WebUsers\getEmail()'],['../classWebUsers.html#a02a01849f28e2535e888ae4ec87b20f2',1,'WebUsers\getEmail()']]], - ['getentireticket',['getEntireTicket',['../classTicket.html#a00572e06f01ae1cadb5949f1b45e8f04',1,'Ticket']]], - ['getexternid',['getExternId',['../classTicket__User.html#ace230deb485c9f115f7fea4ce92442a3',1,'Ticket_User']]], - ['getforwardedgroupid',['getForwardedGroupId',['../classTicket.html#aedbfa4efd5aaa96ac713817d12156f7e',1,'Ticket']]], - ['getforwardedgroupname',['getForwardedGroupName',['../classTicket.html#a34e17d1cc053a7b86ce2b58a3a347c7e',1,'Ticket']]], - ['getgroup',['getGroup',['../classForwarded.html#a4f44e7bc9de772c21b4304d11e87bf16',1,'Forwarded\getGroup()'],['../classIn__Support__Group.html#a4f44e7bc9de772c21b4304d11e87bf16',1,'In_Support_Group\getGroup()'],['../classSupport__Group.html#af6697615443145a2981e62aa741c3afa',1,'Support_Group\getGroup()']]], - ['getgroupemail',['getGroupEmail',['../classSupport__Group.html#a9d0f36a53db49c1f57e3cab8a61a7d90',1,'Support_Group']]], - ['getgroups',['getGroups',['../classSupport__Group.html#a562142b89699a1063ea9769030250365',1,'Support_Group']]], - ['gethidden',['getHidden',['../classTicket__Reply.html#a1d032efbce2b4edb7c269a1e13562f40',1,'Ticket_Reply']]], - ['getht',['getHT',['../classTicket__Info.html#a90d3c0edc1e767875c7fb98880886e73',1,'Ticket_Info']]], - ['getid',['getId',['../classWebUsers.html#a585ef354b38d0fad9d92f45e183b639f',1,'WebUsers\getId($username)'],['../classWebUsers.html#a585ef354b38d0fad9d92f45e183b639f',1,'WebUsers\getId($username)']]], - ['getidfromemail',['getIdFromEmail',['../classWebUsers.html#aee8d6b322defc5dfe8e47f382becca62',1,'WebUsers\getIdFromEmail($email)'],['../classWebUsers.html#aee8d6b322defc5dfe8e47f382becca62',1,'WebUsers\getIdFromEmail($email)']]], - ['getimap_5fmailserver',['getIMAP_MailServer',['../classSupport__Group.html#a30d67354e52f95489b93923440ff0661',1,'Support_Group']]], - ['getimap_5fpassword',['getIMAP_Password',['../classSupport__Group.html#a4983db184794db8f05ce93f5ba11ba7e',1,'Support_Group']]], - ['getimap_5fusername',['getIMAP_Username',['../classSupport__Group.html#a0ace9f66f2541d29e060cb7728030e93',1,'Support_Group']]], - ['getinfo',['getInfo',['../classWebUsers.html#a164026f74736817927e1cacd282a2e28',1,'WebUsers\getInfo()'],['../classWebUsers.html#a164026f74736817927e1cacd282a2e28',1,'WebUsers\getInfo()']]], - ['getlanguage',['getLanguage',['../classWebUsers.html#afcef2403c4111bc44ef0530f1e493909',1,'WebUsers\getLanguage()'],['../classWebUsers.html#afcef2403c4111bc44ef0530f1e493909',1,'WebUsers\getLanguage()']]], - ['getlast',['getLast',['../classPagination.html#a9316ede6960667d832997c8e20223623',1,'Pagination']]], - ['getlatestreply',['getLatestReply',['../classTicket.html#a3a4ce7e9c445dd245b3370304d0afd92',1,'Ticket']]], - ['getlinks',['getLinks',['../classPagination.html#aeecf550e63b55ecd5d737ecc46e07d3a',1,'Pagination']]], - ['getlocal_5faddress',['getLocal_Address',['../classTicket__Info.html#a49b4c851eff2f3d06531a39baa8423f5',1,'Ticket_Info']]], - ['getlogsofticket',['getLogsOfTicket',['../classTicket__Log.html#a37ad4d95b0bb2d5a6dfc2dd7c3744292',1,'Ticket_Log']]], - ['getmemory',['getMemory',['../classTicket__Info.html#a144248575cd034a40315155a9b48ff87',1,'Ticket_Info']]], - ['getmodsandadmins',['getModsAndAdmins',['../classTicket__User.html#a71099747902fb7e064ec1d4128ea4576',1,'Ticket_User']]], - ['getname',['getName',['../classSupport__Group.html#a3d0963e68bb313b163a73f2803c64600',1,'Support_Group\getName()'],['../classTicket__Category.html#a3d0963e68bb313b163a73f2803c64600',1,'Ticket_Category\getName()']]], - ['getnel3d',['getNel3D',['../classTicket__Info.html#abe3ae528bfd5495720c3adeff59fe11e',1,'Ticket_Info']]], - ['getnewestticket',['getNewestTicket',['../classTicket__Queue__Handler.html#ab5a79318a0c771083f03400093b3b2ec',1,'Ticket_Queue_Handler']]], - ['getnroftickets',['getNrOfTickets',['../classTicket__Queue__Handler.html#ada8f87ed8466c5e0477fa20359c3c8ad',1,'Ticket_Queue_Handler']]], - ['getnrofticketsassignedwaiting',['getNrOfTicketsAssignedWaiting',['../classTicket__Queue__Handler.html#a0d3daaaf5c79188eb62bb3adda11fa2a',1,'Ticket_Queue_Handler']]], - ['getnrofticketstodo',['getNrOfTicketsToDo',['../classTicket__Queue__Handler.html#ae8d1a2a66991583c05c173147e8dc657',1,'Ticket_Queue_Handler']]], - ['getos',['getOS',['../classTicket__Info.html#a9a1b88474ad97701d67a752d0c4d65c5',1,'Ticket_Info']]], - ['getpagination',['getPagination',['../classTicket__Queue__Handler.html#ab45a102a508e9727b108e8f24486c464',1,'Ticket_Queue_Handler']]], - ['getparams',['getParams',['../classTicket__Queue.html#ae32cd7c32721b02d676bb63b4b1366db',1,'Ticket_Queue']]], - ['getpatch_5fversion',['getPatch_Version',['../classTicket__Info.html#a6e41e115b03a1f152bd2c28c77d5fbac',1,'Ticket_Info']]], - ['getpermission',['getPermission',['../classTicket__User.html#a478067ecf173884c2ee3e5b94e746200',1,'Ticket_User']]], - ['getpriority',['getPriority',['../classTicket.html#a1e7a3c168dcd0901a0d2669c67575b55',1,'Ticket']]], - ['getpriorityarray',['getPriorityArray',['../classTicket.html#a509625cccc0b41f4ab3a658df705b3dc',1,'Ticket']]], - ['getprioritytext',['getPriorityText',['../classTicket.html#ae07f7808a12f2789593722f3293bd105',1,'Ticket']]], - ['getprocessor',['getProcessor',['../classTicket__Info.html#a3ace868ad456ff61f545cb44ee01c562',1,'Ticket_Info']]], - ['getquery',['getQuery',['../classQuerycache.html#a55f162785567258fe5138af282e588c2',1,'Querycache\getQuery()'],['../classTicket__Log.html#a55f162785567258fe5138af282e588c2',1,'Ticket_Log\getQuery()'],['../classTicket__Queue.html#a55f162785567258fe5138af282e588c2',1,'Ticket_Queue\getQuery()']]], - ['getqueue',['getQueue',['../classTicket.html#aa7a8055e5ee1eb792f29443ddb79c4d3',1,'Ticket']]], - ['getreceivemail',['getReceiveMail',['../classWebUsers.html#ae4680f622bd8d571530615fb616d37e7',1,'WebUsers\getReceiveMail()'],['../classWebUsers.html#ae4680f622bd8d571530615fb616d37e7',1,'WebUsers\getReceiveMail()']]], - ['getrepliesofticket',['getRepliesOfTicket',['../classTicket__Reply.html#a7e80a6437bb6ee90be42a32f3a82fe76',1,'Ticket_Reply']]], - ['getserver_5ftick',['getServer_Tick',['../classTicket__Info.html#a5a5799e4e54d3fa4858716b4464710c0',1,'Ticket_Info']]], - ['getsgroupid',['getSGroupId',['../classSupport__Group.html#a77d0961efe9609ebb268f8672e71bba4',1,'Support_Group']]], - ['getsgroupofticket',['getSGroupOfTicket',['../classForwarded.html#a4de002d45322cf62ce493f49933d33bd',1,'Forwarded']]], - ['getshardid',['getShardId',['../classTicket__Info.html#a36306b5367015050fb516fcaaff8351f',1,'Ticket_Info']]], - ['getsid',['getSID',['../classQuerycache.html#a5bac91964d19751986cccad6fad28dda',1,'Querycache']]], - ['getstatus',['getStatus',['../classTicket.html#a9d21636071f529e2154051d3ea6e5921',1,'Ticket']]], - ['getstatusarray',['getStatusArray',['../classTicket.html#aa728c6a1f8ddd7030acbf5a4ca913b50',1,'Ticket']]], - ['getstatustext',['getStatusText',['../classTicket.html#aab26af198dc3a59295747084b85435ff',1,'Ticket']]], - ['gettag',['getTag',['../classSupport__Group.html#ab86ba36154b20e6bbfa3ba705f12f9d6',1,'Support_Group']]], - ['gettcategoryid',['getTCategoryId',['../classTicket__Category.html#acb530a119e5e52230a92ece95cc7ec82',1,'Ticket_Category']]], - ['gettcontentid',['getTContentId',['../classTicket__Content.html#a9245dceab917ad08e5244c9395b347ae',1,'Ticket_Content']]], - ['getticket',['getTicket',['../classAssigned.html#a42ddf34a72af750b7013fa309b67e46c',1,'Assigned\getTicket()'],['../classForwarded.html#a42ddf34a72af750b7013fa309b67e46c',1,'Forwarded\getTicket()'],['../classTicket__Info.html#a42ddf34a72af750b7013fa309b67e46c',1,'Ticket_Info\getTicket()'],['../classTicket__Log.html#a42ddf34a72af750b7013fa309b67e46c',1,'Ticket_Log\getTicket()'],['../classTicket__Reply.html#a42ddf34a72af750b7013fa309b67e46c',1,'Ticket_Reply\getTicket()']]], - ['getticket_5fcategory',['getTicket_Category',['../classTicket.html#addff2fc457fe07664f4eb39efcea45f9',1,'Ticket']]], - ['gettickets',['getTickets',['../classTicket__Queue__Handler.html#a45e8c11ba9485041fa92c7c470a8f9f9',1,'Ticket_Queue_Handler']]], - ['getticketsof',['getTicketsOf',['../classTicket.html#aa426904463cd0eb50d9b2f4becdd242f',1,'Ticket']]], - ['gettid',['getTId',['../classTicket.html#aa7af74696d9898008992c494cec136dd',1,'Ticket']]], - ['gettimestamp',['getTimestamp',['../classTicket.html#a92aa1d82129ec8cd803d64c28efcb30f',1,'Ticket\getTimestamp()'],['../classTicket__Log.html#a92aa1d82129ec8cd803d64c28efcb30f',1,'Ticket_Log\getTimestamp()'],['../classTicket__Reply.html#a92aa1d82129ec8cd803d64c28efcb30f',1,'Ticket_Reply\getTimestamp()']]], - ['gettinfoid',['getTInfoId',['../classTicket__Info.html#ad7c7ccc1926763c252d32d1fee5a7f69',1,'Ticket_Info']]], - ['gettitle',['getTitle',['../classTicket.html#a95e859a4588a39a1824b717378a84c29',1,'Ticket']]], - ['gettlogid',['getTLogId',['../classTicket__Log.html#ab174d340ee116d8cc3aa377003421fc5',1,'Ticket_Log']]], - ['gettreplyid',['getTReplyId',['../classTicket__Reply.html#ade0c35755c1a1af8fa4c9bae8b4c51f1',1,'Ticket_Reply']]], - ['gettuserid',['getTUserId',['../classTicket__User.html#a4a31c27c61f9794200b647bf810461f5',1,'Ticket_User']]], - ['gettype',['getType',['../classQuerycache.html#a830b5c75df72b32396701bc563fbe3c7',1,'Querycache']]], - ['getuid',['getUId',['../classWebUsers.html#aa36a98da4146d85e7813e99df7d97497',1,'WebUsers\getUId()'],['../classWebUsers.html#aa36a98da4146d85e7813e99df7d97497',1,'WebUsers\getUId()']]], - ['getuser',['getUser',['../classAssigned.html#ae81b7186fb97a7c6457edcc68c9aa2ef',1,'Assigned\getUser()'],['../classIn__Support__Group.html#ae81b7186fb97a7c6457edcc68c9aa2ef',1,'In_Support_Group\getUser()']]], - ['getuser_5fid',['getUser_Id',['../classTicket__Info.html#a9c2fe31c14609e2255773d5a4dd154d8',1,'Ticket_Info']]], - ['getuser_5fposition',['getUser_Position',['../classTicket__Info.html#a3f5a46d846543219d6321d2f8751d1f0',1,'Ticket_Info']]], - ['getuserassignedtoticket',['getUserAssignedToTicket',['../classAssigned.html#afcfb156712a9477a97423a49238d13c5',1,'Assigned']]], - ['getusername',['getUsername',['../classWebUsers.html#a81b37a3c9d639574e394f80c1138c75e',1,'WebUsers\getUsername()'],['../classWebUsers.html#a81b37a3c9d639574e394f80c1138c75e',1,'WebUsers\getUsername()']]], - ['getusers',['getUsers',['../classWebUsers.html#a0fc10b64683021b70c7eb95fb514c119',1,'WebUsers\getUsers()'],['../classWebUsers.html#a0fc10b64683021b70c7eb95fb514c119',1,'WebUsers\getUsers()']]], - ['getview_5fposition',['getView_Position',['../classTicket__Info.html#a525dbd26fc788c7c152f6c686a9a5d11',1,'Ticket_Info']]] -]; diff --git a/code/web/docs/ams/html/search/functions_68.html b/code/web/docs/ams/html/search/functions_68.html deleted file mode 100644 index 66b85be31..000000000 --- a/code/web/docs/ams/html/search/functions_68.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_68.js b/code/web/docs/ams/html/search/functions_68.js deleted file mode 100644 index 68cc67ed7..000000000 --- a/code/web/docs/ams/html/search/functions_68.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['handle_5flanguage',['handle_language',['../classHelpers.html#a334920d0652c160c6145d3bd7be31a22',1,'Helpers']]], - ['hashiv',['hashIV',['../classMyCrypt.html#a1bdf94a5906655bf0965338c9d17ab27',1,'MyCrypt']]], - ['hasinfo',['hasInfo',['../classTicket.html#afca07df3cc25a0e1a15d3f69bd6afa62',1,'Ticket']]] -]; diff --git a/code/web/docs/ams/html/search/functions_69.html b/code/web/docs/ams/html/search/functions_69.html deleted file mode 100644 index e2041976c..000000000 --- a/code/web/docs/ams/html/search/functions_69.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_69.js b/code/web/docs/ams/html/search/functions_69.js deleted file mode 100644 index e23cc85fc..000000000 --- a/code/web/docs/ams/html/search/functions_69.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['incoming_5fmail_5fhandler',['incoming_mail_handler',['../classMail__Handler.html#a2896dabadb8e435de7ba7bbb258f8a96',1,'Mail_Handler']]], - ['isadmin',['isAdmin',['../classTicket__User.html#ae8a7d91474cde916fced2127fab426d2',1,'Ticket_User']]], - ['isassigned',['isAssigned',['../classAssigned.html#ade127364a5e5635077119b7217b6059c',1,'Assigned']]], - ['isforwarded',['isForwarded',['../classForwarded.html#ac1fa2045188edf04b07c523e1c6f68a0',1,'Forwarded']]], - ['isloggedin',['isLoggedIn',['../classWebUsers.html#a33bdd79e5da367ebddd4cfbdbbfc7cff',1,'WebUsers\isLoggedIn()'],['../classWebUsers.html#a33bdd79e5da367ebddd4cfbdbbfc7cff',1,'WebUsers\isLoggedIn()']]], - ['ismod',['isMod',['../classTicket__User.html#a8d88cdbf205bf7d24be03157d25bb7d8',1,'Ticket_User']]] -]; diff --git a/code/web/docs/ams/html/search/functions_6c.html b/code/web/docs/ams/html/search/functions_6c.html deleted file mode 100644 index da371cfab..000000000 --- a/code/web/docs/ams/html/search/functions_6c.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_6c.js b/code/web/docs/ams/html/search/functions_6c.js deleted file mode 100644 index 51fb577db..000000000 --- a/code/web/docs/ams/html/search/functions_6c.js +++ /dev/null @@ -1,23 +0,0 @@ -var searchData= -[ - ['load',['load',['../classAssigned.html#a689011be59ec3d216ebe6852f07ab37f',1,'Assigned\load()'],['../classForwarded.html#a689011be59ec3d216ebe6852f07ab37f',1,'Forwarded\load()']]], - ['load_5fwith_5fsgroupid',['load_With_SGroupId',['../classSupport__Group.html#a6beae177f45da42a57b100b5481f49bf',1,'Support_Group']]], - ['load_5fwith_5fsid',['load_With_SID',['../classQuerycache.html#ae960510ccb242704233c38d787242f53',1,'Querycache']]], - ['load_5fwith_5ftcategoryid',['load_With_TCategoryId',['../classTicket__Category.html#ab3a70940917530d91a39536a6d45a21d',1,'Ticket_Category']]], - ['load_5fwith_5ftcontentid',['load_With_TContentId',['../classTicket__Content.html#ad8b1226537a055701bcc3fe4af87257b',1,'Ticket_Content']]], - ['load_5fwith_5fticket',['load_With_Ticket',['../classTicket__Info.html#afcf4006cdd19b05919b5df34d3345ad2',1,'Ticket_Info']]], - ['load_5fwith_5ftid',['load_With_TId',['../classTicket.html#ac17d9e1158fb77707da1f6cd3e425d54',1,'Ticket']]], - ['load_5fwith_5ftinfoid',['load_With_TInfoId',['../classTicket__Info.html#a1681685f76483b7944bf6848b29caa4a',1,'Ticket_Info']]], - ['load_5fwith_5ftlogid',['load_With_TLogId',['../classTicket__Log.html#a76e8e991002c7e408f7b182556cdeade',1,'Ticket_Log']]], - ['load_5fwith_5ftreplyid',['load_With_TReplyId',['../classTicket__Reply.html#ac9a387c63aad0b81a8161d2515f697d9',1,'Ticket_Reply']]], - ['load_5fwith_5ftuserid',['load_With_TUserId',['../classTicket__User.html#af43df1ba39e073e4b3a0120e6e4d3140',1,'Ticket_User']]], - ['loadallclosedtickets',['loadAllClosedTickets',['../classTicket__Queue.html#af2a9b20ac9dc0e1992f717abbb418be7',1,'Ticket_Queue']]], - ['loadallnotassignedtickets',['loadAllNotAssignedTickets',['../classTicket__Queue.html#a771627a0bd387cd666474a6ef0d5eaaf',1,'Ticket_Queue']]], - ['loadallopentickets',['loadAllOpenTickets',['../classTicket__Queue.html#a3a1cf8a88a3604e093f7d276050f1c49',1,'Ticket_Queue']]], - ['loadalltickets',['loadAllTickets',['../classTicket__Queue.html#a80542bde30a8a589f1d088422cb7719b',1,'Ticket_Queue']]], - ['loadassignedandwaiting',['loadAssignedandWaiting',['../classTicket__Queue.html#a348c76f7ae32437b7e91b57671d6f33d',1,'Ticket_Queue']]], - ['loadtemplate',['loadTemplate',['../classHelpers.html#a78997ab39ba0237dc7a5441b58601211',1,'Helpers']]], - ['loadtodotickets',['loadToDoTickets',['../classTicket__Queue.html#ad88848edf9a9132eb0cfcac904a8459f',1,'Ticket_Queue']]], - ['login',['login',['../func_2login_8php.html#aa311da27ba5706f5710cea7706c8eae1',1,'login(): login.php'],['../inc_2login_8php.html#aa311da27ba5706f5710cea7706c8eae1',1,'login(): login.php']]], - ['logout',['logout',['../drupal__module_2ryzommanage_2inc_2logout_8php.html#a082405d89acd6835c3a7c7a08a7adbab',1,'logout(): logout.php'],['../www_2html_2inc_2logout_8php.html#a082405d89acd6835c3a7c7a08a7adbab',1,'logout(): logout.php']]] -]; diff --git a/code/web/docs/ams/html/search/functions_6d.html b/code/web/docs/ams/html/search/functions_6d.html deleted file mode 100644 index d01ac5376..000000000 --- a/code/web/docs/ams/html/search/functions_6d.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_6d.js b/code/web/docs/ams/html/search/functions_6d.js deleted file mode 100644 index 2f5fc5e1e..000000000 --- a/code/web/docs/ams/html/search/functions_6d.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['mail_5ffork',['mail_fork',['../classMail__Handler.html#ac6f9bcfab65cc93fdd4723284fff6b7a',1,'Mail_Handler']]], - ['make_5ftable',['make_table',['../classGui__Elements.html#a639930203d81ff01840ac90a51cbbfe7',1,'Gui_Elements']]], - ['make_5ftable_5fwith_5fkey_5fis_5fid',['make_table_with_key_is_id',['../classGui__Elements.html#ae3c8c19fce4cdd7d87d4ae759ab06f24',1,'Gui_Elements']]], - ['modify_5femail_5fof_5fsgroup',['modify_email_of_sgroup',['../modify__email__of__sgroup_8php.html#acb8c4a7ad3e36662d1d22ba56a98d0ab',1,'modify_email_of_sgroup.php']]] -]; diff --git a/code/web/docs/ams/html/search/functions_6e.html b/code/web/docs/ams/html/search/functions_6e.html deleted file mode 100644 index d734dd07e..000000000 --- a/code/web/docs/ams/html/search/functions_6e.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_6e.js b/code/web/docs/ams/html/search/functions_6e.js deleted file mode 100644 index 0831ed960..000000000 --- a/code/web/docs/ams/html/search/functions_6e.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['new_5fmessage_5fid',['new_message_id',['../classMail__Handler.html#a667ca75b6c659157d855c3d19978a436',1,'Mail_Handler']]] -]; diff --git a/code/web/docs/ams/html/search/functions_6f.html b/code/web/docs/ams/html/search/functions_6f.html deleted file mode 100644 index 222f0f836..000000000 --- a/code/web/docs/ams/html/search/functions_6f.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_6f.js b/code/web/docs/ams/html/search/functions_6f.js deleted file mode 100644 index f8a8b3016..000000000 --- a/code/web/docs/ams/html/search/functions_6f.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['outputtime',['outputTime',['../classHelpers.html#a4370c805a72fe32c03b178b03ad2e393',1,'Helpers']]] -]; diff --git a/code/web/docs/ams/html/search/functions_72.html b/code/web/docs/ams/html/search/functions_72.html deleted file mode 100644 index a4336f7c4..000000000 --- a/code/web/docs/ams/html/search/functions_72.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_72.js b/code/web/docs/ams/html/search/functions_72.js deleted file mode 100644 index 857dcd26f..000000000 --- a/code/web/docs/ams/html/search/functions_72.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['register',['register',['../register_8php.html#acc294a6cc8e69743746820e3d15e3f78',1,'register.php']]], - ['reply_5fon_5fticket',['reply_on_ticket',['../reply__on__ticket_8php.html#a79f0a445c77e8e1e59eb9e72cbf39dba',1,'reply_on_ticket.php']]] -]; diff --git a/code/web/docs/ams/html/search/functions_73.html b/code/web/docs/ams/html/search/functions_73.html deleted file mode 100644 index 774d577f5..000000000 --- a/code/web/docs/ams/html/search/functions_73.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_73.js b/code/web/docs/ams/html/search/functions_73.js deleted file mode 100644 index 50284d9b1..000000000 --- a/code/web/docs/ams/html/search/functions_73.js +++ /dev/null @@ -1,73 +0,0 @@ -var searchData= -[ - ['send_5fmail',['send_mail',['../classMail__Handler.html#a50308ad0711aee080dacef7e3f574699',1,'Mail_Handler']]], - ['send_5fticketing_5fmail',['send_ticketing_mail',['../classMail__Handler.html#abe649044c8b8bd8eb05787a401865e6d',1,'Mail_Handler']]], - ['set',['set',['../classAssigned.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Assigned\set()'],['../classForwarded.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Forwarded\set()'],['../classIn__Support__Group.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'In_Support_Group\set()'],['../classQuerycache.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Querycache\set()'],['../classSupport__Group.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Support_Group\set()'],['../classTicket.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket\set()'],['../classTicket__Info.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_Info\set()'],['../classTicket__Log.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_Log\set()'],['../classTicket__Reply.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_Reply\set()'],['../classTicket__User.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'Ticket_User\set()'],['../classWebUsers.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'WebUsers\set($values)'],['../classWebUsers.html#a8bdfe0a5256e35367225bcd6d278ef21',1,'WebUsers\set($values)']]], - ['setamsemail',['setAmsEmail',['../classUsers.html#ad1cbb1fe6ee72f46dc385bec6e274363',1,'Users']]], - ['setamspassword',['setAmsPassword',['../classUsers.html#ab89812058b0a71baf492af4652d67501',1,'Users']]], - ['setauthor',['setAuthor',['../classTicket.html#a0c8f116992af7c8737c70119dae00d45',1,'Ticket\setAuthor()'],['../classTicket__Log.html#a0c8f116992af7c8737c70119dae00d45',1,'Ticket_Log\setAuthor()'],['../classTicket__Reply.html#a0c8f116992af7c8737c70119dae00d45',1,'Ticket_Reply\setAuthor()']]], - ['setclient_5fversion',['setClient_Version',['../classTicket__Info.html#af06e75f73ae40120cc371f6ddd9ab49c',1,'Ticket_Info']]], - ['setconnect_5fstate',['setConnect_State',['../classTicket__Info.html#a4de823fc3a051d3aac3d526badef313c',1,'Ticket_Info']]], - ['setcontent',['setContent',['../classTicket__Content.html#a76e94f05c5cc0044993a35492097df4d',1,'Ticket_Content\setContent()'],['../classTicket__Reply.html#a76e94f05c5cc0044993a35492097df4d',1,'Ticket_Reply\setContent()']]], - ['setcpu_5fmask',['setCPU_Mask',['../classTicket__Info.html#a5f19999ab39a2ac0b7d6f2ced9223ae6',1,'Ticket_Info']]], - ['setcpuid',['setCPUId',['../classTicket__Info.html#af1f04d3bdcbaf28b246eb94a484f397c',1,'Ticket_Info']]], - ['setdb',['setDb',['../classQuerycache.html#afa9c249972ca269a2b1a399ed2faf9b4',1,'Querycache']]], - ['setemail',['setEmail',['../classWebUsers.html#a0cd214763f395718db166fbd598689f4',1,'WebUsers\setEmail($user, $mail)'],['../classWebUsers.html#a0cd214763f395718db166fbd598689f4',1,'WebUsers\setEmail($user, $mail)']]], - ['setexternid',['setExternId',['../classTicket__User.html#ad38846bb954052a5293ae2d26cf810d2',1,'Ticket_User']]], - ['setgroup',['setGroup',['../classForwarded.html#a3116db27c2e2f33cbb10a9488db34da3',1,'Forwarded\setGroup()'],['../classIn__Support__Group.html#a3116db27c2e2f33cbb10a9488db34da3',1,'In_Support_Group\setGroup()']]], - ['setgroupemail',['setGroupEmail',['../classSupport__Group.html#abbb0e975fd21a42439970ebb3eba5fea',1,'Support_Group']]], - ['sethidden',['setHidden',['../classTicket__Reply.html#a0b67f1016974c7b153b8944a94c88045',1,'Ticket_Reply']]], - ['setht',['setHT',['../classTicket__Info.html#a9ef93ff2fede4bd9b1cb8da2129dee20',1,'Ticket_Info']]], - ['setimap_5fmailserver',['setIMAP_MailServer',['../classSupport__Group.html#a71f266f2bba1fc4fb6df4cf083988938',1,'Support_Group']]], - ['setimap_5fpassword',['setIMAP_Password',['../classSupport__Group.html#ad6fcb63d4ae129567e8bea8786a75d87',1,'Support_Group']]], - ['setimap_5fusername',['setIMAP_Username',['../classSupport__Group.html#a6856519261b543f27bc001616c2881eb',1,'Support_Group']]], - ['setlanguage',['setLanguage',['../classWebUsers.html#a5ab1bd5f0959a3c33a46c176d9412c80',1,'WebUsers\setLanguage($user, $language)'],['../classWebUsers.html#a5ab1bd5f0959a3c33a46c176d9412c80',1,'WebUsers\setLanguage($user, $language)']]], - ['setlocal_5faddress',['setLocal_Address',['../classTicket__Info.html#a144b42f39cea6b24624c6c547df6aeeb',1,'Ticket_Info']]], - ['setmemory',['setMemory',['../classTicket__Info.html#a6f6f6925a18d24d2ecd5166a325be609',1,'Ticket_Info']]], - ['setname',['setName',['../classSupport__Group.html#aa3dcc220094e19fef1f918a3a917dba7',1,'Support_Group\setName()'],['../classTicket__Category.html#aa3dcc220094e19fef1f918a3a917dba7',1,'Ticket_Category\setName()']]], - ['setnel3d',['setNel3D',['../classTicket__Info.html#a77fbf6da57aa02e075be0905dc6cdd48',1,'Ticket_Info']]], - ['setos',['setOS',['../classTicket__Info.html#aacb7cbb0f04959ae64ba1c3aac36df54',1,'Ticket_Info']]], - ['setpassword',['setPassword',['../classWebUsers.html#a91506e5f74c9884045e865ef7c314fed',1,'WebUsers\setPassword($user, $pass)'],['../classWebUsers.html#a91506e5f74c9884045e865ef7c314fed',1,'WebUsers\setPassword($user, $pass)']]], - ['setpatch_5fversion',['setPatch_Version',['../classTicket__Info.html#a1d0f55ed3b50a72bf882591474d2ff72',1,'Ticket_Info']]], - ['setpermission',['setPermission',['../classTicket__User.html#adf7c497fb026ee6e05f6ece91f541839',1,'Ticket_User']]], - ['setpriority',['setPriority',['../classTicket.html#a3080d0b46978a8f82022bbb6e5fc0c1c',1,'Ticket']]], - ['setprocessor',['setProcessor',['../classTicket__Info.html#a8b66f72ec1928b89058cd0a9b4dd8c11',1,'Ticket_Info']]], - ['setquery',['setQuery',['../classQuerycache.html#adbd6075ec5d3bd84122e52b0134ed8e7',1,'Querycache\setQuery()'],['../classTicket__Log.html#adbd6075ec5d3bd84122e52b0134ed8e7',1,'Ticket_Log\setQuery()']]], - ['setqueue',['setQueue',['../classTicket.html#a1595d3fe708fe4f453922054407a1c03',1,'Ticket']]], - ['setreceivemail',['setReceiveMail',['../classWebUsers.html#aa0f439ff7a5cd6377a557f545fbeb45c',1,'WebUsers\setReceiveMail($user, $receivemail)'],['../classWebUsers.html#aa0f439ff7a5cd6377a557f545fbeb45c',1,'WebUsers\setReceiveMail($user, $receivemail)']]], - ['setserver_5ftick',['setServer_Tick',['../classTicket__Info.html#ab6ff52082590b43d90f8f37fd5b31086',1,'Ticket_Info']]], - ['setsgroupid',['setSGroupId',['../classSupport__Group.html#aa49cb914be98fc354a45584c6f2b8be1',1,'Support_Group']]], - ['setshardid',['setShardId',['../classTicket__Info.html#a4026e593012113e253b80e3bbd5f6c13',1,'Ticket_Info']]], - ['setsid',['setSID',['../classQuerycache.html#a2f536a1f8c8e463eb0346ac375f2a24d',1,'Querycache']]], - ['setstatus',['setStatus',['../classTicket.html#a66605893c4afc9855f1e0cf8ccccac09',1,'Ticket']]], - ['settag',['setTag',['../classSupport__Group.html#a4de944a53debc51843530fe96296f220',1,'Support_Group']]], - ['settcategoryid',['setTCategoryId',['../classTicket__Category.html#a39a64c3f7ab33ba3f5a67c31647e889f',1,'Ticket_Category']]], - ['settcontentid',['setTContentId',['../classTicket__Content.html#ae07366727208e060372063e96591c5d4',1,'Ticket_Content']]], - ['setticket',['setTicket',['../classAssigned.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Assigned\setTicket()'],['../classForwarded.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Forwarded\setTicket()'],['../classTicket__Info.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Ticket_Info\setTicket()'],['../classTicket__Log.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Ticket_Log\setTicket()'],['../classTicket__Reply.html#a47c6ae5b3cd713fdbf0a7f4d568b7c27',1,'Ticket_Reply\setTicket()']]], - ['setticket_5fcategory',['setTicket_Category',['../classTicket.html#a4e38b2a263b5a934b76cd77f026308c3',1,'Ticket']]], - ['settid',['setTId',['../classTicket.html#a8c72dc7b09645b390043f5a4664e7c7f',1,'Ticket']]], - ['settimestamp',['setTimestamp',['../classTicket.html#a4e05995d5cc78cdc9ffe72d864811ac6',1,'Ticket\setTimestamp()'],['../classTicket__Log.html#aa8903a0020a17d745524806f4e751f4c',1,'Ticket_Log\setTimestamp()'],['../classTicket__Reply.html#aa8903a0020a17d745524806f4e751f4c',1,'Ticket_Reply\setTimestamp()']]], - ['settinfoid',['setTInfoId',['../classTicket__Info.html#a5e98fba0b50f74645a2fdaa8f4d0c1ea',1,'Ticket_Info']]], - ['settings',['settings',['../drupal__module_2ryzommanage_2inc_2settings_8php.html#ad7354383714c6ae99d6ee1bfb95ab49f',1,'settings(): settings.php'],['../www_2html_2inc_2settings_8php.html#ad7354383714c6ae99d6ee1bfb95ab49f',1,'settings(): settings.php']]], - ['settitle',['setTitle',['../classTicket.html#ac765da6fa83b06ea39c0edc9b3e6c6c0',1,'Ticket']]], - ['settlogid',['setTLogId',['../classTicket__Log.html#aca708aae8c7320e11d9e08936ec74dec',1,'Ticket_Log']]], - ['settreplyid',['setTReplyId',['../classTicket__Reply.html#a7b91b481de87eb1515212d62b298cb94',1,'Ticket_Reply']]], - ['settuserid',['setTUserId',['../classTicket__User.html#a0faf8954e86346e7b566870b1a3c0a4a',1,'Ticket_User']]], - ['settype',['setType',['../classQuerycache.html#a0f29af8d4b9fdd8959739727a33acee5',1,'Querycache']]], - ['setuser',['setUser',['../classAssigned.html#af560ca7f201e2f871384a150e8ffd9aa',1,'Assigned\setUser()'],['../classIn__Support__Group.html#af560ca7f201e2f871384a150e8ffd9aa',1,'In_Support_Group\setUser()']]], - ['setuser_5fid',['setUser_Id',['../classTicket__Info.html#aec77405f6e096f2c0493383724f33034',1,'Ticket_Info']]], - ['setuser_5fposition',['setUser_Position',['../classTicket__Info.html#a41cfb7786d3252b2ec7aec42d77add9f',1,'Ticket_Info']]], - ['setview_5fposition',['setView_Position',['../classTicket__Info.html#a58912ec04451ab232d88bd78b6a8c2ea',1,'Ticket_Info']]], - ['sgroup_5flist',['sgroup_list',['../sgroup__list_8php.html#ab3af46486585b0ddced2de27a5d7a000',1,'sgroup_list.php']]], - ['show_5fqueue',['show_queue',['../show__queue_8php.html#a48695b07fef725dbf0b4f261b1fe1547',1,'show_queue.php']]], - ['show_5freply',['show_reply',['../show__reply_8php.html#ad8e51d3b3a4bf996fb07199a08ca9a3e',1,'show_reply.php']]], - ['show_5fsgroup',['show_sgroup',['../show__sgroup_8php.html#a118719426cb30ed43e39c2af24cfea2d',1,'show_sgroup.php']]], - ['show_5fticket',['show_ticket',['../show__ticket_8php.html#a1249d6cae97f6949ce3a7754fa1b7016',1,'show_ticket.php']]], - ['show_5fticket_5finfo',['show_ticket_info',['../show__ticket__info_8php.html#a579a5c89b55189455a8237369a78f0d8',1,'show_ticket_info.php']]], - ['show_5fticket_5flog',['show_ticket_log',['../show__ticket__log_8php.html#ab37298a659581e85338601f2259ead49',1,'show_ticket_log.php']]], - ['show_5fuser',['show_user',['../drupal__module_2ryzommanage_2inc_2show__user_8php.html#ac755ca62882d4caca41c7822793b8812',1,'show_user(): show_user.php'],['../www_2html_2inc_2show__user_8php.html#ac755ca62882d4caca41c7822793b8812',1,'show_user(): show_user.php']]], - ['supportgroup_5fentrynotexists',['supportGroup_EntryNotExists',['../classSupport__Group.html#aa557f337f57a3bb530f1f04df78c0f1e',1,'Support_Group']]], - ['supportgroup_5fexists',['supportGroup_Exists',['../classSupport__Group.html#ac235662693dcc9c2be51e6f1a2c426b6',1,'Support_Group']]], - ['syncdata',['syncdata',['../classSync.html#ad1211cc677b7aafcc4ebcc25f3cacdda',1,'Sync']]], - ['syncing',['syncing',['../syncing_8php.html#a8d4df31796dab54a8d0c9c9ec32cf7f9',1,'syncing.php']]] -]; diff --git a/code/web/docs/ams/html/search/functions_74.html b/code/web/docs/ams/html/search/functions_74.html deleted file mode 100644 index e3c96c339..000000000 --- a/code/web/docs/ams/html/search/functions_74.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_74.js b/code/web/docs/ams/html/search/functions_74.js deleted file mode 100644 index 62c7f6f79..000000000 --- a/code/web/docs/ams/html/search/functions_74.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['ticketexists',['ticketExists',['../classTicket.html#a091d7ec56d4dc4bf980b81e8069b76d0',1,'Ticket']]], - ['tickethasinfo',['TicketHasInfo',['../classTicket__Info.html#a361217eb1d85e13aa534dabfbbd64a86',1,'Ticket_Info']]], - ['time_5felapsed_5fstring',['time_elapsed_string',['../classGui__Elements.html#a04d9bc70e65231a470426f0a94b7583d',1,'Gui_Elements']]] -]; diff --git a/code/web/docs/ams/html/search/functions_75.html b/code/web/docs/ams/html/search/functions_75.html deleted file mode 100644 index 2d61754d1..000000000 --- a/code/web/docs/ams/html/search/functions_75.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_75.js b/code/web/docs/ams/html/search/functions_75.js deleted file mode 100644 index 08d9856d5..000000000 --- a/code/web/docs/ams/html/search/functions_75.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['unassignticket',['unAssignTicket',['../classAssigned.html#a8263a9c223957bb558a2c16d4431ca29',1,'Assigned\unAssignTicket()'],['../classTicket.html#a8263a9c223957bb558a2c16d4431ca29',1,'Ticket\unAssignTicket()']]], - ['update',['update',['../classQuerycache.html#a842e4774e3b3601a005b995c02f7e883',1,'Querycache\update()'],['../classSupport__Group.html#a842e4774e3b3601a005b995c02f7e883',1,'Support_Group\update()'],['../classTicket.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket\update()'],['../classTicket__Category.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Category\update()'],['../classTicket__Content.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Content\update()'],['../classTicket__Log.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Log\update()'],['../classTicket__Reply.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_Reply\update()'],['../classTicket__User.html#a842e4774e3b3601a005b995c02f7e883',1,'Ticket_User\update()']]], - ['updateticketstatus',['updateTicketStatus',['../classTicket.html#a6da2625040e9f06c583e9303082c556f',1,'Ticket']]], - ['updateticketstatusandpriority',['updateTicketStatusAndPriority',['../classTicket.html#a64f08c8987c9eb00d4bfc9ef94e45326',1,'Ticket']]], - ['userexistsinsgroup',['userExistsInSGroup',['../classIn__Support__Group.html#a1a25afa24efc6c01ffd236f735281543',1,'In_Support_Group']]], - ['userlist',['userlist',['../userlist_8php.html#a55709a05f18e09358e2b02531eb859ad',1,'userlist.php']]] -]; diff --git a/code/web/docs/ams/html/search/functions_76.html b/code/web/docs/ams/html/search/functions_76.html deleted file mode 100644 index 2ec05695c..000000000 --- a/code/web/docs/ams/html/search/functions_76.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_76.js b/code/web/docs/ams/html/search/functions_76.js deleted file mode 100644 index 1566125d3..000000000 --- a/code/web/docs/ams/html/search/functions_76.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['validemail',['validEmail',['../classUsers.html#a73637e760498c5cea55074896ec982ac',1,'Users']]] -]; diff --git a/code/web/docs/ams/html/search/functions_77.html b/code/web/docs/ams/html/search/functions_77.html deleted file mode 100644 index 8fe97554f..000000000 --- a/code/web/docs/ams/html/search/functions_77.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/functions_77.js b/code/web/docs/ams/html/search/functions_77.js deleted file mode 100644 index ed7a85370..000000000 --- a/code/web/docs/ams/html/search/functions_77.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['write_5fuser',['write_user',['../add__user_8php.html#a09df49f177966f5b08af71ec43760e0c',1,'add_user.php']]] -]; diff --git a/code/web/docs/ams/html/search/mag_sel.png b/code/web/docs/ams/html/search/mag_sel.png deleted file mode 100644 index 81f6040a2..000000000 Binary files a/code/web/docs/ams/html/search/mag_sel.png and /dev/null differ diff --git a/code/web/docs/ams/html/search/nomatches.html b/code/web/docs/ams/html/search/nomatches.html deleted file mode 100644 index b1ded27e9..000000000 --- a/code/web/docs/ams/html/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
-
No Matches
-
- - diff --git a/code/web/docs/ams/html/search/search.css b/code/web/docs/ams/html/search/search.css deleted file mode 100644 index d18c1da8c..000000000 --- a/code/web/docs/ams/html/search/search.css +++ /dev/null @@ -1,238 +0,0 @@ -/*---------------- Search Box */ - -#FSearchBox { - float: left; -} - -#MSearchBox { - white-space : nowrap; - position: absolute; - float: none; - display: inline; - margin-top: 8px; - right: 0px; - width: 170px; - z-index: 102; - background-color: white; -} - -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; -} - -#MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; -} - -#MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; - border:none; - width:116px; - margin-left:20px; - padding-left:4px; - color: #909090; - outline: none; - font: 9pt Arial, Verdana, sans-serif; -} - -#FSearchBox #MSearchField { - margin-left:15px; -} - -#MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:0px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; -} - -#MSearchClose { - display: none; - position: absolute; - top: 4px; - background : none; - border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; - outline: none; -} - -.left #MSearchClose { - left: 6px; -} - -.right #MSearchClose { - right: 2px; -} - -.MSearchBoxActive #MSearchField { - color: #000000; -} - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #90A5CE; - background-color: #F9FAFC; - z-index: 1; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt Arial, Verdana, sans-serif; - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: monospace; - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: #000000; - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: #000000; - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: #FFFFFF; - background-color: #3D578C; - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - width: 60ex; - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #000; - background-color: #EEF1F7; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; - padding-bottom: 15px; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -body.SRPage { - margin: 5px 2px; -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -span.SRScope { - padding-left: 4px; -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; -} - -.SRResult { - display: none; -} - -DIV.searchresults { - margin-left: 10px; - margin-right: 10px; -} diff --git a/code/web/docs/ams/html/search/search.js b/code/web/docs/ams/html/search/search.js deleted file mode 100644 index 9746f607f..000000000 --- a/code/web/docs/ams/html/search/search.js +++ /dev/null @@ -1,803 +0,0 @@ -// Search script generated by doxygen -// Copyright (C) 2009 by Dimitri van Heesch. - -// The code in this file is loosly based on main.js, part of Natural Docs, -// which is Copyright (C) 2003-2008 Greg Valure -// Natural Docs is licensed under the GPL. - -var indexSectionsWithContent = -{ - 0: "0000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000010101111111001111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 1: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100101111000100110111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 2: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101111111001100111111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 3: "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101111111001111001111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - 4: "0000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -}; - -var indexSectionNames = -{ - 0: "all", - 1: "classes", - 2: "files", - 3: "functions", - 4: "variables" -}; - -function convertToId(search) -{ - var result = ''; - for (i=0;i do a search - { - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() - { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() - { - this.keyTimeout = 0; - - // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - var code = searchValue.toLowerCase().charCodeAt(0); - var hexCode; - if (code<16) - { - hexCode="0"+code.toString(16); - } - else - { - hexCode=code.toString(16); - } - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') - { - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else // nothing available for this search term - { - resultsPage = this.resultsPath + '/nomatches.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - } - - window.frames.MSearchResults.location = resultsPageWithSearch; - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (domPopupSearchResultsWindow.style.display!='block') - { - var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; - if (this.insideFrame) - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - domPopupSearchResultsWindow.style.position = 'relative'; - domPopupSearchResultsWindow.style.display = 'block'; - var width = document.body.clientWidth - 8; // the -8 is for IE :-( - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResults.style.width = width + 'px'; - } - else - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; - var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - } - } - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) - { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { - this.DOMSearchBox().className = 'MSearchBoxActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == this.searchLabel) // clear "Search" term upon entry - { - searchField.value = ''; - this.searchActive = true; - } - } - else if (!isActive) // directly remove the panel - { - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.DOMSearchField().value = this.searchLabel; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') - { - return element; - } - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { - element = element.firstChild; - } - else if (element.nextSibling) - { - element = element.nextSibling; - } - else - { - do - { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; - } - else - { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; - } - } - } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - parent.document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } -} - -function setKeyActions(elem,action) -{ - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); -} - -function setClassAttr(elem,attr) -{ - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); -} - -function createResults() -{ - var results = document.getElementById("SRResults"); - for (var e=0; e - - - - - - - -
-
Loading...
-
- -
Searching...
-
No Matches
- -
- - diff --git a/code/web/docs/ams/html/search/variables_24.js b/code/web/docs/ams/html/search/variables_24.js deleted file mode 100644 index 8e8a493e9..000000000 --- a/code/web/docs/ams/html/search/variables_24.js +++ /dev/null @@ -1,91 +0,0 @@ -var searchData= -[ - ['_24allow_5funknown',['$ALLOW_UNKNOWN',['../drupal__module_2ryzommanage_2config_8php.html#a384355265e4331097d55252f901eddff',1,'$ALLOW_UNKNOWN(): config.php'],['../www_2config_8php.html#a384355265e4331097d55252f901eddff',1,'$ALLOW_UNKNOWN(): config.php']]], - ['_24amountofrows',['$amountOfRows',['../classPagination.html#a6b5c716eec440d8dc5b9754c53c545ec',1,'Pagination']]], - ['_24ams_5fcachedir',['$AMS_CACHEDIR',['../drupal__module_2ryzommanage_2config_8php.html#a92879a931e7a7d0ae6919e70a1529747',1,'$AMS_CACHEDIR(): config.php'],['../www_2config_8php.html#a92879a931e7a7d0ae6919e70a1529747',1,'$AMS_CACHEDIR(): config.php']]], - ['_24ams_5flib',['$AMS_LIB',['../drupal__module_2ryzommanage_2config_8php.html#a75086b9c8602bf3417773bae7ef0cdc8',1,'$AMS_LIB(): config.php'],['../www_2config_8php.html#a75086b9c8602bf3417773bae7ef0cdc8',1,'$AMS_LIB(): config.php']]], - ['_24ams_5ftrans',['$AMS_TRANS',['../drupal__module_2ryzommanage_2config_8php.html#acc96a0076127356b4f9f00f4bdfa9b65',1,'$AMS_TRANS(): config.php'],['../www_2config_8php.html#acc96a0076127356b4f9f00f4bdfa9b65',1,'$AMS_TRANS(): config.php']]], - ['_24author',['$author',['../classTicket.html#ac35b828f7d4064a7c9f849c255468ee3',1,'Ticket\$author()'],['../classTicket__Log.html#ac35b828f7d4064a7c9f849c255468ee3',1,'Ticket_Log\$author()'],['../classTicket__Reply.html#ac35b828f7d4064a7c9f849c255468ee3',1,'Ticket_Reply\$author()']]], - ['_24base_5fwebpath',['$BASE_WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#a2e954ee09fb5f52b9d05caf9dfc3d5ad',1,'$BASE_WEBPATH(): config.php'],['../www_2config_8php.html#a2e954ee09fb5f52b9d05caf9dfc3d5ad',1,'$BASE_WEBPATH(): config.php']]], - ['_24cfg',['$cfg',['../drupal__module_2ryzommanage_2config_8php.html#a32f90fc68bcb40de0bae38354fd0a5fe',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a6b776651fa7defe140c03ed3bd86aa96',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a68f172c430a17022c9f74ae1acd24a00',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1805c74760836f682459a12a17d50589',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a94213b6df61b8a6b62abbe7c956493a4',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a4b555022064138fee1d7edea873c5e9e',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1b49c1f0de42e603443bea2c93276c13',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7c5f3fd8aea7ae8363c6cdc9addd9b62',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7b5bbf5b3c541b46d06deaffeeb76424',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1dca44c652dd54f6879957cf8d4a039c',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a56e7e53dac48b99f62d41d387c8624e6',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#adc2648938b5135f1f2aab1d92d33418e',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1324eeda6b288c0a26d7071db555090c',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a63d97fffb2ff86525bb6cacb74113a73',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7147f422b8150cd3f3c8a68325208607',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a53f42728714b4e86b885c12f7846cd06',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#aa68c438d0b6b38d756d8724bac554f1b',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#ae4ae1095a3543d5607464a88e6330a07',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a7cf20f61de759c233272150b12e866d8',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#aed7bed5da2b934c742cb60d23c06f752',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a1606e0620d5a628b865e0df5c217ce7e',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a41e3a386ec52e0f05bdcad04acecf619',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#ac2c263a1e16ebd69dbf247e8d82c9f63',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a9996bf49f150442cf9d564725d0dea24',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#aa7eb09eb019c344553a61b54606cb650',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a79b711e7ee81b7435a8dba7cb132b34a',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a8578ffa00c2dbcf5d34a97bcff79058b',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a50d80d35dbd37739f844a93a36fce557',1,'$cfg(): config.php'],['../drupal__module_2ryzommanage_2config_8php.html#a55031a1c3c2b9d87e37558811b311ff8',1,'$cfg(): config.php'],['../www_2config_8php.html#a32f90fc68bcb40de0bae38354fd0a5fe',1,'$cfg(): config.php'],['../www_2config_8php.html#a6b776651fa7defe140c03ed3bd86aa96',1,'$cfg(): config.php'],['../www_2config_8php.html#a68f172c430a17022c9f74ae1acd24a00',1,'$cfg(): config.php'],['../www_2config_8php.html#a1805c74760836f682459a12a17d50589',1,'$cfg(): config.php'],['../www_2config_8php.html#a94213b6df61b8a6b62abbe7c956493a4',1,'$cfg(): config.php'],['../www_2config_8php.html#a4b555022064138fee1d7edea873c5e9e',1,'$cfg(): config.php'],['../www_2config_8php.html#a1b49c1f0de42e603443bea2c93276c13',1,'$cfg(): config.php'],['../www_2config_8php.html#a7c5f3fd8aea7ae8363c6cdc9addd9b62',1,'$cfg(): config.php'],['../www_2config_8php.html#a7b5bbf5b3c541b46d06deaffeeb76424',1,'$cfg(): config.php'],['../www_2config_8php.html#a1dca44c652dd54f6879957cf8d4a039c',1,'$cfg(): config.php'],['../www_2config_8php.html#a56e7e53dac48b99f62d41d387c8624e6',1,'$cfg(): config.php'],['../www_2config_8php.html#adc2648938b5135f1f2aab1d92d33418e',1,'$cfg(): config.php'],['../www_2config_8php.html#a1324eeda6b288c0a26d7071db555090c',1,'$cfg(): config.php'],['../www_2config_8php.html#a63d97fffb2ff86525bb6cacb74113a73',1,'$cfg(): config.php'],['../www_2config_8php.html#a7147f422b8150cd3f3c8a68325208607',1,'$cfg(): config.php'],['../www_2config_8php.html#a53f42728714b4e86b885c12f7846cd06',1,'$cfg(): config.php'],['../www_2config_8php.html#aa68c438d0b6b38d756d8724bac554f1b',1,'$cfg(): config.php'],['../www_2config_8php.html#ae4ae1095a3543d5607464a88e6330a07',1,'$cfg(): config.php'],['../www_2config_8php.html#a7cf20f61de759c233272150b12e866d8',1,'$cfg(): config.php'],['../www_2config_8php.html#aed7bed5da2b934c742cb60d23c06f752',1,'$cfg(): config.php'],['../www_2config_8php.html#a1606e0620d5a628b865e0df5c217ce7e',1,'$cfg(): config.php'],['../www_2config_8php.html#a41e3a386ec52e0f05bdcad04acecf619',1,'$cfg(): config.php'],['../www_2config_8php.html#ac2c263a1e16ebd69dbf247e8d82c9f63',1,'$cfg(): config.php'],['../www_2config_8php.html#a9996bf49f150442cf9d564725d0dea24',1,'$cfg(): config.php'],['../www_2config_8php.html#aa7eb09eb019c344553a61b54606cb650',1,'$cfg(): config.php'],['../www_2config_8php.html#a79b711e7ee81b7435a8dba7cb132b34a',1,'$cfg(): config.php'],['../www_2config_8php.html#a8578ffa00c2dbcf5d34a97bcff79058b',1,'$cfg(): config.php'],['../www_2config_8php.html#a50d80d35dbd37739f844a93a36fce557',1,'$cfg(): config.php'],['../www_2config_8php.html#a55031a1c3c2b9d87e37558811b311ff8',1,'$cfg(): config.php'],['../install_8php.html#a449cc4bf6cfd310810993b3ef5251aa5',1,'$cfg(): install.php']]], - ['_24client_5fversion',['$client_version',['../classTicket__Info.html#ac43fbb88dcd0696ad49d5f805f369a61',1,'Ticket_Info']]], - ['_24config',['$config',['../classMyCrypt.html#a49c7011be9c979d9174c52a8b83e5d8e',1,'MyCrypt']]], - ['_24config_5fpath',['$CONFIG_PATH',['../drupal__module_2ryzommanage_2config_8php.html#ae15921e2ebd5885ecf37d31a2cf6ab7a',1,'$CONFIG_PATH(): config.php'],['../www_2config_8php.html#ae15921e2ebd5885ecf37d31a2cf6ab7a',1,'$CONFIG_PATH(): config.php']]], - ['_24connect_5fstate',['$connect_state',['../classTicket__Info.html#a33f4c9badf7f0c5c6728bba0ffacd66e',1,'Ticket_Info']]], - ['_24content',['$content',['../classTicket__Content.html#a57b284fe00866494b33afa80ba729bed',1,'Ticket_Content\$content()'],['../classTicket__Reply.html#a57b284fe00866494b33afa80ba729bed',1,'Ticket_Reply\$content()']]], - ['_24country',['$country',['../classWebUsers.html#a1437a5f6eb157f0eb267a26e0ad4f1ba',1,'WebUsers']]], - ['_24cpu_5fid',['$cpu_id',['../classTicket__Info.html#abea88d0d04f0d548115a0e85eef42e42',1,'Ticket_Info']]], - ['_24cpu_5fmask',['$cpu_mask',['../classTicket__Info.html#a9b0c63551b567630d1aa82f33c328ab0',1,'Ticket_Info']]], - ['_24create_5fring',['$CREATE_RING',['../drupal__module_2ryzommanage_2config_8php.html#a16031d9d4e5065229bc3b00dfd4202fa',1,'$CREATE_RING(): config.php'],['../www_2config_8php.html#a16031d9d4e5065229bc3b00dfd4202fa',1,'$CREATE_RING(): config.php']]], - ['_24current',['$current',['../classPagination.html#a2c4c58e377f6c66ca38c8ea97666fc5e',1,'Pagination']]], - ['_24db',['$db',['../classMail__Handler.html#a1fa3127fc82f96b1436d871ef02be319',1,'Mail_Handler\$db()'],['../classQuerycache.html#a1fa3127fc82f96b1436d871ef02be319',1,'Querycache\$db()']]], - ['_24default_5flanguage',['$DEFAULT_LANGUAGE',['../drupal__module_2ryzommanage_2config_8php.html#a7b56c2ed5a82ceb21fc73cef77beb150',1,'$DEFAULT_LANGUAGE(): config.php'],['../www_2config_8php.html#a7b56c2ed5a82ceb21fc73cef77beb150',1,'$DEFAULT_LANGUAGE(): config.php']]], - ['_24element_5farray',['$element_array',['../classPagination.html#a8fa0f6a15481ba69e7be913eaa15594c',1,'Pagination']]], - ['_24email',['$email',['../classWebUsers.html#ad634f418b20382e2802f80532d76d3cd',1,'WebUsers']]], - ['_24externid',['$externId',['../classTicket__User.html#af51400fe5820e964cb38fcc60b3afd84',1,'Ticket_User']]], - ['_24firstname',['$firstname',['../classWebUsers.html#a55793c72c535d153ffd3f0e43377898b',1,'WebUsers']]], - ['_24force_5fingame',['$FORCE_INGAME',['../drupal__module_2ryzommanage_2config_8php.html#aabd939b29ed900f5fc489f1a957fc6ce',1,'$FORCE_INGAME(): config.php'],['../www_2config_8php.html#aabd939b29ed900f5fc489f1a957fc6ce',1,'$FORCE_INGAME(): config.php']]], - ['_24gender',['$gender',['../classWebUsers.html#a0f1d7cfb9dc6f494b9014885205fc47e',1,'WebUsers']]], - ['_24group',['$group',['../classForwarded.html#ad530a85733b0ec1dc321859fd8faa0dc',1,'Forwarded\$group()'],['../classIn__Support__Group.html#ad530a85733b0ec1dc321859fd8faa0dc',1,'In_Support_Group\$group()']]], - ['_24groupemail',['$groupEmail',['../classSupport__Group.html#ab7ad611af238b28f1f65a32cb152acd1',1,'Support_Group']]], - ['_24hidden',['$hidden',['../classTicket__Reply.html#a4a374564d2858d8ae869a8fb890aad56',1,'Ticket_Reply']]], - ['_24ht',['$ht',['../classTicket__Info.html#a969583a6605ed731abf5849a5202db1e',1,'Ticket_Info']]], - ['_24imageloc_5fwebpath',['$IMAGELOC_WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#a16820074dcd11e4881ca6461377db000',1,'$IMAGELOC_WEBPATH(): config.php'],['../www_2config_8php.html#a16820074dcd11e4881ca6461377db000',1,'$IMAGELOC_WEBPATH(): config.php']]], - ['_24imap_5fmailserver',['$iMAP_MailServer',['../classSupport__Group.html#ad9f2ef2089fe446a9ac49a19a450d636',1,'Support_Group']]], - ['_24imap_5fpassword',['$iMAP_Password',['../classSupport__Group.html#a4166a2fc4b594ee425d7f40870e16455',1,'Support_Group']]], - ['_24imap_5fusername',['$iMAP_Username',['../classSupport__Group.html#a2b549eb4d5773efd741a2990817af0ea',1,'Support_Group']]], - ['_24ingame_5flayout',['$INGAME_LAYOUT',['../drupal__module_2ryzommanage_2config_8php.html#a0deedf69fea8c97030373e15a68c4cc5',1,'$INGAME_LAYOUT(): config.php'],['../www_2config_8php.html#a0deedf69fea8c97030373e15a68c4cc5',1,'$INGAME_LAYOUT(): config.php']]], - ['_24ingame_5fwebpath',['$INGAME_WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#ae9f6aa9c61501bca7b8851925c636d87',1,'$INGAME_WEBPATH(): config.php'],['../www_2config_8php.html#ae9f6aa9c61501bca7b8851925c636d87',1,'$INGAME_WEBPATH(): config.php']]], - ['_24language',['$language',['../classWebUsers.html#a83170d318260a5a2e2a79dccdd371b10',1,'WebUsers']]], - ['_24last',['$last',['../classPagination.html#acf48db609a946d13953d8060363fd1d3',1,'Pagination']]], - ['_24lastname',['$lastname',['../classWebUsers.html#a1d2ddb6354180329b59e8b90ed94dc7f',1,'WebUsers']]], - ['_24local_5faddress',['$local_address',['../classTicket__Info.html#a467dca5673d4c9f737dac972ab05720c',1,'Ticket_Info']]], - ['_24login',['$login',['../classWebUsers.html#afc31993e855f9631572adfedcfe6f34b',1,'WebUsers']]], - ['_24mail_5fdir',['$MAIL_DIR',['../drupal__module_2ryzommanage_2config_8php.html#a9f8fc644554910de5434f78a5f23044e',1,'$MAIL_DIR(): config.php'],['../www_2config_8php.html#a9f8fc644554910de5434f78a5f23044e',1,'$MAIL_DIR(): config.php']]], - ['_24mail_5fhandler',['$mail_handler',['../mail__cron_8php.html#a160a75d95407d877e9c2542e3ddd8c43',1,'mail_cron.php']]], - ['_24mail_5flog_5fpath',['$MAIL_LOG_PATH',['../drupal__module_2ryzommanage_2config_8php.html#afe6e9ed40480c14cb7a119fb84cb557a',1,'$MAIL_LOG_PATH(): config.php'],['../www_2config_8php.html#afe6e9ed40480c14cb7a119fb84cb557a',1,'$MAIL_LOG_PATH(): config.php']]], - ['_24memory',['$memory',['../classTicket__Info.html#a5e20a9a3e12271b3b8d685805590c9e0',1,'Ticket_Info']]], - ['_24name',['$name',['../classSupport__Group.html#ab2fc40d43824ea3e1ce5d86dee0d763b',1,'Support_Group\$name()'],['../classTicket__Category.html#ab2fc40d43824ea3e1ce5d86dee0d763b',1,'Ticket_Category\$name()']]], - ['_24nel3d',['$nel3d',['../classTicket__Info.html#a9b616e5fbafadc93aa4bdf3ccbf31498',1,'Ticket_Info']]], - ['_24os',['$os',['../classTicket__Info.html#a292791d5d8e3ded85cb2e8ec80dea0d9',1,'Ticket_Info']]], - ['_24pagination',['$pagination',['../classTicket__Queue__Handler.html#a388a4a950e936f746d3b9c1b56450ce7',1,'Ticket_Queue_Handler']]], - ['_24params',['$params',['../classTicket__Queue.html#afe68e6fbe7acfbffc0af0c84a1996466',1,'Ticket_Queue']]], - ['_24patch_5fversion',['$patch_version',['../classTicket__Info.html#a55fc0854f90ed36ab9774ba7bd2af53f',1,'Ticket_Info']]], - ['_24pdo',['$PDO',['../classDBLayer.html#acdb2149c05a21fe144fb05ec524a51f3',1,'DBLayer']]], - ['_24permission',['$permission',['../classTicket__User.html#aad04b6f3304fe6a13d5be37f7cd28938',1,'Ticket_User']]], - ['_24priority',['$priority',['../classTicket.html#a2677e505e860db863720ac4e216fd3f2',1,'Ticket']]], - ['_24processor',['$processor',['../classTicket__Info.html#a11fe8ad69d64b596f8b712b0b7e7e1e3',1,'Ticket_Info']]], - ['_24query',['$query',['../classQuerycache.html#af59a5f7cd609e592c41dc3643efd3c98',1,'Querycache\$query()'],['../classTicket__Log.html#af59a5f7cd609e592c41dc3643efd3c98',1,'Ticket_Log\$query()'],['../classTicket__Queue.html#af59a5f7cd609e592c41dc3643efd3c98',1,'Ticket_Queue\$query()']]], - ['_24queue',['$queue',['../classTicket.html#a4a0b48f6ae2fcb248a4f0288c7c344a6',1,'Ticket\$queue()'],['../classTicket__Queue__Handler.html#a4a0b48f6ae2fcb248a4f0288c7c344a6',1,'Ticket_Queue_Handler\$queue()']]], - ['_24receivemail',['$receiveMail',['../classWebUsers.html#a3c74ba660e348124f36d978b137f691d',1,'WebUsers']]], - ['_24server_5ftick',['$server_tick',['../classTicket__Info.html#aeac33ccad750e9ee81a22414db1224ab',1,'Ticket_Info']]], - ['_24sgroupid',['$sGroupId',['../classSupport__Group.html#a23265908fce0f131e03ba1ede7f42647',1,'Support_Group']]], - ['_24shardid',['$shardid',['../classTicket__Info.html#ac73283a0a8308fb7594543e4a049942c',1,'Ticket_Info']]], - ['_24sid',['$SID',['../classQuerycache.html#a69c31f890638fa4930097cf55ae27995',1,'Querycache']]], - ['_24sitebase',['$SITEBASE',['../drupal__module_2ryzommanage_2config_8php.html#a9eb41824afc2b8150c27648859f07357',1,'$SITEBASE(): config.php'],['../www_2config_8php.html#a9eb41824afc2b8150c27648859f07357',1,'$SITEBASE(): config.php']]], - ['_24status',['$status',['../classTicket.html#a58391ea75f2d29d5d708d7050b641c33',1,'Ticket']]], - ['_24support_5fgroup_5fimap_5fcryptkey',['$SUPPORT_GROUP_IMAP_CRYPTKEY',['../drupal__module_2ryzommanage_2config_8php.html#a3ed2ac4433023af3e95f8912f00125ea',1,'$SUPPORT_GROUP_IMAP_CRYPTKEY(): config.php'],['../www_2config_8php.html#a3ed2ac4433023af3e95f8912f00125ea',1,'$SUPPORT_GROUP_IMAP_CRYPTKEY(): config.php']]], - ['_24tag',['$tag',['../classSupport__Group.html#a81d5015d41ed8ec66e9db8cdc5db9555',1,'Support_Group']]], - ['_24tcategoryid',['$tCategoryId',['../classTicket__Category.html#a0111df4559c9f524272d94df0b7f9d6b',1,'Ticket_Category']]], - ['_24tcontentid',['$tContentId',['../classTicket__Content.html#a2249787a24edd706ae7a54609a601d6f',1,'Ticket_Content']]], - ['_24ticket',['$ticket',['../classAssigned.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Assigned\$ticket()'],['../classForwarded.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Forwarded\$ticket()'],['../classTicket__Info.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Ticket_Info\$ticket()'],['../classTicket__Log.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Ticket_Log\$ticket()'],['../classTicket__Reply.html#abf7832c7c53a3be2ca8a8fc305006bb0',1,'Ticket_Reply\$ticket()']]], - ['_24ticket_5fcategory',['$ticket_category',['../classTicket.html#a86e470072892575063c478122fb65184',1,'Ticket']]], - ['_24ticket_5flogging',['$TICKET_LOGGING',['../drupal__module_2ryzommanage_2config_8php.html#aa59491d29009336d89423cccd3adc5de',1,'$TICKET_LOGGING(): config.php'],['../www_2config_8php.html#aa59491d29009336d89423cccd3adc5de',1,'$TICKET_LOGGING(): config.php']]], - ['_24ticket_5fmailing_5fsupport',['$TICKET_MAILING_SUPPORT',['../drupal__module_2ryzommanage_2config_8php.html#a23c3d413e56a57bc04d69627a4ed2b14',1,'$TICKET_MAILING_SUPPORT(): config.php'],['../www_2config_8php.html#a23c3d413e56a57bc04d69627a4ed2b14',1,'$TICKET_MAILING_SUPPORT(): config.php']]], - ['_24tid',['$tId',['../classTicket.html#a3eda2fecc2433b6b6b3b957110e937ca',1,'Ticket']]], - ['_24time_5fformat',['$TIME_FORMAT',['../drupal__module_2ryzommanage_2config_8php.html#a613b2c043c06772e7119587b26eb9989',1,'$TIME_FORMAT(): config.php'],['../www_2config_8php.html#a613b2c043c06772e7119587b26eb9989',1,'$TIME_FORMAT(): config.php']]], - ['_24timestamp',['$timestamp',['../classTicket.html#a2b69de9676dd97c675cd4d9bcceb684c',1,'Ticket\$timestamp()'],['../classTicket__Log.html#a2b69de9676dd97c675cd4d9bcceb684c',1,'Ticket_Log\$timestamp()'],['../classTicket__Reply.html#a2b69de9676dd97c675cd4d9bcceb684c',1,'Ticket_Reply\$timestamp()']]], - ['_24tinfoid',['$tInfoId',['../classTicket__Info.html#a4c2ae13b7827d13b9629e3fc57335f8f',1,'Ticket_Info']]], - ['_24title',['$title',['../classTicket.html#ada57e7bb7c152edad18fe2f166188691',1,'Ticket']]], - ['_24tlogid',['$tLogId',['../classTicket__Log.html#a734657bd8aac85b5a33e03646c17eb65',1,'Ticket_Log']]], - ['_24tos_5furl',['$TOS_URL',['../drupal__module_2ryzommanage_2config_8php.html#aef688ce4c627fa2fbd8037fd2cceef78',1,'$TOS_URL(): config.php'],['../www_2config_8php.html#aef688ce4c627fa2fbd8037fd2cceef78',1,'$TOS_URL(): config.php']]], - ['_24treplyid',['$tReplyId',['../classTicket__Reply.html#a29f22c2783e510d4764a99a648a0cc36',1,'Ticket_Reply']]], - ['_24tuserid',['$tUserId',['../classTicket__User.html#a2f1828693b198682ae3e926e63a4c110',1,'Ticket_User']]], - ['_24type',['$type',['../classQuerycache.html#a9a4a6fba2208984cabb3afacadf33919',1,'Querycache']]], - ['_24uid',['$uId',['../classWebUsers.html#a8f11c60ae8f70a5059b97bc0ea9d0de5',1,'WebUsers']]], - ['_24user',['$user',['../classAssigned.html#a598ca4e71b15a1313ec95f0df1027ca5',1,'Assigned\$user()'],['../classIn__Support__Group.html#a598ca4e71b15a1313ec95f0df1027ca5',1,'In_Support_Group\$user()']]], - ['_24user_5fid',['$user_id',['../classTicket__Info.html#af0fcd925f00973e32f7214859dfb3c6b',1,'Ticket_Info']]], - ['_24user_5fposition',['$user_position',['../classTicket__Info.html#afc9fcd144a71e56898632daf43854aa7',1,'Ticket_Info']]], - ['_24view_5fposition',['$view_position',['../classTicket__Info.html#ae325cbe2a7e27757b90b12d595c4dfe9',1,'Ticket_Info']]], - ['_24webpath',['$WEBPATH',['../drupal__module_2ryzommanage_2config_8php.html#a562d30b98806af1e001a3ff855e8890a',1,'$WEBPATH(): config.php'],['../www_2config_8php.html#a562d30b98806af1e001a3ff855e8890a',1,'$WEBPATH(): config.php']]] -]; diff --git a/code/web/docs/ams/html/sgroup__list_8php.html b/code/web/docs/ams/html/sgroup__list_8php.html deleted file mode 100644 index ec06aedcf..000000000 --- a/code/web/docs/ams/html/sgroup__list_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php File Reference
-
-
- - - - -

-Functions

 sgroup_list ()
 This function is beign used to load info that's needed for the sgroup_list page.
-

Function Documentation

- -
-
- - - - - - - -
sgroup_list ()
-
-
- -

This function is beign used to load info that's needed for the sgroup_list page.

-

check if the person who wants to view this page is a mod/admin, if this is not the case, he will be redirected to an error page. It will return all suppport groups information. Also if the $_GET['delete'] var is set and the user is an admin, he will delete a specific entry.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/show__queue_8php.html b/code/web/docs/ams/html/show__queue_8php.html deleted file mode 100644 index 0ee887073..000000000 --- a/code/web/docs/ams/html/show__queue_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_queue.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_queue.php File Reference
-
-
- - - - -

-Functions

 show_queue ()
 This function is beign used to load info that's needed for the show_queue page.
-

Function Documentation

- -
-
- - - - - - - -
show_queue ()
-
-
- -

This function is beign used to load info that's needed for the show_queue page.

-

check if the person who wants to view this page is a mod/admin, if this is not the case, he will be redirected to an error page. if an action is set (this is done by $_GET['action']) it will try to execute it first, actions are: assign a ticket, unassign a ticket an create a queue. There are a few predefined queues which is the 'all tickets' queue, 'archive' queue, 'todo' queue, .. these are passed by $_GET['get']. if $_GET['get'] = create; then it's a custom made queue, this will call the createQueue function which builds the query that we will later use to get the tickets. The tickets fetched will be returned and used in the template. Now why use POST and GET params here and have a createQueue function twice? Well the first time someone creates a queue the POST variables will be used, however after going to the next page it will use the GET params.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/show__reply_8php.html b/code/web/docs/ams/html/show__reply_8php.html deleted file mode 100644 index 0be3d45f5..000000000 --- a/code/web/docs/ams/html/show__reply_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_reply.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_reply.php File Reference
-
-
- - - - -

-Functions

 show_reply ()
 This function is beign used to load info that's needed for the show_reply page.
-

Function Documentation

- -
-
- - - - - - - -
show_reply ()
-
-
- -

This function is beign used to load info that's needed for the show_reply page.

-

check if the person is allowed to see the reply, if not he'll be redirected to an error page. data regarding to the reply will be returned by this function that will be used by the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/show__sgroup_8php.html b/code/web/docs/ams/html/show__sgroup_8php.html deleted file mode 100644 index fdffe05d6..000000000 --- a/code/web/docs/ams/html/show__sgroup_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_sgroup.php File Reference
-
-
- - - - -

-Functions

 show_sgroup ()
 This function is beign used to load info that's needed for the show_sgroup page.
-

Function Documentation

- -
-
- - - - - - - -
show_sgroup ()
-
-
- -

This function is beign used to load info that's needed for the show_sgroup page.

-

check if the person browsing this page is a mod/admin, if not he'll be redirected to an error page. if the $_GET['delete'] var is set and the user executing is an admin, an entry will be deleted out of the support group. A list of users that are member of the group will be returned, which can be used by the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/show__ticket_8php.html b/code/web/docs/ams/html/show__ticket_8php.html deleted file mode 100644 index 4d8746ec5..000000000 --- a/code/web/docs/ams/html/show__ticket_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket.php File Reference
-
-
- - - - -

-Functions

 show_ticket ()
 This function is beign used to load info that's needed for the show_ticket page.
-

Function Documentation

- -
-
- - - - - - - -
show_ticket ()
-
-
- -

This function is beign used to load info that's needed for the show_ticket page.

-

check if the person browsing this page is a mod/admin or the ticket creator himself, if not he'll be redirected to an error page. if the $_GET['action'] var is set and the user executing is a mod/admin, it will try to execute the action. The actions here are: forwarding of a ticket, assigning a ticket and unassigning a ticket. This function returns a lot of information that will be used by the template to show the ticket. Mods/admins will be able to also see hidden replies to a ticket.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/show__ticket__info_8php.html b/code/web/docs/ams/html/show__ticket__info_8php.html deleted file mode 100644 index 91ee2707a..000000000 --- a/code/web/docs/ams/html/show__ticket__info_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_info.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_info.php File Reference
-
-
- - - - -

-Functions

 show_ticket_info ()
 This function is beign used to load info that's needed for the show_ticket_info page.
-

Function Documentation

- -
-
- - - - - - - -
show_ticket_info ()
-
-
- -

This function is beign used to load info that's needed for the show_ticket_info page.

-

check if the person browsing this page is a mod/admin or the ticket creator himself, if not he'll be redirected to an error page. not all tickets have this page related to it, only tickets created ingame will have additional information. The returned info will be used by the template to show the show_ticket_info page.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/show__ticket__log_8php.html b/code/web/docs/ams/html/show__ticket__log_8php.html deleted file mode 100644 index 603f3dbdc..000000000 --- a/code/web/docs/ams/html/show__ticket__log_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_ticket_log.php File Reference
-
-
- - - - -

-Functions

 show_ticket_log ()
 This function is beign used to load info that's needed for the show_ticket_log page.
-

Function Documentation

- -
-
- - - - - - - -
show_ticket_log ()
-
-
- -

This function is beign used to load info that's needed for the show_ticket_log page.

-

This page shows the logs related to a ticket: who created the ticket, who replied on it, who viewed it, assigned or forwarded it. Only mods/admins are able to browse the log though. The found information is returned so it can be used by the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/support__group_8php.html b/code/web/docs/ams/html/support__group_8php.html deleted file mode 100644 index d2692f073..000000000 --- a/code/web/docs/ams/html/support__group_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php File Reference
-
-
- - - - -

-Data Structures

class  Support_Group
 groups moderators & admins together. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/sync_8php.html b/code/web/docs/ams/html/sync_8php.html deleted file mode 100644 index b7b7907da..000000000 --- a/code/web/docs/ams/html/sync_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sync.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/sync.php File Reference
-
-
- - - - -

-Data Structures

class  Sync
 handler for performing changes when shard is back online after being offline. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/sync__cron_8php.html b/code/web/docs/ams/html/sync__cron_8php.html deleted file mode 100644 index ede9924a7..000000000 --- a/code/web/docs/ams/html/sync__cron_8php.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/cron/sync_cron.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
-
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/cron/sync_cron.php File Reference
-
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/syncing_8php.html b/code/web/docs/ams/html/syncing_8php.html deleted file mode 100644 index 5b4838a79..000000000 --- a/code/web/docs/ams/html/syncing_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/syncing.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/syncing.php File Reference
-
-
- - - - -

-Functions

 syncing ()
 This function is beign used to load info that's needed for the syncing page.
-

Function Documentation

- -
-
- - - - - - - -
syncing ()
-
-
- -

This function is beign used to load info that's needed for the syncing page.

-

this function is used for notifying admins that there are unsynced changes, a brief overview of the non syned changes will be shown. The entries are being loaded here so that they can be passed to the template itself. Only admins can browse this page, others will be redirected to an error page.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/tab_a.png b/code/web/docs/ams/html/tab_a.png deleted file mode 100644 index 2d99ef23f..000000000 Binary files a/code/web/docs/ams/html/tab_a.png and /dev/null differ diff --git a/code/web/docs/ams/html/tab_b.png b/code/web/docs/ams/html/tab_b.png deleted file mode 100644 index b2c3d2be3..000000000 Binary files a/code/web/docs/ams/html/tab_b.png and /dev/null differ diff --git a/code/web/docs/ams/html/tab_h.png b/code/web/docs/ams/html/tab_h.png deleted file mode 100644 index c11f48f19..000000000 Binary files a/code/web/docs/ams/html/tab_h.png and /dev/null differ diff --git a/code/web/docs/ams/html/tab_s.png b/code/web/docs/ams/html/tab_s.png deleted file mode 100644 index 978943ac8..000000000 Binary files a/code/web/docs/ams/html/tab_s.png and /dev/null differ diff --git a/code/web/docs/ams/html/tabs.css b/code/web/docs/ams/html/tabs.css deleted file mode 100644 index 21920562a..000000000 --- a/code/web/docs/ams/html/tabs.css +++ /dev/null @@ -1,59 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} diff --git a/code/web/docs/ams/html/ticket_8php.html b/code/web/docs/ams/html/ticket_8php.html deleted file mode 100644 index 09e6d6329..000000000 --- a/code/web/docs/ams/html/ticket_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket
 class that handles most ticket related functions. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__category_8php.html b/code/web/docs/ams/html/ticket__category_8php.html deleted file mode 100644 index e84fafcf0..000000000 --- a/code/web/docs/ams/html/ticket__category_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_category.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_category.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Category
 Class related to the ticket categories. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__content_8php.html b/code/web/docs/ams/html/ticket__content_8php.html deleted file mode 100644 index 69dbd3954..000000000 --- a/code/web/docs/ams/html/ticket__content_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_content.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_content.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Content
 Class that handles the content of a reply. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__info_8php.html b/code/web/docs/ams/html/ticket__info_8php.html deleted file mode 100644 index e8e1d079f..000000000 --- a/code/web/docs/ams/html/ticket__info_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_info.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Info
 Class that handles additional info sent by ticket creation ingame. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__log_8php.html b/code/web/docs/ams/html/ticket__log_8php.html deleted file mode 100644 index 645bb27d3..000000000 --- a/code/web/docs/ams/html/ticket__log_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_log.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Log
 Class that handles the logging. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__queue_8php.html b/code/web/docs/ams/html/ticket__queue_8php.html deleted file mode 100644 index 6b78f9c7a..000000000 --- a/code/web/docs/ams/html/ticket__queue_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Queue
 Data class that holds a lot of queries that load specific tickets. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__queue__handler_8php.html b/code/web/docs/ams/html/ticket__queue__handler_8php.html deleted file mode 100644 index fa7720f16..000000000 --- a/code/web/docs/ams/html/ticket__queue__handler_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue_handler.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_queue_handler.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Queue_Handler
 returns tickets (queues) that are related in some way. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__reply_8php.html b/code/web/docs/ams/html/ticket__reply_8php.html deleted file mode 100644 index 9594115b5..000000000 --- a/code/web/docs/ams/html/ticket__reply_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_reply.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_reply.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_Reply
 handles functions related to replies on tickets. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/ticket__user_8php.html b/code/web/docs/ams/html/ticket__user_8php.html deleted file mode 100644 index e106212f4..000000000 --- a/code/web/docs/ams/html/ticket__user_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/ticket_user.php File Reference
-
-
- - - - -

-Data Structures

class  Ticket_User
 user entry point in the ticket system. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/todo.html b/code/web/docs/ams/html/todo.html deleted file mode 100644 index e630d4465..000000000 --- a/code/web/docs/ams/html/todo.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -Ryzom Account Management System: Todo List - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - -
-
-
-
Todo List
-
-
-
-
Global Helpers ()
-
for the drupal module it might be possible that drupal_mkdir needs to be used instead of mkdir, also this should be in the install.php instead.
-
Global Mail_Handler (&$structure)
-
take care of the HTML part of incoming emails.
-
Class Querycache
-
make sure that the querycache class is being used by the sync class and also for inserting the queries themselfs into it. Atm this class isn't used yet if I remember correctly
-
Global Ticket ($ticket_id, $newStatus, $newPriority, $author)
-
break this function up into a updateStatus (already exists) and updatePriority function and perhaps write a wrapper function for the combo.
-
Global Ticket_Log ($ticket_id)
-
only use one of the 2 comparable functions in the future and make the other depricated.
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/userlist_8php.html b/code/web/docs/ams/html/userlist_8php.html deleted file mode 100644 index 149a7973c..000000000 --- a/code/web/docs/ams/html/userlist_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/userlist.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/userlist.php File Reference
-
-
- - - - -

-Functions

 userlist ()
 This function is beign used to load info that's needed for the userlist page.
-

Function Documentation

- -
-
- - - - - - - -
userlist ()
-
-
- -

This function is beign used to load info that's needed for the userlist page.

-

this function will return all users by using he pagination class, so that it can be used in the template. Only Mods and Admins can browse this page though.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/users_8php.html b/code/web/docs/ams/html/users_8php.html deleted file mode 100644 index baefc8a11..000000000 --- a/code/web/docs/ams/html/users_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php File Reference
-
-
- - - - -

-Data Structures

class  Users
 handles basic user registration & management functions (shard related). More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/www_2config_8php.html b/code/web/docs/ams/html/www_2config_8php.html deleted file mode 100644 index 2e598c248..000000000 --- a/code/web/docs/ams/html/www_2config_8php.html +++ /dev/null @@ -1,820 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/config.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/config.php File Reference
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Variables

 $cfg ['db']['web']['host'] = 'localhost'
 This file contains all variables needed by other php scripts.
 $cfg ['db']['web']['port'] = '3306'
 $cfg ['db']['web']['name'] = 'ryzom_ams'
 $cfg ['db']['web']['user'] = 'shard'
 $cfg ['db']['web']['pass'] = ''
 $cfg ['db']['lib']['host'] = 'localhost'
 $cfg ['db']['lib']['port'] = '3306'
 $cfg ['db']['lib']['name'] = 'ryzom_ams_lib'
 $cfg ['db']['lib']['user'] = 'shard'
 $cfg ['db']['lib']['pass'] = ''
 $cfg ['db']['shard']['host'] = 'localhost'
 $cfg ['db']['shard']['port'] = '3306'
 $cfg ['db']['shard']['name'] = 'nel'
 $cfg ['db']['shard']['user'] = 'shard'
 $cfg ['db']['shard']['pass'] = ''
 $cfg ['db']['ring']['host'] = 'localhost'
 $cfg ['db']['ring']['port'] = '3306'
 $cfg ['db']['ring']['name'] = 'ring_open'
 $cfg ['db']['ring']['user'] = 'shard'
 $cfg ['db']['ring']['pass'] = ''
 $cfg ['mail']['default_mailserver'] = '{imap.gmail.com:993/imap/ssl}INBOX'
 $cfg ['mail']['default_groupemail'] = 'amsryzom@gmail.com'
 $cfg ['mail']['default_groupname'] = 'Ryzomcore Support'
 $cfg ['mail']['default_username'] = 'amsryzom@gmail.com'
 $cfg ['mail']['default_password'] = 'lol123bol'
 $cfg ['mail']['host'] = "ryzomcore.com"
 $SUPPORT_GROUP_IMAP_CRYPTKEY = "azerty"
 $TICKET_MAILING_SUPPORT = true
 $MAIL_DIR = "/tmp/mail"
 $MAIL_LOG_PATH = "/tmp/mail/cron_mail.log"
 $TOS_URL = "http://createyourtos.com"
 $cfg ['crypt']['key'] = 'Sup3rS3cr3tStuff'
 $cfg ['crypt']['enc_method'] = 'AES-256-CBC'
 $cfg ['crypt']['hash_method'] = "SHA512"
 $ALLOW_UNKNOWN = true
 $CREATE_RING = true
 $AMS_LIB = dirname( dirname( __FILE__ ) ) . '/ams_lib'
 $AMS_TRANS = $AMS_LIB . '/translations'
 $AMS_CACHEDIR = $AMS_LIB . '/cache'
 $SITEBASE = dirname( __FILE__ ) . '/html/'
 $BASE_WEBPATH = 'http://localhost:40917/www/html'
 $IMAGELOC_WEBPATH = 'http://localhost:40917/ams_lib/img'
 $WEBPATH = $BASE_WEBPATH . '/index.php'
 $INGAME_WEBPATH = $BASE_WEBPATH . '/index.php'
 $CONFIG_PATH = dirname( __FILE__ )
 $DEFAULT_LANGUAGE = 'en'
 $TICKET_LOGGING = true
 $TIME_FORMAT = "m-d-Y H:i:s"
 $INGAME_LAYOUT = "basic"
 $FORCE_INGAME = false
-

Variable Documentation

- -
-
- - - - -
$ALLOW_UNKNOWN = true
-
-
- -
-
- -
-
- - - - -
$AMS_CACHEDIR = $AMS_LIB . '/cache'
-
-
- -
-
- -
-
- - - - -
$AMS_LIB = dirname( dirname( __FILE__ ) ) . '/ams_lib'
-
-
- -
-
- -
-
- - - - -
$AMS_TRANS = $AMS_LIB . '/translations'
-
-
- -
-
- -
-
- - - - -
$BASE_WEBPATH = 'http://localhost:40917/www/html'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['host'] = 'localhost'
-
-
- -

This file contains all variables needed by other php scripts.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
- -
-
- - - - -
$cfg['db']['web']['port'] = '3306'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['name'] = 'ryzom_ams'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['user'] = 'shard'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['web']['pass'] = ''
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['host'] = 'localhost'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['port'] = '3306'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['name'] = 'ryzom_ams_lib'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['user'] = 'shard'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['lib']['pass'] = ''
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['host'] = 'localhost'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['port'] = '3306'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['name'] = 'nel'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['user'] = 'shard'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['shard']['pass'] = ''
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['host'] = 'localhost'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['port'] = '3306'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['name'] = 'ring_open'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['user'] = 'shard'
-
-
- -
-
- -
-
- - - - -
$cfg['db']['ring']['pass'] = ''
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_mailserver'] = '{imap.gmail.com:993/imap/ssl}INBOX'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_groupemail'] = 'amsryzom@gmail.com'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_groupname'] = 'Ryzomcore Support'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_username'] = 'amsryzom@gmail.com'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['default_password'] = 'lol123bol'
-
-
- -
-
- -
-
- - - - -
$cfg['mail']['host'] = "ryzomcore.com"
-
-
- -
-
- -
-
- - - - -
$cfg['crypt']['key'] = 'Sup3rS3cr3tStuff'
-
-
- -
-
- -
-
- - - - -
$cfg['crypt']['enc_method'] = 'AES-256-CBC'
-
-
- -
-
- -
-
- - - - -
$cfg['crypt']['hash_method'] = "SHA512"
-
-
- -
-
- -
-
- - - - -
$CONFIG_PATH = dirname( __FILE__ )
-
-
- -
-
- -
-
- - - - -
$CREATE_RING = true
-
-
- -
-
- -
-
- - - - -
$DEFAULT_LANGUAGE = 'en'
-
-
- -
-
- -
-
- - - - -
$FORCE_INGAME = false
-
-
- -
-
- -
-
- - - - -
$IMAGELOC_WEBPATH = 'http://localhost:40917/ams_lib/img'
-
-
- -
-
- -
-
- - - - -
$INGAME_LAYOUT = "basic"
-
-
- -
-
- -
-
- - - - -
$INGAME_WEBPATH = $BASE_WEBPATH . '/index.php'
-
-
- -
-
- -
-
- - - - -
$MAIL_DIR = "/tmp/mail"
-
-
- -
-
- -
-
- - - - -
$MAIL_LOG_PATH = "/tmp/mail/cron_mail.log"
-
-
- -
-
- -
-
- - - - -
$SITEBASE = dirname( __FILE__ ) . '/html/'
-
-
- -
-
- -
-
- - - - -
$SUPPORT_GROUP_IMAP_CRYPTKEY = "azerty"
-
-
- -
-
- -
-
- - - - -
$TICKET_LOGGING = true
-
-
- -
-
- -
-
- - - - -
$TICKET_MAILING_SUPPORT = true
-
-
- -
-
- -
-
- - - - -
$TIME_FORMAT = "m-d-Y H:i:s"
-
-
- -
-
- -
-
- - - - -
$TOS_URL = "http://createyourtos.com"
-
-
- -
-
- -
-
- - - - -
$WEBPATH = $BASE_WEBPATH . '/index.php'
-
-
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/www_2html_2autoload_2webusers_8php.html b/code/web/docs/ams/html/www_2html_2autoload_2webusers_8php.html deleted file mode 100644 index 9bf55da85..000000000 --- a/code/web/docs/ams/html/www_2html_2autoload_2webusers_8php.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/autoload/webusers.php File Reference
-
-
- - - - -

-Data Structures

class  WebUsers
 handles CMS/WWW related functions regarding user management & registration. More...
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/www_2html_2inc_2logout_8php.html b/code/web/docs/ams/html/www_2html_2inc_2logout_8php.html deleted file mode 100644 index d6c860de7..000000000 --- a/code/web/docs/ams/html/www_2html_2inc_2logout_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/logout.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/logout.php File Reference
-
-
- - - - -

-Functions

 logout ()
 This function is beign used to load info that's needed for the logout page.
-

Function Documentation

- -
-
- - - - - - - -
logout ()
-
-
- -

This function is beign used to load info that's needed for the logout page.

-

it will just unset & destroy the session

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/www_2html_2inc_2settings_8php.html b/code/web/docs/ams/html/www_2html_2inc_2settings_8php.html deleted file mode 100644 index d49c641ac..000000000 --- a/code/web/docs/ams/html/www_2html_2inc_2settings_8php.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/settings.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/settings.php File Reference
-
-
- - - - - -

-Functions

 settings ()
 This function is beign used to load info that's needed for the settings page.
 getCountryArray ()
-

Function Documentation

- -
-
- - - - - - - -
getCountryArray ()
-
-
- -
-
- -
-
- - - - - - - -
settings ()
-
-
- -

This function is beign used to load info that's needed for the settings page.

-

check if the person who wants to view this page is a mod/admin or the user to whom te settings belong himself, if this is not the case, he will be redirected to an error page. it will return a lot of information of that user, that's being used for loading the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/docs/ams/html/www_2html_2inc_2show__user_8php.html b/code/web/docs/ams/html/www_2html_2inc_2show__user_8php.html deleted file mode 100644 index 48f54f06d..000000000 --- a/code/web/docs/ams/html/www_2html_2inc_2show__user_8php.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -Ryzom Account Management System: /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_user.php File Reference - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - -
-
Ryzom Account Management System -  1.0 -
- -
-
- - - - - -
-
- -
-
/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/www/html/inc/show_user.php File Reference
-
-
- - - - -

-Functions

 show_user ()
 This function is beign used to load info that's needed for the show_user page.
-

Function Documentation

- -
-
- - - - - - - -
show_user ()
-
-
- -

This function is beign used to load info that's needed for the show_user page.

-

Users can only browse their own user page, while mods/admins can browse all user pages. The current settings of the user being browsed will be loaded, as also their created tickets and this info will be returned so it can be used by the template.

-
Author:
Daan Janssens, mentored by Matthew Lagoe
- -
-
-
- - - - -
- -
- - - - - - - diff --git a/code/web/private_php/ams/autoload/.plugincache.php.swp b/code/web/private_php/ams/autoload/.plugincache.php.swp new file mode 100644 index 000000000..4993b302e Binary files /dev/null and b/code/web/private_php/ams/autoload/.plugincache.php.swp differ diff --git a/code/web/private_php/ams/autoload/assigned.php b/code/web/private_php/ams/autoload/assigned.php index 8de17a9e2..d9d730c8e 100644 --- a/code/web/private_php/ams/autoload/assigned.php +++ b/code/web/private_php/ams/autoload/assigned.php @@ -80,9 +80,9 @@ class Assigned{ $dbl = new DBLayer("lib"); //check if ticket is already assigned - if($user_id == 0 && $dbl->execute(" SELECT * FROM `assigned` WHERE `Ticket` = :ticket_id", array('ticket_id' => $ticket_id) )->rowCount() ){ + if($user_id == 0 && $dbl->select("`assigned`", array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id")->rowCount() ){ return true; - }else if( $dbl->execute(" SELECT * FROM `assigned` WHERE `Ticket` = :ticket_id and `User` = :user_id", array('ticket_id' => $ticket_id, 'user_id' => $user_id) )->rowCount()){ + }else if( $dbl->select("`assigned`", array('ticket_id' => $ticket_id, 'user_id' => $user_id), "`Ticket` = :ticket_id and `User` = :user_id")->rowCount() ){ return true; }else{ return false; @@ -115,9 +115,7 @@ class Assigned{ */ public function create() { $dbl = new DBLayer("lib"); - $query = "INSERT INTO `assigned` (`User`,`Ticket`) VALUES (:user, :ticket)"; - $values = Array('user' => $this->getUser(), 'ticket' => $this->getTicket()); - $dbl->execute($query, $values); + $dbl->insert("`assigned`", Array('User' => $this->getUser(), 'Ticket' => $this->getTicket()); } @@ -127,9 +125,7 @@ class Assigned{ */ public function delete() { $dbl = new DBLayer("lib"); - $query = "DELETE FROM `assigned` WHERE `User` = :user_id and `Ticket` = :ticket_id"; - $values = array('user_id' => $this->getUser() ,'ticket_id' => $this->getTicket()); - $dbl->execute($query, $values); + $dbl->delete("`assigned`", array('user_id' => $this->getUser() ,'ticket_id' => $this->getTicket(), "`User` = :user_id and `Ticket` = :ticket_id"); } /** @@ -139,7 +135,7 @@ class Assigned{ */ public function load($ticket_id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM `assigned` WHERE `Ticket` = :ticket_id", Array('ticket_id' => $ticket_id)); + $statement = $dbl->select("`assigned`", Array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id"); $row = $statement->fetch(); $this->set($row); } @@ -181,4 +177,4 @@ class Assigned{ } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/dblayer.php b/code/web/private_php/ams/autoload/dblayer.php index 58ea7b80e..7c4c5435c 100644 --- a/code/web/private_php/ams/autoload/dblayer.php +++ b/code/web/private_php/ams/autoload/dblayer.php @@ -1,85 +1,274 @@ First create an object of dblayer --> $db = new DBLayer('short database name used in config') + * + * --> Insert --> $db->insert( $tb_name, $data ) + * $tb_name = table name in which we want to insert data + * $data = array of data that needs to be inserted in format('fieldname' => $value) where fieldname must be a field in that table. + * + * --> select --> $db->select( $tb_name, $data, $where ) + * $tb_name = table name which we want to select + * $data = array of data which is then required in WHERE clause in format array('fieldname'=>$value) fieldname must be a field in that table. + * $where = string in format ('fieldname=:fieldname') where :fieldname takes it's value from $data array. + * + * --> update --> $db->update( $tb_name, $data, $where ) + * $tb_name = table name which we want to update + * $data = array of data which contains the filelds that need to be updated with their values in the format('fieldname' => $value,...) where fieldname must be a field in that table. + * $where = string contains the filename with a value at that field in the format ('fieldname = $value') where fieldname must be a field in that table and $value is value respect to that field. + * + * --> delete --> $db->delete( $tb_name, $data, $where ) + * $tb_name = table name where we want to delete. + * $data = array of data which is then required in WHERE clause in format array('fieldname'=> $value) where fieldname must be a field in that table. + * $where = string in format ('fieldname=:fieldname') where :fieldname takes it's value from $data array. + * + * + * @author Daan Janssens, mentored by Matthew Lagoe + * + */ +class DBLayer { - private $PDO; /**< The PDO object, instantiated by the constructor */ + private $PDO; + /** + * The PDO object, instantiated by the constructor + */ /** - * The constructor. - * Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var) - * @param $db String, the name of the databases entry in the $cfg global var. - */ - function __construct($db, $dbn = null) - { - if ($db != "install"){ - + * The constructor. + * Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var) + * + * @param $db String, the name of the databases entry in the $cfg global var. + * @param $dbn String, the name of the databases entry in the $cfg global var if $db referenced to an action(install etc). + */ + function __construct( $db, $dbn = null ) + { + if ( $db != "install" ) { + global $cfg; - $dsn = "mysql:"; - $dsn .= "host=". $cfg['db'][$db]['host'].";"; - $dsn .= "dbname=". $cfg['db'][$db]['name'].";"; - $dsn .= "port=". $cfg['db'][$db]['port'].";"; - - $opt = array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC - ); - $this->PDO = new PDO($dsn,$cfg['db'][$db]['user'],$cfg['db'][$db]['pass'], $opt); - } else { + $dsn = "mysql:"; + $dsn .= "host=" . $cfg['db'][$db]['host'] . ";"; + $dsn .= "dbname=" . $cfg['db'][$db]['name'] . ";"; + $dsn .= "port=" . $cfg['db'][$db]['port'] . ";"; + + $opt = array( + PDO :: ATTR_ERRMODE => PDO :: ERRMODE_EXCEPTION, + PDO :: ATTR_DEFAULT_FETCH_MODE => PDO :: FETCH_ASSOC + ); + $this -> PDO = new PDO( $dsn, $cfg['db'][$db]['user'], $cfg['db'][$db]['pass'], $opt ); + } else { global $cfg; - $dsn = "mysql:"; - $dsn .= "host=". $cfg['db'][$dbn]['host'].";"; - $dsn .= "port=". $cfg['db'][$dbn]['port'].";"; + $dsn = "mysql:"; + $dsn .= "host=" . $cfg['db'][$dbn]['host'] . ";"; + $dsn .= "port=" . $cfg['db'][$dbn]['port'] . ";"; + + $opt = array( + PDO :: ATTR_ERRMODE => PDO :: ERRMODE_EXCEPTION, + PDO :: ATTR_DEFAULT_FETCH_MODE => PDO :: FETCH_ASSOC + ); + $this -> PDO = new PDO( $dsn, $_POST['Username'], $_POST['Password'], $opt ); + } - $opt = array( - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC - ); - $this->PDO = new PDO($dsn,$_POST['Username'],$_POST['Password'], $opt); - } - - } + } /** - * execute a query that doesn't have any parameters - * @param $query the mysql query - * @return returns a PDOStatement object - */ - public function executeWithoutParams($query){ - $statement = $this->PDO->prepare($query); - $statement->execute(); - return $statement; - } + * Execute a query that doesn't have any parameters. + * + * @param $query the mysql query. + * @return returns a PDOStatement object. + */ + public function executeWithoutParams( $query ) { + $statement = $this -> PDO -> prepare( $query ); + $statement -> execute(); + return $statement; + } /** - * execute a query that has parameters - * @param $query the mysql query - * @param $params the parameters that are being used by the query - * @return returns a PDOStatement object - */ - public function execute($query,$params){ - $statement = $this->PDO->prepare($query); - $statement->execute($params); - return $statement; - } + * Execute a query that has parameters. + * + * @param $query the mysql query. + * @param $params the parameters that are being used by the query. + * @return returns a PDOStatement object. + */ + public function execute( $query, $params ) { + $statement = $this -> PDO -> prepare( $query ); + $statement -> execute( $params ); + return $statement; + } /** - * execute a query (an insertion query) that has parameters and return the id of it's insertion - * @param $query the mysql query - * @param $params the parameters that are being used by the query - * @return returns the id of the last inserted element. - */ - public function executeReturnId($query,$params){ - $statement = $this->PDO->prepare($query); - $this->PDO->beginTransaction(); - $statement->execute($params); - $lastId =$this->PDO->lastInsertId(); - $this->PDO->commit(); + * Insert function which returns id of the inserting field. + * + * @param $tb_name table name where we want to insert data. + * @param $data the parameters that are being inserted into table. + * @return returns the id of the last inserted element. + */ + public function executeReturnId( $tb_name, $data ) { + $field_values = ':' . implode( ',:', array_keys( $data ) ); + $field_options = implode( ',', array_keys( $data ) ); + try { + $sth = $this -> PDO -> prepare( "INSERT INTO $tb_name ($field_options) VALUE ($field_values)" ); + foreach ( $data as $key => $value ) + { + $sth -> bindValue( ":$key", $value ); + } + $this -> PDO -> beginTransaction(); + $sth -> execute(); + $lastId = $this -> PDO -> lastInsertId(); + $this -> PDO -> commit(); + } + catch ( Exception $e ) + { + // for rolling back the changes during transaction + $this -> PDO -> rollBack(); + throw new Exception( "error in inseting" ); + } return $lastId; - } + } + + /** + * Select function using prepared statement. + * For selecting particular fields. + * + * @param string $param field to select, can be multiple fields. + * @param string $tb_name Table Name to Select. + * @param array $data array of data to be used in WHERE clause in format('fieldname'=>$value). 'fieldname' must be a field in that table. + * @param string $where where to select. + * @return statement object. + */ + public function selectWithParameter( $param, $tb_name, $data, $where ) + { + try { + $sth = $this -> PDO -> prepare( "SELECT $param FROM $tb_name WHERE $where" ); + $this -> PDO -> beginTransaction(); + $sth -> execute( $data ); + $this -> PDO -> commit(); + } + catch( Exception $e ) + { + $this -> PDO -> rollBack(); + throw new Exception( "error selection" ); + return false; + } + return $sth; + } -} \ No newline at end of file + /** + * Select function using prepared statement. + * For selecting all fields in a table. + * + * @param string $tb_name Table Name to Select. + * @param array $data array of data to be used with WHERE part in format('fieldname'=>$value,...). 'fieldname' must be a field in that table. + * @param string $where where to select in format('fieldname=:fieldname' AND ...). + * @return statement object. + */ + public function select( $tb_name, $data , $where ) + { + try { + $sth = $this -> PDO -> prepare( "SELECT * FROM $tb_name WHERE $where" ); + $this -> PDO -> beginTransaction(); + $sth -> execute( $data ); + $this -> PDO -> commit(); + } + catch( Exception $e ) + { + $this -> PDO -> rollBack(); + throw new Exception( "error selection" ); + return false; + } + return $sth; + } + + /** + * Update function with prepared statement. + * + * @param string $tb_name name of the table on which operation to be performed. + * @param array $data array of data in format('fieldname' => $value,...).Here, only those fields must be stored which needs to be updated. + * @param string $where where part in format ('fieldname'= $value AND ...). 'fieldname' must be a field in that table. + * @throws Exception error in updating. + */ + public function update( $tb_name, $data, $where ) + { + $field_option_values = null; + foreach ( $data as $key => $value ) + { + $field_option_values .= ",$key" . '=:' . $key; + } + $field_option_values = ltrim( $field_option_values, ',' ); + try { + $sth = $this -> PDO -> prepare( "UPDATE $tb_name SET $field_option_values WHERE $where " ); + + foreach ( $data as $key => $value ) + { + $sth -> bindValue( ":$key", $value ); + } + $this -> PDO -> beginTransaction(); + $sth -> execute(); + $this -> PDO -> commit(); + } + catch ( Exception $e ) + { + $this -> PDO -> rollBack(); + throw new Exception( 'error in updating' ); + return false; + } + return true; + } + + /** + * insert function using prepared statements. + * + * @param string $tb_name Name of the table on which operation to be performed. + * @param array $data array of data to insert in format('fieldname' => $value,....). 'fieldname' must be a field in that table. + * @throws error in inserting. + */ + public function insert( $tb_name, $data ) + { + $field_values = ':' . implode( ',:', array_keys( $data ) ); + $field_options = implode( ',', array_keys( $data ) ); + try { + $sth = $this -> PDO -> prepare( "INSERT INTO $tb_name ($field_options) VALUE ($field_values)" ); + foreach ( $data as $key => $value ) + { + + $sth -> bindValue( ":$key", $value ); + } + $this -> PDO -> beginTransaction(); + // execution + $sth -> execute(); + $this -> PDO -> commit(); + + } + catch ( Exception $e ) + { + // for rolling back the changes during transaction + $this -> PDO -> rollBack(); + throw new Exception( "error in inserting" ); + } + } + + /** + * Delete database entery using prepared statement. + * + * @param string $tb_name table name on which operations to be performed. + * @param $data array with values in the format('fieldname'=> $value,...). 'fieldname' must be a field in that table. + * @param string $where condition based on $data array in the format('fieldname=:fieldname' AND ...). + * @throws error in deleting. + */ + public function delete( $tb_name, $data, $where ) + { + try { + $sth = $this -> PDO -> prepare( "DELETE FROM $tb_name WHERE $where" ); + $this -> PDO -> beginTransaction(); + $sth -> execute( $data ); + $this -> PDO -> commit(); + } + catch ( Exception $e ) + { + $this -> PDO -> rollBack(); + throw new Exception( "error in deleting" ); + } + + } + } diff --git a/code/web/private_php/ams/autoload/forwarded.php b/code/web/private_php/ams/autoload/forwarded.php index 54fece58c..ccba764e6 100644 --- a/code/web/private_php/ams/autoload/forwarded.php +++ b/code/web/private_php/ams/autoload/forwarded.php @@ -55,7 +55,7 @@ class Forwarded{ */ public static function isForwarded( $ticket_id) { $dbl = new DBLayer("lib"); - if( $dbl->execute(" SELECT * FROM `forwarded` WHERE `Ticket` = :ticket_id", array('ticket_id' => $ticket_id))->rowCount()){ + if( $dbl->select("`forwarded`", array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id")->rowCount() ){ return true; }else{ return false; @@ -90,9 +90,7 @@ class Forwarded{ */ public function create() { $dbl = new DBLayer("lib"); - $query = "INSERT INTO `forwarded` (`Group`,`Ticket`) VALUES (:group, :ticket)"; - $values = Array('group' => $this->getGroup(), 'ticket' => $this->getTicket()); - $dbl->execute($query, $values); + $dbl->insert("`forwarded`", Array('Group' => $this->getGroup(), 'Ticket' => $this->getTicket())); } @@ -102,9 +100,7 @@ class Forwarded{ */ public function delete() { $dbl = new DBLayer("lib"); - $query = "DELETE FROM `forwarded` WHERE `Group` = :group_id and `Ticket` = :ticket_id"; - $values = array('group_id' => $this->getGroup() ,'ticket_id' => $this->getTicket()); - $dbl->execute($query, $values); + $dbl->delete("`forwarded`", array('group_id' => $this->getGroup() ,'ticket_id' => $this->getTicket(), "`Group` = :group_id and `Ticket` = :ticket_id"); } @@ -115,7 +111,7 @@ class Forwarded{ */ public function load( $ticket_id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM `forwarded` WHERE `Ticket` = :ticket_id", Array('ticket_id' => $ticket_id)); + $statement = $dbl->select("`forwarded`", Array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id"); $row = $statement->fetch(); $this->set($row); } @@ -156,4 +152,4 @@ class Forwarded{ } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/helpers.php b/code/web/private_php/ams/autoload/helpers.php index 8f99bfc93..0ac440800 100644 --- a/code/web/private_php/ams/autoload/helpers.php +++ b/code/web/private_php/ams/autoload/helpers.php @@ -1,229 +1,246 @@ setCompileDir($SITEBASE.'/templates_c/'); - $smarty->setCacheDir($SITEBASE.'/cache/'); - $smarty -> setConfigDir($SITEBASE . '/configs/' ); + $smarty -> setCompileDir( $SITEBASE . '/templates_c/' ); + $smarty -> setCacheDir( $SITEBASE . '/cache/' ); + $smarty -> setConfigDir( $SITEBASE . '/configs/' ); // turn smarty debugging on/off - $smarty -> debugging = false; + $smarty -> debugging = false; // caching must be disabled for multi-language support - $smarty -> caching = false; + $smarty -> caching = false; $smarty -> cache_lifetime = 5; - - //needed by smarty. - helpers :: create_folders (); - global $FORCE_INGAME; - - //if ingame, then use the ingame templates - if ( helpers::check_if_game_client() or $FORCE_INGAME ){ - $smarty -> template_dir = $AMS_LIB . '/ingame_templates/'; + + // needed by smarty. + helpers :: create_folders (); + global $FORCE_INGAME; + + // if ingame, then use the ingame templates + if ( helpers :: check_if_game_client() or $FORCE_INGAME ) { + $smarty -> template_dir = $AMS_LIB . '/ingame_templates/'; $smarty -> setConfigDir( $AMS_LIB . '/configs' ); $variables = parse_ini_file( $AMS_LIB . '/configs/ingame_layout.ini', true ); - foreach ( $variables[$INGAME_LAYOUT] as $key => $value ){ - $smarty -> assign( $key, $value ); - } - }else{ - $smarty -> template_dir = $SITEBASE . '/templates/'; + foreach ( $variables[$INGAME_LAYOUT] as $key => $value ) { + $smarty -> assign( $key, $value ); + } + } else { + $smarty -> template_dir = $SITEBASE . '/templates/'; $smarty -> setConfigDir( $SITEBASE . '/configs' ); - } - - foreach ( $vars as $key => $value ){ - $smarty -> assign( $key, $value ); - } - - //load page specific variables that are language dependent - $variables = Helpers::handle_language(); - foreach ( $variables[$template] as $key => $value ){ - $smarty -> assign( $key, $value ); - } - + } + + foreach ( $vars as $key => $value ) { + $smarty -> assign( $key, $value ); + } + + // load page specific variables that are language dependent + $variables = Helpers :: handle_language(); + if ( $template != 'layout_plugin' ) + { + foreach ( $variables[$template] as $key => $value ) { + $smarty -> assign( $key, $value ); + } + } + // load ams content variables that are language dependent + foreach ( $variables['ams_content'] as $key => $value ) { + $smarty -> assign( $key, $value ); + } + //load ams content variables that are language dependent foreach ( $variables['ams_content'] as $key => $value){ $smarty -> assign( $key, $value); } - //smarty inheritance for loading the matching wrapper layout (with the matching menu bar) - if( isset($vars['permission']) && $vars['permission'] == 3 ){ - $inherited = "extends:layout_admin.tpl|"; - }else if( isset($vars['permission']) && $vars['permission'] == 2){ - $inherited = "extends:layout_mod.tpl|"; - }else if( isset($vars['permission']) && $vars['permission'] == 1){ - $inherited = "extends:layout_user.tpl|"; - }else{ - $inherited =""; - } - - //if $returnHTML is set to true, return the html by fetching the template else display the template. - if($returnHTML == true){ - return $smarty ->fetch($inherited . $template . '.tpl' ); - }else{ - $smarty -> display( $inherited . $template . '.tpl' ); - } - } - - - /** - * creates the folders that are needed for smarty. - * @todo for the drupal module it might be possible that drupal_mkdir needs to be used instead of mkdir, also this should be in the install.php instead. - */ - static public function create_folders(){ - global $AMS_LIB; + // smarty inheritance for loading the matching wrapper layout (with the matching menu bar) + if ( isset( $vars['permission'] ) && $vars['permission'] == 3 ) { + $inherited = "extends:layout_admin.tpl|"; + } else if ( isset( $vars['permission'] ) && $vars['permission'] == 2 ) { + $inherited = "extends:layout_mod.tpl|"; + } else if ( isset( $vars['permission'] ) && $vars['permission'] == 1 ) { + $inherited = "extends:layout_user.tpl|"; + } else { + $inherited = ""; + } + + // if $returnHTML is set to true, return the html by fetching the template else display the template. + if ( $returnHTML == true ) { + return $smarty -> fetch( $inherited . $template . '.tpl' ); + } else { + $smarty -> display( $inherited . $template . '.tpl' ); + } + } + + + /** + * creates the folders that are needed for smarty. + * + * @todo for the drupal module it might be possible that drupal_mkdir needs to be used instead of mkdir, also this should be in the install.php instead. + */ + static public function create_folders() { + global $AMS_LIB; global $SITEBASE; $arr = array( $AMS_LIB . '/ingame_templates/', $AMS_LIB . '/configs', - //$AMS_LIB . '/cache', - $SITEBASE . '/cache/', + // $AMS_LIB . '/cache', + $SITEBASE . '/cache/', $SITEBASE . '/templates/', $SITEBASE . '/templates_c/', $SITEBASE . '/configs' ); - foreach ( $arr as & $value ){ - - if ( !file_exists( $value ) ){ - print($value); - mkdir($value); - } - } - - } - - - /** + foreach ( $arr as &$value ) { + + if ( !file_exists( $value ) ) { + print( $value ); + mkdir( $value ); + } + } + + } + + + /** * check if the http request is sent ingame or not. + * * @return returns true in case it's sent ingame, else false is returned. */ - static public function check_if_game_client() - { - // if HTTP_USER_AGENT is not set then its ryzom core - global $FORCE_INGAME; - if ( ( isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'],"Ryzom") === 0)) || $FORCE_INGAME || ! isset($_SERVER['HTTP_USER_AGENT']) ){ - return true; - }else{ - return false; - } - } - - - /** + static public function check_if_game_client() + { + // if HTTP_USER_AGENT is not set then its ryzom core + global $FORCE_INGAME; + if ( ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], "Ryzom" ) === 0 ) ) || $FORCE_INGAME || ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) { + return true; + } else { + return false; + } + } + + + /** * Handles the language specific aspect. * The language can be changed by setting the $_GET['Language'] & $_GET['setLang'] together. This will also change the language entry of the user in the db. * Cookies are also being used in case the user isn't logged in. + * * @return returns the parsed content of the language .ini file related to the users language setting. */ - static public function handle_language(){ - global $DEFAULT_LANGUAGE; - global $AMS_TRANS; - - //if user wants to change the language - if(isset($_GET['Language']) && isset($_GET['setLang'])){ - //The ingame client sometimes sends full words, derive those! - switch($_GET['Language']){ - - case "English": - $lang = "en"; - break; - - case "French": - $lang = "fr"; - break; - - default: - $lang = $_GET['Language']; - } - //if the file exists en the setLang = true - if( file_exists( $AMS_TRANS . '/' . $lang . '.ini' ) && $_GET['setLang'] == "true"){ - //set a cookie & session var and incase logged in write it to the db! - setcookie( 'Language', $lang , time() + 60*60*24*30 ); - $_SESSION['Language'] = $lang; - if(WebUsers::isLoggedIn()){ - WebUsers::setLanguage($_SESSION['id'],$lang); - } - }else{ - $_SESSION['Language'] = $DEFAULT_LANGUAGE; - } - }else{ - //if the session var is not set yet - if(!isset($_SESSION['Language'])){ - //check if a cookie already exists for it - if ( isset( $_COOKIE['Language'] ) ) { - $_SESSION['Language'] = $_COOKIE['Language']; - //else use the default language - }else{ - $_SESSION['Language'] = $DEFAULT_LANGUAGE; - } - } - } - - if ($_SESSION['Language'] == ""){ - $_SESSION['Language'] = $DEFAULT_LANGUAGE; - } - return parse_ini_file( $AMS_TRANS . '/' . $_SESSION['Language'] . '.ini', true ); - - } - + static public function handle_language() { + global $DEFAULT_LANGUAGE; + global $AMS_TRANS; + + // if user wants to change the language + if ( isset( $_GET['Language'] ) && isset( $_GET['setLang'] ) ) { + // The ingame client sometimes sends full words, derive those! + switch ( $_GET['Language'] ) { + + case "English": + $lang = "en"; + break; + + case "French": + $lang = "fr"; + break; + + default: + $lang = $_GET['Language']; + } + // if the file exists en the setLang = true + if ( file_exists( $AMS_TRANS . '/' . $lang . '.ini' ) && $_GET['setLang'] == "true" ) { + // set a cookie & session var and incase logged in write it to the db! + setcookie( 'Language', $lang , time() + 60 * 60 * 24 * 30 ); + $_SESSION['Language'] = $lang; + if ( WebUsers :: isLoggedIn() ) { + WebUsers :: setLanguage( $_SESSION['id'], $lang ); + } + } else { + $_SESSION['Language'] = $DEFAULT_LANGUAGE; + } + } else { + // if the session var is not set yet + if ( !isset( $_SESSION['Language'] ) ) { + // check if a cookie already exists for it + if ( isset( $_COOKIE['Language'] ) ) { + $_SESSION['Language'] = $_COOKIE['Language']; + // else use the default language + } else { + $_SESSION['Language'] = $DEFAULT_LANGUAGE; + } + } + } - /** - * Time output function for handling the time display. - * @return returns the time in the format specified in the $TIME_FORMAT global variable. - */ - static public function outputTime($time, $str = 1){ - global $TIME_FORMAT; - if($str){ - return date($TIME_FORMAT,strtotime($time)); - }else{ - return date($TIME_FORMAT,$time); - } - } - - /** - * Auto login function for ingame use. - * This function will allow users who access the website ingame, to log in without entering the username and password. It uses the COOKIE entry in the open_ring db. - * it checks if the cookie sent by the http request matches the one in the db. This cookie in the db is changed everytime the user relogs. - * @return returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name. - */ - static public function check_login_ingame(){ - if ( helpers :: check_if_game_client () or $forcelibrender = false ){ - $dbr = new DBLayer("ring"); - if (isset($_GET['UserId']) && isset($_COOKIE['ryzomId'])){ - $id = $_GET['UserId']; - $statement = $dbr->execute("SELECT * FROM ring_users WHERE user_id=:id AND cookie =:cookie", array('id' => $id, 'cookie' => $_COOKIE['ryzomId'])); - if ($statement->rowCount() ){ - $entry = $statement->fetch(); - //print_r($entry); - return array('id' => $entry['user_id'], 'name' => $entry['user_name']); - }else{ - return "FALSE"; - } - }else{ - return "FALSE"; - } - }else{ - return "FALSE"; - } - } +if ( $_SESSION['Language'] == "" ) { + $_SESSION['Language'] = $DEFAULT_LANGUAGE; + } +return parse_ini_file( $AMS_TRANS . '/' . $_SESSION['Language'] . '.ini', true ); + + } + + +/** + * Time output function for handling the time display. + * + * @return returns the time in the format specified in the $TIME_FORMAT global variable. + */ +static public function outputTime( $time, $str = 1 ) { +global $TIME_FORMAT; + if ( $str ) { + return date( $TIME_FORMAT, strtotime( $time ) ); + } else { + return date( $TIME_FORMAT, $time ); + } +} + +/** + * Auto login function for ingame use. + * This function will allow users who access the website ingame, to log in without entering the username and password. It uses the COOKIE entry in the open_ring db. + * it checks if the cookie sent by the http request matches the one in the db. This cookie in the db is changed everytime the user relogs. + * + * @return returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name. + */ +static public function check_login_ingame() { +if ( helpers :: check_if_game_client () or $forcelibrender = false ) { + $dbr = new DBLayer( "ring" ); + if ( isset( $_GET['UserId'] ) && isset( $_COOKIE['ryzomId'] ) ) { + $id = $_GET['UserId']; + + $statement = $dbr -> select( "ring_users", array( 'id' => $id, 'cookie' => $_COOKIE['ryzomId'] ), "user_id=:id AND cookie =:cookie" ); + + // $statement = $dbr->execute("SELECT * FROM ring_users WHERE user_id=:id AND cookie =:cookie", array('id' => $id, 'cookie' => $_COOKIE['ryzomId'])); + + if ( $statement -> rowCount() ) { + $entry = $statement -> fetch(); + // print_r($entry); + return array( 'id' => $entry['user_id'], 'name' => $entry['user_name'] ); + } else { + return "FALSE"; + } + } else { + return "FALSE"; + } + } else { + return "FALSE"; + } +} } diff --git a/code/web/private_php/ams/autoload/in_support_group.php b/code/web/private_php/ams/autoload/in_support_group.php index bf10d3d9a..86c678cd3 100644 --- a/code/web/private_php/ams/autoload/in_support_group.php +++ b/code/web/private_php/ams/autoload/in_support_group.php @@ -21,7 +21,7 @@ class In_Support_Group{ public static function userExistsInSGroup( $user_id, $group_id) { $dbl = new DBLayer("lib"); //check if name is already used - if( $dbl->execute(" SELECT * FROM `in_support_group` WHERE `User` = :user_id and `Group` = :group_id ", array('user_id' => $user_id, 'group_id' => $group_id) )->rowCount() ){ + if( $dbl->select("in_support_group", array('user_id' => $user_id, 'group_id' => $group_id), "`User` = :user_id and `Group` = :group_id")->rowCount() ){ return true; }else{ return false; @@ -54,9 +54,7 @@ class In_Support_Group{ */ public function create() { $dbl = new DBLayer("lib"); - $query = "INSERT INTO `in_support_group` (`User`,`Group`) VALUES (:user, :group)"; - $values = Array('user' => $this->user, 'group' => $this->group); - $dbl->execute($query, $values); + $dbl->insert("`in_support_group`", Array('User' => $this->user, 'Group' => $this->group); } @@ -66,9 +64,7 @@ class In_Support_Group{ */ public function delete() { $dbl = new DBLayer("lib"); - $query = "DELETE FROM `in_support_group` WHERE `User` = :user_id and `Group` = :group_id"; - $values = array('user_id' => $this->getUser() ,'group_id' => $this->getGroup()); - $dbl->execute($query, $values); + $dbl->delete("`in_support_group`", array('user_id' => $this->getUser() ,'group_id' => $this->getGroup(), "`User` = :user_id and `Group` = :group_id"); } /* @@ -118,4 +114,4 @@ class In_Support_Group{ } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/mail_handler.php b/code/web/private_php/ams/autoload/mail_handler.php index dde8d4e02..66cb0f95d 100644 --- a/code/web/private_php/ams/autoload/mail_handler.php +++ b/code/web/private_php/ams/autoload/mail_handler.php @@ -118,12 +118,7 @@ class Mail_Handler{ $id_user = $recipient; $recipient = NULL; } - - $query = "INSERT INTO email (Recipient,Subject,Body,Status,Attempts,Sender,UserId,MessageId,TicketId) VALUES (:recipient, :subject, :body, :status, :attempts, :sender, :id_user, :messageId, :ticketId)"; - $values = array('recipient' => $recipient, 'subject' => $subject, 'body' => $body, 'status' => 'NEW', 'attempts'=> 0, 'sender' => $from,'id_user' => $id_user, 'messageId' => 0, 'ticketId'=> $ticket_id); - $db = new DBLayer("lib"); - $db->execute($query, $values); - + $db->insert("email", array('Recipient' => $recipient, 'Subject' => $subject, 'Body' => $body, 'Status' => 'NEW', 'Attempts'=> 0, 'Sender' => $from,'UserId' => $id_user, 'MessageId' => 0, 'TicketId'=> $ticket_id)); } @@ -173,7 +168,7 @@ class Mail_Handler{ //select all new & failed emails & try to send them //$emails = db_query("select * from email where status = 'NEW' or status = 'FAILED'"); - $statement = $this->db->executeWithoutParams("select * from email where Status = 'NEW' or Status = 'FAILED'"); + $statement = $this->db->select("email",array(null), "Status = 'NEW' or Status = 'FAILED'"); $emails = $statement->fetchAll(); foreach($emails as $email) { diff --git a/code/web/private_php/ams/autoload/plugincache.php b/code/web/private_php/ams/autoload/plugincache.php new file mode 100644 index 000000000..8ff258513 --- /dev/null +++ b/code/web/private_php/ams/autoload/plugincache.php @@ -0,0 +1,277 @@ + setId( $values['Id'] ); + $this -> setPluginName( $values['Name'] ); + $this -> setPluginType( $values['Type'] ); + $this -> setPluginPermission( $values['Permission'] ); + $this -> setPluginStatus( $values['Status'] ); + $this -> setPluginInfo( json_decode( $values['Info'] ) ); + @$this -> setUpdateInfo( json_decode( $values['UpdateInfo'] ) ); + } + + /** + * loads the object's attributes. + */ + + public function load_With_SID() { + $dbl = new DBLayer( "lib" ); + $statement = $dbl -> executeWithoutParams( "SELECT * FROM plugins" ); + $row = $statement -> fetch(); + $this -> set( $row ); + } + + /** + * get plugin id attribute of the object. + * + * @return integer id + */ + public function getId() { + return $this -> Id; + } + + /** + * get plugin permission attribute of the object. + */ + public function getPluginPermission() { + return $this -> plugin_permission; + } + + /** + * get plugin Type attribute of the object. + */ + public function getPluginType() { + return $this -> plugin_version; + } + + /** + * get plugin status attribute of the object. + */ + public function getPluginStatus() { + return $this -> plugin_status; + } + + /** + * get plugin name attribute of the object. + */ + public function getPluginName() { + return $this -> plugin_name; + } + + /** + * get plugin info array attribute of the object. + */ + public function getPluginInfo() { + return $this -> plugin_info; + } + + /** + * set plugin id attribute of the object. + * + * @param $s integer id + */ + public function setId( $s ) { + $this -> Id = $s; + } + + /** + * set plugin permission attribute of the object. + * + * @param $t type of the query, set permission + */ + public function setPluginPermission( $t ) { + $this -> plugin_permission = $t; + } + + /** + * set plugin version attribute of the object. + * + * @param $q string to set plugin version + */ + public function setPluginType( $q ) { + $this -> plugin_version = $q; + } + + /** + * set plugin status attribute of the object. + * + * @param $d status code type int + */ + public function setPluginStatus( $d ) { + $this -> plugin_status = $d; + } + + /** + * set plugin name attribute of the object. + * + * @param $p_n string to set plugin name. + */ + public function setPluginName( $p_n ) { + $this -> plugin_name = $p_n; + } + + /** + * set plugin info attribute array of the object. + * + * @param $p_n array + */ + public function setPluginInfo( $p_n ) { + $this -> plugin_info = $p_n; + } + + /** + * functionalities for plugin updates + */ + + /** + * set update info attribute array of the object. + * + * @param $p_n array + */ + public function setUpdateInfo( $p_n ) { + $this -> update_info = $p_n; + } + + /** + * get plugin info array attribute of the object. + */ + public function getUpdateInfo() { + return $this -> update_info; + } + + /** + * some more plugin function that requires during plugin operations + */ + + /** + * function to remove a non empty directory + * + * @param $dir directory address + * @return boolean + */ + public static function rrmdir( $dir ) { + $result = array_diff( scandir( $dir ), array( '.', '..' ) ); + foreach( $result as $item ) + { + if ( !@unlink( $dir . '/' . $item ) ) + Plugincache :: rrmdir( $dir . '/' . $item ); + } + return rmdir( $dir ); + } + + /** + * function to unzip the zipped files + * + * @param $target_path path to the target zipped file + * @param $destination path to the destination + * @return boolean + */ + public static function zipExtraction( $target_path, $destination ) + { + $zip = new ZipArchive(); + $x = $zip -> open( $target_path ); + if ( $x === true ) { + if ( $zip -> extractTo( $destination ) ) + { + $zip -> close(); + return true; + } + else + { + $zip -> close(); + return false; + } + } + } + + /** + * Returns plugin information with respect to the id. + * + * @param $id plugin id. + * @param $fieldName string plugin field to return + * + * @return info field from the db. + */ + public static function pluginInfoUsingId( $id, $fieldName ) + { + $db = new DBLayer( 'lib' ); + $sth = $db -> selectWithParameter( $fieldName, 'plugins', array( 'id' => $id ), 'Id=:id' ); + $row = $sth -> fetch(); + return $row[$fieldName]; + } + + /** + * Function provides list of active plugins + * + * @return list of active plugins + */ + public static function activePlugins() + { + $db = new DBLayer( 'lib' ); + $sth = $db -> selectWithParameter( 'Id', 'plugins', array( 'status' => 1 ), 'Status=:status' ); + $row = $sth -> fetchAll(); + return $row; + } + + /** + * function to load hooks for the active plugins + * and return the contents get from them. + * + * -->Get the list of active plugins then call the global + * hooks exists in the plugins hook file ($pluginName.php). + * -->Collect the contents from the hooks and associate within + * array with key referenced plugin name. + * -->return the content to use with smarty template loader + * + * @return $content content get from hooks + */ + public static function loadHooks() + { + $content = array(); + $ac_arr = Plugincache :: activePlugins(); + foreach( $ac_arr as $key => $value ) + { + $plugin_path = Plugincache :: pluginInfoUsingId( $value['Id'], 'FileName' ); + $template_path = json_decode( Plugincache :: pluginInfoUsingId( $value['Id'], 'Info' ) ) -> TemplatePath; + $plugin_name = explode( '/', $plugin_path )[4]; + + // calling hooks in the $pluginName.php + include $plugin_path . '/' . $plugin_name . '.php'; + $arr = get_defined_functions(); + + foreach( $arr['user'] as $key => $value ) + { + if ( stristr( $value, $plugin_name ) == true ) + { + $content['hook_info'][$plugin_name] = call_user_func( $value ); + } + } + // path for the template + $content['hook_info'][$plugin_name]['TemplatePath'] = $template_path; + } + + return $content; + } + } diff --git a/code/web/private_php/ams/autoload/querycache.php b/code/web/private_php/ams/autoload/querycache.php index 3da0887c9..6f0c0dca6 100644 --- a/code/web/private_php/ams/autoload/querycache.php +++ b/code/web/private_php/ams/autoload/querycache.php @@ -47,7 +47,7 @@ class Querycache{ */ public function load_With_SID( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ams_querycache WHERE SID=:id", array('id' => $id)); + $statement = $dbl->select("ams_querycache", array('id' => $id), "SID=:id"); $row = $statement->fetch(); $this->set($row); } @@ -58,9 +58,7 @@ class Querycache{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ams_querycache SET type= :t, query = :q, db = :d WHERE SID=:id"; - $values = Array('id' => $this->getSID(), 't' => $this->getType(), 'q' => $this->getQuery(), 'd' => $this->getDb()); - $statement = $dbl->execute($query, $values); + $dbl->update("ams_querycache", Array('type' => $this->getType(), 'query' => $this->getQuery(), 'db' => $this->getDb(), "SID=$this->getSID()" ); } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -127,4 +125,4 @@ class Querycache{ $this->db= $d; } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/rest_api.php b/code/web/private_php/ams/autoload/rest_api.php new file mode 100644 index 000000000..e35586042 --- /dev/null +++ b/code/web/private_php/ams/autoload/rest_api.php @@ -0,0 +1,74 @@ +execute("SELECT * FROM support_group WHERE SGroupId = :id", array('id' => $id)); + $statement = $dbl->select("support_group", array('id' => $id), "SGroupId = :id"); $row = $statement->fetch(); $instanceGroup = new self(); $instanceGroup->set($row); @@ -102,10 +102,10 @@ class Support_Group{ public static function supportGroup_EntryNotExists( $name, $tag) { $dbl = new DBLayer("lib"); //check if name is already used - if( $dbl->execute("SELECT * FROM support_group WHERE Name = :name",array('name' => $name))->rowCount() ){ + if( $dbl->select("support_group", array('name' => $name), "Name = :name")->rowCount() ){ return "NAME_TAKEN"; } - else if( $dbl->execute("SELECT * FROM support_group WHERE Tag = :tag",array('tag' => $tag))->rowCount() ){ + else if( $dbl->select("support_group", array('tag' => $tag), "Tag = :tag")->rowCount() ){ return "TAG_TAKEN"; }else{ return "SUCCESS"; @@ -121,7 +121,7 @@ class Support_Group{ public static function supportGroup_Exists( $id) { $dbl = new DBLayer("lib"); //check if supportgroup id exist - if( $dbl->execute("SELECT * FROM support_group WHERE SGroupId = :id",array('id' => $id ))->rowCount() ){ + if( $dbl->select("support_group", array('id' => $id ), "SGroupId = :id")->rowCount() ){ return true; }else{ return false; @@ -305,9 +305,7 @@ class Support_Group{ */ public function create() { $dbl = new DBLayer("lib"); - $query = "INSERT INTO support_group (Name, Tag, GroupEmail, IMAP_MailServer, IMAP_Username, IMAP_Password) VALUES (:name, :tag, :groupemail, :imap_mailserver, :imap_username, :imap_password)"; - $values = Array('name' => $this->getName(), 'tag' => $this->getTag(), 'groupemail' => $this->getGroupEmail(), 'imap_mailserver' => $this->getIMAP_MailServer(), 'imap_username' => $this->getIMAP_Username(), 'imap_password' => $this->getIMAP_Password()); - $dbl->execute($query, $values); + $dbl->insert("support_group", Array('Name' => $this->getName(), 'Tag' => $this->getTag(), 'GroupEmail' => $this->getGroupEmail(), 'IMAP_MailServer' => $this->getIMAP_MailServer(), 'IMAP_Username' => $this->getIMAP_Username(), 'IMAP_Password' => $this->getIMAP_Password())); } @@ -318,7 +316,7 @@ class Support_Group{ */ public function load_With_SGroupId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM `support_group` WHERE `SGroupId` = :id", array('id' => $id)); + $statement = $dbl->select("`support_group`", array('id' => $id), "`SGroupId` = :id"); $row = $statement->fetch(); $this->set($row); } @@ -329,9 +327,7 @@ class Support_Group{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE `support_group` SET `Name` = :name, `Tag` = :tag, `GroupEmail` = :groupemail, `IMAP_MailServer` = :mailserver, `IMAP_Username` = :username, `IMAP_Password` = :password WHERE `SGroupId` = :id"; - $values = Array('id' => $this->getSGroupId(), 'name' => $this->getName(), 'tag' => $this->getTag(), 'groupemail' => $this->getGroupEmail(), 'mailserver' => $this->getIMAP_MailServer(), 'username' => $this->getIMAP_Username(), 'password' => $this->getIMAP_Password() ); - $statement = $dbl->execute($query, $values); + $dbl->update("`support_group`", Array('Name' => $this->getName(), 'Tag' => $this->getTag(), 'GroupEmail' => $this->getGroupEmail(), 'IMAP_MailServer' => $this->getIMAP_MailServer(), 'IMAP_Username' => $this->getIMAP_Username(), 'IMAP_password' => $this->getIMAP_Password(), "`SGroupId` = $this->getSGroupId()")); } @@ -341,9 +337,7 @@ class Support_Group{ */ public function delete(){ $dbl = new DBLayer("lib"); - $query = "DELETE FROM `support_group` WHERE `SGroupId` = :id"; - $values = Array('id' => $this->getSGroupId()); - $statement = $dbl->execute($query, $values); + $dbl->delete("`support_group`", Array('id' => $this->getSGroupId(), "`SGroupId` = :id")); } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -453,4 +447,4 @@ class Support_Group{ public function setIMAP_Password($p){ $this->iMap_Password = $p; } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/sync.php b/code/web/private_php/ams/autoload/sync.php index e9d4c8748..a79ef8b83 100644 --- a/code/web/private_php/ams/autoload/sync.php +++ b/code/web/private_php/ams/autoload/sync.php @@ -42,34 +42,37 @@ class Sync{ $decode = json_decode($record['query']); $values = array('username' => $decode[0]); //make connection with and put into shard db & delete from the lib - $sth = $db->execute("SELECT UId FROM user WHERE Login= :username;", $values); + $sth=$db->selectWithParameter("UId", "user", $values, "Login= :username" ); $result = $sth->fetchAll(); foreach ($result as $UId) { - $ins_values = array('id' => $UId['UId']); - $db->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id, 'r2', 'OPEN');", $ins_values); - $db->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id , 'ryzom_open', 'OPEN');", $ins_values); + $ins_values = array('UId' => $UId['UId']); + $ins_values['ClientApplication'] = "r2"; + $ins_values['AccessPrivilege'] = "OPEN"; + $db->insert("permission", $ins_values); + $ins_values['ClientApplication'] = 'ryzom_open'; + $db->insert("permission",$ins_values); } break; case 'change_pass': $decode = json_decode($record['query']); - $values = array('user' => $decode[0], 'pass' => $decode[1]); + $values = array('Password' => $decode[1]); //make connection with and put into shard db & delete from the lib - $db->execute("UPDATE user SET Password = :pass WHERE Login = :user",$values); + $db->update("user", $values, "Login = $decode[0]"); break; case 'change_mail': $decode = json_decode($record['query']); - $values = array('user' => $decode[0], 'mail' => $decode[1]); + $values = array('Email' => $decode[1]); //make connection with and put into shard db & delete from the lib - $db->execute("UPDATE user SET Email = :mail WHERE Login = :user",$values); + $db->update("user", $values, "Login = $decode[0]"); break; case 'createUser': $decode = json_decode($record['query']); - $values = array('login' => $decode[0], 'pass' => $decode[1], 'mail' => $decode[2] ); + $values = array('Login' => $decode[0], 'Password' => $decode[1], 'Email' => $decode[2] ); //make connection with and put into shard db & delete from the lib - $db->execute("INSERT INTO user (Login, Password, Email) VALUES (:login, :pass, :mail)",$values); + $db->insert("user", $values); break; } - $dbl->execute("DELETE FROM ams_querycache WHERE SID=:SID",array('SID' => $record['SID'])); + $dbl->delete("ams_querycache", array('SID' => $record['SID']), "SID=:SID"); } if ($display == true) { print('Syncing completed'); diff --git a/code/web/private_php/ams/autoload/ticket.php b/code/web/private_php/ams/autoload/ticket.php index 21e2614d5..51f987e5a 100644 --- a/code/web/private_php/ams/autoload/ticket.php +++ b/code/web/private_php/ams/autoload/ticket.php @@ -27,7 +27,7 @@ class Ticket{ public static function ticketExists($id) { $dbl = new DBLayer("lib"); //check if ticket exists - if( $dbl->execute(" SELECT * FROM `ticket` WHERE `TId` = :ticket_id", array('ticket_id' => $id) )->rowCount() ){ + if( $dbl->select("`ticket`", array('ticket_id' => $id), "`TId` = :ticket_id")->rowCount() ){ return true; }else{ return false; @@ -343,9 +343,7 @@ class Ticket{ */ public function create(){ $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket (Timestamp, Title, Status, Queue, Ticket_Category, Author, Priority) VALUES (now(), :title, :status, :queue, :tcat, :author, :priority)"; - $values = Array('title' => $this->title, 'status' => $this->status, 'queue' => $this->queue, 'tcat' => $this->ticket_category, 'author' => $this->author, 'priority' => $this->priority); - $this->tId = $dbl->executeReturnId($query, $values); ; + $this->tId = $dbl->executeReturnId("ticket", Array('Timestamp'=>now(), 'Title' => $this->title, 'Status' => $this->status, 'Queue' => $this->queue, 'Ticket_Category' => $this->ticket_category, 'Author' => $this->author, 'Priority' => $this->priority)); } @@ -356,7 +354,7 @@ class Ticket{ */ public function load_With_TId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket WHERE TId=:id", array('id' => $id)); + $statement = $dbl->select("ticket", array('id' => $id), "TId=:id"); $row = $statement->fetch(); $this->tId = $row['TId']; $this->timestamp = $row['Timestamp']; @@ -374,9 +372,7 @@ class Ticket{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ticket SET Timestamp = :timestamp, Title = :title, Status = :status, Queue = :queue, Ticket_Category = :tcat, Author = :author, Priority = :priority WHERE TId=:id"; - $values = Array('id' => $this->tId, 'timestamp' => $this->timestamp, 'title' => $this->title, 'status' => $this->status, 'queue' => $this->queue, 'tcat' => $this->ticket_category, 'author' => $this->author, 'priority' => $this->priority); - $statement = $dbl->execute($query, $values); + $dbl->update("ticket", Array('Timestamp' => $this->timestamp, 'Title' => $this->title, 'Status' => $this->status, 'Queue' => $this->queue, 'Ticket_Category' => $this->ticket_category, 'Author' => $this->author, 'Priority' => $this->priority), "TId=$this->tId"); } @@ -575,4 +571,4 @@ class Ticket{ $this->priority = $p; } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/ticket_category.php b/code/web/private_php/ams/autoload/ticket_category.php index 92e603d12..f6941febe 100644 --- a/code/web/private_php/ams/autoload/ticket_category.php +++ b/code/web/private_php/ams/autoload/ticket_category.php @@ -16,10 +16,7 @@ class Ticket_Category{ */ public static function createTicketCategory( $name) { $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket_category (Name) VALUES (:name)"; - $values = Array('name' => $name); - $dbl->execute($query, $values); - + $dbl->insert("ticket_category", Array('Name' => $name)); } @@ -40,7 +37,7 @@ class Ticket_Category{ */ public static function getAllCategories() { $dbl = new DBLayer("lib"); - $statement = $dbl->executeWithoutParams("SELECT * FROM ticket_category"); + $statement = $dbl->select("ticket_category", array(null), "1"); $row = $statement->fetchAll(); $result = Array(); foreach($row as $category){ @@ -70,7 +67,7 @@ class Ticket_Category{ */ public function load_With_TCategoryId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_category WHERE TCategoryId=:id", array('id' => $id)); + $statement = $dbl->select("ticket_category", array('id' => $id), "TCategoryId=:id"); $row = $statement->fetch(); $this->tCategoryId = $row['TCategoryId']; $this->name = $row['Name']; @@ -82,9 +79,7 @@ class Ticket_Category{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ticket_category SET Name = :name WHERE TCategoryId=:id"; - $values = Array('id' => $this->tCategoryId, 'name' => $this->name); - $statement = $dbl->execute($query, $values); + $dbl->update("ticket_category", Array('Name' => $this->name), "TCategoryId = $this->tCategoryId"); } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -126,4 +121,4 @@ class Ticket_Category{ } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/ticket_content.php b/code/web/private_php/ams/autoload/ticket_content.php index 445cad867..8b7787f8e 100644 --- a/code/web/private_php/ams/autoload/ticket_content.php +++ b/code/web/private_php/ams/autoload/ticket_content.php @@ -43,9 +43,7 @@ class Ticket_Content{ */ public function create() { $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket_content (Content) VALUES (:content)"; - $values = Array('content' => $this->content); - $this->tContentId = $dbl->executeReturnId($query, $values); ; + $this->tContentId = $dbl->executeReturnId("ticket_content", Array('Content' => $this->content)); } @@ -56,7 +54,7 @@ class Ticket_Content{ */ public function load_With_TContentId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_content WHERE TContentId=:id", array('id' => $id)); + $statement = $dbl->select("ticket_content", array('id' => $id), "TContentId=:id"); $row = $statement->fetch(); $this->tContentId = $row['TContentId']; $this->content = $row['Content']; @@ -67,9 +65,7 @@ class Ticket_Content{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ticket_content SET Content = :content WHERE TContentId=:id"; - $values = Array('id' => $this->tContentId, 'content' => $this->content); - $statement = $dbl->execute($query, $values); + $dbl->update("ticket_content", Array('Content' => $this->content), "TContentId = $this->tContentId"); } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -110,4 +106,4 @@ class Ticket_Content{ $this->tContentId = $c; } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/ticket_info.php b/code/web/private_php/ams/autoload/ticket_info.php index fc852d093..eb7c8ebc5 100644 --- a/code/web/private_php/ams/autoload/ticket_info.php +++ b/code/web/private_php/ams/autoload/ticket_info.php @@ -52,7 +52,7 @@ class Ticket_Info{ public static function TicketHasInfo($ticket_id) { $dbl = new DBLayer("lib"); //check if ticket is already assigned - if( $dbl->execute(" SELECT * FROM `ticket_info` WHERE `Ticket` = :ticket_id", array('ticket_id' => $ticket_id) )->rowCount() ){ + if( $dbl->select("`ticket_info`", array('ticket_id' => $ticket_id), "`Ticket` = :ticket_id")->rowCount() ){ return true; }else{ return false; @@ -102,7 +102,7 @@ class Ticket_Info{ */ public function load_With_TInfoId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_info WHERE TInfoId=:id", array('id' => $id)); + $statement = $dbl->select("ticket_info", array('id' => $id), "TInfoId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -115,7 +115,7 @@ class Ticket_Info{ */ public function load_With_Ticket( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_info WHERE Ticket=:id", array('id' => $id)); + $statement = $dbl->select("ticket_info", array('id' => $id), "Ticket=:id"); $row = $statement->fetch(); $this->set($row); } @@ -127,12 +127,10 @@ class Ticket_Info{ */ public function create() { $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket_info ( Ticket, ShardId, UserPosition,ViewPosition, ClientVersion, PatchVersion,ServerTick, ConnectState, LocalAddress, Memory, OS, -Processor, CPUID, CpuMask, HT, NeL3D, UserId) VALUES ( :ticket, :shardid, :userposition, :viewposition, :clientversion, :patchversion, :servertick, :connectstate, :localaddress, :memory, :os, :processor, :cpuid, :cpu_mask, :ht, :nel3d, :user_id )"; - $values = Array('ticket' => $this->getTicket(), 'shardid' => $this->getShardId(), 'userposition' => $this->getUser_Position(), 'viewposition' => $this->getView_Position(), 'clientversion' => $this->getClient_Version(), -'patchversion' => $this->getPatch_Version(), 'servertick' => $this->getServer_Tick(), 'connectstate' => $this->getConnect_State(), 'localaddress' => $this->getLocal_Address(), 'memory' => $this->getMemory(), 'os'=> $this->getOS(), 'processor' => $this->getProcessor(), 'cpuid' => $this->getCPUId(), -'cpu_mask' => $this->getCpu_Mask(), 'ht' => $this->getHT(), 'nel3d' => $this->getNel3D(), 'user_id' => $this->getUser_Id()); - $dbl->execute($query, $values); + $values = Array('Ticket' => $this->getTicket(), 'ShardId' => $this->getShardId(), 'UserPosition' => $this->getUser_Position(), 'ViewPosition' => $this->getView_Position(), 'ClientVersion' => $this->getClient_Version(), +'PatchVersion' => $this->getPatch_Version(), 'ServerTick' => $this->getServer_Tick(), 'ConnectState' => $this->getConnect_State(), 'LocalAddress' => $this->getLocal_Address(), 'Memory' => $this->getMemory(), 'OS'=> $this->getOS(), 'Processor' => $this->getProcessor(), 'CPUID' => $this->getCPUId(), +'CpuMask' => $this->getCpu_Mask(), 'HT' => $this->getHT(), 'NeL3D' => $this->getNel3D(), 'UserId' => $this->getUser_Id()); + $dbl->insert("ticket_info",$values); } @@ -411,4 +409,4 @@ Processor, CPUID, CpuMask, HT, NeL3D, UserId) VALUES ( :ticket, :shardid, :user } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/ticket_log.php b/code/web/private_php/ams/autoload/ticket_log.php index 8c7439bc0..f83d4b29e 100644 --- a/code/web/private_php/ams/autoload/ticket_log.php +++ b/code/web/private_php/ams/autoload/ticket_log.php @@ -82,9 +82,8 @@ class Ticket_Log{ global $TICKET_LOGGING; if($TICKET_LOGGING){ $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket_log (Timestamp, Query, Ticket, Author) VALUES (now(), :query, :ticket, :author )"; - $values = Array('ticket' => $ticket_id, 'author' => $author_id, 'query' => json_encode(array($action,$arg))); - $dbl->execute($query, $values); + $values = Array('Timestamp'=>now(), 'Query' => json_encode(array($action,$arg)), 'Ticket' => $ticket_id, 'Author' => $author_id); + $dbl->insert("ticket_log", $values); } } @@ -144,11 +143,11 @@ class Ticket_Log{ /** * loads the object's attributes. * loads the object's attributes by giving a ticket_log entries ID (TLogId). - * @param id the id of the ticket_log entry that should be loaded + * @param $id the id of the ticket_log entry that should be loaded */ public function load_With_TLogId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_log WHERE TLogId=:id", array('id' => $id)); + $dbl->select("ticket_log", array('id' => $id), "TLogId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -159,9 +158,10 @@ class Ticket_Log{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ticket_log SET Timestamp = :timestamp, Query = :query, Author = :author, Ticket = :ticket WHERE TLogId=:id"; - $values = Array('id' => $this->getTLogId(), 'timestamp' => $this->getTimestamp(), 'query' => $this->getQuery(), 'author' => $this->getAuthor(), 'ticket' => $this->getTicket() ); - $statement = $dbl->execute($query, $values); + + $values = Array('timestamp' => $this->getTimestamp(), 'query' => $this->getQuery(), 'author' => $this->getAuthor(), 'ticket' => $this->getTicket() ); + $dbl->update("ticket_log", $values, "TLogId = $this->getTLogId()"); + } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -273,4 +273,4 @@ class Ticket_Log{ } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/ticket_reply.php b/code/web/private_php/ams/autoload/ticket_reply.php index 8e784543d..2675fcfbe 100644 --- a/code/web/private_php/ams/autoload/ticket_reply.php +++ b/code/web/private_php/ams/autoload/ticket_reply.php @@ -123,9 +123,7 @@ class Ticket_Reply{ */ public function create(){ $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket_reply (Ticket, Content, Author, Timestamp, Hidden) VALUES (:ticket, :content, :author, now(), :hidden)"; - $values = Array('ticket' => $this->ticket, 'content' => $this->content, 'author' => $this->author, 'hidden' => $this->hidden); - $this->tReplyId = $dbl->executeReturnId($query, $values); + $this->tReplyId = $dbl->executeReturnId("ticket_reply", Array('Ticket' => $this->ticket, 'Content' => $this->content, 'Author' => $this->author,'Timestamp'=>now(), 'Hidden' => $this->hidden)); } /** @@ -135,7 +133,7 @@ class Ticket_Reply{ */ public function load_With_TReplyId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_reply WHERE TReplyId=:id", array('id' => $id)); + $statement = $dbl->select("ticket_reply", array('id' => $id), "TReplyId=:id"); $row = $statement->fetch(); $this->tReplyId = $row['TReplyId']; $this->ticket = $row['Ticket']; @@ -150,9 +148,7 @@ class Ticket_Reply{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ticket SET Ticket = :ticket, Content = :content, Author = :author, Timestamp = :timestamp, Hidden = :hidden WHERE TReplyId=:id"; - $values = Array('id' => $this->tReplyId, 'timestamp' => $this->timestamp, 'ticket' => $this->ticket, 'content' => $this->content, 'author' => $this->author, 'hidden' => $this->hidden); - $statement = $dbl->execute($query, $values); + $dbl->update("ticket", Array('Ticket' => $this->ticket, 'Content' => $this->content, 'Author' => $this->author, 'Timestamp' => $this->timestamp, 'Hidden' => $this->hidden), "TReplyId=$this->tReplyId, "); } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -249,4 +245,4 @@ class Ticket_Reply{ public function setHidden($h){ $this->hidden = $h; } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/ticket_user.php b/code/web/private_php/ams/autoload/ticket_user.php index 46125e284..0937b48b0 100644 --- a/code/web/private_php/ams/autoload/ticket_user.php +++ b/code/web/private_php/ams/autoload/ticket_user.php @@ -21,10 +21,7 @@ class Ticket_User{ */ public static function createTicketUser( $extern_id, $permission) { $dbl = new DBLayer("lib"); - $query = "INSERT INTO ticket_user (Permission, ExternId) VALUES (:perm, :ext_id)"; - $values = Array('perm' => $permission, 'ext_id' => $extern_id); - $dbl->execute($query, $values); - + $dbl->insert("ticket_user",array('Permission' => $permission, 'ExternId' => $extern_id)); } @@ -73,7 +70,7 @@ class Ticket_User{ */ public static function getModsAndAdmins() { $dbl = new DBLayer("lib"); - $statement = $dbl->executeWithoutParams("SELECT * FROM `ticket_user` WHERE `Permission` > 1"); + $statement = $dbl->select("ticket_user", array(null), "`Permission` > 1" ); $rows = $statement->fetchAll(); $result = Array(); foreach($rows as $user){ @@ -93,7 +90,7 @@ class Ticket_User{ public static function constr_ExternId( $id) { $instance = new self(); $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_user WHERE ExternId=:id", array('id' => $id)); + $statement = $dbl->select("ticket_user" ,array('id'=>$id) ,"ExternId=:id"); $row = $statement->fetch(); $instance->tUserId = $row['TUserId']; $instance->permission = $row['Permission']; @@ -196,7 +193,7 @@ class Ticket_User{ */ public function load_With_TUserId( $id) { $dbl = new DBLayer("lib"); - $statement = $dbl->execute("SELECT * FROM ticket_user WHERE TUserId=:id", array('id' => $id)); + $statement = $dbl->select("ticket_user" ,array('id'=>$id), "TUserId=:id" ); $row = $statement->fetch(); $this->tUserId = $row['TUserId']; $this->permission = $row['Permission']; @@ -209,9 +206,7 @@ class Ticket_User{ */ public function update(){ $dbl = new DBLayer("lib"); - $query = "UPDATE ticket_user SET Permission = :perm, ExternId = :ext_id WHERE TUserId=:id"; - $values = Array('id' => $this->tUserId, 'perm' => $this->permission, 'ext_id' => $this->externId); - $statement = $dbl->execute($query, $values); + $dbl->update("ticket_user" ,array('Permission' => $this->permission, 'ExternId' => $this->externId) ,"TUserId=$this->tUserId"); } ////////////////////////////////////////////Getters//////////////////////////////////////////////////// @@ -266,4 +261,4 @@ class Ticket_User{ } -} \ No newline at end of file +} diff --git a/code/web/private_php/ams/autoload/users.php b/code/web/private_php/ams/autoload/users.php index f83f46576..b398270e4 100644 --- a/code/web/private_php/ams/autoload/users.php +++ b/code/web/private_php/ams/autoload/users.php @@ -289,11 +289,13 @@ class Users{ public static function createUser($values, $user_id){ try { //make connection with and put into shard db - $values['user_id']= $user_id; $dbs = new DBLayer("shard"); - $dbs->execute("INSERT INTO user (Login, Password, Email) VALUES (:name, :pass, :mail)",$values); + $dbs->insert("user", $values); $dbr = new DBLayer("ring"); - $dbr->execute("INSERT INTO ring_users (user_id, user_name, user_type) VALUES (:user_id, :name, 'ut_pioneer')",$values); + $valuesRing['user_id'] =$user_id; + $valuesRing['user_name'] = $values['Login']; + $valuesRing['user_type'] = 'ut_pioneer'; + $dbr->insert("ring_users", $valuesRing); ticket_user::createTicketUser( $user_id, 1); return "ok"; } @@ -301,8 +303,8 @@ class Users{ //oh noooz, the shard is offline! Put in query queue at ams_lib db! try { $dbl = new DBLayer("lib"); - $dbl->execute("INSERT INTO ams_querycache (type, query, db) VALUES (:type, :query, :db)",array("type" => "createUser", - "query" => json_encode(array($values["name"],$values["pass"],$values["mail"])), "db" => "shard")); + $dbl->insert("ams_querycache", array("type" => "createUser", + "query" => json_encode(array($values["Login"],$values["Password"],$values["Email"])), "db" => "shard")); ticket_user::createTicketUser( $user_id , 1 ); return "shardoffline"; }catch (PDOException $e) { @@ -323,21 +325,20 @@ class Users{ try { $values = array('username' => $pvalues[0]); $dbs = new DBLayer("shard"); - $sth = $dbs->execute("SELECT UId FROM user WHERE Login= :username;", $values); + $sth = $dbs->selectWithParameter("UId", "user", $values, "Login= :username"); $result = $sth->fetchAll(); foreach ($result as $UId) { - $ins_values = array('id' => $UId['UId']); - $dbs->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id, 'r2', 'OPEN');", $ins_values); - $dbs->execute("INSERT INTO permission (UId, ClientApplication, AccessPrivilege) VALUES (:id , 'ryzom_open', 'OPEN');", $ins_values); + $ins_values = array('UId' => $UId['UId'], 'clientApplication' => 'r2', 'AccessPrivilege' => 'OPEN'); + $dbs->insert("permission", $ins_values); + $ins_values['clientApplication'] = 'ryzom_open'; + $dbs->insert("permission", $ins_values); } } catch (PDOException $e) { //oh noooz, the shard is offline! Put it in query queue at ams_lib db! $dbl = new DBLayer("lib"); - $dbl->execute("INSERT INTO ams_querycache (type, query, db) VALUES (:type, :query, :db)",array("type" => "createPermissions", - "query" => json_encode(array($pvalues[0])), "db" => "shard")); - - + $dbl->insert("ams_querycache", array("type" => "createPermissions", + "query" => json_encode(array($pvalues[0])), "db" => "shard")); } return true; } @@ -421,19 +422,19 @@ class Users{ */ protected static function setAmsPassword($user, $pass){ - $values = Array('user' => $user, 'pass' => $pass); + $values = Array('Password' => $pass); try { //make connection with and put into shard db $dbs = new DBLayer("shard"); - $dbs->execute("UPDATE user SET Password = :pass WHERE Login = :user ",$values); + $dbs->update("user", $values, "Login = $user"); return "ok"; } catch (PDOException $e) { //oh noooz, the shard is offline! Put in query queue at ams_lib db! try { $dbl = new DBLayer("lib"); - $dbl->execute("INSERT INTO ams_querycache (type, query, db) VALUES (:type, :query, :db)",array("type" => "change_pass", + $dbl->insert("ams_querycache", array("type" => "change_pass", "query" => json_encode(array($values["user"],$values["pass"])), "db" => "shard")); return "shardoffline"; }catch (PDOException $e) { @@ -451,19 +452,19 @@ class Users{ */ protected static function setAmsEmail($user, $mail){ - $values = Array('user' => $user, 'mail' => $mail); + $values = Array('Email' => $mail); try { //make connection with and put into shard db $dbs = new DBLayer("shard"); - $dbs->execute("UPDATE user SET Email = :mail WHERE Login = :user ",$values); + $dbs->update("user", $values, "Login = $user"); return "ok"; } catch (PDOException $e) { //oh noooz, the shard is offline! Put in query queue at ams_lib db! try { $dbl = new DBLayer("lib"); - $dbl->execute("INSERT INTO ams_querycache (type, query, db) VALUES (:type, :query, :db)",array("type" => "change_mail", + $dbl->insert("ams_querycache", array("type" => "change_mail", "query" => json_encode(array($values["user"],$values["mail"])), "db" => "shard")); return "shardoffline"; }catch (PDOException $e) { @@ -472,6 +473,3 @@ class Users{ } } } - - - \ No newline at end of file diff --git a/code/web/private_php/ams/plugins/API_key_management/.info b/code/web/private_php/ams/plugins/API_key_management/.info new file mode 100644 index 000000000..1da25516e --- /dev/null +++ b/code/web/private_php/ams/plugins/API_key_management/.info @@ -0,0 +1,8 @@ +PluginName = API Key Management +Description = Provides public access to the API's by generating access tokens. +Version = 1.0.0 +Type = Manual +TemplatePath = ../../../ams_lib/plugins/API_key_management/templates/index.tpl + + + diff --git a/code/web/private_php/ams/plugins/API_key_management/API_key_management.php b/code/web/private_php/ams/plugins/API_key_management/API_key_management.php new file mode 100644 index 000000000..27613e18b --- /dev/null +++ b/code/web/private_php/ams/plugins/API_key_management/API_key_management.php @@ -0,0 +1,213 @@ + executeWithoutParams( $sql ); + } + +/** + * Hook to store data to database which is sent as post + * method from the forms in this plugin + * It also calls the local hook + */ +function api_key_management_hook_store_db() + { + global $var_set; + global $return_set; + + // if the form been submited move forward + if ( @hook_validate( $_POST['gen_key'] ) ) { + + // local hook to validate the POST variables + hook_variables(); + + // if validation successfull move forward + if ( $return_set['gen_key_validate'] == 'true' && $_GET['plugin_action'] == 'generate_key' ) + { + // this part generated the access token + include 'generate_key.php'; + $var_set['AccessToken'] = generate_key :: randomToken( 56, false, true, false ); + + // database connection + $db = new DBLayer( 'lib' ); + // insert the form data to the database + $db -> insert( 'ams_api_keys', $var_set ); + + // redirect to the the main page with success code + // 1 refers to the successfull addition of key to the database + header( "Location: index.php?page=layout_plugin&&name=API_key_management&&success=1" ); + exit; + } + } + } + +/** + * Global Hook to load the data from db and set it + * into the global array to return it to the template + */ +function api_key_management_hook_load_db() + { + global $var_set; + global $return_set; + + $db = new DBLayer( 'lib' ); + + if ( isset( $_SESSION['user'] ) ) + { + // returns the registered keys + $sth = $db -> select( 'ams_api_keys', array( 'user' => $_SESSION['user'] ), 'User = :user' ); + $row = $sth -> fetchAll(); + $return_set['api_keys'] = $row; + + // fetch the character from the array to compare + $com = array_column( $return_set['api_keys'], 'UserCharacter' ); + + // returns the characters with respect to the user id in the ring_tool->characters + $db = new DBLayer( 'ring' ); + $sth = $db -> selectWithParameter( 'char_name', 'characters' , array(), '1' ); + $row = $sth -> fetch(); + + // loop through the character list and remove the character if already have an api key + $return_set['characters'] = array_diff( $row, $com ); + } + } + +/** + * Global Hook to update or delete the data from db + */ +function api_key_management_hook_update_db() + { + global $var_set; + global $return_set; + + $db = new DBLayer( 'lib' ); + if ( isset( $_GET['delete_id'] ) ) + { + // removes the registered key using get variable which contains the id of the registered key + $db -> delete( 'ams_api_keys', array( 'SNo' => $_GET['delete_id'] ), 'SNo = :SNo' ); + + // redirecting to the API_key_management plugins template with success code + // 2 refers to the succssfull delete condition + header( "Location: index.php?page=layout_plugin&&name=API_key_management&&success=2" ); + exit; + } + } + +/** + * Global Hook to return global variables which contains + * the content to use in the smarty templates + * + * @return $return_set global array returns the template data + */ +function api_key_management_hook_return_global() + { + global $return_set; + return $return_set; + } diff --git a/code/web/private_php/ams/plugins/API_key_management/generate_key.php b/code/web/private_php/ams/plugins/API_key_management/generate_key.php new file mode 100644 index 000000000..1ddfab7ed --- /dev/null +++ b/code/web/private_php/ams/plugins/API_key_management/generate_key.php @@ -0,0 +1,53 @@ + 2, 2 => 8, 3 => 10, 4 => 16, 5 => 10 ); + if ( !is_array( $chars ) ) { + $chars = array_unique( str_split( $chars ) ); + } + if ( $standardChars ) { + $chars = array_merge( $chars, range( 48, 57 ), range( 65, 90 ), range( 97, 122 ) ); + } + if ( $specialChars ) { + $chars = array_merge( $chars, range( 33, 47 ), range( 58, 64 ), range( 91, 96 ), range( 123, 126 ) ); + } + array_walk( $chars, function( &$val ) { + if ( !is_int( $val ) ) { + $val = ord( $val ); } + } + ); + if ( is_int( $len ) ) { + while ( $len ) { + $tmp = ord( openssl_random_pseudo_bytes( 1 ) ); + if ( in_array( $tmp, $chars ) ) { + if ( !$output || !in_array( $output, range( 1, 5 ) ) || $output == 3 || $output == 5 ) { + $out .= ( $output == 3 ) ? $tmp : chr( $tmp ); + } + else { + $based = base_convert( $tmp, 10, $outputMap[$output] ); + $out .= ( ( ( $output == 1 ) ? '00' : ( ( $output == 4 ) ? '0x' : '' ) ) . ( ( $output == 2 ) ? sprintf( '%03d', $based ) : $based ) ); + } + $len--; + } + } + } + return ( empty( $out ) ) ? false : $out; + } + } diff --git a/code/web/private_php/ams/plugins/API_key_management/templates/gen_key.tpl b/code/web/private_php/ams/plugins/API_key_management/templates/gen_key.tpl new file mode 100644 index 000000000..1ab283449 --- /dev/null +++ b/code/web/private_php/ams/plugins/API_key_management/templates/gen_key.tpl @@ -0,0 +1,46 @@ +
+
+
+

API KEY management

+
+ + + +
+
+
+
+

Generate Access Key

+
+ + +
+
+
+
+
+ Generate Key + +
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+ + diff --git a/code/web/private_php/ams/plugins/API_key_management/templates/index.tpl b/code/web/private_php/ams/plugins/API_key_management/templates/index.tpl new file mode 100644 index 000000000..1f6fea336 --- /dev/null +++ b/code/web/private_php/ams/plugins/API_key_management/templates/index.tpl @@ -0,0 +1,133 @@ +{block name=content} + +{if isset($smarty.get.plugin_action) and $smarty.get.plugin_action eq 'generate_key'} +
+
+
+

API KEY management

+
+ + + +
+
+
+
+

Generate Access Key

+
+ + +
+
+
+
+
+ Generate Key + +
+ +
+
+ + +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+ + +
+
+
+ +
+ +
+ +
+
+
+
+
+
+
+
+{else} +
+
+
+

API KEY management

+
+ + + +
+
+ + + {if isset($hook_info.API_key_management['gen_key_validate']) and $hook_info.API_key_management['gen_key_validate'] eq 'false' }

Please enter all the fields

{/if} + {if isset($smarty.get.success) and $smarty.get.success eq '1'}

Key added successfully

{/if} + {if isset($smarty.get.success) and $smarty.get.success eq '2'}

Key deleted successfully

{/if} +
+ +
+
+
+

All the keys you have generated will be shown and you can customize from here.

+ + + + + + + + + + + + + + {foreach from=$hook_info.API_key_management.api_keys item=element} + + + + + + + + {/foreach} + + + +
NameTypeCharacterAccess KeyExpiresActions
{$element.FrName}{$element.UserType}{$element.UserCharacter}{$element.AccessToken}{$element.ExpiryDate} +
+
+
+
+
+ {/if} +{/block} diff --git a/code/web/private_php/ams/plugins/Achievements/.info b/code/web/private_php/ams/plugins/Achievements/.info new file mode 100644 index 000000000..238e98922 --- /dev/null +++ b/code/web/private_php/ams/plugins/Achievements/.info @@ -0,0 +1,8 @@ +PluginName = Achievements +Description = Returns the achivements of a user with respect to the character =. +Version = 1.0.0 +TemplatePath = ../../../ams_lib/plugins/Achievements/templates/index.tpl +Type = Manual + + + diff --git a/code/web/private_php/ams/plugins/Achievements/Achievements.php b/code/web/private_php/ams/plugins/Achievements/Achievements.php new file mode 100644 index 000000000..79c117893 --- /dev/null +++ b/code/web/private_php/ams/plugins/Achievements/Achievements.php @@ -0,0 +1,200 @@ + select( 'ams_api_keys', $data , 'User = :User AND UserCharacter = :UserCharacter' ); + $row = $sth -> fetchAll(); + return $row; + } + +/** + * Local Hook to get database content + * which is called by the global hook + * by passing a parameter + * + * This hook returns the id of the character + * whose achivements we have to get + * + * @param $data array with respective information + * @return $row extracted db content wrt $data + */ +function hook_get_char_id( $data ) + { + // returns the character id with respect to the character name in the ring_tool->characters + $db = new DBLayer( 'ring' ); + $sth = $db -> selectWithParameter( 'char_id', 'characters' , array( 'char_name' => $data ), 'char_name=:char_name' ); + $row = $sth -> fetch(); + return $row['char_id']; + } + +/** + * Local Hook to get database content + * which is called by the global hook + * by passing a parameter + * + * Hook to get the player stats of the character + * + * @param $data array with respective information + * @return $row extracted db content wrt $data + */ +function hook_get_player_stat( $data ) + { + // returns the character id with respect to the character name in the ring_tool->characters + $db = new DBLayer( 'webig' ); + $sth = $db -> select( 'players' , array( 'name' => $data ), 'name=:name' ); + $row = $sth -> fetch(); + return $row; + } + +/** + * Local Hook to set variables which contains + * the content to use during the plugin functionality. + */ +function hook_variable_set() + { + global $return_set; + global $var_set; + if ( isset( $_POST['Character'] ) && !empty( $_POST['Character'] ) ) + { + $var_set['character'] = $_POST['Character']; + + // get char id from ring_open table + if ( $var_set['character'] != 'All Characters' ) + { + $var_set['char_id'] = hook_get_char_id( $var_set['character'] ); + + } + + // get db content for variable set + $row = hook_get_db_content( array( 'User' => $_SESSION['user'], 'UserCharacter' => $var_set['character'] ) ); + + // access key automatically taken from the database wrt user and character + @$var_set['app_key'] = $row['AccessToken']; + + // here you can set the host where this plugin is set + $var_set['host'] = 'localhost'; + + // here we get the stats of the character + $ref_set = hook_get_player_stat( $var_set['character'] ); + + // here we have set items that are required to get the achivements + // these are player stats from webig->players table + @$var_set['items'] = json_encode( array( 'dev_shard' => $ref_set['dev_shard'] , 'name' => $ref_set['name'] , 'cid' => $ref_set['cid'] , 'lang' => 'en' , 'translater_mode' => '', 'last_played_date' => $ref_set['last_login'] ) ); + + // url where we have to make request for achievements + // it sends get parameter search(what to search) and format(in which format data exchange takes place) + $var_set['url'] = 'http://localhost6/?search=achievements&&format=json'; + } + else + { + $return_set['no_char'] = "Please Generate key for a character before requesting for achievements"; + } + } + +/** + * Global Hook to interact with the REST api + * Pass the variables in the REST object to + * make request + * + * variables REST object expects + * url --> on which request is to be made + * appkey --> app key for authentication + * host --> host from which request have been sent + * + * @return $return_set global array returns the template data + */ +function achievements_hook_call_rest() + { + // defined the variables + global $var_set; + global $return_set; + + if ( isset( $_POST['get_data'] ) ) + { + hook_variable_set(); + // here we make the REST connection + $rest_api = new Rest_Api(); + $ach_data = $rest_api -> request( $var_set['url'], $var_set['app_key'], $var_set['host'], $var_set['items'] ); + // here we store the response we get from the server + $return_set['char_achievements'] = $ach_data ; + } + } + +/** + * Global Hook to return global variables which contains + * the content to use in the smarty templates extracted from + * the database + * + * @return $return_set global array returns the template data + */ +function achievements_hook_get_db() + { + global $return_set; + + if ( isset( $_SESSION['user'] ) ) + { + $db = new DBLayer( 'lib' ); + + // getting content for selecting characters + $sth = $db -> selectWithParameter( 'UserCharacter', 'ams_api_keys', array( 'User' => $_SESSION['user'] ) , 'User = :User' ); + $row = $sth -> fetch(); + $return_set['Character'] = $row; + } + } + +/** + * Global Hook to return global variables which contains + * the content to use in the smarty templates + * + * @return $return_set global array returns the template data + */ +function achievements_hook_return_global() + { + global $return_set; + return $return_set; + } diff --git a/code/web/private_php/ams/plugins/Achievements/templates/index.tpl b/code/web/private_php/ams/plugins/Achievements/templates/index.tpl new file mode 100644 index 000000000..e33ac3590 --- /dev/null +++ b/code/web/private_php/ams/plugins/Achievements/templates/index.tpl @@ -0,0 +1,71 @@ +{block name=content} + +{if isset($smarty.get.plugin_action) and $smarty.get.plugin_action eq 'get_achievements'} +
+
+
+

Achievements

+
+ + + +
+
+
+ {if isset($hook_info.Achievements.no_char)}

{$hook_info.Achievements.no_char}

{/if} +
+ {$hook_info.Achievements.char_achievements} +
+
+
+
+{else} +
+
+
+

Achievements

+
+ + + +
+
+
+
+

Select your Character

+
+ + +
+
+
+
+
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+
+
+ + {/if} +{/block} diff --git a/code/web/private_php/ams/translations/en.ini b/code/web/private_php/ams/translations/en.ini index 358fc5d64..f2a21d2ab 100644 --- a/code/web/private_php/ams/translations/en.ini +++ b/code/web/private_php/ams/translations/en.ini @@ -56,6 +56,43 @@ name = "Name" email = "Email" action = "Action" +[plugins] +plugin_title = "Plugin List" +plugin_info = "Here you can see the entire list of plugins . You can easily remove plugins ,activate them and add permissions" +plugins = "Plugins" +plugin_name = "Name" +plugin_version = "Version" +plugin_description = "Description" +plugin_type = "Type" +plugin_permission = "Access
Permission" +plugin_status = "Status" +ip_success = "Plugin added succesfuly." +plugin_actions = "Actions" +dp_success = "Plugin deleted successfuly" +dp_error = "Error in deleting plugin.Please try again later." +ac_success = "Plugin Activated successfuly." +ac_error = "Plugin facing some error in activating. Please try again later." +dc_success = "Plugin de-Activated successfuly." +dc_error = "Plugin facing some error in de-activating. Please try again later." +up_success = "Update added successfully. Go to Updates page for installing updates." +up_install_success = "Update installed successfully." + +[install_plugin] +ip_title = "Install a new Plugin" +ip_message = "For example: name.zip from your local computer" +ip_support = "Upload the plugin archieve to install.
The following file extension is supported: zip." +ip_info_nfound = "Info file not found in the Plugin.Please recheck" +ip_file_nfnd="Please upload a plugin before clicking on install button" + +[plugins_update] +up_title = "Updates for Plugins" +up_info = "Here you can see the entire list of available updates for plugins." +up_description = "Updates Info" +plugin_name = "Name" +plugin_version = "Version" +up_updated_version = "New Version" +up_actions = "Actions" + [show_ticket] t_title = "Ticket" title = "Title" diff --git a/code/web/public_php/ams/autoload/webusers.php b/code/web/public_php/ams/autoload/webusers.php index ec09d9780..c739274c4 100644 --- a/code/web/public_php/ams/autoload/webusers.php +++ b/code/web/public_php/ams/autoload/webusers.php @@ -53,7 +53,7 @@ class WebUsers extends Users{ */ protected function checkUserNameExists($username){ $dbw = new DBLayer("web"); - return $dbw->execute("SELECT * FROM ams_user WHERE Login = :name",array('name' => $username))->rowCount(); + return $dbw->select("ams_user", array('name' => $username), "Login = :name")->rowCount(); } @@ -65,7 +65,7 @@ class WebUsers extends Users{ */ protected function checkEmailExists($email){ $dbw = new DBLayer("web"); - return $dbw->execute("SELECT * FROM ams_user WHERE Email = :email",array('email' => $email))->rowCount(); + return $dbw->select("ams_user" ,array('email' => $email),"Email = :email")->rowCount(); } @@ -78,7 +78,7 @@ class WebUsers extends Users{ public static function checkLoginMatch($value,$password){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:value OR Email=:value", array('value' => $value)); + $statement = $dbw->select("ams_user", array('value' => $value),"Login=:value OR Email=:value"); $row = $statement->fetch(); $salt = substr($row['Password'],0,2); $hashed_input_pass = crypt($password, $salt); @@ -97,7 +97,7 @@ class WebUsers extends Users{ */ public static function getId($username){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:username", array('username' => $username)); + $statement = $dbw->select("ams_user", array('username' => $username), "Login=:username"); $row = $statement->fetch(); return $row['UId']; } @@ -110,7 +110,7 @@ class WebUsers extends Users{ */ public static function getIdFromEmail($email){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE Email=:email", array('email' => $email)); + $statement = $dbw->select("ams_user", array('email' => $email), "Email=:email"); $row = $statement->fetch(); if(!empty($row)){ return $row['UId']; @@ -134,7 +134,7 @@ class WebUsers extends Users{ public function getUsername(){ $dbw = new DBLayer("web"); if(! isset($this->login) || $this->login == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); + $statement = $dbw->select("ams_user", array('id' => $this->uId), "UId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -148,7 +148,7 @@ class WebUsers extends Users{ public function getEmail(){ $dbw = new DBLayer("web"); if(! isset($this->email) || $this->email == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); + $statement = $dbw->select("ams_user", array('id' => $this->uId), "UId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -160,7 +160,7 @@ class WebUsers extends Users{ */ public function getHashedPass(){ $dbw = new DBLayer("web"); - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); + $statement = $dbw->select("ams_user", array('id' => $this->uId), "UId=:id"); $row = $statement->fetch(); return $row['Password']; } @@ -174,7 +174,7 @@ class WebUsers extends Users{ $dbw = new DBLayer("web"); if(! (isset($this->firstname) && isset($this->lastname) && isset($this->gender) && isset($this->country) && isset($this->receiveMail) ) || $this->firstname == "" || $this->lastname == "" || $this->gender == "" || $this->country == "" || $this->receiveMail == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); + $statement = $dbw->select("ams_user", array('id' => $this->uId), "UId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -189,7 +189,7 @@ class WebUsers extends Users{ public function getReceiveMail(){ $dbw = new DBLayer("web"); if(! isset($this->receiveMail) || $this->receiveMail == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); + $statement = $dbw->select("ams_user", array('id' => $this->uId), "UId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -203,7 +203,7 @@ class WebUsers extends Users{ public function getLanguage(){ $dbw = new DBLayer("web"); if(! isset($this->language) || $this->language == ""){ - $statement = $dbw->execute("SELECT * FROM ams_user WHERE UId=:id", array('id' => $this->uId)); + $statement = $dbw->select("ams_user", array('id' => $this->uId), "UId=:id"); $row = $statement->fetch(); $this->set($row); } @@ -234,11 +234,11 @@ class WebUsers extends Users{ $hashpass = crypt($pass, WebUsers::generateSALT()); $reply = WebUsers::setAmsPassword($user, $hashpass); - $values = Array('user' => $user, 'pass' => $hashpass); + $values = Array('pass' => $hashpass); try { //make connection with and put into shard db $dbw = new DBLayer("web"); - $dbw->execute("UPDATE ams_user SET Password = :pass WHERE Login = :user ",$values); + $dbw->update("ams_user", $values,"Login = $user"); } catch (PDOException $e) { //ERROR: the web DB is offline @@ -256,11 +256,11 @@ class WebUsers extends Users{ */ public static function setEmail($user, $mail){ $reply = WebUsers::setAmsEmail($user, $mail); - $values = Array('user' => $user, 'mail' => $mail); + $values = Array('Email' => $mail); try { //make connection with and put into shard db $dbw = new DBLayer("web"); - $dbw->execute("UPDATE ams_user SET Email = :mail WHERE Login = :user ",$values); + $dbw->update("ams_user", $values, "Login = $user"); } catch (PDOException $e) { //ERROR: the web DB is offline @@ -276,11 +276,11 @@ class WebUsers extends Users{ * @param $receivemail the receivemail setting . */ public static function setReceiveMail($user, $receivemail){ - $values = Array('user' => $user, 'receivemail' => $receivemail); + $values = Array('Receivemail' => $receivemail); try { //make connection with and put into shard db $dbw = new DBLayer("web"); - $dbw->execute("UPDATE ams_user SET ReceiveMail = :receivemail WHERE UId = :user ",$values); + $dbw->update("ams_user", $values, "UId = $user" ); } catch (PDOException $e) { //ERROR: the web DB is offline @@ -295,11 +295,11 @@ class WebUsers extends Users{ * @param $language the new language value. */ public static function setLanguage($user, $language){ - $values = Array('user' => $user, 'language' => $language); + $values = Array('Language' => $language); try { //make connection with and put into shard db $dbw = new DBLayer("web"); - $dbw->execute("UPDATE ams_user SET Language = :language WHERE UId = :user ",$values); + $dbw->update("ams_user", $values, "UId = $user"); } catch (PDOException $e) { //ERROR: the web DB is offline @@ -344,11 +344,11 @@ class WebUsers extends Users{ $lang = $DEFAULT_LANGUAGE; } - $values = Array('name' => $name, 'pass' => $pass, 'mail' => $mail, 'lang' => $lang); + $values = Array('Login' => $name, 'Password' => $pass, 'Email' => $mail, 'Language' => $lang); try { $dbw = new DBLayer("web"); - return $dbw->executeReturnId("INSERT INTO ams_user (Login, Password, Email, Language) VALUES (:name, :pass, :mail, :lang)",$values); + return $dbw->executeReturnId("ams_user", $values); } catch (PDOException $e) { //ERROR: the web DB is offline diff --git a/code/web/public_php/ams/func/activate_plugin.php b/code/web/public_php/ams/func/activate_plugin.php new file mode 100644 index 000000000..0a331f284 --- /dev/null +++ b/code/web/public_php/ams/func/activate_plugin.php @@ -0,0 +1,41 @@ + update( "plugins", array( 'Status' => '1' ), "Id = $id" ); + if ( $result ) + { + // if result is successfull it redirects and shows success message + header( "Location: index.php?page=plugins&result=3" ); + exit; + } + else + { + //if result is unsuccessfull it redirects and throws error + header( "Location: index.php?page=plugins&result=4" ); + exit; + } + } + else + { + //if $_GET variable is not set it redirects and shows error + header( "Location: index.php?page=plugins&result=4" ); + exit; + } + } + } diff --git a/code/web/public_php/ams/func/add_user.php b/code/web/public_php/ams/func/add_user.php index fa08ef1a5..a40e22450 100644 --- a/code/web/public_php/ams/func/add_user.php +++ b/code/web/public_php/ams/func/add_user.php @@ -66,15 +66,14 @@ function write_user($newUser){ $hashpass = crypt($newUser["pass"], WebUsers::generateSALT()); $params = array( - 'name' => $newUser["name"], - 'pass' => $hashpass, - 'mail' => $newUser["mail"] + 'Login' => $newUser["name"], + 'Password' => $hashpass, + 'Email' => $newUser["mail"] ); - try{ //make new webuser - $user_id = WebUsers::createWebuser($params['name'], $params['pass'], $params['mail']); - + $user_id = WebUsers::createWebuser($params['Login'], $params['Password'], $params['Email']); + //Create the user on the shard + in case shard is offline put copy of query in query db //returns: ok, shardoffline or liboffline $result = WebUsers::createUser($params, $user_id); diff --git a/code/web/public_php/ams/func/deactivate_plugin.php b/code/web/public_php/ams/func/deactivate_plugin.php new file mode 100644 index 000000000..91986bb50 --- /dev/null +++ b/code/web/public_php/ams/func/deactivate_plugin.php @@ -0,0 +1,43 @@ + update( "plugins", array( 'Status' => '0' ), "Id = $id" ); + if ( $result ) + { + // if result is successfull it redirects and shows success message + header( "Location: index.php?page=plugins&result=5" ); + exit; + } + else + { + // if result is unsuccessfull it redirects and shows success message + header( "Location: index.php?page=plugins&result=6" ); + exit; + + } + } + else + { + //if $_GET variable is not set it redirects and shows error + header( "Location: index.php?page=plugins&result=6" ); + exit; + } + } + } diff --git a/code/web/public_php/ams/func/delete_plugin.php b/code/web/public_php/ams/func/delete_plugin.php new file mode 100644 index 000000000..d85ed34b9 --- /dev/null +++ b/code/web/public_php/ams/func/delete_plugin.php @@ -0,0 +1,51 @@ + selectWithParameter( "FileName", "plugins", array( 'id' => $id ), "Id=:id" ); + $name = $sth -> fetch(); + + if ( is_dir( "$name[FileName]" ) ) + { + // removing plugin directory from the code base + if ( Plugincache::rrmdir( "$name[FileName]" ) ) + { + $db -> delete( 'plugins', array( 'id' => $id ), "Id=:id" ); + + //if result successfull redirect and show success message + header( "Location: index.php?page=plugins&result=2" ); + exit; + + } + else + { + // if result unsuccessfull redirect and show error message + header( "Location: index.php?page=plugins&result=0" ); + exit; + } + } + } + else + { + // if result unsuccessfull redirect and show error message + header( "Location: index.php?page=plugins&result=0" ); + exit; + } + } + } diff --git a/code/web/public_php/ams/func/install_plugin.php b/code/web/public_php/ams/func/install_plugin.php new file mode 100644 index 000000000..1ad7154d2 --- /dev/null +++ b/code/web/public_php/ams/func/install_plugin.php @@ -0,0 +1,329 @@ + Check if the file type is .zip. + * --> Extract it to a temp folder. + * --> Check for the .info file. If not exists throw error + * --> Extract the information from the .info file. + * --> Check for the plugin name already exists or not. + * --> if Plugin Name exists it compare the version of .info and version of plugin stored in db. + * --> if same throw error and if different it checks for UpdateInfo field in .info file. + * --> if UpdateInfo not found throw error. + * --> if UpdateInfo found add the update to the ryzom_ams_lib.updates table. + * --> if it's not an update and plugin with same name already exists throw error. + * --> if plugin with same name not present provide option to install plugin + * + * @author Shubham Meena, mentored by Matthew Lagoe + * + */ + + +/** + * This function is used in installing plugins or adding updates + * for previously installed plugins. + * + */ +function install_plugin() { + + $result = array(); + + // if logged in + if ( WebUsers :: isLoggedIn() ) { + + // path of temporary folder for storing files + $temp_path = "../../ams_lib/temp"; + + // create a temp directory if not exist + // temp folder where we first store all uploaded plugins before install + if ( !file_exists( "$temp_path" ) ) + { + mkdir( $temp_path ); + } + + // checking the server if file is uploaded or not + if ( ( isset( $_FILES["file"] ) ) && ( $_FILES["file"]["size"] > 0 ) ) + { + $fileName = $_FILES["file"]["name"]; //the files name takes from the HTML form + $fileTmpLoc = $_FILES["file"]["tmp_name"]; //file in the PHP tmp folder + $dir = trim( $_FILES["file"]["name"], ".zip" ); + $target_path = "../../ams_lib/plugins/$dir"; //path in which the zip extraction is to be done + $destination = "../../ams_lib/plugins/"; + + // scanning plugin folder if plugin with same name is already exists or not + $x = checkForUpdate( $dir, $destination, $fileTmpLoc, $temp_path ); + if ( $x == '1' ) + { + echo "update found"; + exit(); + } + else if ( $x == '2' ) + { + echo "Plugin already exists with same name ."; + exit(); + } + else if ( $x == '3' ) + { + echo "Update info is not present in the update"; + exit(); + } + + + // checking for the command to install plugin is given or not + if ( !isset( $_POST['install_plugin'] ) ) + { + if ( ( $_FILES["file"]["type"] == 'application/zip' ) ) + { + if ( move_uploaded_file( $fileTmpLoc, $temp_path . "/" . $fileName ) ) { + echo "$fileName upload is complete.
" . "
"; + exit(); + } + else + { + echo "Error in uploading file."; + exit(); + } + } + else + { + echo "Please select a file with .zip extension to upload."; + exit(); + } + } + else + { + + // calling function to unzip archives + if ( zipExtraction( $temp_path . "/" . $fileName , $destination ) ) + { + if ( file_exists( $target_path . "/.info" ) ) + { + $result = readPluginFile( ".info", $target_path ); + + // sending all info to the database + $install_result = array(); + $install_result['FileName'] = $target_path; + $install_result['Name'] = $result['PluginName']; + $install_result['Type'] = $result['Type']; + if ( Ticket_User :: isMod( unserialize( $_SESSION['ticket_user'] ) ) ) + { + $install_result['Permission'] = 'admin'; + } + else + { + $install_result['Permission'] = 'user'; + } + + $install_result['Info'] = json_encode( $result ); + + // connection with the database + $dbr = new DBLayer( "lib" ); + $dbr -> insert( "plugins", $install_result ); + + // if everything is successfull redirecting to the plugin template + header( "Location: index.php?page=plugins&result=1" ); + exit; + } + else + { + // file .info not exists + rmdir( $target_path ); + header( "Location: index.php?page=install_plugin&result=2" ); + exit; + } + + } else + { + // extraction failed + header( "Location: index.php?page=install_plugin&result=0" ); + exit; + } + } + } + else + { + echo "Please Browse for a file before clicking the upload button"; + exit(); + } + } + } + +/** + * function to unzip the zipped files + * + * @param $target_path path to the target zipped file + * @param $destination path to the destination + * @return boolean + */ +function zipExtraction( $target_path, $destination ) + { + $zip = new ZipArchive(); + $x = $zip -> open( $target_path ); + if ( $x === true ) { + if ( $zip -> extractTo( $destination ) ) + { + $zip -> close(); + return true; + } + else + { + $zip -> close(); + return false; + } + } + } + +/** + * function to read text files and extract + * the information into an array + * + * ----------------------------------------------------------- + * format: + * ----------------------------------------------------------- + * PluginName = Name of the plugin + * Version = version of the plugin + * Type = type of the plugin + * TemplatePath = path to the template + * Description = Description of the plugin ,it's functionality + * ----------------------------------------------------------- + * + * reads only files with name .info + * + * @param $fileName file to read + * @param $target_path path to the folder containing .info file + * @return array containing above information in array(value => key) + */ +function readPluginFile( $fileName, $target_path ) + { + $file_handle = fopen( $target_path . "/" . $fileName, "r" ); + $result = array(); + while ( !feof( $file_handle ) ) { + $line_of_text = fgets( $file_handle ); + $parts = array_map( 'trim', explode( '=', $line_of_text, 2 ) ); + @$result[$parts[0]] = $parts[1]; + } + fclose( $file_handle ); + return $result; + } + +/** + * function to check for updates or + * if the same plugin already exists + * also, if the update founds ,check for the UpdateInfo in the .info file. + * Update is saved in the temp directory with pluginName_version.zip + * + * @param $fileName file which is uploaded in .zip extension + * @param $findPath where we have to look for the installed plugins + * @param $tempFile path for the temporary file + * @param $tempPath path where we have to store the update + * @return 2 if plugin already exists and update not found + * @return 3 if update info tag not found in .info file + */ +function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath ) + { + // check for plugin if exists + $file = scandir( $findPath ); + foreach( $file as $key => $value ) + { + if ( strcmp( $value, $fileName ) == 0 ) + { + if ( !file_exists( $tempPath . "/test" ) ) + { + mkdir( $tempPath . "/test" ); + } + + // extracting the update + if ( zipExtraction( $tempFile, $tempPath . "/test/" ) ) + { + $result = readPluginFile( ".info", $tempPath . "/test/" . $fileName ); + + // check for the version for the plugin + $db = new DBLayer( "lib" ); + $sth = $db -> select( "plugins", array( 'Name' => $result['PluginName'] ), "Name = :Name" ); + $info = $sth -> fetch(); + $info['Info'] = json_decode( $info['Info'] ); + + // the two versions from main plugin and the updated part + $new_version = explode( '.', $result['Version'] ); + $pre_version = explode( '.', $info['Info'] -> Version ); + + // For all plugins we have used semantic versioning + // Format: X.Y.Z ,X->Major, Y->Minor, Z->Patch + // change in the X Y & Z values refer the type of change in the plugin. + // for initial development only Minor an Patch MUST be 0. + // if there is bug fix then there MUST be an increment in the Z value. + // if there is change in the functionality or addition of new functionality + // then there MUST be an increment in the Y value. + // When there is increment in the X value , Y and Z MUST be 0. + // comparing if there is some change + if ( !array_diff( $new_version , $pre_version ) ) + { + // removing the uploaded file + Plugincache :: rrmdir( $tempPath . "/test/" . $fileName ); + return '2'; //plugin already exists + } + else + { + // check for update info if exists + if ( !array_key_exists( 'UpdateInfo', $result ) ) + { + return '3'; //update info tag not found + } + else + { + // check if update already exists + if ( pluginUpdateExists( $info['Id'], $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip" ) ) + { + echo "Update already exists"; + exit; + } + else { + // removing the preivous update + $dbr = new DBLayer( "lib" ); + $dbr -> delete( "updates", array( 'id' => $info['Id'] ), "PluginId=:id" ); + // storing update in the temp directory + // format of update save + if ( move_uploaded_file( $tempFile, $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip" ) ) { + // setting update information in the database + $update['PluginId'] = $info['Id']; + $update['UpdatePath'] = $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip"; + $update['UpdateInfo'] = json_encode( $result ); + $dbr -> insert( "updates", $update ); + header( "Location: index.php?page=plugins&result=7" ); + exit; + } + } + } + } + } + } + } + } + +/** + * Function to check for the update of a plugin already exists + * + * @param $pluginId id of the plugin for which update is available + * @param $updatePath path of the new update + * @return boolean True if update already exists else False + * + */ +function PluginUpdateExists( $pluginId, $updatePath ) + { + $db = new DBLayer( 'lib' ); + $sth = $db -> selectWithParameter( "UpdatePath", "updates", array( 'pluginid' => $pluginId ), "PluginId=:pluginid" ); + $row = $sth -> fetch(); + if ( $updatePath == $row['UpdatePath'] ) + { + return true; + } + else + { + rmdir( $row['UpdatePath'] ); + return false; + } + } diff --git a/code/web/public_php/ams/func/update_plugin.php b/code/web/public_php/ams/func/update_plugin.php new file mode 100644 index 000000000..cacc5f119 --- /dev/null +++ b/code/web/public_php/ams/func/update_plugin.php @@ -0,0 +1,38 @@ + executeWithoutParams( "SELECT * FROM plugins INNER JOIN updates ON plugins.Id=updates.PluginId Where plugins.Id=$id" ); + $row = $sth -> fetch(); + + // replacing update in the database + Plugincache :: rrmdir( $row['FileName'] ); + Plugincache :: zipExtraction( $row['UpdatePath'], rtrim( $row['FileName'], strtolower( $row['Name'] ) ) ); + + $db -> update( "plugins", array( 'Info' => $row['UpdateInfo'] ), "Id=$row[Id]" ); + + // deleting the previous update + $db -> delete( "updates", array( 'id' => $row['s.no'] ), "s.no=:id" ); + + // if update is installed succesffully redirect to show success message + header( "Location: index.php?page=plugins&result=8" ); + exit; + + } + } + } diff --git a/code/web/public_php/ams/inc/plugins.php b/code/web/public_php/ams/inc/plugins.php new file mode 100644 index 000000000..1118b556f --- /dev/null +++ b/code/web/public_php/ams/inc/plugins.php @@ -0,0 +1,39 @@ + getElements(), Array( "getId", "getPluginName", "getPluginType", "getPluginPermission", "getPluginStatus", "getPluginInfo" ), Array( "id", "plugin_name", "plugin_type", "plugin_permission", "plugin_status", "plugin_info" ) ); + $pageResult['links'] = $pagination -> getLinks( 5 ); + $pageResult['lastPage'] = $pagination -> getLast(); + $pageResult['currentPage'] = $pagination -> getCurrent(); + + global $INGAME_WEBPATH; + $pageResult['ingame_webpath'] = $INGAME_WEBPATH; + + // check if shard is online + try { + $dbs = new DBLayer( "shard" ); + $pageResult['shard'] = "online"; + } + catch( PDOException $e ) { + $pageResult['shard'] = "offline"; + } + return( $pageResult ); + } else { + // ERROR: No access! + $_SESSION['error_code'] = "403"; + header( "Location: index.php?page=error" ); + exit; + } + + } diff --git a/code/web/public_php/ams/inc/plugins_update.php b/code/web/public_php/ams/inc/plugins_update.php new file mode 100644 index 000000000..e08869f98 --- /dev/null +++ b/code/web/public_php/ams/inc/plugins_update.php @@ -0,0 +1,36 @@ + getElements(), Array( "getId", "getPluginName", "getPluginInfo", "getUpdateInfo" ), Array( "id", "plugin_name", "plugin_info", "update_info" ) ); + $pageResult['links'] = $pagination -> getLinks( 5 ); + $pageResult['lastPage'] = $pagination -> getLast(); + $pageResult['currentPage'] = $pagination -> getCurrent(); + + global $INGAME_WEBPATH; + $pageResult['ingame_webpath'] = $INGAME_WEBPATH; + + // check if shard is online + try { + $dbs = new DBLayer( "shard" ); + $pageResult['shard'] = "online"; + } + catch( PDOException $e ) { + $pageResult['shard'] = "offline"; + } + return( $pageResult ); + } else { + // ERROR: No access! + $_SESSION['error_code'] = "403"; + header( "Location: index.php?page=error" ); + exit; + } + } diff --git a/code/web/public_php/ams/index.php b/code/web/public_php/ams/index.php index b4827bfe2..e87c5dcd5 100644 --- a/code/web/public_php/ams/index.php +++ b/code/web/public_php/ams/index.php @@ -1,126 +1,134 @@ getPermission(); + } else { + // default permission + $return['permission'] = 0; + } -//Set permission -if(isset($_SESSION['ticket_user'])){ - $return['permission'] = unserialize($_SESSION['ticket_user'])->getPermission(); -}else{ - //default permission - $return['permission'] = 0; -} +// hide sidebar + topbar in case of login/register +if ( $page == 'login' || $page == 'register' || $page == 'logout' || $page == 'forgot_password' || $page == 'reset_password' ) { + $return['no_visible_elements'] = 'TRUE'; + } else { + $return['no_visible_elements'] = 'FALSE'; + } - -//hide sidebar + topbar in case of login/register -if($page == 'login' || $page == 'register' || $page == 'logout' || $page == 'forgot_password' || $page == 'reset_password'){ - $return['no_visible_elements'] = 'TRUE'; -}else{ +// handle error page +if ( $page == 'error' ) { + $return['permission'] = 0; $return['no_visible_elements'] = 'FALSE'; -} + } -//handle error page -if($page == 'error'){ - $return['permission'] = 0; - $return['no_visible_elements'] = 'FALSE'; -} +// call to load hooks for the active plugins +$hook_content = Plugincache :: loadHooks(); +foreach( $hook_content as $key => $value ) + { + $return[$key] = $value; + } -//load the template with the variables in the $return array +// load the template with the variables in the $return array helpers :: loadTemplate( $page , $return ); diff --git a/code/web/public_php/ams/installer/libsetup.php b/code/web/public_php/ams/installer/libsetup.php index 2901918e2..77a5269f7 100644 --- a/code/web/public_php/ams/installer/libsetup.php +++ b/code/web/public_php/ams/installer/libsetup.php @@ -178,6 +178,50 @@ ENGINE = InnoDB; + -- ----------------------------------------------------- + -- Table `" . $cfg['db']['lib']['name'] ."`.`plugins` + -- ----------------------------------------------------- + DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`plugins` ; + + CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`plugins` ( + `Id` INT(10) NOT NULL AUTO_INCREMENT, + `FileName` VARCHAR(255) NOT NULL, + `Name` VARCHAR(56) NOT NULL, + `Type` VARCHAR(12) NOT NULL, + `Owner` VARCHAR(25) NOT NULL, + `Permission` VARCHAR(5) NOT NULL, + `Status` INT(11) NOT NULL DEFAULT 0, + `Weight` INT(11) NOT NULL DEFAULT 0, + `Info` TEXT NULL DEFAULT NULL, + PRIMARY KEY (`Id`) ) + ENGINE = InnoDB; + + INSERT INTO `plugins` (`Id`, `FileName`, `Name`, `Type`, `Owner`, `Permission`, `Status`, `Weight`, `Info`) VALUES +(1, '../../ams_lib/plugins/API_key_management', 'API_key_management', 'automatic', '', 'admin', 1, 0, '{\"PluginName\":\"API Key Management\",\"Description\":\"Provides public access to the API''s by generating access tokens.\",\"Version\":\"1.0.0\",\"Type\":\"automatic\",\"TemplatePath\":\"..\\/..\\/..\\/ams_lib\\/plugins\\/API_key_management\\/templates\\/index.tpl\",\"\":null}'), +(2, '../../ams_lib/plugins/Achievements', 'Achievements', 'Manual', '', 'admin', 0, 0, '{\"PluginName\":\"Achievements\",\"Description\":\"Returns the achivements of a user with respect to the character =.\",\"Version\":\"1.0.0\",\"TemplatePath\":\"..\\/..\\/..\\/ams_lib\\/plugins\\/Achievements\\/templates\\/index.tpl\",\"Type\":\"Manual\",\"\":null}'); + + + -- ----------------------------------------------------- + -- Table `" . $cfg['db']['lib']['name'] ."`.`updates` + -- ----------------------------------------------------- + DROP TABLE IF EXISTS `" . $cfg['db']['lib']['name'] ."`.`updates` ; + + CREATE TABLE IF NOT EXISTS `" . $cfg['db']['lib']['name'] ."`.`updates` ( + `s.no` int(10) NOT NULL AUTO_INCREMENT, + `PluginId` int(10) DEFAULT NULL, + `UpdatePath` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `UpdateInfo` text COLLATE utf8_unicode_ci, + PRIMARY KEY (`s.no`), + KEY `PluginId` (`PluginId`)) + ENGINE=InnoDB; + + -- ----------------------------------------- + -- Constraints for table `updates` + -- ----------------------------------------- + ALTER TABLE `" . $cfg['db']['lib']['name'] ."`.`updates` + ADD CONSTRAINT `updates_ibfk_1` FOREIGN KEY (`PluginId`) REFERENCES `plugins` (`Id`); + + -- ----------------------------------------------------- -- Table `" . $cfg['db']['lib']['name'] ."`.`ticket` -- ----------------------------------------------------- @@ -1733,14 +1777,14 @@ //Now create an admin account! $hashpass = crypt("admin", Users::generateSALT()); $params = array( - 'name' => "admin", - 'pass' => $hashpass, - 'mail' => "admin@admin.com", + 'Login' => "admin", + 'Password' => $hashpass, + 'Email' => "admin@admin.com", ); try{ - $user_id = WebUsers::createWebuser($params['name'], $params['pass'],$params['mail']); + $user_id = WebUsers::createWebuser($params['Login'], $params['Password'],$params['Email']); $result = Webusers::createUser($params, $user_id); - Users::createPermissions(array($params['name'])); + Users::createPermissions(array($params['Login'])); $dbl = new DBLayer("lib"); $dbl->execute("UPDATE ticket_user SET Permission = 3 WHERE TUserId = :user_id",array('user_id' => $user_id)); print "The admin account is created, you can login with id: admin, pass: admin!"; @@ -1763,5 +1807,4 @@ print "There was an error while installing"; print_r($e); } - } - + } diff --git a/code/web/public_php/ams/templates/install_plugin.tpl b/code/web/public_php/ams/templates/install_plugin.tpl new file mode 100644 index 000000000..968d6cec4 --- /dev/null +++ b/code/web/public_php/ams/templates/install_plugin.tpl @@ -0,0 +1,36 @@ +{block name=content} + +
+
+
+

{$ip_title}

+
+ + + + +
+
+
+
+

{$ip_support}

+
+
+    +
+
+
+

+ {if isset($smarty.get.result) and $smarty.get.result eq "0"}

{$ip_file_nfnd}

{/if} + {if isset($smarty.get.result) and $smarty.get.result eq "2"}

{$ip_info_nfound}

{/if} +
+ {$ip_message} +
+
+
+
+
+
+ + +{/block} diff --git a/code/web/public_php/ams/templates/layout.tpl b/code/web/public_php/ams/templates/layout.tpl index 5e5e0fb9f..69b99dbac 100644 --- a/code/web/public_php/ams/templates/layout.tpl +++ b/code/web/public_php/ams/templates/layout.tpl @@ -192,6 +192,59 @@ } + + + + + + + + diff --git a/code/web/public_php/ams/templates/layout_admin.tpl b/code/web/public_php/ams/templates/layout_admin.tpl index c50c1c20d..54307b5bc 100644 --- a/code/web/public_php/ams/templates/layout_admin.tpl +++ b/code/web/public_php/ams/templates/layout_admin.tpl @@ -4,11 +4,13 @@
  • Dashboard
  • Profile
  • Settings
  • + {if isset($hook_info)} {foreach from=$hook_info key=arrkey item=element}
  • {$element.menu_display}
  • {/foreach}{/if}
  • Users
  • Queues
  • Support Groups
  • +
  • Plugins
  • Syncing
  • Logout
  • {/block} diff --git a/code/web/public_php/ams/templates/layout_mod.tpl b/code/web/public_php/ams/templates/layout_mod.tpl index e0a77d99a..e4fbdcc69 100644 --- a/code/web/public_php/ams/templates/layout_mod.tpl +++ b/code/web/public_php/ams/templates/layout_mod.tpl @@ -4,6 +4,7 @@
  • Dashboard
  • Profile
  • Settings
  • + {if isset($hook_info)} {foreach from=$hook_info key=arrkey item=element}
  • {$element.menu_display}
  • {/foreach}{/if}
  • Users
  • Queues
  • diff --git a/code/web/public_php/ams/templates/layout_plugin.tpl b/code/web/public_php/ams/templates/layout_plugin.tpl new file mode 100644 index 000000000..1a84ff3bf --- /dev/null +++ b/code/web/public_php/ams/templates/layout_plugin.tpl @@ -0,0 +1,12 @@ +{block name=content} +
    +{if isset($hook_info)} +{foreach from=$hook_info key=arrkey item=element} +{if $arrkey eq $smarty.get.name} +{include file=$element.TemplatePath} +{/if} +{/foreach} +{/if} +
    +{/block} + diff --git a/code/web/public_php/ams/templates/layout_user.tpl b/code/web/public_php/ams/templates/layout_user.tpl index 301af12b6..e70b7c164 100644 --- a/code/web/public_php/ams/templates/layout_user.tpl +++ b/code/web/public_php/ams/templates/layout_user.tpl @@ -3,8 +3,9 @@
  • Profile
  • Settings
  • + {if isset($hook_info)} {foreach from=$hook_info key=arrkey item=element}
  • {$element.menu_display}
  • {/foreach}{/if} -
  • Create New Ticket
  • +
  • Create New Ticket
  • Logout
  • {/block} diff --git a/code/web/public_php/ams/templates/plugins.tpl b/code/web/public_php/ams/templates/plugins.tpl new file mode 100644 index 000000000..6d864c818 --- /dev/null +++ b/code/web/public_php/ams/templates/plugins.tpl @@ -0,0 +1,71 @@ +{block name=content} +
    +
    +
    +

    {$plugin_title}

    +
    + + + +
    +
    + {if isset($smarty.get.result) and $smarty.get.result eq "1"}

    {$ip_success}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "0"}

    {$dp_error}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "2"}

    {$dp_success}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "3"}

    {$ac_success}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "4"}

    {$ac_error}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "5"}

    {$dc_success}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "6"}

    {$dc_error}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "7"}

    {$up_success}

    {/if} + {if isset($smarty.get.result) and $smarty.get.result eq "8"}

    {$up_install_success}

    {/if} +
    +

    {$plugin_info}

    +
    + + +
    + + + + + + + + + + + + + + {foreach from=$plug item=element} + + + + + + + + + + {/foreach} + + +
    {$plugin_status}{$plugin_name}{$plugin_version}{$plugin_description}{$plugin_type}{$plugin_permission}{$plugin_actions}
    {$element.plugin_name}{$element.plugin_info->Version}{$element.plugin_info->Description}{$element.plugin_type}{$element.plugin_permission} + {if ($element.plugin_status) eq "0"} + + {/if} + {if ($element.plugin_status) eq "1"}{/if}
    +
    +
      +
    • «
    • + {foreach from=$links item=link} +
    • {$link}
    • + {/foreach} +
    • »
    • +
    +
    +
    + +
    +
    +{/block} diff --git a/code/web/public_php/ams/templates/plugins_update.tpl b/code/web/public_php/ams/templates/plugins_update.tpl new file mode 100644 index 000000000..afa93d80f --- /dev/null +++ b/code/web/public_php/ams/templates/plugins_update.tpl @@ -0,0 +1,50 @@ +{block name=content} +
    +
    +
    +

    {$up_title}

    +
    + + + +
    +
    +
    +

    {$up_info}

    + + + + + + + + + + + + {foreach from=$plug item=element} + + + + + + + {/foreach} + + +
    {$plugin_name}{$plugin_version}{$up_updated_version}{$up_description}{$up_actions}
    {$element.plugin_name}{$element.plugin_info->Version}{$element.update_info->Version}{$element.update_info->UpdateInfo} +
    +
    +
      +
    • «
    • + {foreach from=$links item=link} +
    • {$link}
    • + {/foreach} +
    • »
    • +
    +
    +
    + +
    +
    +{/block} diff --git a/code/web/public_php/app/app_achievements/index.php b/code/web/public_php/app/app_achievements/index.php index 90ce612bb..9db5b991f 100644 --- a/code/web/public_php/app/app_achievements/index.php +++ b/code/web/public_php/app/app_achievements/index.php @@ -1,110 +1,158 @@ isIG()) { - require_once("include/ach_render_ig.php"); -} -else { - require_once("include/ach_render_web.php"); -} -require_once("include/ach_render_common.php"); - -require_once("class/DLL_class.php"); -#require_once("class/InDev_trait.php"); -require_once("class/Node_abstract.php"); -require_once("class/AVLTree_class.php"); -require_once("class/Parentum_abstract.php"); -require_once("class/AchList_abstract.php"); -require_once("class/Tieable_inter.php"); -require_once("class/NodeIterator_class.php"); - - -require_once("class/AchMenu_class.php"); -require_once("class/AchMenuNode_class.php"); -require_once("class/AchSummary_class.php"); -require_once("class/AchCategory_class.php"); -require_once("class/AchAchievement_class.php"); -require_once("class/AchTask_class.php"); -require_once("class/AchObjective_class.php"); - -#require_once("fb/facebook.php"); // Update user acces on Db -#$DBc = ryDB::getInstance(APP_NAME."_test"); -$DBc = ryDB::getInstance(APP_NAME); +// $DBc = ryDB::getInstance(APP_NAME."_test"); +$DBc = ryDB :: getInstance( APP_NAME ); + + +// if getting request using REST +if ( isset( $_GET['search'] ) && isset( $_GET['format'] ) ) + { + // if the format is json + if ( $_GET['format'] == 'json' ) + { + // getting the headers when the request is sent + $header = getallheaders(); + + // this block is to get the posted data + $fp = fopen( 'php://input', 'r' ); + $rawData = stream_get_contents( $fp ); + $userd = json_decode( $rawData, true ); + + // authenticate the user using data we get from server + appAuthenticateRest( $user, $userd ); + + // create a ryzom user object whose achievements we have to send in response + $_USER = new RyzomUser( $user ); + + require_once( "include/ach_render_web.php" ); + $c .= ach_render(); + $response = $c; + // sending the response + echo( $response ); + exit; + + } + } +else + { + echo 'Invalid response'; + exit; + } + + + + +// Ask to authenticate user (using ingame or session method) and fill $user with all information +ryzom_app_authenticate( $user, true ); + + +// echo var_export($user,true); +// $user['id'] = $user['char_id']; +// $user['name'] = $user['char_name']; +/** + * $user = array(); + * $user['cid'] = 1; + * $user['lang'] = 'en'; + * $user['name'] = 'Talvela'; + * $user['race'] = "r_matis"; + * $user['civilization'] = "c_neutral"; + * $user['cult'] = "c_neutral"; + * $user['ig'] = ($_REQUEST['ig']==1); + * #$user['ig'] = true; + */ + +$_USER = new RyzomUser( $user ); + + +if ( $_USER -> isIG() ) { + require_once( "include/ach_render_ig.php" ); + } +else { + require_once( "include/ach_render_web.php" ); + } + +// require_once("fb/facebook.php"); $c = ""; -if(!$_USER->isIG()) { - /*$facebook = new Facebook(array( - 'appId' => $_CONF['fb_id'], - 'secret' => $_CONF['fb_secret'], - 'cookie' => true - )); - - #code taken from facebook tutorial - - // Get the url to redirect for login to facebook - // and request permission to write on the user's wall. - $login_url = $facebook->getLoginUrl( - array('scope' => 'publish_stream') - ); - - // If not authenticated, redirect to the facebook login dialog. - // The $login_url will take care of redirecting back to us - // after successful login. - if (! $facebook->getUser()) { - $c .= ';'; - } - else { - $DBc->sqlQuery("INSERT INTO ach_fb_token (aft_player,aft_token,aft_date,aft_allow) VALUES ('".$_USER->getID()."','".$DBc->sqlEscape($facebook->getAccessToken())."','".time()."','1') ON DUPLICATE KEY UPDATE aft_token='".$DBc->sqlEscape($facebook->getAccessToken())."', aft_date='".time()."'"); - }*/ - - -} - -if(!$_USER->isIG && $_CONF['enable_webig'] == false) { - $c .= ach_render_forbidden(false); -} -elseif($_USER->isIG && $_CONF['enable_offgame'] == false) { - $c .= ach_render_forbidden(true); -} +if ( !$_USER -> isIG() ) { + /** + * $facebook = new Facebook(array( + * 'appId' => $_CONF['fb_id'], + * 'secret' => $_CONF['fb_secret'], + * 'cookie' => true + * )); + * + * #code taken from facebook tutorial + * + * // Get the url to redirect for login to facebook + * // and request permission to write on the user's wall. + * $login_url = $facebook->getLoginUrl( + * array('scope' => 'publish_stream') + * ); + * + * // If not authenticated, redirect to the facebook login dialog. + * // The $login_url will take care of redirecting back to us + * // after successful login. + * if (! $facebook->getUser()) { + * $c .= ';'; + * } + * else { + * $DBc->sqlQuery("INSERT INTO ach_fb_token (aft_player,aft_token,aft_date,aft_allow) VALUES ('".$_USER->getID()."','".$DBc->sqlEscape($facebook->getAccessToken())."','".time()."','1') ON DUPLICATE KEY UPDATE aft_token='".$DBc->sqlEscape($facebook->getAccessToken())."', aft_date='".time()."'"); + * } + */ + + + } + +if ( !$_USER -> isIG && $_CONF['enable_webig'] == false ) { + $c .= ach_render_forbidden( false ); + + } +elseif ( $_USER -> isIG && $_CONF['enable_offgame'] == false ) { + $c .= ach_render_forbidden( true ); + + } else { - $c .= ach_render(); -} + $c .= ach_render(); + } -echo ryzom_app_render(strtoupper(get_translation('ach_app_name',$_USER->getLang())), $c, $_USER->isIG()); +echo ryzom_app_render( strtoupper( get_translation( 'ach_app_name', $_USER -> getLang() ) ), $c, $_USER -> isIG() ); ?>