const QString& theParentEntry,
const bool theIsInOperation )
: CAM_DataObject( theParent ),
+#ifndef TEST_MODE
LightApp_DataObject( theParent ),
+#endif
myData( theData ),
myParentEntry( theParentEntry ),
myIsValid( true ),
QString HYDROGUI_DataObject::entry() const
{
QString anEntry = HYDROGUI_DataObject::dataObjectEntry( modelObject() );
- if( isReference() )
+ if( !refEntry().isEmpty() )
anEntry.prepend( myParentEntry + "_" );
return anEntry;
}
QFont HYDROGUI_DataObject::font( const int theId ) const
{
- QFont aFont = LightApp_DataObject::font( theId );
+ QFont aFont = PARENT::font( theId );
if( theId == NameId )
{
Handle(HYDROData_Entity) aDataObject = modelObject();
}
if ( !aColor.isValid() ) {
- aColor = LightApp_DataObject::color( theRole, theId );
+ aColor = PARENT::color( theRole, theId );
}
return aColor;
return aResMgr->loadPixmap( "HYDRO", anIcon );
}
- return LightApp_DataObject::icon( theId );
+ return PARENT::icon( theId );
}
QString HYDROGUI_DataObject::dataObjectEntry( const Handle(HYDROData_Entity)& theObject,
}
else
{
- aRes = LightApp_DataObject::renameAllowed( theColumnId );
+ aRes = PARENT::renameAllowed( theColumnId );
}
return aRes;
}
const QString& theParentEntry,
const bool theIsInOperation )
: CAM_DataObject( theParent ),
+#ifndef TEST_MODE
LightApp_DataObject( theParent ),
+#endif
myName( theName ),
myParentEntry( theParentEntry ),
myIsInOperation( theIsInOperation )
{
return aResMgr->loadPixmap( "HYDRO", QObject::tr( "PARTITION_ICO" ) );
}
- return LightApp_DataObject::icon( theId );
+ return PARENT::icon( theId );
}
QFont HYDROGUI_NamedObject::font( const int theId ) const
{
- QFont aFont = LightApp_DataObject::font( theId );
+ QFont aFont = PARENT::font( theId );
if( theId == NameId )
{
if ( dynamic_cast<CAM_ModuleObject*>( parent() ) )
#pragma warning( disable: 4251 )
#endif
-#include <LightApp_DataObject.h>
+#ifdef TEST_MODE
+ #include <CAM_DataObject.h>
+ enum {
+ EntryId = CAM_DataObject::VisibilityId + 1, //!< entry column
+ RefEntryId //!< reference entry column
+ };
+ #define PARENT CAM_DataObject
+#else
+ #include <LightApp_DataObject.h>
+ #define PARENT LightApp_DataObject
+#endif
+
#include <QString>
#include <QMap>
#include <QPixmap>
* This class inherits CAM_DataObject virtually, so it is necessary to call in the class
* constructor the CAM object constructor manually for the correct initialization
*/
-class HYDROGUI_DataObject : public LightApp_DataObject
+class HYDROGUI_DataObject : public PARENT
{
public:
//! Column id
* This class inherits CAM_DataObject virtually, so it is necessary to call in the class
* constructor the CAM object constructor manually for the correct initialization
*/
-class HYDROGUI_NamedObject : public virtual LightApp_DataObject
+class HYDROGUI_NamedObject : public virtual PARENT
{
public:
/**
#include "HYDROGUI_OrderedListWidget.h"
-#include <LightApp_DataOwner.h>
+#ifdef TEST_MODE
+ #include <SUIT_DataOwner.h>
+ class TestOwner : public SUIT_DataOwner
+ {
+ public:
+ TestOwner( const QString& entry ) { myEntry = entry; }
+ virtual ~TestOwner() {}
+
+ QString keyString() const { return myEntry; }
+ QString entry() const { return myEntry; }
+
+ private:
+ QString myEntry;
+ };
+ #define OWNER_CLASS TestOwner
+
+#else
+ #include <LightApp_DataOwner.h>
+ #define OWNER_CLASS LightApp_DataOwner
+#endif
HYDROGUI_ListSelector::HYDROGUI_ListSelector( HYDROGUI_OrderedListWidget* theListWidget,
foreach ( const QString& anEntry, aSelectedEntries ) {
if ( !anEntry.isEmpty() ) {
- theList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( anEntry ) ) );
+ theList.append( SUIT_DataOwnerPtr( new OWNER_CLASS( anEntry ) ) );
}
}
}
QStringList aSelectedEntries;
SUIT_DataOwnerPtrList::const_iterator anIt = theList.begin();
for ( ; anIt != theList.end(); ++anIt ) {
- const LightApp_DataOwner* anOwner = dynamic_cast<const LightApp_DataOwner*>( (*anIt).operator->() );
+ const OWNER_CLASS* anOwner = dynamic_cast<const OWNER_CLASS*>( (*anIt).operator->() );
if ( anOwner ) {
aSelectedEntries << anOwner->entry();
}
: HYDROGUI_InputPanel( theModule, theTitle, true, isSplitter )
{
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- SUIT_Study* aStudy = theModule ? theModule->getApp()->activeStudy() : 0;
+ SUIT_Study* aStudy = theModule ? theModule->application()->activeStudy() : 0;
myViewManager = new OCCViewer_ViewManager( aStudy, 0 );
OCCViewer_Viewer* aViewer = new OCCViewer_Viewer( true );
SUIT_SelectionMgr* HYDROGUI_ViewerDlg::selectionMgr() const
{
+#ifdef TEST_MODE
+ static SUIT_SelectionMgr* mgr = new SUIT_SelectionMgr();
+ return mgr;
+#else
SUIT_SelectionMgr* aSelMgr = 0;
if ( module() )
{
aSelMgr = app->selectionMgr();
}
return aSelMgr;
+#endif
}
void HYDROGUI_ViewerDlg::onMouseMove( SUIT_ViewWindow* theViewWindow, QMouseEvent* theEvent )
ENDIF()
link_directories( $ENV{KERNEL_ROOT_DIR}/lib/salome $ENV{GUI_ROOT_DIR}/lib/salome $ENV{GEOM_ROOT_DIR}/lib/salome )
-SET( GUI_LIBRARIES ImageComposer qtx suit LightApp CAM OCCViewer )
+
+SET( GUI_LIBRARIES ImageComposer qtx suit CAM OCCViewer GraphicsView )
+# Please do not link with LightApp since in the full SALOME it is linked with CORBA (omniORB)
+
SET( GEOM_LIBRARIES CurveCreator GEOMUtils GEOMUtils )
link_directories( $ENV{ECWLIB_ROOT_DIR}/lib )