Version: 9.12.0
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 theDEBUG = false
 
const bool IsCallOldMethods = false
 Allow calling obsolete callback methods. More...
 

Function Documentation

◆ attribute()

static QString attribute ( const QDomElement &  element,
const QString &  attName 
)
static

Get value of DOM element's attribute.

Parameters
elementDOM element
attNameattribute name
Returns
attribute value or empty string if the element does not have such attribute

◆ checkBool()

static bool checkBool ( const QString &  value,
const int  check = -1 
)
static

Inspect specified string for the boolean value.

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

◆ checkInt()

static int checkInt ( const QString &  value,
const int  def = -1,
const int  shift = -1 
)
static

Inspect specified string for the integer value.

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)

◆ tagName()

static QString tagName ( const QDomElement &  element)
static

Get tag name for the DOM element.

Parameters
elementDOM element
Returns
tag name or empty string if the element does not have tag name

Variable Documentation

◆ DEFAULT_GROUP

const int DEFAULT_GROUP = 40

Default menu group number.

◆ IsCallOldMethods

IsCallOldMethods = false

Allow calling obsolete callback methods.

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.

◆ myInitMutex

QMutex myInitMutex

Mutex used to lock access from several threads to the shared (static) data.

◆ theDEBUG

const bool theDEBUG = false

DEBUG mode