#ifndef CAF_H
#define CAF_H
-#if defined CAF_EXPORTS
#if defined WIN32
-#define CAF_EXPORT __declspec( dllexport )
+# if defined CAF_EXPORTS
+# define CAF_EXPORT __declspec( dllexport )
+# else
+# define CAF_EXPORT __declspec( dllimport )
+# endif
#else
-#define CAF_EXPORT
-#endif
-#else
-#if defined WIN32
-#define CAF_EXPORT __declspec( dllimport )
-#else
-#define CAF_EXPORT
-#endif
+# define CAF_EXPORT
#endif
#if defined SOLARIS
--- /dev/null
+TEMPLATE = lib
+TARGET = caf
+DESTDIR = ../../lib
+MOC_DIR = ../../moc
+OBJECTS_DIR = ../../obj/$$TARGET
+
+INCLUDEPATH += ../../include ../Qtx ../SUIT ../STD
+LIBS += -L../../lib -lqtx -lsuit -lstd
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32
+DEFINES += CAF_EXPORTS
+
+HEADERS = CAF.h
+HEADERS += CAF_Application.h
+HEADERS += CAF_Operation.h
+HEADERS += CAF_Study.h
+HEADERS += CAF_Tools.h
+
+SOURCES = CAF_Application.cxx
+SOURCES += CAF_Operation.cxx
+SOURCES += CAF_Study.cxx
+SOURCES += CAF_Tools.cxx
+
+TRANSLATIONS = resources/CAF_images.ts \
+ resources/CAF_msg_en.ts
+
+ICONS = resources/*.png
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+resources.files = $$ICONS resources/*.qm resources/*.xml resources/*.ini
+resources.path = ../../resources
+
+INSTALLS += includes resources
#include "CAF_Study.h"
#include <SUIT_Desktop.h>
-#include <SUIT_Session.h>
-#include <SUIT_ViewModel.h>
-#include <SUIT_Operation.h>
+//#include <SUIT_Session.h>
+//#include <SUIT_ViewModel.h>
+//#include <SUIT_Operation.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
-#include <QtxListAction.h>
+#include <QtxAction.h>
+//#include <QtxListAction.h>
-#include <qtoolbar.h>
-#include <qmenubar.h>
-#include <qpopupmenu.h>
-#include <qstatusbar.h>
-#include <qapplication.h>
+#include <QMap>
+#include <QStringList>
#include <Resource_Manager.hxx>
-
#include <TColStd_SequenceOfExtendedString.hxx>
+/*!
+ \brief Create new instance of CAF_Application.
+ \return new instance of CAF_Application class
+*/
extern "C" CAF_EXPORT SUIT_Application* createApplication()
{
return new CAF_Application();
}
/*!
- Default constructor
+ \class CAF_Application
+ \brief OCC OCAF-based application.
+
+ Defines application configuration and behaviour for application using
+ standard OCC OCAF data model. Allows using OCC OCAF serives
+ (for example, undo/redo mechanizm).
+*/
+
+/*!
+ \brief Default constructor.
*/
CAF_Application::CAF_Application()
: STD_Application()
}
/*!
- Constructor with OCAF application
- \param app - OCAF application
+ \brief Constructor.
+ \param app OCAF application
*/
CAF_Application::CAF_Application( const Handle( TDocStd_Application )& app )
: STD_Application(),
-myStdApp( app )
+ myStdApp( app )
{
}
/*!
- Destructor
+ \brief Destructor.
*/
CAF_Application::~CAF_Application()
{
}
/*!
+ \brief Get application name.
\return application name
*/
QString CAF_Application::applicationName() const
}
/*!
- \return OCAF application
+ \brief Get OCAF application.
+ \return handle to OCAF application object
*/
Handle( TDocStd_Application ) CAF_Application::stdApp() const
{
}
/*!
- \return file filters for open/save document
+ \brief Get file extension filter.
+
+ The file extension filter is used in Open/Save dialog boxes.
+
+ \return file filters for open/save document dialog box
*/
QString CAF_Application::getFileFilter() const
{
{
QString extension;
QString extResStr = CAF_Tools::toQString( formats.Value( i ) ) + QString( ".FileExtension" );
- if ( resMgr->Find( (char*)extResStr.latin1() ) )
- extension = QString( resMgr->Value( (char*)extResStr.latin1() ) );
+ if ( resMgr->Find( extResStr.toLatin1().data() ) )
+ extension = QString( resMgr->Value( extResStr.toLatin1().data() ) );
QString descr;
QString descrResStr = CAF_Tools::toQString( formats.Value( i ) ) + QString( ".Description" );
- if ( resMgr->Find( (char*)descrResStr.latin1() ) )
- descr = QString( resMgr->Value( (char*)descrResStr.latin1() ) );
+ if ( resMgr->Find( (char*)descrResStr.toLatin1().data() ) )
+ descr = QString( resMgr->Value( (char*)descrResStr.toLatin1().data() ) );
if ( !descr.isEmpty() && !extension.isEmpty() )
{
QStringList filters;
for ( QMap<QString, QStringList>::ConstIterator it = wildCards.begin(); it != wildCards.end(); ++it )
- filters.append( QString( "%1 (%2)" ).arg( it.key() ).arg( it.data().join( "; " ) ) );
+ filters.append( QString( "%1 (%2)" ).arg( it.key() ).arg( it.value().join( "; " ) ) );
if ( wildCards.count() > 1 )
filters.prepend( QString( "%1 (%2)" ).arg( tr( "INF_ALL_DOCUMENTS_FILTER" ) ).arg( allWC.join( "; " ) ) );
}
/*!
- Creates actions of application
+ \brief Create menu and toolbars actions.
*/
void CAF_Application::createActions()
{
SUIT_Desktop* desk = desktop();
SUIT_ResourceMgr* resMgr = resourceMgr();
-
+ /*
QtxListAction* editUndo =
new QtxListAction( tr( "TOT_APP_EDIT_UNDO" ), resMgr->loadPixmap( "CAF", tr( "ICON_APP_EDIT_UNDO" ) ),
tr( "MEN_APP_EDIT_UNDO" ), CTRL+Key_Z, desk );
registerAction( EditUndoId, editUndo );
-
+ */
+ /*
QtxListAction* editRedo =
new QtxListAction( tr( "TOT_APP_EDIT_REDO" ), resMgr->loadPixmap( "CAF", tr( "ICON_APP_EDIT_REDO" ) ),
tr( "MEN_APP_EDIT_REDO" ), CTRL+Key_Y, desk );
registerAction( EditRedoId, editRedo );
-
+ */
+ /*
editUndo->setComment( tr( "INF_APP_UNDOACTIONS" ) );
editRedo->setComment( tr( "INF_APP_REDOACTIONS" ) );
connect( editUndo, SIGNAL( activated( int ) ), this, SLOT( onUndo( int ) ) );
connect( editRedo, SIGNAL( activated( int ) ), this, SLOT( onRedo( int ) ) );
-
+ */
int editMenu = createMenu( tr( "MEN_DESK_EDIT" ), -1, -1, 10 );
+ /*
createMenu( EditUndoId, editMenu, 0 );
createMenu( EditRedoId, editMenu, 0 );
+ */
createMenu( separator(), editMenu, -1, 0 );
int stdTBar = createTool( tr( "INF_DESK_TOOLBAR_STANDARD" ) );
createTool( separator(), stdTBar );
+ /*
createTool( EditUndoId, stdTBar );
createTool( EditRedoId, stdTBar );
+ */
createTool( separator(), stdTBar );
}
/*!
- Undo operation on the given document. [ virtual protected ]
+ \brief Undo latest command operation for specified document.
+ \param doc OCAF document
+ \return \c true on success
*/
bool CAF_Application::undo( CAF_Study* doc )
{
}
/*!
- Redo operation on the given document. [ virtual protected ]
+ \brief Redo latest command operation undo for specified document.
+ \param doc OCAF document
+ \return \c true on success
*/
bool CAF_Application::redo(CAF_Study* doc)
{
}
/*!
- Undo operation on the active document. [ virtual protected slot ]
+ \brief Called when user activates "Undo" menu action.
+
+ Undo operation on the active document.
+
+ \param numActions undo depth (number of commands)
+ \return \c true on success
*/
bool CAF_Application::onUndo( int numActions )
{
bool ok = true;
while ( numActions > 0 )
{
- CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( activeStudy() );
- if ( cafStudy )
+ CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( activeStudy() );
+ if ( cafStudy )
{
- if ( !undo( cafStudy ) )
- {
- ok = false;
- break;
- }
- numActions--;
- }
+ if ( !undo( cafStudy ) )
+ {
+ ok = false;
+ break;
+ }
+ numActions--;
+ }
}
updateCommandsStatus(); /* enable/disable undo/redo */
return ok;
}
/*!
- Redo operation on the active document. [ virtual protected slot ]
+ \brief Called when user activates "Redo" menu action.
+
+ Redo latest undo commands on the active document.
+
+ \param numActions redo depth (number of commands)
+ \return \c true on success
*/
bool CAF_Application::onRedo( int numActions )
{
bool ok = true;
while ( numActions > 0 )
{
- CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( activeStudy() );
- if ( cafStudy )
+ CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( activeStudy() );
+ if ( cafStudy )
{
- if ( !redo( cafStudy ) )
- {
- ok = false;
- break;
- }
- numActions--;
- }
+ if ( !redo( cafStudy ) )
+ {
+ ok = false;
+ break;
+ }
+ numActions--;
+ }
}
updateCommandsStatus(); /* enable/disable undo/redo */
return ok;
}
/*!
- Enables / disables the actions according to the application state. [ virtual protected ]
+ \brief Update actions state (Undo/Redo).
*/
void CAF_Application::updateCommandsStatus()
{
- STD_Application::updateCommandsStatus();
+ STD_Application::updateCommandsStatus();
CAF_Study* cafStudy = 0;
if ( activeStudy() && activeStudy()->inherits( "CAF_Study" ) )
}
/*!
- SLOT: called by clicking on Help->About in main menu
+ \brie Called when user activatees Help->About main menu command.
*/
void CAF_Application::onHelpAbout()
{
}
/*!
- Creates new study
+ \brief Create new empty study.
+ \return new study
*/
SUIT_Study* CAF_Application::createNewStudy()
{
}
/*!
- Sets OCAF application
+ \brief Set OCAF application.
+ \param app new OCAF application
*/
void CAF_Application::setStdApp( const Handle(TDocStd_Application)& app )
{
#include "STD_Application.h"
-#include <qmap.h>
-#include <qptrlist.h>
-
#include <TDocStd_Application.hxx>
-class QtxAction;
class CAF_Study;
#if defined WIN32
#pragma warning ( disable: 4251 )
#endif
-/*!
- \class CAF_Application
- Defines application configuration and behaviour for application with
- link to standard OCC OCAF data model. Allows to use OCC OCAF serives
- (for example, undo/redo)
-*/
class CAF_EXPORT CAF_Application : public STD_Application
{
Q_OBJECT
virtual SUIT_Study* createNewStudy();
- bool undo( CAF_Study* doc );
- bool redo( CAF_Study* doc );
+ bool undo( CAF_Study* doc );
+ bool redo( CAF_Study* doc );
virtual void setStdApp( const Handle(TDocStd_Application)& );
#include <TDocStd_Document.hxx>
/*!
- Default constructor
+ \class CAF_Operation
+ \brief Base operation class for all operations used in CAF package.
+
+ Operation interacts with OCC OCAF std document.
+*/
+
+/*!
+ \brief Constructor.
+ \param theApp application
*/
CAF_Operation::CAF_Operation(SUIT_Application* theApp)
-:SUIT_Operation(theApp)
+: SUIT_Operation(theApp)
{
}
/*!
- Destructor
+ \brief Destructor.
*/
CAF_Operation::~CAF_Operation()
{
}
/*!
- \return OCAF document
+ \brief Get OCAF document.
+ \return handle to the OCAF document object
*/
Handle(TDocStd_Document) CAF_Operation::stdDoc() const
{
Handle(TDocStd_Document) doc;
- CAF_Study* s = ::qt_cast<CAF_Study*>( study() );
+ CAF_Study* s = qobject_cast<CAF_Study*>( study() );
if ( s )
doc = s->stdDoc();
return doc;
#include "SUIT_Operation.h"
-#include <qobject.h>
-#include <qstring.h>
-
#include <Standard.hxx>
class CAF_Study;
-//! OCC OCAF Std document
class Handle(TDocStd_Document);
-/*!
- \class CAF_Operation
- Base operation for all operations used in CAF package
- Operation has link to OCC OCAF std document
-*/
class CAF_EXPORT CAF_Operation : public SUIT_Operation
{
- Q_OBJECT
+ Q_OBJECT
public:
- CAF_Operation( SUIT_Application* );
- virtual ~CAF_Operation();
+ CAF_Operation( SUIT_Application* );
+ virtual ~CAF_Operation();
protected:
Handle(TDocStd_Document) stdDoc() const;
#include "CAF_Study.h"
#include "CAF_Tools.h"
-#include "CAF_Operation.h"
#include "CAF_Application.h"
#include <SUIT_Desktop.h>
#include <SUIT_MessageBox.h>
#include <SUIT_Application.h>
-#include <qdir.h>
+#include <QDir>
#include <TDF_Delta.hxx>
#include <TDF_ListIteratorOfDeltaList.hxx>
+#include <TDocStd_Application.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>
/*!
- Constructor
+ \class CAF_Study
+ \brief Represents study for using in CAF module.
+
+ A study contains reference to OCAF std document and allows using OCAF services.
+ Provides necessary functionality for OCC transactions management.
+*/
+
+/*!
+ \brief Constructor.
+ \param theApp application
*/
CAF_Study::CAF_Study(SUIT_Application* theApp)
: SUIT_Study( theApp ),
-myModifiedCnt( 0 )
+ myModifiedCnt( 0 )
{
}
/*!
- Constructor
+ \brief Constructor.
+ \param theApp application
+ \param aStdDoc OCAF document
*/
CAF_Study::CAF_Study(SUIT_Application* theApp, Handle (TDocStd_Document)& aStdDoc)
: SUIT_Study( theApp ),
-myStdDoc( aStdDoc ),
-myModifiedCnt( 0 )
+ myStdDoc( aStdDoc ),
+ myModifiedCnt( 0 )
{
}
/*!
- Destructor
+ \brief Destructor.
*/
CAF_Study::~CAF_Study()
{
}
/*!
- \return OCAF document
+ \brief Get OCAF document.
+ \return handle to the OCAF document object
*/
Handle(TDocStd_Document) CAF_Study::stdDoc() const
{
}
/*!
- Sets new OCAF document
- \param aStdDoc - new OCAF document
+ \brief Set OCAF document.
+ \param aStdDoc new OCAF document
*/
void CAF_Study::setStdDoc( Handle(TDocStd_Document)& aStdDoc )
{
}
/*!
- Custom document initialization
+ \brief Customize document initialization.
+ \param doc study name
+ \return \c true on success and \c false on error
*/
-void CAF_Study::createDocument()
+bool CAF_Study::createDocument( const QString& doc )
{
- SUIT_Study::createDocument();
+ bool res = SUIT_Study::createDocument( doc );
CAF_Application* app = cafApplication();
- if ( app && !app->stdApp().IsNull() )
+ if ( res && app && !app->stdApp().IsNull() )
{
try {
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
app->stdApp()->NewDocument( formats.First(), myStdDoc );
}
catch ( Standard_Failure ) {
+ res = false;
}
}
+ return res;
}
/*!
- Close document
+ \brief Close document.
+ \param permanently if \c true, a document is closed permanently
*/
-void CAF_Study::closeDocument( bool permanent )
+void CAF_Study::closeDocument( bool permanently )
{
Handle(TDocStd_Application) app = stdApp();
if ( !app.IsNull() && !stdDoc().IsNull() )
app->Close( stdDoc() );
- SUIT_Study::closeDocument( permanent );
+ SUIT_Study::closeDocument( permanently );
}
/*!
- Open document
- \param fname - name of file
+ \brief Open document.
+ \param fname study file name
+ \return \c true on success and \c false if document cannot be opened
*/
bool CAF_Study::openDocument( const QString& fname )
{
}
/*!
- Save document with other name
- \param fname - name of file
+ \brief Save document with other name.
+ \param fname study file name
*/
bool CAF_Study::saveDocumentAs( const QString& fname )
{
}
/*!
- Open OCAF transaction
+ \brief Open OCAF transaction.
+ \return \c true if transaction is opened successfully
*/
bool CAF_Study::openTransaction()
{
}
/*!
- Abort OCAF transaction
+ \brief Abort OCAF transaction.
+ \return \c true if transaction is aborted successfully
*/
bool CAF_Study::abortTransaction()
{
}
/*!
- Commit OCAF transaction
+ \brief Commit OCAF transaction
+ \return \c true if transaction is committed successfully
*/
bool CAF_Study::commitTransaction( const QString& name )
{
}
/*!
- \return true, if there is opened OCAF transaction
+ \brief Check if there is any transaction opened.
+ \return \c true if there is opened OCAF transaction
*/
bool CAF_Study::hasTransaction() const
{
}
/*!
- \return whether the document was saved in file. [ public ]
+ \brief Check if the study is saved.
+ \return \c true if the document has been saved to file
*/
bool CAF_Study::isSaved() const
{
}
/*!
- \return whether the document is modified. [ public ]
+ \brief Check if the study is modified.
+ \return \c true if the document has been modified
*/
bool CAF_Study::isModified() const
{
}
/*!
- Increments modification count. If 'undoable' is 'true', this modification
- can be rolled back by 'undoModified' otherwise the document will be marked
- as 'modiifed' until saved. [ protected ]
+ \brief Increment modifications count.
+
+ If \a undoable is \c true, this modification can be rolled back by
+ undoModified(), otherwise the document will be marked as \c modified
+ until it is saved.
+
+ \param undoable if \c true the operation is undoable
+ \sa undoModified(), clearModified()
*/
void CAF_Study::doModified( bool undoable )
{
- if ( myStdDoc.IsNull() )
+ if ( myStdDoc.IsNull() )
return;
- myModifiedCnt++;
+ myModifiedCnt++;
- /* Assumed that number of available undos / redos is NOT changed dynamically */
- if ( !undoable )
+ /* Assumed that number of available undos / redos is NOT changed dynamically */
+ if ( !undoable )
myModifiedCnt += myStdDoc->GetAvailableUndos();
}
/*!
- Decrements modification count. [ protected ]
+ \brief Decrement modifications count.
+ \sa doModified(), clearModified()
*/
void CAF_Study::undoModified()
{
}
/*!
- Clears modification count. [ public ]
+ \brief Clear modifications count.
+ \sa doModified(), undoModified()
*/
void CAF_Study::clearModified()
{
}
/*!
- Undoes the last command. [ public ]
+ \brief Undo the last command.
+ \return \c true on success and \c false on error
*/
bool CAF_Study::undo()
{
}
/*!
- Redoes the last undo. [ public ]
+ \brief Redo the last undo.
+ \return \c true on success and \c false on error
*/
bool CAF_Study::redo()
{
}
/*!
- \return true if possible to perform 'undo' command. [ public ]
+ \brief Check if it is possible to undo last command.
+ \return \c true if undo is avaiable
*/
bool CAF_Study::canUndo() const
{
}
/*!
- \return true if possible to perform 'redo' command. [ public ]
+ \brief Check if it is possible to redo last undo.
+ \return \c true if redo is avaiable
*/
bool CAF_Study::canRedo() const
{
}
/*!
- \return the list of names of 'undo' actions available. [ public ]
+ \brief Get names of available undo commands.
+ \return list of commands names
*/
QStringList CAF_Study::undoNames() const
{
}
/*!
- \return the list of names of 'redo' actions available. [ public ]
+ \brief Get names of available redo commands.
+ \return list of commands names
*/
QStringList CAF_Study::redoNames() const
{
}
/*!
- \return the standard OCAF application from owner application. [ protected ]
+ \brief Get OCAF application.
+ \return handle to the OCAF application object
*/
Handle(TDocStd_Application) CAF_Study::stdApp() const
{
}
/*!
- \return the application casted to type CAF_Application. [ protected ]
+ \brief Get application.
+ \return application object (CAF_Application)
*/
CAF_Application* CAF_Study::cafApplication() const
{
- return ::qt_cast<CAF_Application*>( application() );
+ return qobject_cast<CAF_Application*>( application() );
}
#include "SUIT_Study.h"
-#include <qobject.h>
-
#include <TDocStd_Document.hxx>
-#include <TDocStd_Application.hxx>
class CAF_Application;
+class Handle(TDocStd_Application);
#if defined WIN32
#pragma warning ( disable: 4251 )
#endif
-/*!
- \class CAF_Study
- Represents study for using in CAF, contains reference
- to OCAF std document and allows to use OCAF services.
- Provides necessary functionality for OCC transactions management.
-*/
class CAF_EXPORT CAF_Study : public SUIT_Study
{
Q_OBJECT
public:
- CAF_Study( SUIT_Application* theApp );
- CAF_Study( SUIT_Application* theApp, Handle(TDocStd_Document)& aStdDoc );
- virtual ~CAF_Study();
+ CAF_Study( SUIT_Application* theApp );
+ CAF_Study( SUIT_Application* theApp, Handle(TDocStd_Document)& aStdDoc );
+ virtual ~CAF_Study();
- virtual void createDocument();
+ virtual bool createDocument( const QString& );
virtual void closeDocument( bool = true );
virtual bool openDocument( const QString& );
virtual bool saveDocumentAs( const QString& );
bool isSaved() const;
- bool isModified() const;
- void doModified( bool = true );
- void undoModified();
- void clearModified();
-
+ bool isModified() const;
+ void doModified( bool = true );
+ void undoModified();
+ void clearModified();
+
bool undo();
- bool redo();
- bool canUndo() const;
- bool canRedo() const;
- QStringList undoNames() const;
- QStringList redoNames() const;
-
+ bool redo();
+ bool canUndo() const;
+ bool canRedo() const;
+ QStringList undoNames() const;
+ QStringList redoNames() const;
+
Handle(TDocStd_Document) stdDoc() const;
protected:
virtual void setStdDoc( Handle(TDocStd_Document)& );
private:
- Handle(TDocStd_Document) myStdDoc;
- int myModifiedCnt;
+ Handle(TDocStd_Document) myStdDoc;
+ int myModifiedCnt;
friend class CAF_Operation;
};
#include "CAF_Tools.h"
-#include <string.h>
-#include <TCollection_ExtendedString.hxx>
+/*!
+ \class CAF_Tools
+ \brief Prodives a set of helpful static methods.
+*/
/*!
- Converts TCollection_ExtendedString 'src' to Qt string. [ static ]
+ \brief Convert TCollection_ExtendedString \a src to QString.
+ \param src string to be converted
+ \return resulting QString object
*/
QString CAF_Tools::toQString ( const TCollection_ExtendedString& src )
{
}
/*!
- Converts TCollection_AsciiString'src' to Qt string. [ static ]
+ \brief Convert TCollection_AsciiString \a src to QString.
+ \param src string to be converted
+ \return resulting QString object
*/
QString CAF_Tools::toQString( const TCollection_AsciiString& src )
{
}
/*!
- Converts Qt string to TCollection_AsciiString. [ static ]
+ \brief Convert QString \a src to TCollection_AsciiString.
+ \param src string to be converted
+ \return resulting TCollection_AsciiString object
*/
TCollection_AsciiString CAF_Tools::toAsciiString( const QString& src )
{
TCollection_AsciiString res;
if ( !src.isEmpty() )
- res = TCollection_AsciiString( (char*)src.latin1() );
+ res = TCollection_AsciiString( src.toLatin1().data() );
return res;
}
/*!
- Converts Qt string to TCollection_ExtendedString. [ static ]
+ \brief Convert QString \a src to TCollection_ExtendedString.
+ \param src string to be converted
+ \return resulting TCollection_ExtendedString object
*/
TCollection_ExtendedString CAF_Tools::toExtString ( const QString& src )
{
}
/*!
- Converts Qt color to OCC color
+ \brief Convert QColor object to Quantity_Color object.
+ \param c color object in Qt format
+ \return color object in OCC format
*/
Quantity_Color CAF_Tools::color( const QColor& c )
{
}
/*!
- Converts OCC color to Qt color
+ \brief Convert Quantity_Color object to QColor object.
+ \param c color object in OCC format
+ \return color object in Qt format
*/
QColor CAF_Tools::color( const Quantity_Color& c )
{
#include <SUIT_Tools.h>
-#include <qcolor.h>
+#include <QColor>
#include <Quantity_Color.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
-/*!
- \class CAF_Tools
- Prodives set of auxiliary static methods
-*/
class CAF_EXPORT CAF_Tools : public SUIT_Tools
{
public:
CAF_images.qm \
CAF_msg_en.qm
-libcaf_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) -I${QTDIR}/src/kernel -I$(QTDIR)/mkspecs/linux-g++ \
- -I$(srcdir)/../STD -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
+libcaf_la_CPPFLAGS=$(QT_INCLUDES) $(CAS_CPPFLAGS) -I$(srcdir)/../STD -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx
libcaf_la_LDFLAGS=$(QT_MT_LIBS) $(CAS_OCAF) $(CAS_OCAFVIS)
-libcaf_la_LIBADD=../STD/libstd.la ../SUIT/libsuit.la
+libcaf_la_LIBADD=../Qtx/libqtx.la ../SUIT/libsuit.la ../STD/libstd.la
# VSR: this is the original packages list
#SUBDIRS = Qtx Style DDS QDS SUIT STD CAF SUITApp LogWindow ObjBrowser Prs
# VSR: already migrated to Qt4 packages
-SUBDIRS = Qtx SUIT SUITApp STD CAM LogWindow Prs
+SUBDIRS = Qtx SUIT SUITApp STD CAF CAM LogWindow Prs
if ENABLE_SALOMEOBJECT
# VSR: this is the original packages list
SUBDIRS += SUIT
SUBDIRS += SUITApp
SUBDIRS += STD
+SUBDIRS += CAF
SUBDIRS += CAM
SUBDIRS += LogWindow
SUBDIRS += PyInterp