Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SALOME_PYQT_PyModule.cxx File Reference
#include "SALOME_PYQT_PyModule.h"
#include "SALOME_PYQT_PyInterp.h"
#include "LightApp_Application.h"
#include "LightApp_DataObject.h"
#include "LightApp_Module.h"
#include "LightApp_Study.h"
#include "PyInterp_Dispatcher.h"
#include "QtxActionMenuMgr.h"
#include "QtxWorkspace.h"
#include "QtxWorkstack.h"
#include "STD_MDIDesktop.h"
#include "STD_TabDesktop.h"
#include "SUITApp_init_python.hxx"
#include "SUIT_ResourceMgr.h"
#include "SUIT_ViewManager.h"
#include "SUIT_ViewModel.h"
#include "SUIT_ViewWindow.h"
#include <QApplication>
#include <QDomDocument>
#include <QDomElement>
#include <QDomNode>
#include <QFile>
#include <QMenu>
#include <QMutex>
#include <utilities.h>
#include "sipAPISalomePyQtGUILight.h"

Classes

class  FuncMsg
 Function call in/out tracer. More...
 
class  PyModuleHelper::InitLocker
 Initialization locker. More...
 
class  PyModuleHelper::XmlHandler
 XML resource files parser. More...
 

Functions

static QString tagName (const QDomElement &element)
 Get tag name for the DOM element. More...
 
static QString attribute (const QDomElement &element, const QString &attName)
 Get value of DOM element's attribute. More...
 
static bool checkBool (const QString &value, const int check=-1)
 Inspect specified string for the boolean value. More...
 
static int checkInt (const QString &value, const int def=-1, const int shift=-1)
 Inspect specified string for the integer value. More...
 

Variables

const int DEFAULT_GROUP = 40
 Default menu group number. More...
 
QMutex myInitMutex
 Mutex used to lock access from several threads to the shared (static) data. More...
 
const bool DEBUG = false
 
const bool IsCallOldMethods = false
 Allow calling obsolete callback methods. More...
 

Function Documentation

static QString attribute ( const QDomElement &  element,
const QString &  attName 
)
static
Parameters
elementDOM element
attNameattribute name
Returns
attribute value or empty string if the element does not have such attribute
static bool checkBool ( const QString &  value,
const int  check = -1 
)
static

This function returns true if string represents boolean value:

  • "true", "yes" or "1" for true
  • "false", "no" or "0" for false Second parameter allows to specify what boolean value is expected:
  • 1: true
  • 0: false
  • other value is not taken into account (return represented value)
Parameters
valueinspected string
checkexpected boolean value
Returns
boolean value represented by the string (check is not 1 or 0) or true if value correspond to the specified check
static int checkInt ( const QString &  value,
const int  def = -1,
const int  shift = -1 
)
static

This function returns returns -1 if item is empty or represents an invalid number.

Parameters
valueinspected string
defdefault value
shiftshift value (it is added to the integer value to produce shifted result)
static QString tagName ( const QDomElement &  element)
static
Parameters
elementDOM element
Returns
tag name or empty string if the element does not have tag name

Variable Documentation

const bool DEBUG = false

DEBUG mode

const int DEFAULT_GROUP = 40
IsCallOldMethods = false

If the macro CALL_OLD_METHODS is not defined, the invoking of obsolete Python module's methods like setSetting(), definePopup(), etc. is blocked.

CALL_OLD_METHODS macro can be defined, for example, by adding -DCALL_OLD_METHODS compilation option to the CMakeLists.txt.

QMutex myInitMutex