#include <QStringList>
#include <Resource_Manager.hxx>
-#include <TColStd_SequenceOfExtendedString.hxx>
+#include <TColStd_SequenceOfAsciiString.hxx>
/*!
\brief Create new instance of CAF_Application.
\return file filters for open/save document dialog box
*/
-QString CAF_Application::getFileFilter() const
+QString CAF_Application::getFileFilter( bool open ) const
{
if ( stdApp().IsNull() )
return QString();
- TColStd_SequenceOfExtendedString formats;
- stdApp()->Formats( formats );
+ TColStd_SequenceOfAsciiString formats;
+ if ( open )
+ stdApp()->ReadingFormats( formats );
+ else
+ stdApp()->WritingFormats( formats );
QStringList allWC;
QMap<QString, QStringList> wildCards;
Handle(TDocStd_Application) stdApp() const;
- virtual QString getFileFilter() const;
+ virtual QString getFileFilter( bool ) const;
public slots:
virtual void onHelpAbout();
#include <TDF_Delta.hxx>
#include <TDF_ListIteratorOfDeltaList.hxx>
-
+#include <TColStd_SequenceOfAsciiString.hxx>
#include <Standard_Failure.hxx>
#include <Standard_ErrorHandler.hxx>
{
try {
OCC_CATCH_SIGNALS;
- TColStd_SequenceOfExtendedString formats;
- app->stdApp()->Formats( formats );
+ TColStd_SequenceOfAsciiString formats;
+ app->stdApp()->WritingFormats( formats );
+ if ( formats.IsEmpty() )
+ app->stdApp()->ReadingFormats( formats );
if ( !formats.IsEmpty() )
app->stdApp()->NewDocument( formats.First(), myStdDoc );
}
ADD_SUBDIRECTORY(SUIT)
ADD_SUBDIRECTORY(SUITApp)
ADD_SUBDIRECTORY(STD)
-# CAF package (not compilable while TDocStd_Application::Formats is removed)
-IF(CAS_VERSION_STR VERSION_LESS "7.0.1")
- ADD_SUBDIRECTORY(CAF)
-ENDIF()
+ADD_SUBDIRECTORY(CAF)
ADD_SUBDIRECTORY(CAM)
ADD_SUBDIRECTORY(LogWindow)
ADD_SUBDIRECTORY(Prs)
}
/*!Gets file filter.
- *\retval QString "(*.bin)"
+ *\retval QString "(*.hdf)"
*/
-QString LightApp_Application::getFileFilter() const
+QString LightApp_Application::getFileFilter( bool /*open*/) const
{
- //return "(*.bin)";
- // HDF persistence
return "(*.hdf)";
}
LightApp_Preferences* preferences() const;
- virtual QString getFileFilter() const;
+ virtual QString getFileFilter( bool ) const;
virtual QString getFileName( bool open, const QString& initial, const QString& filters,
const QString& caption, QWidget* parent );
void STD_Application::onOpenDoc()
{
// It is preferrable to use OS-specific file dialog box here !!!
- QString aName = getFileName( true, QString(), getFileFilter(), QString(), 0 );
+ QString aName = getFileName( true, QString(), getFileFilter( true ), QString(), 0 );
if ( aName.isNull() )
return;
bool isOk = false;
while ( !isOk )
{
- QString aName = getFileName( false, study->studyName(), getFileFilter(), QString(), 0 );
+ QString aName = getFileName( false, study->studyName(), getFileFilter( false ), QString(), 0 );
if ( aName.isNull() )
return false;
delete popup;
}
+/*!\retval QString - return file extension(s).*/
+QString STD_Application::getFileFilter( bool /*open*/ ) const
+{
+ return QString();
+}
+
/*!\retval QString - return file name from dialog.*/
QString STD_Application::getFileName( bool open, const QString& initial, const QString& filters,
const QString& caption, QWidget* parent )
UserID
};
- public:
+public:
STD_Application();
virtual ~STD_Application();
void viewManagers( const QString&, ViewManagerList& ) const;
virtual int viewManagerId (const SUIT_ViewManager* ) const;
- virtual QString getFileFilter() const { return QString(); }
+ virtual QString getFileFilter( bool open ) const;
virtual QString getFileName( bool open, const QString& initial, const QString& filters,
- const QString& caption, QWidget* parent );
+ const QString& caption, QWidget* parent );
QString getDirectory( const QString& initial, const QString& caption, QWidget* parent );
virtual void start();
objectBrowserColumnsVisibility();
}
-/*!Gets file filter.
- *\retval QString "(*.hdf)"
- */
-QString SalomeApp_Application::getFileFilter() const
-{
- return "(*.hdf)";
-}
-
/*!Create window.*/
QWidget* SalomeApp_Application::createWindow( const int flag )
{
virtual void updateObjectBrowser( const bool = true );
- virtual QString getFileFilter() const;
-
virtual void start();
virtual void contextMenuPopup( const QString&, QMenu*, QString& );