// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-using namespace std;
-
#include "ATOMICGUI.h"
#include "ATOMICGUI_DataModel.h"
#include <qaction.h>
+using namespace std;
+
/*! Constructor */
ATOMICGUI::ATOMICGUI()
: LightApp_Module( "ATOMICGUI" )
#if !defined(ATOMICGUI_H)
#define ATOMICGUI_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include <LightApp_Module.h>
/*!
* Class : ATOMICGUI
* Description : GUI module class for ATOMIC component
*/
-class ATOMICGUI: public LightApp_Module
+class ATOMICGUI_EXPORT ATOMICGUI: public LightApp_Module
{
Q_OBJECT
enum { agCreateMol,
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library 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
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File : ATOMICGUI_ATOMICGUI.hxx
+// Author : Roman NIKOLAEV, Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
+//
+#ifndef ATOMICGUI_ATOMICGUI_HXX
+#define ATOMICGUI_ATOMICGUI_HXX
+
+#if defined WIN32
+# if defined ATOMICGUI_EXPORTS || defined ATOMIC_EXPORTS
+# define ATOMICGUI_EXPORT __declspec( dllexport )
+# else
+# define ATOMICGUI_EXPORT __declspec( dllimport )
+# endif
+#else
+# define ATOMICGUI_EXPORT
+#endif
+
+#endif // ATOMICGUI_ATOMICGUI_HXX
#if !defined(ATOMICGUI_ATOMDLG_H)
#define ATOMICGUI_ATOMDLG_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include <LightApp_Dialog.h>
class QtxDoubleSpinBox;
* Class : ATOMICGUI_AddAtomDlg
* Description : Dialog for Atom creation
*/
-class ATOMICGUI_AddAtomDlg : public LightApp_Dialog
+class ATOMICGUI_EXPORT ATOMICGUI_AddAtomDlg : public LightApp_Dialog
{
Q_OBJECT
#include "ATOMICGUI_Operation.h"
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
class ATOMICGUI_AddAtomDlg;
/*!
* Description : Operation class for Atom creation
* Uses ATOMICGUI_AddAtomDlg class
*/
-class ATOMICGUI_AddAtomOp : public ATOMICGUI_Operation
+class ATOMICGUI_EXPORT ATOMICGUI_AddAtomOp : public ATOMICGUI_Operation
{
Q_OBJECT
#ifndef ATOMICGUI_CREATECONF_OP_H
#define ATOMICGUI_CREATECONF_OP_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include "ATOMICGUI_Operation.h"
/*!
* Class : ATOMICGUI_AddAtomOp
* Description : Operation class for Molecule creation
*/
-class ATOMICGUI_CreateMolOp : public ATOMICGUI_Operation
+class ATOMICGUI_EXPORT ATOMICGUI_CreateMolOp : public ATOMICGUI_Operation
{
Q_OBJECT
/*! Removes an atom from molecule by index */
void ATOMICGUI_AtomicMolecule::deleteAtom( const int index )
{
- if ( index >= 0 and index < myAtoms.count() )
+ if ( index >= 0 && index < myAtoms.count() )
myAtoms.removeAt( index );
}
/*! Gets an atom id by index */
int ATOMICGUI_AtomicMolecule::atomId( const int index ) const
{
- if ( index >= 0 and index < myAtoms.count() )
+ if ( index >= 0 && index < myAtoms.count() )
return myAtoms[ index ].id();
return 0;
}
QString ATOMICGUI_AtomicMolecule::atomName( const int index ) const
{
QString n;
- if ( index >= 0 and index < myAtoms.count() )
+ if ( index >= 0 && index < myAtoms.count() )
n = myAtoms[ index ].name();
return n;
}
/*! Gets an atom x coordinate by index */
double ATOMICGUI_AtomicMolecule::atomX( const int index ) const
{
- if ( index >= 0 and index < myAtoms.count() )
+ if ( index >= 0 && index < myAtoms.count() )
return myAtoms[ index ].x();
return 0;
}
/*! Gets an atom y coordinate by index */
double ATOMICGUI_AtomicMolecule::atomY( const int index ) const
{
- if ( index >= 0 and index < myAtoms.count() )
+ if ( index >= 0 && index < myAtoms.count() )
return myAtoms[ index ].y();
return 0;
}
/*! Gets an atom z coordinate by index */
double ATOMICGUI_AtomicMolecule::atomZ( const int index ) const
{
- if ( index >= 0 and index < myAtoms.count() )
+ if ( index >= 0 && index < myAtoms.count() )
return myAtoms[ index ].z();
return 0;
}
{
if ( index < 0 )
myName = name;
- else if ( index >= 0 and index < myAtoms.count() )
+ else if ( index >= 0 && index < myAtoms.count() )
myAtoms[ index ].myName = name;
}
#if !defined(ATOMICGUI_DATA_H)
#define ATOMICGUI_DATA_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include <qlist.h>
#include <qstring.h>
* Class : ATOMICGUI_AtomicMolecule, ATOMICGUI_AtomicMolecule::Atom
* Description : Core classes for data of ATOMIC component
*/
-class ATOMICGUI_AtomicMolecule
+class ATOMICGUI_EXPORT ATOMICGUI_AtomicMolecule
{
private:
#if !defined(ATOMICGUI_DATAMODEL_H)
#define ATOMICGUI_DATAMODEL_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include "ATOMICGUI_Data.h"
#include <LightApp_DataModel.h>
#include <qlist.h>
* Class : ATOMICGUI_DataModel
* Description : Data Model of ATOMIC component
*/
-class ATOMICGUI_DataModel : public LightApp_DataModel
+class ATOMICGUI_EXPORT ATOMICGUI_DataModel : public LightApp_DataModel
{
Q_OBJECT
#if !defined(ATOMICGUI_DATAOBJECT_H)
#define ATOMICGUI_DATAOBJECT_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include <LightApp_DataObject.h>
#include <qstring.h>
* If it is an Atom then myIndex field is >= 0
* For Molecule myIndex equals to -1.
*/
-class ATOMICGUI_DataObject : public virtual LightApp_DataObject
+class ATOMICGUI_EXPORT ATOMICGUI_DataObject : public virtual LightApp_DataObject
{
public:
ATOMICGUI_DataObject ( SUIT_DataObject*, ATOMICGUI_AtomicMolecule* = 0, int = -1 );
int myIndex;
};
-class ATOMICGUI_ModuleObject : public ATOMICGUI_DataObject,
+class ATOMICGUI_EXPORT ATOMICGUI_ModuleObject : public ATOMICGUI_DataObject,
public LightApp_ModuleObject
{
public:
#ifndef ATOMICGUI_DELETEOP_OP_H
#define ATOMICGUI_DELETEOP_OP_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include "ATOMICGUI_Operation.h"
/*!
* Class : ATOMICGUI_DeleteOp
* Description : Operation for objects removal in ATOMIC component
*/
-class ATOMICGUI_DeleteOp : public ATOMICGUI_Operation
+class ATOMICGUI_EXPORT ATOMICGUI_DeleteOp : public ATOMICGUI_Operation
{
Q_OBJECT
#include "ATOMICGUI_Operation.h"
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
/*!
* Class : ATOMICGUI_ImportExportOp
* Description : Operation for Import and Export of data structure to/from
* an external file in XML format in ATOMIC component
*/
-class ATOMICGUI_ImportExportOp : public ATOMICGUI_Operation
+class ATOMICGUI_EXPORT ATOMICGUI_ImportExportOp : public ATOMICGUI_Operation
{
Q_OBJECT
#ifndef ATOMICGUI_OPERATION_H
#define ATOMICGUI_OPERATION_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include <LightApp_Operation.h>
class ATOMICGUI_DataModel;
* Class : ATOMICGUI_AddAtomDlg
* Description : Base Operation class for ATOMIC component
*/
-class ATOMICGUI_Operation : public LightApp_Operation
+class ATOMICGUI_EXPORT ATOMICGUI_Operation : public LightApp_Operation
{
Q_OBJECT
#ifndef ATOMICGUI_RENAME_OP_H
#define ATOMICGUI_RENAME_OP_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include "ATOMICGUI_Operation.h"
/*!
* Class : ATOMICGUI_DeleteOp
* Description : Operation for objects rename in ATOMIC component
*/
-class ATOMICGUI_RenameOp : public ATOMICGUI_Operation
+class ATOMICGUI_EXPORT ATOMICGUI_RenameOp : public ATOMICGUI_Operation
{
Q_OBJECT
#if !defined(ATOMICGUI_SELECTION_H)
#define ATOMICGUI_SELECTION_H
+#include "ATOMICGUI_ATOMICGUI.hxx"
+
#include <QtxPopupMgr.h>
#include <LightApp_Selection.h>
* Description : Selection class for ATOMIC component.
* Computation of object parameters for popup manager.
*/
-class ATOMICGUI_Selection : public LightApp_Selection
+class ATOMICGUI_EXPORT ATOMICGUI_Selection : public LightApp_Selection
{
public:
ATOMICGUI_Selection ();
ATOMICGUI_Data.h
ATOMICGUI_DataObject.h
ATOMICGUI_Selection.h
+ ATOMICGUI_ATOMICGUI.hxx
)
# header files / to install
ATOMICGUI_CreateMolOp.cxx
ATOMICGUI_RenameOp.cxx
ATOMICGUI_DeleteOp.cxx
- ATOMICGUI_ImportExportOp.cxx
+ ATOMICGUI_ImportExportOp.cxx
)
# sources / to compile