\param name action name (in terms of QObject)
\param toggle if \c true the action is a toggle action
*/
-QtxAction::QtxAction( QObject* parent, const char* name, bool toggle )
+QtxAction::QtxAction( QObject* parent, bool toggle )
: QAction( parent )
{
- setObjectName( name );
setCheckable( toggle );
QApplication::instance()->installEventFilter( this );
\param name action name (in terms of QObject)
\param toggle if \c true the action is a toggle action
*/
-QtxAction::QtxAction( const QString& text, const QIcon& icon,
- const QString& menuText, int accel,
- QObject* parent, const char* name, bool toggle )
+QtxAction::QtxAction( const QString& text, const QIcon& icon, const QString& menuText,
+ int accel, QObject* parent, bool toggle )
: QAction( icon, menuText, parent )
{
setToolTip( text );
setShortcut( accel );
- setObjectName( name );
setCheckable( toggle );
QApplication::instance()->installEventFilter( this );
\param name action name (in terms of QObject)
\param toggle if \c true the action is a toggle action
*/
-QtxAction::QtxAction( const QString& text, const QString& menuText, int accel,
- QObject* parent, const char* name, bool toggle )
+QtxAction::QtxAction( const QString& text, const QString& menuText,
+ int accel, QObject* parent, bool toggle )
: QAction( menuText, parent )
{
setToolTip( text );
setShortcut( accel );
- setObjectName( name );
setCheckable( toggle );
QApplication::instance()->installEventFilter( this );
Q_OBJECT
public:
- QtxAction( QObject* = 0, const char* = 0, bool = false );
- QtxAction( const QString&, const QString&, int, QObject*, const char* = 0, bool = false );
- QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, const char* = 0, bool = false );
+ QtxAction( QObject* = 0, bool = false );
+ QtxAction( const QString&, const QString&, int, QObject*, bool = false );
+ QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, bool = false );
virtual ~QtxAction();
virtual bool eventFilter( QObject*, QEvent* );
#include <SUIT_ViewWindow.h>
#include <SUIT_ResourceMgr.h>
+#include <QtxWorkspace.h>
//#include <QtxActionMenuMgr.h>
//#include <QtxWorkspaceAction.h>
#include <QFrame>
#include <QVBoxLayout>
-#include <QWorkspace>
#include <stdarg.h>
-/*!Constructor.*/
+/*!
+ Constructor.
+*/
STD_MDIDesktop::STD_MDIDesktop()
: SUIT_Desktop(),
myWorkspace( 0 )//,
setCentralWidget( base );
- myWorkspace = new QWorkspace( base );
+ myWorkspace = new QtxWorkspace( base );
main->addWidget( myWorkspace );
connect( myWorkspace, SIGNAL( windowActivated( QWidget* ) ),
createActions();
}
-/*!destructor.*/
+/*!
+ Destructor.
+*/
STD_MDIDesktop::~STD_MDIDesktop()
{
}
-/*!\retval SUIT_ViewWindow - return const active window.*/
+/*!
+ \retval SUIT_ViewWindow - return const active window.
+*/
SUIT_ViewWindow* STD_MDIDesktop::activeWindow() const
{
SUIT_ViewWindow* wnd = 0;
return wnd;
}
-/*!\retval QPtrList<SUIT_ViewWindow> - return const active window list.*/
+/*!
+ \retval QList<SUIT_ViewWindow> - return const active window list.
+*/
QList<SUIT_ViewWindow*> STD_MDIDesktop::windows() const
{
QList<SUIT_ViewWindow*> winList;
return winList;
}
-/*! add the new widget into desktop.*/
+/*!
+ Add the new widget into desktop.
+*/
void STD_MDIDesktop::addWindow( QWidget* w )
{
if ( !w || !workspace() )
// myWorkspaceAction->setItems( flags );
}
-/*!\retval QWorkspace pointer - work space.*/
-QWorkspace* STD_MDIDesktop::workspace() const
+/*!
+ \retval QtxWorkspace pointer - work space.
+*/
+QtxWorkspace* STD_MDIDesktop::workspace() const
{
return myWorkspace;
}
-/*!Emit window activated.*/
+/*!
+ Emit window activated.
+*/
void STD_MDIDesktop::onWindowActivated( QWidget* w )
{
if ( w && w->inherits( "SUIT_ViewWindow" ) )
emit windowActivated( (SUIT_ViewWindow*)w );
}
-/*!Create actions: cascade, Tile, Tile Horizontal, Tile Vertical*/
+/*!
+ Create actions: cascade, Tile, Tile Horizontal, Tile Vertical
+*/
void STD_MDIDesktop::createActions()
{
/*
#include <SUIT_Desktop.h>
-class QWorkspace;
+class QtxWorkspace;
//class QtxWorkspaceAction;
#if defined WIN32
{
Q_OBJECT
- class Workspace;
-
public:
enum { MenuWindowId = 6 };
enum { Cascade, Tile, HTile, VTile };
void setWindowOperations( const int, ... );
void setWindowOperations( const QList<int>& );
- QWorkspace* workspace() const;
+ QtxWorkspace* workspace() const;
private slots:
void onWindowActivated( QWidget* );
int operationFlag( const int ) const;
private:
- QWorkspace* myWorkspace;
+ QtxWorkspace* myWorkspace;
// QtxWorkspaceAction* myWorkspaceAction;
};
const QString& menuText, QKeySequence accel,
QObject* parent, bool toggle )
{
- setAction( new QtxAction( text, icon, menuText, accel, parent, 0, toggle ) );
+ setAction( new QtxAction( text, icon, menuText, accel, parent, toggle ) );
}
/*!Set action.
void SUIT_ActionOperation::setAction( const QString& text, const QString& menuText,
QKeySequence accel, QObject* parent, bool toggle )
{
- setAction( new QtxAction( text, menuText, accel, parent, 0, toggle ) );
+ setAction( new QtxAction( text, menuText, accel, parent, toggle ) );
}
/*!Set action.
const QString& menu, const QString& tip, const int key,
QObject* parent, const bool toggle, QObject* reciever, const char* member )
{
- QtxAction* a = new QtxAction( text, icon, menu, key, parent, 0, toggle );
+ QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle );
a->setStatusTip( tip );
if ( reciever && member )