Version: 6.3.1
Data Structures | Defines | Typedefs | Functions | Variables

src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx File Reference

#include "SALOME_PYQT_PyInterp.h"
#include <SUITApp_init_python.hxx>
#include <PyInterp_Interp.h>
#include <PyConsole_Interp.h>
#include <PyConsole_Console.h>
#include <PyInterp_Dispatcher.h>
#include "SALOME_PYQT_ModuleLight.h"
#include "SALOME_PYQT_DataModelLight.h"
#include <Container_init_python.hxx>
#include <SUIT_ResourceMgr.h>
#include <SUIT_DataObjectIterator.h>
#include <SUIT_Desktop.h>
#include <SUIT_ViewModel.h>
#include <SUIT_ViewWindow.h>
#include <SUIT_ViewManager.h>
#include <STD_MDIDesktop.h>
#include <STD_TabDesktop.h>
#include <LightApp_Preferences.h>
#include <LightApp_Application.h>
#include <LightApp_Study.h>
#include <QtxWorkstack.h>
#include <QtxWorkspace.h>
#include <QtxActionGroup.h>
#include <QtxActionMenuMgr.h>
#include <QtxActionToolMgr.h>
#include <QFile>
#include <QDomDocument>
#include <QDomNode>
#include <QDomElement>
#include <QMenuBar>
#include <QMenu>
#include <QAction>
#include "sipAPISalomePyQtGUILight.h"
#include <sip.h>
#include "sipQtGuiQWidget.h"
#include "sipQtGuiQMenu.h"
#include <utilities.h>
Include dependency graph for SALOME_PYQT_ModuleLight.cxx:

Data Structures

class  SALOME_PYQT_ModuleLight.XmlHandler
class  FuncMsg
 Function call in/out tracer. More...

Defines

#define PY_SSIZE_T_MAX   INT_MAX
#define PY_SSIZE_T_MIN   INT_MIN
#define INIT_FUNCTION   initSalomePyQtGUILight

Typedefs

typedef int Py_ssize_t

Functions

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

Variables

const char * DEFAULT_NAME = "SALOME_PYQT_ModuleLight"
 Default name of the module, replaced at the moment of module creation.
const int DEFAULT_GROUP = 40
 Default menu group number.
const bool IsCallOldMethods = false
 Allow calling obsolete callback methods.

Define Documentation

#define PY_SSIZE_T_MAX   INT_MAX
#define PY_SSIZE_T_MIN   INT_MIN
#define INIT_FUNCTION   initSalomePyQtGUILight

Typedef Documentation

typedef int Py_ssize_t

Function Documentation

PyMODINIT_FUNC INIT_FUNCTION ( )
CAM_Module* createModule ( )
static QString tagName ( const QDomElement &  element) [static]
Parameters:
elementDOM element
Returns:
empty string if the element does not have tag name
static QString attribute ( const QDomElement &  element,
const QString &  attName 
) [static]
Parameters:
elementDOM element
attNameattribute name
Returns:
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)

Variable Documentation

const char* DEFAULT_NAME = "SALOME_PYQT_ModuleLight"
const int DEFAULT_GROUP = 40

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 Makefile.

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS