From 329e51d050e12d59f931a205e21ee3bf64e32f1c Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 8 May 2007 07:22:49 +0000 Subject: [PATCH] Porting to Qt4 --- src/Qtx/Qtx.cxx | 21 ++++----------------- src/Qtx/Qtx.h | 49 +++++++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 41 deletions(-) diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index e4149bf6d..9b0c2fb34 100755 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -147,24 +147,11 @@ void Qtx::setTabOrder( const QWidgetList& widgets ) } /*! - \brief Align widget \a src relative to widget \a ref acording to alignment flags. - - Alignment flags: - - Qtx::AlignLeft : align left side of \a src to the left side of \a ref - - Qtx::AlignRight : align right side of \a src to the right side of \a ref - - Qtx::AlignTop : align top side of \a src to the top side of \a ref - - Qtx::AlignBottom : align bottom side of \a src to the bottom side of \a ref - - Qtx::AlignHCenter : align \a src to the center of \a ref in horizontal dimension - - Qtx::AlignVCenter : align \a src to the center of \a ref in vertical dimension - - Qtx::AlignCenter : align \a src to the center of \a ref in both dimensions - - Qtx::AlignOutLeft : align right side of \a src to the left side of \a ref - - Qtx::AlignOutRight : align left side of \a src to the right side of \a ref - - Qtx::AlignOutTop : align bottom side of \a src to the top side of \a ref - - Qtx::AlignOutBottom : align top side of \a src to the bottom side of \a ref - + \brief Align widget \a src relative to widget \a ref acording to the + alignment flags \a alignFlags. \param src source widget (being aligned) - \param ref reference widget (source widget being to) - \param alignFlags alignment flags + \param ref reference widget (source widget being aligned to) + \param alignFlags alignment flags (Qtx::Alignment) */ void Qtx::alignWidget( QWidget* src, const QWidget* ref, const int alignFlags ) { diff --git a/src/Qtx/Qtx.h b/src/Qtx/Qtx.h index 23ac9ea85..d00b6a6ff 100755 --- a/src/Qtx/Qtx.h +++ b/src/Qtx/Qtx.h @@ -52,10 +52,10 @@ class QObject; class QWidget; //class QToolBar; -typedef QList QIntList; -typedef QList QShortList; -typedef QList QDoubleList; -typedef QList QColorList; +typedef QList QIntList; //!< list of int values +typedef QList QShortList; //!< list of short int values +typedef QList QDoubleList; //!< list of double values +typedef QList QColorList; //!< list of colors /*! \class Qtx @@ -65,28 +65,29 @@ typedef QList QColorList; class QTX_EXPORT Qtx { public: + //! Widget alignment flags enum AlignmentFlags { - AlignLeft = Qt::AlignLeft, - AlignLeading = Qt::AlignLeading, - AlignRight = Qt::AlignRight, - AlignTrailing = Qt::AlignTrailing, - AlignHCenter = Qt::AlignHCenter, - AlignJustify = Qt::AlignJustify, - AlignAbsolute = Qt::AlignAbsolute, - AlignHorizontal_Mask = Qt::AlignHorizontal_Mask, - - AlignTop = Qt::AlignTop, - AlignBottom = Qt::AlignBottom, - AlignVCenter = Qt::AlignVCenter, - AlignVertical_Mask = Qt::AlignVertical_Mask, - - AlignCenter = Qt::AlignCenter, - - AlignOutLeft = Qt::AlignVCenter << 2, - AlignOutRight = AlignOutLeft << 2, - AlignOutTop = AlignOutRight << 2, - AlignOutBottom = AlignOutTop << 2 + AlignLeft = Qt::AlignLeft, //!< align left side of one widget to the left side of another widget + AlignLeading = Qt::AlignLeading, //!< synonim for AlignLeft + AlignRight = Qt::AlignRight, //!< align right side of one widget to the right side of another widget + AlignTrailing = Qt::AlignTrailing, //!< synonim for AlignRight + AlignHCenter = Qt::AlignHCenter, //!< align one widget to the center of another widget in horizontal dimension + AlignJustify = Qt::AlignJustify, //!< synonym of Qt::AlignJustify + AlignAbsolute = Qt::AlignAbsolute, //!< synonym of Qt::AlignAbsolute + AlignHorizontal_Mask = Qt::AlignHorizontal_Mask, //!< synonym of Qt::AlignHorizontal_Mask + + AlignTop = Qt::AlignTop, //!< align top side of one widget to the top side of another widget + AlignBottom = Qt::AlignBottom, //!< align bottom side of one widget to the bottom side of another widget + AlignVCenter = Qt::AlignVCenter, //!< align one widget to the center of another widget in vertical dimension + AlignVertical_Mask = Qt::AlignVertical_Mask, //!< synonym of Qt::AlignVertical_Mask + + AlignCenter = Qt::AlignCenter, //!< align one widget to the center of another widget in both dimensions + + AlignOutLeft = Qt::AlignVCenter << 2, //!< align right side of one widget to the left side of another widget + AlignOutRight = AlignOutLeft << 2, //!< align left side of one widget to the right side of another widget + AlignOutTop = AlignOutRight << 2, //!< align bottom side of one widget to the top side of another widget + AlignOutBottom = AlignOutTop << 2 //!< align top side of one widget to the bottom side of another widget }; static QString toQString( const char*, const int = -1 ); -- 2.39.2