diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2ec3635365..2eb6865807 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-06-03 13:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/hbqtgui.hbx + * contrib/hbqt/qtgui/qth/filelist.hbm + * contrib/hbqt/qtgui/qth/QDialogButtonBox.qth + + Added: QDialogButtonBox() class. + 2011-06-03 17:19 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/rddads/tests/datad.prg ! fixed 'field -> id' index expr which wasn't recognized by ADS diff --git a/harbour/contrib/hbqt/qtgui/hbqtgui.hbx b/harbour/contrib/hbqt/qtgui/hbqtgui.hbx index abeb7b3861..830f00e9ae 100644 --- a/harbour/contrib/hbqt/qtgui/hbqtgui.hbx +++ b/harbour/contrib/hbqt/qtgui/hbqtgui.hbx @@ -80,6 +80,7 @@ DYNAMIC HB_QDESKTOPSERVICES DYNAMIC HB_QDESKTOPWIDGET DYNAMIC HB_QDIAL DYNAMIC HB_QDIALOG +DYNAMIC HB_QDIALOGBUTTONBOX DYNAMIC HB_QDIRMODEL DYNAMIC HB_QDOCKWIDGET DYNAMIC HB_QDOUBLESPINBOX @@ -339,6 +340,7 @@ DYNAMIC QDESKTOPSERVICES DYNAMIC QDESKTOPWIDGET DYNAMIC QDIAL DYNAMIC QDIALOG +DYNAMIC QDIALOGBUTTONBOX DYNAMIC QDIRMODEL DYNAMIC QDOCKWIDGET DYNAMIC QDOUBLESPINBOX diff --git a/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth b/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth new file mode 100644 index 0000000000..7ca59b4dad --- /dev/null +++ b/harbour/contrib/hbqt/qtgui/qth/QDialogButtonBox.qth @@ -0,0 +1,134 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = +Inherit = QWidget +Type = +New = + + + +#include + + +/* + * QDialogButtonBox ( QWidget * parent = 0 ) + * QDialogButtonBox ( Qt::Orientation orientation, QWidget * parent = 0 ) + * QDialogButtonBox ( StandardButtons buttons, Qt::Orientation orientation = Qt::Horizontal, QWidget * parent = 0 ) + * ~QDialogButtonBox () + */ +HB_FUNC( QT_QDIALOGBUTTONBOX ) +{ + if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) ) + { + __HB_RETPTRGC__( new QDialogButtonBox( hbqt_par_QWidget( 1 ) ) ); + } + else if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) ) + { + __HB_RETPTRGC__( new QDialogButtonBox( ( QDialogButtonBox::StandardButtons ) hb_parni( 1 ), ( Qt::Orientation ) hb_parni( 2 ), HB_ISOBJECT( 3 ) ? hbqt_par_QWidget( 3 ) : 0 ) ); + } + else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) + { + __HB_RETPTRGC__( new QDialogButtonBox( ( Qt::Orientation ) hb_parni( 1 ), HB_ISOBJECT( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ); + } + else + { + __HB_RETPTRGC__( new QDialogButtonBox() ); + } +} + + + +enum ButtonLayout { WinLayout, MacLayout, KdeLayout, GnomeLayout } +enum ButtonRole { InvalidRole, AcceptRole, RejectRole, DestructiveRole, ..., ResetRole } +enum StandardButton { Ok, Open, Save, Cancel, ..., NoButton } +flags StandardButtons + + + +void addButton ( QAbstractButton * button, ButtonRole role ) +QPushButton * addButton ( const QString & text, ButtonRole role ) +QPushButton * addButton ( StandardButton button ) +QPushButton * button ( StandardButton which ) const +ButtonRole buttonRole ( QAbstractButton * button ) const +QList buttons () const +bool centerButtons () const +void clear () +Qt::Orientation orientation () const +void removeButton ( QAbstractButton * button ) +void setCenterButtons ( bool center ) +void setOrientation ( Qt::Orientation orientation ) +void setStandardButtons ( StandardButtons buttons ) +StandardButton standardButton ( QAbstractButton * button ) const +StandardButtons standardButtons () const + + + + + + +void accepted () +void clicked ( QAbstractButton * button ) +void helpRequested () +void rejected () + + + + + + + diff --git a/harbour/contrib/hbqt/qtgui/qth/filelist.hbm b/harbour/contrib/hbqt/qtgui/qth/filelist.hbm index bec131d35e..a5090966dc 100644 --- a/harbour/contrib/hbqt/qtgui/qth/filelist.hbm +++ b/harbour/contrib/hbqt/qtgui/qth/filelist.hbm @@ -51,6 +51,7 @@ QDesktopServices.qth QDesktopWidget.qth QDial.qth QDialog.qth +QDialogButtonBox.qth QDirModel.qth QDockWidget.qth QDoubleSpinBox.qth