--- /dev/null
+#ifndef MBDebug_HeaderFile\r
+#define MBDebug_HeaderFile\r
+\r
+//---------------------------------------------------------------\r
+// Usage of the logging facilities:\r
+//\r
+// (1) At the beginning of each class file to be debugged, there\r
+// should be a static string variable defined with the name\r
+// of the class. Then, include the "MBDebug.h" header file.\r
+//\r
+// //---------------------------------------------------------\r
+// #define USE_DEBUG\r
+// //#define MB_IGNORE_QT\r
+// #define MBCLASSNAME "ClassName"\r
+// #include "MBDebug.h"\r
+// //---------------------------------------------------------\r
+//\r
+// (2) At the beginning of each class method, call the DBG_FUN\r
+// macro.\r
+//\r
+// int ClassName::MyMethod(int x)\r
+// {\r
+// DBG_FUN();\r
+// ...\r
+// }\r
+//\r
+// NOTE: For static methods, call the DBG_FUNC() macro!!\r
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r
+// This debugging/logging class is a "header-only" solution and\r
+// does NOT require any additional implementation (.cpp) file!\r
+//---------------------------------------------------------------\r
+\r
+#include <iostream>\r
+#include <string>\r
+#include <locale>\r
+#include <codecvt>\r
+#include <list>\r
+#include <map>\r
+#include <set>\r
+#include <vector>\r
+#ifndef MB_IGNORE_QT\r
+# include <qstring.h>\r
+#endif\r
+\r
+//---------------------------------------------------------------\r
+// Set the debug flags dependent on the preprocessor definitions\r
+//---------------------------------------------------------------\r
+#ifdef USE_DEBUG\r
+# define MBS_DEBUG_FLAG MBDebug::DF_DEBUG\r
+#else\r
+# define MBS_DEBUG_FLAG 0\r
+#endif /*DEBUG*/ \r
+\r
+#define MBS_DBG_FLAGS (MBS_DEBUG_FLAG)\r
+\r
+\r
+//---------------------------------------------------------------\r
+// Define the global debug macros\r
+//---------------------------------------------------------------\r
+#define DLOG MBDebug::LogPrint()\r
+#define RETURN(var) { RET(var); return (var); }\r
+\r
+#ifdef USE_DEBUG\r
+\r
+# define DBG_FUN() MBDebug _dbg(MBCLASSNAME, __FUNCTION__, MBS_DBG_FLAGS, (void*)this)\r
+# define DBG_FUNC() MBDebug _dbg(MBCLASSNAME, __FUNCTION__, MBS_DBG_FLAGS)\r
+# define DBG_FUNB(blk) MBDebug _dbg(MBCLASSNAME, blk, MBS_DBG_FLAGS)\r
+# define MSGEL(txt) MBDebug::LogPrint() << txt << std::endl\r
+# define PRINT(txt) MBDebug::LogPrint() << txt\r
+# define SHOW2(var,typ) DumpVar(#var,(typ)(var))\r
+# define SHOW(var) DumpVar(#var,var)\r
+# define ARG(var) do { PRINT("in:"); DumpVar(#var,var); } while (0)\r
+# define ARG2(var,typ) do { PRINT("in:"); DumpVar(#var,(typ)(var)); } while (0)\r
+# define RET(var) do { PRINT("out:"); DumpVar(#var,var); } while (0)\r
+# define MSG(txt) MBDebug::LogPrint() << txt\r
+\r
+#else /*!USE_DEBUG*/ \r
+\r
+# define DBG_FUN()\r
+# define DBG_FUNC()\r
+# define DBG_FUNB(blk)\r
+# define MSGEL(txt)\r
+# define PRINT(txt)\r
+# define SHOW2(var,typ)\r
+# define SHOW(var)\r
+# define ARG(var)\r
+# define ARG2(var,typ)\r
+# define RET(var)\r
+# define MSG(txt)\r
+\r
+#endif /*USE_DEBUG*/ \r
+\r
+\r
+//---------------------------------------------------------------\r
+// Declare the debugging and profiling class\r
+//---------------------------------------------------------------\r
+class MBDebug\r
+{\r
+public:\r
+ enum {\r
+ DF_NONE = 0x00, // no debug\r
+ DF_DEBUG = 0x01 // debug a function\r
+ };\r
+\r
+ MBDebug(const char* aClassName, const char* aFuncName, const short aFlag, void* aThis=NULL)\r
+ :mClassName(aClassName),mFuncName(aFuncName),mThis(aThis),mFlags((unsigned char)aFlag)\r
+ {\r
+ if (mFlags & (DF_DEBUG))\r
+ {\r
+ std::cout << "{ENTER: " << mClassName + "::" + mFuncName;\r
+ if (mThis) std::cout << "(this=" << mThis << ")";\r
+ std::cout << std::endl;\r
+ }\r
+ }\r
+ virtual ~MBDebug()\r
+ {\r
+ if (mFlags & (DF_DEBUG))\r
+ std::cout << "}LEAVE: " << mClassName << "::" << mFuncName << std::endl;\r
+ }\r
+\r
+ // Log file output management\r
+ static std::ostream& LogPrint() { return std::cout; }\r
+\r
+private:\r
+ std::string mClassName; // Name of class to be debugged\r
+ std::string mFuncName; // Name of function to be debugged\r
+ void* mThis; // The "this" pointer to the class being debugged\r
+ unsigned char mFlags; // Debug mode flags\r
+};\r
+\r
+\r
+\r
+#define YesNo(b) (b ? "Yes" : "No")\r
+\r
+\r
+\r
+inline std::string w2s(std::wstring ws)\r
+{\r
+ using convert_typeX = std::codecvt_utf8<wchar_t>;\r
+ std::wstring_convert<convert_typeX, wchar_t> converterX;\r
+ return(converterX.to_bytes(ws));\r
+}\r
+\r
+// Primitive types\r
+inline void DumpVar(const char *szName, char value)\r
+{\r
+ DLOG << "[chr]: " << szName << "='" << value << "'" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, bool value)\r
+{\r
+ DLOG << "[bool]: " << szName << "=" << (value ? "true" : "false") << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, short value)\r
+{\r
+ DLOG << "[shrt]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, int value)\r
+{\r
+ DLOG << "[int]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, long value)\r
+{\r
+ DLOG << "[long]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, double value)\r
+{\r
+ DLOG << "[dbl]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned char value)\r
+{\r
+ DLOG << "[byte]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned short value)\r
+{\r
+ DLOG << "[word]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned int value)\r
+{\r
+ DLOG << "[uint]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned long value)\r
+{\r
+ DLOG << "[dword]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const char* value)\r
+{\r
+ DLOG << "[str]: " << szName << "=\"" << (value ? value : "") << "\"" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const std::string &value)\r
+{\r
+ DLOG << "[Str]: " << szName << "=\"" << value << "\"" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const std::wstring &value)\r
+{\r
+ DLOG << "[WStr]: " << szName << "=\"" << w2s(value) << "\"" << std::endl;\r
+}\r
+\r
+#ifndef MB_IGNORE_QT\r
+inline void DumpVar(const char *szName, const QString &value)\r
+{\r
+ DLOG << "[QStr]: " << szName << "=\"" << value.toStdString() << "\"" << std::endl;\r
+}\r
+#endif\r
+\r
+inline void DumpVar(const char *szName, const void* value)\r
+{\r
+ DLOG << "[ptr]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+\r
+// Collection of primitive types\r
+inline void DumpVar(const char *szName, const std::set<int> &values)\r
+{\r
+ DLOG << "[intSet]: " << szName << "={" << values.size() << "}[";\r
+ bool bFirst = true;\r
+ for (auto it=values.cbegin(); it!=values.cend(); ++it)\r
+ DLOG << (bFirst ? "" : ",") << *it;\r
+ DLOG << "]" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const std::list<bool>& values)\r
+{\r
+ DLOG << "[boolList]: " << szName << "={" << values.size() << "}[";\r
+ bool bFirst = true;\r
+ for (auto it=values.cbegin(); it!=values.cend(); ++it)\r
+ DLOG << (bFirst ? "" : ",") << (*it ? "Y" : "N");\r
+ DLOG << "]" << std::endl;\r
+}\r
+\r
+\r
+#endif // MBDebug_HeaderFile\r
+\r
--- /dev/null
+#ifndef MBDebug_HeaderFile\r
+#define MBDebug_HeaderFile\r
+\r
+//---------------------------------------------------------------\r
+// Usage of the logging facilities:\r
+//\r
+// (1) At the beginning of each class file to be debugged, there\r
+// should be a static string variable defined with the name\r
+// of the class. Then, include the "MBDebug.h" header file.\r
+//\r
+// //---------------------------------------------------------\r
+// #define USE_DEBUG\r
+// //#define MB_IGNORE_QT\r
+// #define MBCLASSNAME "ClassName"\r
+// #include "MBDebug.h"\r
+// //---------------------------------------------------------\r
+//\r
+// (2) At the beginning of each class method, call the DBG_FUN\r
+// macro.\r
+//\r
+// int ClassName::MyMethod(int x)\r
+// {\r
+// DBG_FUN();\r
+// ...\r
+// }\r
+//\r
+// NOTE: For static methods, call the DBG_FUNC() macro!!\r
+//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r
+// This debugging/logging class is a "header-only" solution and\r
+// does NOT require any additional implementation (.cpp) file!\r
+//---------------------------------------------------------------\r
+\r
+#include <iostream>\r
+#include <string>\r
+#include <locale>\r
+#include <codecvt>\r
+#include <list>\r
+#include <map>\r
+#include <set>\r
+#include <vector>\r
+#ifndef MB_IGNORE_QT\r
+# include <qstring.h>\r
+#endif\r
+\r
+//---------------------------------------------------------------\r
+// Set the debug flags dependent on the preprocessor definitions\r
+//---------------------------------------------------------------\r
+#ifdef USE_DEBUG\r
+# define MBS_DEBUG_FLAG MBDebug::DF_DEBUG\r
+#else\r
+# define MBS_DEBUG_FLAG 0\r
+#endif /*DEBUG*/ \r
+\r
+#define MBS_DBG_FLAGS (MBS_DEBUG_FLAG)\r
+\r
+\r
+//---------------------------------------------------------------\r
+// Define the global debug macros\r
+//---------------------------------------------------------------\r
+#define DLOG MBDebug::LogPrint()\r
+#define RETURN(var) { RET(var); return (var); }\r
+\r
+#ifdef USE_DEBUG\r
+\r
+# define DBG_FUN() MBDebug _dbg(MBCLASSNAME, __FUNCTION__, MBS_DBG_FLAGS, (void*)this)\r
+# define DBG_FUNC() MBDebug _dbg(MBCLASSNAME, __FUNCTION__, MBS_DBG_FLAGS)\r
+# define DBG_FUNB(blk) MBDebug _dbg(MBCLASSNAME, blk, MBS_DBG_FLAGS)\r
+# define MSGEL(txt) MBDebug::LogPrint() << txt << std::endl\r
+# define PRINT(txt) MBDebug::LogPrint() << txt\r
+# define SHOW2(var,typ) DumpVar(#var,(typ)(var))\r
+# define SHOW(var) DumpVar(#var,var)\r
+# define ARG(var) do { PRINT("in:"); DumpVar(#var,var); } while (0)\r
+# define ARG2(var,typ) do { PRINT("in:"); DumpVar(#var,(typ)(var)); } while (0)\r
+# define RET(var) do { PRINT("out:"); DumpVar(#var,var); } while (0)\r
+# define MSG(txt) MBDebug::LogPrint() << txt\r
+\r
+#else /*!USE_DEBUG*/ \r
+\r
+# define DBG_FUN()\r
+# define DBG_FUNC()\r
+# define DBG_FUNB(blk)\r
+# define MSGEL(txt)\r
+# define PRINT(txt)\r
+# define SHOW2(var,typ)\r
+# define SHOW(var)\r
+# define ARG(var)\r
+# define ARG2(var,typ)\r
+# define RET(var)\r
+# define MSG(txt)\r
+\r
+#endif /*USE_DEBUG*/ \r
+\r
+\r
+//---------------------------------------------------------------\r
+// Declare the debugging and profiling class\r
+//---------------------------------------------------------------\r
+class MBDebug\r
+{\r
+public:\r
+ enum {\r
+ DF_NONE = 0x00, // no debug\r
+ DF_DEBUG = 0x01 // debug a function\r
+ };\r
+\r
+ MBDebug(const char* aClassName, const char* aFuncName, const short aFlag, void* aThis=NULL)\r
+ :mClassName(aClassName),mFuncName(aFuncName),mThis(aThis),mFlags((unsigned char)aFlag)\r
+ {\r
+ if (mFlags & (DF_DEBUG))\r
+ {\r
+ std::cout << "{ENTER: " << mClassName + "::" + mFuncName;\r
+ if (mThis) std::cout << "(this=" << mThis << ")";\r
+ std::cout << std::endl;\r
+ }\r
+ }\r
+ virtual ~MBDebug()\r
+ {\r
+ if (mFlags & (DF_DEBUG))\r
+ std::cout << "}LEAVE: " << mClassName << "::" << mFuncName << std::endl;\r
+ }\r
+\r
+ // Log file output management\r
+ static std::ostream& LogPrint() { return std::cout; }\r
+\r
+private:\r
+ std::string mClassName; // Name of class to be debugged\r
+ std::string mFuncName; // Name of function to be debugged\r
+ void* mThis; // The "this" pointer to the class being debugged\r
+ unsigned char mFlags; // Debug mode flags\r
+};\r
+\r
+\r
+\r
+#define YesNo(b) (b ? "Yes" : "No")\r
+\r
+\r
+\r
+inline std::string w2s(std::wstring ws)\r
+{\r
+ using convert_typeX = std::codecvt_utf8<wchar_t>;\r
+ std::wstring_convert<convert_typeX, wchar_t> converterX;\r
+ return(converterX.to_bytes(ws));\r
+}\r
+\r
+// Primitive types\r
+inline void DumpVar(const char *szName, char value)\r
+{\r
+ DLOG << "[chr]: " << szName << "='" << value << "'" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, bool value)\r
+{\r
+ DLOG << "[bool]: " << szName << "=" << (value ? "true" : "false") << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, short value)\r
+{\r
+ DLOG << "[shrt]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, int value)\r
+{\r
+ DLOG << "[int]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, long value)\r
+{\r
+ DLOG << "[long]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, double value)\r
+{\r
+ DLOG << "[dbl]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned char value)\r
+{\r
+ DLOG << "[byte]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned short value)\r
+{\r
+ DLOG << "[word]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned int value)\r
+{\r
+ DLOG << "[uint]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, unsigned long value)\r
+{\r
+ DLOG << "[dword]: " << szName << "=0x" << std::hex << value << std::dec << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const char* value)\r
+{\r
+ DLOG << "[str]: " << szName << "=\"" << (value ? value : "") << "\"" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const std::string &value)\r
+{\r
+ DLOG << "[Str]: " << szName << "=\"" << value << "\"" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const std::wstring &value)\r
+{\r
+ DLOG << "[WStr]: " << szName << "=\"" << w2s(value) << "\"" << std::endl;\r
+}\r
+\r
+#ifndef MB_IGNORE_QT\r
+inline void DumpVar(const char *szName, const QString &value)\r
+{\r
+ DLOG << "[QStr]: " << szName << "=\"" << value.toStdString() << "\"" << std::endl;\r
+}\r
+#endif\r
+\r
+inline void DumpVar(const char *szName, const void* value)\r
+{\r
+ DLOG << "[ptr]: " << szName << "=" << value << std::endl;\r
+}\r
+\r
+\r
+// Collection of primitive types\r
+inline void DumpVar(const char *szName, const std::set<int> &values)\r
+{\r
+ DLOG << "[intSet]: " << szName << "={" << values.size() << "}[";\r
+ bool bFirst = true;\r
+ for (auto it=values.cbegin(); it!=values.cend(); ++it)\r
+ DLOG << (bFirst ? "" : ",") << *it;\r
+ DLOG << "]" << std::endl;\r
+}\r
+\r
+inline void DumpVar(const char *szName, const std::list<bool>& values)\r
+{\r
+ DLOG << "[boolList]: " << szName << "={" << values.size() << "}[";\r
+ bool bFirst = true;\r
+ for (auto it=values.cbegin(); it!=values.cend(); ++it)\r
+ DLOG << (bFirst ? "" : ",") << (*it ? "Y" : "N");\r
+ DLOG << "]" << std::endl;\r
+}\r
+\r
+\r
+#endif // MBDebug_HeaderFile\r
+\r
#include <pqPropertiesPanel.h>
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_Behaviors"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
int PVViewer_Behaviors::BehaviorLoadingLevel = 0;
PVViewer_Behaviors::PVViewer_Behaviors(QMainWindow * parent)
: QObject(parent)
{
+ DBG_FUN();
}
/**! Instanciate minimal ParaView behaviors needed when using an instance of PVViewer.
*/
void PVViewer_Behaviors::instanciateMinimalBehaviors(QMainWindow * /*desk*/)
{
+ DBG_FUN();
+ SHOW(BehaviorLoadingLevel);
if (BehaviorLoadingLevel < 1)
{
// Register ParaView interfaces.
*/
void PVViewer_Behaviors::instanciateAllBehaviors(QMainWindow * desk)
{
+ DBG_FUN();
+ SHOW(BehaviorLoadingLevel);
// "new pqParaViewBehaviors(anApp->desktop(), this);"
// -> (which loads all standard ParaView behaviors at once) has to be replaced in order to
// exclude using of pqQtMessageHandlerBehaviour
#include <pqPipelineBrowserWidget.h>
#include <pqServerDisconnectReaction.h>
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_Core"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
//---------- Static init -----------------
pqPVApplicationCore* PVViewer_Core::MyCoreApp = 0;
\param fullSetup whether to instanciate all behaviors or just the minimal ones.
\return \c true if ParaView has been initialized successfully, otherwise false
*/
-bool PVViewer_Core::ParaviewInitApp(QMainWindow * /*aDesktop*/)
+bool PVViewer_Core::ParaviewInitApp(QMainWindow * aDesktop)
{
+ DBG_FUNC();
if ( ! MyCoreApp) {
// Obtain command-line arguments
int argc = 0;
free(argv[i]);
delete[] argv;
}
- // Initialization of ParaView GUI widgets will be done when these widgets are
- // really needed.
- // PVViewer_GUIElements* inst = PVViewer_GUIElements::GetInstance(aDesktop);
- // inst->getPropertiesPanel();
- return true;
+ // Initialization of ParaView GUI widgets will be done when these widgets are
+ // really needed.
+ // PVViewer_GUIElements* inst = PVViewer_GUIElements::GetInstance(aDesktop);
+ // inst->getPropertiesPanel();
+ return true;
}
void PVViewer_Core::ParaviewInitBehaviors(bool fullSetup, QMainWindow* aDesktop)
{
+ DBG_FUNC();
+ ARG(fullSetup);
if (!ParaviewBehaviors)
ParaviewBehaviors = new PVViewer_Behaviors(aDesktop);
void PVViewer_Core::ParaviewLoadConfigurations(const QString & configPath, bool force)
{
+ DBG_FUNC();
+ ARG(configPath);
+ ARG(force);
if (!ConfigLoaded || force)
{
if (!configPath.isNull()) {
void PVViewer_Core::ParaviewCleanup()
{
+ DBG_FUNC();
// Disconnect from server
pqServer* server = pqActiveObjects::instance().activeServer();
if (server && server->isRemote())
#include <QMenu>
#include <QToolBar>
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_GUIElements"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
PVViewer_GUIElements * PVViewer_GUIElements::theInstance = 0;
PVViewer_GUIElements::PVViewer_GUIElements(QMainWindow* desktop) :
commonAction(0),
dataAction(0)
{
+ DBG_FUN();
}
PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(QMainWindow* desk)
void PVViewer_GUIElements::buildPVWidgets()
{
if (!myPVWidgetsFlag) {
+ DBG_FUN();
//Pipeline Browser
if ( !pipelineBrowserWidget ) {
void PVViewer_GUIElements::setToolBarVisible(bool show)
{
+ DBG_FUN();
+ ARG(show);
QCoreApplication::processEvents();
if (!myPVWidgetsFlag)
return;
void PVViewer_GUIElements::setVCRTimeToolBarVisible(bool show)
{
+ DBG_FUN();
+ ARG(show);
vcrAction->setChecked(!show);
vcrAction->setVisible(show);
vcrAction->trigger();
void PVViewer_GUIElements::setToolBarEnabled(bool enabled)
{
+ DBG_FUN();
+ ARG(enabled);
if (!myPVWidgetsFlag)
return;
}
void PVViewer_GUIElements::publishExistingSources() {
+ DBG_FUN();
vtkSMSessionProxyManager* pxm = pqActiveObjects::instance().proxyManager();
pqServerManagerModel* smmodel = pqApplicationCore::instance()->getServerManagerModel();
if( !pxm || !smmodel )
vtkSMProxyIterator* iter = vtkSMProxyIterator::New();
iter->SetModeToOneGroup();
iter->SetSessionProxyManager( pxm );
+ MSGEL("....List of all sources:....");
for ( iter->Begin( "sources" ); !iter->IsAtEnd(); iter->Next() ) {
+ SHOW(iter->GetKey());
if ( pqProxy* item = smmodel->findItem<pqProxy*>( iter->GetProxy() ) ) {
pqPipelineSource* source = qobject_cast<pqPipelineSource*>( item );
QMetaObject::invokeMethod( smmodel,
#include "PVViewer_Core.h"
#include "PVViewer_ViewManager.h"
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_InitSingleton"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
bool PVViewer_InitSingleton::IS_INIT=false;
void PVViewer_InitSingleton::Init(QMainWindow* desktop)
{
+ DBG_FUNC();
if(IS_INIT)
return ;
PVViewer_Core::ParaviewInitApp(desktop);
#include <vtkObjectFactory.h>
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_OutputWindow"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
vtkStandardNewMacro(PVViewer_OutputWindow)
PVViewer_OutputWindow::PVViewer_OutputWindow()
{
+ DBG_FUN();
}
PVViewer_OutputWindow::~PVViewer_OutputWindow()
{
+ DBG_FUN();
}
unsigned int PVViewer_OutputWindow::getTextCount() const
void PVViewer_OutputWindow::DisplayText(const char* text)
{
+ DBG_FUN();
+ ARG(text);
MessageTypes type = GetCurrentMessageType();
myCounter[type] = count(type) + 1;
switch (type)
#include <pqServerConnectReaction.h>
#include <pqActiveObjects.h>
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_ViewManager"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
/*!
Constructor
*/
PVViewer_ViewManager::PVViewer_ViewManager(SUIT_Study* study, SUIT_Desktop* desktop)
: SUIT_ViewManager( study, desktop, new PVViewer_Viewer() )
{
+ DBG_FUN();
MESSAGE("PVViewer - view manager created ...");
setTitle( tr( "PARAVIEW_VIEW_TITLE" ) );
QString PVViewer_ViewManager::GetPVConfigPath()
{
+ DBG_FUNC();
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
return resMgr->stringValue("resources", "PVViewer", QString());
}
bool PVViewer_ViewManager::ConnectToExternalPVServer(QMainWindow* desktop)
{
+ DBG_FUNC();
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
bool noConnect = aResourceMgr->booleanValue( "PARAVIS", "no_ext_pv_server", false );
if (noConnect)
*/
void PVViewer_ViewManager::onWindowActivated(SUIT_ViewWindow* view)
{
+ DBG_FUN();
if (view)
{
PVViewer_ViewWindow* pvWindow = dynamic_cast<PVViewer_ViewWindow*>(view);
#include <utilities.h>
#include "SUIT_Desktop.h"
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_Viewer"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
//----------------------------------------
PVViewer_Viewer::PVViewer_Viewer()
:SUIT_ViewModel()
{
+ DBG_FUN();
MESSAGE("PVViewer_Viewer: creating view model ...");
}
*/
SUIT_ViewWindow* PVViewer_Viewer::createView(SUIT_Desktop* desktop)
{
+ DBG_FUN();
return new PVViewer_ViewWindow(desktop, this);
}
#include <pqTabbedMultiViewWidget.h>
#include <pqApplicationCore.h>
+//---------------------------------------------------------
+#define USE_DEBUG
+//#define MB_IGNORE_QT
+#define MBCLASSNAME "PVViewer_ViewWindow"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
/*!
\class PVViewer_ViewWindow
PVViewer_ViewWindow::PVViewer_ViewWindow( SUIT_Desktop* theDesktop, PVViewer_Viewer* theModel )
: SUIT_ViewWindow( theDesktop ), myPVMgr( 0 )
{
+ DBG_FUN();
myDesktop = theDesktop;
myModel = theModel;
setViewManager(myModel->getViewManager());
*/
PVViewer_ViewWindow::~PVViewer_ViewWindow()
{
+ DBG_FUN();
if ( myPVMgr ) {
// Hide toolbars
PVViewer_GUIElements * pvge = PVViewer_GUIElements::GetInstance(myDesktop);
void PVViewer_ViewWindow::removePVMgr()
{
+ DBG_FUNC();
pqTabbedMultiViewWidget* aPVMgr = qobject_cast<pqTabbedMultiViewWidget*>(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET"));
delete aPVMgr;
}
*/
void PVViewer_ViewWindow::setVisualParameters( const QString& parameters )
{
+ DBG_FUN();
+ ARG(parameters);
SUIT_ViewWindow::setVisualParameters( parameters );
}
#include <QtxActionMenuMgr.h>
#include <QtxActionToolMgr.h>
+//---------------------------------------------------------
+#define USE_DEBUG
+#define MBCLASSNAME "SUIT_Application"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
/*!
\class StatusLabel
myStatusLabel( 0 ),
myPostRoutines( QList<PostRoutine>() )
{
+ DBG_FUN();
if ( SUIT_Session::session() )
SUIT_Session::session()->insertApplication( this );
}
*/
SUIT_Application::~SUIT_Application()
{
+ DBG_FUN();
SUIT_Study* s = myStudy;
setActiveStudy( 0 );
delete s;
*/
void SUIT_Application::closeApplication()
{
+ DBG_FUN();
+ MSGEL("-----> emit applicationClosed <-----");
emit applicationClosed( this );
}
*/
void SUIT_Application::start()
{
+ DBG_FUN();
if ( desktop() )
desktop()->show();
*/
bool SUIT_Application::useFile( const QString& theFileName )
{
+ DBG_FUN();
+ ARG(theFileName);
+
createEmptyStudy();
SUIT_Study* study = activeStudy();
*/
void SUIT_Application::createEmptyStudy()
{
+ DBG_FUN();
if ( !activeStudy() )
setActiveStudy( createNewStudy() );
}
*/
void SUIT_Application::putInfo( const QString& msg, const int msec )
{
+ DBG_FUN();
+ ARG(msg);
if ( !desktop() )
return;
*/
void SUIT_Application::onInfoClear()
{
+ DBG_FUN();
if ( !myStatusLabel )
return;
*/
SUIT_Application* SUIT_Application::startApplication( int argc, char** argv ) const
{
+ DBG_FUN();
return startApplication( objectName(), argc, argv );
}
*/
SUIT_Application* SUIT_Application::startApplication( const QString& name, int argc, char** argv ) const
{
+ DBG_FUN();
+ ARG(name);
SUIT_Session* session = SUIT_Session::session();
if ( !session )
return 0;
*/
void SUIT_Application::setDesktop( SUIT_Desktop* desk )
{
+ DBG_FUN();
if ( myDesktop == desk )
return;
*/
SUIT_Study* SUIT_Application::createNewStudy()
{
+ DBG_FUN();
return new SUIT_Study( this );
}
*/
void SUIT_Application::setActiveStudy( SUIT_Study* study )
{
+ DBG_FUN();
if ( myStudy == study )
return;
QObject* parent, const bool toggle, QObject* reciever,
const char* member, const QString& shortcutAction )
{
+ MSGEL("...SUIT_Application::createAction(menu=\"" << menu.toStdString() << "\", text=\"" << text.toStdString() << "\"");
QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle, shortcutAction );
a->setStatusTip( tip );
*/
int SUIT_Application::registerAction( const int id, QAction* a )
{
+ MSGEL("...registerAction(" << id << ")");
int ident = actionId( a );
if ( ident != -1 )
return ident;
void SUIT_Application::onDesktopActivated()
{
+ DBG_FUN();
+ MSGEL("-----> emit activated <-----");
emit activated( this );
}
void SUIT_Application::addPostRoutine( PostRoutine theRoutine )
{
+ DBG_FUN();
if ( !myPostRoutines.contains( theRoutine ) )
myPostRoutines << theRoutine;
}
if (myAutoSizeColumns)
adjustColumnsWidth();
}
+ MSGEL("-----> emit updated <-----");
emit updated();
}
#include "SUIT_Selector.h"
#include "SUIT_SelectionFilter.h"
+//---------------------------------------------------------
+#define USE_DEBUG
+#define MBCLASSNAME "SUIT_SelectionMgr"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
/*!\class SUIT_SelectionMgr
* Provide selection manager. Manipulate by selection filters, modes, data owners.
*/
myAutoDelFilter( false ),
myIsSelChangeEnabled( true )
{
+ DBG_FUN();
}
/*!destructor. mySelectors auto delete.*/
SUIT_SelectionMgr::~SUIT_SelectionMgr()
{
+ DBG_FUN();
while( !mySelectors.empty() ) {
SelectorList::iterator it = mySelectors.begin();
delete *it;
/*!Add selector \a sel to selectors list,if it's not exists in list.*/
void SUIT_SelectionMgr::installSelector( SUIT_Selector* sel )
{
+ DBG_FUN();
if ( sel && !mySelectors.contains( sel ) )
mySelectors.append( sel );
}
/*!Remove selector \a sel from list.*/
void SUIT_SelectionMgr::removeSelector( SUIT_Selector* sel )
{
+ DBG_FUN();
mySelectors.removeAll( sel );
}
/*!Gets selectors list to \a lst.*/
void SUIT_SelectionMgr::selectors( QList<SUIT_Selector*>& lst ) const
{
+ DBG_FUN();
lst.clear();
for ( SelectorList::const_iterator it = mySelectors.begin(); it != mySelectors.end(); ++it )
lst.append( *it );
/*!Gets selectors list to \a lst with type \a typ.*/
void SUIT_SelectionMgr::selectors( const QString& typ, QList<SUIT_Selector*>& lst ) const
{
+ DBG_FUN();
+ ARG(typ);
lst.clear();
for ( SelectorList::const_iterator it = mySelectors.begin(); it != mySelectors.end(); ++it )
{
*/
void SUIT_SelectionMgr::setEnabled( const bool on, const QString& typ )
{
+ DBG_FUN();
+ ARG(on);
+ ARG(typ);
for ( SelectorList::const_iterator it = mySelectors.begin(); it != mySelectors.end(); ++it )
{
if ( typ.isEmpty() || (*it)->type() == typ )
*/
void SUIT_SelectionMgr::selected( SUIT_DataOwnerPtrList& lst, const QString& type, const bool onlyOne ) const
{
+ DBG_FUN();
+ ARG(type);
lst.clear();
for ( SelectorList::const_iterator it = mySelectors.begin(); it != mySelectors.end(); ++it )
*/
void SUIT_SelectionMgr::setSelected( const SUIT_DataOwnerPtrList& lst, const bool append )
{
+ DBG_FUN();
SUIT_DataOwnerPtrList owners;
filterOwners( lst, owners );
*/
void SUIT_SelectionMgr::clearSelected()
{
+ DBG_FUN();
setSelected( SUIT_DataOwnerPtrList() );
}
*/
void SUIT_SelectionMgr::selectionChanged( SUIT_Selector* sel )
{
+ DBG_FUN();
if ( !sel || !myIsSelChangeEnabled || !sel->isEnabled() )
return;
*/
void SUIT_SelectionMgr::setSelectionModes( const int mode )
{
+ DBG_FUN();
+ ARG(mode);
QList<int> lst;
lst.append( mode );
setSelectionModes( lst );
*/
void SUIT_SelectionMgr::setSelectionModes( const QList<int>& lst )
{
+ DBG_FUN();
mySelModes = lst;
}
*/
void SUIT_SelectionMgr::appendSelectionModes( const int mode )
{
+ DBG_FUN();
+ ARG(mode);
QList<int> lst;
lst.append( mode );
appendSelectionModes( lst );
*/
void SUIT_SelectionMgr::appendSelectionModes( const QList<int>& lst )
{
+ DBG_FUN();
QMap<int, int> map;
for ( QList<int>::const_iterator it = mySelModes.begin(); it != mySelModes.end(); ++it )
map.insert( *it, 0 );
*/
void SUIT_SelectionMgr::removeSelectionModes( const int mode )
{
+ DBG_FUN();
+ ARG(mode);
QList<int> lst;
lst.append( mode );
removeSelectionModes( lst );
*/
void SUIT_SelectionMgr::removeSelectionModes( const QList<int>& lst )
{
+ DBG_FUN();
QMap<int, int> map;
for ( QList<int>::const_iterator it = mySelModes.begin(); it != mySelModes.end(); ++it )
map.insert( *it, 0 );
*/
void SUIT_SelectionMgr::installFilter( SUIT_SelectionFilter* f, const bool updateSelection )
{
+ DBG_FUN();
if ( !hasFilter( f ) )
{
SUIT_DataOwnerPtrList selOwners;
*/
void SUIT_SelectionMgr::removeFilter( SUIT_SelectionFilter* f )
{
+ DBG_FUN();
if ( !myFilters.contains( f ) )
return;
*/
void SUIT_SelectionMgr::clearFilters()
{
+ DBG_FUN();
if ( autoDeleteFilter() )
{
for ( SelFilterList::const_iterator it = myFilters.begin(); it != myFilters.end(); ++it )
*/
void SUIT_SelectionMgr::setAutoDeleteFilter( const bool on )
{
+ DBG_FUN();
+ ARG(on);
myAutoDelFilter = on;
}
#include <QObject>
+//---------------------------------------------------------
+#define USE_DEBUG
+#define MBCLASSNAME "SUIT_Selector"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
/*!\class SUIT_Selector::Destroyer
Class provide the watching for qobject parent class of the selector.
*/
SUIT_Selector* mySelector;
};
+#undef MBCLASSNAME
+#define MBCLASSNAME "SUIT_Selector::Destroyer"
SUIT_Selector::Destroyer::Destroyer( SUIT_Selector* s, QObject* p )
: QObject( p ),
mySelector( s )
{
+ DBG_FUN();
}
SUIT_Selector::Destroyer::~Destroyer()
{
+ DBG_FUN();
SUIT_Selector* s = mySelector;
mySelector = 0;
if ( s )
void SUIT_Selector::Destroyer::setSelector( SUIT_Selector* s )
{
+ DBG_FUN();
mySelector = s;
}
+#undef MBCLASSNAME
+#define MBCLASSNAME "SUIT_Selector"
/*!\class SUIT_Selector
* Class provide selector for data owners.
*/
myAutoBlock( true ),
myDestroyer( 0 )
{
+ DBG_FUN();
if ( selMgr )
selMgr->installSelector( this );
*/
SUIT_Selector::~SUIT_Selector()
{
+ DBG_FUN();
if ( selectionMgr() )
selectionMgr()->removeSelector( this );
*/
void SUIT_Selector::setEnabled( const bool on )
{
+ DBG_FUN();
+ ARG(on);
myEnabled = on;
}
*/
void SUIT_Selector::setAutoBlock( const bool on )
{
+ DBG_FUN();
+ ARG(on);
myAutoBlock = on;
}
*/
void SUIT_Selector::setSelected( const SUIT_DataOwnerPtrList& lst )
{
+ DBG_FUN();
if ( !isEnabled() )
return;
*/
void SUIT_Selector::selectionChanged()
{
+ DBG_FUN();
if ( selectionMgr() && isEnabled() && ( !autoBlock() || !myBlock ) )
selectionMgr()->selectionChanged( this );
}
#include <dlfcn.h>
#endif
+//---------------------------------------------------------
+#define USE_DEBUG
+#define MBCLASSNAME "SUIT_Session"
+#include "MBDebug.h"
+#include "MBSUIT.h"
+//---------------------------------------------------------
+
SUIT_Session* SUIT_Session::mySession = 0;
/*! Constructor.*/
myExitStatus( NORMAL ),
myExitFlags ( 0 )
{
+ DBG_FUN();
SUIT_ASSERT( !mySession )
mySession = this;
/*!destructor. Clear applications list and set mySession to zero.*/
SUIT_Session::~SUIT_Session()
{
+ DBG_FUN();
for ( AppList::iterator it = myAppList.begin(); it != myAppList.end(); ++it )
delete *it;
SUIT_Application* SUIT_Session::startApplication( const QString& name, int /*args*/, char** /*argv*/ )
{
+ DBG_FUN();
+ ARG(name);
AppLib libHandle = 0;
QString appName = applicationName( name );
void SUIT_Session::insertApplication( SUIT_Application* app )
{
+ DBG_FUN();
if ( !app || myAppList.contains( app ) )
return;
*/
void SUIT_Session::onApplicationClosed( SUIT_Application* theApp )
{
+ DBG_FUN();
emit applicationClosed( theApp );
myAppList.removeAll( theApp );
*/
void SUIT_Session::closeSession( int mode, int flags )
{
+ DBG_FUN();
+ ARG(mode);
AppList apps = myAppList;
for ( AppList::const_iterator it = apps.begin(); it != apps.end(); ++it )
{
*/
SUIT_Session::AppLib SUIT_Session::loadLibrary( const QString& name, QString& libName )
{
+ DBG_FUN();
+ ARG(name);
QString libFile = SUIT_Tools::library( name );
libName = libFile;
*/
SUIT_ResourceMgr* SUIT_Session::createResourceMgr( const QString& appName ) const
{
+ DBG_FUN();
+ ARG(appName);
return new SUIT_ResourceMgr( applicationName( appName ) );
}
*/
void SUIT_Session::onApplicationActivated( SUIT_Application* app )
{
+ DBG_FUN();
myActiveApp = app;
}
#include "SUIT_ViewModel.h"
#include "SUIT_ViewWindow.h"
+//---------------------------------------------------------
+#define USE_DEBUG
+#define MBCLASSNAME "SUIT_ViewModel"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
SUIT_ViewModel::InteractionStyle2StatesMap SUIT_ViewModel::myStateMap;
SUIT_ViewModel::InteractionStyle2ButtonsMap SUIT_ViewModel::myButtonMap;
/*!Constructor.*/
SUIT_ViewModel::SUIT_ViewModel()
{
+ DBG_FUN();
if ( !isInitialized )
{
isInitialized = true;
/*!Destructor..*/
SUIT_ViewModel::~SUIT_ViewModel()
{
+ DBG_FUN();
}
/*!Create new instance of view window on desktop \a theDesktop.
*/
SUIT_ViewWindow* SUIT_ViewModel::createView(SUIT_Desktop* theDesktop)
{
+ DBG_FUN();
return new SUIT_ViewWindow(theDesktop);
}
*/
void SUIT_ViewModel::setViewManager(SUIT_ViewManager* theViewManager)
{
+ DBG_FUN();
myViewManager = theViewManager;
}
#include <QApplication>
#include <QContextMenuEvent>
+//---------------------------------------------------------
+#define USE_DEBUG
+#define MBCLASSNAME "SUIT_ViewWindow"
+#include "MBDebug.h"
+//---------------------------------------------------------
+
/*!\class SUIT_ViewWindow
* Class provide view window.
*/
SUIT_ViewWindow::SUIT_ViewWindow( SUIT_Desktop* theDesktop )
: QMainWindow( theDesktop ), myManager( 0 ), myIsDropDown( true ), mySyncAction( 0 )
{
+ DBG_FUN();
myDesktop = theDesktop;
setWindowIcon( myDesktop ? myDesktop->windowIcon() : QApplication::windowIcon() );
/*! Destructor.*/
SUIT_ViewWindow::~SUIT_ViewWindow()
{
+ DBG_FUN();
}
/*!
*/
void SUIT_ViewWindow::setViewManager( SUIT_ViewManager* theManager )
{
+ DBG_FUN();
myManager = theManager;
}
*/
QImage SUIT_ViewWindow::dumpView()
{
+ DBG_FUN();
return QImage();
}
*/
bool SUIT_ViewWindow::dumpViewToFormat( const QImage& img, const QString& fileName, const QString& format )
{
+ DBG_FUN();
+ ARG(fileName);
+ ARG(format);
if( img.isNull() )
return false;
*/
void SUIT_ViewWindow::setDestructiveClose( const bool on )
{
+ DBG_FUN();
setAttribute( Qt::WA_DeleteOnClose, on );
}
*/
void SUIT_ViewWindow::closeEvent( QCloseEvent* e )
{
+ DBG_FUN();
e->ignore();
emit tryClosing( this );
if ( closable() ) emit closing( this );
*/
void SUIT_ViewWindow::contextMenuEvent( QContextMenuEvent* e )
{
+ DBG_FUN();
e->ignore();
QMainWindow::contextMenuEvent( e );
*/
void SUIT_ViewWindow::onDumpView()
{
+ DBG_FUN();
// VSV (TRIPOLI dev): next line commented: causes error messages
//QApplication::postEvent( this, new QPaintEvent( QRect( 0, 0, width(), height() ) ) );
QApplication::postEvent( this, new QEvent( (QEvent::Type)DUMP_EVENT ) );
*/
void SUIT_ViewWindow::setVisualParameters( const QString& /*parameters*/ )
{
+ DBG_FUN();
}
/*!
*/
void SUIT_ViewWindow::synchronize( SUIT_ViewWindow* /*otherWindow*/ )
{
+ DBG_FUN();
// base implementation does nothing
}
*/
QAction* SUIT_ViewWindow::synchronizeAction()
{
+ DBG_FUN();
if ( !mySyncAction ) {
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
mySyncAction = new QtxAction( tr( "MNU_SYNCHRONIZE_VIEW" ),
*/
void SUIT_ViewWindow::updateSyncViews()
{
+ DBG_FUN();
SUIT_CameraProperties props = cameraProperties();
if ( !props.isValid() )
return;
*/
void SUIT_ViewWindow::onSynchronizeView( bool /*checked*/ )
{
+ DBG_FUN();
QAction* a = qobject_cast<QAction*>( sender() );
if ( a ) {
synchronizeView( this, a->data().toInt() );
*/
void SUIT_ViewWindow::synchronizeView( SUIT_ViewWindow* viewWindow, int id )
{
+ DBG_FUNC();
SUIT_ViewWindow* sourceView = 0;
QList<SUIT_ViewWindow*> otherViews;
void SUIT_ViewWindow::setVisible( bool on )
{
+ DBG_FUN();
+ ARG(on);
// This is a workaround to avoid showing view window as a top-level window
// before re-parenting it to workstack (issue #23467).
// See SUIT_Desktop::childEvent().
if ( !aSelectedIndexes.isEmpty() )
ob->treeView()->scrollTo( aSelectedIndexes.first() );
}
+ MSGEL("-----> emit objectDoubleClicked <-----");
emit objectDoubleClicked( theObj );
}
#ifndef DISABLE_PYCONSOLE
// emit signal to restore study from Python script
if ( myNoteBook ) {
+ MSGEL("-----> emit dumpedStudyClosed <-----");
emit dumpedStudyClosed( myNoteBook->getDumpedStudyScript(),
myNoteBook->getDumpedStudyName(),
myNoteBook->isDumpedStudySaved() );
{
DBG_FUN();
ARG(theVarName);
+ MSGEL("-----> emit notebookVarUpdate(\"" << theVarName.toStdString() << "\") <-----");
emit notebookVarUpdated( theVarName );
}
#endif
myStudyDS->attach(myObserver->_this(),true);
#endif
+ MSGEL("-----> emit created <-----");
emit created( this );
return aRet;
res = CAM_Study::openDocument( theFileName );
+ MSGEL("-----> emit opened <-----");
emit opened( this );
myStudyDS->IsSaved(true);
//rnv: to fix the "0051779: TC7.2.0: Save operation works incorrectly for study loaded from data server"
// mark study as "not saved" after call openDocument( ... ) method.
setIsSaved(false);
+ MSGEL("-----> emit opened <-----");
emit opened( this ); // myRoot is set to Object Browser here
// this will build a SUIT_DataObject-s tree under myRoot member field
res = res && saveStudyData(theFileName, 0); // 0 means persistence file
- if ( res )
+ if ( res ) {
+ MSGEL("-----> emit saved <-----");
emit saved( this );
+ }
return res;
}
bool res = studyDS()->Save( isMultiFile, isAscii ) && CAM_Study::saveDocument();
res = res && saveStudyData(studyName(), 0); // 0 means persistence file
- if ( res )
+ if ( res ) {
+ MSGEL("-----> emit saved <-----");
emit saved( this );
+ }
return res;
}