From 916ebdb918d2a5a0537891c5f98caa7e34e073a3 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 11 May 2007 06:23:45 +0000 Subject: [PATCH] Porting to Qt4 --- src/Qtx/QtxGroupBox.cxx | 44 --------------------------------------- src/Qtx/QtxGroupBox.h | 7 ------- src/Qtx/QtxListAction.cxx | 15 ++----------- 3 files changed, 2 insertions(+), 64 deletions(-) diff --git a/src/Qtx/QtxGroupBox.cxx b/src/Qtx/QtxGroupBox.cxx index 6975f779e..b2062e38e 100644 --- a/src/Qtx/QtxGroupBox.cxx +++ b/src/Qtx/QtxGroupBox.cxx @@ -85,50 +85,6 @@ void QtxGroupBox::initialize() updateTitle(); } -#if QT_VER < 3 - -/*! - \return the width of the empty space between the items in the group and the frame of the group -*/ -int QtxGroupBox::insideMargin() const -{ - int m = 0; - if ( layout() ) - m = layout()->margin(); - return m; -} - -/*! - \return the width of the empty space between each of the items in the group -*/ -int QtxGroupBox::insideSpacing() const -{ - int s = 0; - if ( layout() ) - s = layout()->spacing(); - return s; -} - -/*! - Sets the width of the empty space between the items in the group and the frame of the group -*/ -void QtxGroupBox::setInsideMargin( int m ) -{ - if ( layout() ) - layout()->setMargin( m ); -} - -/*! - Sets the width of the empty space between each of the items in the group -*/ -void QtxGroupBox::setInsideSpacing( int s ) -{ - if ( layout() ) - layout()->setSpacing( s ); -} - -#endif - /*! Inserts title widget \param wid - new title widget diff --git a/src/Qtx/QtxGroupBox.h b/src/Qtx/QtxGroupBox.h index 04f9bb2e6..20c26fcc7 100644 --- a/src/Qtx/QtxGroupBox.h +++ b/src/Qtx/QtxGroupBox.h @@ -38,13 +38,6 @@ public: QtxGroupBox( int, Orientation, const QString&, QWidget* = 0, const char* = 0 ); virtual ~QtxGroupBox(); -#if QT_VER < 3 - int insideMargin() const; - int insideSpacing() const; - void setInsideMargin( int ); - void setInsideSpacing( int ); -#endif - virtual void setAlignment( int ); virtual void setTitle( const QString& ); virtual void setColumnLayout( int, Orientation ); diff --git a/src/Qtx/QtxListAction.cxx b/src/Qtx/QtxListAction.cxx index 52f093039..891f64e60 100755 --- a/src/Qtx/QtxListAction.cxx +++ b/src/Qtx/QtxListAction.cxx @@ -232,11 +232,6 @@ bool QtxListAction::addTo( QWidget* w ) if ( !QtxAction::addTo( w ) ) return false; -#if QT_VER < 3 - if ( w->children() ) - addedTo( (QWidget*)w->children()->getLast(), w ); -#endif - if ( w->inherits( "QToolBar" ) ) { Buttons& entry = myButtons[w]; @@ -278,9 +273,7 @@ bool QtxListAction::addTo( QWidget* w ) connect( entry.popup, SIGNAL( activated( int ) ), this, SLOT( onActivated( int ) ) ); } -#if QT_VER >= 3 - connect( w, SIGNAL( destroyed( QObject* ) ), this, SLOT( onDestroyed( QObject* ) ) ); -#endif + connect( w, SIGNAL( destroyed( QObject* ) ), this, SLOT( onDestroyed( QObject* ) ) ); return true; } @@ -325,9 +318,7 @@ bool QtxListAction::removeFrom( QWidget* w ) else if ( w->inherits( "QPopupMenu" ) ) myPopups.remove( w ); -#if QT_VER >= 3 - disconnect( w, SIGNAL( destroyed( QObject* ) ), this, SLOT( onDestroyed( QObject* ) ) ); -#endif + disconnect( w, SIGNAL( destroyed( QObject* ) ), this, SLOT( onDestroyed( QObject* ) ) ); return true; } @@ -429,9 +420,7 @@ bool QtxListAction::eventFilter( QObject* o, QEvent* e ) void QtxListAction::addedTo( QWidget* actionWidget, QWidget* container ) { -#if QT_VER >= 3 QtxAction::addedTo( actionWidget, container ); -#endif if ( !container->inherits( "QToolBar" ) ) return; -- 2.39.2