From 8e4dc41818ddd86dcd4dc43ad1e1d5287bc70aa5 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 1 Jun 2007 14:51:42 +0000 Subject: [PATCH] Porting to Qt 4 --- src/Qtx/QtxListAction.cxx | 56 ++++++++++++++++++++++++++++++++++----- src/Qtx/QtxListAction.h | 2 ++ 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/src/Qtx/QtxListAction.cxx b/src/Qtx/QtxListAction.cxx index 57956449a..b74804837 100755 --- a/src/Qtx/QtxListAction.cxx +++ b/src/Qtx/QtxListAction.cxx @@ -579,16 +579,17 @@ QtxListAction::QtxListAction( QObject* parent ) /*! \brief Constructor. \param icon action icon - \param text menu text + \param menuText menu text \param accel key accelerator \param parent parent object */ -QtxListAction::QtxListAction( const QIcon& icon, const QString& text, int accel, QObject* parent ) +QtxListAction::QtxListAction( const QIcon& icon, const QString& menuText, + int accel, QObject* parent ) : QWidgetAction( parent ), myFrame( 0 ) { setIcon( icon ); - setText( text ); + setText( menuText ); setShortcut( accel ); initialize(); @@ -596,15 +597,56 @@ QtxListAction::QtxListAction( const QIcon& icon, const QString& text, int accel, /*! \brief Constructor. - \param text menu text + \param menuText menu text + \param accel key accelerator + \param parent parent object +*/ +QtxListAction::QtxListAction( const QString& menuText, int accel, QObject* parent ) +: QWidgetAction( parent ), + myFrame( 0 ) +{ + setText( menuText ); + setShortcut( accel ); + + initialize(); +} + +/*! + \brief Constructor. + \param text action description text (tooltip) + \param menuText menu text + \param accel key accelerator + \param parent parent object +*/ +QtxListAction::QtxListAction( const QString& text, const QString& menuText, + int accel, QObject* parent ) +: QWidgetAction( parent ), + myFrame( 0 ) +{ + setText( menuText ); + setShortcut( accel ); + setToolTip( text ); + + initialize(); +} + +/*! + \brief Constructor. + \param text action description text (tooltip) + \param icon action icon + \param menuText menu text + \param accel key accelerator \param parent parent object */ -QtxListAction::QtxListAction( const QString& text, int accel, QObject* parent ) +QtxListAction::QtxListAction( const QString& text, const QIcon& icon, + const QString& menuText, int accel, QObject* parent ) : QWidgetAction( parent ), -myFrame( 0 ) + myFrame( 0 ) { - setText( text ); + setIcon( icon ); + setText( menuText ); setShortcut( accel ); + setToolTip( text ); initialize(); } diff --git a/src/Qtx/QtxListAction.h b/src/Qtx/QtxListAction.h index a300ef258..1ec4c31e3 100755 --- a/src/Qtx/QtxListAction.h +++ b/src/Qtx/QtxListAction.h @@ -49,7 +49,9 @@ public: public: QtxListAction( QObject* = 0 ); QtxListAction( const QString&, int, QObject* ); + QtxListAction( const QString&, const QString&, int, QObject* ); QtxListAction( const QIcon&, const QString&, int, QObject* ); + QtxListAction( const QString&, const QIcon&, const QString&, int, QObject* ); virtual ~QtxListAction(); int popupMode() const; -- 2.39.2