QtxAction* action() const;
- // GUI management
+ /** @name GUI management*/ //@{
virtual void setAction( const QString& text, const QIconSet& icon, const QString& menuText,
QKeySequence accel, QObject* parent, const char* name = 0, bool toggle = false );
bool addTo( QWidget* theWidget );
bool addTo( QWidget* theWidget, int thePos );
- void setStatusTip( const QString& theTip );
+ void setStatusTip( const QString& theTip );//@}
private:
QtxAction* myAction;
class SUIT_Convertor;
class SUIT_ViewModel;
class SUIT_ResourceMgr;
-
+/*! \class QObject
+ * \brief For more information see <a href="http://doc.trolltech.com">QT documentation</a>.
+ */
/*!
An <b>Application</b> is a class which defines application configuration and behaviour.
For example Application object defines what Viewers are used in this application, what auxilliary windows
//! Creates a new Study instance. Must be redefined in new application according to its Study type.
virtual SUIT_Study* createNewStudy();
virtual void setActiveStudy( SUIT_Study* );
-
+
+ /** @name Create tool functions*/ //@{
int createTool( const QString& );
int createTool( const int, const int, const int = -1 );
int createTool( const int, const QString&, const int = -1 );
int createTool( QAction*, const int, const int = -1, const int = -1 );
- int createTool( QAction*, const QString&, const int = -1, const int = -1 );
+ int createTool( QAction*, const QString&, const int = -1, const int = -1 );//@}
+ /** @name Create menu functions*/ //@{
int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 );
int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 );
int createMenu( const int, const int, const int = -1, const int = -1 );
int createMenu( const int, const QString&, const int = -1, const int = -1 );
int createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1 );
- int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );
+ int createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );//@}
+ /** @name Set menu shown functions*/ //@{
void setMenuShown( QAction*, const bool );
- void setMenuShown( const int, const bool );
+ void setMenuShown( const int, const bool );//@}
+ /** @name Set tool shown functions*/ //@{
void setToolShown( QAction*, const bool );
- void setToolShown( const int, const bool );
+ void setToolShown( const int, const bool );//@}
static QAction* separator();
QAction* action( const int ) const;
// SUIT_DataOwner class
//********************************************************************
-//====================================================================
-//! Constructor
-//====================================================================
+
+/*! Constructor*/
SUIT_DataOwner::SUIT_DataOwner()
{
}
-//====================================================================
-//! Destructor
-//====================================================================
+/*! Destructor*/
SUIT_DataOwner::~SUIT_DataOwner()
{
}
-//====================================================================
-//! operator== : compares two owners
-//====================================================================
+/*! operator== : compares two owners*/
bool operator==( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 )
{
if ( !p1.isNull() && !p2.isNull() )
}
//********************************************************************
-// SUIT_DataOwnerPtrList class: implements value list with unique
-// items (uniqueness is provided by operator==())
+/*! \class SUIT_DataOwnerPtrList
+ * implements value list with unique items (uniqueness is
+ * provided by operator==())
+ */
//********************************************************************
//====================================================================
/*! \class QValueList
* \brief For more documentation see <a href="http://doc.trolltech.com">QT documentation</a>.
+ * QT class
*/
/*! \class SUIT_DataOwnerPtrList
* \brief Manage list of SUIT_DataOwnerPtr.
#define MIN_COMBO_SIZE 100
-// If the selected file name has extension which does not match the selected filter
-// this extension is ignored (and new one will be added). See below for details.
+/*! If the selected file name has extension which does not match the selected filter
+ * this extension is ignored (and new one will be added). See below for details.
+ */
const bool IGNORE_NON_MATCHING_EXTENSION = true;
QString SUIT_FileDlg::myLastVisitedPath;
-/*!
-Constructor
-*/
+/*! Constructor */
SUIT_FileDlg::SUIT_FileDlg( QWidget* parent, bool open, bool showQuickDir, bool modal ) :
QFileDialog( parent, 0, modal ),
myValidator( 0 ),
myValidator = new SUIT_FileValidator(this);
}
-/*!
-Destructor
-*/
+/*! Destructor*/
SUIT_FileDlg::~SUIT_FileDlg()
{
setValidator( 0 );
}
-/*!
- Redefined from QFileDialog.
-*/
+/*! Redefined from QFileDialog.*/
void SUIT_FileDlg::polish()
{
QFileDialog::polish();
}
}
-/*!
-Sets validator for file names to open/save
-Deletes previous validator if the dialog owns it.
-*/
+/*! Sets validator for file names to open/save
+ * Deletes previous validator if the dialog owns it.
+ */
void SUIT_FileDlg::setValidator( SUIT_FileValidator* v )
{
if ( myValidator && myValidator->parent() == this )
myValidator = v;
}
-/*!
-Returns the selected file
-*/
+/*! Returns the selected file */
QString SUIT_FileDlg::selectedFile() const
{
return mySelectedFile;
}
-/*!
-Returns 'true' if this is 'Open File' dialog
-and 'false' if 'Save File' dialog
-*/
+/*! Returns 'true' if this is 'Open File' dialog
+ * and 'false' if 'Save File' dialog
+ */
bool SUIT_FileDlg::isOpenDlg() const
{
return myOpen;
}
-/*!
-Closes this dialog and sets the return code to 'Accepted'
-if the selected name is valid ( see 'acceptData()' )
-*/
+/*! Closes this dialog and sets the return code to 'Accepted'
+ * if the selected name is valid ( see 'acceptData()' )
+ */
void SUIT_FileDlg::accept()
{
- /* myAccepted flag is used to warkaround the Qt 2.2.2 BUG:
- accept() method is called twice if user presses 'Enter' key
- in file name editor while file name is not acceptable by acceptData()
- (e.g. permission denied)
- */
+ /* myAccepted
+ * flag is used to warkaround the Qt 2.2.2 BUG:
+ * accept() method is called twice if user presses 'Enter' key
+ * in file name editor while file name is not acceptable by acceptData()
+ * (e.g. permission denied)
+ */
if ( !myAccepted ) {
if ( mode() != ExistingFiles ) {
mySelectedFile = QFileDialog::selectedFile();
myAccepted = !myAccepted;
}
-/*!
-Closes this dialog and sets the return code to 'Rejected'
-*/
+/*! Closes this dialog and sets the return code to 'Rejected' */
void SUIT_FileDlg::reject()
{
mySelectedFile = QString::null;
QFileDialog::reject();
}
-/*!
-Returns 'true' if selected file is valid.
-The validity is checked by a file validator,
-if there is no validator the file is always
-considered as valid
-*/
+/*! Returns 'true' if selected file is valid.
+ * The validity is checked by a file validator,
+ * if there is no validator the file is always
+ * considered as valid
+ */
bool SUIT_FileDlg::acceptData()
{
if ( myValidator )
return true;
}
-/*!
-Adds an extension to the selected file name
-if the file has not it.
-The extension is extracted from the active filter.
-*/
+/*! Adds an extension to the selected file name
+ * if the file has not it.
+ * The extension is extracted from the active filter.
+ */
void SUIT_FileDlg::addExtension()
{
// check if file name entered is empty
}
}
-/*!
- Processes selection : tries to set given path or filename as selection
-*/
+/*! Processes selection : tries to set given path or filename as selection */
bool SUIT_FileDlg::processPath( const QString& path )
{
if ( !path.isNull() ) {
}
return false;
}
-/*!
- Called when user selects item from "Quick Dir" combo box
-*/
+/*! Called when user selects item from "Quick Dir" combo box */
void SUIT_FileDlg::quickDir(const QString& dirPath)
{
QString aPath = dirPath;
class QPushButton;
class SUIT_FileValidator;
+/*! \class QFileDialog
+ * For more information see <a href="http://doc.trolltech.com">QT documentation</a>.
+*/
class SUIT_EXPORT SUIT_FileDlg : public QFileDialog
{
Q_OBJECT
void addQuickDir();
protected:
- bool myOpen; /* open/save selector */
- QString mySelectedFile; /* selected filename */
- SUIT_FileValidator* myValidator; /* file validator */
- QLabel* myQuickLab; /* quick dir combo box */
- QComboBox* myQuickCombo; /* quick dir combo box */
- QPushButton* myQuickButton; /* quick dir add button */
- bool myAccepted; /* 'Accepted' flag */
-
- static QString myLastVisitedPath; /* last visited path */
+ bool myOpen; //!< open/save selector
+ QString mySelectedFile; //!< selected filename
+ SUIT_FileValidator* myValidator; //!< file validator
+ QLabel* myQuickLab; //!< quick dir combo box
+ QComboBox* myQuickCombo; //!< quick dir combo box
+ QPushButton* myQuickButton; //!< quick dir add button
+
+ /*! \var myAccepted
+ * \brief flag is used to warkaround the Qt 2.2.2
+ * \bug accept() method is called twice if user presses 'Enter' key
+ * in file name editor while file name is not acceptable by acceptData()
+ * (e.g. permission denied)
+ */
+ bool myAccepted;
+
+ static QString myLastVisitedPath; //!< last visited path
};
#endif
#include <qfile.h>
#include <qfileinfo.h>
-/* constructor */
+/*! constructor */
SUIT_FileValidator::SUIT_FileValidator(QWidget* parent) :
myParent(parent)
{
}
-/* returns false if can't open file */
+/*! returns false if can't open file */
bool SUIT_FileValidator::canOpen( const QString& file )
{
if ( !QFile::exists( file ) ) {
return true;
}
-/* returns false if can't save file */
+/*! returns false if can't save file */
bool SUIT_FileValidator::canSave( const QString& file )
{
if ( QFile::exists( file ) ) {
virtual bool canOpen( const QString& file );
virtual bool canSave( const QString& file );
+ //! Return parent widget
QWidget* parent() const { return myParent; }
private:
+
QWidget* myParent;
};
class SUIT_EXPORT SUIT_MessageBox
{
public:
- /* show a box with one button */
+
+ /** @name One button message boxes.*/
+ //@{
static int info1 ( QWidget* parent, const QString& caption, const QString& text,
const QString& textButton0 );
static int warn1 ( QWidget* parent, const QString& caption, const QString& text,
const QString& textButton0 );
static int error1 ( QWidget* parent, const QString& caption, const QString& text,
const QString& textButton0 );
+ //@}
- /* show a box with two buttons */
+ /** @name Two buttons message boxes.*/
+ //@{
static int info2 ( QWidget* parent, const QString& caption, const QString& text,
const QString& textButton0, const QString& textButton1,
int idButton0, int idButton1, int idDefault );
static int error2 ( QWidget* parent, const QString& caption, const QString& text,
const QString& textButton0, const QString& textButton1,
int idButton0, int idButton1, int idDefault );
+ //@}
- /* show a box with three buttons */
+ /** @name Three buttons message boxes.*/
+ //@{
static int info3 ( QWidget* parent, const QString& caption, const QString& text,
const QString& textButton0, const QString& textButton1,
const QString& textButton2, int idButton0, int idButton1,
const QString& textButton0, const QString& textButton1,
const QString& textButton2, int idButton0, int idButton1,
int idButton2, int idDefault );
+ //@}
};
#endif
#include <qstring.h>
#include <qpopupmenu.h>
/*! \class Qtx
- * \brief For more documentation see <a href="http://doc.trolltech.com">QT documentation</a>.
+ * For more information see <a href="http://doc.trolltech.com">QT documentation</a>.
*/
class SUIT_EXPORT SUIT_Tools : public Qtx
{