diff --git a/harbour/ChangeLog b/harbour/ChangeLog index dfefbf8284..1da14c1327 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,231 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-04-07 12:05 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbqt/hbqt.h + * contrib/hbqt/hbqt_qabstractbutton.cpp + * contrib/hbqt/hbqt_qabstractitemview.cpp + * contrib/hbqt/hbqt_qabstractprintdialog.cpp + * contrib/hbqt/hbqt_qabstractscrollarea.cpp + * contrib/hbqt/hbqt_qabstractslider.cpp + * contrib/hbqt/hbqt_qabstractspinbox.cpp + * contrib/hbqt/hbqt_qaction.cpp + * contrib/hbqt/hbqt_qapplication.cpp + * contrib/hbqt/hbqt_qboxlayout.cpp + * contrib/hbqt/hbqt_qbrush.cpp + * contrib/hbqt/hbqt_qcalendarwidget.cpp + * contrib/hbqt/hbqt_qcheckbox.cpp + * contrib/hbqt/hbqt_qcolor.cpp + * contrib/hbqt/hbqt_qcolordialog.cpp + * contrib/hbqt/hbqt_qcombobox.cpp + * contrib/hbqt/hbqt_qcommandlinkbutton.cpp + * contrib/hbqt/hbqt_qcoreapplication.cpp + * contrib/hbqt/hbqt_qdateedit.cpp + * contrib/hbqt/hbqt_qdatetimeedit.cpp + * contrib/hbqt/hbqt_qdial.cpp + * contrib/hbqt/hbqt_qdialog.cpp + * contrib/hbqt/hbqt_qdoublespinbox.cpp + * contrib/hbqt/hbqt_qerrormessage.cpp + * contrib/hbqt/hbqt_qfiledialog.cpp + * contrib/hbqt/hbqt_qfocusframe.cpp + * contrib/hbqt/hbqt_qfont.cpp + * contrib/hbqt/hbqt_qfontcombobox.cpp + * contrib/hbqt/hbqt_qfontdialog.cpp + * contrib/hbqt/hbqt_qformlayout.cpp + * contrib/hbqt/hbqt_qframe.cpp + * contrib/hbqt/hbqt_qgroupbox.cpp + * contrib/hbqt/hbqt_qhboxlayout.cpp + * contrib/hbqt/hbqt_qinputdialog.cpp + * contrib/hbqt/hbqt_qlabel.cpp + * contrib/hbqt/hbqt_qlayout.cpp + * contrib/hbqt/hbqt_qlayoutitem.cpp + * contrib/hbqt/hbqt_qlcdnumber.cpp + * contrib/hbqt/hbqt_qlineedit.cpp + * contrib/hbqt/hbqt_qlistview.cpp + * contrib/hbqt/hbqt_qmainwindow.cpp + * contrib/hbqt/hbqt_qmenu.cpp + * contrib/hbqt/hbqt_qmenubar.cpp + * contrib/hbqt/hbqt_qmessagebox.cpp + * contrib/hbqt/hbqt_qobject.cpp + * contrib/hbqt/hbqt_qpagesetupdialog.cpp + * contrib/hbqt/hbqt_qpaintdevice.cpp + * contrib/hbqt/hbqt_qpainter.cpp + * contrib/hbqt/hbqt_qpen.cpp + * contrib/hbqt/hbqt_qprintdialog.cpp + * contrib/hbqt/hbqt_qprintpreviewdialog.cpp + * contrib/hbqt/hbqt_qprogressbar.cpp + * contrib/hbqt/hbqt_qprogressdialog.cpp + * contrib/hbqt/hbqt_qpushbutton.cpp + * contrib/hbqt/hbqt_qradiobutton.cpp + * contrib/hbqt/hbqt_qscrollarea.cpp + * contrib/hbqt/hbqt_qscrollbar.cpp + * contrib/hbqt/hbqt_qsizegrip.cpp + * contrib/hbqt/hbqt_qslider.cpp + * contrib/hbqt/hbqt_qspinbox.cpp + * contrib/hbqt/hbqt_qsplitter.cpp + * contrib/hbqt/hbqt_qtabbar.cpp + * contrib/hbqt/hbqt_qtableview.cpp + * contrib/hbqt/hbqt_qtablewidget.cpp + * contrib/hbqt/hbqt_qtablewidgetitem.cpp + * contrib/hbqt/hbqt_qtabwidget.cpp + * contrib/hbqt/hbqt_qtextedit.cpp + * contrib/hbqt/hbqt_qtimeedit.cpp + * contrib/hbqt/hbqt_qtoolbar.cpp + * contrib/hbqt/hbqt_qtoolbox.cpp + * contrib/hbqt/hbqt_qtoolbutton.cpp + * contrib/hbqt/hbqt_qtreeview.cpp + * contrib/hbqt/hbqt_qtreewidget.cpp + * contrib/hbqt/hbqt_qtreewidgetitem.cpp + * contrib/hbqt/hbqt_qvboxlayout.cpp + * contrib/hbqt/hbqt_qwebpage.cpp + * contrib/hbqt/hbqt_qwebview.cpp + * contrib/hbqt/hbqt_qwidget.cpp + * contrib/hbqt/hbqt_qwizard.cpp + * contrib/hbqt/Makefile_gen + * contrib/hbqt/TQAbstractButton.prg + * contrib/hbqt/TQAbstractItemView.prg + * contrib/hbqt/TQAbstractPrintDialog.prg + * contrib/hbqt/TQAbstractScrollArea.prg + * contrib/hbqt/TQAbstractSlider.prg + * contrib/hbqt/TQAbstractSpinBox.prg + * contrib/hbqt/TQAction.prg + * contrib/hbqt/TQBoxLayout.prg + * contrib/hbqt/TQCalendarWidget.prg + * contrib/hbqt/TQCheckBox.prg + * contrib/hbqt/TQColorDialog.prg + * contrib/hbqt/TQComboBox.prg + * contrib/hbqt/TQCommandLinkButton.prg + * contrib/hbqt/TQDateEdit.prg + * contrib/hbqt/TQDateTimeEdit.prg + * contrib/hbqt/TQDial.prg + * contrib/hbqt/TQDialog.prg + * contrib/hbqt/TQDoubleSpinBox.prg + * contrib/hbqt/TQErrorMessage.prg + * contrib/hbqt/TQFileDialog.prg + * contrib/hbqt/TQFocusFrame.prg + * contrib/hbqt/TQFontComboBox.prg + * contrib/hbqt/TQFontDialog.prg + * contrib/hbqt/TQFormLayout.prg + * contrib/hbqt/TQFrame.prg + * contrib/hbqt/TQGroupBox.prg + * contrib/hbqt/TQHBoxLayout.prg + * contrib/hbqt/TQInputDialog.prg + * contrib/hbqt/TQLabel.prg + * contrib/hbqt/TQLayout.prg + * contrib/hbqt/TQLayoutItem.prg + * contrib/hbqt/TQLCDNumber.prg + * contrib/hbqt/TQLineEdit.prg + * contrib/hbqt/TQListView.prg + * contrib/hbqt/TQMainWindow.prg + * contrib/hbqt/TQMenu.prg + * contrib/hbqt/TQMenuBar.prg + * contrib/hbqt/TQMessageBox.prg + * contrib/hbqt/TQObject.prg + * contrib/hbqt/TQPageSetupDialog.prg + * contrib/hbqt/TQPaintDevice.prg + * contrib/hbqt/TQPainter.prg + * contrib/hbqt/TQPrintDialog.prg + * contrib/hbqt/TQPrintPreviewDialog.prg + * contrib/hbqt/TQProgressBar.prg + * contrib/hbqt/TQProgressDialog.prg + * contrib/hbqt/TQPushButton.prg + * contrib/hbqt/TQRadioButton.prg + * contrib/hbqt/TQScrollArea.prg + * contrib/hbqt/TQScrollBar.prg + * contrib/hbqt/TQSizeGrip.prg + * contrib/hbqt/TQSlider.prg + * contrib/hbqt/TQSpinBox.prg + * contrib/hbqt/TQSplitter.prg + * contrib/hbqt/TQTabBar.prg + * contrib/hbqt/TQTableView.prg + * contrib/hbqt/TQTableWidget.prg + * contrib/hbqt/TQTableWidgetItem.prg + * contrib/hbqt/TQTabWidget.prg + * contrib/hbqt/TQTextEdit.prg + * contrib/hbqt/TQTimeEdit.prg + * contrib/hbqt/TQToolBar.prg + * contrib/hbqt/TQToolBox.prg + * contrib/hbqt/TQToolButton.prg + * contrib/hbqt/TQTreeView.prg + * contrib/hbqt/TQTreeWidget.prg + * contrib/hbqt/TQTreeWidgetItem.prg + * contrib/hbqt/TQVBoxLayout.prg + * contrib/hbqt/TQWebPage.prg + * contrib/hbqt/TQWebView.prg + * contrib/hbqt/TQWidget.prg + * contrib/hbqt/TQWizard.prg + + contrib/hbqt/hbqt_qbitmap.cpp + + contrib/hbqt/hbqt_qcommonstyle.cpp + + contrib/hbqt/hbqt_qdesktopwidget.cpp + + contrib/hbqt/hbqt_qdir.cpp + + contrib/hbqt/hbqt_qdockwidget.cpp + + contrib/hbqt/hbqt_qevent.cpp + + contrib/hbqt/hbqt_qeventloop.cpp + + contrib/hbqt/hbqt_qfontinfo.cpp + + contrib/hbqt/hbqt_qftp.cpp + + contrib/hbqt/hbqt_qgridlayout.cpp + + contrib/hbqt/hbqt_qheaderview.cpp + + contrib/hbqt/hbqt_qhttp.cpp + + contrib/hbqt/hbqt_qicon.cpp + + contrib/hbqt/hbqt_qinputevent.cpp + + contrib/hbqt/hbqt_qlistwidget.cpp + + contrib/hbqt/hbqt_qlistwidgetitem.cpp + + contrib/hbqt/hbqt_qpaintevent.cpp + + contrib/hbqt/hbqt_qpixmap.cpp + + contrib/hbqt/hbqt_qpoint.cpp + + contrib/hbqt/hbqt_qpointf.cpp + + contrib/hbqt/hbqt_qrect.cpp + + contrib/hbqt/hbqt_qrectf.cpp + + contrib/hbqt/hbqt_qregion.cpp + + contrib/hbqt/hbqt_qsignalmapper.cpp + + contrib/hbqt/hbqt_qsize.cpp + + contrib/hbqt/hbqt_qsizef.cpp + + contrib/hbqt/hbqt_qsplashscreen.cpp + + contrib/hbqt/hbqt_qstatusbar.cpp + + contrib/hbqt/hbqt_qstyle.cpp + + contrib/hbqt/hbqt_qtimer.cpp + + contrib/hbqt/hbqt_qurl.cpp + + contrib/hbqt/hbqt_qvariant.cpp + + contrib/hbqt/hbqt_qwindowsstyle.cpp + + contrib/hbqt/hbqt_qwindowsxpstyle.cpp + + contrib/hbqt/TQBitmap.prg + + contrib/hbqt/TQCommonStyle.prg + + contrib/hbqt/TQDesktopWidget.prg + + contrib/hbqt/TQDir.prg + + contrib/hbqt/TQDockWidget.prg + + contrib/hbqt/TQEvent.prg + + contrib/hbqt/TQEventLoop.prg + + contrib/hbqt/TQFont.prg + + contrib/hbqt/TQFontInfo.prg + + contrib/hbqt/TQFtp.prg + + contrib/hbqt/TQGridLayout.prg + + contrib/hbqt/TQHeaderView.prg + + contrib/hbqt/TQHttp.prg + + contrib/hbqt/TQIcon.prg + + contrib/hbqt/TQInputEvent.prg + + contrib/hbqt/TQListWidget.prg + + contrib/hbqt/TQListWidgetItem.prg + + contrib/hbqt/TQPaintEvent.prg + + contrib/hbqt/TQPen.prg + + contrib/hbqt/TQPixmap.prg + + contrib/hbqt/TQPoint.prg + + contrib/hbqt/TQPointF.prg + + contrib/hbqt/TQRect.prg + + contrib/hbqt/TQRectF.prg + + contrib/hbqt/TQRegion.prg + + contrib/hbqt/TQSignalMapper.prg + + contrib/hbqt/TQSize.prg + + contrib/hbqt/TQSizeF.prg + + contrib/hbqt/TQSplashScreen.prg + + contrib/hbqt/TQStatusBar.prg + + contrib/hbqt/TQStyle.prg + + contrib/hbqt/TQTimer.prg + + contrib/hbqt/TQUrl.prg + + contrib/hbqt/TQVariant.prg + + contrib/hbqt/TQWindowsStyle.prg + + contrib/hbqt/TQWindowsXPStyle.prg + * Regenerated. + 2009-04-07 10:48 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbqt/generator/qt45.qtp * contrib/hbqt/generator/hbqtgen.prg diff --git a/harbour/contrib/hbqt/Makefile_gen b/harbour/contrib/hbqt/Makefile_gen index aaa6596063..ba07206c89 100644 --- a/harbour/contrib/hbqt/Makefile_gen +++ b/harbour/contrib/hbqt/Makefile_gen @@ -2,6 +2,7 @@ # $Id$ # + CPP_SOURCES=\ hbqt_qabstractbutton.cpp \ hbqt_qabstractitemview.cpp \ @@ -11,6 +12,7 @@ CPP_SOURCES=\ hbqt_qabstractspinbox.cpp \ hbqt_qaction.cpp \ hbqt_qapplication.cpp \ + hbqt_qbitmap.cpp \ hbqt_qboxlayout.cpp \ hbqt_qbrush.cpp \ hbqt_qcalendarwidget.cpp \ @@ -19,29 +21,44 @@ CPP_SOURCES=\ hbqt_qcolordialog.cpp \ hbqt_qcombobox.cpp \ hbqt_qcommandlinkbutton.cpp \ + hbqt_qcommonstyle.cpp \ hbqt_qcoreapplication.cpp \ hbqt_qdateedit.cpp \ hbqt_qdatetimeedit.cpp \ + hbqt_qdesktopwidget.cpp \ hbqt_qdial.cpp \ hbqt_qdialog.cpp \ + hbqt_qdir.cpp \ + hbqt_qdockwidget.cpp \ hbqt_qdoublespinbox.cpp \ hbqt_qerrormessage.cpp \ + hbqt_qevent.cpp \ + hbqt_qeventloop.cpp \ hbqt_qfiledialog.cpp \ hbqt_qfocusframe.cpp \ hbqt_qfont.cpp \ hbqt_qfontcombobox.cpp \ hbqt_qfontdialog.cpp \ + hbqt_qfontinfo.cpp \ hbqt_qformlayout.cpp \ hbqt_qframe.cpp \ + hbqt_qftp.cpp \ + hbqt_qgridlayout.cpp \ hbqt_qgroupbox.cpp \ hbqt_qhboxlayout.cpp \ + hbqt_qheaderview.cpp \ + hbqt_qhttp.cpp \ + hbqt_qicon.cpp \ hbqt_qinputdialog.cpp \ + hbqt_qinputevent.cpp \ hbqt_qlabel.cpp \ hbqt_qlayout.cpp \ hbqt_qlayoutitem.cpp \ hbqt_qlcdnumber.cpp \ hbqt_qlineedit.cpp \ hbqt_qlistview.cpp \ + hbqt_qlistwidget.cpp \ + hbqt_qlistwidgetitem.cpp \ hbqt_qmainwindow.cpp \ hbqt_qmenu.cpp \ hbqt_qmenubar.cpp \ @@ -50,19 +67,32 @@ CPP_SOURCES=\ hbqt_qpaintdevice.cpp \ hbqt_qpagesetupdialog.cpp \ hbqt_qpainter.cpp \ + hbqt_qpaintevent.cpp \ hbqt_qpen.cpp \ + hbqt_qpixmap.cpp \ + hbqt_qpoint.cpp \ + hbqt_qpointf.cpp \ hbqt_qprintdialog.cpp \ hbqt_qprintpreviewdialog.cpp \ hbqt_qprogressbar.cpp \ hbqt_qprogressdialog.cpp \ hbqt_qpushbutton.cpp \ + hbqt_qrect.cpp \ + hbqt_qrectf.cpp \ hbqt_qradiobutton.cpp \ + hbqt_qregion.cpp \ hbqt_qscrollarea.cpp \ hbqt_qscrollbar.cpp \ + hbqt_qsignalmapper.cpp \ + hbqt_qsize.cpp \ + hbqt_qsizef.cpp \ hbqt_qsizegrip.cpp \ hbqt_qslider.cpp \ hbqt_qspinbox.cpp \ + hbqt_qsplashscreen.cpp \ hbqt_qsplitter.cpp \ + hbqt_qstatusbar.cpp \ + hbqt_qstyle.cpp \ hbqt_qtabbar.cpp \ hbqt_qtableview.cpp \ hbqt_qtablewidget.cpp \ @@ -70,17 +100,22 @@ CPP_SOURCES=\ hbqt_qtabwidget.cpp \ hbqt_qtextedit.cpp \ hbqt_qtimeedit.cpp \ + hbqt_qtimer.cpp \ hbqt_qtoolbar.cpp \ hbqt_qtoolbox.cpp \ hbqt_qtoolbutton.cpp \ hbqt_qtreeview.cpp \ hbqt_qtreewidget.cpp \ hbqt_qtreewidgetitem.cpp \ + hbqt_qurl.cpp \ + hbqt_qvariant.cpp \ hbqt_qvboxlayout.cpp \ hbqt_qwebpage.cpp \ hbqt_qwidget.cpp \ - hbqt_qwizard.cpp \ hbqt_qwebview.cpp \ + hbqt_qwindowsstyle.cpp \ + hbqt_qwindowsxpstyle.cpp \ + hbqt_qwizard.cpp \ hbqt_base.cpp \ hbqt_utils.cpp \ hbqt_slots.cpp \ @@ -103,33 +138,50 @@ PRG_SOURCES=\ TQAbstractSlider.prg \ TQAbstractSpinBox.prg \ TQAction.prg \ + TQBitmap.prg \ TQBoxLayout.prg \ TQCalendarWidget.prg \ TQCheckBox.prg \ TQColorDialog.prg \ TQComboBox.prg \ TQCommandLinkButton.prg \ + TQCommonStyle.prg \ TQDateEdit.prg \ TQDateTimeEdit.prg \ + TQDesktopWidget.prg \ TQDial.prg \ TQDialog.prg \ + TQDir.prg \ + TQDockWidget.prg \ TQDoubleSpinBox.prg \ TQErrorMessage.prg \ + TQEvent.prg \ + TQEventLoop.prg \ TQFileDialog.prg \ TQFocusFrame.prg \ + TQFont.prg \ TQFontComboBox.prg \ TQFontDialog.prg \ + TQFontInfo.prg \ TQFormLayout.prg \ TQFrame.prg \ + TQFtp.prg \ + TQGridLayout.prg \ TQGroupBox.prg \ TQHBoxLayout.prg \ + TQHeaderView.prg \ + TQHttp.prg \ + TQIcon.prg \ TQInputDialog.prg \ + TQInputEvent.prg \ TQLabel.prg \ TQLayout.prg \ TQLayoutItem.prg \ TQLCDNumber.prg \ TQLineEdit.prg \ TQListView.prg \ + TQListWidget.prg \ + TQListWidgetItem.prg \ TQMainWindow.prg \ TQMenu.prg \ TQMenuBar.prg \ @@ -138,18 +190,32 @@ PRG_SOURCES=\ TQPaintDevice.prg \ TQPageSetupDialog.prg \ TQPainter.prg \ + TQPaintEvent.prg \ + TQPen.prg \ + TQPixmap.prg \ + TQPoint.prg \ + TQPointF.prg \ TQPrintDialog.prg \ TQPrintPreviewDialog.prg \ TQProgressBar.prg \ TQProgressDialog.prg \ TQPushButton.prg \ + TQRect.prg \ + TQRectF.prg \ TQRadioButton.prg \ + TQRegion.prg \ TQScrollArea.prg \ TQScrollBar.prg \ + TQSignalMapper.prg \ + TQSize.prg \ + TQSizeF.prg \ TQSizeGrip.prg \ TQSlider.prg \ TQSpinBox.prg \ + TQSplashScreen.prg \ TQSplitter.prg \ + TQStatusBar.prg \ + TQStyle.prg \ TQTabBar.prg \ TQTableView.prg \ TQTableWidget.prg \ @@ -157,14 +223,21 @@ PRG_SOURCES=\ TQTabWidget.prg \ TQTextEdit.prg \ TQTimeEdit.prg \ + TQTimer.prg \ TQToolBar.prg \ TQToolBox.prg \ TQToolButton.prg \ TQTreeView.prg \ TQTreeWidget.prg \ TQTreeWidgetItem.prg \ + TQUrl.prg \ + TQVariant.prg \ TQVBoxLayout.prg \ TQWebPage.prg \ TQWidget.prg \ - TQWizard.prg \ TQWebView.prg \ + TQWindowsStyle.prg \ + TQWindowsXPStyle.prg \ + TQWizard.prg \ + + diff --git a/harbour/contrib/hbqt/TQAbstractButton.prg b/harbour/contrib/hbqt/TQAbstractButton.prg index fc0d0ec967..42223c77db 100644 --- a/harbour/contrib/hbqt/TQAbstractButton.prg +++ b/harbour/contrib/hbqt/TQAbstractButton.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAbstractButton INHERIT QWidget +CREATE CLASS QAbstractButton INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -67,6 +68,7 @@ CLASS QAbstractButton INHERIT QWidget METHOD autoRepeatDelay() INLINE Qt_QAbstractButton_autoRepeatDelay( ::pPtr ) METHOD autoRepeatInterval() INLINE Qt_QAbstractButton_autoRepeatInterval( ::pPtr ) METHOD group() INLINE Qt_QAbstractButton_group( ::pPtr ) + METHOD icon() INLINE Qt_QAbstractButton_icon( ::pPtr ) METHOD iconSize() INLINE Qt_QAbstractButton_iconSize( ::pPtr ) METHOD isCheckable() INLINE Qt_QAbstractButton_isCheckable( ::pPtr ) METHOD isChecked() INLINE Qt_QAbstractButton_isChecked( ::pPtr ) @@ -78,8 +80,15 @@ CLASS QAbstractButton INHERIT QWidget METHOD setCheckable( lBool ) INLINE Qt_QAbstractButton_setCheckable( ::pPtr, lBool ) METHOD setDown( lBool ) INLINE Qt_QAbstractButton_setDown( ::pPtr, lBool ) METHOD setIcon( cIcon ) INLINE Qt_QAbstractButton_setIcon( ::pPtr, cIcon ) + METHOD setShortcut( pKey ) INLINE Qt_QAbstractButton_setShortcut( ::pPtr, pKey ) METHOD setText( cText ) INLINE Qt_QAbstractButton_setText( ::pPtr, cText ) + METHOD shortcut() INLINE Qt_QAbstractButton_shortcut( ::pPtr ) METHOD text() INLINE Qt_QAbstractButton_text( ::pPtr ) + METHOD animateClick( nMsec ) INLINE Qt_QAbstractButton_animateClick( ::pPtr, nMsec ) + METHOD click() INLINE Qt_QAbstractButton_click( ::pPtr ) + METHOD setChecked( lBool ) INLINE Qt_QAbstractButton_setChecked( ::pPtr, lBool ) + METHOD setIconSize( pSize ) INLINE Qt_QAbstractButton_setIconSize( ::pPtr, pSize ) + METHOD toggle() INLINE Qt_QAbstractButton_toggle( ::pPtr ) ENDCLASS @@ -87,6 +96,8 @@ CLASS QAbstractButton INHERIT QWidget METHOD New( pParent ) CLASS QAbstractButton + ::pParent := pParent + ::pPtr := Qt_QAbstractButton( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQAbstractItemView.prg b/harbour/contrib/hbqt/TQAbstractItemView.prg index 3659f12a3d..bfe0352b39 100644 --- a/harbour/contrib/hbqt/TQAbstractItemView.prg +++ b/harbour/contrib/hbqt/TQAbstractItemView.prg @@ -53,58 +53,24 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAbstractItemView INHERIT QAbstractScrollArea +CREATE CLASS QAbstractItemView INHERIT QAbstractScrollArea - DATA pPtr + VAR pParent + VAR pPtr METHOD New() - METHOD alternatingRowColors() INLINE Qt_QAbstractItemView_alternatingRowColors( ::pPtr ) - METHOD autoScrollMargin() INLINE Qt_QAbstractItemView_autoScrollMargin( ::pPtr ) - METHOD dragDropMode() INLINE Qt_QAbstractItemView_dragDropMode( ::pPtr ) - METHOD dragDropOverwriteMode() INLINE Qt_QAbstractItemView_dragDropOverwriteMode( ::pPtr ) - METHOD dragEnabled() INLINE Qt_QAbstractItemView_dragEnabled( ::pPtr ) - METHOD editTriggers() INLINE Qt_QAbstractItemView_editTriggers( ::pPtr ) - METHOD hasAutoScroll() INLINE Qt_QAbstractItemView_hasAutoScroll( ::pPtr ) - METHOD horizontalScrollMode() INLINE Qt_QAbstractItemView_horizontalScrollMode( ::pPtr ) - METHOD iconSize() INLINE Qt_QAbstractItemView_iconSize( ::pPtr ) - METHOD itemDelegate() INLINE Qt_QAbstractItemView_itemDelegate( ::pPtr ) - METHOD itemDelegateForColumn( nColumn ) INLINE Qt_QAbstractItemView_itemDelegateForColumn( ::pPtr, nColumn ) - METHOD itemDelegateForRow( nRow ) INLINE Qt_QAbstractItemView_itemDelegateForRow( ::pPtr, nRow ) - METHOD keyboardSearch( cSearch ) INLINE Qt_QAbstractItemView_keyboardSearch( ::pPtr, cSearch ) - METHOD model() INLINE Qt_QAbstractItemView_model( ::pPtr ) - METHOD selectionBehavior() INLINE Qt_QAbstractItemView_selectionBehavior( ::pPtr ) - METHOD selectionMode() INLINE Qt_QAbstractItemView_selectionMode( ::pPtr ) - METHOD selectionModel() INLINE Qt_QAbstractItemView_selectionModel( ::pPtr ) - METHOD setAlternatingRowColors( lEnable ) INLINE Qt_QAbstractItemView_setAlternatingRowColors( ::pPtr, lEnable ) - METHOD setAutoScroll( lEnable ) INLINE Qt_QAbstractItemView_setAutoScroll( ::pPtr, lEnable ) - METHOD setAutoScrollMargin( nMargin ) INLINE Qt_QAbstractItemView_setAutoScrollMargin( ::pPtr, nMargin ) - METHOD setDragDropMode( nDragDropMode ) INLINE Qt_QAbstractItemView_setDragDropMode( ::pPtr, nDragDropMode ) - METHOD setDragDropOverwriteMode( lOverwrite ) INLINE Qt_QAbstractItemView_setDragDropOverwriteMode( ::pPtr, lOverwrite ) - METHOD setDragEnabled( lEnable ) INLINE Qt_QAbstractItemView_setDragEnabled( ::pPtr, lEnable ) - METHOD setDropIndicatorShown( lEnable ) INLINE Qt_QAbstractItemView_setDropIndicatorShown( ::pPtr, lEnable ) - METHOD setEditTriggers( nEditTriggers ) INLINE Qt_QAbstractItemView_setEditTriggers( ::pPtr, nEditTriggers ) - METHOD setHorizontalScrollMode( nScrollMode ) INLINE Qt_QAbstractItemView_setHorizontalScrollMode( ::pPtr, nScrollMode ) - METHOD setIconSize( aSizeSize ) INLINE Qt_QAbstractItemView_setIconSize( ::pPtr, aSizeSize ) - METHOD setItemDelegate( pDelegate ) INLINE Qt_QAbstractItemView_setItemDelegate( ::pPtr, pDelegate ) - METHOD setItemDelegateForColumn( nColumn, pDelegate ) INLINE Qt_QAbstractItemView_setItemDelegateForColumn( ::pPtr, nColumn, pDelegate ) - METHOD setItemDelegateForRow( nRow, pDelegate ) INLINE Qt_QAbstractItemView_setItemDelegateForRow( ::pPtr, nRow, pDelegate ) - METHOD setModel( pModel ) INLINE Qt_QAbstractItemView_setModel( ::pPtr, pModel ) - METHOD setSelectionBehavior( nBehavior ) INLINE Qt_QAbstractItemView_setSelectionBehavior( ::pPtr, nBehavior ) - METHOD setSelectionMode( nMode ) INLINE Qt_QAbstractItemView_setSelectionMode( ::pPtr, nMode ) - METHOD setSelectionModel( pSelectionModel ) INLINE Qt_QAbstractItemView_setSelectionModel( ::pPtr, pSelectionModel ) - METHOD setTabKeyNavigation( lEnable ) INLINE Qt_QAbstractItemView_setTabKeyNavigation( ::pPtr, lEnable ) - METHOD setTextElideMode( nMode ) INLINE Qt_QAbstractItemView_setTextElideMode( ::pPtr, nMode ) - METHOD setVerticalScrollMode( nScrollMode ) INLINE Qt_QAbstractItemView_setVerticalScrollMode( ::pPtr, nScrollMode ) - METHOD showDropIndicator() INLINE Qt_QAbstractItemView_showDropIndicator( ::pPtr ) - METHOD sizeHintForColumn( nColumn ) INLINE Qt_QAbstractItemView_sizeHintForColumn( ::pPtr, nColumn ) - METHOD sizeHintForRow( nRow ) INLINE Qt_QAbstractItemView_sizeHintForRow( ::pPtr, nRow ) - METHOD tabKeyNavigation() INLINE Qt_QAbstractItemView_tabKeyNavigation( ::pPtr ) - METHOD textElideMode() INLINE Qt_QAbstractItemView_textElideMode( ::pPtr ) - METHOD verticalScrollMode() INLINE Qt_QAbstractItemView_verticalScrollMode( ::pPtr ) + METHOD clearSelection() INLINE Qt_QAbstractItemView_clearSelection( ::pPtr ) + METHOD edit( pIndex ) INLINE Qt_QAbstractItemView_edit( ::pPtr, pIndex ) + METHOD reset() INLINE Qt_QAbstractItemView_reset( ::pPtr ) + METHOD scrollToBottom() INLINE Qt_QAbstractItemView_scrollToBottom( ::pPtr ) + METHOD scrollToTop() INLINE Qt_QAbstractItemView_scrollToTop( ::pPtr ) + METHOD selectAll() INLINE Qt_QAbstractItemView_selectAll( ::pPtr ) + METHOD setCurrentIndex( pIndex ) INLINE Qt_QAbstractItemView_setCurrentIndex( ::pPtr, pIndex ) + METHOD setRootIndex( pIndex ) INLINE Qt_QAbstractItemView_setRootIndex( ::pPtr, pIndex ) ENDCLASS @@ -112,6 +78,8 @@ CLASS QAbstractItemView INHERIT QAbstractScrollArea METHOD New( pParent ) CLASS QAbstractItemView + ::pParent := pParent + ::pPtr := Qt_QAbstractItemView( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQAbstractPrintDialog.prg b/harbour/contrib/hbqt/TQAbstractPrintDialog.prg index 2df9ee8a39..90b82345cb 100644 --- a/harbour/contrib/hbqt/TQAbstractPrintDialog.prg +++ b/harbour/contrib/hbqt/TQAbstractPrintDialog.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAbstractPrintDialog INHERIT QDialog +CREATE CLASS QAbstractPrintDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -70,7 +71,7 @@ CLASS QAbstractPrintDialog INHERIT QDialog METHOD printer() INLINE Qt_QAbstractPrintDialog_printer( ::pPtr ) METHOD setFromTo( nFrom, nTo ) INLINE Qt_QAbstractPrintDialog_setFromTo( ::pPtr, nFrom, nTo ) METHOD setMinMax( nMin, nMax ) INLINE Qt_QAbstractPrintDialog_setMinMax( ::pPtr, nMin, nMax ) - METHOD setPrintRange( nPrintRange ) INLINE Qt_QAbstractPrintDialog_setPrintRange( ::pPtr, nPrintRange ) + METHOD setPrintRange( nRange ) INLINE Qt_QAbstractPrintDialog_setPrintRange( ::pPtr, nRange ) METHOD toPage() INLINE Qt_QAbstractPrintDialog_toPage( ::pPtr ) ENDCLASS @@ -79,6 +80,8 @@ CLASS QAbstractPrintDialog INHERIT QDialog METHOD New( pParent ) CLASS QAbstractPrintDialog + ::pParent := pParent + ::pPtr := Qt_QAbstractPrintDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQAbstractScrollArea.prg b/harbour/contrib/hbqt/TQAbstractScrollArea.prg index c91c30604d..bdb42e6067 100644 --- a/harbour/contrib/hbqt/TQAbstractScrollArea.prg +++ b/harbour/contrib/hbqt/TQAbstractScrollArea.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAbstractScrollArea INHERIT QFrame +CREATE CLASS QAbstractScrollArea INHERIT QFrame - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -67,6 +68,7 @@ CLASS QAbstractScrollArea INHERIT QFrame METHOD horizontalScrollBar() INLINE Qt_QAbstractScrollArea_horizontalScrollBar( ::pPtr ) METHOD horizontalScrollBarPolicy() INLINE Qt_QAbstractScrollArea_horizontalScrollBarPolicy( ::pPtr ) METHOD maximumViewportSize() INLINE Qt_QAbstractScrollArea_maximumViewportSize( ::pPtr ) + METHOD scrollBarWidgets( nAlignment ) INLINE Qt_QAbstractScrollArea_scrollBarWidgets( ::pPtr, nAlignment ) METHOD setCornerWidget( pWidget ) INLINE Qt_QAbstractScrollArea_setCornerWidget( ::pPtr, pWidget ) METHOD setHorizontalScrollBar( pScrollBar ) INLINE Qt_QAbstractScrollArea_setHorizontalScrollBar( ::pPtr, pScrollBar ) METHOD setHorizontalScrollBarPolicy( nQt_ScrollBarPolicy ) INLINE Qt_QAbstractScrollArea_setHorizontalScrollBarPolicy( ::pPtr, nQt_ScrollBarPolicy ) @@ -83,6 +85,8 @@ CLASS QAbstractScrollArea INHERIT QFrame METHOD New( pParent ) CLASS QAbstractScrollArea + ::pParent := pParent + ::pPtr := Qt_QAbstractScrollArea( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQAbstractSlider.prg b/harbour/contrib/hbqt/TQAbstractSlider.prg index 5c324c9986..fb80b6d357 100644 --- a/harbour/contrib/hbqt/TQAbstractSlider.prg +++ b/harbour/contrib/hbqt/TQAbstractSlider.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAbstractSlider INHERIT QWidget +CREATE CLASS QAbstractSlider INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -82,8 +83,10 @@ CLASS QAbstractSlider INHERIT QWidget METHOD setTracking( lEnable ) INLINE Qt_QAbstractSlider_setTracking( ::pPtr, lEnable ) METHOD singleStep() INLINE Qt_QAbstractSlider_singleStep( ::pPtr ) METHOD sliderPosition() INLINE Qt_QAbstractSlider_sliderPosition( ::pPtr ) - METHOD triggerAction( nSliderAction ) INLINE Qt_QAbstractSlider_triggerAction( ::pPtr, nSliderAction ) + METHOD triggerAction( nAction ) INLINE Qt_QAbstractSlider_triggerAction( ::pPtr, nAction ) METHOD value() INLINE Qt_QAbstractSlider_value( ::pPtr ) + METHOD setOrientation( nQt_Orientation ) INLINE Qt_QAbstractSlider_setOrientation( ::pPtr, nQt_Orientation ) + METHOD setValue( nInt ) INLINE Qt_QAbstractSlider_setValue( ::pPtr, nInt ) ENDCLASS @@ -91,6 +94,8 @@ CLASS QAbstractSlider INHERIT QWidget METHOD New( pParent ) CLASS QAbstractSlider + ::pParent := pParent + ::pPtr := Qt_QAbstractSlider( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQAbstractSpinBox.prg b/harbour/contrib/hbqt/TQAbstractSpinBox.prg index d2d105a713..3056314c3d 100644 --- a/harbour/contrib/hbqt/TQAbstractSpinBox.prg +++ b/harbour/contrib/hbqt/TQAbstractSpinBox.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAbstractSpinBox INHERIT QWidget +CREATE CLASS QAbstractSpinBox INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -73,8 +74,8 @@ CLASS QAbstractSpinBox INHERIT QWidget METHOD keyboardTracking() INLINE Qt_QAbstractSpinBox_keyboardTracking( ::pPtr ) METHOD setAccelerated( lOn ) INLINE Qt_QAbstractSpinBox_setAccelerated( ::pPtr, lOn ) METHOD setAlignment( nFlag ) INLINE Qt_QAbstractSpinBox_setAlignment( ::pPtr, nFlag ) - METHOD setButtonSymbols( nButtonSymbols ) INLINE Qt_QAbstractSpinBox_setButtonSymbols( ::pPtr, nButtonSymbols ) - METHOD setCorrectionMode( nCorrectionMode ) INLINE Qt_QAbstractSpinBox_setCorrectionMode( ::pPtr, nCorrectionMode ) + METHOD setButtonSymbols( nBs ) INLINE Qt_QAbstractSpinBox_setButtonSymbols( ::pPtr, nBs ) + METHOD setCorrectionMode( nCm ) INLINE Qt_QAbstractSpinBox_setCorrectionMode( ::pPtr, nCm ) METHOD setFrame( lBool ) INLINE Qt_QAbstractSpinBox_setFrame( ::pPtr, lBool ) METHOD setKeyboardTracking( lKt ) INLINE Qt_QAbstractSpinBox_setKeyboardTracking( ::pPtr, lKt ) METHOD setReadOnly( lR ) INLINE Qt_QAbstractSpinBox_setReadOnly( ::pPtr, lR ) @@ -84,6 +85,10 @@ CLASS QAbstractSpinBox INHERIT QWidget METHOD stepBy( nSteps ) INLINE Qt_QAbstractSpinBox_stepBy( ::pPtr, nSteps ) METHOD text() INLINE Qt_QAbstractSpinBox_text( ::pPtr ) METHOD wrapping() INLINE Qt_QAbstractSpinBox_wrapping( ::pPtr ) + METHOD clear() INLINE Qt_QAbstractSpinBox_clear( ::pPtr ) + METHOD selectAll() INLINE Qt_QAbstractSpinBox_selectAll( ::pPtr ) + METHOD stepDown() INLINE Qt_QAbstractSpinBox_stepDown( ::pPtr ) + METHOD stepUp() INLINE Qt_QAbstractSpinBox_stepUp( ::pPtr ) ENDCLASS @@ -91,6 +96,8 @@ CLASS QAbstractSpinBox INHERIT QWidget METHOD New( pParent ) CLASS QAbstractSpinBox + ::pParent := pParent + ::pPtr := Qt_QAbstractSpinBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQAction.prg b/harbour/contrib/hbqt/TQAction.prg index 2cb2b894f4..bd3ca6d1c7 100644 --- a/harbour/contrib/hbqt/TQAction.prg +++ b/harbour/contrib/hbqt/TQAction.prg @@ -53,18 +53,22 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QAction INHERIT QObject +CREATE CLASS QAction INHERIT QObject - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD actionGroup() INLINE Qt_QAction_actionGroup( ::pPtr ) - METHOD activate( nActionEvent ) INLINE Qt_QAction_activate( ::pPtr, nActionEvent ) + METHOD activate( nEvent ) INLINE Qt_QAction_activate( ::pPtr, nEvent ) METHOD autoRepeat() INLINE Qt_QAction_autoRepeat( ::pPtr ) + METHOD data() INLINE Qt_QAction_data( ::pPtr ) + METHOD font() INLINE Qt_QAction_font( ::pPtr ) + METHOD icon() INLINE Qt_QAction_icon( ::pPtr ) METHOD iconText() INLINE Qt_QAction_iconText( ::pPtr ) METHOD isCheckable() INLINE Qt_QAction_isCheckable( ::pPtr ) METHOD isChecked() INLINE Qt_QAction_isChecked( ::pPtr ) @@ -78,24 +82,35 @@ CLASS QAction INHERIT QObject METHOD setActionGroup( pGroup ) INLINE Qt_QAction_setActionGroup( ::pPtr, pGroup ) METHOD setAutoRepeat( lBool ) INLINE Qt_QAction_setAutoRepeat( ::pPtr, lBool ) METHOD setCheckable( lBool ) INLINE Qt_QAction_setCheckable( ::pPtr, lBool ) + METHOD setData( pUserData ) INLINE Qt_QAction_setData( ::pPtr, pUserData ) + METHOD setFont( pFont ) INLINE Qt_QAction_setFont( ::pPtr, pFont ) METHOD setIcon( cIcon ) INLINE Qt_QAction_setIcon( ::pPtr, cIcon ) METHOD setIconText( cText ) INLINE Qt_QAction_setIconText( ::pPtr, cText ) METHOD setIconVisibleInMenu( lVisible ) INLINE Qt_QAction_setIconVisibleInMenu( ::pPtr, lVisible ) METHOD setMenu( pMenu ) INLINE Qt_QAction_setMenu( ::pPtr, pMenu ) METHOD setMenuRole( nMenuRole ) INLINE Qt_QAction_setMenuRole( ::pPtr, nMenuRole ) METHOD setSeparator( lB ) INLINE Qt_QAction_setSeparator( ::pPtr, lB ) + METHOD setShortcut( pShortcut ) INLINE Qt_QAction_setShortcut( ::pPtr, pShortcut ) METHOD setShortcutContext( nContext ) INLINE Qt_QAction_setShortcutContext( ::pPtr, nContext ) METHOD setShortcuts( nKey ) INLINE Qt_QAction_setShortcuts( ::pPtr, nKey ) METHOD setStatusTip( cStatusTip ) INLINE Qt_QAction_setStatusTip( ::pPtr, cStatusTip ) METHOD setText( cText ) INLINE Qt_QAction_setText( ::pPtr, cText ) METHOD setToolTip( cTip ) INLINE Qt_QAction_setToolTip( ::pPtr, cTip ) METHOD setWhatsThis( cWhat ) INLINE Qt_QAction_setWhatsThis( ::pPtr, cWhat ) + METHOD shortcut() INLINE Qt_QAction_shortcut( ::pPtr ) METHOD shortcutContext() INLINE Qt_QAction_shortcutContext( ::pPtr ) METHOD showStatusText( pWidget ) INLINE Qt_QAction_showStatusText( ::pPtr, pWidget ) METHOD statusTip() INLINE Qt_QAction_statusTip( ::pPtr ) METHOD text() INLINE Qt_QAction_text( ::pPtr ) METHOD toolTip() INLINE Qt_QAction_toolTip( ::pPtr ) METHOD whatsThis() INLINE Qt_QAction_whatsThis( ::pPtr ) + METHOD hover() INLINE Qt_QAction_hover( ::pPtr ) + METHOD setChecked( lBool ) INLINE Qt_QAction_setChecked( ::pPtr, lBool ) + METHOD setDisabled( lB ) INLINE Qt_QAction_setDisabled( ::pPtr, lB ) + METHOD setEnabled( lBool ) INLINE Qt_QAction_setEnabled( ::pPtr, lBool ) + METHOD setVisible( lBool ) INLINE Qt_QAction_setVisible( ::pPtr, lBool ) + METHOD toggle() INLINE Qt_QAction_toggle( ::pPtr ) + METHOD trigger() INLINE Qt_QAction_trigger( ::pPtr ) ENDCLASS @@ -103,6 +118,8 @@ CLASS QAction INHERIT QObject METHOD New( pParent ) CLASS QAction + ::pParent := pParent + ::pPtr := Qt_QAction( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQBitmap.prg b/harbour/contrib/hbqt/TQBitmap.prg new file mode 100644 index 0000000000..cf2e488365 --- /dev/null +++ b/harbour/contrib/hbqt/TQBitmap.prg @@ -0,0 +1,83 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QBitmap INHERIT QPixmap + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD clear() INLINE Qt_QBitmap_clear( ::pPtr ) + METHOD transformed( pMatrix ) INLINE Qt_QBitmap_transformed( ::pPtr, pMatrix ) + METHOD transformed_1( pMatrix ) INLINE Qt_QBitmap_transformed_1( ::pPtr, pMatrix ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QBitmap + + ::pParent := pParent + + ::pPtr := Qt_QBitmap( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQBoxLayout.prg b/harbour/contrib/hbqt/TQBoxLayout.prg index fcaf8a56cf..858e1bc5ea 100644 --- a/harbour/contrib/hbqt/TQBoxLayout.prg +++ b/harbour/contrib/hbqt/TQBoxLayout.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QBoxLayout INHERIT QLayout +CREATE CLASS QBoxLayout INHERIT QLayout - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -89,6 +90,8 @@ CLASS QBoxLayout INHERIT QLayout METHOD New( pParent ) CLASS QBoxLayout + ::pParent := pParent + ::pPtr := Qt_QBoxLayout( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQCalendarWidget.prg b/harbour/contrib/hbqt/TQCalendarWidget.prg index 46290545cc..9d7619d524 100644 --- a/harbour/contrib/hbqt/TQCalendarWidget.prg +++ b/harbour/contrib/hbqt/TQCalendarWidget.prg @@ -53,31 +53,54 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QCalendarWidget INHERIT QWidget +CREATE CLASS QCalendarWidget INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD dateEditAcceptDelay() INLINE Qt_QCalendarWidget_dateEditAcceptDelay( ::pPtr ) + METHOD dateTextFormat( pDate ) INLINE Qt_QCalendarWidget_dateTextFormat( ::pPtr, pDate ) METHOD firstDayOfWeek() INLINE Qt_QCalendarWidget_firstDayOfWeek( ::pPtr ) + METHOD headerTextFormat() INLINE Qt_QCalendarWidget_headerTextFormat( ::pPtr ) METHOD horizontalHeaderFormat() INLINE Qt_QCalendarWidget_horizontalHeaderFormat( ::pPtr ) METHOD isDateEditEnabled() INLINE Qt_QCalendarWidget_isDateEditEnabled( ::pPtr ) METHOD isGridVisible() INLINE Qt_QCalendarWidget_isGridVisible( ::pPtr ) METHOD isNavigationBarVisible() INLINE Qt_QCalendarWidget_isNavigationBarVisible( ::pPtr ) + METHOD maximumDate() INLINE Qt_QCalendarWidget_maximumDate( ::pPtr ) + METHOD minimumDate() INLINE Qt_QCalendarWidget_minimumDate( ::pPtr ) METHOD monthShown() INLINE Qt_QCalendarWidget_monthShown( ::pPtr ) + METHOD selectedDate() INLINE Qt_QCalendarWidget_selectedDate( ::pPtr ) METHOD selectionMode() INLINE Qt_QCalendarWidget_selectionMode( ::pPtr ) METHOD setDateEditAcceptDelay( nDelay ) INLINE Qt_QCalendarWidget_setDateEditAcceptDelay( ::pPtr, nDelay ) METHOD setDateEditEnabled( lEnable ) INLINE Qt_QCalendarWidget_setDateEditEnabled( ::pPtr, lEnable ) + METHOD setDateTextFormat( pDate, pFormat ) INLINE Qt_QCalendarWidget_setDateTextFormat( ::pPtr, pDate, pFormat ) METHOD setFirstDayOfWeek( nDayOfWeek ) INLINE Qt_QCalendarWidget_setFirstDayOfWeek( ::pPtr, nDayOfWeek ) - METHOD setHorizontalHeaderFormat( nHorizontalHeaderFormat ) INLINE Qt_QCalendarWidget_setHorizontalHeaderFormat( ::pPtr, nHorizontalHeaderFormat ) - METHOD setSelectionMode( nSelectionMode ) INLINE Qt_QCalendarWidget_setSelectionMode( ::pPtr, nSelectionMode ) - METHOD setVerticalHeaderFormat( nVerticalHeaderFormat ) INLINE Qt_QCalendarWidget_setVerticalHeaderFormat( ::pPtr, nVerticalHeaderFormat ) + METHOD setHeaderTextFormat( pFormat ) INLINE Qt_QCalendarWidget_setHeaderTextFormat( ::pPtr, pFormat ) + METHOD setHorizontalHeaderFormat( nFormat ) INLINE Qt_QCalendarWidget_setHorizontalHeaderFormat( ::pPtr, nFormat ) + METHOD setMaximumDate( pDate ) INLINE Qt_QCalendarWidget_setMaximumDate( ::pPtr, pDate ) + METHOD setMinimumDate( pDate ) INLINE Qt_QCalendarWidget_setMinimumDate( ::pPtr, pDate ) + METHOD setSelectionMode( nMode ) INLINE Qt_QCalendarWidget_setSelectionMode( ::pPtr, nMode ) + METHOD setVerticalHeaderFormat( nFormat ) INLINE Qt_QCalendarWidget_setVerticalHeaderFormat( ::pPtr, nFormat ) + METHOD setWeekdayTextFormat( nDayOfWeek, pFormat ) INLINE Qt_QCalendarWidget_setWeekdayTextFormat( ::pPtr, nDayOfWeek, pFormat ) METHOD verticalHeaderFormat() INLINE Qt_QCalendarWidget_verticalHeaderFormat( ::pPtr ) + METHOD weekdayTextFormat( nDayOfWeek ) INLINE Qt_QCalendarWidget_weekdayTextFormat( ::pPtr, nDayOfWeek ) METHOD yearShown() INLINE Qt_QCalendarWidget_yearShown( ::pPtr ) + METHOD setCurrentPage( nYear, nMonth ) INLINE Qt_QCalendarWidget_setCurrentPage( ::pPtr, nYear, nMonth ) + METHOD setDateRange( pMin, pMax ) INLINE Qt_QCalendarWidget_setDateRange( ::pPtr, pMin, pMax ) + METHOD setGridVisible( lShow ) INLINE Qt_QCalendarWidget_setGridVisible( ::pPtr, lShow ) + METHOD setNavigationBarVisible( lVisible ) INLINE Qt_QCalendarWidget_setNavigationBarVisible( ::pPtr, lVisible ) + METHOD setSelectedDate( pDate ) INLINE Qt_QCalendarWidget_setSelectedDate( ::pPtr, pDate ) + METHOD showNextMonth() INLINE Qt_QCalendarWidget_showNextMonth( ::pPtr ) + METHOD showNextYear() INLINE Qt_QCalendarWidget_showNextYear( ::pPtr ) + METHOD showPreviousMonth() INLINE Qt_QCalendarWidget_showPreviousMonth( ::pPtr ) + METHOD showPreviousYear() INLINE Qt_QCalendarWidget_showPreviousYear( ::pPtr ) + METHOD showSelectedDate() INLINE Qt_QCalendarWidget_showSelectedDate( ::pPtr ) + METHOD showToday() INLINE Qt_QCalendarWidget_showToday( ::pPtr ) ENDCLASS @@ -85,6 +108,8 @@ CLASS QCalendarWidget INHERIT QWidget METHOD New( pParent ) CLASS QCalendarWidget + ::pParent := pParent + ::pPtr := Qt_QCalendarWidget( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQCheckBox.prg b/harbour/contrib/hbqt/TQCheckBox.prg index d1e7010f9e..5da7627891 100644 --- a/harbour/contrib/hbqt/TQCheckBox.prg +++ b/harbour/contrib/hbqt/TQCheckBox.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QCheckBox INHERIT QAbstractButton +CREATE CLASS QCheckBox INHERIT QAbstractButton - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -73,6 +74,8 @@ CLASS QCheckBox INHERIT QAbstractButton METHOD New( pParent ) CLASS QCheckBox + ::pParent := pParent + ::pPtr := Qt_QCheckBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQColorDialog.prg b/harbour/contrib/hbqt/TQColorDialog.prg index 20549009c9..411c9ad658 100644 --- a/harbour/contrib/hbqt/TQColorDialog.prg +++ b/harbour/contrib/hbqt/TQColorDialog.prg @@ -53,22 +53,25 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QColorDialog INHERIT QDialog +CREATE CLASS QColorDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() + METHOD currentColor() INLINE Qt_QColorDialog_currentColor( ::pPtr ) METHOD open() INLINE Qt_QColorDialog_open( ::pPtr ) - METHOD open_1( pReceiver, pMember ) INLINE Qt_QColorDialog_open_1( ::pPtr, pReceiver, pMember ) METHOD options() INLINE Qt_QColorDialog_options( ::pPtr ) - METHOD setOption( nColorDialogOption, lOn ) INLINE Qt_QColorDialog_setOption( ::pPtr, nColorDialogOption, lOn ) - METHOD setOptions( nColorDialogOptions ) INLINE Qt_QColorDialog_setOptions( ::pPtr, nColorDialogOptions ) + METHOD selectedColor() INLINE Qt_QColorDialog_selectedColor( ::pPtr ) + METHOD setCurrentColor( pColor ) INLINE Qt_QColorDialog_setCurrentColor( ::pPtr, pColor ) + METHOD setOption( nOption, lOn ) INLINE Qt_QColorDialog_setOption( ::pPtr, nOption, lOn ) + METHOD setOptions( nOptions ) INLINE Qt_QColorDialog_setOptions( ::pPtr, nOptions ) METHOD setVisible( lVisible ) INLINE Qt_QColorDialog_setVisible( ::pPtr, lVisible ) - METHOD testOption( nColorDialogOption ) INLINE Qt_QColorDialog_testOption( ::pPtr, nColorDialogOption ) + METHOD testOption( nOption ) INLINE Qt_QColorDialog_testOption( ::pPtr, nOption ) ENDCLASS @@ -76,6 +79,8 @@ CLASS QColorDialog INHERIT QDialog METHOD New( pParent ) CLASS QColorDialog + ::pParent := pParent + ::pPtr := Qt_QColorDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQComboBox.prg b/harbour/contrib/hbqt/TQComboBox.prg index 018eeeb203..b481cc4fad 100644 --- a/harbour/contrib/hbqt/TQComboBox.prg +++ b/harbour/contrib/hbqt/TQComboBox.prg @@ -53,27 +53,38 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QComboBox INHERIT QWidget +CREATE CLASS QComboBox INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() + METHOD addItem( cText, pUserData ) INLINE Qt_QComboBox_addItem( ::pPtr, cText, pUserData ) + METHOD addItem_1( cIcon, cText, pUserData ) INLINE Qt_QComboBox_addItem_1( ::pPtr, cIcon, cText, pUserData ) + METHOD addItems( pTexts ) INLINE Qt_QComboBox_addItems( ::pPtr, pTexts ) METHOD completer() INLINE Qt_QComboBox_completer( ::pPtr ) METHOD count() INLINE Qt_QComboBox_count( ::pPtr ) METHOD currentIndex() INLINE Qt_QComboBox_currentIndex( ::pPtr ) METHOD currentText() INLINE Qt_QComboBox_currentText( ::pPtr ) METHOD duplicatesEnabled() INLINE Qt_QComboBox_duplicatesEnabled( ::pPtr ) + METHOD findData( pData, nRole, nFlags ) INLINE Qt_QComboBox_findData( ::pPtr, pData, nRole, nFlags ) + METHOD findText( cText, nFlags ) INLINE Qt_QComboBox_findText( ::pPtr, cText, nFlags ) METHOD hasFrame() INLINE Qt_QComboBox_hasFrame( ::pPtr ) METHOD hidePopup() INLINE Qt_QComboBox_hidePopup( ::pPtr ) METHOD iconSize() INLINE Qt_QComboBox_iconSize( ::pPtr ) + METHOD insertItem( nIndex, cText, pUserData ) INLINE Qt_QComboBox_insertItem( ::pPtr, nIndex, cText, pUserData ) + METHOD insertItem_1( nIndex, cIcon, cText, pUserData ) INLINE Qt_QComboBox_insertItem_1( ::pPtr, nIndex, cIcon, cText, pUserData ) + METHOD insertItems( nIndex, pList ) INLINE Qt_QComboBox_insertItems( ::pPtr, nIndex, pList ) METHOD insertPolicy() INLINE Qt_QComboBox_insertPolicy( ::pPtr ) METHOD insertSeparator( nIndex ) INLINE Qt_QComboBox_insertSeparator( ::pPtr, nIndex ) METHOD isEditable() INLINE Qt_QComboBox_isEditable( ::pPtr ) + METHOD itemData( nIndex, nRole ) INLINE Qt_QComboBox_itemData( ::pPtr, nIndex, nRole ) METHOD itemDelegate() INLINE Qt_QComboBox_itemDelegate( ::pPtr ) + METHOD itemIcon( nIndex ) INLINE Qt_QComboBox_itemIcon( ::pPtr, nIndex ) METHOD itemText( nIndex ) INLINE Qt_QComboBox_itemText( ::pPtr, nIndex ) METHOD lineEdit() INLINE Qt_QComboBox_lineEdit( ::pPtr ) METHOD maxCount() INLINE Qt_QComboBox_maxCount( ::pPtr ) @@ -82,12 +93,14 @@ CLASS QComboBox INHERIT QWidget METHOD model() INLINE Qt_QComboBox_model( ::pPtr ) METHOD modelColumn() INLINE Qt_QComboBox_modelColumn( ::pPtr ) METHOD removeItem( nIndex ) INLINE Qt_QComboBox_removeItem( ::pPtr, nIndex ) + METHOD rootModelIndex() INLINE Qt_QComboBox_rootModelIndex( ::pPtr ) METHOD setCompleter( pCompleter ) INLINE Qt_QComboBox_setCompleter( ::pPtr, pCompleter ) METHOD setDuplicatesEnabled( lEnable ) INLINE Qt_QComboBox_setDuplicatesEnabled( ::pPtr, lEnable ) METHOD setEditable( lEditable ) INLINE Qt_QComboBox_setEditable( ::pPtr, lEditable ) METHOD setFrame( lBool ) INLINE Qt_QComboBox_setFrame( ::pPtr, lBool ) - METHOD setIconSize( aSizeSize ) INLINE Qt_QComboBox_setIconSize( ::pPtr, aSizeSize ) - METHOD setInsertPolicy( nInsertPolicy ) INLINE Qt_QComboBox_setInsertPolicy( ::pPtr, nInsertPolicy ) + METHOD setIconSize( pSize ) INLINE Qt_QComboBox_setIconSize( ::pPtr, pSize ) + METHOD setInsertPolicy( nPolicy ) INLINE Qt_QComboBox_setInsertPolicy( ::pPtr, nPolicy ) + METHOD setItemData( nIndex, pValue, nRole ) INLINE Qt_QComboBox_setItemData( ::pPtr, nIndex, pValue, nRole ) METHOD setItemDelegate( pDelegate ) INLINE Qt_QComboBox_setItemDelegate( ::pPtr, pDelegate ) METHOD setItemIcon( nIndex, cIcon ) INLINE Qt_QComboBox_setItemIcon( ::pPtr, nIndex, cIcon ) METHOD setItemText( nIndex, cText ) INLINE Qt_QComboBox_setItemText( ::pPtr, nIndex, cText ) @@ -97,13 +110,18 @@ CLASS QComboBox INHERIT QWidget METHOD setMinimumContentsLength( nCharacters ) INLINE Qt_QComboBox_setMinimumContentsLength( ::pPtr, nCharacters ) METHOD setModel( pModel ) INLINE Qt_QComboBox_setModel( ::pPtr, pModel ) METHOD setModelColumn( nVisibleColumn ) INLINE Qt_QComboBox_setModelColumn( ::pPtr, nVisibleColumn ) - METHOD setSizeAdjustPolicy( nSizeAdjustPolicy ) INLINE Qt_QComboBox_setSizeAdjustPolicy( ::pPtr, nSizeAdjustPolicy ) + METHOD setRootModelIndex( pIndex ) INLINE Qt_QComboBox_setRootModelIndex( ::pPtr, pIndex ) + METHOD setSizeAdjustPolicy( nPolicy ) INLINE Qt_QComboBox_setSizeAdjustPolicy( ::pPtr, nPolicy ) METHOD setValidator( pValidator ) INLINE Qt_QComboBox_setValidator( ::pPtr, pValidator ) METHOD setView( pItemView ) INLINE Qt_QComboBox_setView( ::pPtr, pItemView ) METHOD showPopup() INLINE Qt_QComboBox_showPopup( ::pPtr ) METHOD sizeAdjustPolicy() INLINE Qt_QComboBox_sizeAdjustPolicy( ::pPtr ) METHOD validator() INLINE Qt_QComboBox_validator( ::pPtr ) METHOD view() INLINE Qt_QComboBox_view( ::pPtr ) + METHOD clear() INLINE Qt_QComboBox_clear( ::pPtr ) + METHOD clearEditText() INLINE Qt_QComboBox_clearEditText( ::pPtr ) + METHOD setCurrentIndex( nIndex ) INLINE Qt_QComboBox_setCurrentIndex( ::pPtr, nIndex ) + METHOD setEditText( cText ) INLINE Qt_QComboBox_setEditText( ::pPtr, cText ) ENDCLASS @@ -111,6 +129,8 @@ CLASS QComboBox INHERIT QWidget METHOD New( pParent ) CLASS QComboBox + ::pParent := pParent + ::pPtr := Qt_QComboBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQCommandLinkButton.prg b/harbour/contrib/hbqt/TQCommandLinkButton.prg index 79d3155706..8c9c231452 100644 --- a/harbour/contrib/hbqt/TQCommandLinkButton.prg +++ b/harbour/contrib/hbqt/TQCommandLinkButton.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QCommandLinkButton INHERIT QPushButton +CREATE CLASS QCommandLinkButton INHERIT QPushButton - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -71,6 +72,8 @@ CLASS QCommandLinkButton INHERIT QPushButton METHOD New( pParent ) CLASS QCommandLinkButton + ::pParent := pParent + ::pPtr := Qt_QCommandLinkButton( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQCommonStyle.prg b/harbour/contrib/hbqt/TQCommonStyle.prg new file mode 100644 index 0000000000..c03d8211cb --- /dev/null +++ b/harbour/contrib/hbqt/TQCommonStyle.prg @@ -0,0 +1,80 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QCommonStyle INHERIT QStyle + + VAR pParent + VAR pPtr + + METHOD New() + + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QCommonStyle + + ::pParent := pParent + + ::pPtr := Qt_QCommonStyle( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQDateEdit.prg b/harbour/contrib/hbqt/TQDateEdit.prg index a2ba4a5127..cb50096e34 100644 --- a/harbour/contrib/hbqt/TQDateEdit.prg +++ b/harbour/contrib/hbqt/TQDateEdit.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QDateEdit INHERIT QDateTimeEdit +CREATE CLASS QDateEdit INHERIT QDateTimeEdit - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QDateEdit INHERIT QDateTimeEdit METHOD New( pParent ) CLASS QDateEdit + ::pParent := pParent + ::pPtr := Qt_QDateEdit( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQDateTimeEdit.prg b/harbour/contrib/hbqt/TQDateTimeEdit.prg index 65ca21294d..343f59ad10 100644 --- a/harbour/contrib/hbqt/TQDateTimeEdit.prg +++ b/harbour/contrib/hbqt/TQDateTimeEdit.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QDateTimeEdit INHERIT QAbstractSpinBox +CREATE CLASS QDateTimeEdit INHERIT QAbstractSpinBox - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -72,8 +73,16 @@ CLASS QDateTimeEdit INHERIT QAbstractSpinBox METHOD clearMinimumTime() INLINE Qt_QDateTimeEdit_clearMinimumTime( ::pPtr ) METHOD currentSection() INLINE Qt_QDateTimeEdit_currentSection( ::pPtr ) METHOD currentSectionIndex() INLINE Qt_QDateTimeEdit_currentSectionIndex( ::pPtr ) + METHOD date() INLINE Qt_QDateTimeEdit_date( ::pPtr ) + METHOD dateTime() INLINE Qt_QDateTimeEdit_dateTime( ::pPtr ) METHOD displayFormat() INLINE Qt_QDateTimeEdit_displayFormat( ::pPtr ) METHOD displayedSections() INLINE Qt_QDateTimeEdit_displayedSections( ::pPtr ) + METHOD maximumDate() INLINE Qt_QDateTimeEdit_maximumDate( ::pPtr ) + METHOD maximumDateTime() INLINE Qt_QDateTimeEdit_maximumDateTime( ::pPtr ) + METHOD maximumTime() INLINE Qt_QDateTimeEdit_maximumTime( ::pPtr ) + METHOD minimumDate() INLINE Qt_QDateTimeEdit_minimumDate( ::pPtr ) + METHOD minimumDateTime() INLINE Qt_QDateTimeEdit_minimumDateTime( ::pPtr ) + METHOD minimumTime() INLINE Qt_QDateTimeEdit_minimumTime( ::pPtr ) METHOD sectionAt( nIndex ) INLINE Qt_QDateTimeEdit_sectionAt( ::pPtr, nIndex ) METHOD sectionCount() INLINE Qt_QDateTimeEdit_sectionCount( ::pPtr ) METHOD sectionText( nSection ) INLINE Qt_QDateTimeEdit_sectionText( ::pPtr, nSection ) @@ -81,10 +90,23 @@ CLASS QDateTimeEdit INHERIT QAbstractSpinBox METHOD setCalendarWidget( pCalendarWidget ) INLINE Qt_QDateTimeEdit_setCalendarWidget( ::pPtr, pCalendarWidget ) METHOD setCurrentSection( nSection ) INLINE Qt_QDateTimeEdit_setCurrentSection( ::pPtr, nSection ) METHOD setCurrentSectionIndex( nIndex ) INLINE Qt_QDateTimeEdit_setCurrentSectionIndex( ::pPtr, nIndex ) + METHOD setDateRange( pMin, pMax ) INLINE Qt_QDateTimeEdit_setDateRange( ::pPtr, pMin, pMax ) + METHOD setDateTimeRange( pMin, pMax ) INLINE Qt_QDateTimeEdit_setDateTimeRange( ::pPtr, pMin, pMax ) METHOD setDisplayFormat( cFormat ) INLINE Qt_QDateTimeEdit_setDisplayFormat( ::pPtr, cFormat ) + METHOD setMaximumDate( pMax ) INLINE Qt_QDateTimeEdit_setMaximumDate( ::pPtr, pMax ) + METHOD setMaximumDateTime( pDt ) INLINE Qt_QDateTimeEdit_setMaximumDateTime( ::pPtr, pDt ) + METHOD setMaximumTime( pMax ) INLINE Qt_QDateTimeEdit_setMaximumTime( ::pPtr, pMax ) + METHOD setMinimumDate( pMin ) INLINE Qt_QDateTimeEdit_setMinimumDate( ::pPtr, pMin ) + METHOD setMinimumDateTime( pDt ) INLINE Qt_QDateTimeEdit_setMinimumDateTime( ::pPtr, pDt ) + METHOD setMinimumTime( pMin ) INLINE Qt_QDateTimeEdit_setMinimumTime( ::pPtr, pMin ) METHOD setSelectedSection( nSection ) INLINE Qt_QDateTimeEdit_setSelectedSection( ::pPtr, nSection ) + METHOD setTimeRange( pMin, pMax ) INLINE Qt_QDateTimeEdit_setTimeRange( ::pPtr, pMin, pMax ) METHOD setTimeSpec( nSpec ) INLINE Qt_QDateTimeEdit_setTimeSpec( ::pPtr, nSpec ) + METHOD time() INLINE Qt_QDateTimeEdit_time( ::pPtr ) METHOD timeSpec() INLINE Qt_QDateTimeEdit_timeSpec( ::pPtr ) + METHOD setDate( pDate ) INLINE Qt_QDateTimeEdit_setDate( ::pPtr, pDate ) + METHOD setDateTime( pDateTime ) INLINE Qt_QDateTimeEdit_setDateTime( ::pPtr, pDateTime ) + METHOD setTime( pTime ) INLINE Qt_QDateTimeEdit_setTime( ::pPtr, pTime ) ENDCLASS @@ -92,6 +114,8 @@ CLASS QDateTimeEdit INHERIT QAbstractSpinBox METHOD New( pParent ) CLASS QDateTimeEdit + ::pParent := pParent + ::pPtr := Qt_QDateTimeEdit( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQDesktopWidget.prg b/harbour/contrib/hbqt/TQDesktopWidget.prg new file mode 100644 index 0000000000..bd751985e2 --- /dev/null +++ b/harbour/contrib/hbqt/TQDesktopWidget.prg @@ -0,0 +1,92 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QDesktopWidget INHERIT QWidget + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD availableGeometry( nScreen ) INLINE Qt_QDesktopWidget_availableGeometry( ::pPtr, nScreen ) + METHOD availableGeometry_1( pWidget ) INLINE Qt_QDesktopWidget_availableGeometry_1( ::pPtr, pWidget ) + METHOD availableGeometry_2( pP ) INLINE Qt_QDesktopWidget_availableGeometry_2( ::pPtr, pP ) + METHOD isVirtualDesktop() INLINE Qt_QDesktopWidget_isVirtualDesktop( ::pPtr ) + METHOD numScreens() INLINE Qt_QDesktopWidget_numScreens( ::pPtr ) + METHOD primaryScreen() INLINE Qt_QDesktopWidget_primaryScreen( ::pPtr ) + METHOD screen( nScreen ) INLINE Qt_QDesktopWidget_screen( ::pPtr, nScreen ) + METHOD screenGeometry( nScreen ) INLINE Qt_QDesktopWidget_screenGeometry( ::pPtr, nScreen ) + METHOD screenGeometry_1( pWidget ) INLINE Qt_QDesktopWidget_screenGeometry_1( ::pPtr, pWidget ) + METHOD screenGeometry_2( pP ) INLINE Qt_QDesktopWidget_screenGeometry_2( ::pPtr, pP ) + METHOD screenNumber( pWidget ) INLINE Qt_QDesktopWidget_screenNumber( ::pPtr, pWidget ) + METHOD screenNumber_1( pPoint ) INLINE Qt_QDesktopWidget_screenNumber_1( ::pPtr, pPoint ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QDesktopWidget + + ::pParent := pParent + + ::pPtr := Qt_QDesktopWidget( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQDial.prg b/harbour/contrib/hbqt/TQDial.prg index 275b8a9e25..bacc14a1b3 100644 --- a/harbour/contrib/hbqt/TQDial.prg +++ b/harbour/contrib/hbqt/TQDial.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QDial INHERIT QAbstractSlider +CREATE CLASS QDial INHERIT QAbstractSlider - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -67,6 +68,8 @@ CLASS QDial INHERIT QAbstractSlider METHOD notchesVisible() INLINE Qt_QDial_notchesVisible( ::pPtr ) METHOD setNotchTarget( nTarget ) INLINE Qt_QDial_setNotchTarget( ::pPtr, nTarget ) METHOD wrapping() INLINE Qt_QDial_wrapping( ::pPtr ) + METHOD setNotchesVisible( lVisible ) INLINE Qt_QDial_setNotchesVisible( ::pPtr, lVisible ) + METHOD setWrapping( lOn ) INLINE Qt_QDial_setWrapping( ::pPtr, lOn ) ENDCLASS @@ -74,6 +77,8 @@ CLASS QDial INHERIT QAbstractSlider METHOD New( pParent ) CLASS QDial + ::pParent := pParent + ::pPtr := Qt_QDial( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQDialog.prg b/harbour/contrib/hbqt/TQDialog.prg index a32a65e791..7b1358c87f 100644 --- a/harbour/contrib/hbqt/TQDialog.prg +++ b/harbour/contrib/hbqt/TQDialog.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QDialog INHERIT QWidget +CREATE CLASS QDialog INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -79,6 +80,8 @@ CLASS QDialog INHERIT QWidget METHOD New( pParent ) CLASS QDialog + ::pParent := pParent + ::pPtr := Qt_QDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQDir.prg b/harbour/contrib/hbqt/TQDir.prg new file mode 100644 index 0000000000..6daa7d5735 --- /dev/null +++ b/harbour/contrib/hbqt/TQDir.prg @@ -0,0 +1,115 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QDir + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD absoluteFilePath( cFileName ) INLINE Qt_QDir_absoluteFilePath( ::pPtr, cFileName ) + METHOD absolutePath() INLINE Qt_QDir_absolutePath( ::pPtr ) + METHOD canonicalPath() INLINE Qt_QDir_canonicalPath( ::pPtr ) + METHOD cd( cDirName ) INLINE Qt_QDir_cd( ::pPtr, cDirName ) + METHOD cdUp() INLINE Qt_QDir_cdUp( ::pPtr ) + METHOD count() INLINE Qt_QDir_count( ::pPtr ) + METHOD dirName() INLINE Qt_QDir_dirName( ::pPtr ) + METHOD entryInfoList( pNameFilters, nFilters, nSort ) INLINE Qt_QDir_entryInfoList( ::pPtr, pNameFilters, nFilters, nSort ) + METHOD entryInfoList_1( nFilters, nSort ) INLINE Qt_QDir_entryInfoList_1( ::pPtr, nFilters, nSort ) + METHOD entryList( pNameFilters, nFilters, nSort ) INLINE Qt_QDir_entryList( ::pPtr, pNameFilters, nFilters, nSort ) + METHOD entryList_1( nFilters, nSort ) INLINE Qt_QDir_entryList_1( ::pPtr, nFilters, nSort ) + METHOD exists( cName ) INLINE Qt_QDir_exists( ::pPtr, cName ) + METHOD exists_1() INLINE Qt_QDir_exists_1( ::pPtr ) + METHOD filePath( cFileName ) INLINE Qt_QDir_filePath( ::pPtr, cFileName ) + METHOD filter() INLINE Qt_QDir_filter( ::pPtr ) + METHOD isAbsolute() INLINE Qt_QDir_isAbsolute( ::pPtr ) + METHOD isReadable() INLINE Qt_QDir_isReadable( ::pPtr ) + METHOD isRelative() INLINE Qt_QDir_isRelative( ::pPtr ) + METHOD isRoot() INLINE Qt_QDir_isRoot( ::pPtr ) + METHOD makeAbsolute() INLINE Qt_QDir_makeAbsolute( ::pPtr ) + METHOD mkdir( cDirName ) INLINE Qt_QDir_mkdir( ::pPtr, cDirName ) + METHOD mkpath( cDirPath ) INLINE Qt_QDir_mkpath( ::pPtr, cDirPath ) + METHOD nameFilters() INLINE Qt_QDir_nameFilters( ::pPtr ) + METHOD path() INLINE Qt_QDir_path( ::pPtr ) + METHOD refresh() INLINE Qt_QDir_refresh( ::pPtr ) + METHOD relativeFilePath( cFileName ) INLINE Qt_QDir_relativeFilePath( ::pPtr, cFileName ) + METHOD remove( cFileName ) INLINE Qt_QDir_remove( ::pPtr, cFileName ) + METHOD rename( cOldName, cNewName ) INLINE Qt_QDir_rename( ::pPtr, cOldName, cNewName ) + METHOD rmdir( cDirName ) INLINE Qt_QDir_rmdir( ::pPtr, cDirName ) + METHOD rmpath( cDirPath ) INLINE Qt_QDir_rmpath( ::pPtr, cDirPath ) + METHOD setFilter( nFilters ) INLINE Qt_QDir_setFilter( ::pPtr, nFilters ) + METHOD setNameFilters( pNameFilters ) INLINE Qt_QDir_setNameFilters( ::pPtr, pNameFilters ) + METHOD setPath( cPath ) INLINE Qt_QDir_setPath( ::pPtr, cPath ) + METHOD setSorting( nSort ) INLINE Qt_QDir_setSorting( ::pPtr, nSort ) + METHOD sorting() INLINE Qt_QDir_sorting( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QDir + + ::pParent := pParent + + ::pPtr := Qt_QDir( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQDockWidget.prg b/harbour/contrib/hbqt/TQDockWidget.prg new file mode 100644 index 0000000000..045b226f62 --- /dev/null +++ b/harbour/contrib/hbqt/TQDockWidget.prg @@ -0,0 +1,92 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QDockWidget INHERIT QWidget + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD allowedAreas() INLINE Qt_QDockWidget_allowedAreas( ::pPtr ) + METHOD features() INLINE Qt_QDockWidget_features( ::pPtr ) + METHOD isAreaAllowed( nArea ) INLINE Qt_QDockWidget_isAreaAllowed( ::pPtr, nArea ) + METHOD isFloating() INLINE Qt_QDockWidget_isFloating( ::pPtr ) + METHOD setAllowedAreas( nAreas ) INLINE Qt_QDockWidget_setAllowedAreas( ::pPtr, nAreas ) + METHOD setFeatures( nFeatures ) INLINE Qt_QDockWidget_setFeatures( ::pPtr, nFeatures ) + METHOD setFloating( lFloating ) INLINE Qt_QDockWidget_setFloating( ::pPtr, lFloating ) + METHOD setTitleBarWidget( pWidget ) INLINE Qt_QDockWidget_setTitleBarWidget( ::pPtr, pWidget ) + METHOD setWidget( pWidget ) INLINE Qt_QDockWidget_setWidget( ::pPtr, pWidget ) + METHOD titleBarWidget() INLINE Qt_QDockWidget_titleBarWidget( ::pPtr ) + METHOD toggleViewAction() INLINE Qt_QDockWidget_toggleViewAction( ::pPtr ) + METHOD widget() INLINE Qt_QDockWidget_widget( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QDockWidget + + ::pParent := pParent + + ::pPtr := Qt_QDockWidget( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQDoubleSpinBox.prg b/harbour/contrib/hbqt/TQDoubleSpinBox.prg index d2801f5186..bd7a124393 100644 --- a/harbour/contrib/hbqt/TQDoubleSpinBox.prg +++ b/harbour/contrib/hbqt/TQDoubleSpinBox.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QDoubleSpinBox INHERIT QAbstractSpinBox +CREATE CLASS QDoubleSpinBox INHERIT QAbstractSpinBox - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -79,6 +80,7 @@ CLASS QDoubleSpinBox INHERIT QAbstractSpinBox METHOD textFromValue( nValue ) INLINE Qt_QDoubleSpinBox_textFromValue( ::pPtr, nValue ) METHOD value() INLINE Qt_QDoubleSpinBox_value( ::pPtr ) METHOD valueFromText( cText ) INLINE Qt_QDoubleSpinBox_valueFromText( ::pPtr, cText ) + METHOD setValue( nVal ) INLINE Qt_QDoubleSpinBox_setValue( ::pPtr, nVal ) ENDCLASS @@ -86,6 +88,8 @@ CLASS QDoubleSpinBox INHERIT QAbstractSpinBox METHOD New( pParent ) CLASS QDoubleSpinBox + ::pParent := pParent + ::pPtr := Qt_QDoubleSpinBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQErrorMessage.prg b/harbour/contrib/hbqt/TQErrorMessage.prg index 23d879d523..80dbc5a3ad 100644 --- a/harbour/contrib/hbqt/TQErrorMessage.prg +++ b/harbour/contrib/hbqt/TQErrorMessage.prg @@ -53,15 +53,17 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QErrorMessage INHERIT QDialog +CREATE CLASS QErrorMessage INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() + METHOD showMessage( cMessage, cType ) INLINE Qt_QErrorMessage_showMessage( ::pPtr, cMessage, cType ) ENDCLASS @@ -69,6 +71,8 @@ CLASS QErrorMessage INHERIT QDialog METHOD New( pParent ) CLASS QErrorMessage + ::pParent := pParent + ::pPtr := Qt_QErrorMessage( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQEvent.prg b/harbour/contrib/hbqt/TQEvent.prg new file mode 100644 index 0000000000..d35541a632 --- /dev/null +++ b/harbour/contrib/hbqt/TQEvent.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QEvent + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD accept() INLINE Qt_QEvent_accept( ::pPtr ) + METHOD ignore() INLINE Qt_QEvent_ignore( ::pPtr ) + METHOD isAccepted() INLINE Qt_QEvent_isAccepted( ::pPtr ) + METHOD setAccepted( lAccepted ) INLINE Qt_QEvent_setAccepted( ::pPtr, lAccepted ) + METHOD spontaneous() INLINE Qt_QEvent_spontaneous( ::pPtr ) + METHOD type() INLINE Qt_QEvent_type( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QEvent + + ::pParent := pParent + + ::pPtr := Qt_QEvent( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQEventLoop.prg b/harbour/contrib/hbqt/TQEventLoop.prg new file mode 100644 index 0000000000..da2011d73a --- /dev/null +++ b/harbour/contrib/hbqt/TQEventLoop.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QEventLoop INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD exec( nFlags ) INLINE Qt_QEventLoop_exec( ::pPtr, nFlags ) + METHOD exit( nReturnCode ) INLINE Qt_QEventLoop_exit( ::pPtr, nReturnCode ) + METHOD isRunning() INLINE Qt_QEventLoop_isRunning( ::pPtr ) + METHOD processEvents( nFlags ) INLINE Qt_QEventLoop_processEvents( ::pPtr, nFlags ) + METHOD processEvents_1( nFlags, nMaxTime ) INLINE Qt_QEventLoop_processEvents_1( ::pPtr, nFlags, nMaxTime ) + METHOD wakeUp() INLINE Qt_QEventLoop_wakeUp( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QEventLoop + + ::pParent := pParent + + ::pPtr := Qt_QEventLoop( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQFileDialog.prg b/harbour/contrib/hbqt/TQFileDialog.prg index b3cccb6d6c..a65a8363eb 100644 --- a/harbour/contrib/hbqt/TQFileDialog.prg +++ b/harbour/contrib/hbqt/TQFileDialog.prg @@ -53,49 +53,58 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QFileDialog INHERIT QDialog +CREATE CLASS QFileDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD acceptMode() INLINE Qt_QFileDialog_acceptMode( ::pPtr ) METHOD confirmOverwrite() INLINE Qt_QFileDialog_confirmOverwrite( ::pPtr ) METHOD defaultSuffix() INLINE Qt_QFileDialog_defaultSuffix( ::pPtr ) + METHOD directory() INLINE Qt_QFileDialog_directory( ::pPtr ) METHOD fileMode() INLINE Qt_QFileDialog_fileMode( ::pPtr ) METHOD filter() INLINE Qt_QFileDialog_filter( ::pPtr ) + METHOD history() INLINE Qt_QFileDialog_history( ::pPtr ) METHOD iconProvider() INLINE Qt_QFileDialog_iconProvider( ::pPtr ) METHOD isNameFilterDetailsVisible() INLINE Qt_QFileDialog_isNameFilterDetailsVisible( ::pPtr ) METHOD isReadOnly() INLINE Qt_QFileDialog_isReadOnly( ::pPtr ) METHOD itemDelegate() INLINE Qt_QFileDialog_itemDelegate( ::pPtr ) - METHOD labelText( nDialogLabel ) INLINE Qt_QFileDialog_labelText( ::pPtr, nDialogLabel ) - METHOD open( pReceiver, pMember ) INLINE Qt_QFileDialog_open( ::pPtr, pReceiver, pMember ) + METHOD labelText( nLabel ) INLINE Qt_QFileDialog_labelText( ::pPtr, nLabel ) + METHOD nameFilters() INLINE Qt_QFileDialog_nameFilters( ::pPtr ) METHOD options() INLINE Qt_QFileDialog_options( ::pPtr ) METHOD proxyModel() INLINE Qt_QFileDialog_proxyModel( ::pPtr ) METHOD resolveSymlinks() INLINE Qt_QFileDialog_resolveSymlinks( ::pPtr ) + METHOD restoreState( pState ) INLINE Qt_QFileDialog_restoreState( ::pPtr, pState ) + METHOD saveState() INLINE Qt_QFileDialog_saveState( ::pPtr ) METHOD selectFile( cFilename ) INLINE Qt_QFileDialog_selectFile( ::pPtr, cFilename ) METHOD selectNameFilter( cFilter ) INLINE Qt_QFileDialog_selectNameFilter( ::pPtr, cFilter ) + METHOD selectedFiles() INLINE Qt_QFileDialog_selectedFiles( ::pPtr ) METHOD selectedNameFilter() INLINE Qt_QFileDialog_selectedNameFilter( ::pPtr ) - METHOD setAcceptMode( nAcceptMode ) INLINE Qt_QFileDialog_setAcceptMode( ::pPtr, nAcceptMode ) + METHOD setAcceptMode( nMode ) INLINE Qt_QFileDialog_setAcceptMode( ::pPtr, nMode ) METHOD setConfirmOverwrite( lEnabled ) INLINE Qt_QFileDialog_setConfirmOverwrite( ::pPtr, lEnabled ) METHOD setDefaultSuffix( cSuffix ) INLINE Qt_QFileDialog_setDefaultSuffix( ::pPtr, cSuffix ) METHOD setDirectory( cDirectory ) INLINE Qt_QFileDialog_setDirectory( ::pPtr, cDirectory ) - METHOD setFileMode( nFileMode ) INLINE Qt_QFileDialog_setFileMode( ::pPtr, nFileMode ) + METHOD setDirectory_1( pDirectory ) INLINE Qt_QFileDialog_setDirectory_1( ::pPtr, pDirectory ) + METHOD setFileMode( nMode ) INLINE Qt_QFileDialog_setFileMode( ::pPtr, nMode ) METHOD setFilter( nFilters ) INLINE Qt_QFileDialog_setFilter( ::pPtr, nFilters ) + METHOD setHistory( pPaths ) INLINE Qt_QFileDialog_setHistory( ::pPtr, pPaths ) METHOD setIconProvider( pProvider ) INLINE Qt_QFileDialog_setIconProvider( ::pPtr, pProvider ) METHOD setItemDelegate( pDelegate ) INLINE Qt_QFileDialog_setItemDelegate( ::pPtr, pDelegate ) - METHOD setLabelText( nDialogLabel, cText ) INLINE Qt_QFileDialog_setLabelText( ::pPtr, nDialogLabel, cText ) + METHOD setLabelText( nLabel, cText ) INLINE Qt_QFileDialog_setLabelText( ::pPtr, nLabel, cText ) METHOD setNameFilter( cFilter ) INLINE Qt_QFileDialog_setNameFilter( ::pPtr, cFilter ) METHOD setNameFilterDetailsVisible( lEnabled ) INLINE Qt_QFileDialog_setNameFilterDetailsVisible( ::pPtr, lEnabled ) + METHOD setNameFilters( pFilters ) INLINE Qt_QFileDialog_setNameFilters( ::pPtr, pFilters ) METHOD setOption( nOption, lOn ) INLINE Qt_QFileDialog_setOption( ::pPtr, nOption, lOn ) METHOD setOptions( nOptions ) INLINE Qt_QFileDialog_setOptions( ::pPtr, nOptions ) METHOD setProxyModel( pProxyModel ) INLINE Qt_QFileDialog_setProxyModel( ::pPtr, pProxyModel ) METHOD setReadOnly( lEnabled ) INLINE Qt_QFileDialog_setReadOnly( ::pPtr, lEnabled ) METHOD setResolveSymlinks( lEnabled ) INLINE Qt_QFileDialog_setResolveSymlinks( ::pPtr, lEnabled ) - METHOD setViewMode( nViewMode ) INLINE Qt_QFileDialog_setViewMode( ::pPtr, nViewMode ) + METHOD setViewMode( nMode ) INLINE Qt_QFileDialog_setViewMode( ::pPtr, nMode ) METHOD testOption( nOption ) INLINE Qt_QFileDialog_testOption( ::pPtr, nOption ) METHOD viewMode() INLINE Qt_QFileDialog_viewMode( ::pPtr ) @@ -105,6 +114,8 @@ CLASS QFileDialog INHERIT QDialog METHOD New( pParent ) CLASS QFileDialog + ::pParent := pParent + ::pPtr := Qt_QFileDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQFocusFrame.prg b/harbour/contrib/hbqt/TQFocusFrame.prg index 5607af77d4..0f735467de 100644 --- a/harbour/contrib/hbqt/TQFocusFrame.prg +++ b/harbour/contrib/hbqt/TQFocusFrame.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QFocusFrame INHERIT QWidget +CREATE CLASS QFocusFrame INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -71,6 +72,8 @@ CLASS QFocusFrame INHERIT QWidget METHOD New( pParent ) CLASS QFocusFrame + ::pParent := pParent + ::pPtr := Qt_QFocusFrame( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQFont.prg b/harbour/contrib/hbqt/TQFont.prg new file mode 100644 index 0000000000..484760797a --- /dev/null +++ b/harbour/contrib/hbqt/TQFont.prg @@ -0,0 +1,131 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QFont + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD bold() INLINE Qt_QFont_bold( ::pPtr ) + METHOD capitalization() INLINE Qt_QFont_capitalization( ::pPtr ) + METHOD defaultFamily() INLINE Qt_QFont_defaultFamily( ::pPtr ) + METHOD exactMatch() INLINE Qt_QFont_exactMatch( ::pPtr ) + METHOD family() INLINE Qt_QFont_family( ::pPtr ) + METHOD fixedPitch() INLINE Qt_QFont_fixedPitch( ::pPtr ) + METHOD fromString( cDescrip ) INLINE Qt_QFont_fromString( ::pPtr, cDescrip ) + METHOD handle() INLINE Qt_QFont_handle( ::pPtr ) + METHOD italic() INLINE Qt_QFont_italic( ::pPtr ) + METHOD kerning() INLINE Qt_QFont_kerning( ::pPtr ) + METHOD key() INLINE Qt_QFont_key( ::pPtr ) + METHOD lastResortFamily() INLINE Qt_QFont_lastResortFamily( ::pPtr ) + METHOD lastResortFont() INLINE Qt_QFont_lastResortFont( ::pPtr ) + METHOD letterSpacing() INLINE Qt_QFont_letterSpacing( ::pPtr ) + METHOD letterSpacingType() INLINE Qt_QFont_letterSpacingType( ::pPtr ) + METHOD overline() INLINE Qt_QFont_overline( ::pPtr ) + METHOD pixelSize() INLINE Qt_QFont_pixelSize( ::pPtr ) + METHOD pointSize() INLINE Qt_QFont_pointSize( ::pPtr ) + METHOD pointSizeF() INLINE Qt_QFont_pointSizeF( ::pPtr ) + METHOD rawMode() INLINE Qt_QFont_rawMode( ::pPtr ) + METHOD rawName() INLINE Qt_QFont_rawName( ::pPtr ) + METHOD setBold( lEnable ) INLINE Qt_QFont_setBold( ::pPtr, lEnable ) + METHOD setCapitalization( nCaps ) INLINE Qt_QFont_setCapitalization( ::pPtr, nCaps ) + METHOD setFamily( cFamily ) INLINE Qt_QFont_setFamily( ::pPtr, cFamily ) + METHOD setFixedPitch( lEnable ) INLINE Qt_QFont_setFixedPitch( ::pPtr, lEnable ) + METHOD setItalic( lEnable ) INLINE Qt_QFont_setItalic( ::pPtr, lEnable ) + METHOD setKerning( lEnable ) INLINE Qt_QFont_setKerning( ::pPtr, lEnable ) + METHOD setLetterSpacing( nType, nSpacing ) INLINE Qt_QFont_setLetterSpacing( ::pPtr, nType, nSpacing ) + METHOD setOverline( lEnable ) INLINE Qt_QFont_setOverline( ::pPtr, lEnable ) + METHOD setPixelSize( nPixelSize ) INLINE Qt_QFont_setPixelSize( ::pPtr, nPixelSize ) + METHOD setPointSize( nPointSize ) INLINE Qt_QFont_setPointSize( ::pPtr, nPointSize ) + METHOD setPointSizeF( nPointSize ) INLINE Qt_QFont_setPointSizeF( ::pPtr, nPointSize ) + METHOD setRawMode( lEnable ) INLINE Qt_QFont_setRawMode( ::pPtr, lEnable ) + METHOD setRawName( cName ) INLINE Qt_QFont_setRawName( ::pPtr, cName ) + METHOD setStretch( nFactor ) INLINE Qt_QFont_setStretch( ::pPtr, nFactor ) + METHOD setStrikeOut( lEnable ) INLINE Qt_QFont_setStrikeOut( ::pPtr, lEnable ) + METHOD setStyle( nStyle ) INLINE Qt_QFont_setStyle( ::pPtr, nStyle ) + METHOD setStyleHint( nHint, nStrategy ) INLINE Qt_QFont_setStyleHint( ::pPtr, nHint, nStrategy ) + METHOD setStyleStrategy( nS ) INLINE Qt_QFont_setStyleStrategy( ::pPtr, nS ) + METHOD setUnderline( lEnable ) INLINE Qt_QFont_setUnderline( ::pPtr, lEnable ) + METHOD setWeight( nWeight ) INLINE Qt_QFont_setWeight( ::pPtr, nWeight ) + METHOD setWordSpacing( nSpacing ) INLINE Qt_QFont_setWordSpacing( ::pPtr, nSpacing ) + METHOD stretch() INLINE Qt_QFont_stretch( ::pPtr ) + METHOD strikeOut() INLINE Qt_QFont_strikeOut( ::pPtr ) + METHOD style() INLINE Qt_QFont_style( ::pPtr ) + METHOD styleHint() INLINE Qt_QFont_styleHint( ::pPtr ) + METHOD styleStrategy() INLINE Qt_QFont_styleStrategy( ::pPtr ) + METHOD toString() INLINE Qt_QFont_toString( ::pPtr ) + METHOD underline() INLINE Qt_QFont_underline( ::pPtr ) + METHOD weight() INLINE Qt_QFont_weight( ::pPtr ) + METHOD wordSpacing() INLINE Qt_QFont_wordSpacing( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QFont + + ::pParent := pParent + + ::pPtr := Qt_QFont( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQFontComboBox.prg b/harbour/contrib/hbqt/TQFontComboBox.prg index 549c1731b7..968bcdb012 100644 --- a/harbour/contrib/hbqt/TQFontComboBox.prg +++ b/harbour/contrib/hbqt/TQFontComboBox.prg @@ -53,19 +53,22 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QFontComboBox INHERIT QComboBox +CREATE CLASS QFontComboBox INHERIT QComboBox - DATA pPtr + VAR pParent + VAR pPtr METHOD New() + METHOD currentFont() INLINE Qt_QFontComboBox_currentFont( ::pPtr ) METHOD fontFilters() INLINE Qt_QFontComboBox_fontFilters( ::pPtr ) - METHOD setFontFilters( nFontFilters ) INLINE Qt_QFontComboBox_setFontFilters( ::pPtr, nFontFilters ) + METHOD setFontFilters( nFilters ) INLINE Qt_QFontComboBox_setFontFilters( ::pPtr, nFilters ) METHOD setWritingSystem( nScript ) INLINE Qt_QFontComboBox_setWritingSystem( ::pPtr, nScript ) METHOD writingSystem() INLINE Qt_QFontComboBox_writingSystem( ::pPtr ) + METHOD setCurrentFont( pFont ) INLINE Qt_QFontComboBox_setCurrentFont( ::pPtr, pFont ) ENDCLASS @@ -73,6 +76,8 @@ CLASS QFontComboBox INHERIT QComboBox METHOD New( pParent ) CLASS QFontComboBox + ::pParent := pParent + ::pPtr := Qt_QFontComboBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQFontDialog.prg b/harbour/contrib/hbqt/TQFontDialog.prg index 921572f082..b1a78a400e 100644 --- a/harbour/contrib/hbqt/TQFontDialog.prg +++ b/harbour/contrib/hbqt/TQFontDialog.prg @@ -53,20 +53,23 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QFontDialog INHERIT QDialog +CREATE CLASS QFontDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() - METHOD open( pReceiver, pMember ) INLINE Qt_QFontDialog_open( ::pPtr, pReceiver, pMember ) + METHOD currentFont() INLINE Qt_QFontDialog_currentFont( ::pPtr ) METHOD options() INLINE Qt_QFontDialog_options( ::pPtr ) - METHOD setOption( nFontDialogOption, lOn ) INLINE Qt_QFontDialog_setOption( ::pPtr, nFontDialogOption, lOn ) - METHOD setOptions( nFontDialogOptions ) INLINE Qt_QFontDialog_setOptions( ::pPtr, nFontDialogOptions ) - METHOD testOption( nFontDialogOption ) INLINE Qt_QFontDialog_testOption( ::pPtr, nFontDialogOption ) + METHOD selectedFont() INLINE Qt_QFontDialog_selectedFont( ::pPtr ) + METHOD setCurrentFont( pFont ) INLINE Qt_QFontDialog_setCurrentFont( ::pPtr, pFont ) + METHOD setOption( nOption, lOn ) INLINE Qt_QFontDialog_setOption( ::pPtr, nOption, lOn ) + METHOD setOptions( nOptions ) INLINE Qt_QFontDialog_setOptions( ::pPtr, nOptions ) + METHOD testOption( nOption ) INLINE Qt_QFontDialog_testOption( ::pPtr, nOption ) ENDCLASS @@ -74,6 +77,8 @@ CLASS QFontDialog INHERIT QDialog METHOD New( pParent ) CLASS QFontDialog + ::pParent := pParent + ::pPtr := Qt_QFontDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQFontInfo.prg b/harbour/contrib/hbqt/TQFontInfo.prg new file mode 100644 index 0000000000..331ad91267 --- /dev/null +++ b/harbour/contrib/hbqt/TQFontInfo.prg @@ -0,0 +1,92 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QFontInfo + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD bold() INLINE Qt_QFontInfo_bold( ::pPtr ) + METHOD exactMatch() INLINE Qt_QFontInfo_exactMatch( ::pPtr ) + METHOD family() INLINE Qt_QFontInfo_family( ::pPtr ) + METHOD fixedPitch() INLINE Qt_QFontInfo_fixedPitch( ::pPtr ) + METHOD italic() INLINE Qt_QFontInfo_italic( ::pPtr ) + METHOD pixelSize() INLINE Qt_QFontInfo_pixelSize( ::pPtr ) + METHOD pointSize() INLINE Qt_QFontInfo_pointSize( ::pPtr ) + METHOD pointSizeF() INLINE Qt_QFontInfo_pointSizeF( ::pPtr ) + METHOD rawMode() INLINE Qt_QFontInfo_rawMode( ::pPtr ) + METHOD style() INLINE Qt_QFontInfo_style( ::pPtr ) + METHOD styleHint() INLINE Qt_QFontInfo_styleHint( ::pPtr ) + METHOD weight() INLINE Qt_QFontInfo_weight( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QFontInfo + + ::pParent := pParent + + ::pPtr := Qt_QFontInfo( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQFormLayout.prg b/harbour/contrib/hbqt/TQFormLayout.prg index e0ce039869..a3b4467d2c 100644 --- a/harbour/contrib/hbqt/TQFormLayout.prg +++ b/harbour/contrib/hbqt/TQFormLayout.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QFormLayout INHERIT QLayout +CREATE CLASS QFormLayout INHERIT QLayout - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -70,6 +71,9 @@ CLASS QFormLayout INHERIT QLayout METHOD addRow_5( pLayout ) INLINE Qt_QFormLayout_addRow_5( ::pPtr, pLayout ) METHOD fieldGrowthPolicy() INLINE Qt_QFormLayout_fieldGrowthPolicy( ::pPtr ) METHOD formAlignment() INLINE Qt_QFormLayout_formAlignment( ::pPtr ) + METHOD getItemPosition( nIndex, nRowPtr, nRolePtr ) INLINE Qt_QFormLayout_getItemPosition( ::pPtr, nIndex, nRowPtr, nRolePtr ) + METHOD getLayoutPosition( pLayout, nRowPtr, nRolePtr ) INLINE Qt_QFormLayout_getLayoutPosition( ::pPtr, pLayout, nRowPtr, nRolePtr ) + METHOD getWidgetPosition( pWidget, nRowPtr, nRolePtr ) INLINE Qt_QFormLayout_getWidgetPosition( ::pPtr, pWidget, nRowPtr, nRolePtr ) METHOD horizontalSpacing() INLINE Qt_QFormLayout_horizontalSpacing( ::pPtr ) METHOD insertRow( nRow, pLabel, pField ) INLINE Qt_QFormLayout_insertRow( ::pPtr, nRow, pLabel, pField ) METHOD insertRow_1( nRow, pLabel, pField ) INLINE Qt_QFormLayout_insertRow_1( ::pPtr, nRow, pLabel, pField ) @@ -77,22 +81,22 @@ CLASS QFormLayout INHERIT QLayout METHOD insertRow_3( nRow, cLabelText, pField ) INLINE Qt_QFormLayout_insertRow_3( ::pPtr, nRow, cLabelText, pField ) METHOD insertRow_4( nRow, pWidget ) INLINE Qt_QFormLayout_insertRow_4( ::pPtr, nRow, pWidget ) METHOD insertRow_5( nRow, pLayout ) INLINE Qt_QFormLayout_insertRow_5( ::pPtr, nRow, pLayout ) - METHOD itemAt( nRow, nItemRole ) INLINE Qt_QFormLayout_itemAt( ::pPtr, nRow, nItemRole ) + METHOD itemAt( nRow, nRole ) INLINE Qt_QFormLayout_itemAt( ::pPtr, nRow, nRole ) METHOD labelAlignment() INLINE Qt_QFormLayout_labelAlignment( ::pPtr ) METHOD labelForField( pField ) INLINE Qt_QFormLayout_labelForField( ::pPtr, pField ) METHOD labelForField_1( pField ) INLINE Qt_QFormLayout_labelForField_1( ::pPtr, pField ) METHOD rowCount() INLINE Qt_QFormLayout_rowCount( ::pPtr ) METHOD rowWrapPolicy() INLINE Qt_QFormLayout_rowWrapPolicy( ::pPtr ) - METHOD setFieldGrowthPolicy( nFieldGrowthPolicy ) INLINE Qt_QFormLayout_setFieldGrowthPolicy( ::pPtr, nFieldGrowthPolicy ) + METHOD setFieldGrowthPolicy( nPolicy ) INLINE Qt_QFormLayout_setFieldGrowthPolicy( ::pPtr, nPolicy ) METHOD setFormAlignment( nAlignment ) INLINE Qt_QFormLayout_setFormAlignment( ::pPtr, nAlignment ) METHOD setHorizontalSpacing( nSpacing ) INLINE Qt_QFormLayout_setHorizontalSpacing( ::pPtr, nSpacing ) - METHOD setItem( nRow, nItemRole, pItem ) INLINE Qt_QFormLayout_setItem( ::pPtr, nRow, nItemRole, pItem ) + METHOD setItem( nRow, nRole, pItem ) INLINE Qt_QFormLayout_setItem( ::pPtr, nRow, nRole, pItem ) METHOD setLabelAlignment( nAlignment ) INLINE Qt_QFormLayout_setLabelAlignment( ::pPtr, nAlignment ) - METHOD setLayout( nRow, nItemRole, pLayout ) INLINE Qt_QFormLayout_setLayout( ::pPtr, nRow, nItemRole, pLayout ) - METHOD setRowWrapPolicy( nRowWrapPolicy ) INLINE Qt_QFormLayout_setRowWrapPolicy( ::pPtr, nRowWrapPolicy ) + METHOD setLayout( nRow, nRole, pLayout ) INLINE Qt_QFormLayout_setLayout( ::pPtr, nRow, nRole, pLayout ) + METHOD setRowWrapPolicy( nPolicy ) INLINE Qt_QFormLayout_setRowWrapPolicy( ::pPtr, nPolicy ) METHOD setSpacing( nSpacing ) INLINE Qt_QFormLayout_setSpacing( ::pPtr, nSpacing ) METHOD setVerticalSpacing( nSpacing ) INLINE Qt_QFormLayout_setVerticalSpacing( ::pPtr, nSpacing ) - METHOD setWidget( nRow, nItemRole, pWidget ) INLINE Qt_QFormLayout_setWidget( ::pPtr, nRow, nItemRole, pWidget ) + METHOD setWidget( nRow, nRole, pWidget ) INLINE Qt_QFormLayout_setWidget( ::pPtr, nRow, nRole, pWidget ) METHOD spacing() INLINE Qt_QFormLayout_spacing( ::pPtr ) METHOD verticalSpacing() INLINE Qt_QFormLayout_verticalSpacing( ::pPtr ) @@ -102,6 +106,8 @@ CLASS QFormLayout INHERIT QLayout METHOD New( pParent ) CLASS QFormLayout + ::pParent := pParent + ::pPtr := Qt_QFormLayout( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQFrame.prg b/harbour/contrib/hbqt/TQFrame.prg index 3204d0a3b8..9276147ec0 100644 --- a/harbour/contrib/hbqt/TQFrame.prg +++ b/harbour/contrib/hbqt/TQFrame.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QFrame INHERIT QWidget +CREATE CLASS QFrame INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,7 +70,7 @@ CLASS QFrame INHERIT QWidget METHOD frameWidth() INLINE Qt_QFrame_frameWidth( ::pPtr ) METHOD lineWidth() INLINE Qt_QFrame_lineWidth( ::pPtr ) METHOD midLineWidth() INLINE Qt_QFrame_midLineWidth( ::pPtr ) - METHOD setFrameRect( aRectQRect ) INLINE Qt_QFrame_setFrameRect( ::pPtr, aRectQRect ) + METHOD setFrameRect( pQRect ) INLINE Qt_QFrame_setFrameRect( ::pPtr, pQRect ) METHOD setFrameShadow( nShadow ) INLINE Qt_QFrame_setFrameShadow( ::pPtr, nShadow ) METHOD setFrameShape( nShape ) INLINE Qt_QFrame_setFrameShape( ::pPtr, nShape ) METHOD setFrameStyle( nStyle ) INLINE Qt_QFrame_setFrameStyle( ::pPtr, nStyle ) @@ -82,6 +83,8 @@ CLASS QFrame INHERIT QWidget METHOD New( pParent ) CLASS QFrame + ::pParent := pParent + ::pPtr := Qt_QFrame( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQFtp.prg b/harbour/contrib/hbqt/TQFtp.prg new file mode 100644 index 0000000000..8d6e9b936e --- /dev/null +++ b/harbour/contrib/hbqt/TQFtp.prg @@ -0,0 +1,107 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QFtp INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD bytesAvailable() INLINE Qt_QFtp_bytesAvailable( ::pPtr ) + METHOD cd( cDir ) INLINE Qt_QFtp_cd( ::pPtr, cDir ) + METHOD clearPendingCommands() INLINE Qt_QFtp_clearPendingCommands( ::pPtr ) + METHOD close() INLINE Qt_QFtp_close( ::pPtr ) + METHOD connectToHost( cHost, nPort ) INLINE Qt_QFtp_connectToHost( ::pPtr, cHost, nPort ) + METHOD currentCommand() INLINE Qt_QFtp_currentCommand( ::pPtr ) + METHOD currentDevice() INLINE Qt_QFtp_currentDevice( ::pPtr ) + METHOD currentId() INLINE Qt_QFtp_currentId( ::pPtr ) + METHOD error() INLINE Qt_QFtp_error( ::pPtr ) + METHOD errorString() INLINE Qt_QFtp_errorString( ::pPtr ) + METHOD get( cFile, pDev, nType ) INLINE Qt_QFtp_get( ::pPtr, cFile, pDev, nType ) + METHOD hasPendingCommands() INLINE Qt_QFtp_hasPendingCommands( ::pPtr ) + METHOD list( cDir ) INLINE Qt_QFtp_list( ::pPtr, cDir ) + METHOD login( cUser ) INLINE Qt_QFtp_login( ::pPtr, cUser ) + METHOD mkdir( cDir ) INLINE Qt_QFtp_mkdir( ::pPtr, cDir ) + METHOD put( pDev, cFile, nType ) INLINE Qt_QFtp_put( ::pPtr, pDev, cFile, nType ) + METHOD put_1( pData, cFile, nType ) INLINE Qt_QFtp_put_1( ::pPtr, pData, cFile, nType ) + METHOD rawCommand( cCommand ) INLINE Qt_QFtp_rawCommand( ::pPtr, cCommand ) + METHOD read( pData, nMaxlen ) INLINE Qt_QFtp_read( ::pPtr, pData, nMaxlen ) + METHOD readAll() INLINE Qt_QFtp_readAll( ::pPtr ) + METHOD remove( cFile ) INLINE Qt_QFtp_remove( ::pPtr, cFile ) + METHOD rename( cOldname, cNewname ) INLINE Qt_QFtp_rename( ::pPtr, cOldname, cNewname ) + METHOD rmdir( cDir ) INLINE Qt_QFtp_rmdir( ::pPtr, cDir ) + METHOD setProxy( cHost, nPort ) INLINE Qt_QFtp_setProxy( ::pPtr, cHost, nPort ) + METHOD setTransferMode( nMode ) INLINE Qt_QFtp_setTransferMode( ::pPtr, nMode ) + METHOD state() INLINE Qt_QFtp_state( ::pPtr ) + METHOD abort() INLINE Qt_QFtp_abort( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QFtp + + ::pParent := pParent + + ::pPtr := Qt_QFtp( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQGridLayout.prg b/harbour/contrib/hbqt/TQGridLayout.prg new file mode 100644 index 0000000000..cec354823d --- /dev/null +++ b/harbour/contrib/hbqt/TQGridLayout.prg @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QGridLayout INHERIT QLayout + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD addItem( pItem, nRow, nColumn, nRowSpan, nColumnSpan, nAlignment ) INLINE Qt_QGridLayout_addItem( ::pPtr, pItem, nRow, nColumn, nRowSpan, nColumnSpan, nAlignment ) + METHOD addLayout( pLayout, nRow, nColumn, nAlignment ) INLINE Qt_QGridLayout_addLayout( ::pPtr, pLayout, nRow, nColumn, nAlignment ) + METHOD addLayout_1( pLayout, nRow, nColumn, nRowSpan, nColumnSpan, nAlignment ) INLINE Qt_QGridLayout_addLayout_1( ::pPtr, pLayout, nRow, nColumn, nRowSpan, nColumnSpan, nAlignment ) + METHOD addWidget( pWidget, nRow, nColumn, nAlignment ) INLINE Qt_QGridLayout_addWidget( ::pPtr, pWidget, nRow, nColumn, nAlignment ) + METHOD addWidget_1( pWidget, nFromRow, nFromColumn, nRowSpan, nColumnSpan, nAlignment ) INLINE Qt_QGridLayout_addWidget_1( ::pPtr, pWidget, nFromRow, nFromColumn, nRowSpan, nColumnSpan, nAlignment ) + METHOD cellRect( nRow, nColumn ) INLINE Qt_QGridLayout_cellRect( ::pPtr, nRow, nColumn ) + METHOD columnCount() INLINE Qt_QGridLayout_columnCount( ::pPtr ) + METHOD columnMinimumWidth( nColumn ) INLINE Qt_QGridLayout_columnMinimumWidth( ::pPtr, nColumn ) + METHOD columnStretch( nColumn ) INLINE Qt_QGridLayout_columnStretch( ::pPtr, nColumn ) + METHOD getItemPosition( nIndex, nRow, nColumn, nRowSpan, nColumnSpan ) INLINE Qt_QGridLayout_getItemPosition( ::pPtr, nIndex, nRow, nColumn, nRowSpan, nColumnSpan ) + METHOD horizontalSpacing() INLINE Qt_QGridLayout_horizontalSpacing( ::pPtr ) + METHOD itemAtPosition( nRow, nColumn ) INLINE Qt_QGridLayout_itemAtPosition( ::pPtr, nRow, nColumn ) + METHOD originCorner() INLINE Qt_QGridLayout_originCorner( ::pPtr ) + METHOD rowCount() INLINE Qt_QGridLayout_rowCount( ::pPtr ) + METHOD rowMinimumHeight( nRow ) INLINE Qt_QGridLayout_rowMinimumHeight( ::pPtr, nRow ) + METHOD rowStretch( nRow ) INLINE Qt_QGridLayout_rowStretch( ::pPtr, nRow ) + METHOD setColumnMinimumWidth( nColumn, nMinSize ) INLINE Qt_QGridLayout_setColumnMinimumWidth( ::pPtr, nColumn, nMinSize ) + METHOD setColumnStretch( nColumn, nStretch ) INLINE Qt_QGridLayout_setColumnStretch( ::pPtr, nColumn, nStretch ) + METHOD setHorizontalSpacing( nSpacing ) INLINE Qt_QGridLayout_setHorizontalSpacing( ::pPtr, nSpacing ) + METHOD setOriginCorner( nCorner ) INLINE Qt_QGridLayout_setOriginCorner( ::pPtr, nCorner ) + METHOD setRowMinimumHeight( nRow, nMinSize ) INLINE Qt_QGridLayout_setRowMinimumHeight( ::pPtr, nRow, nMinSize ) + METHOD setRowStretch( nRow, nStretch ) INLINE Qt_QGridLayout_setRowStretch( ::pPtr, nRow, nStretch ) + METHOD setSpacing( nSpacing ) INLINE Qt_QGridLayout_setSpacing( ::pPtr, nSpacing ) + METHOD setVerticalSpacing( nSpacing ) INLINE Qt_QGridLayout_setVerticalSpacing( ::pPtr, nSpacing ) + METHOD spacing() INLINE Qt_QGridLayout_spacing( ::pPtr ) + METHOD verticalSpacing() INLINE Qt_QGridLayout_verticalSpacing( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QGridLayout + + ::pParent := pParent + + ::pPtr := Qt_QGridLayout( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQGroupBox.prg b/harbour/contrib/hbqt/TQGroupBox.prg index 6933bef0a2..e6c2b8324c 100644 --- a/harbour/contrib/hbqt/TQGroupBox.prg +++ b/harbour/contrib/hbqt/TQGroupBox.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QGroupBox INHERIT QWidget +CREATE CLASS QGroupBox INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -71,6 +72,7 @@ CLASS QGroupBox INHERIT QWidget METHOD setFlat( lFlat ) INLINE Qt_QGroupBox_setFlat( ::pPtr, lFlat ) METHOD setTitle( cTitle ) INLINE Qt_QGroupBox_setTitle( ::pPtr, cTitle ) METHOD title() INLINE Qt_QGroupBox_title( ::pPtr ) + METHOD setChecked( lChecked ) INLINE Qt_QGroupBox_setChecked( ::pPtr, lChecked ) ENDCLASS @@ -78,6 +80,8 @@ CLASS QGroupBox INHERIT QWidget METHOD New( pParent ) CLASS QGroupBox + ::pParent := pParent + ::pPtr := Qt_QGroupBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQHBoxLayout.prg b/harbour/contrib/hbqt/TQHBoxLayout.prg index 4289622767..4769e06437 100644 --- a/harbour/contrib/hbqt/TQHBoxLayout.prg +++ b/harbour/contrib/hbqt/TQHBoxLayout.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QHBoxLayout INHERIT QBoxLayout +CREATE CLASS QHBoxLayout INHERIT QBoxLayout - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QHBoxLayout INHERIT QBoxLayout METHOD New( pParent ) CLASS QHBoxLayout + ::pParent := pParent + ::pPtr := Qt_QHBoxLayout( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQHeaderView.prg b/harbour/contrib/hbqt/TQHeaderView.prg new file mode 100644 index 0000000000..8e11fadb36 --- /dev/null +++ b/harbour/contrib/hbqt/TQHeaderView.prg @@ -0,0 +1,137 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QHeaderView INHERIT QAbstractItemView + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD cascadingSectionResizes() INLINE Qt_QHeaderView_cascadingSectionResizes( ::pPtr ) + METHOD count() INLINE Qt_QHeaderView_count( ::pPtr ) + METHOD defaultAlignment() INLINE Qt_QHeaderView_defaultAlignment( ::pPtr ) + METHOD defaultSectionSize() INLINE Qt_QHeaderView_defaultSectionSize( ::pPtr ) + METHOD hiddenSectionCount() INLINE Qt_QHeaderView_hiddenSectionCount( ::pPtr ) + METHOD hideSection( nLogicalIndex ) INLINE Qt_QHeaderView_hideSection( ::pPtr, nLogicalIndex ) + METHOD highlightSections() INLINE Qt_QHeaderView_highlightSections( ::pPtr ) + METHOD isClickable() INLINE Qt_QHeaderView_isClickable( ::pPtr ) + METHOD isMovable() INLINE Qt_QHeaderView_isMovable( ::pPtr ) + METHOD isSectionHidden( nLogicalIndex ) INLINE Qt_QHeaderView_isSectionHidden( ::pPtr, nLogicalIndex ) + METHOD isSortIndicatorShown() INLINE Qt_QHeaderView_isSortIndicatorShown( ::pPtr ) + METHOD length() INLINE Qt_QHeaderView_length( ::pPtr ) + METHOD logicalIndex( nVisualIndex ) INLINE Qt_QHeaderView_logicalIndex( ::pPtr, nVisualIndex ) + METHOD logicalIndexAt( nPosition ) INLINE Qt_QHeaderView_logicalIndexAt( ::pPtr, nPosition ) + METHOD logicalIndexAt_1( nX, nY ) INLINE Qt_QHeaderView_logicalIndexAt_1( ::pPtr, nX, nY ) + METHOD logicalIndexAt_2( pPos ) INLINE Qt_QHeaderView_logicalIndexAt_2( ::pPtr, pPos ) + METHOD minimumSectionSize() INLINE Qt_QHeaderView_minimumSectionSize( ::pPtr ) + METHOD moveSection( nFrom, nTo ) INLINE Qt_QHeaderView_moveSection( ::pPtr, nFrom, nTo ) + METHOD offset() INLINE Qt_QHeaderView_offset( ::pPtr ) + METHOD orientation() INLINE Qt_QHeaderView_orientation( ::pPtr ) + METHOD resizeMode( nLogicalIndex ) INLINE Qt_QHeaderView_resizeMode( ::pPtr, nLogicalIndex ) + METHOD resizeSection( nLogicalIndex, nSize ) INLINE Qt_QHeaderView_resizeSection( ::pPtr, nLogicalIndex, nSize ) + METHOD resizeSections( nMode ) INLINE Qt_QHeaderView_resizeSections( ::pPtr, nMode ) + METHOD restoreState( pState ) INLINE Qt_QHeaderView_restoreState( ::pPtr, pState ) + METHOD saveState() INLINE Qt_QHeaderView_saveState( ::pPtr ) + METHOD sectionPosition( nLogicalIndex ) INLINE Qt_QHeaderView_sectionPosition( ::pPtr, nLogicalIndex ) + METHOD sectionSize( nLogicalIndex ) INLINE Qt_QHeaderView_sectionSize( ::pPtr, nLogicalIndex ) + METHOD sectionSizeHint( nLogicalIndex ) INLINE Qt_QHeaderView_sectionSizeHint( ::pPtr, nLogicalIndex ) + METHOD sectionViewportPosition( nLogicalIndex ) INLINE Qt_QHeaderView_sectionViewportPosition( ::pPtr, nLogicalIndex ) + METHOD sectionsHidden() INLINE Qt_QHeaderView_sectionsHidden( ::pPtr ) + METHOD sectionsMoved() INLINE Qt_QHeaderView_sectionsMoved( ::pPtr ) + METHOD setCascadingSectionResizes( lEnable ) INLINE Qt_QHeaderView_setCascadingSectionResizes( ::pPtr, lEnable ) + METHOD setClickable( lClickable ) INLINE Qt_QHeaderView_setClickable( ::pPtr, lClickable ) + METHOD setDefaultAlignment( nAlignment ) INLINE Qt_QHeaderView_setDefaultAlignment( ::pPtr, nAlignment ) + METHOD setDefaultSectionSize( nSize ) INLINE Qt_QHeaderView_setDefaultSectionSize( ::pPtr, nSize ) + METHOD setHighlightSections( lHighlight ) INLINE Qt_QHeaderView_setHighlightSections( ::pPtr, lHighlight ) + METHOD setMinimumSectionSize( nSize ) INLINE Qt_QHeaderView_setMinimumSectionSize( ::pPtr, nSize ) + METHOD setMovable( lMovable ) INLINE Qt_QHeaderView_setMovable( ::pPtr, lMovable ) + METHOD setResizeMode( nMode ) INLINE Qt_QHeaderView_setResizeMode( ::pPtr, nMode ) + METHOD setResizeMode_1( nLogicalIndex, nMode ) INLINE Qt_QHeaderView_setResizeMode_1( ::pPtr, nLogicalIndex, nMode ) + METHOD setSectionHidden( nLogicalIndex, lHide ) INLINE Qt_QHeaderView_setSectionHidden( ::pPtr, nLogicalIndex, lHide ) + METHOD setSortIndicator( nLogicalIndex, nOrder ) INLINE Qt_QHeaderView_setSortIndicator( ::pPtr, nLogicalIndex, nOrder ) + METHOD setSortIndicatorShown( lShow ) INLINE Qt_QHeaderView_setSortIndicatorShown( ::pPtr, lShow ) + METHOD setStretchLastSection( lStretch ) INLINE Qt_QHeaderView_setStretchLastSection( ::pPtr, lStretch ) + METHOD showSection( nLogicalIndex ) INLINE Qt_QHeaderView_showSection( ::pPtr, nLogicalIndex ) + METHOD sizeHint() INLINE Qt_QHeaderView_sizeHint( ::pPtr ) + METHOD sortIndicatorOrder() INLINE Qt_QHeaderView_sortIndicatorOrder( ::pPtr ) + METHOD sortIndicatorSection() INLINE Qt_QHeaderView_sortIndicatorSection( ::pPtr ) + METHOD stretchLastSection() INLINE Qt_QHeaderView_stretchLastSection( ::pPtr ) + METHOD stretchSectionCount() INLINE Qt_QHeaderView_stretchSectionCount( ::pPtr ) + METHOD swapSections( nFirst, nSecond ) INLINE Qt_QHeaderView_swapSections( ::pPtr, nFirst, nSecond ) + METHOD visualIndex( nLogicalIndex ) INLINE Qt_QHeaderView_visualIndex( ::pPtr, nLogicalIndex ) + METHOD visualIndexAt( nPosition ) INLINE Qt_QHeaderView_visualIndexAt( ::pPtr, nPosition ) + METHOD headerDataChanged( nOrientation, nLogicalFirst, nLogicalLast ) INLINE Qt_QHeaderView_headerDataChanged( ::pPtr, nOrientation, nLogicalFirst, nLogicalLast ) + METHOD setOffset( nOffset ) INLINE Qt_QHeaderView_setOffset( ::pPtr, nOffset ) + METHOD setOffsetToLastSection() INLINE Qt_QHeaderView_setOffsetToLastSection( ::pPtr ) + METHOD setOffsetToSectionPosition( nVisualIndex ) INLINE Qt_QHeaderView_setOffsetToSectionPosition( ::pPtr, nVisualIndex ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QHeaderView + + ::pParent := pParent + + ::pPtr := Qt_QHeaderView( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQHttp.prg b/harbour/contrib/hbqt/TQHttp.prg new file mode 100644 index 0000000000..ad928e6b13 --- /dev/null +++ b/harbour/contrib/hbqt/TQHttp.prg @@ -0,0 +1,107 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QHttp INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD bytesAvailable() INLINE Qt_QHttp_bytesAvailable( ::pPtr ) + METHOD clearPendingRequests() INLINE Qt_QHttp_clearPendingRequests( ::pPtr ) + METHOD close() INLINE Qt_QHttp_close( ::pPtr ) + METHOD currentDestinationDevice() INLINE Qt_QHttp_currentDestinationDevice( ::pPtr ) + METHOD currentId() INLINE Qt_QHttp_currentId( ::pPtr ) + METHOD currentRequest() INLINE Qt_QHttp_currentRequest( ::pPtr ) + METHOD currentSourceDevice() INLINE Qt_QHttp_currentSourceDevice( ::pPtr ) + METHOD error() INLINE Qt_QHttp_error( ::pPtr ) + METHOD errorString() INLINE Qt_QHttp_errorString( ::pPtr ) + METHOD get( cPath, pTo ) INLINE Qt_QHttp_get( ::pPtr, cPath, pTo ) + METHOD hasPendingRequests() INLINE Qt_QHttp_hasPendingRequests( ::pPtr ) + METHOD head( cPath ) INLINE Qt_QHttp_head( ::pPtr, cPath ) + METHOD lastResponse() INLINE Qt_QHttp_lastResponse( ::pPtr ) + METHOD post( cPath, pData, pTo ) INLINE Qt_QHttp_post( ::pPtr, cPath, pData, pTo ) + METHOD post_1( cPath, pData, pTo ) INLINE Qt_QHttp_post_1( ::pPtr, cPath, pData, pTo ) + METHOD read( pData, nMaxlen ) INLINE Qt_QHttp_read( ::pPtr, pData, nMaxlen ) + METHOD readAll() INLINE Qt_QHttp_readAll( ::pPtr ) + METHOD request( pHeader, pData, pTo ) INLINE Qt_QHttp_request( ::pPtr, pHeader, pData, pTo ) + METHOD request_1( pHeader, pData, pTo ) INLINE Qt_QHttp_request_1( ::pPtr, pHeader, pData, pTo ) + METHOD setHost( cHostName, nPort ) INLINE Qt_QHttp_setHost( ::pPtr, cHostName, nPort ) + METHOD setHost_1( cHostName, nMode, nPort ) INLINE Qt_QHttp_setHost_1( ::pPtr, cHostName, nMode, nPort ) + METHOD setProxy( cHost, nPort, cUsername ) INLINE Qt_QHttp_setProxy( ::pPtr, cHost, nPort, cUsername ) + METHOD setProxy_1( pProxy ) INLINE Qt_QHttp_setProxy_1( ::pPtr, pProxy ) + METHOD setSocket( pSocket ) INLINE Qt_QHttp_setSocket( ::pPtr, pSocket ) + METHOD setUser( cUserName, cPassword ) INLINE Qt_QHttp_setUser( ::pPtr, cUserName, cPassword ) + METHOD state() INLINE Qt_QHttp_state( ::pPtr ) + METHOD abort() INLINE Qt_QHttp_abort( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QHttp + + ::pParent := pParent + + ::pPtr := Qt_QHttp( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQIcon.prg b/harbour/contrib/hbqt/TQIcon.prg new file mode 100644 index 0000000000..559c13c0e7 --- /dev/null +++ b/harbour/contrib/hbqt/TQIcon.prg @@ -0,0 +1,90 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QIcon + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD actualSize( pSize, nMode, nState ) INLINE Qt_QIcon_actualSize( ::pPtr, pSize, nMode, nState ) + METHOD addFile( cFileName, pSize ) INLINE Qt_QIcon_addFile( ::pPtr, cFileName, pSize ) + METHOD addPixmap( pPixmap, nMode, nState ) INLINE Qt_QIcon_addPixmap( ::pPtr, pPixmap, nMode, nState ) + METHOD cacheKey() INLINE Qt_QIcon_cacheKey( ::pPtr ) + METHOD isNull() INLINE Qt_QIcon_isNull( ::pPtr ) + METHOD paint( pPainter, pRect, nAlignment, nMode, nState ) INLINE Qt_QIcon_paint( ::pPtr, pPainter, pRect, nAlignment, nMode, nState ) + METHOD paint_1( pPainter, nX, nY, nW, nH, nAlignment, nMode, nState ) INLINE Qt_QIcon_paint_1( ::pPtr, pPainter, nX, nY, nW, nH, nAlignment, nMode, nState ) + METHOD pixmap( pSize, nMode, nState ) INLINE Qt_QIcon_pixmap( ::pPtr, pSize, nMode, nState ) + METHOD pixmap_1( nW, nH, nMode, nState ) INLINE Qt_QIcon_pixmap_1( ::pPtr, nW, nH, nMode, nState ) + METHOD pixmap_2( nExtent, nMode, nState ) INLINE Qt_QIcon_pixmap_2( ::pPtr, nExtent, nMode, nState ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QIcon + + ::pParent := pParent + + ::pPtr := Qt_QIcon( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQInputDialog.prg b/harbour/contrib/hbqt/TQInputDialog.prg index e4ea8bb6b6..1e3292d368 100644 --- a/harbour/contrib/hbqt/TQInputDialog.prg +++ b/harbour/contrib/hbqt/TQInputDialog.prg @@ -53,16 +53,18 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QInputDialog INHERIT QDialog +CREATE CLASS QInputDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD cancelButtonText() INLINE Qt_QInputDialog_cancelButtonText( ::pPtr ) + METHOD comboBoxItems() INLINE Qt_QInputDialog_comboBoxItems( ::pPtr ) METHOD done( nResult ) INLINE Qt_QInputDialog_done( ::pPtr, nResult ) METHOD doubleDecimals() INLINE Qt_QInputDialog_doubleDecimals( ::pPtr ) METHOD doubleMaximum() INLINE Qt_QInputDialog_doubleMaximum( ::pPtr ) @@ -80,12 +82,13 @@ CLASS QInputDialog INHERIT QDialog METHOD options() INLINE Qt_QInputDialog_options( ::pPtr ) METHOD setCancelButtonText( cText ) INLINE Qt_QInputDialog_setCancelButtonText( ::pPtr, cText ) METHOD setComboBoxEditable( lEditable ) INLINE Qt_QInputDialog_setComboBoxEditable( ::pPtr, lEditable ) + METHOD setComboBoxItems( pItems ) INLINE Qt_QInputDialog_setComboBoxItems( ::pPtr, pItems ) METHOD setDoubleDecimals( nDecimals ) INLINE Qt_QInputDialog_setDoubleDecimals( ::pPtr, nDecimals ) METHOD setDoubleMaximum( nMax ) INLINE Qt_QInputDialog_setDoubleMaximum( ::pPtr, nMax ) METHOD setDoubleMinimum( nMin ) INLINE Qt_QInputDialog_setDoubleMinimum( ::pPtr, nMin ) METHOD setDoubleRange( nMin, nMax ) INLINE Qt_QInputDialog_setDoubleRange( ::pPtr, nMin, nMax ) METHOD setDoubleValue( nValue ) INLINE Qt_QInputDialog_setDoubleValue( ::pPtr, nValue ) - METHOD setInputMode( nInputMode ) INLINE Qt_QInputDialog_setInputMode( ::pPtr, nInputMode ) + METHOD setInputMode( nMode ) INLINE Qt_QInputDialog_setInputMode( ::pPtr, nMode ) METHOD setIntMaximum( nMax ) INLINE Qt_QInputDialog_setIntMaximum( ::pPtr, nMax ) METHOD setIntMinimum( nMin ) INLINE Qt_QInputDialog_setIntMinimum( ::pPtr, nMin ) METHOD setIntRange( nMin, nMax ) INLINE Qt_QInputDialog_setIntRange( ::pPtr, nMin, nMax ) @@ -93,11 +96,11 @@ CLASS QInputDialog INHERIT QDialog METHOD setIntValue( nValue ) INLINE Qt_QInputDialog_setIntValue( ::pPtr, nValue ) METHOD setLabelText( cText ) INLINE Qt_QInputDialog_setLabelText( ::pPtr, cText ) METHOD setOkButtonText( cText ) INLINE Qt_QInputDialog_setOkButtonText( ::pPtr, cText ) - METHOD setOption( nInputDialogOption, lOn ) INLINE Qt_QInputDialog_setOption( ::pPtr, nInputDialogOption, lOn ) - METHOD setOptions( nInputDialogOptions ) INLINE Qt_QInputDialog_setOptions( ::pPtr, nInputDialogOptions ) + METHOD setOption( nOption, lOn ) INLINE Qt_QInputDialog_setOption( ::pPtr, nOption, lOn ) + METHOD setOptions( nOptions ) INLINE Qt_QInputDialog_setOptions( ::pPtr, nOptions ) METHOD setTextEchoMode( nMode ) INLINE Qt_QInputDialog_setTextEchoMode( ::pPtr, nMode ) METHOD setTextValue( cText ) INLINE Qt_QInputDialog_setTextValue( ::pPtr, cText ) - METHOD testOption( nInputDialogOption ) INLINE Qt_QInputDialog_testOption( ::pPtr, nInputDialogOption ) + METHOD testOption( nOption ) INLINE Qt_QInputDialog_testOption( ::pPtr, nOption ) METHOD textEchoMode() INLINE Qt_QInputDialog_textEchoMode( ::pPtr ) METHOD textValue() INLINE Qt_QInputDialog_textValue( ::pPtr ) @@ -107,6 +110,8 @@ CLASS QInputDialog INHERIT QDialog METHOD New( pParent ) CLASS QInputDialog + ::pParent := pParent + ::pPtr := Qt_QInputDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQInputEvent.prg b/harbour/contrib/hbqt/TQInputEvent.prg new file mode 100644 index 0000000000..64ae163bbb --- /dev/null +++ b/harbour/contrib/hbqt/TQInputEvent.prg @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QInputEvent INHERIT QEvent + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD modifiers() INLINE Qt_QInputEvent_modifiers( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QInputEvent + + ::pParent := pParent + + ::pPtr := Qt_QInputEvent( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQLCDNumber.prg b/harbour/contrib/hbqt/TQLCDNumber.prg index ea69585c45..5a73e64758 100644 --- a/harbour/contrib/hbqt/TQLCDNumber.prg +++ b/harbour/contrib/hbqt/TQLCDNumber.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QLCDNumber INHERIT QFrame +CREATE CLASS QLCDNumber INHERIT QFrame - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -73,6 +74,14 @@ CLASS QLCDNumber INHERIT QFrame METHOD setSegmentStyle( nSegmentStyle ) INLINE Qt_QLCDNumber_setSegmentStyle( ::pPtr, nSegmentStyle ) METHOD smallDecimalPoint() INLINE Qt_QLCDNumber_smallDecimalPoint( ::pPtr ) METHOD value() INLINE Qt_QLCDNumber_value( ::pPtr ) + METHOD display( cS ) INLINE Qt_QLCDNumber_display( ::pPtr, cS ) + METHOD display_1( nNum ) INLINE Qt_QLCDNumber_display_1( ::pPtr, nNum ) + METHOD display_2( nNum ) INLINE Qt_QLCDNumber_display_2( ::pPtr, nNum ) + METHOD setBinMode() INLINE Qt_QLCDNumber_setBinMode( ::pPtr ) + METHOD setDecMode() INLINE Qt_QLCDNumber_setDecMode( ::pPtr ) + METHOD setHexMode() INLINE Qt_QLCDNumber_setHexMode( ::pPtr ) + METHOD setOctMode() INLINE Qt_QLCDNumber_setOctMode( ::pPtr ) + METHOD setSmallDecimalPoint( lBool ) INLINE Qt_QLCDNumber_setSmallDecimalPoint( ::pPtr, lBool ) ENDCLASS @@ -80,6 +89,8 @@ CLASS QLCDNumber INHERIT QFrame METHOD New( pParent ) CLASS QLCDNumber + ::pParent := pParent + ::pPtr := Qt_QLCDNumber( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQLabel.prg b/harbour/contrib/hbqt/TQLabel.prg index 084781f2cc..8c2850cfa2 100644 --- a/harbour/contrib/hbqt/TQLabel.prg +++ b/harbour/contrib/hbqt/TQLabel.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QLabel INHERIT QFrame +CREATE CLASS QLabel INHERIT QFrame - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -78,6 +79,7 @@ CLASS QLabel INHERIT QFrame METHOD setOpenExternalLinks( lOpen ) INLINE Qt_QLabel_setOpenExternalLinks( ::pPtr, lOpen ) METHOD setScaledContents( lBool ) INLINE Qt_QLabel_setScaledContents( ::pPtr, lBool ) METHOD setTextFormat( nQt_TextFormat ) INLINE Qt_QLabel_setTextFormat( ::pPtr, nQt_TextFormat ) + METHOD setTextInteractionFlags( nFlags ) INLINE Qt_QLabel_setTextInteractionFlags( ::pPtr, nFlags ) METHOD setWordWrap( lOn ) INLINE Qt_QLabel_setWordWrap( ::pPtr, lOn ) METHOD text() INLINE Qt_QLabel_text( ::pPtr ) METHOD textFormat() INLINE Qt_QLabel_textFormat( ::pPtr ) @@ -87,6 +89,8 @@ CLASS QLabel INHERIT QFrame METHOD setMovie( pMovie ) INLINE Qt_QLabel_setMovie( ::pPtr, pMovie ) METHOD setNum( nNum ) INLINE Qt_QLabel_setNum( ::pPtr, nNum ) METHOD setNum_1( nNum ) INLINE Qt_QLabel_setNum_1( ::pPtr, nNum ) + METHOD setPicture( pPicture ) INLINE Qt_QLabel_setPicture( ::pPtr, pPicture ) + METHOD setPixmap( pQPixmap ) INLINE Qt_QLabel_setPixmap( ::pPtr, pQPixmap ) METHOD setText( cQString ) INLINE Qt_QLabel_setText( ::pPtr, cQString ) ENDCLASS @@ -95,6 +99,8 @@ CLASS QLabel INHERIT QFrame METHOD New( pParent ) CLASS QLabel + ::pParent := pParent + ::pPtr := Qt_QLabel( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQLayout.prg b/harbour/contrib/hbqt/TQLayout.prg index a7f26bd26d..31fb13f08e 100644 --- a/harbour/contrib/hbqt/TQLayout.prg +++ b/harbour/contrib/hbqt/TQLayout.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QLayout INHERIT QObject, QLayoutItem +CREATE CLASS QLayout INHERIT QObject, QLayoutItem - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -68,6 +69,7 @@ CLASS QLayout INHERIT QObject, QLayoutItem METHOD contentsRect() INLINE Qt_QLayout_contentsRect( ::pPtr ) METHOD count() INLINE Qt_QLayout_count( ::pPtr ) METHOD expandingDirections() INLINE Qt_QLayout_expandingDirections( ::pPtr ) + METHOD getContentsMargins( nLeft, nTop, nRight, nBottom ) INLINE Qt_QLayout_getContentsMargins( ::pPtr, nLeft, nTop, nRight, nBottom ) METHOD indexOf( pWidget ) INLINE Qt_QLayout_indexOf( ::pPtr, pWidget ) METHOD isEnabled() INLINE Qt_QLayout_isEnabled( ::pPtr ) METHOD itemAt( nIndex ) INLINE Qt_QLayout_itemAt( ::pPtr, nIndex ) @@ -96,6 +98,8 @@ CLASS QLayout INHERIT QObject, QLayoutItem METHOD New( pParent ) CLASS QLayout + ::pParent := pParent + ::pPtr := Qt_QLayout( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQLayoutItem.prg b/harbour/contrib/hbqt/TQLayoutItem.prg index cac68569c0..0f94c743bb 100644 --- a/harbour/contrib/hbqt/TQLayoutItem.prg +++ b/harbour/contrib/hbqt/TQLayoutItem.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QLayoutItem +CREATE CLASS QLayoutItem - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -75,7 +76,7 @@ CLASS QLayoutItem METHOD minimumHeightForWidth( nW ) INLINE Qt_QLayoutItem_minimumHeightForWidth( ::pPtr, nW ) METHOD minimumSize() INLINE Qt_QLayoutItem_minimumSize( ::pPtr ) METHOD setAlignment( nAlignment ) INLINE Qt_QLayoutItem_setAlignment( ::pPtr, nAlignment ) - METHOD setGeometry( aRectR ) INLINE Qt_QLayoutItem_setGeometry( ::pPtr, aRectR ) + METHOD setGeometry( pR ) INLINE Qt_QLayoutItem_setGeometry( ::pPtr, pR ) METHOD sizeHint() INLINE Qt_QLayoutItem_sizeHint( ::pPtr ) METHOD spacerItem() INLINE Qt_QLayoutItem_spacerItem( ::pPtr ) METHOD widget() INLINE Qt_QLayoutItem_widget( ::pPtr ) @@ -86,6 +87,8 @@ CLASS QLayoutItem METHOD New( pParent ) CLASS QLayoutItem + ::pParent := pParent + ::pPtr := Qt_QLayoutItem( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQLineEdit.prg b/harbour/contrib/hbqt/TQLineEdit.prg index 19d7bcd488..9de55baf80 100644 --- a/harbour/contrib/hbqt/TQLineEdit.prg +++ b/harbour/contrib/hbqt/TQLineEdit.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QLineEdit INHERIT QWidget +CREATE CLASS QLineEdit INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,7 +70,7 @@ CLASS QLineEdit INHERIT QWidget METHOD cursorBackward( lMark, nSteps ) INLINE Qt_QLineEdit_cursorBackward( ::pPtr, lMark, nSteps ) METHOD cursorForward( lMark, nSteps ) INLINE Qt_QLineEdit_cursorForward( ::pPtr, lMark, nSteps ) METHOD cursorPosition() INLINE Qt_QLineEdit_cursorPosition( ::pPtr ) - METHOD cursorPositionAt( aPointPos ) INLINE Qt_QLineEdit_cursorPositionAt( ::pPtr, aPointPos ) + METHOD cursorPositionAt( pPos ) INLINE Qt_QLineEdit_cursorPositionAt( ::pPtr, pPos ) METHOD cursorWordBackward( lMark ) INLINE Qt_QLineEdit_cursorWordBackward( ::pPtr, lMark ) METHOD cursorWordForward( lMark ) INLINE Qt_QLineEdit_cursorWordForward( ::pPtr, lMark ) METHOD del() INLINE Qt_QLineEdit_del( ::pPtr ) @@ -78,6 +79,7 @@ CLASS QLineEdit INHERIT QWidget METHOD dragEnabled() INLINE Qt_QLineEdit_dragEnabled( ::pPtr ) METHOD echoMode() INLINE Qt_QLineEdit_echoMode( ::pPtr ) METHOD end( lMark ) INLINE Qt_QLineEdit_end( ::pPtr, lMark ) + METHOD getTextMargins( nLeft, nTop, nRight, nBottom ) INLINE Qt_QLineEdit_getTextMargins( ::pPtr, nLeft, nTop, nRight, nBottom ) METHOD hasAcceptableInput() INLINE Qt_QLineEdit_hasAcceptableInput( ::pPtr ) METHOD hasFrame() INLINE Qt_QLineEdit_hasFrame( ::pPtr ) METHOD hasSelectedText() INLINE Qt_QLineEdit_hasSelectedText( ::pPtr ) @@ -108,6 +110,14 @@ CLASS QLineEdit INHERIT QWidget METHOD sizeHint() INLINE Qt_QLineEdit_sizeHint( ::pPtr ) METHOD text() INLINE Qt_QLineEdit_text( ::pPtr ) METHOD validator() INLINE Qt_QLineEdit_validator( ::pPtr ) + METHOD clear() INLINE Qt_QLineEdit_clear( ::pPtr ) + METHOD copy() INLINE Qt_QLineEdit_copy( ::pPtr ) + METHOD cut() INLINE Qt_QLineEdit_cut( ::pPtr ) + METHOD paste() INLINE Qt_QLineEdit_paste( ::pPtr ) + METHOD redo() INLINE Qt_QLineEdit_redo( ::pPtr ) + METHOD selectAll() INLINE Qt_QLineEdit_selectAll( ::pPtr ) + METHOD setText( cQString ) INLINE Qt_QLineEdit_setText( ::pPtr, cQString ) + METHOD undo() INLINE Qt_QLineEdit_undo( ::pPtr ) ENDCLASS @@ -115,6 +125,8 @@ CLASS QLineEdit INHERIT QWidget METHOD New( pParent ) CLASS QLineEdit + ::pParent := pParent + ::pPtr := Qt_QLineEdit( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQListView.prg b/harbour/contrib/hbqt/TQListView.prg index bfa08e40f8..97a4c6e8c6 100644 --- a/harbour/contrib/hbqt/TQListView.prg +++ b/harbour/contrib/hbqt/TQListView.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QListView INHERIT QAbstractItemView +CREATE CLASS QListView INHERIT QAbstractItemView - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -75,16 +76,16 @@ CLASS QListView INHERIT QAbstractItemView METHOD resizeMode() INLINE Qt_QListView_resizeMode( ::pPtr ) METHOD setBatchSize( nBatchSize ) INLINE Qt_QListView_setBatchSize( ::pPtr, nBatchSize ) METHOD setFlow( nFlow ) INLINE Qt_QListView_setFlow( ::pPtr, nFlow ) - METHOD setGridSize( aSizeSize ) INLINE Qt_QListView_setGridSize( ::pPtr, aSizeSize ) - METHOD setLayoutMode( nLayoutMode ) INLINE Qt_QListView_setLayoutMode( ::pPtr, nLayoutMode ) + METHOD setGridSize( pSize ) INLINE Qt_QListView_setGridSize( ::pPtr, pSize ) + METHOD setLayoutMode( nMode ) INLINE Qt_QListView_setLayoutMode( ::pPtr, nMode ) METHOD setModelColumn( nColumn ) INLINE Qt_QListView_setModelColumn( ::pPtr, nColumn ) METHOD setMovement( nMovement ) INLINE Qt_QListView_setMovement( ::pPtr, nMovement ) - METHOD setResizeMode( nResizeMode ) INLINE Qt_QListView_setResizeMode( ::pPtr, nResizeMode ) + METHOD setResizeMode( nMode ) INLINE Qt_QListView_setResizeMode( ::pPtr, nMode ) METHOD setRowHidden( nRow, lHide ) INLINE Qt_QListView_setRowHidden( ::pPtr, nRow, lHide ) METHOD setSelectionRectVisible( lShow ) INLINE Qt_QListView_setSelectionRectVisible( ::pPtr, lShow ) METHOD setSpacing( nSpace ) INLINE Qt_QListView_setSpacing( ::pPtr, nSpace ) METHOD setUniformItemSizes( lEnable ) INLINE Qt_QListView_setUniformItemSizes( ::pPtr, lEnable ) - METHOD setViewMode( nViewMode ) INLINE Qt_QListView_setViewMode( ::pPtr, nViewMode ) + METHOD setViewMode( nMode ) INLINE Qt_QListView_setViewMode( ::pPtr, nMode ) METHOD setWordWrap( lOn ) INLINE Qt_QListView_setWordWrap( ::pPtr, lOn ) METHOD setWrapping( lEnable ) INLINE Qt_QListView_setWrapping( ::pPtr, lEnable ) METHOD spacing() INLINE Qt_QListView_spacing( ::pPtr ) @@ -98,6 +99,8 @@ CLASS QListView INHERIT QAbstractItemView METHOD New( pParent ) CLASS QListView + ::pParent := pParent + ::pPtr := Qt_QListView( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQListWidget.prg b/harbour/contrib/hbqt/TQListWidget.prg new file mode 100644 index 0000000000..5c773a4c65 --- /dev/null +++ b/harbour/contrib/hbqt/TQListWidget.prg @@ -0,0 +1,110 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QListWidget INHERIT QListView + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD addItem( cLabel ) INLINE Qt_QListWidget_addItem( ::pPtr, cLabel ) + METHOD addItem_1( pItem ) INLINE Qt_QListWidget_addItem_1( ::pPtr, pItem ) + METHOD addItems( pLabels ) INLINE Qt_QListWidget_addItems( ::pPtr, pLabels ) + METHOD closePersistentEditor( pItem ) INLINE Qt_QListWidget_closePersistentEditor( ::pPtr, pItem ) + METHOD count() INLINE Qt_QListWidget_count( ::pPtr ) + METHOD currentItem() INLINE Qt_QListWidget_currentItem( ::pPtr ) + METHOD currentRow() INLINE Qt_QListWidget_currentRow( ::pPtr ) + METHOD editItem( pItem ) INLINE Qt_QListWidget_editItem( ::pPtr, pItem ) + METHOD insertItem( nRow, pItem ) INLINE Qt_QListWidget_insertItem( ::pPtr, nRow, pItem ) + METHOD insertItem_1( nRow, cLabel ) INLINE Qt_QListWidget_insertItem_1( ::pPtr, nRow, cLabel ) + METHOD insertItems( nRow, pLabels ) INLINE Qt_QListWidget_insertItems( ::pPtr, nRow, pLabels ) + METHOD isSortingEnabled() INLINE Qt_QListWidget_isSortingEnabled( ::pPtr ) + METHOD item( nRow ) INLINE Qt_QListWidget_item( ::pPtr, nRow ) + METHOD itemAt( pP ) INLINE Qt_QListWidget_itemAt( ::pPtr, pP ) + METHOD itemAt_1( nX, nY ) INLINE Qt_QListWidget_itemAt_1( ::pPtr, nX, nY ) + METHOD itemWidget( pItem ) INLINE Qt_QListWidget_itemWidget( ::pPtr, pItem ) + METHOD openPersistentEditor( pItem ) INLINE Qt_QListWidget_openPersistentEditor( ::pPtr, pItem ) + METHOD removeItemWidget( pItem ) INLINE Qt_QListWidget_removeItemWidget( ::pPtr, pItem ) + METHOD row( pItem ) INLINE Qt_QListWidget_row( ::pPtr, pItem ) + METHOD setCurrentItem( pItem ) INLINE Qt_QListWidget_setCurrentItem( ::pPtr, pItem ) + METHOD setCurrentItem_1( pItem, nCommand ) INLINE Qt_QListWidget_setCurrentItem_1( ::pPtr, pItem, nCommand ) + METHOD setCurrentRow( nRow ) INLINE Qt_QListWidget_setCurrentRow( ::pPtr, nRow ) + METHOD setCurrentRow_1( nRow, nCommand ) INLINE Qt_QListWidget_setCurrentRow_1( ::pPtr, nRow, nCommand ) + METHOD setItemWidget( pItem, pWidget ) INLINE Qt_QListWidget_setItemWidget( ::pPtr, pItem, pWidget ) + METHOD setSortingEnabled( lEnable ) INLINE Qt_QListWidget_setSortingEnabled( ::pPtr, lEnable ) + METHOD sortItems( nOrder ) INLINE Qt_QListWidget_sortItems( ::pPtr, nOrder ) + METHOD takeItem( nRow ) INLINE Qt_QListWidget_takeItem( ::pPtr, nRow ) + METHOD visualItemRect( pItem ) INLINE Qt_QListWidget_visualItemRect( ::pPtr, pItem ) + METHOD clear() INLINE Qt_QListWidget_clear( ::pPtr ) + METHOD scrollToItem( pItem, nHint ) INLINE Qt_QListWidget_scrollToItem( ::pPtr, pItem, nHint ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QListWidget + + ::pParent := pParent + + ::pPtr := Qt_QListWidget( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQListWidgetItem.prg b/harbour/contrib/hbqt/TQListWidgetItem.prg new file mode 100644 index 0000000000..c59ef39ab2 --- /dev/null +++ b/harbour/contrib/hbqt/TQListWidgetItem.prg @@ -0,0 +1,115 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QListWidgetItem INHERIT QWidget + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD background() INLINE Qt_QListWidgetItem_background( ::pPtr ) + METHOD checkState() INLINE Qt_QListWidgetItem_checkState( ::pPtr ) + METHOD clone() INLINE Qt_QListWidgetItem_clone( ::pPtr ) + METHOD data( nRole ) INLINE Qt_QListWidgetItem_data( ::pPtr, nRole ) + METHOD flags() INLINE Qt_QListWidgetItem_flags( ::pPtr ) + METHOD font() INLINE Qt_QListWidgetItem_font( ::pPtr ) + METHOD foreground() INLINE Qt_QListWidgetItem_foreground( ::pPtr ) + METHOD icon() INLINE Qt_QListWidgetItem_icon( ::pPtr ) + METHOD isHidden() INLINE Qt_QListWidgetItem_isHidden( ::pPtr ) + METHOD isSelected() INLINE Qt_QListWidgetItem_isSelected( ::pPtr ) + METHOD listWidget() INLINE Qt_QListWidgetItem_listWidget( ::pPtr ) + METHOD read( pIn ) INLINE Qt_QListWidgetItem_read( ::pPtr, pIn ) + METHOD setBackground( pBrush ) INLINE Qt_QListWidgetItem_setBackground( ::pPtr, pBrush ) + METHOD setCheckState( nState ) INLINE Qt_QListWidgetItem_setCheckState( ::pPtr, nState ) + METHOD setData( nRole, pValue ) INLINE Qt_QListWidgetItem_setData( ::pPtr, nRole, pValue ) + METHOD setFlags( nFlags ) INLINE Qt_QListWidgetItem_setFlags( ::pPtr, nFlags ) + METHOD setFont( pFont ) INLINE Qt_QListWidgetItem_setFont( ::pPtr, pFont ) + METHOD setForeground( pBrush ) INLINE Qt_QListWidgetItem_setForeground( ::pPtr, pBrush ) + METHOD setHidden( lHide ) INLINE Qt_QListWidgetItem_setHidden( ::pPtr, lHide ) + METHOD setIcon( cIcon ) INLINE Qt_QListWidgetItem_setIcon( ::pPtr, cIcon ) + METHOD setSelected( lSelect ) INLINE Qt_QListWidgetItem_setSelected( ::pPtr, lSelect ) + METHOD setSizeHint( pSize ) INLINE Qt_QListWidgetItem_setSizeHint( ::pPtr, pSize ) + METHOD setStatusTip( cStatusTip ) INLINE Qt_QListWidgetItem_setStatusTip( ::pPtr, cStatusTip ) + METHOD setText( cText ) INLINE Qt_QListWidgetItem_setText( ::pPtr, cText ) + METHOD setTextAlignment( nAlignment ) INLINE Qt_QListWidgetItem_setTextAlignment( ::pPtr, nAlignment ) + METHOD setToolTip( cToolTip ) INLINE Qt_QListWidgetItem_setToolTip( ::pPtr, cToolTip ) + METHOD setWhatsThis( cWhatsThis ) INLINE Qt_QListWidgetItem_setWhatsThis( ::pPtr, cWhatsThis ) + METHOD sizeHint() INLINE Qt_QListWidgetItem_sizeHint( ::pPtr ) + METHOD statusTip() INLINE Qt_QListWidgetItem_statusTip( ::pPtr ) + METHOD text() INLINE Qt_QListWidgetItem_text( ::pPtr ) + METHOD textAlignment() INLINE Qt_QListWidgetItem_textAlignment( ::pPtr ) + METHOD toolTip() INLINE Qt_QListWidgetItem_toolTip( ::pPtr ) + METHOD type() INLINE Qt_QListWidgetItem_type( ::pPtr ) + METHOD whatsThis() INLINE Qt_QListWidgetItem_whatsThis( ::pPtr ) + METHOD write( pOut ) INLINE Qt_QListWidgetItem_write( ::pPtr, pOut ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QListWidgetItem + + ::pParent := pParent + + ::pPtr := Qt_QListWidgetItem( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQMainWindow.prg b/harbour/contrib/hbqt/TQMainWindow.prg index a269c3546d..04402e902e 100644 --- a/harbour/contrib/hbqt/TQMainWindow.prg +++ b/harbour/contrib/hbqt/TQMainWindow.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QMainWindow INHERIT QWidget +CREATE CLASS QMainWindow INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -85,11 +86,13 @@ CLASS QMainWindow INHERIT QWidget METHOD removeToolBar( pToolbar ) INLINE Qt_QMainWindow_removeToolBar( ::pPtr, pToolbar ) METHOD removeToolBarBreak( pBefore ) INLINE Qt_QMainWindow_removeToolBarBreak( ::pPtr, pBefore ) METHOD restoreDockWidget( pDockwidget ) INLINE Qt_QMainWindow_restoreDockWidget( ::pPtr, pDockwidget ) + METHOD restoreState( pState, nVersion ) INLINE Qt_QMainWindow_restoreState( ::pPtr, pState, nVersion ) + METHOD saveState( nVersion ) INLINE Qt_QMainWindow_saveState( ::pPtr, nVersion ) METHOD setCentralWidget( pWidget ) INLINE Qt_QMainWindow_setCentralWidget( ::pPtr, pWidget ) METHOD setCorner( nCorner, nArea ) INLINE Qt_QMainWindow_setCorner( ::pPtr, nCorner, nArea ) - METHOD setDockOptions( nDockOptions ) INLINE Qt_QMainWindow_setDockOptions( ::pPtr, nDockOptions ) + METHOD setDockOptions( nOptions ) INLINE Qt_QMainWindow_setDockOptions( ::pPtr, nOptions ) METHOD setDocumentMode( lEnabled ) INLINE Qt_QMainWindow_setDocumentMode( ::pPtr, lEnabled ) - METHOD setIconSize( aSizeIconSize ) INLINE Qt_QMainWindow_setIconSize( ::pPtr, aSizeIconSize ) + METHOD setIconSize( pIconSize ) INLINE Qt_QMainWindow_setIconSize( ::pPtr, pIconSize ) METHOD setMenuBar( pMenuBar ) INLINE Qt_QMainWindow_setMenuBar( ::pPtr, pMenuBar ) METHOD setMenuWidget( pMenuBar ) INLINE Qt_QMainWindow_setMenuWidget( ::pPtr, pMenuBar ) METHOD setStatusBar( pStatusbar ) INLINE Qt_QMainWindow_setStatusBar( ::pPtr, pStatusbar ) @@ -115,6 +118,8 @@ CLASS QMainWindow INHERIT QWidget METHOD New( pParent ) CLASS QMainWindow + ::pParent := pParent + ::pPtr := Qt_QMainWindow( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQMenu.prg b/harbour/contrib/hbqt/TQMenu.prg index 0d011c883b..800eb6bee8 100644 --- a/harbour/contrib/hbqt/TQMenu.prg +++ b/harbour/contrib/hbqt/TQMenu.prg @@ -53,21 +53,24 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QMenu INHERIT QWidget +CREATE CLASS QMenu INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() - METHOD actionAt( aPointPt ) INLINE Qt_QMenu_actionAt( ::pPtr, aPointPt ) + METHOD actionAt( pPt ) INLINE Qt_QMenu_actionAt( ::pPtr, pPt ) METHOD actionGeometry( pAct ) INLINE Qt_QMenu_actionGeometry( ::pPtr, pAct ) METHOD activeAction() INLINE Qt_QMenu_activeAction( ::pPtr ) METHOD addAction( cText ) INLINE Qt_QMenu_addAction( ::pPtr, cText ) METHOD addAction_1( cIcon, cText ) INLINE Qt_QMenu_addAction_1( ::pPtr, cIcon, cText ) - METHOD addAction_2( pAction ) INLINE Qt_QMenu_addAction_2( ::pPtr, pAction ) + METHOD addAction_2( cText, pReceiver, pMember, pShortcut ) INLINE Qt_QMenu_addAction_2( ::pPtr, cText, pReceiver, pMember, pShortcut ) + METHOD addAction_3( cIcon, cText, pReceiver, pMember, pShortcut ) INLINE Qt_QMenu_addAction_3( ::pPtr, cIcon, cText, pReceiver, pMember, pShortcut ) + METHOD addAction_4( pAction ) INLINE Qt_QMenu_addAction_4( ::pPtr, pAction ) METHOD addMenu( pMenu ) INLINE Qt_QMenu_addMenu( ::pPtr, pMenu ) METHOD addMenu_1( cTitle ) INLINE Qt_QMenu_addMenu_1( ::pPtr, cTitle ) METHOD addMenu_2( cIcon, cTitle ) INLINE Qt_QMenu_addMenu_2( ::pPtr, cIcon, cTitle ) @@ -75,15 +78,16 @@ CLASS QMenu INHERIT QWidget METHOD clear() INLINE Qt_QMenu_clear( ::pPtr ) METHOD defaultAction() INLINE Qt_QMenu_defaultAction( ::pPtr ) METHOD exec() INLINE Qt_QMenu_exec( ::pPtr ) - METHOD exec_1( aPointP, pAction ) INLINE Qt_QMenu_exec_1( ::pPtr, aPointP, pAction ) + METHOD exec_1( pP, pAction ) INLINE Qt_QMenu_exec_1( ::pPtr, pP, pAction ) METHOD hideTearOffMenu() INLINE Qt_QMenu_hideTearOffMenu( ::pPtr ) + METHOD icon() INLINE Qt_QMenu_icon( ::pPtr ) METHOD insertMenu( pBefore, pMenu ) INLINE Qt_QMenu_insertMenu( ::pPtr, pBefore, pMenu ) METHOD insertSeparator( pBefore ) INLINE Qt_QMenu_insertSeparator( ::pPtr, pBefore ) METHOD isEmpty() INLINE Qt_QMenu_isEmpty( ::pPtr ) METHOD isTearOffEnabled() INLINE Qt_QMenu_isTearOffEnabled( ::pPtr ) METHOD isTearOffMenuVisible() INLINE Qt_QMenu_isTearOffMenuVisible( ::pPtr ) METHOD menuAction() INLINE Qt_QMenu_menuAction( ::pPtr ) - METHOD popup( aPointP, pAtAction ) INLINE Qt_QMenu_popup( ::pPtr, aPointP, pAtAction ) + METHOD popup( pP, pAtAction ) INLINE Qt_QMenu_popup( ::pPtr, pP, pAtAction ) METHOD separatorsCollapsible() INLINE Qt_QMenu_separatorsCollapsible( ::pPtr ) METHOD setActiveAction( pAct ) INLINE Qt_QMenu_setActiveAction( ::pPtr, pAct ) METHOD setDefaultAction( pAct ) INLINE Qt_QMenu_setDefaultAction( ::pPtr, pAct ) @@ -99,6 +103,8 @@ CLASS QMenu INHERIT QWidget METHOD New( pParent ) CLASS QMenu + ::pParent := pParent + ::pPtr := Qt_QMenu( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQMenuBar.prg b/harbour/contrib/hbqt/TQMenuBar.prg index 357fc9f194..a9ec33c070 100644 --- a/harbour/contrib/hbqt/TQMenuBar.prg +++ b/harbour/contrib/hbqt/TQMenuBar.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QMenuBar INHERIT QWidget +CREATE CLASS QMenuBar INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -83,6 +84,8 @@ CLASS QMenuBar INHERIT QWidget METHOD New( pParent ) CLASS QMenuBar + ::pParent := pParent + ::pPtr := Qt_QMenuBar( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQMessageBox.prg b/harbour/contrib/hbqt/TQMessageBox.prg index 646f5642bb..64db5b70fd 100644 --- a/harbour/contrib/hbqt/TQMessageBox.prg +++ b/harbour/contrib/hbqt/TQMessageBox.prg @@ -53,36 +53,39 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QMessageBox INHERIT QDialog +CREATE CLASS QMessageBox INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() - METHOD addButton( pButton, nButtonRole ) INLINE Qt_QMessageBox_addButton( ::pPtr, pButton, nButtonRole ) - METHOD addButton_1( cText, nButtonRole ) INLINE Qt_QMessageBox_addButton_1( ::pPtr, cText, nButtonRole ) - METHOD addButton_2( nStandardButton ) INLINE Qt_QMessageBox_addButton_2( ::pPtr, nStandardButton ) - METHOD button( nStandardButton ) INLINE Qt_QMessageBox_button( ::pPtr, nStandardButton ) + METHOD addButton( pButton, nRole ) INLINE Qt_QMessageBox_addButton( ::pPtr, pButton, nRole ) + METHOD addButton_1( cText, nRole ) INLINE Qt_QMessageBox_addButton_1( ::pPtr, cText, nRole ) + METHOD addButton_2( nButton ) INLINE Qt_QMessageBox_addButton_2( ::pPtr, nButton ) + METHOD button( nWhich ) INLINE Qt_QMessageBox_button( ::pPtr, nWhich ) METHOD buttonRole( pButton ) INLINE Qt_QMessageBox_buttonRole( ::pPtr, pButton ) METHOD clickedButton() INLINE Qt_QMessageBox_clickedButton( ::pPtr ) METHOD defaultButton() INLINE Qt_QMessageBox_defaultButton( ::pPtr ) METHOD detailedText() INLINE Qt_QMessageBox_detailedText( ::pPtr ) METHOD escapeButton() INLINE Qt_QMessageBox_escapeButton( ::pPtr ) METHOD icon() INLINE Qt_QMessageBox_icon( ::pPtr ) + METHOD iconPixmap() INLINE Qt_QMessageBox_iconPixmap( ::pPtr ) METHOD informativeText() INLINE Qt_QMessageBox_informativeText( ::pPtr ) METHOD open( pReceiver, pMember ) INLINE Qt_QMessageBox_open( ::pPtr, pReceiver, pMember ) METHOD removeButton( pButton ) INLINE Qt_QMessageBox_removeButton( ::pPtr, pButton ) METHOD setDefaultButton( pButton ) INLINE Qt_QMessageBox_setDefaultButton( ::pPtr, pButton ) - METHOD setDefaultButton_1( nStandardButton ) INLINE Qt_QMessageBox_setDefaultButton_1( ::pPtr, nStandardButton ) + METHOD setDefaultButton_1( nButton ) INLINE Qt_QMessageBox_setDefaultButton_1( ::pPtr, nButton ) METHOD setDetailedText( cText ) INLINE Qt_QMessageBox_setDetailedText( ::pPtr, cText ) METHOD setEscapeButton( pButton ) INLINE Qt_QMessageBox_setEscapeButton( ::pPtr, pButton ) - METHOD setEscapeButton_1( nStandardButton ) INLINE Qt_QMessageBox_setEscapeButton_1( ::pPtr, nStandardButton ) + METHOD setEscapeButton_1( nButton ) INLINE Qt_QMessageBox_setEscapeButton_1( ::pPtr, nButton ) METHOD setIcon( nIcon ) INLINE Qt_QMessageBox_setIcon( ::pPtr, nIcon ) + METHOD setIconPixmap( pPixmap ) INLINE Qt_QMessageBox_setIconPixmap( ::pPtr, pPixmap ) METHOD setInformativeText( cText ) INLINE Qt_QMessageBox_setInformativeText( ::pPtr, cText ) - METHOD setStandardButtons( nStandardButtons ) INLINE Qt_QMessageBox_setStandardButtons( ::pPtr, nStandardButtons ) + METHOD setStandardButtons( nButtons ) INLINE Qt_QMessageBox_setStandardButtons( ::pPtr, nButtons ) METHOD setText( cText ) INLINE Qt_QMessageBox_setText( ::pPtr, cText ) METHOD setTextFormat( nFormat ) INLINE Qt_QMessageBox_setTextFormat( ::pPtr, nFormat ) METHOD setWindowModality( nWindowModality ) INLINE Qt_QMessageBox_setWindowModality( ::pPtr, nWindowModality ) @@ -91,6 +94,7 @@ CLASS QMessageBox INHERIT QDialog METHOD standardButtons() INLINE Qt_QMessageBox_standardButtons( ::pPtr ) METHOD text() INLINE Qt_QMessageBox_text( ::pPtr ) METHOD textFormat() INLINE Qt_QMessageBox_textFormat( ::pPtr ) + METHOD exec() INLINE Qt_QMessageBox_exec( ::pPtr ) ENDCLASS @@ -98,6 +102,8 @@ CLASS QMessageBox INHERIT QDialog METHOD New( pParent ) CLASS QMessageBox + ::pParent := pParent + ::pPtr := Qt_QMessageBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQObject.prg b/harbour/contrib/hbqt/TQObject.prg index f209a10afb..9d3d9d7644 100644 --- a/harbour/contrib/hbqt/TQObject.prg +++ b/harbour/contrib/hbqt/TQObject.prg @@ -53,16 +53,18 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QObject +CREATE CLASS QObject - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD blockSignals( lBlock ) INLINE Qt_QObject_blockSignals( ::pPtr, lBlock ) + METHOD children() INLINE Qt_QObject_children( ::pPtr ) METHOD connect( pSender, pSignal, pMethod, nType ) INLINE Qt_QObject_connect( ::pPtr, pSender, pSignal, pMethod, nType ) METHOD disconnect( pSignal, pReceiver, pMethod ) INLINE Qt_QObject_disconnect( ::pPtr, pSignal, pReceiver, pMethod ) METHOD disconnect_1( pReceiver, pMethod ) INLINE Qt_QObject_disconnect_1( ::pPtr, pReceiver, pMethod ) @@ -78,12 +80,15 @@ CLASS QObject METHOD moveToThread( pTargetThread ) INLINE Qt_QObject_moveToThread( ::pPtr, pTargetThread ) METHOD objectName() INLINE Qt_QObject_objectName( ::pPtr ) METHOD parent() INLINE Qt_QObject_parent( ::pPtr ) + METHOD property( pName ) INLINE Qt_QObject_property( ::pPtr, pName ) METHOD removeEventFilter( pObj ) INLINE Qt_QObject_removeEventFilter( ::pPtr, pObj ) METHOD setObjectName( cName ) INLINE Qt_QObject_setObjectName( ::pPtr, cName ) METHOD setParent( pParent ) INLINE Qt_QObject_setParent( ::pPtr, pParent ) + METHOD setProperty( pName, pValue ) INLINE Qt_QObject_setProperty( ::pPtr, pName, pValue ) METHOD signalsBlocked() INLINE Qt_QObject_signalsBlocked( ::pPtr ) METHOD startTimer( nInterval ) INLINE Qt_QObject_startTimer( ::pPtr, nInterval ) METHOD thread() INLINE Qt_QObject_thread( ::pPtr ) + METHOD deleteLater() INLINE Qt_QObject_deleteLater( ::pPtr ) ENDCLASS @@ -91,6 +96,8 @@ CLASS QObject METHOD New( pParent ) CLASS QObject + ::pParent := pParent + ::pPtr := Qt_QObject( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQPageSetupDialog.prg b/harbour/contrib/hbqt/TQPageSetupDialog.prg index 9f1ffef6f4..5586ac38bf 100644 --- a/harbour/contrib/hbqt/TQPageSetupDialog.prg +++ b/harbour/contrib/hbqt/TQPageSetupDialog.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QPageSetupDialog INHERIT QDialog +CREATE CLASS QPageSetupDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -66,10 +67,10 @@ CLASS QPageSetupDialog INHERIT QDialog METHOD open( pReceiver, pMember ) INLINE Qt_QPageSetupDialog_open( ::pPtr, pReceiver, pMember ) METHOD options() INLINE Qt_QPageSetupDialog_options( ::pPtr ) METHOD printer() INLINE Qt_QPageSetupDialog_printer( ::pPtr ) - METHOD setOption( nPageSetupDialogOption, lOn ) INLINE Qt_QPageSetupDialog_setOption( ::pPtr, nPageSetupDialogOption, lOn ) - METHOD setOptions( nPageSetupDialogOptions ) INLINE Qt_QPageSetupDialog_setOptions( ::pPtr, nPageSetupDialogOptions ) + METHOD setOption( nOption, lOn ) INLINE Qt_QPageSetupDialog_setOption( ::pPtr, nOption, lOn ) + METHOD setOptions( nOptions ) INLINE Qt_QPageSetupDialog_setOptions( ::pPtr, nOptions ) METHOD setVisible( lVisible ) INLINE Qt_QPageSetupDialog_setVisible( ::pPtr, lVisible ) - METHOD testOption( nPageSetupDialogOption ) INLINE Qt_QPageSetupDialog_testOption( ::pPtr, nPageSetupDialogOption ) + METHOD testOption( nOption ) INLINE Qt_QPageSetupDialog_testOption( ::pPtr, nOption ) ENDCLASS @@ -77,6 +78,8 @@ CLASS QPageSetupDialog INHERIT QDialog METHOD New( pParent ) CLASS QPageSetupDialog + ::pParent := pParent + ::pPtr := Qt_QPageSetupDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQPaintDevice.prg b/harbour/contrib/hbqt/TQPaintDevice.prg index 377b222e02..6e253477f9 100644 --- a/harbour/contrib/hbqt/TQPaintDevice.prg +++ b/harbour/contrib/hbqt/TQPaintDevice.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QPaintDevice +CREATE CLASS QPaintDevice - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -81,6 +82,8 @@ CLASS QPaintDevice METHOD New( pParent ) CLASS QPaintDevice + ::pParent := pParent + ::pPtr := Qt_QPaintDevice( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQPaintEvent.prg b/harbour/contrib/hbqt/TQPaintEvent.prg new file mode 100644 index 0000000000..98e2c17859 --- /dev/null +++ b/harbour/contrib/hbqt/TQPaintEvent.prg @@ -0,0 +1,82 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPaintEvent INHERIT QEvent + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD rect() INLINE Qt_QPaintEvent_rect( ::pPtr ) + METHOD region() INLINE Qt_QPaintEvent_region( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPaintEvent + + ::pParent := pParent + + ::pPtr := Qt_QPaintEvent( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPainter.prg b/harbour/contrib/hbqt/TQPainter.prg index fbb2cadd94..e8acb5df05 100644 --- a/harbour/contrib/hbqt/TQPainter.prg +++ b/harbour/contrib/hbqt/TQPainter.prg @@ -53,94 +53,195 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QPainter +CREATE CLASS QPainter - DATA pPtr + VAR pParent + VAR pPtr METHOD New() + METHOD background() INLINE Qt_QPainter_background( ::pPtr ) METHOD backgroundMode() INLINE Qt_QPainter_backgroundMode( ::pPtr ) METHOD begin( pDevice ) INLINE Qt_QPainter_begin( ::pPtr, pDevice ) - METHOD boundingRect( aRectRectangle, nFlags, cText ) INLINE Qt_QPainter_boundingRect( ::pPtr, aRectRectangle, nFlags, cText ) - METHOD boundingRect_1( nX, nY, nW, nH, nFlags, cText ) INLINE Qt_QPainter_boundingRect_1( ::pPtr, nX, nY, nW, nH, nFlags, cText ) + METHOD boundingRect( pRectangle, nFlags, cText ) INLINE Qt_QPainter_boundingRect( ::pPtr, pRectangle, nFlags, cText ) + METHOD boundingRect_1( pRectangle, nFlags, cText ) INLINE Qt_QPainter_boundingRect_1( ::pPtr, pRectangle, nFlags, cText ) + METHOD boundingRect_2( nX, nY, nW, nH, nFlags, cText ) INLINE Qt_QPainter_boundingRect_2( ::pPtr, nX, nY, nW, nH, nFlags, cText ) + METHOD boundingRect_3( pRectangle, cText, pOption ) INLINE Qt_QPainter_boundingRect_3( ::pPtr, pRectangle, cText, pOption ) + METHOD brush() INLINE Qt_QPainter_brush( ::pPtr ) METHOD brushOrigin() INLINE Qt_QPainter_brushOrigin( ::pPtr ) + METHOD clipPath() INLINE Qt_QPainter_clipPath( ::pPtr ) + METHOD clipRegion() INLINE Qt_QPainter_clipRegion( ::pPtr ) + METHOD combinedMatrix() INLINE Qt_QPainter_combinedMatrix( ::pPtr ) + METHOD combinedTransform() INLINE Qt_QPainter_combinedTransform( ::pPtr ) METHOD compositionMode() INLINE Qt_QPainter_compositionMode( ::pPtr ) METHOD device() INLINE Qt_QPainter_device( ::pPtr ) - METHOD drawArc( aRectRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawArc( ::pPtr, aRectRectangle, nStartAngle, nSpanAngle ) - METHOD drawArc_1( nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawArc_1( ::pPtr, nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) - METHOD drawChord( aRectRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawChord( ::pPtr, aRectRectangle, nStartAngle, nSpanAngle ) - METHOD drawChord_1( nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawChord_1( ::pPtr, nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) + METHOD deviceMatrix() INLINE Qt_QPainter_deviceMatrix( ::pPtr ) + METHOD deviceTransform() INLINE Qt_QPainter_deviceTransform( ::pPtr ) + METHOD drawArc( pRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawArc( ::pPtr, pRectangle, nStartAngle, nSpanAngle ) + METHOD drawArc_1( pRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawArc_1( ::pPtr, pRectangle, nStartAngle, nSpanAngle ) + METHOD drawArc_2( nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawArc_2( ::pPtr, nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) + METHOD drawChord( pRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawChord( ::pPtr, pRectangle, nStartAngle, nSpanAngle ) + METHOD drawChord_1( pRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawChord_1( ::pPtr, pRectangle, nStartAngle, nSpanAngle ) + METHOD drawChord_2( nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawChord_2( ::pPtr, nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) METHOD drawConvexPolygon( pPoints, nPointCount ) INLINE Qt_QPainter_drawConvexPolygon( ::pPtr, pPoints, nPointCount ) - METHOD drawEllipse( aRectRectangle ) INLINE Qt_QPainter_drawEllipse( ::pPtr, aRectRectangle ) - METHOD drawEllipse_1( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_drawEllipse_1( ::pPtr, nX, nY, nWidth, nHeight ) - METHOD drawEllipse_2( aPointCenter, nRx, nRy ) INLINE Qt_QPainter_drawEllipse_2( ::pPtr, aPointCenter, nRx, nRy ) - METHOD drawLine( aPointP1, aPointP2 ) INLINE Qt_QPainter_drawLine( ::pPtr, aPointP1, aPointP2 ) - METHOD drawLine_1( nX1, nY1, nX2, nY2 ) INLINE Qt_QPainter_drawLine_1( ::pPtr, nX1, nY1, nX2, nY2 ) + METHOD drawConvexPolygon_1( pPoints, nPointCount ) INLINE Qt_QPainter_drawConvexPolygon_1( ::pPtr, pPoints, nPointCount ) + METHOD drawConvexPolygon_2( pPolygon ) INLINE Qt_QPainter_drawConvexPolygon_2( ::pPtr, pPolygon ) + METHOD drawConvexPolygon_3( pPolygon ) INLINE Qt_QPainter_drawConvexPolygon_3( ::pPtr, pPolygon ) + METHOD drawEllipse( pRectangle ) INLINE Qt_QPainter_drawEllipse( ::pPtr, pRectangle ) + METHOD drawEllipse_1( pRectangle ) INLINE Qt_QPainter_drawEllipse_1( ::pPtr, pRectangle ) + METHOD drawEllipse_2( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_drawEllipse_2( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD drawEllipse_3( pCenter, nRx, nRy ) INLINE Qt_QPainter_drawEllipse_3( ::pPtr, pCenter, nRx, nRy ) + METHOD drawEllipse_4( pCenter, nRx, nRy ) INLINE Qt_QPainter_drawEllipse_4( ::pPtr, pCenter, nRx, nRy ) + METHOD drawImage( pTarget, pImage, pSource, nFlags ) INLINE Qt_QPainter_drawImage( ::pPtr, pTarget, pImage, pSource, nFlags ) + METHOD drawImage_1( pTarget, pImage, pSource, nFlags ) INLINE Qt_QPainter_drawImage_1( ::pPtr, pTarget, pImage, pSource, nFlags ) + METHOD drawImage_2( pPoint, pImage ) INLINE Qt_QPainter_drawImage_2( ::pPtr, pPoint, pImage ) + METHOD drawImage_3( pPoint, pImage ) INLINE Qt_QPainter_drawImage_3( ::pPtr, pPoint, pImage ) + METHOD drawImage_4( pPoint, pImage, pSource, nFlags ) INLINE Qt_QPainter_drawImage_4( ::pPtr, pPoint, pImage, pSource, nFlags ) + METHOD drawImage_5( pPoint, pImage, pSource, nFlags ) INLINE Qt_QPainter_drawImage_5( ::pPtr, pPoint, pImage, pSource, nFlags ) + METHOD drawImage_6( pRectangle, pImage ) INLINE Qt_QPainter_drawImage_6( ::pPtr, pRectangle, pImage ) + METHOD drawImage_7( pRectangle, pImage ) INLINE Qt_QPainter_drawImage_7( ::pPtr, pRectangle, pImage ) + METHOD drawImage_8( nX, nY, pImage, nSx, nSy, nSw, nSh, nFlags ) INLINE Qt_QPainter_drawImage_8( ::pPtr, nX, nY, pImage, nSx, nSy, nSw, nSh, nFlags ) + METHOD drawLine( pLine ) INLINE Qt_QPainter_drawLine( ::pPtr, pLine ) + METHOD drawLine_1( pLine ) INLINE Qt_QPainter_drawLine_1( ::pPtr, pLine ) + METHOD drawLine_2( pP1, pP2 ) INLINE Qt_QPainter_drawLine_2( ::pPtr, pP1, pP2 ) + METHOD drawLine_3( pP1, pP2 ) INLINE Qt_QPainter_drawLine_3( ::pPtr, pP1, pP2 ) + METHOD drawLine_4( nX1, nY1, nX2, nY2 ) INLINE Qt_QPainter_drawLine_4( ::pPtr, nX1, nY1, nX2, nY2 ) METHOD drawLines( pLines, nLineCount ) INLINE Qt_QPainter_drawLines( ::pPtr, pLines, nLineCount ) METHOD drawLines_1( pLines, nLineCount ) INLINE Qt_QPainter_drawLines_1( ::pPtr, pLines, nLineCount ) METHOD drawLines_2( pPointPairs, nLineCount ) INLINE Qt_QPainter_drawLines_2( ::pPtr, pPointPairs, nLineCount ) - METHOD drawPie( aRectRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawPie( ::pPtr, aRectRectangle, nStartAngle, nSpanAngle ) - METHOD drawPie_1( nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawPie_1( ::pPtr, nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) - METHOD drawPoint( aPointPosition ) INLINE Qt_QPainter_drawPoint( ::pPtr, aPointPosition ) - METHOD drawPoint_1( nX, nY ) INLINE Qt_QPainter_drawPoint_1( ::pPtr, nX, nY ) + METHOD drawLines_3( pPointPairs, nLineCount ) INLINE Qt_QPainter_drawLines_3( ::pPtr, pPointPairs, nLineCount ) + METHOD drawPath( pPath ) INLINE Qt_QPainter_drawPath( ::pPtr, pPath ) + METHOD drawPicture( pPoint, pPicture ) INLINE Qt_QPainter_drawPicture( ::pPtr, pPoint, pPicture ) + METHOD drawPicture_1( pPoint, pPicture ) INLINE Qt_QPainter_drawPicture_1( ::pPtr, pPoint, pPicture ) + METHOD drawPicture_2( nX, nY, pPicture ) INLINE Qt_QPainter_drawPicture_2( ::pPtr, nX, nY, pPicture ) + METHOD drawPie( pRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawPie( ::pPtr, pRectangle, nStartAngle, nSpanAngle ) + METHOD drawPie_1( pRectangle, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawPie_1( ::pPtr, pRectangle, nStartAngle, nSpanAngle ) + METHOD drawPie_2( nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) INLINE Qt_QPainter_drawPie_2( ::pPtr, nX, nY, nWidth, nHeight, nStartAngle, nSpanAngle ) + METHOD drawPixmap( pTarget, pPixmap, pSource ) INLINE Qt_QPainter_drawPixmap( ::pPtr, pTarget, pPixmap, pSource ) + METHOD drawPixmap_1( pTarget, pPixmap, pSource ) INLINE Qt_QPainter_drawPixmap_1( ::pPtr, pTarget, pPixmap, pSource ) + METHOD drawPixmap_2( pPoint, pPixmap, pSource ) INLINE Qt_QPainter_drawPixmap_2( ::pPtr, pPoint, pPixmap, pSource ) + METHOD drawPixmap_3( pPoint, pPixmap, pSource ) INLINE Qt_QPainter_drawPixmap_3( ::pPtr, pPoint, pPixmap, pSource ) + METHOD drawPixmap_4( pPoint, pPixmap ) INLINE Qt_QPainter_drawPixmap_4( ::pPtr, pPoint, pPixmap ) + METHOD drawPixmap_5( pPoint, pPixmap ) INLINE Qt_QPainter_drawPixmap_5( ::pPtr, pPoint, pPixmap ) + METHOD drawPixmap_6( nX, nY, pPixmap ) INLINE Qt_QPainter_drawPixmap_6( ::pPtr, nX, nY, pPixmap ) + METHOD drawPixmap_7( pRectangle, pPixmap ) INLINE Qt_QPainter_drawPixmap_7( ::pPtr, pRectangle, pPixmap ) + METHOD drawPixmap_8( nX, nY, nWidth, nHeight, pPixmap ) INLINE Qt_QPainter_drawPixmap_8( ::pPtr, nX, nY, nWidth, nHeight, pPixmap ) + METHOD drawPixmap_9( nX, nY, nW, nH, pPixmap, nSx, nSy, nSw, nSh ) INLINE Qt_QPainter_drawPixmap_9( ::pPtr, nX, nY, nW, nH, pPixmap, nSx, nSy, nSw, nSh ) + METHOD drawPixmap_10( nX, nY, pPixmap, nSx, nSy, nSw, nSh ) INLINE Qt_QPainter_drawPixmap_10( ::pPtr, nX, nY, pPixmap, nSx, nSy, nSw, nSh ) + METHOD drawPoint( pPosition ) INLINE Qt_QPainter_drawPoint( ::pPtr, pPosition ) + METHOD drawPoint_1( pPosition ) INLINE Qt_QPainter_drawPoint_1( ::pPtr, pPosition ) + METHOD drawPoint_2( nX, nY ) INLINE Qt_QPainter_drawPoint_2( ::pPtr, nX, nY ) METHOD drawPoints( pPoints, nPointCount ) INLINE Qt_QPainter_drawPoints( ::pPtr, pPoints, nPointCount ) + METHOD drawPoints_1( pPoints, nPointCount ) INLINE Qt_QPainter_drawPoints_1( ::pPtr, pPoints, nPointCount ) + METHOD drawPoints_2( pPoints ) INLINE Qt_QPainter_drawPoints_2( ::pPtr, pPoints ) + METHOD drawPoints_3( pPoints ) INLINE Qt_QPainter_drawPoints_3( ::pPtr, pPoints ) METHOD drawPolygon( pPoints, nPointCount, nFillRule ) INLINE Qt_QPainter_drawPolygon( ::pPtr, pPoints, nPointCount, nFillRule ) + METHOD drawPolygon_1( pPoints, nPointCount, nFillRule ) INLINE Qt_QPainter_drawPolygon_1( ::pPtr, pPoints, nPointCount, nFillRule ) + METHOD drawPolygon_2( pPoints, nFillRule ) INLINE Qt_QPainter_drawPolygon_2( ::pPtr, pPoints, nFillRule ) + METHOD drawPolygon_3( pPoints, nFillRule ) INLINE Qt_QPainter_drawPolygon_3( ::pPtr, pPoints, nFillRule ) METHOD drawPolyline( pPoints, nPointCount ) INLINE Qt_QPainter_drawPolyline( ::pPtr, pPoints, nPointCount ) - METHOD drawRect( aRectRectangle ) INLINE Qt_QPainter_drawRect( ::pPtr, aRectRectangle ) - METHOD drawRect_1( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_drawRect_1( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD drawPolyline_1( pPoints, nPointCount ) INLINE Qt_QPainter_drawPolyline_1( ::pPtr, pPoints, nPointCount ) + METHOD drawPolyline_2( pPoints ) INLINE Qt_QPainter_drawPolyline_2( ::pPtr, pPoints ) + METHOD drawPolyline_3( pPoints ) INLINE Qt_QPainter_drawPolyline_3( ::pPtr, pPoints ) + METHOD drawRect( pRectangle ) INLINE Qt_QPainter_drawRect( ::pPtr, pRectangle ) + METHOD drawRect_1( pRectangle ) INLINE Qt_QPainter_drawRect_1( ::pPtr, pRectangle ) + METHOD drawRect_2( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_drawRect_2( ::pPtr, nX, nY, nWidth, nHeight ) METHOD drawRects( pRectangles, nRectCount ) INLINE Qt_QPainter_drawRects( ::pPtr, pRectangles, nRectCount ) - METHOD drawRoundedRect( aRectRect, nXRadius, nYRadius, nMode ) INLINE Qt_QPainter_drawRoundedRect( ::pPtr, aRectRect, nXRadius, nYRadius, nMode ) - METHOD drawRoundedRect_1( nX, nY, nW, nH, nXRadius, nYRadius, nMode ) INLINE Qt_QPainter_drawRoundedRect_1( ::pPtr, nX, nY, nW, nH, nXRadius, nYRadius, nMode ) - METHOD drawText( aPointPosition, cText ) INLINE Qt_QPainter_drawText( ::pPtr, aPointPosition, cText ) - METHOD drawText_1( nX, nY, cText ) INLINE Qt_QPainter_drawText_1( ::pPtr, nX, nY, cText ) + METHOD drawRects_1( pRectangles, nRectCount ) INLINE Qt_QPainter_drawRects_1( ::pPtr, pRectangles, nRectCount ) + METHOD drawRoundedRect( pRect, nXRadius, nYRadius, nMode ) INLINE Qt_QPainter_drawRoundedRect( ::pPtr, pRect, nXRadius, nYRadius, nMode ) + METHOD drawRoundedRect_1( pRect, nXRadius, nYRadius, nMode ) INLINE Qt_QPainter_drawRoundedRect_1( ::pPtr, pRect, nXRadius, nYRadius, nMode ) + METHOD drawRoundedRect_2( nX, nY, nW, nH, nXRadius, nYRadius, nMode ) INLINE Qt_QPainter_drawRoundedRect_2( ::pPtr, nX, nY, nW, nH, nXRadius, nYRadius, nMode ) + METHOD drawText( pPosition, cText ) INLINE Qt_QPainter_drawText( ::pPtr, pPosition, cText ) + METHOD drawText_1( pPosition, cText ) INLINE Qt_QPainter_drawText_1( ::pPtr, pPosition, cText ) + METHOD drawText_2( pRectangle, nFlags, cText, pBoundingRect ) INLINE Qt_QPainter_drawText_2( ::pPtr, pRectangle, nFlags, cText, pBoundingRect ) + METHOD drawText_3( pRectangle, nFlags, cText, pBoundingRect ) INLINE Qt_QPainter_drawText_3( ::pPtr, pRectangle, nFlags, cText, pBoundingRect ) + METHOD drawText_4( nX, nY, cText ) INLINE Qt_QPainter_drawText_4( ::pPtr, nX, nY, cText ) + METHOD drawText_5( nX, nY, nWidth, nHeight, nFlags, cText, pBoundingRect ) INLINE Qt_QPainter_drawText_5( ::pPtr, nX, nY, nWidth, nHeight, nFlags, cText, pBoundingRect ) + METHOD drawText_6( pRectangle, cText, pOption ) INLINE Qt_QPainter_drawText_6( ::pPtr, pRectangle, cText, pOption ) + METHOD drawTiledPixmap( pRectangle, pPixmap, pPosition ) INLINE Qt_QPainter_drawTiledPixmap( ::pPtr, pRectangle, pPixmap, pPosition ) + METHOD drawTiledPixmap_1( pRectangle, pPixmap, pPosition ) INLINE Qt_QPainter_drawTiledPixmap_1( ::pPtr, pRectangle, pPixmap, pPosition ) + METHOD drawTiledPixmap_2( nX, nY, nWidth, nHeight, pPixmap, nSx, nSy ) INLINE Qt_QPainter_drawTiledPixmap_2( ::pPtr, nX, nY, nWidth, nHeight, pPixmap, nSx, nSy ) METHOD end() INLINE Qt_QPainter_end( ::pPtr ) - METHOD eraseRect( aRectRectangle ) INLINE Qt_QPainter_eraseRect( ::pPtr, aRectRectangle ) - METHOD eraseRect_1( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_eraseRect_1( ::pPtr, nX, nY, nWidth, nHeight ) - METHOD fillRect( nX, nY, nWidth, nHeight, nStyle ) INLINE Qt_QPainter_fillRect( ::pPtr, nX, nY, nWidth, nHeight, nStyle ) - METHOD fillRect_1( aRectRectangle, nStyle ) INLINE Qt_QPainter_fillRect_1( ::pPtr, aRectRectangle, nStyle ) - METHOD fillRect_2( nX, nY, nWidth, nHeight, nColor ) INLINE Qt_QPainter_fillRect_2( ::pPtr, nX, nY, nWidth, nHeight, nColor ) - METHOD fillRect_3( aRectRectangle, nColor ) INLINE Qt_QPainter_fillRect_3( ::pPtr, aRectRectangle, nColor ) + METHOD eraseRect( pRectangle ) INLINE Qt_QPainter_eraseRect( ::pPtr, pRectangle ) + METHOD eraseRect_1( pRectangle ) INLINE Qt_QPainter_eraseRect_1( ::pPtr, pRectangle ) + METHOD eraseRect_2( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_eraseRect_2( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD fillPath( pPath, pBrush ) INLINE Qt_QPainter_fillPath( ::pPtr, pPath, pBrush ) + METHOD fillRect( pRectangle, pBrush ) INLINE Qt_QPainter_fillRect( ::pPtr, pRectangle, pBrush ) + METHOD fillRect_1( nX, nY, nWidth, nHeight, nStyle ) INLINE Qt_QPainter_fillRect_1( ::pPtr, nX, nY, nWidth, nHeight, nStyle ) + METHOD fillRect_2( pRectangle, nStyle ) INLINE Qt_QPainter_fillRect_2( ::pPtr, pRectangle, nStyle ) + METHOD fillRect_3( pRectangle, nStyle ) INLINE Qt_QPainter_fillRect_3( ::pPtr, pRectangle, nStyle ) + METHOD fillRect_4( pRectangle, pBrush ) INLINE Qt_QPainter_fillRect_4( ::pPtr, pRectangle, pBrush ) + METHOD fillRect_5( pRectangle, pColor ) INLINE Qt_QPainter_fillRect_5( ::pPtr, pRectangle, pColor ) + METHOD fillRect_6( pRectangle, pColor ) INLINE Qt_QPainter_fillRect_6( ::pPtr, pRectangle, pColor ) + METHOD fillRect_7( nX, nY, nWidth, nHeight, pBrush ) INLINE Qt_QPainter_fillRect_7( ::pPtr, nX, nY, nWidth, nHeight, pBrush ) + METHOD fillRect_8( nX, nY, nWidth, nHeight, pColor ) INLINE Qt_QPainter_fillRect_8( ::pPtr, nX, nY, nWidth, nHeight, pColor ) + METHOD fillRect_9( nX, nY, nWidth, nHeight, nColor ) INLINE Qt_QPainter_fillRect_9( ::pPtr, nX, nY, nWidth, nHeight, nColor ) + METHOD fillRect_10( pRectangle, nColor ) INLINE Qt_QPainter_fillRect_10( ::pPtr, pRectangle, nColor ) + METHOD fillRect_11( pRectangle, nColor ) INLINE Qt_QPainter_fillRect_11( ::pPtr, pRectangle, nColor ) + METHOD font() INLINE Qt_QPainter_font( ::pPtr ) + METHOD fontInfo() INLINE Qt_QPainter_fontInfo( ::pPtr ) + METHOD fontMetrics() INLINE Qt_QPainter_fontMetrics( ::pPtr ) METHOD hasClipping() INLINE Qt_QPainter_hasClipping( ::pPtr ) METHOD initFrom( pWidget ) INLINE Qt_QPainter_initFrom( ::pPtr, pWidget ) METHOD isActive() INLINE Qt_QPainter_isActive( ::pPtr ) METHOD layoutDirection() INLINE Qt_QPainter_layoutDirection( ::pPtr ) METHOD opacity() INLINE Qt_QPainter_opacity( ::pPtr ) METHOD paintEngine() INLINE Qt_QPainter_paintEngine( ::pPtr ) + METHOD pen() INLINE Qt_QPainter_pen( ::pPtr ) + METHOD renderHints() INLINE Qt_QPainter_renderHints( ::pPtr ) METHOD resetMatrix() INLINE Qt_QPainter_resetMatrix( ::pPtr ) METHOD resetTransform() INLINE Qt_QPainter_resetTransform( ::pPtr ) METHOD restore() INLINE Qt_QPainter_restore( ::pPtr ) METHOD rotate( nAngle ) INLINE Qt_QPainter_rotate( ::pPtr, nAngle ) METHOD save() INLINE Qt_QPainter_save( ::pPtr ) METHOD scale( nSx, nSy ) INLINE Qt_QPainter_scale( ::pPtr, nSx, nSy ) + METHOD setBackground( pBrush ) INLINE Qt_QPainter_setBackground( ::pPtr, pBrush ) METHOD setBackgroundMode( nMode ) INLINE Qt_QPainter_setBackgroundMode( ::pPtr, nMode ) - METHOD setBrush( nStyle ) INLINE Qt_QPainter_setBrush( ::pPtr, nStyle ) - METHOD setBrushOrigin( aPointPosition ) INLINE Qt_QPainter_setBrushOrigin( ::pPtr, aPointPosition ) - METHOD setBrushOrigin_1( nX, nY ) INLINE Qt_QPainter_setBrushOrigin_1( ::pPtr, nX, nY ) - METHOD setClipRect( nX, nY, nWidth, nHeight, nOperation ) INLINE Qt_QPainter_setClipRect( ::pPtr, nX, nY, nWidth, nHeight, nOperation ) - METHOD setClipRect_1( aRectRectangle, nOperation ) INLINE Qt_QPainter_setClipRect_1( ::pPtr, aRectRectangle, nOperation ) + METHOD setBrush( pBrush ) INLINE Qt_QPainter_setBrush( ::pPtr, pBrush ) + METHOD setBrush_1( nStyle ) INLINE Qt_QPainter_setBrush_1( ::pPtr, nStyle ) + METHOD setBrushOrigin( pPosition ) INLINE Qt_QPainter_setBrushOrigin( ::pPtr, pPosition ) + METHOD setBrushOrigin_1( pPosition ) INLINE Qt_QPainter_setBrushOrigin_1( ::pPtr, pPosition ) + METHOD setBrushOrigin_2( nX, nY ) INLINE Qt_QPainter_setBrushOrigin_2( ::pPtr, nX, nY ) + METHOD setClipPath( pPath, nOperation ) INLINE Qt_QPainter_setClipPath( ::pPtr, pPath, nOperation ) + METHOD setClipRect( pRectangle, nOperation ) INLINE Qt_QPainter_setClipRect( ::pPtr, pRectangle, nOperation ) + METHOD setClipRect_1( nX, nY, nWidth, nHeight, nOperation ) INLINE Qt_QPainter_setClipRect_1( ::pPtr, nX, nY, nWidth, nHeight, nOperation ) + METHOD setClipRect_2( pRectangle, nOperation ) INLINE Qt_QPainter_setClipRect_2( ::pPtr, pRectangle, nOperation ) + METHOD setClipRegion( pRegion, nOperation ) INLINE Qt_QPainter_setClipRegion( ::pPtr, pRegion, nOperation ) METHOD setClipping( lEnable ) INLINE Qt_QPainter_setClipping( ::pPtr, lEnable ) - METHOD setCompositionMode( nCompositionMode ) INLINE Qt_QPainter_setCompositionMode( ::pPtr, nCompositionMode ) + METHOD setCompositionMode( nMode ) INLINE Qt_QPainter_setCompositionMode( ::pPtr, nMode ) + METHOD setFont( pFont ) INLINE Qt_QPainter_setFont( ::pPtr, pFont ) METHOD setLayoutDirection( nDirection ) INLINE Qt_QPainter_setLayoutDirection( ::pPtr, nDirection ) METHOD setOpacity( nOpacity ) INLINE Qt_QPainter_setOpacity( ::pPtr, nOpacity ) - METHOD setPen( nStyle ) INLINE Qt_QPainter_setPen( ::pPtr, nStyle ) - METHOD setRenderHint( nRenderHint, lOn ) INLINE Qt_QPainter_setRenderHint( ::pPtr, nRenderHint, lOn ) + METHOD setPen( pPen ) INLINE Qt_QPainter_setPen( ::pPtr, pPen ) + METHOD setPen_1( pColor ) INLINE Qt_QPainter_setPen_1( ::pPtr, pColor ) + METHOD setPen_2( nStyle ) INLINE Qt_QPainter_setPen_2( ::pPtr, nStyle ) + METHOD setRenderHint( nHint, lOn ) INLINE Qt_QPainter_setRenderHint( ::pPtr, nHint, lOn ) + METHOD setRenderHints( nHints, lOn ) INLINE Qt_QPainter_setRenderHints( ::pPtr, nHints, lOn ) + METHOD setTransform( pTransform, lCombine ) INLINE Qt_QPainter_setTransform( ::pPtr, pTransform, lCombine ) METHOD setViewTransformEnabled( lEnable ) INLINE Qt_QPainter_setViewTransformEnabled( ::pPtr, lEnable ) - METHOD setViewport( aRectRectangle ) INLINE Qt_QPainter_setViewport( ::pPtr, aRectRectangle ) + METHOD setViewport( pRectangle ) INLINE Qt_QPainter_setViewport( ::pPtr, pRectangle ) METHOD setViewport_1( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_setViewport_1( ::pPtr, nX, nY, nWidth, nHeight ) - METHOD setWindow( aRectRectangle ) INLINE Qt_QPainter_setWindow( ::pPtr, aRectRectangle ) + METHOD setWindow( pRectangle ) INLINE Qt_QPainter_setWindow( ::pPtr, pRectangle ) METHOD setWindow_1( nX, nY, nWidth, nHeight ) INLINE Qt_QPainter_setWindow_1( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD setWorldMatrix( pMatrix, lCombine ) INLINE Qt_QPainter_setWorldMatrix( ::pPtr, pMatrix, lCombine ) METHOD setWorldMatrixEnabled( lEnable ) INLINE Qt_QPainter_setWorldMatrixEnabled( ::pPtr, lEnable ) + METHOD setWorldTransform( pMatrix, lCombine ) INLINE Qt_QPainter_setWorldTransform( ::pPtr, pMatrix, lCombine ) METHOD shear( nSh, nSv ) INLINE Qt_QPainter_shear( ::pPtr, nSh, nSv ) - METHOD testRenderHint( nRenderHint ) INLINE Qt_QPainter_testRenderHint( ::pPtr, nRenderHint ) - METHOD translate( aPointOffset ) INLINE Qt_QPainter_translate( ::pPtr, aPointOffset ) - METHOD translate_1( nDx, nDy ) INLINE Qt_QPainter_translate_1( ::pPtr, nDx, nDy ) + METHOD strokePath( pPath, pPen ) INLINE Qt_QPainter_strokePath( ::pPtr, pPath, pPen ) + METHOD testRenderHint( nHint ) INLINE Qt_QPainter_testRenderHint( ::pPtr, nHint ) + METHOD transform() INLINE Qt_QPainter_transform( ::pPtr ) + METHOD translate( pOffset ) INLINE Qt_QPainter_translate( ::pPtr, pOffset ) + METHOD translate_1( pOffset ) INLINE Qt_QPainter_translate_1( ::pPtr, pOffset ) + METHOD translate_2( nDx, nDy ) INLINE Qt_QPainter_translate_2( ::pPtr, nDx, nDy ) METHOD viewTransformEnabled() INLINE Qt_QPainter_viewTransformEnabled( ::pPtr ) METHOD viewport() INLINE Qt_QPainter_viewport( ::pPtr ) METHOD window() INLINE Qt_QPainter_window( ::pPtr ) + METHOD worldMatrix() INLINE Qt_QPainter_worldMatrix( ::pPtr ) METHOD worldMatrixEnabled() INLINE Qt_QPainter_worldMatrixEnabled( ::pPtr ) + METHOD worldTransform() INLINE Qt_QPainter_worldTransform( ::pPtr ) ENDCLASS @@ -148,6 +249,8 @@ CLASS QPainter METHOD New( pParent ) CLASS QPainter + ::pParent := pParent + ::pPtr := Qt_QPainter( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQPen.prg b/harbour/contrib/hbqt/TQPen.prg new file mode 100644 index 0000000000..33cdf7c31c --- /dev/null +++ b/harbour/contrib/hbqt/TQPen.prg @@ -0,0 +1,101 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPen + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD brush() INLINE Qt_QPen_brush( ::pPtr ) + METHOD capStyle() INLINE Qt_QPen_capStyle( ::pPtr ) + METHOD color() INLINE Qt_QPen_color( ::pPtr ) + METHOD dashOffset() INLINE Qt_QPen_dashOffset( ::pPtr ) + METHOD isCosmetic() INLINE Qt_QPen_isCosmetic( ::pPtr ) + METHOD isSolid() INLINE Qt_QPen_isSolid( ::pPtr ) + METHOD joinStyle() INLINE Qt_QPen_joinStyle( ::pPtr ) + METHOD miterLimit() INLINE Qt_QPen_miterLimit( ::pPtr ) + METHOD setBrush( pBrush ) INLINE Qt_QPen_setBrush( ::pPtr, pBrush ) + METHOD setCapStyle( nStyle ) INLINE Qt_QPen_setCapStyle( ::pPtr, nStyle ) + METHOD setColor( pColor ) INLINE Qt_QPen_setColor( ::pPtr, pColor ) + METHOD setCosmetic( lCosmetic ) INLINE Qt_QPen_setCosmetic( ::pPtr, lCosmetic ) + METHOD setDashOffset( nOffset ) INLINE Qt_QPen_setDashOffset( ::pPtr, nOffset ) + METHOD setJoinStyle( nStyle ) INLINE Qt_QPen_setJoinStyle( ::pPtr, nStyle ) + METHOD setMiterLimit( nLimit ) INLINE Qt_QPen_setMiterLimit( ::pPtr, nLimit ) + METHOD setStyle( nStyle ) INLINE Qt_QPen_setStyle( ::pPtr, nStyle ) + METHOD setWidth( nWidth ) INLINE Qt_QPen_setWidth( ::pPtr, nWidth ) + METHOD setWidthF( nWidth ) INLINE Qt_QPen_setWidthF( ::pPtr, nWidth ) + METHOD style() INLINE Qt_QPen_style( ::pPtr ) + METHOD width() INLINE Qt_QPen_width( ::pPtr ) + METHOD widthF() INLINE Qt_QPen_widthF( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPen + + ::pParent := pParent + + ::pPtr := Qt_QPen( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPixmap.prg b/harbour/contrib/hbqt/TQPixmap.prg new file mode 100644 index 0000000000..047c4e93e6 --- /dev/null +++ b/harbour/contrib/hbqt/TQPixmap.prg @@ -0,0 +1,115 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPixmap INHERIT QPaintDevice + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD alphaChannel() INLINE Qt_QPixmap_alphaChannel( ::pPtr ) + METHOD cacheKey() INLINE Qt_QPixmap_cacheKey( ::pPtr ) + METHOD copy( pRectangle ) INLINE Qt_QPixmap_copy( ::pPtr, pRectangle ) + METHOD copy_1( nX, nY, nWidth, nHeight ) INLINE Qt_QPixmap_copy_1( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD createHeuristicMask( lClipTight ) INLINE Qt_QPixmap_createHeuristicMask( ::pPtr, lClipTight ) + METHOD createMaskFromColor( pMaskColor, nMode ) INLINE Qt_QPixmap_createMaskFromColor( ::pPtr, pMaskColor, nMode ) + METHOD createMaskFromColor_1( pMaskColor ) INLINE Qt_QPixmap_createMaskFromColor_1( ::pPtr, pMaskColor ) + METHOD depth() INLINE Qt_QPixmap_depth( ::pPtr ) + METHOD detach() INLINE Qt_QPixmap_detach( ::pPtr ) + METHOD fill( pColor ) INLINE Qt_QPixmap_fill( ::pPtr, pColor ) + METHOD fill_1( pWidget, pOffset ) INLINE Qt_QPixmap_fill_1( ::pPtr, pWidget, pOffset ) + METHOD fill_2( pWidget, nX, nY ) INLINE Qt_QPixmap_fill_2( ::pPtr, pWidget, nX, nY ) + METHOD hasAlpha() INLINE Qt_QPixmap_hasAlpha( ::pPtr ) + METHOD hasAlphaChannel() INLINE Qt_QPixmap_hasAlphaChannel( ::pPtr ) + METHOD height() INLINE Qt_QPixmap_height( ::pPtr ) + METHOD isNull() INLINE Qt_QPixmap_isNull( ::pPtr ) + METHOD isQBitmap() INLINE Qt_QPixmap_isQBitmap( ::pPtr ) + METHOD load( cFileName, pFormat, nFlags ) INLINE Qt_QPixmap_load( ::pPtr, cFileName, pFormat, nFlags ) + METHOD loadFromData( pData, pFormat, nFlags ) INLINE Qt_QPixmap_loadFromData( ::pPtr, pData, pFormat, nFlags ) + METHOD mask() INLINE Qt_QPixmap_mask( ::pPtr ) + METHOD rect() INLINE Qt_QPixmap_rect( ::pPtr ) + METHOD save( cFileName, pFormat, nQuality ) INLINE Qt_QPixmap_save( ::pPtr, cFileName, pFormat, nQuality ) + METHOD save_1( pDevice, pFormat, nQuality ) INLINE Qt_QPixmap_save_1( ::pPtr, pDevice, pFormat, nQuality ) + METHOD scaled( pSize, nAspectRatioMode, nTransformMode ) INLINE Qt_QPixmap_scaled( ::pPtr, pSize, nAspectRatioMode, nTransformMode ) + METHOD scaled_1( nWidth, nHeight, nAspectRatioMode, nTransformMode ) INLINE Qt_QPixmap_scaled_1( ::pPtr, nWidth, nHeight, nAspectRatioMode, nTransformMode ) + METHOD scaledToHeight( nHeight, nMode ) INLINE Qt_QPixmap_scaledToHeight( ::pPtr, nHeight, nMode ) + METHOD scaledToWidth( nWidth, nMode ) INLINE Qt_QPixmap_scaledToWidth( ::pPtr, nWidth, nMode ) + METHOD setAlphaChannel( pAlphaChannel ) INLINE Qt_QPixmap_setAlphaChannel( ::pPtr, pAlphaChannel ) + METHOD setMask( pMask ) INLINE Qt_QPixmap_setMask( ::pPtr, pMask ) + METHOD size() INLINE Qt_QPixmap_size( ::pPtr ) + METHOD toImage() INLINE Qt_QPixmap_toImage( ::pPtr ) + METHOD toWinHBITMAP( nFormat ) INLINE Qt_QPixmap_toWinHBITMAP( ::pPtr, nFormat ) + METHOD transformed( pTransform, nMode ) INLINE Qt_QPixmap_transformed( ::pPtr, pTransform, nMode ) + METHOD transformed_1( pMatrix, nMode ) INLINE Qt_QPixmap_transformed_1( ::pPtr, pMatrix, nMode ) + METHOD width() INLINE Qt_QPixmap_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPixmap + + ::pParent := pParent + + ::pPtr := Qt_QPixmap( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPoint.prg b/harbour/contrib/hbqt/TQPoint.prg new file mode 100644 index 0000000000..724384cfa0 --- /dev/null +++ b/harbour/contrib/hbqt/TQPoint.prg @@ -0,0 +1,88 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPoint + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD isNull() INLINE Qt_QPoint_isNull( ::pPtr ) + METHOD manhattanLength() INLINE Qt_QPoint_manhattanLength( ::pPtr ) + METHOD rx() INLINE Qt_QPoint_rx( ::pPtr ) + METHOD ry() INLINE Qt_QPoint_ry( ::pPtr ) + METHOD setX( nX ) INLINE Qt_QPoint_setX( ::pPtr, nX ) + METHOD setY( nY ) INLINE Qt_QPoint_setY( ::pPtr, nY ) + METHOD x() INLINE Qt_QPoint_x( ::pPtr ) + METHOD y() INLINE Qt_QPoint_y( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPoint + + ::pParent := pParent + + ::pPtr := Qt_QPoint( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPointF.prg b/harbour/contrib/hbqt/TQPointF.prg new file mode 100644 index 0000000000..e8bdafb92d --- /dev/null +++ b/harbour/contrib/hbqt/TQPointF.prg @@ -0,0 +1,88 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QPointF + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD isNull() INLINE Qt_QPointF_isNull( ::pPtr ) + METHOD rx() INLINE Qt_QPointF_rx( ::pPtr ) + METHOD ry() INLINE Qt_QPointF_ry( ::pPtr ) + METHOD setX( nX ) INLINE Qt_QPointF_setX( ::pPtr, nX ) + METHOD setY( nY ) INLINE Qt_QPointF_setY( ::pPtr, nY ) + METHOD toPoint() INLINE Qt_QPointF_toPoint( ::pPtr ) + METHOD x() INLINE Qt_QPointF_x( ::pPtr ) + METHOD y() INLINE Qt_QPointF_y( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QPointF + + ::pParent := pParent + + ::pPtr := Qt_QPointF( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQPrintDialog.prg b/harbour/contrib/hbqt/TQPrintDialog.prg index c28b51da1b..1e088f3727 100644 --- a/harbour/contrib/hbqt/TQPrintDialog.prg +++ b/harbour/contrib/hbqt/TQPrintDialog.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QPrintDialog INHERIT QAbstractPrintDialog +CREATE CLASS QPrintDialog INHERIT QAbstractPrintDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -67,10 +68,10 @@ CLASS QPrintDialog INHERIT QAbstractPrintDialog METHOD options() INLINE Qt_QPrintDialog_options( ::pPtr ) METHOD printer() INLINE Qt_QPrintDialog_printer( ::pPtr ) METHOD printer_1() INLINE Qt_QPrintDialog_printer_1( ::pPtr ) - METHOD setOption( nPrintDialogOption, lOn ) INLINE Qt_QPrintDialog_setOption( ::pPtr, nPrintDialogOption, lOn ) - METHOD setOptions( nPrintDialogOptions ) INLINE Qt_QPrintDialog_setOptions( ::pPtr, nPrintDialogOptions ) + METHOD setOption( nOption, lOn ) INLINE Qt_QPrintDialog_setOption( ::pPtr, nOption, lOn ) + METHOD setOptions( nOptions ) INLINE Qt_QPrintDialog_setOptions( ::pPtr, nOptions ) METHOD setVisible( lVisible ) INLINE Qt_QPrintDialog_setVisible( ::pPtr, lVisible ) - METHOD testOption( nPrintDialogOption ) INLINE Qt_QPrintDialog_testOption( ::pPtr, nPrintDialogOption ) + METHOD testOption( nOption ) INLINE Qt_QPrintDialog_testOption( ::pPtr, nOption ) ENDCLASS @@ -78,6 +79,8 @@ CLASS QPrintDialog INHERIT QAbstractPrintDialog METHOD New( pParent ) CLASS QPrintDialog + ::pParent := pParent + ::pPtr := Qt_QPrintDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQPrintPreviewDialog.prg b/harbour/contrib/hbqt/TQPrintPreviewDialog.prg index e36b31c02c..4e03fb4baa 100644 --- a/harbour/contrib/hbqt/TQPrintPreviewDialog.prg +++ b/harbour/contrib/hbqt/TQPrintPreviewDialog.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QPrintPreviewDialog INHERIT QDialog +CREATE CLASS QPrintPreviewDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -71,6 +72,8 @@ CLASS QPrintPreviewDialog INHERIT QDialog METHOD New( pParent ) CLASS QPrintPreviewDialog + ::pParent := pParent + ::pPtr := Qt_QPrintPreviewDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQProgressBar.prg b/harbour/contrib/hbqt/TQProgressBar.prg index 0a63d8f8c2..8ee9de1c95 100644 --- a/harbour/contrib/hbqt/TQProgressBar.prg +++ b/harbour/contrib/hbqt/TQProgressBar.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QProgressBar INHERIT QWidget +CREATE CLASS QProgressBar INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -77,6 +78,12 @@ CLASS QProgressBar INHERIT QWidget METHOD text() INLINE Qt_QProgressBar_text( ::pPtr ) METHOD textDirection() INLINE Qt_QProgressBar_textDirection( ::pPtr ) METHOD value() INLINE Qt_QProgressBar_value( ::pPtr ) + METHOD reset() INLINE Qt_QProgressBar_reset( ::pPtr ) + METHOD setMaximum( nMaximum ) INLINE Qt_QProgressBar_setMaximum( ::pPtr, nMaximum ) + METHOD setMinimum( nMinimum ) INLINE Qt_QProgressBar_setMinimum( ::pPtr, nMinimum ) + METHOD setOrientation( nQt_Orientation ) INLINE Qt_QProgressBar_setOrientation( ::pPtr, nQt_Orientation ) + METHOD setRange( nMinimum, nMaximum ) INLINE Qt_QProgressBar_setRange( ::pPtr, nMinimum, nMaximum ) + METHOD setValue( nValue ) INLINE Qt_QProgressBar_setValue( ::pPtr, nValue ) ENDCLASS @@ -84,6 +91,8 @@ CLASS QProgressBar INHERIT QWidget METHOD New( pParent ) CLASS QProgressBar + ::pParent := pParent + ::pPtr := Qt_QProgressBar( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQProgressDialog.prg b/harbour/contrib/hbqt/TQProgressDialog.prg index 61ab07358d..ab3ea2f445 100644 --- a/harbour/contrib/hbqt/TQProgressDialog.prg +++ b/harbour/contrib/hbqt/TQProgressDialog.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QProgressDialog INHERIT QDialog +CREATE CLASS QProgressDialog INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -93,6 +94,8 @@ CLASS QProgressDialog INHERIT QDialog METHOD New( pParent ) CLASS QProgressDialog + ::pParent := pParent + ::pPtr := Qt_QProgressDialog( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQPushButton.prg b/harbour/contrib/hbqt/TQPushButton.prg index 794942e9de..9f5bbcc390 100644 --- a/harbour/contrib/hbqt/TQPushButton.prg +++ b/harbour/contrib/hbqt/TQPushButton.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QPushButton INHERIT QAbstractButton +CREATE CLASS QPushButton INHERIT QAbstractButton - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -70,6 +71,7 @@ CLASS QPushButton INHERIT QAbstractButton METHOD setDefault( lBool ) INLINE Qt_QPushButton_setDefault( ::pPtr, lBool ) METHOD setFlat( lBool ) INLINE Qt_QPushButton_setFlat( ::pPtr, lBool ) METHOD setMenu( pMenu ) INLINE Qt_QPushButton_setMenu( ::pPtr, pMenu ) + METHOD showMenu() INLINE Qt_QPushButton_showMenu( ::pPtr ) ENDCLASS @@ -77,6 +79,8 @@ CLASS QPushButton INHERIT QAbstractButton METHOD New( pParent ) CLASS QPushButton + ::pParent := pParent + ::pPtr := Qt_QPushButton( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQRadioButton.prg b/harbour/contrib/hbqt/TQRadioButton.prg index 986b2f32f4..3c4e9abab7 100644 --- a/harbour/contrib/hbqt/TQRadioButton.prg +++ b/harbour/contrib/hbqt/TQRadioButton.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QRadioButton INHERIT QAbstractButton +CREATE CLASS QRadioButton INHERIT QAbstractButton - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QRadioButton INHERIT QAbstractButton METHOD New( pParent ) CLASS QRadioButton + ::pParent := pParent + ::pPtr := Qt_QRadioButton( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQRect.prg b/harbour/contrib/hbqt/TQRect.prg new file mode 100644 index 0000000000..663d7fe78a --- /dev/null +++ b/harbour/contrib/hbqt/TQRect.prg @@ -0,0 +1,139 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QRect + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD adjust( nDx1, nDy1, nDx2, nDy2 ) INLINE Qt_QRect_adjust( ::pPtr, nDx1, nDy1, nDx2, nDy2 ) + METHOD adjusted( nDx1, nDy1, nDx2, nDy2 ) INLINE Qt_QRect_adjusted( ::pPtr, nDx1, nDy1, nDx2, nDy2 ) + METHOD bottom() INLINE Qt_QRect_bottom( ::pPtr ) + METHOD bottomLeft() INLINE Qt_QRect_bottomLeft( ::pPtr ) + METHOD bottomRight() INLINE Qt_QRect_bottomRight( ::pPtr ) + METHOD center() INLINE Qt_QRect_center( ::pPtr ) + METHOD contains( pPoint, lProper ) INLINE Qt_QRect_contains( ::pPtr, pPoint, lProper ) + METHOD contains_1( nX, nY, lProper ) INLINE Qt_QRect_contains_1( ::pPtr, nX, nY, lProper ) + METHOD contains_2( nX, nY ) INLINE Qt_QRect_contains_2( ::pPtr, nX, nY ) + METHOD contains_3( pRectangle, lProper ) INLINE Qt_QRect_contains_3( ::pPtr, pRectangle, lProper ) + METHOD getCoords( nX1, nY1, nX2, nY2 ) INLINE Qt_QRect_getCoords( ::pPtr, nX1, nY1, nX2, nY2 ) + METHOD getRect( nX, nY, nWidth, nHeight ) INLINE Qt_QRect_getRect( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD height() INLINE Qt_QRect_height( ::pPtr ) + METHOD intersected( pRectangle ) INLINE Qt_QRect_intersected( ::pPtr, pRectangle ) + METHOD intersects( pRectangle ) INLINE Qt_QRect_intersects( ::pPtr, pRectangle ) + METHOD isEmpty() INLINE Qt_QRect_isEmpty( ::pPtr ) + METHOD isNull() INLINE Qt_QRect_isNull( ::pPtr ) + METHOD isValid() INLINE Qt_QRect_isValid( ::pPtr ) + METHOD left() INLINE Qt_QRect_left( ::pPtr ) + METHOD moveBottom( nY ) INLINE Qt_QRect_moveBottom( ::pPtr, nY ) + METHOD moveBottomLeft( pPosition ) INLINE Qt_QRect_moveBottomLeft( ::pPtr, pPosition ) + METHOD moveBottomRight( pPosition ) INLINE Qt_QRect_moveBottomRight( ::pPtr, pPosition ) + METHOD moveCenter( pPosition ) INLINE Qt_QRect_moveCenter( ::pPtr, pPosition ) + METHOD moveLeft( nX ) INLINE Qt_QRect_moveLeft( ::pPtr, nX ) + METHOD moveRight( nX ) INLINE Qt_QRect_moveRight( ::pPtr, nX ) + METHOD moveTo( nX, nY ) INLINE Qt_QRect_moveTo( ::pPtr, nX, nY ) + METHOD moveTo_1( pPosition ) INLINE Qt_QRect_moveTo_1( ::pPtr, pPosition ) + METHOD moveTop( nY ) INLINE Qt_QRect_moveTop( ::pPtr, nY ) + METHOD moveTopLeft( pPosition ) INLINE Qt_QRect_moveTopLeft( ::pPtr, pPosition ) + METHOD moveTopRight( pPosition ) INLINE Qt_QRect_moveTopRight( ::pPtr, pPosition ) + METHOD normalized() INLINE Qt_QRect_normalized( ::pPtr ) + METHOD right() INLINE Qt_QRect_right( ::pPtr ) + METHOD setBottom( nY ) INLINE Qt_QRect_setBottom( ::pPtr, nY ) + METHOD setBottomLeft( pPosition ) INLINE Qt_QRect_setBottomLeft( ::pPtr, pPosition ) + METHOD setBottomRight( pPosition ) INLINE Qt_QRect_setBottomRight( ::pPtr, pPosition ) + METHOD setCoords( nX1, nY1, nX2, nY2 ) INLINE Qt_QRect_setCoords( ::pPtr, nX1, nY1, nX2, nY2 ) + METHOD setHeight( nHeight ) INLINE Qt_QRect_setHeight( ::pPtr, nHeight ) + METHOD setLeft( nX ) INLINE Qt_QRect_setLeft( ::pPtr, nX ) + METHOD setRect( nX, nY, nWidth, nHeight ) INLINE Qt_QRect_setRect( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD setRight( nX ) INLINE Qt_QRect_setRight( ::pPtr, nX ) + METHOD setSize( pSize ) INLINE Qt_QRect_setSize( ::pPtr, pSize ) + METHOD setTop( nY ) INLINE Qt_QRect_setTop( ::pPtr, nY ) + METHOD setTopLeft( pPosition ) INLINE Qt_QRect_setTopLeft( ::pPtr, pPosition ) + METHOD setTopRight( pPosition ) INLINE Qt_QRect_setTopRight( ::pPtr, pPosition ) + METHOD setWidth( nWidth ) INLINE Qt_QRect_setWidth( ::pPtr, nWidth ) + METHOD setX( nX ) INLINE Qt_QRect_setX( ::pPtr, nX ) + METHOD setY( nY ) INLINE Qt_QRect_setY( ::pPtr, nY ) + METHOD size() INLINE Qt_QRect_size( ::pPtr ) + METHOD top() INLINE Qt_QRect_top( ::pPtr ) + METHOD topLeft() INLINE Qt_QRect_topLeft( ::pPtr ) + METHOD topRight() INLINE Qt_QRect_topRight( ::pPtr ) + METHOD translate( nDx, nDy ) INLINE Qt_QRect_translate( ::pPtr, nDx, nDy ) + METHOD translate_1( pOffset ) INLINE Qt_QRect_translate_1( ::pPtr, pOffset ) + METHOD translated( nDx, nDy ) INLINE Qt_QRect_translated( ::pPtr, nDx, nDy ) + METHOD translated_1( pOffset ) INLINE Qt_QRect_translated_1( ::pPtr, pOffset ) + METHOD united( pRectangle ) INLINE Qt_QRect_united( ::pPtr, pRectangle ) + METHOD width() INLINE Qt_QRect_width( ::pPtr ) + METHOD x() INLINE Qt_QRect_x( ::pPtr ) + METHOD y() INLINE Qt_QRect_y( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QRect + + ::pParent := pParent + + ::pPtr := Qt_QRect( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQRectF.prg b/harbour/contrib/hbqt/TQRectF.prg new file mode 100644 index 0000000000..c2a773fd71 --- /dev/null +++ b/harbour/contrib/hbqt/TQRectF.prg @@ -0,0 +1,140 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QRectF + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD adjust( nDx1, nDy1, nDx2, nDy2 ) INLINE Qt_QRectF_adjust( ::pPtr, nDx1, nDy1, nDx2, nDy2 ) + METHOD adjusted( nDx1, nDy1, nDx2, nDy2 ) INLINE Qt_QRectF_adjusted( ::pPtr, nDx1, nDy1, nDx2, nDy2 ) + METHOD bottom() INLINE Qt_QRectF_bottom( ::pPtr ) + METHOD bottomLeft() INLINE Qt_QRectF_bottomLeft( ::pPtr ) + METHOD bottomRight() INLINE Qt_QRectF_bottomRight( ::pPtr ) + METHOD center() INLINE Qt_QRectF_center( ::pPtr ) + METHOD contains( pPoint ) INLINE Qt_QRectF_contains( ::pPtr, pPoint ) + METHOD contains_1( nX, nY ) INLINE Qt_QRectF_contains_1( ::pPtr, nX, nY ) + METHOD contains_2( pRectangle ) INLINE Qt_QRectF_contains_2( ::pPtr, pRectangle ) + METHOD getCoords( nX1, nY1, nX2, nY2 ) INLINE Qt_QRectF_getCoords( ::pPtr, nX1, nY1, nX2, nY2 ) + METHOD getRect( nX, nY, nWidth, nHeight ) INLINE Qt_QRectF_getRect( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD height() INLINE Qt_QRectF_height( ::pPtr ) + METHOD intersected( pRectangle ) INLINE Qt_QRectF_intersected( ::pPtr, pRectangle ) + METHOD intersects( pRectangle ) INLINE Qt_QRectF_intersects( ::pPtr, pRectangle ) + METHOD isEmpty() INLINE Qt_QRectF_isEmpty( ::pPtr ) + METHOD isNull() INLINE Qt_QRectF_isNull( ::pPtr ) + METHOD isValid() INLINE Qt_QRectF_isValid( ::pPtr ) + METHOD left() INLINE Qt_QRectF_left( ::pPtr ) + METHOD moveBottom( nY ) INLINE Qt_QRectF_moveBottom( ::pPtr, nY ) + METHOD moveBottomLeft( pPosition ) INLINE Qt_QRectF_moveBottomLeft( ::pPtr, pPosition ) + METHOD moveBottomRight( pPosition ) INLINE Qt_QRectF_moveBottomRight( ::pPtr, pPosition ) + METHOD moveCenter( pPosition ) INLINE Qt_QRectF_moveCenter( ::pPtr, pPosition ) + METHOD moveLeft( nX ) INLINE Qt_QRectF_moveLeft( ::pPtr, nX ) + METHOD moveRight( nX ) INLINE Qt_QRectF_moveRight( ::pPtr, nX ) + METHOD moveTo( nX, nY ) INLINE Qt_QRectF_moveTo( ::pPtr, nX, nY ) + METHOD moveTo_1( pPosition ) INLINE Qt_QRectF_moveTo_1( ::pPtr, pPosition ) + METHOD moveTop( nY ) INLINE Qt_QRectF_moveTop( ::pPtr, nY ) + METHOD moveTopLeft( pPosition ) INLINE Qt_QRectF_moveTopLeft( ::pPtr, pPosition ) + METHOD moveTopRight( pPosition ) INLINE Qt_QRectF_moveTopRight( ::pPtr, pPosition ) + METHOD normalized() INLINE Qt_QRectF_normalized( ::pPtr ) + METHOD right() INLINE Qt_QRectF_right( ::pPtr ) + METHOD setBottom( nY ) INLINE Qt_QRectF_setBottom( ::pPtr, nY ) + METHOD setBottomLeft( pPosition ) INLINE Qt_QRectF_setBottomLeft( ::pPtr, pPosition ) + METHOD setBottomRight( pPosition ) INLINE Qt_QRectF_setBottomRight( ::pPtr, pPosition ) + METHOD setCoords( nX1, nY1, nX2, nY2 ) INLINE Qt_QRectF_setCoords( ::pPtr, nX1, nY1, nX2, nY2 ) + METHOD setHeight( nHeight ) INLINE Qt_QRectF_setHeight( ::pPtr, nHeight ) + METHOD setLeft( nX ) INLINE Qt_QRectF_setLeft( ::pPtr, nX ) + METHOD setRect( nX, nY, nWidth, nHeight ) INLINE Qt_QRectF_setRect( ::pPtr, nX, nY, nWidth, nHeight ) + METHOD setRight( nX ) INLINE Qt_QRectF_setRight( ::pPtr, nX ) + METHOD setSize( pSize ) INLINE Qt_QRectF_setSize( ::pPtr, pSize ) + METHOD setTop( nY ) INLINE Qt_QRectF_setTop( ::pPtr, nY ) + METHOD setTopLeft( pPosition ) INLINE Qt_QRectF_setTopLeft( ::pPtr, pPosition ) + METHOD setTopRight( pPosition ) INLINE Qt_QRectF_setTopRight( ::pPtr, pPosition ) + METHOD setWidth( nWidth ) INLINE Qt_QRectF_setWidth( ::pPtr, nWidth ) + METHOD setX( nX ) INLINE Qt_QRectF_setX( ::pPtr, nX ) + METHOD setY( nY ) INLINE Qt_QRectF_setY( ::pPtr, nY ) + METHOD size() INLINE Qt_QRectF_size( ::pPtr ) + METHOD toAlignedRect() INLINE Qt_QRectF_toAlignedRect( ::pPtr ) + METHOD toRect() INLINE Qt_QRectF_toRect( ::pPtr ) + METHOD top() INLINE Qt_QRectF_top( ::pPtr ) + METHOD topLeft() INLINE Qt_QRectF_topLeft( ::pPtr ) + METHOD topRight() INLINE Qt_QRectF_topRight( ::pPtr ) + METHOD translate( nDx, nDy ) INLINE Qt_QRectF_translate( ::pPtr, nDx, nDy ) + METHOD translate_1( pOffset ) INLINE Qt_QRectF_translate_1( ::pPtr, pOffset ) + METHOD translated( nDx, nDy ) INLINE Qt_QRectF_translated( ::pPtr, nDx, nDy ) + METHOD translated_1( pOffset ) INLINE Qt_QRectF_translated_1( ::pPtr, pOffset ) + METHOD united( pRectangle ) INLINE Qt_QRectF_united( ::pPtr, pRectangle ) + METHOD width() INLINE Qt_QRectF_width( ::pPtr ) + METHOD x() INLINE Qt_QRectF_x( ::pPtr ) + METHOD y() INLINE Qt_QRectF_y( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QRectF + + ::pParent := pParent + + ::pPtr := Qt_QRectF( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQRegion.prg b/harbour/contrib/hbqt/TQRegion.prg new file mode 100644 index 0000000000..e768117bb5 --- /dev/null +++ b/harbour/contrib/hbqt/TQRegion.prg @@ -0,0 +1,99 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QRegion + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD boundingRect() INLINE Qt_QRegion_boundingRect( ::pPtr ) + METHOD contains( pP ) INLINE Qt_QRegion_contains( ::pPtr, pP ) + METHOD contains_1( pR ) INLINE Qt_QRegion_contains_1( ::pPtr, pR ) + METHOD handle() INLINE Qt_QRegion_handle( ::pPtr ) + METHOD intersected( pR ) INLINE Qt_QRegion_intersected( ::pPtr, pR ) + METHOD intersected_1( pRect ) INLINE Qt_QRegion_intersected_1( ::pPtr, pRect ) + METHOD intersects( pRegion ) INLINE Qt_QRegion_intersects( ::pPtr, pRegion ) + METHOD intersects_1( pRect ) INLINE Qt_QRegion_intersects_1( ::pPtr, pRect ) + METHOD isEmpty() INLINE Qt_QRegion_isEmpty( ::pPtr ) + METHOD numRects() INLINE Qt_QRegion_numRects( ::pPtr ) + METHOD setRects( pRects, nNumber ) INLINE Qt_QRegion_setRects( ::pPtr, pRects, nNumber ) + METHOD subtracted( pR ) INLINE Qt_QRegion_subtracted( ::pPtr, pR ) + METHOD translate( nDx, nDy ) INLINE Qt_QRegion_translate( ::pPtr, nDx, nDy ) + METHOD translate_1( pPoint ) INLINE Qt_QRegion_translate_1( ::pPtr, pPoint ) + METHOD translated( nDx, nDy ) INLINE Qt_QRegion_translated( ::pPtr, nDx, nDy ) + METHOD translated_1( pP ) INLINE Qt_QRegion_translated_1( ::pPtr, pP ) + METHOD united( pR ) INLINE Qt_QRegion_united( ::pPtr, pR ) + METHOD united_1( pRect ) INLINE Qt_QRegion_united_1( ::pPtr, pRect ) + METHOD xored( pR ) INLINE Qt_QRegion_xored( ::pPtr, pR ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QRegion + + ::pParent := pParent + + ::pPtr := Qt_QRegion( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQScrollArea.prg b/harbour/contrib/hbqt/TQScrollArea.prg index 247e0a5f50..ec8a223044 100644 --- a/harbour/contrib/hbqt/TQScrollArea.prg +++ b/harbour/contrib/hbqt/TQScrollArea.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QScrollArea INHERIT QAbstractScrollArea +CREATE CLASS QScrollArea INHERIT QAbstractScrollArea - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -78,6 +79,8 @@ CLASS QScrollArea INHERIT QAbstractScrollArea METHOD New( pParent ) CLASS QScrollArea + ::pParent := pParent + ::pPtr := Qt_QScrollArea( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQScrollBar.prg b/harbour/contrib/hbqt/TQScrollBar.prg index 55545990df..01d4a4229f 100644 --- a/harbour/contrib/hbqt/TQScrollBar.prg +++ b/harbour/contrib/hbqt/TQScrollBar.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QScrollBar INHERIT QAbstractSlider +CREATE CLASS QScrollBar INHERIT QAbstractSlider - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QScrollBar INHERIT QAbstractSlider METHOD New( pParent ) CLASS QScrollBar + ::pParent := pParent + ::pPtr := Qt_QScrollBar( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQSignalMapper.prg b/harbour/contrib/hbqt/TQSignalMapper.prg new file mode 100644 index 0000000000..ac3ec0c0b2 --- /dev/null +++ b/harbour/contrib/hbqt/TQSignalMapper.prg @@ -0,0 +1,91 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QSignalMapper INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD mapping( nId ) INLINE Qt_QSignalMapper_mapping( ::pPtr, nId ) + METHOD mapping_1( cId ) INLINE Qt_QSignalMapper_mapping_1( ::pPtr, cId ) + METHOD mapping_2( pWidget ) INLINE Qt_QSignalMapper_mapping_2( ::pPtr, pWidget ) + METHOD mapping_3( pObject ) INLINE Qt_QSignalMapper_mapping_3( ::pPtr, pObject ) + METHOD removeMappings( pSender ) INLINE Qt_QSignalMapper_removeMappings( ::pPtr, pSender ) + METHOD setMapping( pSender, nId ) INLINE Qt_QSignalMapper_setMapping( ::pPtr, pSender, nId ) + METHOD setMapping_1( pSender, cText ) INLINE Qt_QSignalMapper_setMapping_1( ::pPtr, pSender, cText ) + METHOD setMapping_2( pSender, pWidget ) INLINE Qt_QSignalMapper_setMapping_2( ::pPtr, pSender, pWidget ) + METHOD setMapping_3( pSender, pObject ) INLINE Qt_QSignalMapper_setMapping_3( ::pPtr, pSender, pObject ) + METHOD map() INLINE Qt_QSignalMapper_map( ::pPtr ) + METHOD map_1( pSender ) INLINE Qt_QSignalMapper_map_1( ::pPtr, pSender ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QSignalMapper + + ::pParent := pParent + + ::pPtr := Qt_QSignalMapper( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQSize.prg b/harbour/contrib/hbqt/TQSize.prg new file mode 100644 index 0000000000..79865438bf --- /dev/null +++ b/harbour/contrib/hbqt/TQSize.prg @@ -0,0 +1,92 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QSize + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD height() INLINE Qt_QSize_height( ::pPtr ) + METHOD isEmpty() INLINE Qt_QSize_isEmpty( ::pPtr ) + METHOD isNull() INLINE Qt_QSize_isNull( ::pPtr ) + METHOD isValid() INLINE Qt_QSize_isValid( ::pPtr ) + METHOD rheight() INLINE Qt_QSize_rheight( ::pPtr ) + METHOD rwidth() INLINE Qt_QSize_rwidth( ::pPtr ) + METHOD scale( nWidth, nHeight, nMode ) INLINE Qt_QSize_scale( ::pPtr, nWidth, nHeight, nMode ) + METHOD scale_1( pSize, nMode ) INLINE Qt_QSize_scale_1( ::pPtr, pSize, nMode ) + METHOD setHeight( nHeight ) INLINE Qt_QSize_setHeight( ::pPtr, nHeight ) + METHOD setWidth( nWidth ) INLINE Qt_QSize_setWidth( ::pPtr, nWidth ) + METHOD transpose() INLINE Qt_QSize_transpose( ::pPtr ) + METHOD width() INLINE Qt_QSize_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QSize + + ::pParent := pParent + + ::pPtr := Qt_QSize( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQSizeF.prg b/harbour/contrib/hbqt/TQSizeF.prg new file mode 100644 index 0000000000..3aac97f9e1 --- /dev/null +++ b/harbour/contrib/hbqt/TQSizeF.prg @@ -0,0 +1,93 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QSizeF + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD height() INLINE Qt_QSizeF_height( ::pPtr ) + METHOD isEmpty() INLINE Qt_QSizeF_isEmpty( ::pPtr ) + METHOD isNull() INLINE Qt_QSizeF_isNull( ::pPtr ) + METHOD isValid() INLINE Qt_QSizeF_isValid( ::pPtr ) + METHOD rheight() INLINE Qt_QSizeF_rheight( ::pPtr ) + METHOD rwidth() INLINE Qt_QSizeF_rwidth( ::pPtr ) + METHOD scale( nWidth, nHeight, nMode ) INLINE Qt_QSizeF_scale( ::pPtr, nWidth, nHeight, nMode ) + METHOD scale_1( pSize, nMode ) INLINE Qt_QSizeF_scale_1( ::pPtr, pSize, nMode ) + METHOD setHeight( nHeight ) INLINE Qt_QSizeF_setHeight( ::pPtr, nHeight ) + METHOD setWidth( nWidth ) INLINE Qt_QSizeF_setWidth( ::pPtr, nWidth ) + METHOD toSize() INLINE Qt_QSizeF_toSize( ::pPtr ) + METHOD transpose() INLINE Qt_QSizeF_transpose( ::pPtr ) + METHOD width() INLINE Qt_QSizeF_width( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QSizeF + + ::pParent := pParent + + ::pPtr := Qt_QSizeF( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQSizeGrip.prg b/harbour/contrib/hbqt/TQSizeGrip.prg index c814baee6a..50940f3bda 100644 --- a/harbour/contrib/hbqt/TQSizeGrip.prg +++ b/harbour/contrib/hbqt/TQSizeGrip.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QSizeGrip INHERIT QWidget +CREATE CLASS QSizeGrip INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QSizeGrip INHERIT QWidget METHOD New( pParent ) CLASS QSizeGrip + ::pParent := pParent + ::pPtr := Qt_QSizeGrip( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQSlider.prg b/harbour/contrib/hbqt/TQSlider.prg index f9f4518085..4d2c04cc41 100644 --- a/harbour/contrib/hbqt/TQSlider.prg +++ b/harbour/contrib/hbqt/TQSlider.prg @@ -53,17 +53,18 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QSlider INHERIT QAbstractSlider +CREATE CLASS QSlider INHERIT QAbstractSlider - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD setTickInterval( nTi ) INLINE Qt_QSlider_setTickInterval( ::pPtr, nTi ) - METHOD setTickPosition( nTickPosition ) INLINE Qt_QSlider_setTickPosition( ::pPtr, nTickPosition ) + METHOD setTickPosition( nPosition ) INLINE Qt_QSlider_setTickPosition( ::pPtr, nPosition ) METHOD tickInterval() INLINE Qt_QSlider_tickInterval( ::pPtr ) METHOD tickPosition() INLINE Qt_QSlider_tickPosition( ::pPtr ) @@ -73,6 +74,8 @@ CLASS QSlider INHERIT QAbstractSlider METHOD New( pParent ) CLASS QSlider + ::pParent := pParent + ::pPtr := Qt_QSlider( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQSpinBox.prg b/harbour/contrib/hbqt/TQSpinBox.prg index c2857ae5dc..09c98bf760 100644 --- a/harbour/contrib/hbqt/TQSpinBox.prg +++ b/harbour/contrib/hbqt/TQSpinBox.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QSpinBox INHERIT QAbstractSpinBox +CREATE CLASS QSpinBox INHERIT QAbstractSpinBox - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -75,6 +76,7 @@ CLASS QSpinBox INHERIT QAbstractSpinBox METHOD singleStep() INLINE Qt_QSpinBox_singleStep( ::pPtr ) METHOD suffix() INLINE Qt_QSpinBox_suffix( ::pPtr ) METHOD value() INLINE Qt_QSpinBox_value( ::pPtr ) + METHOD setValue( nVal ) INLINE Qt_QSpinBox_setValue( ::pPtr, nVal ) ENDCLASS @@ -82,6 +84,8 @@ CLASS QSpinBox INHERIT QAbstractSpinBox METHOD New( pParent ) CLASS QSpinBox + ::pParent := pParent + ::pPtr := Qt_QSpinBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQSplashScreen.prg b/harbour/contrib/hbqt/TQSplashScreen.prg new file mode 100644 index 0000000000..268935b3d0 --- /dev/null +++ b/harbour/contrib/hbqt/TQSplashScreen.prg @@ -0,0 +1,86 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QSplashScreen INHERIT QWidget + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD finish( pMainWin ) INLINE Qt_QSplashScreen_finish( ::pPtr, pMainWin ) + METHOD pixmap() INLINE Qt_QSplashScreen_pixmap( ::pPtr ) + METHOD repaint() INLINE Qt_QSplashScreen_repaint( ::pPtr ) + METHOD setPixmap( pPixmap ) INLINE Qt_QSplashScreen_setPixmap( ::pPtr, pPixmap ) + METHOD clearMessage() INLINE Qt_QSplashScreen_clearMessage( ::pPtr ) + METHOD showMessage( cMessage, nAlignment, pColor ) INLINE Qt_QSplashScreen_showMessage( ::pPtr, cMessage, nAlignment, pColor ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QSplashScreen + + ::pParent := pParent + + ::pPtr := Qt_QSplashScreen( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQSplitter.prg b/harbour/contrib/hbqt/TQSplitter.prg index 799053f9d7..89c29d439f 100644 --- a/harbour/contrib/hbqt/TQSplitter.prg +++ b/harbour/contrib/hbqt/TQSplitter.prg @@ -53,18 +53,20 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QSplitter INHERIT QFrame +CREATE CLASS QSplitter INHERIT QFrame - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD addWidget( pWidget ) INLINE Qt_QSplitter_addWidget( ::pPtr, pWidget ) METHOD childrenCollapsible() INLINE Qt_QSplitter_childrenCollapsible( ::pPtr ) METHOD count() INLINE Qt_QSplitter_count( ::pPtr ) + METHOD getRange( nIndex, nMin, nMax ) INLINE Qt_QSplitter_getRange( ::pPtr, nIndex, nMin, nMax ) METHOD handle( nIndex ) INLINE Qt_QSplitter_handle( ::pPtr, nIndex ) METHOD handleWidth() INLINE Qt_QSplitter_handleWidth( ::pPtr ) METHOD indexOf( pWidget ) INLINE Qt_QSplitter_indexOf( ::pPtr, pWidget ) @@ -73,6 +75,8 @@ CLASS QSplitter INHERIT QFrame METHOD opaqueResize() INLINE Qt_QSplitter_opaqueResize( ::pPtr ) METHOD orientation() INLINE Qt_QSplitter_orientation( ::pPtr ) METHOD refresh() INLINE Qt_QSplitter_refresh( ::pPtr ) + METHOD restoreState( pState ) INLINE Qt_QSplitter_restoreState( ::pPtr, pState ) + METHOD saveState() INLINE Qt_QSplitter_saveState( ::pPtr ) METHOD setChildrenCollapsible( lBool ) INLINE Qt_QSplitter_setChildrenCollapsible( ::pPtr, lBool ) METHOD setCollapsible( nIndex, lCollapse ) INLINE Qt_QSplitter_setCollapsible( ::pPtr, nIndex, lCollapse ) METHOD setHandleWidth( nInt ) INLINE Qt_QSplitter_setHandleWidth( ::pPtr, nInt ) @@ -87,6 +91,8 @@ CLASS QSplitter INHERIT QFrame METHOD New( pParent ) CLASS QSplitter + ::pParent := pParent + ::pPtr := Qt_QSplitter( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQStatusBar.prg b/harbour/contrib/hbqt/TQStatusBar.prg new file mode 100644 index 0000000000..eebd8e9f8a --- /dev/null +++ b/harbour/contrib/hbqt/TQStatusBar.prg @@ -0,0 +1,90 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QStatusBar INHERIT QWidget + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD addPermanentWidget( pWidget, nStretch ) INLINE Qt_QStatusBar_addPermanentWidget( ::pPtr, pWidget, nStretch ) + METHOD addWidget( pWidget, nStretch ) INLINE Qt_QStatusBar_addWidget( ::pPtr, pWidget, nStretch ) + METHOD currentMessage() INLINE Qt_QStatusBar_currentMessage( ::pPtr ) + METHOD insertPermanentWidget( nIndex, pWidget, nStretch ) INLINE Qt_QStatusBar_insertPermanentWidget( ::pPtr, nIndex, pWidget, nStretch ) + METHOD insertWidget( nIndex, pWidget, nStretch ) INLINE Qt_QStatusBar_insertWidget( ::pPtr, nIndex, pWidget, nStretch ) + METHOD isSizeGripEnabled() INLINE Qt_QStatusBar_isSizeGripEnabled( ::pPtr ) + METHOD removeWidget( pWidget ) INLINE Qt_QStatusBar_removeWidget( ::pPtr, pWidget ) + METHOD setSizeGripEnabled( lBool ) INLINE Qt_QStatusBar_setSizeGripEnabled( ::pPtr, lBool ) + METHOD clearMessage() INLINE Qt_QStatusBar_clearMessage( ::pPtr ) + METHOD showMessage( cMessage, nTimeout ) INLINE Qt_QStatusBar_showMessage( ::pPtr, cMessage, nTimeout ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QStatusBar + + ::pParent := pParent + + ::pPtr := Qt_QStatusBar( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQStyle.prg b/harbour/contrib/hbqt/TQStyle.prg new file mode 100644 index 0000000000..51e557e3bc --- /dev/null +++ b/harbour/contrib/hbqt/TQStyle.prg @@ -0,0 +1,103 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QStyle INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD combinedLayoutSpacing( nControls1, nControls2, nOrientation, pOption, pWidget ) INLINE Qt_QStyle_combinedLayoutSpacing( ::pPtr, nControls1, nControls2, nOrientation, pOption, pWidget ) + METHOD drawComplexControl( nControl, pOption, pPainter, pWidget ) INLINE Qt_QStyle_drawComplexControl( ::pPtr, nControl, pOption, pPainter, pWidget ) + METHOD drawControl( nElement, pOption, pPainter, pWidget ) INLINE Qt_QStyle_drawControl( ::pPtr, nElement, pOption, pPainter, pWidget ) + METHOD drawItemPixmap( pPainter, pRectangle, nAlignment, pPixmap ) INLINE Qt_QStyle_drawItemPixmap( ::pPtr, pPainter, pRectangle, nAlignment, pPixmap ) + METHOD drawItemText( pPainter, pRectangle, nAlignment, pPalette, lEnabled, cText, nTextRole ) INLINE Qt_QStyle_drawItemText( ::pPtr, pPainter, pRectangle, nAlignment, pPalette, lEnabled, cText, nTextRole ) + METHOD drawPrimitive( nElement, pOption, pPainter, pWidget ) INLINE Qt_QStyle_drawPrimitive( ::pPtr, nElement, pOption, pPainter, pWidget ) + METHOD generatedIconPixmap( nIconMode, pPixmap, pOption ) INLINE Qt_QStyle_generatedIconPixmap( ::pPtr, nIconMode, pPixmap, pOption ) + METHOD hitTestComplexControl( nControl, pOption, pPosition, pWidget ) INLINE Qt_QStyle_hitTestComplexControl( ::pPtr, nControl, pOption, pPosition, pWidget ) + METHOD itemPixmapRect( pRectangle, nAlignment, pPixmap ) INLINE Qt_QStyle_itemPixmapRect( ::pPtr, pRectangle, nAlignment, pPixmap ) + METHOD itemTextRect( pMetrics, pRectangle, nAlignment, lEnabled, cText ) INLINE Qt_QStyle_itemTextRect( ::pPtr, pMetrics, pRectangle, nAlignment, lEnabled, cText ) + METHOD layoutSpacing( nControl1, nControl2, nOrientation, pOption, pWidget ) INLINE Qt_QStyle_layoutSpacing( ::pPtr, nControl1, nControl2, nOrientation, pOption, pWidget ) + METHOD pixelMetric( nMetric, pOption, pWidget ) INLINE Qt_QStyle_pixelMetric( ::pPtr, nMetric, pOption, pWidget ) + METHOD polish( pWidget ) INLINE Qt_QStyle_polish( ::pPtr, pWidget ) + METHOD polish_1( pApplication ) INLINE Qt_QStyle_polish_1( ::pPtr, pApplication ) + METHOD polish_2( pPalette ) INLINE Qt_QStyle_polish_2( ::pPtr, pPalette ) + METHOD sizeFromContents( nType, pOption, pContentsSize, pWidget ) INLINE Qt_QStyle_sizeFromContents( ::pPtr, nType, pOption, pContentsSize, pWidget ) + METHOD standardIcon( nStandardIcon, pOption, pWidget ) INLINE Qt_QStyle_standardIcon( ::pPtr, nStandardIcon, pOption, pWidget ) + METHOD standardPalette() INLINE Qt_QStyle_standardPalette( ::pPtr ) + METHOD styleHint( nHint, pOption, pWidget, pReturnData ) INLINE Qt_QStyle_styleHint( ::pPtr, nHint, pOption, pWidget, pReturnData ) + METHOD subControlRect( nControl, pOption, nSubControl, pWidget ) INLINE Qt_QStyle_subControlRect( ::pPtr, nControl, pOption, nSubControl, pWidget ) + METHOD subElementRect( nElement, pOption, pWidget ) INLINE Qt_QStyle_subElementRect( ::pPtr, nElement, pOption, pWidget ) + METHOD unpolish( pWidget ) INLINE Qt_QStyle_unpolish( ::pPtr, pWidget ) + METHOD unpolish_1( pApplication ) INLINE Qt_QStyle_unpolish_1( ::pPtr, pApplication ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QStyle + + ::pParent := pParent + + ::pPtr := Qt_QStyle( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQTabBar.prg b/harbour/contrib/hbqt/TQTabBar.prg index 597a58448f..eb939f5d86 100644 --- a/harbour/contrib/hbqt/TQTabBar.prg +++ b/harbour/contrib/hbqt/TQTabBar.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTabBar INHERIT QWidget +CREATE CLASS QTabBar INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -80,26 +81,32 @@ CLASS QTabBar INHERIT QWidget METHOD setDrawBase( lDrawTheBase ) INLINE Qt_QTabBar_setDrawBase( ::pPtr, lDrawTheBase ) METHOD setElideMode( nQt_TextElideMode ) INLINE Qt_QTabBar_setElideMode( ::pPtr, nQt_TextElideMode ) METHOD setExpanding( lEnabled ) INLINE Qt_QTabBar_setExpanding( ::pPtr, lEnabled ) - METHOD setIconSize( aSizeSize ) INLINE Qt_QTabBar_setIconSize( ::pPtr, aSizeSize ) + METHOD setIconSize( pSize ) INLINE Qt_QTabBar_setIconSize( ::pPtr, pSize ) METHOD setMovable( lMovable ) INLINE Qt_QTabBar_setMovable( ::pPtr, lMovable ) - METHOD setSelectionBehaviorOnRemove( nSelectionBehavior ) INLINE Qt_QTabBar_setSelectionBehaviorOnRemove( ::pPtr, nSelectionBehavior ) + METHOD setSelectionBehaviorOnRemove( nBehavior ) INLINE Qt_QTabBar_setSelectionBehaviorOnRemove( ::pPtr, nBehavior ) METHOD setShape( nShape ) INLINE Qt_QTabBar_setShape( ::pPtr, nShape ) - METHOD setTabButton( nIndex, nButtonPosition, pWidget ) INLINE Qt_QTabBar_setTabButton( ::pPtr, nIndex, nButtonPosition, pWidget ) + METHOD setTabButton( nIndex, nPosition, pWidget ) INLINE Qt_QTabBar_setTabButton( ::pPtr, nIndex, nPosition, pWidget ) + METHOD setTabData( nIndex, pData ) INLINE Qt_QTabBar_setTabData( ::pPtr, nIndex, pData ) METHOD setTabEnabled( nIndex, lEnabled ) INLINE Qt_QTabBar_setTabEnabled( ::pPtr, nIndex, lEnabled ) METHOD setTabText( nIndex, cText ) INLINE Qt_QTabBar_setTabText( ::pPtr, nIndex, cText ) + METHOD setTabTextColor( nIndex, pColor ) INLINE Qt_QTabBar_setTabTextColor( ::pPtr, nIndex, pColor ) METHOD setTabToolTip( nIndex, cTip ) INLINE Qt_QTabBar_setTabToolTip( ::pPtr, nIndex, cTip ) METHOD setTabWhatsThis( nIndex, cText ) INLINE Qt_QTabBar_setTabWhatsThis( ::pPtr, nIndex, cText ) METHOD setTabsClosable( lClosable ) INLINE Qt_QTabBar_setTabsClosable( ::pPtr, lClosable ) METHOD setUsesScrollButtons( lUseButtons ) INLINE Qt_QTabBar_setUsesScrollButtons( ::pPtr, lUseButtons ) METHOD shape() INLINE Qt_QTabBar_shape( ::pPtr ) - METHOD tabAt( aPointPosition ) INLINE Qt_QTabBar_tabAt( ::pPtr, aPointPosition ) - METHOD tabButton( nIndex, nButtonPosition ) INLINE Qt_QTabBar_tabButton( ::pPtr, nIndex, nButtonPosition ) + METHOD tabAt( pPosition ) INLINE Qt_QTabBar_tabAt( ::pPtr, pPosition ) + METHOD tabButton( nIndex, nPosition ) INLINE Qt_QTabBar_tabButton( ::pPtr, nIndex, nPosition ) + METHOD tabData( nIndex ) INLINE Qt_QTabBar_tabData( ::pPtr, nIndex ) + METHOD tabIcon( nIndex ) INLINE Qt_QTabBar_tabIcon( ::pPtr, nIndex ) METHOD tabRect( nIndex ) INLINE Qt_QTabBar_tabRect( ::pPtr, nIndex ) METHOD tabText( nIndex ) INLINE Qt_QTabBar_tabText( ::pPtr, nIndex ) + METHOD tabTextColor( nIndex ) INLINE Qt_QTabBar_tabTextColor( ::pPtr, nIndex ) METHOD tabToolTip( nIndex ) INLINE Qt_QTabBar_tabToolTip( ::pPtr, nIndex ) METHOD tabWhatsThis( nIndex ) INLINE Qt_QTabBar_tabWhatsThis( ::pPtr, nIndex ) METHOD tabsClosable() INLINE Qt_QTabBar_tabsClosable( ::pPtr ) METHOD usesScrollButtons() INLINE Qt_QTabBar_usesScrollButtons( ::pPtr ) + METHOD setCurrentIndex( nIndex ) INLINE Qt_QTabBar_setCurrentIndex( ::pPtr, nIndex ) ENDCLASS @@ -107,6 +114,8 @@ CLASS QTabBar INHERIT QWidget METHOD New( pParent ) CLASS QTabBar + ::pParent := pParent + ::pPtr := Qt_QTabBar( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTabWidget.prg b/harbour/contrib/hbqt/TQTabWidget.prg index 60e46cbfad..b3cc69d2c1 100644 --- a/harbour/contrib/hbqt/TQTabWidget.prg +++ b/harbour/contrib/hbqt/TQTabWidget.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTabWidget INHERIT QWidget +CREATE CLASS QTabWidget INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -81,17 +82,18 @@ CLASS QTabWidget INHERIT QWidget METHOD setCornerWidget( pWidget, nCorner ) INLINE Qt_QTabWidget_setCornerWidget( ::pPtr, pWidget, nCorner ) METHOD setDocumentMode( lSet ) INLINE Qt_QTabWidget_setDocumentMode( ::pPtr, lSet ) METHOD setElideMode( nQt_TextElideMode ) INLINE Qt_QTabWidget_setElideMode( ::pPtr, nQt_TextElideMode ) - METHOD setIconSize( aSizeSize ) INLINE Qt_QTabWidget_setIconSize( ::pPtr, aSizeSize ) + METHOD setIconSize( pSize ) INLINE Qt_QTabWidget_setIconSize( ::pPtr, pSize ) METHOD setMovable( lMovable ) INLINE Qt_QTabWidget_setMovable( ::pPtr, lMovable ) METHOD setTabEnabled( nIndex, lEnable ) INLINE Qt_QTabWidget_setTabEnabled( ::pPtr, nIndex, lEnable ) METHOD setTabIcon( nIndex, cIcon ) INLINE Qt_QTabWidget_setTabIcon( ::pPtr, nIndex, cIcon ) METHOD setTabPosition( nTabPosition ) INLINE Qt_QTabWidget_setTabPosition( ::pPtr, nTabPosition ) - METHOD setTabShape( nTabShape ) INLINE Qt_QTabWidget_setTabShape( ::pPtr, nTabShape ) + METHOD setTabShape( nS ) INLINE Qt_QTabWidget_setTabShape( ::pPtr, nS ) METHOD setTabText( nIndex, cLabel ) INLINE Qt_QTabWidget_setTabText( ::pPtr, nIndex, cLabel ) METHOD setTabToolTip( nIndex, cTip ) INLINE Qt_QTabWidget_setTabToolTip( ::pPtr, nIndex, cTip ) METHOD setTabWhatsThis( nIndex, cText ) INLINE Qt_QTabWidget_setTabWhatsThis( ::pPtr, nIndex, cText ) METHOD setTabsClosable( lCloseable ) INLINE Qt_QTabWidget_setTabsClosable( ::pPtr, lCloseable ) METHOD setUsesScrollButtons( lUseButtons ) INLINE Qt_QTabWidget_setUsesScrollButtons( ::pPtr, lUseButtons ) + METHOD tabIcon( nIndex ) INLINE Qt_QTabWidget_tabIcon( ::pPtr, nIndex ) METHOD tabPosition() INLINE Qt_QTabWidget_tabPosition( ::pPtr ) METHOD tabShape() INLINE Qt_QTabWidget_tabShape( ::pPtr ) METHOD tabText( nIndex ) INLINE Qt_QTabWidget_tabText( ::pPtr, nIndex ) @@ -100,6 +102,8 @@ CLASS QTabWidget INHERIT QWidget METHOD tabsClosable() INLINE Qt_QTabWidget_tabsClosable( ::pPtr ) METHOD usesScrollButtons() INLINE Qt_QTabWidget_usesScrollButtons( ::pPtr ) METHOD widget( nIndex ) INLINE Qt_QTabWidget_widget( ::pPtr, nIndex ) + METHOD setCurrentIndex( nIndex ) INLINE Qt_QTabWidget_setCurrentIndex( ::pPtr, nIndex ) + METHOD setCurrentWidget( pWidget ) INLINE Qt_QTabWidget_setCurrentWidget( ::pPtr, pWidget ) ENDCLASS @@ -107,6 +111,8 @@ CLASS QTabWidget INHERIT QWidget METHOD New( pParent ) CLASS QTabWidget + ::pParent := pParent + ::pPtr := Qt_QTabWidget( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTableView.prg b/harbour/contrib/hbqt/TQTableView.prg index 35e25166de..2782f84f10 100644 --- a/harbour/contrib/hbqt/TQTableView.prg +++ b/harbour/contrib/hbqt/TQTableView.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTableView INHERIT QAbstractItemView +CREATE CLASS QTableView INHERIT QAbstractItemView - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,7 @@ CLASS QTableView INHERIT QAbstractItemView METHOD columnWidth( nColumn ) INLINE Qt_QTableView_columnWidth( ::pPtr, nColumn ) METHOD gridStyle() INLINE Qt_QTableView_gridStyle( ::pPtr ) METHOD horizontalHeader() INLINE Qt_QTableView_horizontalHeader( ::pPtr ) + METHOD indexAt( pPos ) INLINE Qt_QTableView_indexAt( ::pPtr, pPos ) METHOD isColumnHidden( nColumn ) INLINE Qt_QTableView_isColumnHidden( ::pPtr, nColumn ) METHOD isCornerButtonEnabled() INLINE Qt_QTableView_isCornerButtonEnabled( ::pPtr ) METHOD isRowHidden( nRow ) INLINE Qt_QTableView_isRowHidden( ::pPtr, nRow ) @@ -92,6 +94,17 @@ CLASS QTableView INHERIT QAbstractItemView METHOD sortByColumn( nColumn, nOrder ) INLINE Qt_QTableView_sortByColumn( ::pPtr, nColumn, nOrder ) METHOD verticalHeader() INLINE Qt_QTableView_verticalHeader( ::pPtr ) METHOD wordWrap() INLINE Qt_QTableView_wordWrap( ::pPtr ) + METHOD hideColumn( nColumn ) INLINE Qt_QTableView_hideColumn( ::pPtr, nColumn ) + METHOD hideRow( nRow ) INLINE Qt_QTableView_hideRow( ::pPtr, nRow ) + METHOD resizeColumnToContents( nColumn ) INLINE Qt_QTableView_resizeColumnToContents( ::pPtr, nColumn ) + METHOD resizeColumnsToContents() INLINE Qt_QTableView_resizeColumnsToContents( ::pPtr ) + METHOD resizeRowToContents( nRow ) INLINE Qt_QTableView_resizeRowToContents( ::pPtr, nRow ) + METHOD resizeRowsToContents() INLINE Qt_QTableView_resizeRowsToContents( ::pPtr ) + METHOD selectColumn( nColumn ) INLINE Qt_QTableView_selectColumn( ::pPtr, nColumn ) + METHOD selectRow( nRow ) INLINE Qt_QTableView_selectRow( ::pPtr, nRow ) + METHOD setShowGrid( lShow ) INLINE Qt_QTableView_setShowGrid( ::pPtr, lShow ) + METHOD showColumn( nColumn ) INLINE Qt_QTableView_showColumn( ::pPtr, nColumn ) + METHOD showRow( nRow ) INLINE Qt_QTableView_showRow( ::pPtr, nRow ) ENDCLASS @@ -99,6 +112,8 @@ CLASS QTableView INHERIT QAbstractItemView METHOD New( pParent ) CLASS QTableView + ::pParent := pParent + ::pPtr := Qt_QTableView( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTableWidget.prg b/harbour/contrib/hbqt/TQTableWidget.prg index 7a15461a85..71fe134832 100644 --- a/harbour/contrib/hbqt/TQTableWidget.prg +++ b/harbour/contrib/hbqt/TQTableWidget.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTableWidget INHERIT QTableView +CREATE CLASS QTableWidget INHERIT QTableView - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -72,7 +73,7 @@ CLASS QTableWidget INHERIT QTableView METHOD editItem( pItem ) INLINE Qt_QTableWidget_editItem( ::pPtr, pItem ) METHOD horizontalHeaderItem( nColumn ) INLINE Qt_QTableWidget_horizontalHeaderItem( ::pPtr, nColumn ) METHOD item( nRow, nColumn ) INLINE Qt_QTableWidget_item( ::pPtr, nRow, nColumn ) - METHOD itemAt( aPointPoint ) INLINE Qt_QTableWidget_itemAt( ::pPtr, aPointPoint ) + METHOD itemAt( pPoint ) INLINE Qt_QTableWidget_itemAt( ::pPtr, pPoint ) METHOD itemAt_1( nAx, nAy ) INLINE Qt_QTableWidget_itemAt_1( ::pPtr, nAx, nAy ) METHOD itemPrototype() INLINE Qt_QTableWidget_itemPrototype( ::pPtr ) METHOD openPersistentEditor( pItem ) INLINE Qt_QTableWidget_openPersistentEditor( ::pPtr, pItem ) @@ -86,10 +87,13 @@ CLASS QTableWidget INHERIT QTableView METHOD setCurrentItem( pItem ) INLINE Qt_QTableWidget_setCurrentItem( ::pPtr, pItem ) METHOD setCurrentItem_1( pItem, nCommand ) INLINE Qt_QTableWidget_setCurrentItem_1( ::pPtr, pItem, nCommand ) METHOD setHorizontalHeaderItem( nColumn, pItem ) INLINE Qt_QTableWidget_setHorizontalHeaderItem( ::pPtr, nColumn, pItem ) + METHOD setHorizontalHeaderLabels( pLabels ) INLINE Qt_QTableWidget_setHorizontalHeaderLabels( ::pPtr, pLabels ) METHOD setItem( nRow, nColumn, pItem ) INLINE Qt_QTableWidget_setItem( ::pPtr, nRow, nColumn, pItem ) METHOD setItemPrototype( pItem ) INLINE Qt_QTableWidget_setItemPrototype( ::pPtr, pItem ) + METHOD setRangeSelected( pRange, lSelect ) INLINE Qt_QTableWidget_setRangeSelected( ::pPtr, pRange, lSelect ) METHOD setRowCount( nRows ) INLINE Qt_QTableWidget_setRowCount( ::pPtr, nRows ) METHOD setVerticalHeaderItem( nRow, pItem ) INLINE Qt_QTableWidget_setVerticalHeaderItem( ::pPtr, nRow, pItem ) + METHOD setVerticalHeaderLabels( pLabels ) INLINE Qt_QTableWidget_setVerticalHeaderLabels( ::pPtr, pLabels ) METHOD sortItems( nColumn, nOrder ) INLINE Qt_QTableWidget_sortItems( ::pPtr, nColumn, nOrder ) METHOD takeHorizontalHeaderItem( nColumn ) INLINE Qt_QTableWidget_takeHorizontalHeaderItem( ::pPtr, nColumn ) METHOD takeItem( nRow, nColumn ) INLINE Qt_QTableWidget_takeItem( ::pPtr, nRow, nColumn ) @@ -98,6 +102,13 @@ CLASS QTableWidget INHERIT QTableView METHOD visualColumn( nLogicalColumn ) INLINE Qt_QTableWidget_visualColumn( ::pPtr, nLogicalColumn ) METHOD visualItemRect( pItem ) INLINE Qt_QTableWidget_visualItemRect( ::pPtr, pItem ) METHOD visualRow( nLogicalRow ) INLINE Qt_QTableWidget_visualRow( ::pPtr, nLogicalRow ) + METHOD clear() INLINE Qt_QTableWidget_clear( ::pPtr ) + METHOD clearContents() INLINE Qt_QTableWidget_clearContents( ::pPtr ) + METHOD insertColumn( nColumn ) INLINE Qt_QTableWidget_insertColumn( ::pPtr, nColumn ) + METHOD insertRow( nRow ) INLINE Qt_QTableWidget_insertRow( ::pPtr, nRow ) + METHOD removeColumn( nColumn ) INLINE Qt_QTableWidget_removeColumn( ::pPtr, nColumn ) + METHOD removeRow( nRow ) INLINE Qt_QTableWidget_removeRow( ::pPtr, nRow ) + METHOD scrollToItem( pItem, nHint ) INLINE Qt_QTableWidget_scrollToItem( ::pPtr, pItem, nHint ) ENDCLASS @@ -105,6 +116,8 @@ CLASS QTableWidget INHERIT QTableView METHOD New( pParent ) CLASS QTableWidget + ::pParent := pParent + ::pPtr := Qt_QTableWidget( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTableWidgetItem.prg b/harbour/contrib/hbqt/TQTableWidgetItem.prg index eb84c88c23..937f4ee068 100644 --- a/harbour/contrib/hbqt/TQTableWidgetItem.prg +++ b/harbour/contrib/hbqt/TQTableWidgetItem.prg @@ -53,24 +53,37 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTableWidgetItem +CREATE CLASS QTableWidgetItem - DATA pPtr + VAR pParent + VAR pPtr METHOD New() + METHOD background() INLINE Qt_QTableWidgetItem_background( ::pPtr ) METHOD checkState() INLINE Qt_QTableWidgetItem_checkState( ::pPtr ) METHOD clone() INLINE Qt_QTableWidgetItem_clone( ::pPtr ) METHOD column() INLINE Qt_QTableWidgetItem_column( ::pPtr ) + METHOD data( nRole ) INLINE Qt_QTableWidgetItem_data( ::pPtr, nRole ) + METHOD flags() INLINE Qt_QTableWidgetItem_flags( ::pPtr ) + METHOD font() INLINE Qt_QTableWidgetItem_font( ::pPtr ) + METHOD foreground() INLINE Qt_QTableWidgetItem_foreground( ::pPtr ) + METHOD icon() INLINE Qt_QTableWidgetItem_icon( ::pPtr ) METHOD isSelected() INLINE Qt_QTableWidgetItem_isSelected( ::pPtr ) + METHOD read( pIn ) INLINE Qt_QTableWidgetItem_read( ::pPtr, pIn ) METHOD row() INLINE Qt_QTableWidgetItem_row( ::pPtr ) + METHOD setBackground( pBrush ) INLINE Qt_QTableWidgetItem_setBackground( ::pPtr, pBrush ) METHOD setCheckState( nState ) INLINE Qt_QTableWidgetItem_setCheckState( ::pPtr, nState ) + METHOD setData( nRole, pValue ) INLINE Qt_QTableWidgetItem_setData( ::pPtr, nRole, pValue ) + METHOD setFlags( nFlags ) INLINE Qt_QTableWidgetItem_setFlags( ::pPtr, nFlags ) + METHOD setFont( pFont ) INLINE Qt_QTableWidgetItem_setFont( ::pPtr, pFont ) + METHOD setForeground( pBrush ) INLINE Qt_QTableWidgetItem_setForeground( ::pPtr, pBrush ) METHOD setIcon( cIcon ) INLINE Qt_QTableWidgetItem_setIcon( ::pPtr, cIcon ) METHOD setSelected( lSelect ) INLINE Qt_QTableWidgetItem_setSelected( ::pPtr, lSelect ) - METHOD setSizeHint( aSizeSize ) INLINE Qt_QTableWidgetItem_setSizeHint( ::pPtr, aSizeSize ) + METHOD setSizeHint( pSize ) INLINE Qt_QTableWidgetItem_setSizeHint( ::pPtr, pSize ) METHOD setStatusTip( cStatusTip ) INLINE Qt_QTableWidgetItem_setStatusTip( ::pPtr, cStatusTip ) METHOD setText( cText ) INLINE Qt_QTableWidgetItem_setText( ::pPtr, cText ) METHOD setTextAlignment( nAlignment ) INLINE Qt_QTableWidgetItem_setTextAlignment( ::pPtr, nAlignment ) @@ -84,6 +97,7 @@ CLASS QTableWidgetItem METHOD toolTip() INLINE Qt_QTableWidgetItem_toolTip( ::pPtr ) METHOD type() INLINE Qt_QTableWidgetItem_type( ::pPtr ) METHOD whatsThis() INLINE Qt_QTableWidgetItem_whatsThis( ::pPtr ) + METHOD write( pOut ) INLINE Qt_QTableWidgetItem_write( ::pPtr, pOut ) ENDCLASS @@ -91,6 +105,8 @@ CLASS QTableWidgetItem METHOD New( pParent ) CLASS QTableWidgetItem + ::pParent := pParent + ::pPtr := Qt_QTableWidgetItem( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTextEdit.prg b/harbour/contrib/hbqt/TQTextEdit.prg index f14a94a035..c19df5f714 100644 --- a/harbour/contrib/hbqt/TQTextEdit.prg +++ b/harbour/contrib/hbqt/TQTextEdit.prg @@ -53,23 +53,28 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTextEdit INHERIT QAbstractScrollArea +CREATE CLASS QTextEdit INHERIT QAbstractScrollArea - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD acceptRichText() INLINE Qt_QTextEdit_acceptRichText( ::pPtr ) METHOD alignment() INLINE Qt_QTextEdit_alignment( ::pPtr ) - METHOD anchorAt( aPointPos ) INLINE Qt_QTextEdit_anchorAt( ::pPtr, aPointPos ) + METHOD anchorAt( pPos ) INLINE Qt_QTextEdit_anchorAt( ::pPtr, pPos ) METHOD autoFormatting() INLINE Qt_QTextEdit_autoFormatting( ::pPtr ) METHOD canPaste() INLINE Qt_QTextEdit_canPaste( ::pPtr ) METHOD createStandardContextMenu() INLINE Qt_QTextEdit_createStandardContextMenu( ::pPtr ) - METHOD createStandardContextMenu_1( aPointPosition ) INLINE Qt_QTextEdit_createStandardContextMenu_1( ::pPtr, aPointPosition ) - METHOD cursorRect() INLINE Qt_QTextEdit_cursorRect( ::pPtr ) + METHOD createStandardContextMenu_1( pPosition ) INLINE Qt_QTextEdit_createStandardContextMenu_1( ::pPtr, pPosition ) + METHOD currentCharFormat() INLINE Qt_QTextEdit_currentCharFormat( ::pPtr ) + METHOD currentFont() INLINE Qt_QTextEdit_currentFont( ::pPtr ) + METHOD cursorForPosition( pPos ) INLINE Qt_QTextEdit_cursorForPosition( ::pPtr, pPos ) + METHOD cursorRect( pCursor ) INLINE Qt_QTextEdit_cursorRect( ::pPtr, pCursor ) + METHOD cursorRect_1() INLINE Qt_QTextEdit_cursorRect_1( ::pPtr ) METHOD cursorWidth() INLINE Qt_QTextEdit_cursorWidth( ::pPtr ) METHOD document() INLINE Qt_QTextEdit_document( ::pPtr ) METHOD documentTitle() INLINE Qt_QTextEdit_documentTitle( ::pPtr ) @@ -84,28 +89,61 @@ CLASS QTextEdit INHERIT QAbstractScrollArea METHOD isUndoRedoEnabled() INLINE Qt_QTextEdit_isUndoRedoEnabled( ::pPtr ) METHOD lineWrapColumnOrWidth() INLINE Qt_QTextEdit_lineWrapColumnOrWidth( ::pPtr ) METHOD lineWrapMode() INLINE Qt_QTextEdit_lineWrapMode( ::pPtr ) + METHOD loadResource( nType, pName ) INLINE Qt_QTextEdit_loadResource( ::pPtr, nType, pName ) + METHOD mergeCurrentCharFormat( pModifier ) INLINE Qt_QTextEdit_mergeCurrentCharFormat( ::pPtr, pModifier ) METHOD moveCursor( nOperation, nMode ) INLINE Qt_QTextEdit_moveCursor( ::pPtr, nOperation, nMode ) METHOD overwriteMode() INLINE Qt_QTextEdit_overwriteMode( ::pPtr ) METHOD print( pPrinter ) INLINE Qt_QTextEdit_print( ::pPtr, pPrinter ) METHOD setAcceptRichText( lAccept ) INLINE Qt_QTextEdit_setAcceptRichText( ::pPtr, lAccept ) - METHOD setAutoFormatting( nAutoFormatting ) INLINE Qt_QTextEdit_setAutoFormatting( ::pPtr, nAutoFormatting ) + METHOD setAutoFormatting( nFeatures ) INLINE Qt_QTextEdit_setAutoFormatting( ::pPtr, nFeatures ) + METHOD setCurrentCharFormat( pFormat ) INLINE Qt_QTextEdit_setCurrentCharFormat( ::pPtr, pFormat ) METHOD setCursorWidth( nWidth ) INLINE Qt_QTextEdit_setCursorWidth( ::pPtr, nWidth ) METHOD setDocument( pDocument ) INLINE Qt_QTextEdit_setDocument( ::pPtr, pDocument ) METHOD setDocumentTitle( cTitle ) INLINE Qt_QTextEdit_setDocumentTitle( ::pPtr, cTitle ) METHOD setLineWrapColumnOrWidth( nW ) INLINE Qt_QTextEdit_setLineWrapColumnOrWidth( ::pPtr, nW ) - METHOD setLineWrapMode( nLineWrapMode ) INLINE Qt_QTextEdit_setLineWrapMode( ::pPtr, nLineWrapMode ) + METHOD setLineWrapMode( nMode ) INLINE Qt_QTextEdit_setLineWrapMode( ::pPtr, nMode ) METHOD setOverwriteMode( lOverwrite ) INLINE Qt_QTextEdit_setOverwriteMode( ::pPtr, lOverwrite ) METHOD setReadOnly( lRo ) INLINE Qt_QTextEdit_setReadOnly( ::pPtr, lRo ) METHOD setTabChangesFocus( lB ) INLINE Qt_QTextEdit_setTabChangesFocus( ::pPtr, lB ) METHOD setTabStopWidth( nWidth ) INLINE Qt_QTextEdit_setTabStopWidth( ::pPtr, nWidth ) + METHOD setTextCursor( pCursor ) INLINE Qt_QTextEdit_setTextCursor( ::pPtr, pCursor ) + METHOD setTextInteractionFlags( nFlags ) INLINE Qt_QTextEdit_setTextInteractionFlags( ::pPtr, nFlags ) METHOD setUndoRedoEnabled( lEnable ) INLINE Qt_QTextEdit_setUndoRedoEnabled( ::pPtr, lEnable ) METHOD setWordWrapMode( nPolicy ) INLINE Qt_QTextEdit_setWordWrapMode( ::pPtr, nPolicy ) METHOD tabChangesFocus() INLINE Qt_QTextEdit_tabChangesFocus( ::pPtr ) METHOD tabStopWidth() INLINE Qt_QTextEdit_tabStopWidth( ::pPtr ) + METHOD textBackgroundColor() INLINE Qt_QTextEdit_textBackgroundColor( ::pPtr ) + METHOD textColor() INLINE Qt_QTextEdit_textColor( ::pPtr ) + METHOD textCursor() INLINE Qt_QTextEdit_textCursor( ::pPtr ) METHOD textInteractionFlags() INLINE Qt_QTextEdit_textInteractionFlags( ::pPtr ) METHOD toHtml() INLINE Qt_QTextEdit_toHtml( ::pPtr ) METHOD toPlainText() INLINE Qt_QTextEdit_toPlainText( ::pPtr ) METHOD wordWrapMode() INLINE Qt_QTextEdit_wordWrapMode( ::pPtr ) + METHOD append( cText ) INLINE Qt_QTextEdit_append( ::pPtr, cText ) + METHOD clear() INLINE Qt_QTextEdit_clear( ::pPtr ) + METHOD copy() INLINE Qt_QTextEdit_copy( ::pPtr ) + METHOD cut() INLINE Qt_QTextEdit_cut( ::pPtr ) + METHOD insertHtml( cText ) INLINE Qt_QTextEdit_insertHtml( ::pPtr, cText ) + METHOD insertPlainText( cText ) INLINE Qt_QTextEdit_insertPlainText( ::pPtr, cText ) + METHOD paste() INLINE Qt_QTextEdit_paste( ::pPtr ) + METHOD redo() INLINE Qt_QTextEdit_redo( ::pPtr ) + METHOD scrollToAnchor( cName ) INLINE Qt_QTextEdit_scrollToAnchor( ::pPtr, cName ) + METHOD selectAll() INLINE Qt_QTextEdit_selectAll( ::pPtr ) + METHOD setAlignment( nA ) INLINE Qt_QTextEdit_setAlignment( ::pPtr, nA ) + METHOD setCurrentFont( pF ) INLINE Qt_QTextEdit_setCurrentFont( ::pPtr, pF ) + METHOD setFontFamily( cFontFamily ) INLINE Qt_QTextEdit_setFontFamily( ::pPtr, cFontFamily ) + METHOD setFontItalic( lItalic ) INLINE Qt_QTextEdit_setFontItalic( ::pPtr, lItalic ) + METHOD setFontPointSize( nS ) INLINE Qt_QTextEdit_setFontPointSize( ::pPtr, nS ) + METHOD setFontUnderline( lUnderline ) INLINE Qt_QTextEdit_setFontUnderline( ::pPtr, lUnderline ) + METHOD setFontWeight( nWeight ) INLINE Qt_QTextEdit_setFontWeight( ::pPtr, nWeight ) + METHOD setHtml( cText ) INLINE Qt_QTextEdit_setHtml( ::pPtr, cText ) + METHOD setPlainText( cText ) INLINE Qt_QTextEdit_setPlainText( ::pPtr, cText ) + METHOD setText( cText ) INLINE Qt_QTextEdit_setText( ::pPtr, cText ) + METHOD setTextBackgroundColor( pC ) INLINE Qt_QTextEdit_setTextBackgroundColor( ::pPtr, pC ) + METHOD setTextColor( pC ) INLINE Qt_QTextEdit_setTextColor( ::pPtr, pC ) + METHOD undo() INLINE Qt_QTextEdit_undo( ::pPtr ) + METHOD zoomIn( nRange ) INLINE Qt_QTextEdit_zoomIn( ::pPtr, nRange ) + METHOD zoomOut( nRange ) INLINE Qt_QTextEdit_zoomOut( ::pPtr, nRange ) ENDCLASS @@ -113,6 +151,8 @@ CLASS QTextEdit INHERIT QAbstractScrollArea METHOD New( pParent ) CLASS QTextEdit + ::pParent := pParent + ::pPtr := Qt_QTextEdit( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTimeEdit.prg b/harbour/contrib/hbqt/TQTimeEdit.prg index aa05938fdf..b259a92fb2 100644 --- a/harbour/contrib/hbqt/TQTimeEdit.prg +++ b/harbour/contrib/hbqt/TQTimeEdit.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTimeEdit INHERIT QDateTimeEdit +CREATE CLASS QTimeEdit INHERIT QDateTimeEdit - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QTimeEdit INHERIT QDateTimeEdit METHOD New( pParent ) CLASS QTimeEdit + ::pParent := pParent + ::pPtr := Qt_QTimeEdit( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTimer.prg b/harbour/contrib/hbqt/TQTimer.prg new file mode 100644 index 0000000000..85847fd567 --- /dev/null +++ b/harbour/contrib/hbqt/TQTimer.prg @@ -0,0 +1,89 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QTimer INHERIT QObject + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD interval() INLINE Qt_QTimer_interval( ::pPtr ) + METHOD isActive() INLINE Qt_QTimer_isActive( ::pPtr ) + METHOD isSingleShot() INLINE Qt_QTimer_isSingleShot( ::pPtr ) + METHOD setInterval( nMsec ) INLINE Qt_QTimer_setInterval( ::pPtr, nMsec ) + METHOD setSingleShot( lSingleShot ) INLINE Qt_QTimer_setSingleShot( ::pPtr, lSingleShot ) + METHOD timerId() INLINE Qt_QTimer_timerId( ::pPtr ) + METHOD start() INLINE Qt_QTimer_start( ::pPtr ) + METHOD stop() INLINE Qt_QTimer_stop( ::pPtr ) + METHOD start_1( nMsec ) INLINE Qt_QTimer_start_1( ::pPtr, nMsec ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QTimer + + ::pParent := pParent + + ::pPtr := Qt_QTimer( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQToolBar.prg b/harbour/contrib/hbqt/TQToolBar.prg index a26cc47158..cee9c90c61 100644 --- a/harbour/contrib/hbqt/TQToolBar.prg +++ b/harbour/contrib/hbqt/TQToolBar.prg @@ -53,16 +53,17 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QToolBar INHERIT QWidget +CREATE CLASS QToolBar INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() - METHOD actionAt( aPointP ) INLINE Qt_QToolBar_actionAt( ::pPtr, aPointP ) + METHOD actionAt( pP ) INLINE Qt_QToolBar_actionAt( ::pPtr, pP ) METHOD actionAt_1( nX, nY ) INLINE Qt_QToolBar_actionAt_1( ::pPtr, nX, nY ) METHOD addAction( pAction ) INLINE Qt_QToolBar_addAction( ::pPtr, pAction ) METHOD addAction_1( cText ) INLINE Qt_QToolBar_addAction_1( ::pPtr, cText ) @@ -88,6 +89,8 @@ CLASS QToolBar INHERIT QWidget METHOD toggleViewAction() INLINE Qt_QToolBar_toggleViewAction( ::pPtr ) METHOD toolButtonStyle() INLINE Qt_QToolBar_toolButtonStyle( ::pPtr ) METHOD widgetForAction( pAction ) INLINE Qt_QToolBar_widgetForAction( ::pPtr, pAction ) + METHOD setIconSize( pIconSize ) INLINE Qt_QToolBar_setIconSize( ::pPtr, pIconSize ) + METHOD setToolButtonStyle( nToolButtonStyle ) INLINE Qt_QToolBar_setToolButtonStyle( ::pPtr, nToolButtonStyle ) ENDCLASS @@ -95,6 +98,8 @@ CLASS QToolBar INHERIT QWidget METHOD New( pParent ) CLASS QToolBar + ::pParent := pParent + ::pPtr := Qt_QToolBar( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQToolBox.prg b/harbour/contrib/hbqt/TQToolBox.prg index 2d0acbc264..4111b5a29e 100644 --- a/harbour/contrib/hbqt/TQToolBox.prg +++ b/harbour/contrib/hbqt/TQToolBox.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QToolBox INHERIT QFrame +CREATE CLASS QToolBox INHERIT QFrame - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -71,6 +72,7 @@ CLASS QToolBox INHERIT QFrame METHOD insertItem( nIndex, pWidget, cIcon, cText ) INLINE Qt_QToolBox_insertItem( ::pPtr, nIndex, pWidget, cIcon, cText ) METHOD insertItem_1( nIndex, pWidget, cText ) INLINE Qt_QToolBox_insertItem_1( ::pPtr, nIndex, pWidget, cText ) METHOD isItemEnabled( nIndex ) INLINE Qt_QToolBox_isItemEnabled( ::pPtr, nIndex ) + METHOD itemIcon( nIndex ) INLINE Qt_QToolBox_itemIcon( ::pPtr, nIndex ) METHOD itemText( nIndex ) INLINE Qt_QToolBox_itemText( ::pPtr, nIndex ) METHOD itemToolTip( nIndex ) INLINE Qt_QToolBox_itemToolTip( ::pPtr, nIndex ) METHOD removeItem( nIndex ) INLINE Qt_QToolBox_removeItem( ::pPtr, nIndex ) @@ -79,6 +81,8 @@ CLASS QToolBox INHERIT QFrame METHOD setItemText( nIndex, cText ) INLINE Qt_QToolBox_setItemText( ::pPtr, nIndex, cText ) METHOD setItemToolTip( nIndex, cToolTip ) INLINE Qt_QToolBox_setItemToolTip( ::pPtr, nIndex, cToolTip ) METHOD widget( nIndex ) INLINE Qt_QToolBox_widget( ::pPtr, nIndex ) + METHOD setCurrentIndex( nIndex ) INLINE Qt_QToolBox_setCurrentIndex( ::pPtr, nIndex ) + METHOD setCurrentWidget( pWidget ) INLINE Qt_QToolBox_setCurrentWidget( ::pPtr, pWidget ) ENDCLASS @@ -86,6 +90,8 @@ CLASS QToolBox INHERIT QFrame METHOD New( pParent ) CLASS QToolBox + ::pParent := pParent + ::pPtr := Qt_QToolBox( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQToolButton.prg b/harbour/contrib/hbqt/TQToolButton.prg index db06789cb1..8e28255029 100644 --- a/harbour/contrib/hbqt/TQToolButton.prg +++ b/harbour/contrib/hbqt/TQToolButton.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QToolButton INHERIT QAbstractButton +CREATE CLASS QToolButton INHERIT QAbstractButton - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -70,8 +71,11 @@ CLASS QToolButton INHERIT QAbstractButton METHOD setArrowType( nType ) INLINE Qt_QToolButton_setArrowType( ::pPtr, nType ) METHOD setAutoRaise( lEnable ) INLINE Qt_QToolButton_setAutoRaise( ::pPtr, lEnable ) METHOD setMenu( pMenu ) INLINE Qt_QToolButton_setMenu( ::pPtr, pMenu ) - METHOD setPopupMode( nToolButtonPopupMode ) INLINE Qt_QToolButton_setPopupMode( ::pPtr, nToolButtonPopupMode ) + METHOD setPopupMode( nMode ) INLINE Qt_QToolButton_setPopupMode( ::pPtr, nMode ) METHOD toolButtonStyle() INLINE Qt_QToolButton_toolButtonStyle( ::pPtr ) + METHOD setDefaultAction( pAction ) INLINE Qt_QToolButton_setDefaultAction( ::pPtr, pAction ) + METHOD setToolButtonStyle( nStyle ) INLINE Qt_QToolButton_setToolButtonStyle( ::pPtr, nStyle ) + METHOD showMenu() INLINE Qt_QToolButton_showMenu( ::pPtr ) ENDCLASS @@ -79,6 +83,8 @@ CLASS QToolButton INHERIT QAbstractButton METHOD New( pParent ) CLASS QToolButton + ::pParent := pParent + ::pPtr := Qt_QToolButton( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTreeView.prg b/harbour/contrib/hbqt/TQTreeView.prg index f5043cde6e..08123a5cd6 100644 --- a/harbour/contrib/hbqt/TQTreeView.prg +++ b/harbour/contrib/hbqt/TQTreeView.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTreeView INHERIT QAbstractItemView +CREATE CLASS QTreeView INHERIT QAbstractItemView - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -70,29 +71,47 @@ CLASS QTreeView INHERIT QAbstractItemView METHOD expandsOnDoubleClick() INLINE Qt_QTreeView_expandsOnDoubleClick( ::pPtr ) METHOD header() INLINE Qt_QTreeView_header( ::pPtr ) METHOD indentation() INLINE Qt_QTreeView_indentation( ::pPtr ) + METHOD indexAbove( pIndex ) INLINE Qt_QTreeView_indexAbove( ::pPtr, pIndex ) + METHOD indexBelow( pIndex ) INLINE Qt_QTreeView_indexBelow( ::pPtr, pIndex ) METHOD isAnimated() INLINE Qt_QTreeView_isAnimated( ::pPtr ) METHOD isColumnHidden( nColumn ) INLINE Qt_QTreeView_isColumnHidden( ::pPtr, nColumn ) + METHOD isExpanded( pIndex ) INLINE Qt_QTreeView_isExpanded( ::pPtr, pIndex ) + METHOD isFirstColumnSpanned( nRow, pParent ) INLINE Qt_QTreeView_isFirstColumnSpanned( ::pPtr, nRow, pParent ) METHOD isHeaderHidden() INLINE Qt_QTreeView_isHeaderHidden( ::pPtr ) + METHOD isRowHidden( nRow, pParent ) INLINE Qt_QTreeView_isRowHidden( ::pPtr, nRow, pParent ) METHOD isSortingEnabled() INLINE Qt_QTreeView_isSortingEnabled( ::pPtr ) METHOD itemsExpandable() INLINE Qt_QTreeView_itemsExpandable( ::pPtr ) METHOD rootIsDecorated() INLINE Qt_QTreeView_rootIsDecorated( ::pPtr ) + METHOD scrollTo( pIndex, nHint ) INLINE Qt_QTreeView_scrollTo( ::pPtr, pIndex, nHint ) METHOD setAllColumnsShowFocus( lEnable ) INLINE Qt_QTreeView_setAllColumnsShowFocus( ::pPtr, lEnable ) METHOD setAnimated( lEnable ) INLINE Qt_QTreeView_setAnimated( ::pPtr, lEnable ) METHOD setAutoExpandDelay( nDelay ) INLINE Qt_QTreeView_setAutoExpandDelay( ::pPtr, nDelay ) METHOD setColumnHidden( nColumn, lHide ) INLINE Qt_QTreeView_setColumnHidden( ::pPtr, nColumn, lHide ) METHOD setColumnWidth( nColumn, nWidth ) INLINE Qt_QTreeView_setColumnWidth( ::pPtr, nColumn, nWidth ) + METHOD setExpanded( pIndex, lExpanded ) INLINE Qt_QTreeView_setExpanded( ::pPtr, pIndex, lExpanded ) METHOD setExpandsOnDoubleClick( lEnable ) INLINE Qt_QTreeView_setExpandsOnDoubleClick( ::pPtr, lEnable ) + METHOD setFirstColumnSpanned( nRow, pParent, lSpan ) INLINE Qt_QTreeView_setFirstColumnSpanned( ::pPtr, nRow, pParent, lSpan ) METHOD setHeader( pHeader ) INLINE Qt_QTreeView_setHeader( ::pPtr, pHeader ) METHOD setHeaderHidden( lHide ) INLINE Qt_QTreeView_setHeaderHidden( ::pPtr, lHide ) METHOD setIndentation( nI ) INLINE Qt_QTreeView_setIndentation( ::pPtr, nI ) METHOD setItemsExpandable( lEnable ) INLINE Qt_QTreeView_setItemsExpandable( ::pPtr, lEnable ) METHOD setRootIsDecorated( lShow ) INLINE Qt_QTreeView_setRootIsDecorated( ::pPtr, lShow ) + METHOD setRowHidden( nRow, pParent, lHide ) INLINE Qt_QTreeView_setRowHidden( ::pPtr, nRow, pParent, lHide ) METHOD setSortingEnabled( lEnable ) INLINE Qt_QTreeView_setSortingEnabled( ::pPtr, lEnable ) METHOD setUniformRowHeights( lUniform ) INLINE Qt_QTreeView_setUniformRowHeights( ::pPtr, lUniform ) METHOD setWordWrap( lOn ) INLINE Qt_QTreeView_setWordWrap( ::pPtr, lOn ) METHOD sortByColumn( nColumn, nOrder ) INLINE Qt_QTreeView_sortByColumn( ::pPtr, nColumn, nOrder ) METHOD uniformRowHeights() INLINE Qt_QTreeView_uniformRowHeights( ::pPtr ) + METHOD visualRect( pIndex ) INLINE Qt_QTreeView_visualRect( ::pPtr, pIndex ) METHOD wordWrap() INLINE Qt_QTreeView_wordWrap( ::pPtr ) + METHOD collapse( pIndex ) INLINE Qt_QTreeView_collapse( ::pPtr, pIndex ) + METHOD collapseAll() INLINE Qt_QTreeView_collapseAll( ::pPtr ) + METHOD expand( pIndex ) INLINE Qt_QTreeView_expand( ::pPtr, pIndex ) + METHOD expandAll() INLINE Qt_QTreeView_expandAll( ::pPtr ) + METHOD expandToDepth( nDepth ) INLINE Qt_QTreeView_expandToDepth( ::pPtr, nDepth ) + METHOD hideColumn( nColumn ) INLINE Qt_QTreeView_hideColumn( ::pPtr, nColumn ) + METHOD resizeColumnToContents( nColumn ) INLINE Qt_QTreeView_resizeColumnToContents( ::pPtr, nColumn ) + METHOD showColumn( nColumn ) INLINE Qt_QTreeView_showColumn( ::pPtr, nColumn ) ENDCLASS @@ -100,6 +119,8 @@ CLASS QTreeView INHERIT QAbstractItemView METHOD New( pParent ) CLASS QTreeView + ::pParent := pParent + ::pPtr := Qt_QTreeView( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTreeWidget.prg b/harbour/contrib/hbqt/TQTreeWidget.prg index 12e70684df..bdebce7194 100644 --- a/harbour/contrib/hbqt/TQTreeWidget.prg +++ b/harbour/contrib/hbqt/TQTreeWidget.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTreeWidget INHERIT QTreeView +CREATE CLASS QTreeWidget INHERIT QTreeView - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -74,7 +75,7 @@ CLASS QTreeWidget INHERIT QTreeView METHOD invisibleRootItem() INLINE Qt_QTreeWidget_invisibleRootItem( ::pPtr ) METHOD isFirstItemColumnSpanned( pItem ) INLINE Qt_QTreeWidget_isFirstItemColumnSpanned( ::pPtr, pItem ) METHOD itemAbove( pItem ) INLINE Qt_QTreeWidget_itemAbove( ::pPtr, pItem ) - METHOD itemAt( aPointP ) INLINE Qt_QTreeWidget_itemAt( ::pPtr, aPointP ) + METHOD itemAt( pP ) INLINE Qt_QTreeWidget_itemAt( ::pPtr, pP ) METHOD itemAt_1( nX, nY ) INLINE Qt_QTreeWidget_itemAt_1( ::pPtr, nX, nY ) METHOD itemBelow( pItem ) INLINE Qt_QTreeWidget_itemBelow( ::pPtr, pItem ) METHOD itemWidget( pItem, nColumn ) INLINE Qt_QTreeWidget_itemWidget( ::pPtr, pItem, nColumn ) @@ -87,6 +88,7 @@ CLASS QTreeWidget INHERIT QTreeView METHOD setFirstItemColumnSpanned( pItem, lSpan ) INLINE Qt_QTreeWidget_setFirstItemColumnSpanned( ::pPtr, pItem, lSpan ) METHOD setHeaderItem( pItem ) INLINE Qt_QTreeWidget_setHeaderItem( ::pPtr, pItem ) METHOD setHeaderLabel( cLabel ) INLINE Qt_QTreeWidget_setHeaderLabel( ::pPtr, cLabel ) + METHOD setHeaderLabels( pLabels ) INLINE Qt_QTreeWidget_setHeaderLabels( ::pPtr, pLabels ) METHOD setItemWidget( pItem, nColumn, pWidget ) INLINE Qt_QTreeWidget_setItemWidget( ::pPtr, pItem, nColumn, pWidget ) METHOD sortColumn() INLINE Qt_QTreeWidget_sortColumn( ::pPtr ) METHOD sortItems( nColumn, nOrder ) INLINE Qt_QTreeWidget_sortItems( ::pPtr, nColumn, nOrder ) @@ -94,6 +96,10 @@ CLASS QTreeWidget INHERIT QTreeView METHOD topLevelItem( nIndex ) INLINE Qt_QTreeWidget_topLevelItem( ::pPtr, nIndex ) METHOD topLevelItemCount() INLINE Qt_QTreeWidget_topLevelItemCount( ::pPtr ) METHOD visualItemRect( pItem ) INLINE Qt_QTreeWidget_visualItemRect( ::pPtr, pItem ) + METHOD clear() INLINE Qt_QTreeWidget_clear( ::pPtr ) + METHOD collapseItem( pItem ) INLINE Qt_QTreeWidget_collapseItem( ::pPtr, pItem ) + METHOD expandItem( pItem ) INLINE Qt_QTreeWidget_expandItem( ::pPtr, pItem ) + METHOD scrollToItem( pItem, nHint ) INLINE Qt_QTreeWidget_scrollToItem( ::pPtr, pItem, nHint ) ENDCLASS @@ -101,6 +107,8 @@ CLASS QTreeWidget INHERIT QTreeView METHOD New( pParent ) CLASS QTreeWidget + ::pParent := pParent + ::pPtr := Qt_QTreeWidget( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQTreeWidgetItem.prg b/harbour/contrib/hbqt/TQTreeWidgetItem.prg index e067b035c9..659f6b48a1 100644 --- a/harbour/contrib/hbqt/TQTreeWidgetItem.prg +++ b/harbour/contrib/hbqt/TQTreeWidgetItem.prg @@ -53,22 +53,29 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QTreeWidgetItem +CREATE CLASS QTreeWidgetItem - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD addChild( pChild ) INLINE Qt_QTreeWidgetItem_addChild( ::pPtr, pChild ) + METHOD background( nColumn ) INLINE Qt_QTreeWidgetItem_background( ::pPtr, nColumn ) METHOD checkState( nColumn ) INLINE Qt_QTreeWidgetItem_checkState( ::pPtr, nColumn ) METHOD child( nIndex ) INLINE Qt_QTreeWidgetItem_child( ::pPtr, nIndex ) METHOD childCount() INLINE Qt_QTreeWidgetItem_childCount( ::pPtr ) METHOD childIndicatorPolicy() INLINE Qt_QTreeWidgetItem_childIndicatorPolicy( ::pPtr ) METHOD clone() INLINE Qt_QTreeWidgetItem_clone( ::pPtr ) METHOD columnCount() INLINE Qt_QTreeWidgetItem_columnCount( ::pPtr ) + METHOD data( nColumn, nRole ) INLINE Qt_QTreeWidgetItem_data( ::pPtr, nColumn, nRole ) + METHOD flags() INLINE Qt_QTreeWidgetItem_flags( ::pPtr ) + METHOD font( nColumn ) INLINE Qt_QTreeWidgetItem_font( ::pPtr, nColumn ) + METHOD foreground( nColumn ) INLINE Qt_QTreeWidgetItem_foreground( ::pPtr, nColumn ) + METHOD icon( nColumn ) INLINE Qt_QTreeWidgetItem_icon( ::pPtr, nColumn ) METHOD indexOfChild( pChild ) INLINE Qt_QTreeWidgetItem_indexOfChild( ::pPtr, pChild ) METHOD insertChild( nIndex, pChild ) INLINE Qt_QTreeWidgetItem_insertChild( ::pPtr, nIndex, pChild ) METHOD isDisabled() INLINE Qt_QTreeWidgetItem_isDisabled( ::pPtr ) @@ -77,16 +84,22 @@ CLASS QTreeWidgetItem METHOD isHidden() INLINE Qt_QTreeWidgetItem_isHidden( ::pPtr ) METHOD isSelected() INLINE Qt_QTreeWidgetItem_isSelected( ::pPtr ) METHOD parent() INLINE Qt_QTreeWidgetItem_parent( ::pPtr ) + METHOD read( pIn ) INLINE Qt_QTreeWidgetItem_read( ::pPtr, pIn ) METHOD removeChild( pChild ) INLINE Qt_QTreeWidgetItem_removeChild( ::pPtr, pChild ) + METHOD setBackground( nColumn, pBrush ) INLINE Qt_QTreeWidgetItem_setBackground( ::pPtr, nColumn, pBrush ) METHOD setCheckState( nColumn, nState ) INLINE Qt_QTreeWidgetItem_setCheckState( ::pPtr, nColumn, nState ) METHOD setChildIndicatorPolicy( nPolicy ) INLINE Qt_QTreeWidgetItem_setChildIndicatorPolicy( ::pPtr, nPolicy ) + METHOD setData( nColumn, nRole, pValue ) INLINE Qt_QTreeWidgetItem_setData( ::pPtr, nColumn, nRole, pValue ) METHOD setDisabled( lDisabled ) INLINE Qt_QTreeWidgetItem_setDisabled( ::pPtr, lDisabled ) METHOD setExpanded( lExpand ) INLINE Qt_QTreeWidgetItem_setExpanded( ::pPtr, lExpand ) METHOD setFirstColumnSpanned( lSpan ) INLINE Qt_QTreeWidgetItem_setFirstColumnSpanned( ::pPtr, lSpan ) + METHOD setFlags( nFlags ) INLINE Qt_QTreeWidgetItem_setFlags( ::pPtr, nFlags ) + METHOD setFont( nColumn, pFont ) INLINE Qt_QTreeWidgetItem_setFont( ::pPtr, nColumn, pFont ) + METHOD setForeground( nColumn, pBrush ) INLINE Qt_QTreeWidgetItem_setForeground( ::pPtr, nColumn, pBrush ) METHOD setHidden( lHide ) INLINE Qt_QTreeWidgetItem_setHidden( ::pPtr, lHide ) METHOD setIcon( nColumn, cIcon ) INLINE Qt_QTreeWidgetItem_setIcon( ::pPtr, nColumn, cIcon ) METHOD setSelected( lSelect ) INLINE Qt_QTreeWidgetItem_setSelected( ::pPtr, lSelect ) - METHOD setSizeHint( nColumn, aSizeSize ) INLINE Qt_QTreeWidgetItem_setSizeHint( ::pPtr, nColumn, aSizeSize ) + METHOD setSizeHint( nColumn, pSize ) INLINE Qt_QTreeWidgetItem_setSizeHint( ::pPtr, nColumn, pSize ) METHOD setStatusTip( nColumn, cStatusTip ) INLINE Qt_QTreeWidgetItem_setStatusTip( ::pPtr, nColumn, cStatusTip ) METHOD setText( nColumn, cText ) INLINE Qt_QTreeWidgetItem_setText( ::pPtr, nColumn, cText ) METHOD setTextAlignment( nColumn, nAlignment ) INLINE Qt_QTreeWidgetItem_setTextAlignment( ::pPtr, nColumn, nAlignment ) @@ -109,6 +122,8 @@ CLASS QTreeWidgetItem METHOD New( pParent ) CLASS QTreeWidgetItem + ::pParent := pParent + ::pPtr := Qt_QTreeWidgetItem( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQUrl.prg b/harbour/contrib/hbqt/TQUrl.prg new file mode 100644 index 0000000000..ac39bef9ab --- /dev/null +++ b/harbour/contrib/hbqt/TQUrl.prg @@ -0,0 +1,140 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QUrl INHERIT QWidget + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD addEncodedQueryItem( pKey, pValue ) INLINE Qt_QUrl_addEncodedQueryItem( ::pPtr, pKey, pValue ) + METHOD addQueryItem( cKey, cValue ) INLINE Qt_QUrl_addQueryItem( ::pPtr, cKey, cValue ) + METHOD allQueryItemValues( cKey ) INLINE Qt_QUrl_allQueryItemValues( ::pPtr, cKey ) + METHOD authority() INLINE Qt_QUrl_authority( ::pPtr ) + METHOD clear() INLINE Qt_QUrl_clear( ::pPtr ) + METHOD encodedFragment() INLINE Qt_QUrl_encodedFragment( ::pPtr ) + METHOD encodedHost() INLINE Qt_QUrl_encodedHost( ::pPtr ) + METHOD encodedPassword() INLINE Qt_QUrl_encodedPassword( ::pPtr ) + METHOD encodedPath() INLINE Qt_QUrl_encodedPath( ::pPtr ) + METHOD encodedQuery() INLINE Qt_QUrl_encodedQuery( ::pPtr ) + METHOD encodedQueryItemValue( pKey ) INLINE Qt_QUrl_encodedQueryItemValue( ::pPtr, pKey ) + METHOD encodedUserName() INLINE Qt_QUrl_encodedUserName( ::pPtr ) + METHOD errorString() INLINE Qt_QUrl_errorString( ::pPtr ) + METHOD fragment() INLINE Qt_QUrl_fragment( ::pPtr ) + METHOD hasEncodedQueryItem( pKey ) INLINE Qt_QUrl_hasEncodedQueryItem( ::pPtr, pKey ) + METHOD hasFragment() INLINE Qt_QUrl_hasFragment( ::pPtr ) + METHOD hasQuery() INLINE Qt_QUrl_hasQuery( ::pPtr ) + METHOD hasQueryItem( cKey ) INLINE Qt_QUrl_hasQueryItem( ::pPtr, cKey ) + METHOD host() INLINE Qt_QUrl_host( ::pPtr ) + METHOD isEmpty() INLINE Qt_QUrl_isEmpty( ::pPtr ) + METHOD isParentOf( pChildUrl ) INLINE Qt_QUrl_isParentOf( ::pPtr, pChildUrl ) + METHOD isRelative() INLINE Qt_QUrl_isRelative( ::pPtr ) + METHOD isValid() INLINE Qt_QUrl_isValid( ::pPtr ) + METHOD password() INLINE Qt_QUrl_password( ::pPtr ) + METHOD path() INLINE Qt_QUrl_path( ::pPtr ) + METHOD port() INLINE Qt_QUrl_port( ::pPtr ) + METHOD port_1( nDefaultPort ) INLINE Qt_QUrl_port_1( ::pPtr, nDefaultPort ) + METHOD queryItemValue( cKey ) INLINE Qt_QUrl_queryItemValue( ::pPtr, cKey ) + METHOD queryPairDelimiter() INLINE Qt_QUrl_queryPairDelimiter( ::pPtr ) + METHOD queryValueDelimiter() INLINE Qt_QUrl_queryValueDelimiter( ::pPtr ) + METHOD removeAllEncodedQueryItems( pKey ) INLINE Qt_QUrl_removeAllEncodedQueryItems( ::pPtr, pKey ) + METHOD removeAllQueryItems( cKey ) INLINE Qt_QUrl_removeAllQueryItems( ::pPtr, cKey ) + METHOD removeEncodedQueryItem( pKey ) INLINE Qt_QUrl_removeEncodedQueryItem( ::pPtr, pKey ) + METHOD removeQueryItem( cKey ) INLINE Qt_QUrl_removeQueryItem( ::pPtr, cKey ) + METHOD resolved( pRelative ) INLINE Qt_QUrl_resolved( ::pPtr, pRelative ) + METHOD scheme() INLINE Qt_QUrl_scheme( ::pPtr ) + METHOD setAuthority( cAuthority ) INLINE Qt_QUrl_setAuthority( ::pPtr, cAuthority ) + METHOD setEncodedFragment( pFragment ) INLINE Qt_QUrl_setEncodedFragment( ::pPtr, pFragment ) + METHOD setEncodedHost( pHost ) INLINE Qt_QUrl_setEncodedHost( ::pPtr, pHost ) + METHOD setEncodedPassword( pPassword ) INLINE Qt_QUrl_setEncodedPassword( ::pPtr, pPassword ) + METHOD setEncodedPath( pPath ) INLINE Qt_QUrl_setEncodedPath( ::pPtr, pPath ) + METHOD setEncodedQuery( pQuery ) INLINE Qt_QUrl_setEncodedQuery( ::pPtr, pQuery ) + METHOD setEncodedUrl( pEncodedUrl ) INLINE Qt_QUrl_setEncodedUrl( ::pPtr, pEncodedUrl ) + METHOD setEncodedUrl_1( pEncodedUrl, nParsingMode ) INLINE Qt_QUrl_setEncodedUrl_1( ::pPtr, pEncodedUrl, nParsingMode ) + METHOD setEncodedUserName( pUserName ) INLINE Qt_QUrl_setEncodedUserName( ::pPtr, pUserName ) + METHOD setFragment( cFragment ) INLINE Qt_QUrl_setFragment( ::pPtr, cFragment ) + METHOD setHost( cHost ) INLINE Qt_QUrl_setHost( ::pPtr, cHost ) + METHOD setPassword( cPassword ) INLINE Qt_QUrl_setPassword( ::pPtr, cPassword ) + METHOD setPath( cPath ) INLINE Qt_QUrl_setPath( ::pPtr, cPath ) + METHOD setPort( nPort ) INLINE Qt_QUrl_setPort( ::pPtr, nPort ) + METHOD setScheme( cScheme ) INLINE Qt_QUrl_setScheme( ::pPtr, cScheme ) + METHOD setUrl( cUrl ) INLINE Qt_QUrl_setUrl( ::pPtr, cUrl ) + METHOD setUrl_1( cUrl, nParsingMode ) INLINE Qt_QUrl_setUrl_1( ::pPtr, cUrl, nParsingMode ) + METHOD setUserInfo( cUserInfo ) INLINE Qt_QUrl_setUserInfo( ::pPtr, cUserInfo ) + METHOD setUserName( cUserName ) INLINE Qt_QUrl_setUserName( ::pPtr, cUserName ) + METHOD toEncoded( nOptions ) INLINE Qt_QUrl_toEncoded( ::pPtr, nOptions ) + METHOD toLocalFile() INLINE Qt_QUrl_toLocalFile( ::pPtr ) + METHOD toString( nOptions ) INLINE Qt_QUrl_toString( ::pPtr, nOptions ) + METHOD userInfo() INLINE Qt_QUrl_userInfo( ::pPtr ) + METHOD userName() INLINE Qt_QUrl_userName( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QUrl + + ::pParent := pParent + + ::pPtr := Qt_QUrl( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQVBoxLayout.prg b/harbour/contrib/hbqt/TQVBoxLayout.prg index f4bf37706d..83f6c9f7ea 100644 --- a/harbour/contrib/hbqt/TQVBoxLayout.prg +++ b/harbour/contrib/hbqt/TQVBoxLayout.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QVBoxLayout INHERIT QBoxLayout +CREATE CLASS QVBoxLayout INHERIT QBoxLayout - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -69,6 +70,8 @@ CLASS QVBoxLayout INHERIT QBoxLayout METHOD New( pParent ) CLASS QVBoxLayout + ::pParent := pParent + ::pPtr := Qt_QVBoxLayout( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQVariant.prg b/harbour/contrib/hbqt/TQVariant.prg new file mode 100644 index 0000000000..734e72c935 --- /dev/null +++ b/harbour/contrib/hbqt/TQVariant.prg @@ -0,0 +1,113 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QVariant + + VAR pParent + VAR pPtr + + METHOD New() + + METHOD canConvert( nT ) INLINE Qt_QVariant_canConvert( ::pPtr, nT ) + METHOD canConvert_1( nT ) INLINE Qt_QVariant_canConvert_1( ::pPtr, nT ) + METHOD clear() INLINE Qt_QVariant_clear( ::pPtr ) + METHOD convert( nT ) INLINE Qt_QVariant_convert( ::pPtr, nT ) + METHOD isNull() INLINE Qt_QVariant_isNull( ::pPtr ) + METHOD isValid() INLINE Qt_QVariant_isValid( ::pPtr ) + METHOD setValue( xValue ) INLINE Qt_QVariant_setValue( ::pPtr, xValue ) + METHOD toBitArray() INLINE Qt_QVariant_toBitArray( ::pPtr ) + METHOD toBool() INLINE Qt_QVariant_toBool( ::pPtr ) + METHOD toByteArray() INLINE Qt_QVariant_toByteArray( ::pPtr ) + METHOD toDate() INLINE Qt_QVariant_toDate( ::pPtr ) + METHOD toDateTime() INLINE Qt_QVariant_toDateTime( ::pPtr ) + METHOD toDouble( lOk ) INLINE Qt_QVariant_toDouble( ::pPtr, lOk ) + METHOD toInt( lOk ) INLINE Qt_QVariant_toInt( ::pPtr, lOk ) + METHOD toLine() INLINE Qt_QVariant_toLine( ::pPtr ) + METHOD toLineF() INLINE Qt_QVariant_toLineF( ::pPtr ) + METHOD toLocale() INLINE Qt_QVariant_toLocale( ::pPtr ) + METHOD toLongLong( lOk ) INLINE Qt_QVariant_toLongLong( ::pPtr, lOk ) + METHOD toPoint() INLINE Qt_QVariant_toPoint( ::pPtr ) + METHOD toPointF() INLINE Qt_QVariant_toPointF( ::pPtr ) + METHOD toRect() INLINE Qt_QVariant_toRect( ::pPtr ) + METHOD toRectF() INLINE Qt_QVariant_toRectF( ::pPtr ) + METHOD toRegExp() INLINE Qt_QVariant_toRegExp( ::pPtr ) + METHOD toSize() INLINE Qt_QVariant_toSize( ::pPtr ) + METHOD toSizeF() INLINE Qt_QVariant_toSizeF( ::pPtr ) + METHOD toString() INLINE Qt_QVariant_toString( ::pPtr ) + METHOD toStringList() INLINE Qt_QVariant_toStringList( ::pPtr ) + METHOD toTime() INLINE Qt_QVariant_toTime( ::pPtr ) + METHOD toUInt( lOk ) INLINE Qt_QVariant_toUInt( ::pPtr, lOk ) + METHOD toULongLong( lOk ) INLINE Qt_QVariant_toULongLong( ::pPtr, lOk ) + METHOD toUrl() INLINE Qt_QVariant_toUrl( ::pPtr ) + METHOD type() INLINE Qt_QVariant_type( ::pPtr ) + METHOD userType() INLINE Qt_QVariant_userType( ::pPtr ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QVariant + + ::pParent := pParent + + ::pPtr := Qt_QVariant( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQWebPage.prg b/harbour/contrib/hbqt/TQWebPage.prg index 7cd7bb2084..c284732d53 100644 --- a/harbour/contrib/hbqt/TQWebPage.prg +++ b/harbour/contrib/hbqt/TQWebPage.prg @@ -53,42 +53,48 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QWebPage INHERIT QObject +CREATE CLASS QWebPage INHERIT QObject - DATA pPtr + VAR pParent + VAR pPtr METHOD New() - METHOD action( nWebAction ) INLINE Qt_QWebPage_action( ::pPtr, nWebAction ) + METHOD action( nAction ) INLINE Qt_QWebPage_action( ::pPtr, nAction ) + METHOD bytesReceived() INLINE Qt_QWebPage_bytesReceived( ::pPtr ) METHOD createStandardContextMenu() INLINE Qt_QWebPage_createStandardContextMenu( ::pPtr ) METHOD currentFrame() INLINE Qt_QWebPage_currentFrame( ::pPtr ) - METHOD findText( cSubString, nFindFlags ) INLINE Qt_QWebPage_findText( ::pPtr, cSubString, nFindFlags ) + METHOD findText( cSubString, nOptions ) INLINE Qt_QWebPage_findText( ::pPtr, cSubString, nOptions ) METHOD focusNextPrevChild( lNext ) INLINE Qt_QWebPage_focusNextPrevChild( ::pPtr, lNext ) METHOD forwardUnsupportedContent() INLINE Qt_QWebPage_forwardUnsupportedContent( ::pPtr ) METHOD history() INLINE Qt_QWebPage_history( ::pPtr ) + METHOD inputMethodQuery( nProperty ) INLINE Qt_QWebPage_inputMethodQuery( ::pPtr, nProperty ) METHOD isContentEditable() INLINE Qt_QWebPage_isContentEditable( ::pPtr ) METHOD isModified() INLINE Qt_QWebPage_isModified( ::pPtr ) METHOD linkDelegationPolicy() INLINE Qt_QWebPage_linkDelegationPolicy( ::pPtr ) METHOD mainFrame() INLINE Qt_QWebPage_mainFrame( ::pPtr ) METHOD networkAccessManager() INLINE Qt_QWebPage_networkAccessManager( ::pPtr ) + METHOD palette() INLINE Qt_QWebPage_palette( ::pPtr ) METHOD pluginFactory() INLINE Qt_QWebPage_pluginFactory( ::pPtr ) METHOD selectedText() INLINE Qt_QWebPage_selectedText( ::pPtr ) METHOD setContentEditable( lEditable ) INLINE Qt_QWebPage_setContentEditable( ::pPtr, lEditable ) METHOD setForwardUnsupportedContent( lForward ) INLINE Qt_QWebPage_setForwardUnsupportedContent( ::pPtr, lForward ) - METHOD setLinkDelegationPolicy( nLinkDelegationPolicy ) INLINE Qt_QWebPage_setLinkDelegationPolicy( ::pPtr, nLinkDelegationPolicy ) + METHOD setLinkDelegationPolicy( nPolicy ) INLINE Qt_QWebPage_setLinkDelegationPolicy( ::pPtr, nPolicy ) METHOD setNetworkAccessManager( pManager ) INLINE Qt_QWebPage_setNetworkAccessManager( ::pPtr, pManager ) + METHOD setPalette( pPalette ) INLINE Qt_QWebPage_setPalette( ::pPtr, pPalette ) METHOD setPluginFactory( pFactory ) INLINE Qt_QWebPage_setPluginFactory( ::pPtr, pFactory ) METHOD setView( pView ) INLINE Qt_QWebPage_setView( ::pPtr, pView ) - METHOD setViewportSize( aSizeSize ) INLINE Qt_QWebPage_setViewportSize( ::pPtr, aSizeSize ) + METHOD setViewportSize( pSize ) INLINE Qt_QWebPage_setViewportSize( ::pPtr, pSize ) METHOD settings() INLINE Qt_QWebPage_settings( ::pPtr ) METHOD supportsExtension( nExtension ) INLINE Qt_QWebPage_supportsExtension( ::pPtr, nExtension ) METHOD swallowContextMenuEvent( pEvent ) INLINE Qt_QWebPage_swallowContextMenuEvent( ::pPtr, pEvent ) - METHOD triggerAction( nWebAction, lChecked ) INLINE Qt_QWebPage_triggerAction( ::pPtr, nWebAction, lChecked ) + METHOD totalBytes() INLINE Qt_QWebPage_totalBytes( ::pPtr ) + METHOD triggerAction( nAction, lChecked ) INLINE Qt_QWebPage_triggerAction( ::pPtr, nAction, lChecked ) METHOD undoStack() INLINE Qt_QWebPage_undoStack( ::pPtr ) - METHOD updatePositionDependentActions( aPointPos ) INLINE Qt_QWebPage_updatePositionDependentActions( ::pPtr, aPointPos ) + METHOD updatePositionDependentActions( pPos ) INLINE Qt_QWebPage_updatePositionDependentActions( ::pPtr, pPos ) METHOD view() INLINE Qt_QWebPage_view( ::pPtr ) METHOD viewportSize() INLINE Qt_QWebPage_viewportSize( ::pPtr ) @@ -98,6 +104,8 @@ CLASS QWebPage INHERIT QObject METHOD New( pParent ) CLASS QWebPage + ::pParent := pParent + ::pPtr := Qt_QWebPage( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQWebView.prg b/harbour/contrib/hbqt/TQWebView.prg index cdf93fd77b..d3256f5f4c 100644 --- a/harbour/contrib/hbqt/TQWebView.prg +++ b/harbour/contrib/hbqt/TQWebView.prg @@ -53,28 +53,36 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QWebView INHERIT QWidget +CREATE CLASS QWebView INHERIT QWidget - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD findText( cSubString, nOptions ) INLINE Qt_QWebView_findText( ::pPtr, cSubString, nOptions ) METHOD history() INLINE Qt_QWebView_history( ::pPtr ) + METHOD icon() INLINE Qt_QWebView_icon( ::pPtr ) METHOD isModified() INLINE Qt_QWebView_isModified( ::pPtr ) + METHOD load( pUrl ) INLINE Qt_QWebView_load( ::pPtr, pUrl ) + METHOD load_1( pRequest, nOperation, pBody ) INLINE Qt_QWebView_load_1( ::pPtr, pRequest, nOperation, pBody ) METHOD page() INLINE Qt_QWebView_page( ::pPtr ) METHOD pageAction( nAction ) INLINE Qt_QWebView_pageAction( ::pPtr, nAction ) METHOD selectedText() INLINE Qt_QWebView_selectedText( ::pPtr ) + METHOD setContent( pData, cMimeType ) INLINE Qt_QWebView_setContent( ::pPtr, pData, cMimeType ) + METHOD setHtml( cHtml, pBaseUrl ) INLINE Qt_QWebView_setHtml( ::pPtr, cHtml, pBaseUrl ) METHOD setPage( pPage ) INLINE Qt_QWebView_setPage( ::pPtr, pPage ) METHOD setTextSizeMultiplier( nFactor ) INLINE Qt_QWebView_setTextSizeMultiplier( ::pPtr, nFactor ) + METHOD setUrl( pUrl ) INLINE Qt_QWebView_setUrl( ::pPtr, pUrl ) METHOD setZoomFactor( nFactor ) INLINE Qt_QWebView_setZoomFactor( ::pPtr, nFactor ) METHOD settings() INLINE Qt_QWebView_settings( ::pPtr ) METHOD textSizeMultiplier() INLINE Qt_QWebView_textSizeMultiplier( ::pPtr ) METHOD title() INLINE Qt_QWebView_title( ::pPtr ) METHOD triggerPageAction( nAction, lChecked ) INLINE Qt_QWebView_triggerPageAction( ::pPtr, nAction, lChecked ) + METHOD url() INLINE Qt_QWebView_url( ::pPtr ) METHOD zoomFactor() INLINE Qt_QWebView_zoomFactor( ::pPtr ) METHOD back() INLINE Qt_QWebView_back( ::pPtr ) METHOD forward() INLINE Qt_QWebView_forward( ::pPtr ) @@ -88,6 +96,8 @@ CLASS QWebView INHERIT QWidget METHOD New( pParent ) CLASS QWebView + ::pParent := pParent + ::pPtr := Qt_QWebView( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQWidget.prg b/harbour/contrib/hbqt/TQWidget.prg index 7a34b2b8b6..87e94fcd27 100644 --- a/harbour/contrib/hbqt/TQWidget.prg +++ b/harbour/contrib/hbqt/TQWidget.prg @@ -53,12 +53,13 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QWidget INHERIT QObject, QPaintDevice +CREATE CLASS QWidget INHERIT QObject, QPaintDevice - DATA pPtr + VAR pParent + VAR pPtr METHOD New() @@ -72,27 +73,39 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD backgroundRole() INLINE Qt_QWidget_backgroundRole( ::pPtr ) METHOD baseSize() INLINE Qt_QWidget_baseSize( ::pPtr ) METHOD childAt( nX, nY ) INLINE Qt_QWidget_childAt( ::pPtr, nX, nY ) - METHOD childAt_1( aPointP ) INLINE Qt_QWidget_childAt_1( ::pPtr, aPointP ) + METHOD childAt_1( pP ) INLINE Qt_QWidget_childAt_1( ::pPtr, pP ) METHOD childrenRect() INLINE Qt_QWidget_childrenRect( ::pPtr ) + METHOD childrenRegion() INLINE Qt_QWidget_childrenRegion( ::pPtr ) METHOD clearFocus() INLINE Qt_QWidget_clearFocus( ::pPtr ) METHOD clearMask() INLINE Qt_QWidget_clearMask( ::pPtr ) METHOD contentsRect() INLINE Qt_QWidget_contentsRect( ::pPtr ) METHOD contextMenuPolicy() INLINE Qt_QWidget_contextMenuPolicy( ::pPtr ) + METHOD cursor() INLINE Qt_QWidget_cursor( ::pPtr ) + METHOD effectiveWinId() INLINE Qt_QWidget_effectiveWinId( ::pPtr ) METHOD ensurePolished() INLINE Qt_QWidget_ensurePolished( ::pPtr ) METHOD focusPolicy() INLINE Qt_QWidget_focusPolicy( ::pPtr ) METHOD focusProxy() INLINE Qt_QWidget_focusProxy( ::pPtr ) METHOD focusWidget() INLINE Qt_QWidget_focusWidget( ::pPtr ) + METHOD font() INLINE Qt_QWidget_font( ::pPtr ) + METHOD fontInfo() INLINE Qt_QWidget_fontInfo( ::pPtr ) + METHOD fontMetrics() INLINE Qt_QWidget_fontMetrics( ::pPtr ) METHOD foregroundRole() INLINE Qt_QWidget_foregroundRole( ::pPtr ) METHOD frameGeometry() INLINE Qt_QWidget_frameGeometry( ::pPtr ) METHOD frameSize() INLINE Qt_QWidget_frameSize( ::pPtr ) + METHOD geometry() INLINE Qt_QWidget_geometry( ::pPtr ) + METHOD getContentsMargins( nLeft, nTop, nRight, nBottom ) INLINE Qt_QWidget_getContentsMargins( ::pPtr, nLeft, nTop, nRight, nBottom ) + METHOD getDC() INLINE Qt_QWidget_getDC( ::pPtr ) METHOD grabKeyboard() INLINE Qt_QWidget_grabKeyboard( ::pPtr ) METHOD grabMouse() INLINE Qt_QWidget_grabMouse( ::pPtr ) + METHOD grabMouse_1( pCursor ) INLINE Qt_QWidget_grabMouse_1( ::pPtr, pCursor ) + METHOD grabShortcut( pKey, nContext ) INLINE Qt_QWidget_grabShortcut( ::pPtr, pKey, nContext ) METHOD graphicsProxyWidget() INLINE Qt_QWidget_graphicsProxyWidget( ::pPtr ) METHOD hasFocus() INLINE Qt_QWidget_hasFocus( ::pPtr ) METHOD hasMouseTracking() INLINE Qt_QWidget_hasMouseTracking( ::pPtr ) METHOD height() INLINE Qt_QWidget_height( ::pPtr ) METHOD heightForWidth( nW ) INLINE Qt_QWidget_heightForWidth( ::pPtr, nW ) METHOD inputContext() INLINE Qt_QWidget_inputContext( ::pPtr ) + METHOD inputMethodQuery( nQuery ) INLINE Qt_QWidget_inputMethodQuery( ::pPtr, nQuery ) METHOD insertAction( pBefore, pAction ) INLINE Qt_QWidget_insertAction( ::pPtr, pBefore, pAction ) METHOD isActiveWindow() INLINE Qt_QWidget_isActiveWindow( ::pPtr ) METHOD isAncestorOf( pChild ) INLINE Qt_QWidget_isAncestorOf( ::pPtr, pChild ) @@ -109,12 +122,14 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD isWindowModified() INLINE Qt_QWidget_isWindowModified( ::pPtr ) METHOD layout() INLINE Qt_QWidget_layout( ::pPtr ) METHOD layoutDirection() INLINE Qt_QWidget_layoutDirection( ::pPtr ) - METHOD mapFrom( pParent, aPointPos ) INLINE Qt_QWidget_mapFrom( ::pPtr, pParent, aPointPos ) - METHOD mapFromGlobal( aPointPos ) INLINE Qt_QWidget_mapFromGlobal( ::pPtr, aPointPos ) - METHOD mapFromParent( aPointPos ) INLINE Qt_QWidget_mapFromParent( ::pPtr, aPointPos ) - METHOD mapTo( pParent, aPointPos ) INLINE Qt_QWidget_mapTo( ::pPtr, pParent, aPointPos ) - METHOD mapToGlobal( aPointPos ) INLINE Qt_QWidget_mapToGlobal( ::pPtr, aPointPos ) - METHOD mapToParent( aPointPos ) INLINE Qt_QWidget_mapToParent( ::pPtr, aPointPos ) + METHOD locale() INLINE Qt_QWidget_locale( ::pPtr ) + METHOD mapFrom( pParent, pPos ) INLINE Qt_QWidget_mapFrom( ::pPtr, pParent, pPos ) + METHOD mapFromGlobal( pPos ) INLINE Qt_QWidget_mapFromGlobal( ::pPtr, pPos ) + METHOD mapFromParent( pPos ) INLINE Qt_QWidget_mapFromParent( ::pPtr, pPos ) + METHOD mapTo( pParent, pPos ) INLINE Qt_QWidget_mapTo( ::pPtr, pParent, pPos ) + METHOD mapToGlobal( pPos ) INLINE Qt_QWidget_mapToGlobal( ::pPtr, pPos ) + METHOD mapToParent( pPos ) INLINE Qt_QWidget_mapToParent( ::pPtr, pPos ) + METHOD mask() INLINE Qt_QWidget_mask( ::pPtr ) METHOD maximumHeight() INLINE Qt_QWidget_maximumHeight( ::pPtr ) METHOD maximumSize() INLINE Qt_QWidget_maximumSize( ::pPtr ) METHOD maximumWidth() INLINE Qt_QWidget_maximumWidth( ::pPtr ) @@ -122,62 +137,76 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD minimumSize() INLINE Qt_QWidget_minimumSize( ::pPtr ) METHOD minimumSizeHint() INLINE Qt_QWidget_minimumSizeHint( ::pPtr ) METHOD minimumWidth() INLINE Qt_QWidget_minimumWidth( ::pPtr ) - METHOD move( aPointQPoint ) INLINE Qt_QWidget_move( ::pPtr, aPointQPoint ) - METHOD move_1( nX, nY ) INLINE Qt_QWidget_move_1( ::pPtr, nX, nY ) + METHOD move( nX, nY ) INLINE Qt_QWidget_move( ::pPtr, nX, nY ) + METHOD move_1( pQPoint ) INLINE Qt_QWidget_move_1( ::pPtr, pQPoint ) METHOD nativeParentWidget() INLINE Qt_QWidget_nativeParentWidget( ::pPtr ) METHOD nextInFocusChain() INLINE Qt_QWidget_nextInFocusChain( ::pPtr ) METHOD normalGeometry() INLINE Qt_QWidget_normalGeometry( ::pPtr ) + METHOD overrideWindowFlags( nFlags ) INLINE Qt_QWidget_overrideWindowFlags( ::pPtr, nFlags ) METHOD paintEngine() INLINE Qt_QWidget_paintEngine( ::pPtr ) + METHOD palette() INLINE Qt_QWidget_palette( ::pPtr ) METHOD parentWidget() INLINE Qt_QWidget_parentWidget( ::pPtr ) METHOD pos() INLINE Qt_QWidget_pos( ::pPtr ) METHOD rect() INLINE Qt_QWidget_rect( ::pPtr ) + METHOD releaseDC( hHdc ) INLINE Qt_QWidget_releaseDC( ::pPtr, hHdc ) METHOD releaseKeyboard() INLINE Qt_QWidget_releaseKeyboard( ::pPtr ) METHOD releaseMouse() INLINE Qt_QWidget_releaseMouse( ::pPtr ) METHOD releaseShortcut( nId ) INLINE Qt_QWidget_releaseShortcut( ::pPtr, nId ) METHOD removeAction( pAction ) INLINE Qt_QWidget_removeAction( ::pPtr, pAction ) + METHOD render( pTarget, pTargetOffset ) INLINE Qt_QWidget_render( ::pPtr, pTarget, pTargetOffset ) + METHOD render_1( pPainter, pTargetOffset ) INLINE Qt_QWidget_render_1( ::pPtr, pPainter, pTargetOffset ) METHOD repaint( nX, nY, nW, nH ) INLINE Qt_QWidget_repaint( ::pPtr, nX, nY, nW, nH ) - METHOD repaint_1( aRectRect ) INLINE Qt_QWidget_repaint_1( ::pPtr, aRectRect ) - METHOD resize( aSizeQSize ) INLINE Qt_QWidget_resize( ::pPtr, aSizeQSize ) - METHOD resize_1( nW, nH ) INLINE Qt_QWidget_resize_1( ::pPtr, nW, nH ) + METHOD repaint_1( pRect ) INLINE Qt_QWidget_repaint_1( ::pPtr, pRect ) + METHOD repaint_2( pRgn ) INLINE Qt_QWidget_repaint_2( ::pPtr, pRgn ) + METHOD resize( nW, nH ) INLINE Qt_QWidget_resize( ::pPtr, nW, nH ) + METHOD resize_1( pQSize ) INLINE Qt_QWidget_resize_1( ::pPtr, pQSize ) + METHOD restoreGeometry( pGeometry ) INLINE Qt_QWidget_restoreGeometry( ::pPtr, pGeometry ) + METHOD saveGeometry() INLINE Qt_QWidget_saveGeometry( ::pPtr ) METHOD scroll( nDx, nDy ) INLINE Qt_QWidget_scroll( ::pPtr, nDx, nDy ) - METHOD scroll_1( nDx, nDy, aRectR ) INLINE Qt_QWidget_scroll_1( ::pPtr, nDx, nDy, aRectR ) + METHOD scroll_1( nDx, nDy, pR ) INLINE Qt_QWidget_scroll_1( ::pPtr, nDx, nDy, pR ) METHOD setAcceptDrops( lOn ) INLINE Qt_QWidget_setAcceptDrops( ::pPtr, lOn ) METHOD setAccessibleDescription( cDescription ) INLINE Qt_QWidget_setAccessibleDescription( ::pPtr, cDescription ) METHOD setAccessibleName( cName ) INLINE Qt_QWidget_setAccessibleName( ::pPtr, cName ) METHOD setAttribute( nAttribute, lOn ) INLINE Qt_QWidget_setAttribute( ::pPtr, nAttribute, lOn ) METHOD setAutoFillBackground( lEnabled ) INLINE Qt_QWidget_setAutoFillBackground( ::pPtr, lEnabled ) METHOD setBackgroundRole( nRole ) INLINE Qt_QWidget_setBackgroundRole( ::pPtr, nRole ) - METHOD setBaseSize( aSizeQSize ) INLINE Qt_QWidget_setBaseSize( ::pPtr, aSizeQSize ) + METHOD setBaseSize( pQSize ) INLINE Qt_QWidget_setBaseSize( ::pPtr, pQSize ) METHOD setBaseSize_1( nBasew, nBaseh ) INLINE Qt_QWidget_setBaseSize_1( ::pPtr, nBasew, nBaseh ) METHOD setContentsMargins( nLeft, nTop, nRight, nBottom ) INLINE Qt_QWidget_setContentsMargins( ::pPtr, nLeft, nTop, nRight, nBottom ) METHOD setContextMenuPolicy( nPolicy ) INLINE Qt_QWidget_setContextMenuPolicy( ::pPtr, nPolicy ) + METHOD setCursor( pQCursor ) INLINE Qt_QWidget_setCursor( ::pPtr, pQCursor ) METHOD setFixedHeight( nH ) INLINE Qt_QWidget_setFixedHeight( ::pPtr, nH ) - METHOD setFixedSize( aSizeS ) INLINE Qt_QWidget_setFixedSize( ::pPtr, aSizeS ) + METHOD setFixedSize( pS ) INLINE Qt_QWidget_setFixedSize( ::pPtr, pS ) METHOD setFixedSize_1( nW, nH ) INLINE Qt_QWidget_setFixedSize_1( ::pPtr, nW, nH ) METHOD setFixedWidth( nW ) INLINE Qt_QWidget_setFixedWidth( ::pPtr, nW ) METHOD setFocus( nReason ) INLINE Qt_QWidget_setFocus( ::pPtr, nReason ) METHOD setFocusPolicy( nPolicy ) INLINE Qt_QWidget_setFocusPolicy( ::pPtr, nPolicy ) METHOD setFocusProxy( pW ) INLINE Qt_QWidget_setFocusProxy( ::pPtr, pW ) + METHOD setFont( pQFont ) INLINE Qt_QWidget_setFont( ::pPtr, pQFont ) METHOD setForegroundRole( nRole ) INLINE Qt_QWidget_setForegroundRole( ::pPtr, nRole ) - METHOD setGeometry( aRectQRect ) INLINE Qt_QWidget_setGeometry( ::pPtr, aRectQRect ) + METHOD setGeometry( pQRect ) INLINE Qt_QWidget_setGeometry( ::pPtr, pQRect ) METHOD setGeometry_1( nX, nY, nW, nH ) INLINE Qt_QWidget_setGeometry_1( ::pPtr, nX, nY, nW, nH ) METHOD setInputContext( pContext ) INLINE Qt_QWidget_setInputContext( ::pPtr, pContext ) METHOD setLayout( pLayout ) INLINE Qt_QWidget_setLayout( ::pPtr, pLayout ) METHOD setLayoutDirection( nDirection ) INLINE Qt_QWidget_setLayoutDirection( ::pPtr, nDirection ) + METHOD setLocale( pLocale ) INLINE Qt_QWidget_setLocale( ::pPtr, pLocale ) + METHOD setMask( pBitmap ) INLINE Qt_QWidget_setMask( ::pPtr, pBitmap ) + METHOD setMask_1( pRegion ) INLINE Qt_QWidget_setMask_1( ::pPtr, pRegion ) METHOD setMaximumHeight( nMaxh ) INLINE Qt_QWidget_setMaximumHeight( ::pPtr, nMaxh ) - METHOD setMaximumSize( aSizeQSize ) INLINE Qt_QWidget_setMaximumSize( ::pPtr, aSizeQSize ) + METHOD setMaximumSize( pQSize ) INLINE Qt_QWidget_setMaximumSize( ::pPtr, pQSize ) METHOD setMaximumSize_1( nMaxw, nMaxh ) INLINE Qt_QWidget_setMaximumSize_1( ::pPtr, nMaxw, nMaxh ) METHOD setMaximumWidth( nMaxw ) INLINE Qt_QWidget_setMaximumWidth( ::pPtr, nMaxw ) METHOD setMinimumHeight( nMinh ) INLINE Qt_QWidget_setMinimumHeight( ::pPtr, nMinh ) - METHOD setMinimumSize( aSizeQSize ) INLINE Qt_QWidget_setMinimumSize( ::pPtr, aSizeQSize ) + METHOD setMinimumSize( pQSize ) INLINE Qt_QWidget_setMinimumSize( ::pPtr, pQSize ) METHOD setMinimumSize_1( nMinw, nMinh ) INLINE Qt_QWidget_setMinimumSize_1( ::pPtr, nMinw, nMinh ) METHOD setMinimumWidth( nMinw ) INLINE Qt_QWidget_setMinimumWidth( ::pPtr, nMinw ) METHOD setMouseTracking( lEnable ) INLINE Qt_QWidget_setMouseTracking( ::pPtr, lEnable ) + METHOD setPalette( pQPalette ) INLINE Qt_QWidget_setPalette( ::pPtr, pQPalette ) METHOD setParent( pParent ) INLINE Qt_QWidget_setParent( ::pPtr, pParent ) METHOD setParent_1( pParent, nF ) INLINE Qt_QWidget_setParent_1( ::pPtr, pParent, nF ) METHOD setShortcutAutoRepeat( nId, lEnable ) INLINE Qt_QWidget_setShortcutAutoRepeat( ::pPtr, nId, lEnable ) METHOD setShortcutEnabled( nId, lEnable ) INLINE Qt_QWidget_setShortcutEnabled( ::pPtr, nId, lEnable ) - METHOD setSizeIncrement( aSizeQSize ) INLINE Qt_QWidget_setSizeIncrement( ::pPtr, aSizeQSize ) + METHOD setSizeIncrement( pQSize ) INLINE Qt_QWidget_setSizeIncrement( ::pPtr, pQSize ) METHOD setSizeIncrement_1( nW, nH ) INLINE Qt_QWidget_setSizeIncrement_1( ::pPtr, nW, nH ) METHOD setSizePolicy( nHorizontal, nVertical ) INLINE Qt_QWidget_setSizePolicy( ::pPtr, nHorizontal, nVertical ) METHOD setStatusTip( cQString ) INLINE Qt_QWidget_setStatusTip( ::pPtr, cQString ) @@ -197,6 +226,7 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD size() INLINE Qt_QWidget_size( ::pPtr ) METHOD sizeHint() INLINE Qt_QWidget_sizeHint( ::pPtr ) METHOD sizeIncrement() INLINE Qt_QWidget_sizeIncrement( ::pPtr ) + METHOD sizePolicy() INLINE Qt_QWidget_sizePolicy( ::pPtr ) METHOD stackUnder( pW ) INLINE Qt_QWidget_stackUnder( ::pPtr, pW ) METHOD statusTip() INLINE Qt_QWidget_statusTip( ::pPtr ) METHOD style() INLINE Qt_QWidget_style( ::pPtr ) @@ -208,19 +238,24 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD unsetLayoutDirection() INLINE Qt_QWidget_unsetLayoutDirection( ::pPtr ) METHOD unsetLocale() INLINE Qt_QWidget_unsetLocale( ::pPtr ) METHOD update( nX, nY, nW, nH ) INLINE Qt_QWidget_update( ::pPtr, nX, nY, nW, nH ) - METHOD update_1( aRectRect ) INLINE Qt_QWidget_update_1( ::pPtr, aRectRect ) + METHOD update_1( pRect ) INLINE Qt_QWidget_update_1( ::pPtr, pRect ) + METHOD update_2( pRgn ) INLINE Qt_QWidget_update_2( ::pPtr, pRgn ) METHOD updateGeometry() INLINE Qt_QWidget_updateGeometry( ::pPtr ) METHOD updatesEnabled() INLINE Qt_QWidget_updatesEnabled( ::pPtr ) + METHOD visibleRegion() INLINE Qt_QWidget_visibleRegion( ::pPtr ) METHOD whatsThis() INLINE Qt_QWidget_whatsThis( ::pPtr ) METHOD width() INLINE Qt_QWidget_width( ::pPtr ) + METHOD winId() INLINE Qt_QWidget_winId( ::pPtr ) METHOD window() INLINE Qt_QWidget_window( ::pPtr ) METHOD windowFilePath() INLINE Qt_QWidget_windowFilePath( ::pPtr ) METHOD windowFlags() INLINE Qt_QWidget_windowFlags( ::pPtr ) + METHOD windowIcon() INLINE Qt_QWidget_windowIcon( ::pPtr ) METHOD windowIconText() INLINE Qt_QWidget_windowIconText( ::pPtr ) METHOD windowModality() INLINE Qt_QWidget_windowModality( ::pPtr ) METHOD windowOpacity() INLINE Qt_QWidget_windowOpacity( ::pPtr ) METHOD windowRole() INLINE Qt_QWidget_windowRole( ::pPtr ) METHOD windowState() INLINE Qt_QWidget_windowState( ::pPtr ) + METHOD windowSurface() INLINE Qt_QWidget_windowSurface( ::pPtr ) METHOD windowTitle() INLINE Qt_QWidget_windowTitle( ::pPtr ) METHOD windowType() INLINE Qt_QWidget_windowType( ::pPtr ) METHOD x() INLINE Qt_QWidget_x( ::pPtr ) @@ -229,7 +264,7 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD hide() INLINE Qt_QWidget_hide( ::pPtr ) METHOD lower() INLINE Qt_QWidget_lower( ::pPtr ) METHOD raise() INLINE Qt_QWidget_raise( ::pPtr ) - METHOD repaint_2() INLINE Qt_QWidget_repaint_2( ::pPtr ) + METHOD repaint_3() INLINE Qt_QWidget_repaint_3( ::pPtr ) METHOD setDisabled( lDisable ) INLINE Qt_QWidget_setDisabled( ::pPtr, lDisable ) METHOD setEnabled( lEnable ) INLINE Qt_QWidget_setEnabled( ::pPtr, lEnable ) METHOD setFocus_1() INLINE Qt_QWidget_setFocus_1( ::pPtr ) @@ -243,7 +278,7 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD showMaximized() INLINE Qt_QWidget_showMaximized( ::pPtr ) METHOD showMinimized() INLINE Qt_QWidget_showMinimized( ::pPtr ) METHOD showNormal() INLINE Qt_QWidget_showNormal( ::pPtr ) - METHOD update_2() INLINE Qt_QWidget_update_2( ::pPtr ) + METHOD update_3() INLINE Qt_QWidget_update_3( ::pPtr ) ENDCLASS @@ -251,6 +286,8 @@ CLASS QWidget INHERIT QObject, QPaintDevice METHOD New( pParent ) CLASS QWidget + ::pParent := pParent + ::pPtr := Qt_QWidget( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/TQWindowsStyle.prg b/harbour/contrib/hbqt/TQWindowsStyle.prg new file mode 100644 index 0000000000..dcd9b14217 --- /dev/null +++ b/harbour/contrib/hbqt/TQWindowsStyle.prg @@ -0,0 +1,80 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QWindowsStyle INHERIT QCommonStyle + + VAR pParent + VAR pPtr + + METHOD New() + + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QWindowsStyle + + ::pParent := pParent + + ::pPtr := Qt_QWindowsStyle( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQWindowsXPStyle.prg b/harbour/contrib/hbqt/TQWindowsXPStyle.prg new file mode 100644 index 0000000000..7dce2df01e --- /dev/null +++ b/harbour/contrib/hbqt/TQWindowsXPStyle.prg @@ -0,0 +1,80 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + + +#include "hbclass.ch" + + +CREATE CLASS QWindowsXPStyle INHERIT QWindowsStyle + + VAR pParent + VAR pPtr + + METHOD New() + + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD New( pParent ) CLASS QWindowsXPStyle + + ::pParent := pParent + + ::pPtr := Qt_QWindowsXPStyle( pParent ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/TQWizard.prg b/harbour/contrib/hbqt/TQWizard.prg index 40b5fcd734..61173e9cc6 100644 --- a/harbour/contrib/hbqt/TQWizard.prg +++ b/harbour/contrib/hbqt/TQWizard.prg @@ -53,38 +53,43 @@ /*----------------------------------------------------------------------*/ -#include 'hbclass.ch' +#include "hbclass.ch" -CLASS QWizard INHERIT QDialog +CREATE CLASS QWizard INHERIT QDialog - DATA pPtr + VAR pParent + VAR pPtr METHOD New() METHOD addPage( pPage ) INLINE Qt_QWizard_addPage( ::pPtr, pPage ) - METHOD button( nWizardButton ) INLINE Qt_QWizard_button( ::pPtr, nWizardButton ) - METHOD buttonText( nWizardButton ) INLINE Qt_QWizard_buttonText( ::pPtr, nWizardButton ) + METHOD button( nWhich ) INLINE Qt_QWizard_button( ::pPtr, nWhich ) + METHOD buttonText( nWhich ) INLINE Qt_QWizard_buttonText( ::pPtr, nWhich ) METHOD currentId() INLINE Qt_QWizard_currentId( ::pPtr ) METHOD currentPage() INLINE Qt_QWizard_currentPage( ::pPtr ) + METHOD field( cName ) INLINE Qt_QWizard_field( ::pPtr, cName ) METHOD hasVisitedPage( nId ) INLINE Qt_QWizard_hasVisitedPage( ::pPtr, nId ) METHOD nextId() INLINE Qt_QWizard_nextId( ::pPtr ) METHOD options() INLINE Qt_QWizard_options( ::pPtr ) METHOD page( nId ) INLINE Qt_QWizard_page( ::pPtr, nId ) + METHOD pixmap( nWhich ) INLINE Qt_QWizard_pixmap( ::pPtr, nWhich ) METHOD removePage( nId ) INLINE Qt_QWizard_removePage( ::pPtr, nId ) - METHOD setButton( nWizardButton, pButton ) INLINE Qt_QWizard_setButton( ::pPtr, nWizardButton, pButton ) - METHOD setButtonText( nWizardButton, cText ) INLINE Qt_QWizard_setButtonText( ::pPtr, nWizardButton, cText ) + METHOD setButton( nWhich, pButton ) INLINE Qt_QWizard_setButton( ::pPtr, nWhich, pButton ) + METHOD setButtonText( nWhich, cText ) INLINE Qt_QWizard_setButtonText( ::pPtr, nWhich, cText ) METHOD setDefaultProperty( pClassName, pProperty, pChangedSignal ) INLINE Qt_QWizard_setDefaultProperty( ::pPtr, pClassName, pProperty, pChangedSignal ) - METHOD setOption( nWizardOption, lOn ) INLINE Qt_QWizard_setOption( ::pPtr, nWizardOption, lOn ) - METHOD setOptions( nWizardOptions ) INLINE Qt_QWizard_setOptions( ::pPtr, nWizardOptions ) + METHOD setField( cName, pValue ) INLINE Qt_QWizard_setField( ::pPtr, cName, pValue ) + METHOD setOption( nOption, lOn ) INLINE Qt_QWizard_setOption( ::pPtr, nOption, lOn ) + METHOD setOptions( nOptions ) INLINE Qt_QWizard_setOptions( ::pPtr, nOptions ) METHOD setPage( nId, pPage ) INLINE Qt_QWizard_setPage( ::pPtr, nId, pPage ) + METHOD setPixmap( nWhich, pPixmap ) INLINE Qt_QWizard_setPixmap( ::pPtr, nWhich, pPixmap ) METHOD setStartId( nId ) INLINE Qt_QWizard_setStartId( ::pPtr, nId ) METHOD setSubTitleFormat( nFormat ) INLINE Qt_QWizard_setSubTitleFormat( ::pPtr, nFormat ) METHOD setTitleFormat( nFormat ) INLINE Qt_QWizard_setTitleFormat( ::pPtr, nFormat ) - METHOD setWizardStyle( nWizardStyle ) INLINE Qt_QWizard_setWizardStyle( ::pPtr, nWizardStyle ) + METHOD setWizardStyle( nStyle ) INLINE Qt_QWizard_setWizardStyle( ::pPtr, nStyle ) METHOD startId() INLINE Qt_QWizard_startId( ::pPtr ) METHOD subTitleFormat() INLINE Qt_QWizard_subTitleFormat( ::pPtr ) - METHOD testOption( nWizardOption ) INLINE Qt_QWizard_testOption( ::pPtr, nWizardOption ) + METHOD testOption( nOption ) INLINE Qt_QWizard_testOption( ::pPtr, nOption ) METHOD titleFormat() INLINE Qt_QWizard_titleFormat( ::pPtr ) METHOD validateCurrentPage() INLINE Qt_QWizard_validateCurrentPage( ::pPtr ) METHOD wizardStyle() INLINE Qt_QWizard_wizardStyle( ::pPtr ) @@ -98,6 +103,8 @@ CLASS QWizard INHERIT QDialog METHOD New( pParent ) CLASS QWizard + ::pParent := pParent + ::pPtr := Qt_QWizard( pParent ) RETURN Self diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 613796780c..e223b8b5d5 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -232,8 +232,12 @@ #define hbqt_par_QPaintEvent( n ) ( ( QPaintEvent* ) hb_parptr( n ) ) #define hbqt_par_QInputEvent( n ) ( ( QInputEvent* ) hb_parptr( n ) ) #define hbqt_par_HRGN( n ) ( ( HRGN* ) hb_parptr( n ) ) +#define hbqt_par_QIcon( n ) ( ( QIcon* ) hb_parc( n ) ) +#define hbqt_par_QStyleOption( n ) ( ( QStyleOption* ) hb_parptr( n ) ) +#define hbqt_par_QStyleOptionComplex( n ) ( ( QStyleOptionComplex* ) hb_parptr( n ) ) +#define hbqt_par_QFontMetrics( n ) ( ( QFontMetrics* ) hb_parptr( n ) ) +#define hbqt_par_QStyleHintReturn( n ) ( ( QStyleHintReturn* ) hb_parptr( n ) ) -#define hbqt_par_QIcon( n ) ( ( QIcon ) hb_parc( n ) ) #define hbqt_par_QString( n ) ( ( QString ) hb_parc( n ) ) #define hbqt_par_QRgb( n ) ( hb_parnint( n ) ) #define hbqt_par_Bool( n ) ( hb_parl( n ) ) diff --git a/harbour/contrib/hbqt/hbqt_qabstractbutton.cpp b/harbour/contrib/hbqt/hbqt_qabstractbutton.cpp index 0914467cb9..dedd227eb7 100644 --- a/harbour/contrib/hbqt/hbqt_qabstractbutton.cpp +++ b/harbour/contrib/hbqt/hbqt_qabstractbutton.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,18 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 18/21 [ 85.71% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QIcon icon () const - * void setShortcut ( const QKeySequence & key ) - * QKeySequence shortcut () const - */ - - #include @@ -89,7 +77,7 @@ HB_FUNC( QT_QABSTRACTBUTTON ) */ HB_FUNC( QT_QABSTRACTBUTTON_AUTOEXCLUSIVE ) { - hb_retl( hbqt_par_QAbstractButton( 1 )->autoExclusive( ) ); + hb_retl( hbqt_par_QAbstractButton( 1 )->autoExclusive() ); } /* @@ -97,7 +85,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_AUTOEXCLUSIVE ) */ HB_FUNC( QT_QABSTRACTBUTTON_AUTOREPEAT ) { - hb_retl( hbqt_par_QAbstractButton( 1 )->autoRepeat( ) ); + hb_retl( hbqt_par_QAbstractButton( 1 )->autoRepeat() ); } /* @@ -105,7 +93,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_AUTOREPEAT ) */ HB_FUNC( QT_QABSTRACTBUTTON_AUTOREPEATDELAY ) { - hb_retni( hbqt_par_QAbstractButton( 1 )->autoRepeatDelay( ) ); + hb_retni( hbqt_par_QAbstractButton( 1 )->autoRepeatDelay() ); } /* @@ -113,7 +101,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_AUTOREPEATDELAY ) */ HB_FUNC( QT_QABSTRACTBUTTON_AUTOREPEATINTERVAL ) { - hb_retni( hbqt_par_QAbstractButton( 1 )->autoRepeatInterval( ) ); + hb_retni( hbqt_par_QAbstractButton( 1 )->autoRepeatInterval() ); } /* @@ -121,7 +109,15 @@ HB_FUNC( QT_QABSTRACTBUTTON_AUTOREPEATINTERVAL ) */ HB_FUNC( QT_QABSTRACTBUTTON_GROUP ) { - hb_retptr( ( QButtonGroup* ) hbqt_par_QAbstractButton( 1 )->group( ) ); + hb_retptr( ( QButtonGroup* ) hbqt_par_QAbstractButton( 1 )->group() ); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QABSTRACTBUTTON_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QAbstractButton( 1 )->icon() ) ); } /* @@ -129,7 +125,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_GROUP ) */ HB_FUNC( QT_QABSTRACTBUTTON_ICONSIZE ) { - hbqt_ret_QSize( hbqt_par_QAbstractButton( 1 )->iconSize( ) ); + hb_retptr( new QSize( hbqt_par_QAbstractButton( 1 )->iconSize() ) ); } /* @@ -137,7 +133,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_ICONSIZE ) */ HB_FUNC( QT_QABSTRACTBUTTON_ISCHECKABLE ) { - hb_retl( hbqt_par_QAbstractButton( 1 )->isCheckable( ) ); + hb_retl( hbqt_par_QAbstractButton( 1 )->isCheckable() ); } /* @@ -145,7 +141,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_ISCHECKABLE ) */ HB_FUNC( QT_QABSTRACTBUTTON_ISCHECKED ) { - hb_retl( hbqt_par_QAbstractButton( 1 )->isChecked( ) ); + hb_retl( hbqt_par_QAbstractButton( 1 )->isChecked() ); } /* @@ -153,7 +149,7 @@ HB_FUNC( QT_QABSTRACTBUTTON_ISCHECKED ) */ HB_FUNC( QT_QABSTRACTBUTTON_ISDOWN ) { - hb_retl( hbqt_par_QAbstractButton( 1 )->isDown( ) ); + hb_retl( hbqt_par_QAbstractButton( 1 )->isDown() ); } /* @@ -212,6 +208,14 @@ HB_FUNC( QT_QABSTRACTBUTTON_SETICON ) hbqt_par_QAbstractButton( 1 )->setIcon( QIcon( hbqt_par_QString( 2 ) ) ); } +/* + * void setShortcut ( const QKeySequence & key ) + */ +HB_FUNC( QT_QABSTRACTBUTTON_SETSHORTCUT ) +{ + hbqt_par_QAbstractButton( 1 )->setShortcut( *hbqt_par_QKeySequence( 2 ) ); +} + /* * void setText ( const QString & text ) */ @@ -220,12 +224,60 @@ HB_FUNC( QT_QABSTRACTBUTTON_SETTEXT ) hbqt_par_QAbstractButton( 1 )->setText( hbqt_par_QString( 2 ) ); } +/* + * QKeySequence shortcut () const + */ +HB_FUNC( QT_QABSTRACTBUTTON_SHORTCUT ) +{ + hb_retptr( new QKeySequence( hbqt_par_QAbstractButton( 1 )->shortcut() ) ); +} + /* * QString text () const */ HB_FUNC( QT_QABSTRACTBUTTON_TEXT ) { - hb_retc( hbqt_par_QAbstractButton( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QAbstractButton( 1 )->text().toLatin1().data() ); +} + +/* + * void animateClick ( int msec = 100 ) + */ +HB_FUNC( QT_QABSTRACTBUTTON_ANIMATECLICK ) +{ + hbqt_par_QAbstractButton( 1 )->animateClick( ( HB_ISNIL( 2 ) ? 100 : hb_parni( 2 ) ) ); +} + +/* + * void click () + */ +HB_FUNC( QT_QABSTRACTBUTTON_CLICK ) +{ + hbqt_par_QAbstractButton( 1 )->click(); +} + +/* + * void setChecked ( bool ) + */ +HB_FUNC( QT_QABSTRACTBUTTON_SETCHECKED ) +{ + hbqt_par_QAbstractButton( 1 )->setChecked( hb_parl( 2 ) ); +} + +/* + * void setIconSize ( const QSize & size ) + */ +HB_FUNC( QT_QABSTRACTBUTTON_SETICONSIZE ) +{ + hbqt_par_QAbstractButton( 1 )->setIconSize( *hbqt_par_QSize( 2 ) ); +} + +/* + * void toggle () + */ +HB_FUNC( QT_QABSTRACTBUTTON_TOGGLE ) +{ + hbqt_par_QAbstractButton( 1 )->toggle(); } diff --git a/harbour/contrib/hbqt/hbqt_qabstractitemview.cpp b/harbour/contrib/hbqt/hbqt_qabstractitemview.cpp index a83bf5c6d3..e1dfe62d2c 100644 --- a/harbour/contrib/hbqt/hbqt_qabstractitemview.cpp +++ b/harbour/contrib/hbqt/hbqt_qabstractitemview.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,25 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 43/54 [ 79.63% ] ] - * + * Constructed[ 8/9 [ 88.89% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * void closePersistentEditor ( const QModelIndex & index ) - * QModelIndex currentIndex () const - * virtual QModelIndex indexAt ( const QPoint & point ) const = 0 - * QWidget * indexWidget ( const QModelIndex & index ) const - * QAbstractItemDelegate * itemDelegate ( const QModelIndex & index ) const - * void openPersistentEditor ( const QModelIndex & index ) - * QModelIndex rootIndex () const - * virtual void scrollTo ( const QModelIndex & index, ScrollHint hint = EnsureVisible ) = 0 - * void setIndexWidget ( const QModelIndex & index, QWidget * widget ) - * QSize sizeHintForIndex ( const QModelIndex & index ) const - * virtual QRect visualRect ( const QModelIndex & index ) const = 0 - */ + * + * void update ( const QModelIndex & index + */ #include @@ -93,347 +82,67 @@ HB_FUNC( QT_QABSTRACTITEMVIEW ) } /* - * bool alternatingRowColors () const + * void clearSelection () */ -HB_FUNC( QT_QABSTRACTITEMVIEW_ALTERNATINGROWCOLORS ) +HB_FUNC( QT_QABSTRACTITEMVIEW_CLEARSELECTION ) { - hb_retl( hbqt_par_QAbstractItemView( 1 )->alternatingRowColors( ) ); + hbqt_par_QAbstractItemView( 1 )->clearSelection(); } /* - * int autoScrollMargin () const + * void edit ( const QModelIndex & index ) */ -HB_FUNC( QT_QABSTRACTITEMVIEW_AUTOSCROLLMARGIN ) +HB_FUNC( QT_QABSTRACTITEMVIEW_EDIT ) { - hb_retni( hbqt_par_QAbstractItemView( 1 )->autoScrollMargin( ) ); + hbqt_par_QAbstractItemView( 1 )->edit( *hbqt_par_QModelIndex( 2 ) ); } /* - * DragDropMode dragDropMode () const + * virtual void reset () */ -HB_FUNC( QT_QABSTRACTITEMVIEW_DRAGDROPMODE ) +HB_FUNC( QT_QABSTRACTITEMVIEW_RESET ) { - hb_retni( hbqt_par_QAbstractItemView( 1 )->dragDropMode( ) ); + hbqt_par_QAbstractItemView( 1 )->reset(); } /* - * bool dragDropOverwriteMode () const + * void scrollToBottom () */ -HB_FUNC( QT_QABSTRACTITEMVIEW_DRAGDROPOVERWRITEMODE ) +HB_FUNC( QT_QABSTRACTITEMVIEW_SCROLLTOBOTTOM ) { - hb_retl( hbqt_par_QAbstractItemView( 1 )->dragDropOverwriteMode( ) ); + hbqt_par_QAbstractItemView( 1 )->scrollToBottom(); } /* - * bool dragEnabled () const + * void scrollToTop () */ -HB_FUNC( QT_QABSTRACTITEMVIEW_DRAGENABLED ) +HB_FUNC( QT_QABSTRACTITEMVIEW_SCROLLTOTOP ) { - hb_retl( hbqt_par_QAbstractItemView( 1 )->dragEnabled( ) ); + hbqt_par_QAbstractItemView( 1 )->scrollToTop(); } /* - * EditTriggers editTriggers () const + * virtual void selectAll () */ -HB_FUNC( QT_QABSTRACTITEMVIEW_EDITTRIGGERS ) +HB_FUNC( QT_QABSTRACTITEMVIEW_SELECTALL ) { - hb_retni( hbqt_par_QAbstractItemView( 1 )->editTriggers( ) ); + hbqt_par_QAbstractItemView( 1 )->selectAll(); } /* - * bool hasAutoScroll () const + * void setCurrentIndex ( const QModelIndex & index ) */ -HB_FUNC( QT_QABSTRACTITEMVIEW_HASAUTOSCROLL ) +HB_FUNC( QT_QABSTRACTITEMVIEW_SETCURRENTINDEX ) { - hb_retl( hbqt_par_QAbstractItemView( 1 )->hasAutoScroll( ) ); + hbqt_par_QAbstractItemView( 1 )->setCurrentIndex( *hbqt_par_QModelIndex( 2 ) ); } /* - * ScrollMode horizontalScrollMode () const + * virtual void setRootIndex ( const QModelIndex & index ) */ -HB_FUNC( QT_QABSTRACTITEMVIEW_HORIZONTALSCROLLMODE ) +HB_FUNC( QT_QABSTRACTITEMVIEW_SETROOTINDEX ) { - hb_retni( hbqt_par_QAbstractItemView( 1 )->horizontalScrollMode( ) ); -} - -/* - * QSize iconSize () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_ICONSIZE ) -{ - hbqt_ret_QSize( hbqt_par_QAbstractItemView( 1 )->iconSize( ) ); -} - -/* - * QAbstractItemDelegate * itemDelegate () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_ITEMDELEGATE ) -{ - hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QAbstractItemView( 1 )->itemDelegate( ) ); -} - -/* - * QAbstractItemDelegate * itemDelegateForColumn ( int column ) const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_ITEMDELEGATEFORCOLUMN ) -{ - hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QAbstractItemView( 1 )->itemDelegateForColumn( hb_parni( 2 ) ) ); -} - -/* - * QAbstractItemDelegate * itemDelegateForRow ( int row ) const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_ITEMDELEGATEFORROW ) -{ - hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QAbstractItemView( 1 )->itemDelegateForRow( hb_parni( 2 ) ) ); -} - -/* - * virtual void keyboardSearch ( const QString & search ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_KEYBOARDSEARCH ) -{ - hbqt_par_QAbstractItemView( 1 )->keyboardSearch( hbqt_par_QString( 2 ) ); -} - -/* - * QAbstractItemModel * model () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_MODEL ) -{ - hb_retptr( ( QAbstractItemModel* ) hbqt_par_QAbstractItemView( 1 )->model( ) ); -} - -/* - * QAbstractItemView::SelectionBehavior selectionBehavior () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SELECTIONBEHAVIOR ) -{ - hb_retni( hbqt_par_QAbstractItemView( 1 )->selectionBehavior( ) ); -} - -/* - * QAbstractItemView::SelectionMode selectionMode () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SELECTIONMODE ) -{ - hb_retni( hbqt_par_QAbstractItemView( 1 )->selectionMode( ) ); -} - -/* - * QItemSelectionModel * selectionModel () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SELECTIONMODEL ) -{ - hb_retptr( ( QItemSelectionModel* ) hbqt_par_QAbstractItemView( 1 )->selectionModel( ) ); -} - -/* - * void setAlternatingRowColors ( bool enable ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETALTERNATINGROWCOLORS ) -{ - hbqt_par_QAbstractItemView( 1 )->setAlternatingRowColors( hb_parl( 2 ) ); -} - -/* - * void setAutoScroll ( bool enable ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETAUTOSCROLL ) -{ - hbqt_par_QAbstractItemView( 1 )->setAutoScroll( hb_parl( 2 ) ); -} - -/* - * void setAutoScrollMargin ( int margin ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETAUTOSCROLLMARGIN ) -{ - hbqt_par_QAbstractItemView( 1 )->setAutoScrollMargin( hb_parni( 2 ) ); -} - -/* - * void setDragDropMode ( DragDropMode behavior ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETDRAGDROPMODE ) -{ - hbqt_par_QAbstractItemView( 1 )->setDragDropMode( ( QAbstractItemView::DragDropMode ) hb_parni( 2 ) ); -} - -/* - * void setDragDropOverwriteMode ( bool overwrite ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETDRAGDROPOVERWRITEMODE ) -{ - hbqt_par_QAbstractItemView( 1 )->setDragDropOverwriteMode( hb_parl( 2 ) ); -} - -/* - * void setDragEnabled ( bool enable ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETDRAGENABLED ) -{ - hbqt_par_QAbstractItemView( 1 )->setDragEnabled( hb_parl( 2 ) ); -} - -/* - * void setDropIndicatorShown ( bool enable ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETDROPINDICATORSHOWN ) -{ - hbqt_par_QAbstractItemView( 1 )->setDropIndicatorShown( hb_parl( 2 ) ); -} - -/* - * void setEditTriggers ( EditTriggers triggers ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETEDITTRIGGERS ) -{ - hbqt_par_QAbstractItemView( 1 )->setEditTriggers( ( QAbstractItemView::EditTriggers ) hb_parni( 2 ) ); -} - -/* - * void setHorizontalScrollMode ( ScrollMode mode ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETHORIZONTALSCROLLMODE ) -{ - hbqt_par_QAbstractItemView( 1 )->setHorizontalScrollMode( ( QAbstractItemView::ScrollMode ) hb_parni( 2 ) ); -} - -/* - * void setIconSize ( const QSize & size ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETICONSIZE ) -{ - hbqt_par_QAbstractItemView( 1 )->setIconSize( hbqt_const_QSize( 2 ) ); -} - -/* - * void setItemDelegate ( QAbstractItemDelegate * delegate ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETITEMDELEGATE ) -{ - hbqt_par_QAbstractItemView( 1 )->setItemDelegate( hbqt_par_QAbstractItemDelegate( 2 ) ); -} - -/* - * void setItemDelegateForColumn ( int column, QAbstractItemDelegate * delegate ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETITEMDELEGATEFORCOLUMN ) -{ - hbqt_par_QAbstractItemView( 1 )->setItemDelegateForColumn( hb_parni( 2 ), hbqt_par_QAbstractItemDelegate( 3 ) ); -} - -/* - * void setItemDelegateForRow ( int row, QAbstractItemDelegate * delegate ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETITEMDELEGATEFORROW ) -{ - hbqt_par_QAbstractItemView( 1 )->setItemDelegateForRow( hb_parni( 2 ), hbqt_par_QAbstractItemDelegate( 3 ) ); -} - -/* - * virtual void setModel ( QAbstractItemModel * model ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETMODEL ) -{ - hbqt_par_QAbstractItemView( 1 )->setModel( hbqt_par_QAbstractItemModel( 2 ) ); -} - -/* - * void setSelectionBehavior ( QAbstractItemView::SelectionBehavior behavior ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETSELECTIONBEHAVIOR ) -{ - hbqt_par_QAbstractItemView( 1 )->setSelectionBehavior( ( QAbstractItemView::SelectionBehavior ) hb_parni( 2 ) ); -} - -/* - * void setSelectionMode ( QAbstractItemView::SelectionMode mode ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETSELECTIONMODE ) -{ - hbqt_par_QAbstractItemView( 1 )->setSelectionMode( ( QAbstractItemView::SelectionMode ) hb_parni( 2 ) ); -} - -/* - * virtual void setSelectionModel ( QItemSelectionModel * selectionModel ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETSELECTIONMODEL ) -{ - hbqt_par_QAbstractItemView( 1 )->setSelectionModel( hbqt_par_QItemSelectionModel( 2 ) ); -} - -/* - * void setTabKeyNavigation ( bool enable ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETTABKEYNAVIGATION ) -{ - hbqt_par_QAbstractItemView( 1 )->setTabKeyNavigation( hb_parl( 2 ) ); -} - -/* - * void setTextElideMode ( Qt::TextElideMode mode ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETTEXTELIDEMODE ) -{ - hbqt_par_QAbstractItemView( 1 )->setTextElideMode( ( Qt::TextElideMode ) hb_parni( 2 ) ); -} - -/* - * void setVerticalScrollMode ( ScrollMode mode ) - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SETVERTICALSCROLLMODE ) -{ - hbqt_par_QAbstractItemView( 1 )->setVerticalScrollMode( ( QAbstractItemView::ScrollMode ) hb_parni( 2 ) ); -} - -/* - * bool showDropIndicator () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SHOWDROPINDICATOR ) -{ - hb_retl( hbqt_par_QAbstractItemView( 1 )->showDropIndicator( ) ); -} - -/* - * virtual int sizeHintForColumn ( int column ) const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SIZEHINTFORCOLUMN ) -{ - hb_retni( hbqt_par_QAbstractItemView( 1 )->sizeHintForColumn( hb_parni( 2 ) ) ); -} - -/* - * virtual int sizeHintForRow ( int row ) const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_SIZEHINTFORROW ) -{ - hb_retni( hbqt_par_QAbstractItemView( 1 )->sizeHintForRow( hb_parni( 2 ) ) ); -} - -/* - * bool tabKeyNavigation () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_TABKEYNAVIGATION ) -{ - hb_retl( hbqt_par_QAbstractItemView( 1 )->tabKeyNavigation( ) ); -} - -/* - * Qt::TextElideMode textElideMode () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_TEXTELIDEMODE ) -{ - hb_retni( hbqt_par_QAbstractItemView( 1 )->textElideMode( ) ); -} - -/* - * ScrollMode verticalScrollMode () const - */ -HB_FUNC( QT_QABSTRACTITEMVIEW_VERTICALSCROLLMODE ) -{ - hb_retni( hbqt_par_QAbstractItemView( 1 )->verticalScrollMode( ) ); + hbqt_par_QAbstractItemView( 1 )->setRootIndex( *hbqt_par_QModelIndex( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qabstractprintdialog.cpp b/harbour/contrib/hbqt/hbqt_qabstractprintdialog.cpp index 0b773f45f3..5e4f0ba129 100644 --- a/harbour/contrib/hbqt/hbqt_qabstractprintdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qabstractprintdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,15 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* * Constructed[ 10/11 [ 90.91% ] ] - * + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * void setOptionTabs ( const QList & tabs ) - */ + */ #include @@ -86,7 +85,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_EXEC ) { - hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->exec( ) ); + hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->exec() ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG_EXEC ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_FROMPAGE ) { - hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->fromPage( ) ); + hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->fromPage() ); } /* @@ -102,7 +101,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG_FROMPAGE ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_MAXPAGE ) { - hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->maxPage( ) ); + hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->maxPage() ); } /* @@ -110,7 +109,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG_MAXPAGE ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_MINPAGE ) { - hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->minPage( ) ); + hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->minPage() ); } /* @@ -118,7 +117,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG_MINPAGE ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_PRINTRANGE ) { - hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->printRange( ) ); + hb_retni( ( QAbstractPrintDialog::PrintRange ) hbqt_par_QAbstractPrintDialog( 1 )->printRange() ); } /* @@ -126,7 +125,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG_PRINTRANGE ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_PRINTER ) { - hb_retptr( ( QPrinter* ) hbqt_par_QAbstractPrintDialog( 1 )->printer( ) ); + hb_retptr( ( QPrinter* ) hbqt_par_QAbstractPrintDialog( 1 )->printer() ); } /* @@ -158,7 +157,7 @@ HB_FUNC( QT_QABSTRACTPRINTDIALOG_SETPRINTRANGE ) */ HB_FUNC( QT_QABSTRACTPRINTDIALOG_TOPAGE ) { - hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->toPage( ) ); + hb_retni( hbqt_par_QAbstractPrintDialog( 1 )->toPage() ); } diff --git a/harbour/contrib/hbqt/hbqt_qabstractscrollarea.cpp b/harbour/contrib/hbqt/hbqt_qabstractscrollarea.cpp index 09ee9dc72c..3f4c1a8a1e 100644 --- a/harbour/contrib/hbqt/hbqt_qabstractscrollarea.cpp +++ b/harbour/contrib/hbqt/hbqt_qabstractscrollarea.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 14/15 [ 93.33% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QWidgetList scrollBarWidgets ( Qt::Alignment alignment ) - */ - - #include @@ -95,7 +85,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_ADDSCROLLBARWIDGET ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_CORNERWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QAbstractScrollArea( 1 )->cornerWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QAbstractScrollArea( 1 )->cornerWidget() ); } /* @@ -103,7 +93,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_CORNERWIDGET ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_HORIZONTALSCROLLBAR ) { - hb_retptr( ( QScrollBar* ) hbqt_par_QAbstractScrollArea( 1 )->horizontalScrollBar( ) ); + hb_retptr( ( QScrollBar* ) hbqt_par_QAbstractScrollArea( 1 )->horizontalScrollBar() ); } /* @@ -111,7 +101,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_HORIZONTALSCROLLBAR ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_HORIZONTALSCROLLBARPOLICY ) { - hb_retni( hbqt_par_QAbstractScrollArea( 1 )->horizontalScrollBarPolicy( ) ); + hb_retni( ( Qt::ScrollBarPolicy ) hbqt_par_QAbstractScrollArea( 1 )->horizontalScrollBarPolicy() ); } /* @@ -119,7 +109,15 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_HORIZONTALSCROLLBARPOLICY ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_MAXIMUMVIEWPORTSIZE ) { - hbqt_ret_QSize( hbqt_par_QAbstractScrollArea( 1 )->maximumViewportSize( ) ); + hb_retptr( new QSize( hbqt_par_QAbstractScrollArea( 1 )->maximumViewportSize() ) ); +} + +/* + * QWidgetList scrollBarWidgets ( Qt::Alignment alignment ) + */ +HB_FUNC( QT_QABSTRACTSCROLLAREA_SCROLLBARWIDGETS ) +{ + hb_retptr( new QWidgetList( hbqt_par_QAbstractScrollArea( 1 )->scrollBarWidgets( ( Qt::Alignment ) hb_parni( 2 ) ) ) ); } /* @@ -175,7 +173,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_SETVIEWPORT ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_VERTICALSCROLLBAR ) { - hb_retptr( ( QScrollBar* ) hbqt_par_QAbstractScrollArea( 1 )->verticalScrollBar( ) ); + hb_retptr( ( QScrollBar* ) hbqt_par_QAbstractScrollArea( 1 )->verticalScrollBar() ); } /* @@ -183,7 +181,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_VERTICALSCROLLBAR ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_VERTICALSCROLLBARPOLICY ) { - hb_retni( hbqt_par_QAbstractScrollArea( 1 )->verticalScrollBarPolicy( ) ); + hb_retni( ( Qt::ScrollBarPolicy ) hbqt_par_QAbstractScrollArea( 1 )->verticalScrollBarPolicy() ); } /* @@ -191,7 +189,7 @@ HB_FUNC( QT_QABSTRACTSCROLLAREA_VERTICALSCROLLBARPOLICY ) */ HB_FUNC( QT_QABSTRACTSCROLLAREA_VIEWPORT ) { - hb_retptr( ( QWidget* ) hbqt_par_QAbstractScrollArea( 1 )->viewport( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QAbstractScrollArea( 1 )->viewport() ); } diff --git a/harbour/contrib/hbqt/hbqt_qabstractslider.cpp b/harbour/contrib/hbqt/hbqt_qabstractslider.cpp index 3dfe0ed0eb..9ad10af0b3 100644 --- a/harbour/contrib/hbqt/hbqt_qabstractslider.cpp +++ b/harbour/contrib/hbqt/hbqt_qabstractslider.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QABSTRACTSLIDER ) */ HB_FUNC( QT_QABSTRACTSLIDER_HASTRACKING ) { - hb_retl( hbqt_par_QAbstractSlider( 1 )->hasTracking( ) ); + hb_retl( hbqt_par_QAbstractSlider( 1 )->hasTracking() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_HASTRACKING ) */ HB_FUNC( QT_QABSTRACTSLIDER_INVERTEDAPPEARANCE ) { - hb_retl( hbqt_par_QAbstractSlider( 1 )->invertedAppearance( ) ); + hb_retl( hbqt_par_QAbstractSlider( 1 )->invertedAppearance() ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_INVERTEDAPPEARANCE ) */ HB_FUNC( QT_QABSTRACTSLIDER_INVERTEDCONTROLS ) { - hb_retl( hbqt_par_QAbstractSlider( 1 )->invertedControls( ) ); + hb_retl( hbqt_par_QAbstractSlider( 1 )->invertedControls() ); } /* @@ -102,7 +101,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_INVERTEDCONTROLS ) */ HB_FUNC( QT_QABSTRACTSLIDER_ISSLIDERDOWN ) { - hb_retl( hbqt_par_QAbstractSlider( 1 )->isSliderDown( ) ); + hb_retl( hbqt_par_QAbstractSlider( 1 )->isSliderDown() ); } /* @@ -110,7 +109,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_ISSLIDERDOWN ) */ HB_FUNC( QT_QABSTRACTSLIDER_MAXIMUM ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->maximum( ) ); + hb_retni( hbqt_par_QAbstractSlider( 1 )->maximum() ); } /* @@ -118,7 +117,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_MAXIMUM ) */ HB_FUNC( QT_QABSTRACTSLIDER_MINIMUM ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->minimum( ) ); + hb_retni( hbqt_par_QAbstractSlider( 1 )->minimum() ); } /* @@ -126,7 +125,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_MINIMUM ) */ HB_FUNC( QT_QABSTRACTSLIDER_ORIENTATION ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->orientation( ) ); + hb_retni( ( Qt::Orientation ) hbqt_par_QAbstractSlider( 1 )->orientation() ); } /* @@ -134,7 +133,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_ORIENTATION ) */ HB_FUNC( QT_QABSTRACTSLIDER_PAGESTEP ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->pageStep( ) ); + hb_retni( hbqt_par_QAbstractSlider( 1 )->pageStep() ); } /* @@ -222,7 +221,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_SETTRACKING ) */ HB_FUNC( QT_QABSTRACTSLIDER_SINGLESTEP ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->singleStep( ) ); + hb_retni( hbqt_par_QAbstractSlider( 1 )->singleStep() ); } /* @@ -230,7 +229,7 @@ HB_FUNC( QT_QABSTRACTSLIDER_SINGLESTEP ) */ HB_FUNC( QT_QABSTRACTSLIDER_SLIDERPOSITION ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->sliderPosition( ) ); + hb_retni( hbqt_par_QAbstractSlider( 1 )->sliderPosition() ); } /* @@ -246,7 +245,23 @@ HB_FUNC( QT_QABSTRACTSLIDER_TRIGGERACTION ) */ HB_FUNC( QT_QABSTRACTSLIDER_VALUE ) { - hb_retni( hbqt_par_QAbstractSlider( 1 )->value( ) ); + hb_retni( hbqt_par_QAbstractSlider( 1 )->value() ); +} + +/* + * void setOrientation ( Qt::Orientation ) + */ +HB_FUNC( QT_QABSTRACTSLIDER_SETORIENTATION ) +{ + hbqt_par_QAbstractSlider( 1 )->setOrientation( ( Qt::Orientation ) hb_parni( 2 ) ); +} + +/* + * void setValue ( int ) + */ +HB_FUNC( QT_QABSTRACTSLIDER_SETVALUE ) +{ + hbqt_par_QAbstractSlider( 1 )->setValue( hb_parni( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qabstractspinbox.cpp b/harbour/contrib/hbqt/hbqt_qabstractspinbox.cpp index c711b9f8aa..fcf2fefd55 100644 --- a/harbour/contrib/hbqt/hbqt_qabstractspinbox.cpp +++ b/harbour/contrib/hbqt/hbqt_qabstractspinbox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX ) */ HB_FUNC( QT_QABSTRACTSPINBOX_ALIGNMENT ) { - hb_retni( hbqt_par_QAbstractSpinBox( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QAbstractSpinBox( 1 )->alignment() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_ALIGNMENT ) */ HB_FUNC( QT_QABSTRACTSPINBOX_BUTTONSYMBOLS ) { - hb_retni( hbqt_par_QAbstractSpinBox( 1 )->buttonSymbols( ) ); + hb_retni( ( QAbstractSpinBox::ButtonSymbols ) hbqt_par_QAbstractSpinBox( 1 )->buttonSymbols() ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_BUTTONSYMBOLS ) */ HB_FUNC( QT_QABSTRACTSPINBOX_CORRECTIONMODE ) { - hb_retni( hbqt_par_QAbstractSpinBox( 1 )->correctionMode( ) ); + hb_retni( ( QAbstractSpinBox::CorrectionMode ) hbqt_par_QAbstractSpinBox( 1 )->correctionMode() ); } /* @@ -102,7 +101,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_CORRECTIONMODE ) */ HB_FUNC( QT_QABSTRACTSPINBOX_HASACCEPTABLEINPUT ) { - hb_retl( hbqt_par_QAbstractSpinBox( 1 )->hasAcceptableInput( ) ); + hb_retl( hbqt_par_QAbstractSpinBox( 1 )->hasAcceptableInput() ); } /* @@ -110,7 +109,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_HASACCEPTABLEINPUT ) */ HB_FUNC( QT_QABSTRACTSPINBOX_HASFRAME ) { - hb_retl( hbqt_par_QAbstractSpinBox( 1 )->hasFrame( ) ); + hb_retl( hbqt_par_QAbstractSpinBox( 1 )->hasFrame() ); } /* @@ -118,7 +117,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_HASFRAME ) */ HB_FUNC( QT_QABSTRACTSPINBOX_INTERPRETTEXT ) { - hbqt_par_QAbstractSpinBox( 1 )->interpretText( ); + hbqt_par_QAbstractSpinBox( 1 )->interpretText(); } /* @@ -126,7 +125,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_INTERPRETTEXT ) */ HB_FUNC( QT_QABSTRACTSPINBOX_ISACCELERATED ) { - hb_retl( hbqt_par_QAbstractSpinBox( 1 )->isAccelerated( ) ); + hb_retl( hbqt_par_QAbstractSpinBox( 1 )->isAccelerated() ); } /* @@ -134,7 +133,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_ISACCELERATED ) */ HB_FUNC( QT_QABSTRACTSPINBOX_ISREADONLY ) { - hb_retl( hbqt_par_QAbstractSpinBox( 1 )->isReadOnly( ) ); + hb_retl( hbqt_par_QAbstractSpinBox( 1 )->isReadOnly() ); } /* @@ -142,7 +141,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_ISREADONLY ) */ HB_FUNC( QT_QABSTRACTSPINBOX_KEYBOARDTRACKING ) { - hb_retl( hbqt_par_QAbstractSpinBox( 1 )->keyboardTracking( ) ); + hb_retl( hbqt_par_QAbstractSpinBox( 1 )->keyboardTracking() ); } /* @@ -222,7 +221,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_SETWRAPPING ) */ HB_FUNC( QT_QABSTRACTSPINBOX_SPECIALVALUETEXT ) { - hb_retc( hbqt_par_QAbstractSpinBox( 1 )->specialValueText( ).toLatin1().data() ); + hb_retc( hbqt_par_QAbstractSpinBox( 1 )->specialValueText().toLatin1().data() ); } /* @@ -238,7 +237,7 @@ HB_FUNC( QT_QABSTRACTSPINBOX_STEPBY ) */ HB_FUNC( QT_QABSTRACTSPINBOX_TEXT ) { - hb_retc( hbqt_par_QAbstractSpinBox( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QAbstractSpinBox( 1 )->text().toLatin1().data() ); } /* @@ -246,7 +245,39 @@ HB_FUNC( QT_QABSTRACTSPINBOX_TEXT ) */ HB_FUNC( QT_QABSTRACTSPINBOX_WRAPPING ) { - hb_retl( hbqt_par_QAbstractSpinBox( 1 )->wrapping( ) ); + hb_retl( hbqt_par_QAbstractSpinBox( 1 )->wrapping() ); +} + +/* + * virtual void clear () + */ +HB_FUNC( QT_QABSTRACTSPINBOX_CLEAR ) +{ + hbqt_par_QAbstractSpinBox( 1 )->clear(); +} + +/* + * void selectAll () + */ +HB_FUNC( QT_QABSTRACTSPINBOX_SELECTALL ) +{ + hbqt_par_QAbstractSpinBox( 1 )->selectAll(); +} + +/* + * void stepDown () + */ +HB_FUNC( QT_QABSTRACTSPINBOX_STEPDOWN ) +{ + hbqt_par_QAbstractSpinBox( 1 )->stepDown(); +} + +/* + * void stepUp () + */ +HB_FUNC( QT_QABSTRACTSPINBOX_STEPUP ) +{ + hbqt_par_QAbstractSpinBox( 1 )->stepUp(); } diff --git a/harbour/contrib/hbqt/hbqt_qaction.cpp b/harbour/contrib/hbqt/hbqt_qaction.cpp index 66b22c1a50..0769037f04 100644 --- a/harbour/contrib/hbqt/hbqt_qaction.cpp +++ b/harbour/contrib/hbqt/hbqt_qaction.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,25 +59,17 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 34/45 [ 75.56% ] ] - * + * Constructed[ 48/52 [ 92.31% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * QList associatedGraphicsWidgets () const * QList associatedWidgets () const - * QVariant data () const - * QFont font () const - * QIcon icon () const - * void setData ( const QVariant & userData ) - * void setFont ( const QFont & font ) - * void setShortcut ( const QKeySequence & shortcut ) * void setShortcuts ( const QList & shortcuts ) - * QKeySequence shortcut () const * QList shortcuts () const - */ + */ #include @@ -96,7 +88,7 @@ HB_FUNC( QT_QACTION ) else if( HB_ISPOINTER( 2 ) ) hb_retptr( new QAction( hbqt_par_QString( 1 ), hbqt_par_QObject( 2 ) ) ); else if( HB_ISPOINTER( 3 ) ) - hb_retptr( new QAction( hbqt_par_QIcon( 1 ), hbqt_par_QString( 2 ), hbqt_par_QObject( 3 ) ) ); + hb_retptr( new QAction( *hbqt_par_QIcon( 1 ), hbqt_par_QString( 2 ), hbqt_par_QObject( 3 ) ) ); } /* @@ -104,7 +96,7 @@ HB_FUNC( QT_QACTION ) */ HB_FUNC( QT_QACTION_ACTIONGROUP ) { - hb_retptr( ( QActionGroup* ) hbqt_par_QAction( 1 )->actionGroup( ) ); + hb_retptr( ( QActionGroup* ) hbqt_par_QAction( 1 )->actionGroup() ); } /* @@ -120,7 +112,31 @@ HB_FUNC( QT_QACTION_ACTIVATE ) */ HB_FUNC( QT_QACTION_AUTOREPEAT ) { - hb_retl( hbqt_par_QAction( 1 )->autoRepeat( ) ); + hb_retl( hbqt_par_QAction( 1 )->autoRepeat() ); +} + +/* + * QVariant data () const + */ +HB_FUNC( QT_QACTION_DATA ) +{ + hb_retptr( new QVariant( hbqt_par_QAction( 1 )->data() ) ); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QACTION_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QAction( 1 )->font() ) ); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QACTION_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QAction( 1 )->icon() ) ); } /* @@ -128,7 +144,7 @@ HB_FUNC( QT_QACTION_AUTOREPEAT ) */ HB_FUNC( QT_QACTION_ICONTEXT ) { - hb_retc( hbqt_par_QAction( 1 )->iconText( ).toLatin1().data() ); + hb_retc( hbqt_par_QAction( 1 )->iconText().toLatin1().data() ); } /* @@ -136,7 +152,7 @@ HB_FUNC( QT_QACTION_ICONTEXT ) */ HB_FUNC( QT_QACTION_ISCHECKABLE ) { - hb_retl( hbqt_par_QAction( 1 )->isCheckable( ) ); + hb_retl( hbqt_par_QAction( 1 )->isCheckable() ); } /* @@ -144,7 +160,7 @@ HB_FUNC( QT_QACTION_ISCHECKABLE ) */ HB_FUNC( QT_QACTION_ISCHECKED ) { - hb_retl( hbqt_par_QAction( 1 )->isChecked( ) ); + hb_retl( hbqt_par_QAction( 1 )->isChecked() ); } /* @@ -152,7 +168,7 @@ HB_FUNC( QT_QACTION_ISCHECKED ) */ HB_FUNC( QT_QACTION_ISENABLED ) { - hb_retl( hbqt_par_QAction( 1 )->isEnabled( ) ); + hb_retl( hbqt_par_QAction( 1 )->isEnabled() ); } /* @@ -160,7 +176,7 @@ HB_FUNC( QT_QACTION_ISENABLED ) */ HB_FUNC( QT_QACTION_ISICONVISIBLEINMENU ) { - hb_retl( hbqt_par_QAction( 1 )->isIconVisibleInMenu( ) ); + hb_retl( hbqt_par_QAction( 1 )->isIconVisibleInMenu() ); } /* @@ -168,7 +184,7 @@ HB_FUNC( QT_QACTION_ISICONVISIBLEINMENU ) */ HB_FUNC( QT_QACTION_ISSEPARATOR ) { - hb_retl( hbqt_par_QAction( 1 )->isSeparator( ) ); + hb_retl( hbqt_par_QAction( 1 )->isSeparator() ); } /* @@ -176,7 +192,7 @@ HB_FUNC( QT_QACTION_ISSEPARATOR ) */ HB_FUNC( QT_QACTION_ISVISIBLE ) { - hb_retl( hbqt_par_QAction( 1 )->isVisible( ) ); + hb_retl( hbqt_par_QAction( 1 )->isVisible() ); } /* @@ -184,7 +200,7 @@ HB_FUNC( QT_QACTION_ISVISIBLE ) */ HB_FUNC( QT_QACTION_MENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QAction( 1 )->menu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QAction( 1 )->menu() ); } /* @@ -192,7 +208,7 @@ HB_FUNC( QT_QACTION_MENU ) */ HB_FUNC( QT_QACTION_MENUROLE ) { - hb_retni( hbqt_par_QAction( 1 )->menuRole( ) ); + hb_retni( ( QAction::MenuRole ) hbqt_par_QAction( 1 )->menuRole() ); } /* @@ -200,7 +216,7 @@ HB_FUNC( QT_QACTION_MENUROLE ) */ HB_FUNC( QT_QACTION_PARENTWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QAction( 1 )->parentWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QAction( 1 )->parentWidget() ); } /* @@ -227,6 +243,22 @@ HB_FUNC( QT_QACTION_SETCHECKABLE ) hbqt_par_QAction( 1 )->setCheckable( hb_parl( 2 ) ); } +/* + * void setData ( const QVariant & userData ) + */ +HB_FUNC( QT_QACTION_SETDATA ) +{ + hbqt_par_QAction( 1 )->setData( *hbqt_par_QVariant( 2 ) ); +} + +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QACTION_SETFONT ) +{ + hbqt_par_QAction( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + /* * void setIcon ( const QIcon & icon ) */ @@ -275,6 +307,14 @@ HB_FUNC( QT_QACTION_SETSEPARATOR ) hbqt_par_QAction( 1 )->setSeparator( hb_parl( 2 ) ); } +/* + * void setShortcut ( const QKeySequence & shortcut ) + */ +HB_FUNC( QT_QACTION_SETSHORTCUT ) +{ + hbqt_par_QAction( 1 )->setShortcut( *hbqt_par_QKeySequence( 2 ) ); +} + /* * void setShortcutContext ( Qt::ShortcutContext context ) */ @@ -323,12 +363,20 @@ HB_FUNC( QT_QACTION_SETWHATSTHIS ) hbqt_par_QAction( 1 )->setWhatsThis( hbqt_par_QString( 2 ) ); } +/* + * QKeySequence shortcut () const + */ +HB_FUNC( QT_QACTION_SHORTCUT ) +{ + hb_retptr( new QKeySequence( hbqt_par_QAction( 1 )->shortcut() ) ); +} + /* * Qt::ShortcutContext shortcutContext () const */ HB_FUNC( QT_QACTION_SHORTCUTCONTEXT ) { - hb_retni( hbqt_par_QAction( 1 )->shortcutContext( ) ); + hb_retni( ( Qt::ShortcutContext ) hbqt_par_QAction( 1 )->shortcutContext() ); } /* @@ -344,7 +392,7 @@ HB_FUNC( QT_QACTION_SHOWSTATUSTEXT ) */ HB_FUNC( QT_QACTION_STATUSTIP ) { - hb_retc( hbqt_par_QAction( 1 )->statusTip( ).toLatin1().data() ); + hb_retc( hbqt_par_QAction( 1 )->statusTip().toLatin1().data() ); } /* @@ -352,7 +400,7 @@ HB_FUNC( QT_QACTION_STATUSTIP ) */ HB_FUNC( QT_QACTION_TEXT ) { - hb_retc( hbqt_par_QAction( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QAction( 1 )->text().toLatin1().data() ); } /* @@ -360,7 +408,7 @@ HB_FUNC( QT_QACTION_TEXT ) */ HB_FUNC( QT_QACTION_TOOLTIP ) { - hb_retc( hbqt_par_QAction( 1 )->toolTip( ).toLatin1().data() ); + hb_retc( hbqt_par_QAction( 1 )->toolTip().toLatin1().data() ); } /* @@ -368,7 +416,63 @@ HB_FUNC( QT_QACTION_TOOLTIP ) */ HB_FUNC( QT_QACTION_WHATSTHIS ) { - hb_retc( hbqt_par_QAction( 1 )->whatsThis( ).toLatin1().data() ); + hb_retc( hbqt_par_QAction( 1 )->whatsThis().toLatin1().data() ); +} + +/* + * void hover () + */ +HB_FUNC( QT_QACTION_HOVER ) +{ + hbqt_par_QAction( 1 )->hover(); +} + +/* + * void setChecked ( bool ) + */ +HB_FUNC( QT_QACTION_SETCHECKED ) +{ + hbqt_par_QAction( 1 )->setChecked( hb_parl( 2 ) ); +} + +/* + * void setDisabled ( bool b ) + */ +HB_FUNC( QT_QACTION_SETDISABLED ) +{ + hbqt_par_QAction( 1 )->setDisabled( hb_parl( 2 ) ); +} + +/* + * void setEnabled ( bool ) + */ +HB_FUNC( QT_QACTION_SETENABLED ) +{ + hbqt_par_QAction( 1 )->setEnabled( hb_parl( 2 ) ); +} + +/* + * void setVisible ( bool ) + */ +HB_FUNC( QT_QACTION_SETVISIBLE ) +{ + hbqt_par_QAction( 1 )->setVisible( hb_parl( 2 ) ); +} + +/* + * void toggle () + */ +HB_FUNC( QT_QACTION_TOGGLE ) +{ + hbqt_par_QAction( 1 )->toggle(); +} + +/* + * void trigger () + */ +HB_FUNC( QT_QACTION_TRIGGER ) +{ + hbqt_par_QAction( 1 )->trigger(); } diff --git a/harbour/contrib/hbqt/hbqt_qapplication.cpp b/harbour/contrib/hbqt/hbqt_qapplication.cpp index 4d458cbe86..6521656eab 100644 --- a/harbour/contrib/hbqt/hbqt_qapplication.cpp +++ b/harbour/contrib/hbqt/hbqt_qapplication.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,25 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 6/9 [ 66.67% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * virtual void commitData ( QSessionManager & manager ) - * virtual bool macEventFilter ( EventHandlerCallRef, EventRef ) - * virtual void saveState ( QSessionManager & manager ) - * - * *** Commented out protos which construct fine but do not compile *** - * - * // virtual bool qwsEventFilter ( QWSEvent * ) - * // int qwsProcessEvent ( QWSEvent * ) - * // void qwsSetCustomColors ( QRgb * colortable, int start, int numColors ) - */ - - - #include "hbapi.h" #include "hbinit.h" #include "hbdefs.h" @@ -187,18 +168,20 @@ HB_FUNC( QT_QAPPLICATION_QUIT ) app->quit(); } -HB_FUNC( QT_QAPPLICATION_ABOUTQT ) +/* + * virtual void commitData ( QSessionManager & manager ) + */ +HB_FUNC( QT_QAPPLICATION_COMMITDATA ) { - app->aboutQt(); + hbqt_par_QApplication( 1 )->commitData( *hbqt_par_QSessionManager( 2 ) ); } - /* * QInputContext * inputContext () const */ HB_FUNC( QT_QAPPLICATION_INPUTCONTEXT ) { - hb_retptr( ( QInputContext* ) hbqt_par_QApplication( 1 )->inputContext( ) ); + hb_retptr( ( QInputContext* ) hbqt_par_QApplication( 1 )->inputContext() ); } /* @@ -206,7 +189,15 @@ HB_FUNC( QT_QAPPLICATION_INPUTCONTEXT ) */ HB_FUNC( QT_QAPPLICATION_ISSESSIONRESTORED ) { - hb_retl( hbqt_par_QApplication( 1 )->isSessionRestored( ) ); + hb_retl( hbqt_par_QApplication( 1 )->isSessionRestored() ); +} + +/* + * virtual void saveState ( QSessionManager & manager ) + */ +HB_FUNC( QT_QAPPLICATION_SAVESTATE ) +{ + hbqt_par_QApplication( 1 )->saveState( *hbqt_par_QSessionManager( 2 ) ); } /* @@ -214,7 +205,7 @@ HB_FUNC( QT_QAPPLICATION_ISSESSIONRESTORED ) */ HB_FUNC( QT_QAPPLICATION_SESSIONID ) { - hb_retc( hbqt_par_QApplication( 1 )->sessionId( ).toLatin1().data() ); + hb_retc( hbqt_par_QApplication( 1 )->sessionId().toLatin1().data() ); } /* @@ -222,7 +213,7 @@ HB_FUNC( QT_QAPPLICATION_SESSIONID ) */ HB_FUNC( QT_QAPPLICATION_SESSIONKEY ) { - hb_retc( hbqt_par_QApplication( 1 )->sessionKey( ).toLatin1().data() ); + hb_retc( hbqt_par_QApplication( 1 )->sessionKey().toLatin1().data() ); } /* @@ -238,7 +229,31 @@ HB_FUNC( QT_QAPPLICATION_SETINPUTCONTEXT ) */ HB_FUNC( QT_QAPPLICATION_STYLESHEET ) { - hb_retc( hbqt_par_QApplication( 1 )->styleSheet( ).toLatin1().data() ); + hb_retc( hbqt_par_QApplication( 1 )->styleSheet().toLatin1().data() ); +} + +/* + * void aboutQt () + */ +HB_FUNC( QT_QAPPLICATION_ABOUTQT ) +{ + hbqt_par_QApplication( 1 )->aboutQt(); +} + +/* + * void closeAllWindows () + */ +HB_FUNC( QT_QAPPLICATION_CLOSEALLWINDOWS ) +{ + hbqt_par_QApplication( 1 )->closeAllWindows(); +} + +/* + * void setStyleSheet ( const QString & sheet ) + */ +HB_FUNC( QT_QAPPLICATION_SETSTYLESHEET ) +{ + hbqt_par_QApplication( 1 )->setStyleSheet( hbqt_par_QString( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qbitmap.cpp b/harbour/contrib/hbqt/hbqt_qbitmap.cpp new file mode 100644 index 0000000000..833ad681f8 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qbitmap.cpp @@ -0,0 +1,107 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QBitmap () + * QBitmap ( const QPixmap & pixmap ) + * QBitmap ( int width, int height ) + * QBitmap ( const QSize & size ) + * QBitmap ( const QString & fileName, const char * format = 0 ) + * ~QBitmap () + */ +HB_FUNC( QT_QBITMAP ) +{ + hb_retptr( ( QBitmap* ) new QBitmap() ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QBITMAP_CLEAR ) +{ + hbqt_par_QBitmap( 1 )->clear(); +} + +/* + * QBitmap transformed ( const QTransform & matrix ) const + */ +HB_FUNC( QT_QBITMAP_TRANSFORMED ) +{ + hb_retptr( new QBitmap( hbqt_par_QBitmap( 1 )->transformed( *hbqt_par_QTransform( 2 ) ) ) ); +} + +/* + * QBitmap transformed ( const QMatrix & matrix ) const + */ +HB_FUNC( QT_QBITMAP_TRANSFORMED_1 ) +{ + hb_retptr( new QBitmap( hbqt_par_QBitmap( 1 )->transformed( *hbqt_par_QMatrix( 2 ) ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qboxlayout.cpp b/harbour/contrib/hbqt/hbqt_qboxlayout.cpp index 93eeddb78d..3e2c99ae34 100644 --- a/harbour/contrib/hbqt/hbqt_qboxlayout.cpp +++ b/harbour/contrib/hbqt/hbqt_qboxlayout.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -70,7 +69,7 @@ */ HB_FUNC( QT_QBOXLAYOUT ) { - hb_retptr( ( QBoxLayout* ) new QBoxLayout( ( QBoxLayout::Direction ) hb_parni( 1 ), + hb_retptr( ( QBoxLayout* ) new QBoxLayout( ( QBoxLayout::Direction ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) ); } @@ -79,7 +78,7 @@ HB_FUNC( QT_QBOXLAYOUT ) */ HB_FUNC( QT_QBOXLAYOUT_ADDLAYOUT ) { - hbqt_par_QBoxLayout( 1 )->addLayout( hbqt_par_QLayout( 2 ), hb_parni( 3 ) ); + hbqt_par_QBoxLayout( 1 )->addLayout( hbqt_par_QLayout( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); } /* @@ -103,7 +102,7 @@ HB_FUNC( QT_QBOXLAYOUT_ADDSPACING ) */ HB_FUNC( QT_QBOXLAYOUT_ADDSTRETCH ) { - hbqt_par_QBoxLayout( 1 )->addStretch( hb_parni( 2 ) ); + hbqt_par_QBoxLayout( 1 )->addStretch( ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) ) ); } /* @@ -119,7 +118,7 @@ HB_FUNC( QT_QBOXLAYOUT_ADDSTRUT ) */ HB_FUNC( QT_QBOXLAYOUT_ADDWIDGET ) { - hbqt_par_QBoxLayout( 1 )->addWidget( hbqt_par_QWidget( 2 ), hb_parni( 3 ), ( Qt::Alignment ) hb_parni( 4 ) ); + hbqt_par_QBoxLayout( 1 )->addWidget( hbqt_par_QWidget( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 4 ) ) ); } /* @@ -127,7 +126,7 @@ HB_FUNC( QT_QBOXLAYOUT_ADDWIDGET ) */ HB_FUNC( QT_QBOXLAYOUT_DIRECTION ) { - hb_retni( hbqt_par_QBoxLayout( 1 )->direction( ) ); + hb_retni( ( QBoxLayout::Direction ) hbqt_par_QBoxLayout( 1 )->direction() ); } /* @@ -135,7 +134,7 @@ HB_FUNC( QT_QBOXLAYOUT_DIRECTION ) */ HB_FUNC( QT_QBOXLAYOUT_INSERTLAYOUT ) { - hbqt_par_QBoxLayout( 1 )->insertLayout( hb_parni( 2 ), hbqt_par_QLayout( 3 ), hb_parni( 4 ) ); + hbqt_par_QBoxLayout( 1 )->insertLayout( hb_parni( 2 ), hbqt_par_QLayout( 3 ), ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) ) ); } /* @@ -159,7 +158,7 @@ HB_FUNC( QT_QBOXLAYOUT_INSERTSPACING ) */ HB_FUNC( QT_QBOXLAYOUT_INSERTSTRETCH ) { - hbqt_par_QBoxLayout( 1 )->insertStretch( hb_parni( 2 ), hb_parni( 3 ) ); + hbqt_par_QBoxLayout( 1 )->insertStretch( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); } /* @@ -167,7 +166,7 @@ HB_FUNC( QT_QBOXLAYOUT_INSERTSTRETCH ) */ HB_FUNC( QT_QBOXLAYOUT_INSERTWIDGET ) { - hbqt_par_QBoxLayout( 1 )->insertWidget( hb_parni( 2 ), hbqt_par_QWidget( 3 ), hb_parni( 4 ), ( Qt::Alignment ) hb_parni( 5 ) ); + hbqt_par_QBoxLayout( 1 )->insertWidget( hb_parni( 2 ), hbqt_par_QWidget( 3 ), ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) ), ( HB_ISNIL( 5 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 5 ) ) ); } /* @@ -175,7 +174,7 @@ HB_FUNC( QT_QBOXLAYOUT_INSERTWIDGET ) */ HB_FUNC( QT_QBOXLAYOUT_INVALIDATE ) { - hbqt_par_QBoxLayout( 1 )->invalidate( ); + hbqt_par_QBoxLayout( 1 )->invalidate(); } /* @@ -223,7 +222,7 @@ HB_FUNC( QT_QBOXLAYOUT_SETSTRETCHFACTOR_1 ) */ HB_FUNC( QT_QBOXLAYOUT_SPACING ) { - hb_retni( hbqt_par_QBoxLayout( 1 )->spacing( ) ); + hb_retni( hbqt_par_QBoxLayout( 1 )->spacing() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qbrush.cpp b/harbour/contrib/hbqt/hbqt_qbrush.cpp index e0433d1be2..5d8c4607ba 100644 --- a/harbour/contrib/hbqt/hbqt_qbrush.cpp +++ b/harbour/contrib/hbqt/hbqt_qbrush.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,29 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 4/14 [ 28.57% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * const QColor & color () const - * const QMatrix & matrix () const - * void setColor ( const QColor & color ) - * void setMatrix ( const QMatrix & matrix ) - * void setTexture ( const QPixmap & pixmap ) - * void setTextureImage ( const QImage & image ) - * void setTransform ( const QTransform & matrix ) - * QPixmap texture () const - * QImage textureImage () const - * QTransform transform () const - * - * *** Commented out protos which construct fine but do not compile *** - * - * //const QGradient * gradient () const - */ - - #include @@ -104,22 +81,54 @@ HB_FUNC( QT_QBRUSH ) hb_retptr( ( QBrush* ) new QBrush() ); } +/* + * const QColor & color () const + */ +HB_FUNC( QT_QBRUSH_COLOR ) +{ + hb_retptr( new QColor( hbqt_par_QBrush( 1 )->color() ) ); +} + /* * bool isOpaque () const */ HB_FUNC( QT_QBRUSH_ISOPAQUE ) { - hb_retl( hbqt_par_QBrush( 1 )->isOpaque( ) ); + hb_retl( hbqt_par_QBrush( 1 )->isOpaque() ); +} + +/* + * const QMatrix & matrix () const + */ +HB_FUNC( QT_QBRUSH_MATRIX ) +{ + hb_retptr( new QMatrix( hbqt_par_QBrush( 1 )->matrix() ) ); +} + +/* + * void setColor ( const QColor & color ) + */ +HB_FUNC( QT_QBRUSH_SETCOLOR ) +{ + hbqt_par_QBrush( 1 )->setColor( *hbqt_par_QColor( 2 ) ); } /* * void setColor ( Qt::GlobalColor color ) */ -HB_FUNC( QT_QBRUSH_SETCOLOR ) +HB_FUNC( QT_QBRUSH_SETCOLOR_1 ) { hbqt_par_QBrush( 1 )->setColor( ( Qt::GlobalColor ) hb_parni( 2 ) ); } +/* + * void setMatrix ( const QMatrix & matrix ) + */ +HB_FUNC( QT_QBRUSH_SETMATRIX ) +{ + hbqt_par_QBrush( 1 )->setMatrix( *hbqt_par_QMatrix( 2 ) ); +} + /* * void setStyle ( Qt::BrushStyle style ) */ @@ -128,12 +137,60 @@ HB_FUNC( QT_QBRUSH_SETSTYLE ) hbqt_par_QBrush( 1 )->setStyle( ( Qt::BrushStyle ) hb_parni( 2 ) ); } +/* + * void setTexture ( const QPixmap & pixmap ) + */ +HB_FUNC( QT_QBRUSH_SETTEXTURE ) +{ + hbqt_par_QBrush( 1 )->setTexture( *hbqt_par_QPixmap( 2 ) ); +} + +/* + * void setTextureImage ( const QImage & image ) + */ +HB_FUNC( QT_QBRUSH_SETTEXTUREIMAGE ) +{ + hbqt_par_QBrush( 1 )->setTextureImage( *hbqt_par_QImage( 2 ) ); +} + +/* + * void setTransform ( const QTransform & matrix ) + */ +HB_FUNC( QT_QBRUSH_SETTRANSFORM ) +{ + hbqt_par_QBrush( 1 )->setTransform( *hbqt_par_QTransform( 2 ) ); +} + /* * Qt::BrushStyle style () const */ HB_FUNC( QT_QBRUSH_STYLE ) { - hb_retni( hbqt_par_QBrush( 1 )->style( ) ); + hb_retni( ( Qt::BrushStyle ) hbqt_par_QBrush( 1 )->style() ); +} + +/* + * QPixmap texture () const + */ +HB_FUNC( QT_QBRUSH_TEXTURE ) +{ + hb_retptr( new QPixmap( hbqt_par_QBrush( 1 )->texture() ) ); +} + +/* + * QImage textureImage () const + */ +HB_FUNC( QT_QBRUSH_TEXTUREIMAGE ) +{ + hb_retptr( new QImage( hbqt_par_QBrush( 1 )->textureImage() ) ); +} + +/* + * QTransform transform () const + */ +HB_FUNC( QT_QBRUSH_TRANSFORM ) +{ + hb_retptr( new QTransform( hbqt_par_QBrush( 1 )->transform() ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qcalendarwidget.cpp b/harbour/contrib/hbqt/hbqt_qcalendarwidget.cpp index 61efa54da6..bcde46f5cd 100644 --- a/harbour/contrib/hbqt/hbqt_qcalendarwidget.cpp +++ b/harbour/contrib/hbqt/hbqt_qcalendarwidget.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,30 +59,18 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 16/28 [ 57.14% ] ] - * + * Constructed[ 38/39 [ 97.44% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * QMap dateTextFormat () const - * QTextCharFormat dateTextFormat ( const QDate & date ) const - * QTextCharFormat headerTextFormat () const - * QDate maximumDate () const - * QDate minimumDate () const - * QDate selectedDate () const - * void setDateTextFormat ( const QDate & date, const QTextCharFormat & format ) - * void setHeaderTextFormat ( const QTextCharFormat & format ) - * void setMaximumDate ( const QDate & date ) - * void setMinimumDate ( const QDate & date ) - * void setWeekdayTextFormat ( Qt::DayOfWeek dayOfWeek, const QTextCharFormat & format ) - * QTextCharFormat weekdayTextFormat ( Qt::DayOfWeek dayOfWeek ) const - */ + */ #include - +#include /* * QCalendarWidget ( QWidget * parent = 0 ) @@ -98,7 +86,15 @@ HB_FUNC( QT_QCALENDARWIDGET ) */ HB_FUNC( QT_QCALENDARWIDGET_DATEEDITACCEPTDELAY ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->dateEditAcceptDelay( ) ); + hb_retni( hbqt_par_QCalendarWidget( 1 )->dateEditAcceptDelay() ); +} + +/* + * QTextCharFormat dateTextFormat ( const QDate & date ) const + */ +HB_FUNC( QT_QCALENDARWIDGET_DATETEXTFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QCalendarWidget( 1 )->dateTextFormat( *hbqt_par_QDate( 2 ) ) ) ); } /* @@ -106,7 +102,15 @@ HB_FUNC( QT_QCALENDARWIDGET_DATEEDITACCEPTDELAY ) */ HB_FUNC( QT_QCALENDARWIDGET_FIRSTDAYOFWEEK ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->firstDayOfWeek( ) ); + hb_retni( ( Qt::DayOfWeek ) hbqt_par_QCalendarWidget( 1 )->firstDayOfWeek() ); +} + +/* + * QTextCharFormat headerTextFormat () const + */ +HB_FUNC( QT_QCALENDARWIDGET_HEADERTEXTFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QCalendarWidget( 1 )->headerTextFormat() ) ); } /* @@ -114,7 +118,7 @@ HB_FUNC( QT_QCALENDARWIDGET_FIRSTDAYOFWEEK ) */ HB_FUNC( QT_QCALENDARWIDGET_HORIZONTALHEADERFORMAT ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->horizontalHeaderFormat( ) ); + hb_retni( ( QCalendarWidget::HorizontalHeaderFormat ) hbqt_par_QCalendarWidget( 1 )->horizontalHeaderFormat() ); } /* @@ -122,7 +126,7 @@ HB_FUNC( QT_QCALENDARWIDGET_HORIZONTALHEADERFORMAT ) */ HB_FUNC( QT_QCALENDARWIDGET_ISDATEEDITENABLED ) { - hb_retl( hbqt_par_QCalendarWidget( 1 )->isDateEditEnabled( ) ); + hb_retl( hbqt_par_QCalendarWidget( 1 )->isDateEditEnabled() ); } /* @@ -130,7 +134,7 @@ HB_FUNC( QT_QCALENDARWIDGET_ISDATEEDITENABLED ) */ HB_FUNC( QT_QCALENDARWIDGET_ISGRIDVISIBLE ) { - hb_retl( hbqt_par_QCalendarWidget( 1 )->isGridVisible( ) ); + hb_retl( hbqt_par_QCalendarWidget( 1 )->isGridVisible() ); } /* @@ -138,7 +142,23 @@ HB_FUNC( QT_QCALENDARWIDGET_ISGRIDVISIBLE ) */ HB_FUNC( QT_QCALENDARWIDGET_ISNAVIGATIONBARVISIBLE ) { - hb_retl( hbqt_par_QCalendarWidget( 1 )->isNavigationBarVisible( ) ); + hb_retl( hbqt_par_QCalendarWidget( 1 )->isNavigationBarVisible() ); +} + +/* + * QDate maximumDate () const + */ +HB_FUNC( QT_QCALENDARWIDGET_MAXIMUMDATE ) +{ + hb_retptr( new QDate( hbqt_par_QCalendarWidget( 1 )->maximumDate() ) ); +} + +/* + * QDate minimumDate () const + */ +HB_FUNC( QT_QCALENDARWIDGET_MINIMUMDATE ) +{ + hb_retptr( new QDate( hbqt_par_QCalendarWidget( 1 )->minimumDate() ) ); } /* @@ -146,7 +166,15 @@ HB_FUNC( QT_QCALENDARWIDGET_ISNAVIGATIONBARVISIBLE ) */ HB_FUNC( QT_QCALENDARWIDGET_MONTHSHOWN ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->monthShown( ) ); + hb_retni( hbqt_par_QCalendarWidget( 1 )->monthShown() ); +} + +/* + * QDate selectedDate () const + */ +HB_FUNC( QT_QCALENDARWIDGET_SELECTEDDATE ) +{ + hb_retptr( new QDate( hbqt_par_QCalendarWidget( 1 )->selectedDate() ) ); } /* @@ -154,7 +182,7 @@ HB_FUNC( QT_QCALENDARWIDGET_MONTHSHOWN ) */ HB_FUNC( QT_QCALENDARWIDGET_SELECTIONMODE ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->selectionMode( ) ); + hb_retni( ( QCalendarWidget::SelectionMode ) hbqt_par_QCalendarWidget( 1 )->selectionMode() ); } /* @@ -173,6 +201,14 @@ HB_FUNC( QT_QCALENDARWIDGET_SETDATEEDITENABLED ) hbqt_par_QCalendarWidget( 1 )->setDateEditEnabled( hb_parl( 2 ) ); } +/* + * void setDateTextFormat ( const QDate & date, const QTextCharFormat & format ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETDATETEXTFORMAT ) +{ + hbqt_par_QCalendarWidget( 1 )->setDateTextFormat( *hbqt_par_QDate( 2 ), *hbqt_par_QTextCharFormat( 3 ) ); +} + /* * void setFirstDayOfWeek ( Qt::DayOfWeek dayOfWeek ) */ @@ -181,6 +217,14 @@ HB_FUNC( QT_QCALENDARWIDGET_SETFIRSTDAYOFWEEK ) hbqt_par_QCalendarWidget( 1 )->setFirstDayOfWeek( ( Qt::DayOfWeek ) hb_parni( 2 ) ); } +/* + * void setHeaderTextFormat ( const QTextCharFormat & format ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETHEADERTEXTFORMAT ) +{ + hbqt_par_QCalendarWidget( 1 )->setHeaderTextFormat( *hbqt_par_QTextCharFormat( 2 ) ); +} + /* * void setHorizontalHeaderFormat ( HorizontalHeaderFormat format ) */ @@ -189,6 +233,22 @@ HB_FUNC( QT_QCALENDARWIDGET_SETHORIZONTALHEADERFORMAT ) hbqt_par_QCalendarWidget( 1 )->setHorizontalHeaderFormat( ( QCalendarWidget::HorizontalHeaderFormat ) hb_parni( 2 ) ); } +/* + * void setMaximumDate ( const QDate & date ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETMAXIMUMDATE ) +{ + hbqt_par_QCalendarWidget( 1 )->setMaximumDate( *hbqt_par_QDate( 2 ) ); +} + +/* + * void setMinimumDate ( const QDate & date ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETMINIMUMDATE ) +{ + hbqt_par_QCalendarWidget( 1 )->setMinimumDate( *hbqt_par_QDate( 2 ) ); +} + /* * void setSelectionMode ( SelectionMode mode ) */ @@ -205,12 +265,28 @@ HB_FUNC( QT_QCALENDARWIDGET_SETVERTICALHEADERFORMAT ) hbqt_par_QCalendarWidget( 1 )->setVerticalHeaderFormat( ( QCalendarWidget::VerticalHeaderFormat ) hb_parni( 2 ) ); } +/* + * void setWeekdayTextFormat ( Qt::DayOfWeek dayOfWeek, const QTextCharFormat & format ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETWEEKDAYTEXTFORMAT ) +{ + hbqt_par_QCalendarWidget( 1 )->setWeekdayTextFormat( ( Qt::DayOfWeek ) hb_parni( 2 ), *hbqt_par_QTextCharFormat( 3 ) ); +} + /* * VerticalHeaderFormat verticalHeaderFormat () const */ HB_FUNC( QT_QCALENDARWIDGET_VERTICALHEADERFORMAT ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->verticalHeaderFormat( ) ); + hb_retni( ( QCalendarWidget::VerticalHeaderFormat ) hbqt_par_QCalendarWidget( 1 )->verticalHeaderFormat() ); +} + +/* + * QTextCharFormat weekdayTextFormat ( Qt::DayOfWeek dayOfWeek ) const + */ +HB_FUNC( QT_QCALENDARWIDGET_WEEKDAYTEXTFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QCalendarWidget( 1 )->weekdayTextFormat( ( Qt::DayOfWeek ) hb_parni( 2 ) ) ) ); } /* @@ -218,7 +294,95 @@ HB_FUNC( QT_QCALENDARWIDGET_VERTICALHEADERFORMAT ) */ HB_FUNC( QT_QCALENDARWIDGET_YEARSHOWN ) { - hb_retni( hbqt_par_QCalendarWidget( 1 )->yearShown( ) ); + hb_retni( hbqt_par_QCalendarWidget( 1 )->yearShown() ); +} + +/* + * void setCurrentPage ( int year, int month ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETCURRENTPAGE ) +{ + hbqt_par_QCalendarWidget( 1 )->setCurrentPage( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setDateRange ( const QDate & min, const QDate & max ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETDATERANGE ) +{ + hbqt_par_QCalendarWidget( 1 )->setDateRange( *hbqt_par_QDate( 2 ), *hbqt_par_QDate( 3 ) ); +} + +/* + * void setGridVisible ( bool show ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETGRIDVISIBLE ) +{ + hbqt_par_QCalendarWidget( 1 )->setGridVisible( hb_parl( 2 ) ); +} + +/* + * void setNavigationBarVisible ( bool visible ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETNAVIGATIONBARVISIBLE ) +{ + hbqt_par_QCalendarWidget( 1 )->setNavigationBarVisible( hb_parl( 2 ) ); +} + +/* + * void setSelectedDate ( const QDate & date ) + */ +HB_FUNC( QT_QCALENDARWIDGET_SETSELECTEDDATE ) +{ + hbqt_par_QCalendarWidget( 1 )->setSelectedDate( *hbqt_par_QDate( 2 ) ); +} + +/* + * void showNextMonth () + */ +HB_FUNC( QT_QCALENDARWIDGET_SHOWNEXTMONTH ) +{ + hbqt_par_QCalendarWidget( 1 )->showNextMonth(); +} + +/* + * void showNextYear () + */ +HB_FUNC( QT_QCALENDARWIDGET_SHOWNEXTYEAR ) +{ + hbqt_par_QCalendarWidget( 1 )->showNextYear(); +} + +/* + * void showPreviousMonth () + */ +HB_FUNC( QT_QCALENDARWIDGET_SHOWPREVIOUSMONTH ) +{ + hbqt_par_QCalendarWidget( 1 )->showPreviousMonth(); +} + +/* + * void showPreviousYear () + */ +HB_FUNC( QT_QCALENDARWIDGET_SHOWPREVIOUSYEAR ) +{ + hbqt_par_QCalendarWidget( 1 )->showPreviousYear(); +} + +/* + * void showSelectedDate () + */ +HB_FUNC( QT_QCALENDARWIDGET_SHOWSELECTEDDATE ) +{ + hbqt_par_QCalendarWidget( 1 )->showSelectedDate(); +} + +/* + * void showToday () + */ +HB_FUNC( QT_QCALENDARWIDGET_SHOWTODAY ) +{ + hbqt_par_QCalendarWidget( 1 )->showToday(); } diff --git a/harbour/contrib/hbqt/hbqt_qcheckbox.cpp b/harbour/contrib/hbqt/hbqt_qcheckbox.cpp index 5a320483fe..fb7824fd60 100644 --- a/harbour/contrib/hbqt/hbqt_qcheckbox.cpp +++ b/harbour/contrib/hbqt/hbqt_qcheckbox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -85,7 +84,7 @@ HB_FUNC( QT_QCHECKBOX ) */ HB_FUNC( QT_QCHECKBOX_CHECKSTATE ) { - hb_retni( hbqt_par_QCheckBox( 1 )->checkState( ) ); + hb_retni( ( Qt::CheckState ) hbqt_par_QCheckBox( 1 )->checkState() ); } /* @@ -93,7 +92,7 @@ HB_FUNC( QT_QCHECKBOX_CHECKSTATE ) */ HB_FUNC( QT_QCHECKBOX_ISTRISTATE ) { - hb_retl( hbqt_par_QCheckBox( 1 )->isTristate( ) ); + hb_retl( hbqt_par_QCheckBox( 1 )->isTristate() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qcolor.cpp b/harbour/contrib/hbqt/hbqt_qcolor.cpp index 9c933fc187..1351acdd5a 100644 --- a/harbour/contrib/hbqt/hbqt_qcolor.cpp +++ b/harbour/contrib/hbqt/hbqt_qcolor.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,31 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 40/56 [ 71.43% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QColor convertTo ( Spec colorSpec ) const - * QColor darker ( int factor = 200 ) const - * void getCmyk ( int * c, int * m, int * y, int * k, int * a = 0 ) - * void getCmykF ( qreal * c, qreal * m, qreal * y, qreal * k, qreal * a = 0 ) - * void getHsv ( int * h, int * s, int * v, int * a = 0 ) const - * void getHsvF ( qreal * h, qreal * s, qreal * v, qreal * a = 0 ) const - * void getRgb ( int * r, int * g, int * b, int * a = 0 ) const - * void getRgbF ( qreal * r, qreal * g, qreal * b, qreal * a = 0 ) const - * QColor lighter ( int factor = 150 ) const - * QRgb rgb () const - * QRgb rgba () const - * void setRgb ( QRgb rgb ) - * void setRgba ( QRgb rgba ) - * QColor toCmyk () const - * QColor toHsv () const - * QColor toRgb () const - */ - - #include /* @@ -106,7 +81,7 @@ HB_FUNC( QT_QCOLOR ) */ HB_FUNC( QT_QCOLOR_ALPHA ) { - hb_retni( hbqt_par_QColor( 1 )->alpha( ) ); + hb_retni( hbqt_par_QColor( 1 )->alpha() ); } /* @@ -114,7 +89,7 @@ HB_FUNC( QT_QCOLOR_ALPHA ) */ HB_FUNC( QT_QCOLOR_ALPHAF ) { - hb_retnd( hbqt_par_QColor( 1 )->alphaF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->alphaF() ); } /* @@ -122,7 +97,7 @@ HB_FUNC( QT_QCOLOR_ALPHAF ) */ HB_FUNC( QT_QCOLOR_BLACK ) { - hb_retni( hbqt_par_QColor( 1 )->black( ) ); + hb_retni( hbqt_par_QColor( 1 )->black() ); } /* @@ -130,7 +105,7 @@ HB_FUNC( QT_QCOLOR_BLACK ) */ HB_FUNC( QT_QCOLOR_BLACKF ) { - hb_retnd( hbqt_par_QColor( 1 )->blackF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->blackF() ); } /* @@ -138,7 +113,7 @@ HB_FUNC( QT_QCOLOR_BLACKF ) */ HB_FUNC( QT_QCOLOR_BLUE ) { - hb_retni( hbqt_par_QColor( 1 )->blue( ) ); + hb_retni( hbqt_par_QColor( 1 )->blue() ); } /* @@ -146,7 +121,15 @@ HB_FUNC( QT_QCOLOR_BLUE ) */ HB_FUNC( QT_QCOLOR_BLUEF ) { - hb_retnd( hbqt_par_QColor( 1 )->blueF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->blueF() ); +} + +/* + * QColor convertTo ( Spec colorSpec ) const + */ +HB_FUNC( QT_QCOLOR_CONVERTTO ) +{ + hb_retptr( new QColor( hbqt_par_QColor( 1 )->convertTo( ( QColor::Spec ) hb_parni( 2 ) ) ) ); } /* @@ -154,7 +137,7 @@ HB_FUNC( QT_QCOLOR_BLUEF ) */ HB_FUNC( QT_QCOLOR_CYAN ) { - hb_retni( hbqt_par_QColor( 1 )->cyan( ) ); + hb_retni( hbqt_par_QColor( 1 )->cyan() ); } /* @@ -162,7 +145,127 @@ HB_FUNC( QT_QCOLOR_CYAN ) */ HB_FUNC( QT_QCOLOR_CYANF ) { - hb_retnd( hbqt_par_QColor( 1 )->cyanF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->cyanF() ); +} + +/* + * QColor darker ( int factor = 200 ) const + */ +HB_FUNC( QT_QCOLOR_DARKER ) +{ + hb_retptr( new QColor( hbqt_par_QColor( 1 )->darker( ( HB_ISNIL( 2 ) ? 200 : hb_parni( 2 ) ) ) ) ); +} + +/* + * void getCmyk ( int * c, int * m, int * y, int * k, int * a = 0 ) + */ +HB_FUNC( QT_QCOLOR_GETCMYK ) +{ + int iC = 0; + int iM = 0; + int iY = 0; + int iK = 0; + int iA = 0; + + hbqt_par_QColor( 1 )->getCmyk( &iC, &iM, &iY, &iK, &iA ); + + hb_storni( iC, 2 ); + hb_storni( iM, 3 ); + hb_storni( iY, 4 ); + hb_storni( iK, 5 ); + hb_storni( iA, 6 ); +} + +/* + * void getCmykF ( qreal * c, qreal * m, qreal * y, qreal * k, qreal * a = 0 ) + */ +HB_FUNC( QT_QCOLOR_GETCMYKF ) +{ + qreal qrC = 0; + qreal qrM = 0; + qreal qrY = 0; + qreal qrK = 0; + qreal qrA = 0; + + hbqt_par_QColor( 1 )->getCmykF( &qrC, &qrM, &qrY, &qrK, &qrA ); + + hb_stornd( qrC, 2 ); + hb_stornd( qrM, 3 ); + hb_stornd( qrY, 4 ); + hb_stornd( qrK, 5 ); + hb_stornd( qrA, 6 ); +} + +/* + * void getHsv ( int * h, int * s, int * v, int * a = 0 ) const + */ +HB_FUNC( QT_QCOLOR_GETHSV ) +{ + int iH = 0; + int iS = 0; + int iV = 0; + int iA = 0; + + hbqt_par_QColor( 1 )->getHsv( &iH, &iS, &iV, &iA ); + + hb_storni( iH, 2 ); + hb_storni( iS, 3 ); + hb_storni( iV, 4 ); + hb_storni( iA, 5 ); +} + +/* + * void getHsvF ( qreal * h, qreal * s, qreal * v, qreal * a = 0 ) const + */ +HB_FUNC( QT_QCOLOR_GETHSVF ) +{ + qreal qrH = 0; + qreal qrS = 0; + qreal qrV = 0; + qreal qrA = 0; + + hbqt_par_QColor( 1 )->getHsvF( &qrH, &qrS, &qrV, &qrA ); + + hb_stornd( qrH, 2 ); + hb_stornd( qrS, 3 ); + hb_stornd( qrV, 4 ); + hb_stornd( qrA, 5 ); +} + +/* + * void getRgb ( int * r, int * g, int * b, int * a = 0 ) const + */ +HB_FUNC( QT_QCOLOR_GETRGB ) +{ + int iR = 0; + int iG = 0; + int iB = 0; + int iA = 0; + + hbqt_par_QColor( 1 )->getRgb( &iR, &iG, &iB, &iA ); + + hb_storni( iR, 2 ); + hb_storni( iG, 3 ); + hb_storni( iB, 4 ); + hb_storni( iA, 5 ); +} + +/* + * void getRgbF ( qreal * r, qreal * g, qreal * b, qreal * a = 0 ) const + */ +HB_FUNC( QT_QCOLOR_GETRGBF ) +{ + qreal qrR = 0; + qreal qrG = 0; + qreal qrB = 0; + qreal qrA = 0; + + hbqt_par_QColor( 1 )->getRgbF( &qrR, &qrG, &qrB, &qrA ); + + hb_stornd( qrR, 2 ); + hb_stornd( qrG, 3 ); + hb_stornd( qrB, 4 ); + hb_stornd( qrA, 5 ); } /* @@ -170,7 +273,7 @@ HB_FUNC( QT_QCOLOR_CYANF ) */ HB_FUNC( QT_QCOLOR_GREEN ) { - hb_retni( hbqt_par_QColor( 1 )->green( ) ); + hb_retni( hbqt_par_QColor( 1 )->green() ); } /* @@ -178,7 +281,7 @@ HB_FUNC( QT_QCOLOR_GREEN ) */ HB_FUNC( QT_QCOLOR_GREENF ) { - hb_retnd( hbqt_par_QColor( 1 )->greenF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->greenF() ); } /* @@ -186,7 +289,7 @@ HB_FUNC( QT_QCOLOR_GREENF ) */ HB_FUNC( QT_QCOLOR_HUE ) { - hb_retni( hbqt_par_QColor( 1 )->hue( ) ); + hb_retni( hbqt_par_QColor( 1 )->hue() ); } /* @@ -194,7 +297,7 @@ HB_FUNC( QT_QCOLOR_HUE ) */ HB_FUNC( QT_QCOLOR_HUEF ) { - hb_retnd( hbqt_par_QColor( 1 )->hueF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->hueF() ); } /* @@ -202,7 +305,15 @@ HB_FUNC( QT_QCOLOR_HUEF ) */ HB_FUNC( QT_QCOLOR_ISVALID ) { - hb_retl( hbqt_par_QColor( 1 )->isValid( ) ); + hb_retl( hbqt_par_QColor( 1 )->isValid() ); +} + +/* + * QColor lighter ( int factor = 150 ) const + */ +HB_FUNC( QT_QCOLOR_LIGHTER ) +{ + hb_retptr( new QColor( hbqt_par_QColor( 1 )->lighter( ( HB_ISNIL( 2 ) ? 150 : hb_parni( 2 ) ) ) ) ); } /* @@ -210,7 +321,7 @@ HB_FUNC( QT_QCOLOR_ISVALID ) */ HB_FUNC( QT_QCOLOR_MAGENTA ) { - hb_retni( hbqt_par_QColor( 1 )->magenta( ) ); + hb_retni( hbqt_par_QColor( 1 )->magenta() ); } /* @@ -218,7 +329,7 @@ HB_FUNC( QT_QCOLOR_MAGENTA ) */ HB_FUNC( QT_QCOLOR_MAGENTAF ) { - hb_retnd( hbqt_par_QColor( 1 )->magentaF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->magentaF() ); } /* @@ -226,7 +337,7 @@ HB_FUNC( QT_QCOLOR_MAGENTAF ) */ HB_FUNC( QT_QCOLOR_NAME ) { - hb_retc( hbqt_par_QColor( 1 )->name( ).toLatin1().data() ); + hb_retc( hbqt_par_QColor( 1 )->name().toLatin1().data() ); } /* @@ -234,7 +345,7 @@ HB_FUNC( QT_QCOLOR_NAME ) */ HB_FUNC( QT_QCOLOR_RED ) { - hb_retni( hbqt_par_QColor( 1 )->red( ) ); + hb_retni( hbqt_par_QColor( 1 )->red() ); } /* @@ -242,7 +353,23 @@ HB_FUNC( QT_QCOLOR_RED ) */ HB_FUNC( QT_QCOLOR_REDF ) { - hb_retnd( hbqt_par_QColor( 1 )->redF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->redF() ); +} + +/* + * QRgb rgb () const + */ +HB_FUNC( QT_QCOLOR_RGB ) +{ + hb_retni( hbqt_par_QColor( 1 )->rgb() ); +} + +/* + * QRgb rgba () const + */ +HB_FUNC( QT_QCOLOR_RGBA ) +{ + hb_retni( hbqt_par_QColor( 1 )->rgba() ); } /* @@ -250,7 +377,7 @@ HB_FUNC( QT_QCOLOR_REDF ) */ HB_FUNC( QT_QCOLOR_SATURATION ) { - hb_retni( hbqt_par_QColor( 1 )->saturation( ) ); + hb_retni( hbqt_par_QColor( 1 )->saturation() ); } /* @@ -258,7 +385,7 @@ HB_FUNC( QT_QCOLOR_SATURATION ) */ HB_FUNC( QT_QCOLOR_SATURATIONF ) { - hb_retnd( hbqt_par_QColor( 1 )->saturationF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->saturationF() ); } /* @@ -298,7 +425,7 @@ HB_FUNC( QT_QCOLOR_SETBLUEF ) */ HB_FUNC( QT_QCOLOR_SETCMYK ) { - hbqt_par_QColor( 1 )->setCmyk( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ) ); + hbqt_par_QColor( 1 )->setCmyk( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), ( HB_ISNIL( 6 ) ? 255 : hb_parni( 6 ) ) ); } /* @@ -330,7 +457,7 @@ HB_FUNC( QT_QCOLOR_SETGREENF ) */ HB_FUNC( QT_QCOLOR_SETHSV ) { - hbqt_par_QColor( 1 )->setHsv( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); + hbqt_par_QColor( 1 )->setHsv( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HB_ISNIL( 5 ) ? 255 : hb_parni( 5 ) ) ); } /* @@ -370,7 +497,15 @@ HB_FUNC( QT_QCOLOR_SETREDF ) */ HB_FUNC( QT_QCOLOR_SETRGB ) { - hbqt_par_QColor( 1 )->setRgb( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); + hbqt_par_QColor( 1 )->setRgb( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HB_ISNIL( 5 ) ? 255 : hb_parni( 5 ) ) ); +} + +/* + * void setRgb ( QRgb rgb ) + */ +HB_FUNC( QT_QCOLOR_SETRGB_1 ) +{ + hbqt_par_QColor( 1 )->setRgb( hb_parni( 2 ) ); } /* @@ -381,12 +516,44 @@ HB_FUNC( QT_QCOLOR_SETRGBF ) hbqt_par_QColor( 1 )->setRgbF( hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ) ); } +/* + * void setRgba ( QRgb rgba ) + */ +HB_FUNC( QT_QCOLOR_SETRGBA ) +{ + hbqt_par_QColor( 1 )->setRgba( hb_parni( 2 ) ); +} + /* * Spec spec () const */ HB_FUNC( QT_QCOLOR_SPEC ) { - hb_retni( hbqt_par_QColor( 1 )->spec( ) ); + hb_retni( ( QColor::Spec ) hbqt_par_QColor( 1 )->spec() ); +} + +/* + * QColor toCmyk () const + */ +HB_FUNC( QT_QCOLOR_TOCMYK ) +{ + hb_retptr( new QColor( hbqt_par_QColor( 1 )->toCmyk() ) ); +} + +/* + * QColor toHsv () const + */ +HB_FUNC( QT_QCOLOR_TOHSV ) +{ + hb_retptr( new QColor( hbqt_par_QColor( 1 )->toHsv() ) ); +} + +/* + * QColor toRgb () const + */ +HB_FUNC( QT_QCOLOR_TORGB ) +{ + hb_retptr( new QColor( hbqt_par_QColor( 1 )->toRgb() ) ); } /* @@ -394,7 +561,7 @@ HB_FUNC( QT_QCOLOR_SPEC ) */ HB_FUNC( QT_QCOLOR_VALUE ) { - hb_retni( hbqt_par_QColor( 1 )->value( ) ); + hb_retni( hbqt_par_QColor( 1 )->value() ); } /* @@ -402,7 +569,7 @@ HB_FUNC( QT_QCOLOR_VALUE ) */ HB_FUNC( QT_QCOLOR_VALUEF ) { - hb_retnd( hbqt_par_QColor( 1 )->valueF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->valueF() ); } /* @@ -410,7 +577,7 @@ HB_FUNC( QT_QCOLOR_VALUEF ) */ HB_FUNC( QT_QCOLOR_YELLOW ) { - hb_retni( hbqt_par_QColor( 1 )->yellow( ) ); + hb_retni( hbqt_par_QColor( 1 )->yellow() ); } /* @@ -418,7 +585,7 @@ HB_FUNC( QT_QCOLOR_YELLOW ) */ HB_FUNC( QT_QCOLOR_YELLOWF ) { - hb_retnd( hbqt_par_QColor( 1 )->yellowF( ) ); + hb_retnd( hbqt_par_QColor( 1 )->yellowF() ); } diff --git a/harbour/contrib/hbqt/hbqt_qcolordialog.cpp b/harbour/contrib/hbqt/hbqt_qcolordialog.cpp index 596af6888e..53578f58c3 100644 --- a/harbour/contrib/hbqt/hbqt_qcolordialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qcolordialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,18 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 7/10 [ 70.00% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QColor currentColor () const - * QColor selectedColor () const - * void setCurrentColor ( const QColor & color ) - */ - - #include /* @@ -83,7 +71,7 @@ HB_FUNC( QT_QCOLORDIALOG ) { if( hb_pcount() >= 1 && HB_ISNUM( 1 ) ) { - hb_retptr( ( QColorDialog* ) new QColorDialog( hb_parni( 1 ), + hb_retptr( ( QColorDialog* ) new QColorDialog( hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) ); } else @@ -92,20 +80,20 @@ HB_FUNC( QT_QCOLORDIALOG ) } } +/* + * QColor currentColor () const + */ +HB_FUNC( QT_QCOLORDIALOG_CURRENTCOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QColorDialog( 1 )->currentColor() ) ); +} + /* * void open () */ HB_FUNC( QT_QCOLORDIALOG_OPEN ) { - hbqt_par_QColorDialog( 1 )->open( ); -} - -/* - * void open ( QObject * receiver, const char * member ) - */ -HB_FUNC( QT_QCOLORDIALOG_OPEN_1 ) -{ - hbqt_par_QColorDialog( 1 )->open( hbqt_par_QObject( 2 ), hbqt_par_char( 3 ) ); + hbqt_par_QColorDialog( 1 )->open(); } /* @@ -113,7 +101,23 @@ HB_FUNC( QT_QCOLORDIALOG_OPEN_1 ) */ HB_FUNC( QT_QCOLORDIALOG_OPTIONS ) { - hb_retni( hbqt_par_QColorDialog( 1 )->options( ) ); + hb_retni( ( QColorDialog::ColorDialogOptions ) hbqt_par_QColorDialog( 1 )->options() ); +} + +/* + * QColor selectedColor () const + */ +HB_FUNC( QT_QCOLORDIALOG_SELECTEDCOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QColorDialog( 1 )->selectedColor() ) ); +} + +/* + * void setCurrentColor ( const QColor & color ) + */ +HB_FUNC( QT_QCOLORDIALOG_SETCURRENTCOLOR ) +{ + hbqt_par_QColorDialog( 1 )->setCurrentColor( *hbqt_par_QColor( 2 ) ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qcombobox.cpp b/harbour/contrib/hbqt/hbqt_qcombobox.cpp index 32eaa5e161..83572b21ae 100644 --- a/harbour/contrib/hbqt/hbqt_qcombobox.cpp +++ b/harbour/contrib/hbqt/hbqt_qcombobox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,26 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 42/53 [ 79.25% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * void addItem ( const QString & text, const QVariant & userData = QVariant() ) - * void addItem ( const QIcon & icon, const QString & text, const QVariant & userData = QVariant() ) - * void addItems ( const QStringList & texts ) - * void insertItem ( int index, const QString & text, const QVariant & userData = QVariant() ) - * void insertItem ( int index, const QIcon & icon, const QString & text, const QVariant & userData = QVariant() ) - * void insertItems ( int index, const QStringList & list ) - * QVariant itemData ( int index, int role = Qt::UserRole ) const - * QIcon itemIcon ( int index ) const - * QModelIndex rootModelIndex () const - * void setItemData ( int index, const QVariant & value, int role = Qt::UserRole ) - * void setRootModelIndex ( const QModelIndex & index ) - */ - - #include @@ -92,12 +72,36 @@ HB_FUNC( QT_QCOMBOBOX ) hb_retptr( ( QComboBox* ) new QComboBox( hbqt_par_QWidget( 1 ) ) ); } +/* + * void addItem ( const QString & text, const QVariant & userData = QVariant() ) + */ +HB_FUNC( QT_QCOMBOBOX_ADDITEM ) +{ + hbqt_par_QComboBox( 1 )->addItem( hbqt_par_QString( 2 ), *hbqt_par_QVariant( 3 ) ); +} + +/* + * void addItem ( const QIcon & icon, const QString & text, const QVariant & userData = QVariant() ) + */ +HB_FUNC( QT_QCOMBOBOX_ADDITEM_1 ) +{ + hbqt_par_QComboBox( 1 )->addItem( QIcon( hbqt_par_QString( 2 ) ), hbqt_par_QString( 3 ), *hbqt_par_QVariant( 4 ) ); +} + +/* + * void addItems ( const QStringList & texts ) + */ +HB_FUNC( QT_QCOMBOBOX_ADDITEMS ) +{ + hbqt_par_QComboBox( 1 )->addItems( *hbqt_par_QStringList( 2 ) ); +} + /* * QCompleter * completer () const */ HB_FUNC( QT_QCOMBOBOX_COMPLETER ) { - hb_retptr( ( QCompleter* ) hbqt_par_QComboBox( 1 )->completer( ) ); + hb_retptr( ( QCompleter* ) hbqt_par_QComboBox( 1 )->completer() ); } /* @@ -105,7 +109,7 @@ HB_FUNC( QT_QCOMBOBOX_COMPLETER ) */ HB_FUNC( QT_QCOMBOBOX_COUNT ) { - hb_retni( hbqt_par_QComboBox( 1 )->count( ) ); + hb_retni( hbqt_par_QComboBox( 1 )->count() ); } /* @@ -113,7 +117,7 @@ HB_FUNC( QT_QCOMBOBOX_COUNT ) */ HB_FUNC( QT_QCOMBOBOX_CURRENTINDEX ) { - hb_retni( hbqt_par_QComboBox( 1 )->currentIndex( ) ); + hb_retni( hbqt_par_QComboBox( 1 )->currentIndex() ); } /* @@ -121,7 +125,7 @@ HB_FUNC( QT_QCOMBOBOX_CURRENTINDEX ) */ HB_FUNC( QT_QCOMBOBOX_CURRENTTEXT ) { - hb_retc( hbqt_par_QComboBox( 1 )->currentText( ).toLatin1().data() ); + hb_retc( hbqt_par_QComboBox( 1 )->currentText().toLatin1().data() ); } /* @@ -129,7 +133,23 @@ HB_FUNC( QT_QCOMBOBOX_CURRENTTEXT ) */ HB_FUNC( QT_QCOMBOBOX_DUPLICATESENABLED ) { - hb_retl( hbqt_par_QComboBox( 1 )->duplicatesEnabled( ) ); + hb_retl( hbqt_par_QComboBox( 1 )->duplicatesEnabled() ); +} + +/* + * int findData ( const QVariant & data, int role = Qt::UserRole, Qt::MatchFlags flags = Qt::MatchExactly | Qt::MatchCaseSensitive ) const + */ +HB_FUNC( QT_QCOMBOBOX_FINDDATA ) +{ + hb_retni( hbqt_par_QComboBox( 1 )->findData( *hbqt_par_QVariant( 2 ), ( HB_ISNIL( 3 ) ? Qt::UserRole : hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( Qt::MatchFlags ) Qt::MatchExactly | Qt::MatchCaseSensitive : ( Qt::MatchFlags ) hb_parni( 4 ) ) ) ); +} + +/* + * int findText ( const QString & text, Qt::MatchFlags flags = Qt::MatchExactly | Qt::MatchCaseSensitive ) const + */ +HB_FUNC( QT_QCOMBOBOX_FINDTEXT ) +{ + hb_retni( hbqt_par_QComboBox( 1 )->findText( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::MatchFlags ) Qt::MatchExactly | Qt::MatchCaseSensitive : ( Qt::MatchFlags ) hb_parni( 3 ) ) ) ); } /* @@ -137,7 +157,7 @@ HB_FUNC( QT_QCOMBOBOX_DUPLICATESENABLED ) */ HB_FUNC( QT_QCOMBOBOX_HASFRAME ) { - hb_retl( hbqt_par_QComboBox( 1 )->hasFrame( ) ); + hb_retl( hbqt_par_QComboBox( 1 )->hasFrame() ); } /* @@ -145,7 +165,7 @@ HB_FUNC( QT_QCOMBOBOX_HASFRAME ) */ HB_FUNC( QT_QCOMBOBOX_HIDEPOPUP ) { - hbqt_par_QComboBox( 1 )->hidePopup( ); + hbqt_par_QComboBox( 1 )->hidePopup(); } /* @@ -153,7 +173,31 @@ HB_FUNC( QT_QCOMBOBOX_HIDEPOPUP ) */ HB_FUNC( QT_QCOMBOBOX_ICONSIZE ) { - hbqt_ret_QSize( hbqt_par_QComboBox( 1 )->iconSize( ) ); + hb_retptr( new QSize( hbqt_par_QComboBox( 1 )->iconSize() ) ); +} + +/* + * void insertItem ( int index, const QString & text, const QVariant & userData = QVariant() ) + */ +HB_FUNC( QT_QCOMBOBOX_INSERTITEM ) +{ + hbqt_par_QComboBox( 1 )->insertItem( hb_parni( 2 ), hbqt_par_QString( 3 ), *hbqt_par_QVariant( 4 ) ); +} + +/* + * void insertItem ( int index, const QIcon & icon, const QString & text, const QVariant & userData = QVariant() ) + */ +HB_FUNC( QT_QCOMBOBOX_INSERTITEM_1 ) +{ + hbqt_par_QComboBox( 1 )->insertItem( hb_parni( 2 ), QIcon( hbqt_par_QString( 3 ) ), hbqt_par_QString( 4 ), *hbqt_par_QVariant( 5 ) ); +} + +/* + * void insertItems ( int index, const QStringList & list ) + */ +HB_FUNC( QT_QCOMBOBOX_INSERTITEMS ) +{ + hbqt_par_QComboBox( 1 )->insertItems( hb_parni( 2 ), *hbqt_par_QStringList( 3 ) ); } /* @@ -161,7 +205,7 @@ HB_FUNC( QT_QCOMBOBOX_ICONSIZE ) */ HB_FUNC( QT_QCOMBOBOX_INSERTPOLICY ) { - hb_retni( hbqt_par_QComboBox( 1 )->insertPolicy( ) ); + hb_retni( ( QComboBox::InsertPolicy ) hbqt_par_QComboBox( 1 )->insertPolicy() ); } /* @@ -177,7 +221,15 @@ HB_FUNC( QT_QCOMBOBOX_INSERTSEPARATOR ) */ HB_FUNC( QT_QCOMBOBOX_ISEDITABLE ) { - hb_retl( hbqt_par_QComboBox( 1 )->isEditable( ) ); + hb_retl( hbqt_par_QComboBox( 1 )->isEditable() ); +} + +/* + * QVariant itemData ( int index, int role = Qt::UserRole ) const + */ +HB_FUNC( QT_QCOMBOBOX_ITEMDATA ) +{ + hb_retptr( new QVariant( hbqt_par_QComboBox( 1 )->itemData( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? Qt::UserRole : hb_parni( 3 ) ) ) ) ); } /* @@ -185,7 +237,15 @@ HB_FUNC( QT_QCOMBOBOX_ISEDITABLE ) */ HB_FUNC( QT_QCOMBOBOX_ITEMDELEGATE ) { - hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QComboBox( 1 )->itemDelegate( ) ); + hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QComboBox( 1 )->itemDelegate() ); +} + +/* + * QIcon itemIcon ( int index ) const + */ +HB_FUNC( QT_QCOMBOBOX_ITEMICON ) +{ + hb_retptr( new QIcon( hbqt_par_QComboBox( 1 )->itemIcon( hb_parni( 2 ) ) ) ); } /* @@ -193,7 +253,7 @@ HB_FUNC( QT_QCOMBOBOX_ITEMDELEGATE ) */ HB_FUNC( QT_QCOMBOBOX_ITEMTEXT ) { - hb_retc( hbqt_par_QComboBox( 1 )->itemText( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QComboBox( 1 )->itemText( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -201,7 +261,7 @@ HB_FUNC( QT_QCOMBOBOX_ITEMTEXT ) */ HB_FUNC( QT_QCOMBOBOX_LINEEDIT ) { - hb_retptr( ( QLineEdit* ) hbqt_par_QComboBox( 1 )->lineEdit( ) ); + hb_retptr( ( QLineEdit* ) hbqt_par_QComboBox( 1 )->lineEdit() ); } /* @@ -209,7 +269,7 @@ HB_FUNC( QT_QCOMBOBOX_LINEEDIT ) */ HB_FUNC( QT_QCOMBOBOX_MAXCOUNT ) { - hb_retni( hbqt_par_QComboBox( 1 )->maxCount( ) ); + hb_retni( hbqt_par_QComboBox( 1 )->maxCount() ); } /* @@ -217,7 +277,7 @@ HB_FUNC( QT_QCOMBOBOX_MAXCOUNT ) */ HB_FUNC( QT_QCOMBOBOX_MAXVISIBLEITEMS ) { - hb_retni( hbqt_par_QComboBox( 1 )->maxVisibleItems( ) ); + hb_retni( hbqt_par_QComboBox( 1 )->maxVisibleItems() ); } /* @@ -225,7 +285,7 @@ HB_FUNC( QT_QCOMBOBOX_MAXVISIBLEITEMS ) */ HB_FUNC( QT_QCOMBOBOX_MINIMUMCONTENTSLENGTH ) { - hb_retni( hbqt_par_QComboBox( 1 )->minimumContentsLength( ) ); + hb_retni( hbqt_par_QComboBox( 1 )->minimumContentsLength() ); } /* @@ -233,7 +293,7 @@ HB_FUNC( QT_QCOMBOBOX_MINIMUMCONTENTSLENGTH ) */ HB_FUNC( QT_QCOMBOBOX_MODEL ) { - hb_retptr( ( QAbstractItemModel* ) hbqt_par_QComboBox( 1 )->model( ) ); + hb_retptr( ( QAbstractItemModel* ) hbqt_par_QComboBox( 1 )->model() ); } /* @@ -241,7 +301,7 @@ HB_FUNC( QT_QCOMBOBOX_MODEL ) */ HB_FUNC( QT_QCOMBOBOX_MODELCOLUMN ) { - hb_retni( hbqt_par_QComboBox( 1 )->modelColumn( ) ); + hb_retni( hbqt_par_QComboBox( 1 )->modelColumn() ); } /* @@ -252,6 +312,14 @@ HB_FUNC( QT_QCOMBOBOX_REMOVEITEM ) hbqt_par_QComboBox( 1 )->removeItem( hb_parni( 2 ) ); } +/* + * QModelIndex rootModelIndex () const + */ +HB_FUNC( QT_QCOMBOBOX_ROOTMODELINDEX ) +{ + hb_retptr( new QModelIndex( hbqt_par_QComboBox( 1 )->rootModelIndex() ) ); +} + /* * void setCompleter ( QCompleter * completer ) */ @@ -289,7 +357,7 @@ HB_FUNC( QT_QCOMBOBOX_SETFRAME ) */ HB_FUNC( QT_QCOMBOBOX_SETICONSIZE ) { - hbqt_par_QComboBox( 1 )->setIconSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QComboBox( 1 )->setIconSize( *hbqt_par_QSize( 2 ) ); } /* @@ -300,6 +368,14 @@ HB_FUNC( QT_QCOMBOBOX_SETINSERTPOLICY ) hbqt_par_QComboBox( 1 )->setInsertPolicy( ( QComboBox::InsertPolicy ) hb_parni( 2 ) ); } +/* + * void setItemData ( int index, const QVariant & value, int role = Qt::UserRole ) + */ +HB_FUNC( QT_QCOMBOBOX_SETITEMDATA ) +{ + hbqt_par_QComboBox( 1 )->setItemData( hb_parni( 2 ), *hbqt_par_QVariant( 3 ), ( HB_ISNIL( 4 ) ? Qt::UserRole : hb_parni( 4 ) ) ); +} + /* * void setItemDelegate ( QAbstractItemDelegate * delegate ) */ @@ -372,6 +448,14 @@ HB_FUNC( QT_QCOMBOBOX_SETMODELCOLUMN ) hbqt_par_QComboBox( 1 )->setModelColumn( hb_parni( 2 ) ); } +/* + * void setRootModelIndex ( const QModelIndex & index ) + */ +HB_FUNC( QT_QCOMBOBOX_SETROOTMODELINDEX ) +{ + hbqt_par_QComboBox( 1 )->setRootModelIndex( *hbqt_par_QModelIndex( 2 ) ); +} + /* * void setSizeAdjustPolicy ( SizeAdjustPolicy policy ) */ @@ -401,7 +485,7 @@ HB_FUNC( QT_QCOMBOBOX_SETVIEW ) */ HB_FUNC( QT_QCOMBOBOX_SHOWPOPUP ) { - hbqt_par_QComboBox( 1 )->showPopup( ); + hbqt_par_QComboBox( 1 )->showPopup(); } /* @@ -409,7 +493,7 @@ HB_FUNC( QT_QCOMBOBOX_SHOWPOPUP ) */ HB_FUNC( QT_QCOMBOBOX_SIZEADJUSTPOLICY ) { - hb_retni( hbqt_par_QComboBox( 1 )->sizeAdjustPolicy( ) ); + hb_retni( ( QComboBox::SizeAdjustPolicy ) hbqt_par_QComboBox( 1 )->sizeAdjustPolicy() ); } /* @@ -417,7 +501,7 @@ HB_FUNC( QT_QCOMBOBOX_SIZEADJUSTPOLICY ) */ HB_FUNC( QT_QCOMBOBOX_VALIDATOR ) { - hb_retptr( ( QValidator* ) hbqt_par_QComboBox( 1 )->validator( ) ); + hb_retptr( ( QValidator* ) hbqt_par_QComboBox( 1 )->validator() ); } /* @@ -425,7 +509,39 @@ HB_FUNC( QT_QCOMBOBOX_VALIDATOR ) */ HB_FUNC( QT_QCOMBOBOX_VIEW ) { - hb_retptr( ( QAbstractItemView* ) hbqt_par_QComboBox( 1 )->view( ) ); + hb_retptr( ( QAbstractItemView* ) hbqt_par_QComboBox( 1 )->view() ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QCOMBOBOX_CLEAR ) +{ + hbqt_par_QComboBox( 1 )->clear(); +} + +/* + * void clearEditText () + */ +HB_FUNC( QT_QCOMBOBOX_CLEAREDITTEXT ) +{ + hbqt_par_QComboBox( 1 )->clearEditText(); +} + +/* + * void setCurrentIndex ( int index ) + */ +HB_FUNC( QT_QCOMBOBOX_SETCURRENTINDEX ) +{ + hbqt_par_QComboBox( 1 )->setCurrentIndex( hb_parni( 2 ) ); +} + +/* + * void setEditText ( const QString & text ) + */ +HB_FUNC( QT_QCOMBOBOX_SETEDITTEXT ) +{ + hbqt_par_QComboBox( 1 )->setEditText( hbqt_par_QString( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qcommandlinkbutton.cpp b/harbour/contrib/hbqt/hbqt_qcommandlinkbutton.cpp index 518aaf3ab3..b749938eb0 100644 --- a/harbour/contrib/hbqt/hbqt_qcommandlinkbutton.cpp +++ b/harbour/contrib/hbqt/hbqt_qcommandlinkbutton.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -79,7 +78,7 @@ HB_FUNC( QT_QCOMMANDLINKBUTTON ) */ HB_FUNC( QT_QCOMMANDLINKBUTTON_DESCRIPTION ) { - hb_retc( hbqt_par_QCommandLinkButton( 1 )->description( ).toLatin1().data() ); + hb_retc( hbqt_par_QCommandLinkButton( 1 )->description().toLatin1().data() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qcommonstyle.cpp b/harbour/contrib/hbqt/hbqt_qcommonstyle.cpp new file mode 100644 index 0000000000..518cb1d332 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qcommonstyle.cpp @@ -0,0 +1,78 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QCommonStyle () + */ +HB_FUNC( QT_QCOMMONSTYLE ) +{ + hb_retptr( ( QCommonStyle* ) new QCommonStyle() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qcoreapplication.cpp b/harbour/contrib/hbqt/hbqt_qcoreapplication.cpp index 8ea0877ee7..5adadc501f 100644 --- a/harbour/contrib/hbqt/hbqt_qcoreapplication.cpp +++ b/harbour/contrib/hbqt/hbqt_qcoreapplication.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,20 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 1/2 [ 50.00% ] ] - * + * Constructed[ 2/3 [ 66.67% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * EventFilter setEventFilter ( EventFilter filter ) - * - * *** Commented out protos which construct fine but do not compile *** - * - * // bool filterEvent ( void * message, long * result ) - * // virtual bool winEventFilter ( MSG * msg, long * result ) - */ + */ #include @@ -97,6 +91,14 @@ HB_FUNC( QT_QCOREAPPLICATION_NOTIFY ) hb_retl( hbqt_par_QCoreApplication( 1 )->notify( hbqt_par_QObject( 2 ), hbqt_par_QEvent( 3 ) ) ); } +/* + * void quit () + */ +HB_FUNC( QT_QCOREAPPLICATION_QUIT ) +{ + hbqt_par_QCoreApplication( 1 )->quit(); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qdateedit.cpp b/harbour/contrib/hbqt/hbqt_qdateedit.cpp index a9d6bda96b..78a932035c 100644 --- a/harbour/contrib/hbqt/hbqt_qdateedit.cpp +++ b/harbour/contrib/hbqt/hbqt_qdateedit.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qdatetimeedit.cpp b/harbour/contrib/hbqt/hbqt_qdatetimeedit.cpp index f782773d5b..2d999ace99 100644 --- a/harbour/contrib/hbqt/hbqt_qdatetimeedit.cpp +++ b/harbour/contrib/hbqt/hbqt_qdatetimeedit.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,33 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 23/41 [ 56.10% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QDate date () const - * QDateTime dateTime () const - * QDate maximumDate () const - * QDateTime maximumDateTime () const - * QTime maximumTime () const - * QDate minimumDate () const - * QDateTime minimumDateTime () const - * QTime minimumTime () const - * void setDateRange ( const QDate & min, const QDate & max ) - * void setDateTimeRange ( const QDateTime & min, const QDateTime & max ) - * void setMaximumDate ( const QDate & max ) - * void setMaximumDateTime ( const QDateTime & dt ) - * void setMaximumTime ( const QTime & max ) - * void setMinimumDate ( const QDate & min ) - * void setMinimumDateTime ( const QDateTime & dt ) - * void setMinimumTime ( const QTime & min ) - * void setTimeRange ( const QTime & min, const QTime & max ) - * QTime time () const - */ - - #include @@ -106,7 +79,7 @@ HB_FUNC( QT_QDATETIMEEDIT ) */ HB_FUNC( QT_QDATETIMEEDIT_CALENDARPOPUP ) { - hb_retl( hbqt_par_QDateTimeEdit( 1 )->calendarPopup( ) ); + hb_retl( hbqt_par_QDateTimeEdit( 1 )->calendarPopup() ); } /* @@ -114,7 +87,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CALENDARPOPUP ) */ HB_FUNC( QT_QDATETIMEEDIT_CALENDARWIDGET ) { - hb_retptr( ( QCalendarWidget* ) hbqt_par_QDateTimeEdit( 1 )->calendarWidget( ) ); + hb_retptr( ( QCalendarWidget* ) hbqt_par_QDateTimeEdit( 1 )->calendarWidget() ); } /* @@ -122,7 +95,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CALENDARWIDGET ) */ HB_FUNC( QT_QDATETIMEEDIT_CLEARMAXIMUMDATE ) { - hbqt_par_QDateTimeEdit( 1 )->clearMaximumDate( ); + hbqt_par_QDateTimeEdit( 1 )->clearMaximumDate(); } /* @@ -130,7 +103,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CLEARMAXIMUMDATE ) */ HB_FUNC( QT_QDATETIMEEDIT_CLEARMAXIMUMDATETIME ) { - hbqt_par_QDateTimeEdit( 1 )->clearMaximumDateTime( ); + hbqt_par_QDateTimeEdit( 1 )->clearMaximumDateTime(); } /* @@ -138,7 +111,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CLEARMAXIMUMDATETIME ) */ HB_FUNC( QT_QDATETIMEEDIT_CLEARMAXIMUMTIME ) { - hbqt_par_QDateTimeEdit( 1 )->clearMaximumTime( ); + hbqt_par_QDateTimeEdit( 1 )->clearMaximumTime(); } /* @@ -146,7 +119,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CLEARMAXIMUMTIME ) */ HB_FUNC( QT_QDATETIMEEDIT_CLEARMINIMUMDATE ) { - hbqt_par_QDateTimeEdit( 1 )->clearMinimumDate( ); + hbqt_par_QDateTimeEdit( 1 )->clearMinimumDate(); } /* @@ -154,7 +127,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CLEARMINIMUMDATE ) */ HB_FUNC( QT_QDATETIMEEDIT_CLEARMINIMUMDATETIME ) { - hbqt_par_QDateTimeEdit( 1 )->clearMinimumDateTime( ); + hbqt_par_QDateTimeEdit( 1 )->clearMinimumDateTime(); } /* @@ -162,7 +135,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CLEARMINIMUMDATETIME ) */ HB_FUNC( QT_QDATETIMEEDIT_CLEARMINIMUMTIME ) { - hbqt_par_QDateTimeEdit( 1 )->clearMinimumTime( ); + hbqt_par_QDateTimeEdit( 1 )->clearMinimumTime(); } /* @@ -170,7 +143,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CLEARMINIMUMTIME ) */ HB_FUNC( QT_QDATETIMEEDIT_CURRENTSECTION ) { - hb_retni( hbqt_par_QDateTimeEdit( 1 )->currentSection( ) ); + hb_retni( ( QDateTimeEdit::Section ) hbqt_par_QDateTimeEdit( 1 )->currentSection() ); } /* @@ -178,7 +151,23 @@ HB_FUNC( QT_QDATETIMEEDIT_CURRENTSECTION ) */ HB_FUNC( QT_QDATETIMEEDIT_CURRENTSECTIONINDEX ) { - hb_retni( hbqt_par_QDateTimeEdit( 1 )->currentSectionIndex( ) ); + hb_retni( hbqt_par_QDateTimeEdit( 1 )->currentSectionIndex() ); +} + +/* + * QDate date () const + */ +HB_FUNC( QT_QDATETIMEEDIT_DATE ) +{ + hb_retptr( new QDate( hbqt_par_QDateTimeEdit( 1 )->date() ) ); +} + +/* + * QDateTime dateTime () const + */ +HB_FUNC( QT_QDATETIMEEDIT_DATETIME ) +{ + hb_retptr( new QDateTime( hbqt_par_QDateTimeEdit( 1 )->dateTime() ) ); } /* @@ -186,7 +175,7 @@ HB_FUNC( QT_QDATETIMEEDIT_CURRENTSECTIONINDEX ) */ HB_FUNC( QT_QDATETIMEEDIT_DISPLAYFORMAT ) { - hb_retc( hbqt_par_QDateTimeEdit( 1 )->displayFormat( ).toLatin1().data() ); + hb_retc( hbqt_par_QDateTimeEdit( 1 )->displayFormat().toLatin1().data() ); } /* @@ -194,7 +183,55 @@ HB_FUNC( QT_QDATETIMEEDIT_DISPLAYFORMAT ) */ HB_FUNC( QT_QDATETIMEEDIT_DISPLAYEDSECTIONS ) { - hb_retni( hbqt_par_QDateTimeEdit( 1 )->displayedSections( ) ); + hb_retni( ( QDateTimeEdit::Sections ) hbqt_par_QDateTimeEdit( 1 )->displayedSections() ); +} + +/* + * QDate maximumDate () const + */ +HB_FUNC( QT_QDATETIMEEDIT_MAXIMUMDATE ) +{ + hb_retptr( new QDate( hbqt_par_QDateTimeEdit( 1 )->maximumDate() ) ); +} + +/* + * QDateTime maximumDateTime () const + */ +HB_FUNC( QT_QDATETIMEEDIT_MAXIMUMDATETIME ) +{ + hb_retptr( new QDateTime( hbqt_par_QDateTimeEdit( 1 )->maximumDateTime() ) ); +} + +/* + * QTime maximumTime () const + */ +HB_FUNC( QT_QDATETIMEEDIT_MAXIMUMTIME ) +{ + hb_retptr( new QTime( hbqt_par_QDateTimeEdit( 1 )->maximumTime() ) ); +} + +/* + * QDate minimumDate () const + */ +HB_FUNC( QT_QDATETIMEEDIT_MINIMUMDATE ) +{ + hb_retptr( new QDate( hbqt_par_QDateTimeEdit( 1 )->minimumDate() ) ); +} + +/* + * QDateTime minimumDateTime () const + */ +HB_FUNC( QT_QDATETIMEEDIT_MINIMUMDATETIME ) +{ + hb_retptr( new QDateTime( hbqt_par_QDateTimeEdit( 1 )->minimumDateTime() ) ); +} + +/* + * QTime minimumTime () const + */ +HB_FUNC( QT_QDATETIMEEDIT_MINIMUMTIME ) +{ + hb_retptr( new QTime( hbqt_par_QDateTimeEdit( 1 )->minimumTime() ) ); } /* @@ -202,7 +239,7 @@ HB_FUNC( QT_QDATETIMEEDIT_DISPLAYEDSECTIONS ) */ HB_FUNC( QT_QDATETIMEEDIT_SECTIONAT ) { - hb_retni( hbqt_par_QDateTimeEdit( 1 )->sectionAt( hb_parni( 2 ) ) ); + hb_retni( ( QDateTimeEdit::Section ) hbqt_par_QDateTimeEdit( 1 )->sectionAt( hb_parni( 2 ) ) ); } /* @@ -210,7 +247,7 @@ HB_FUNC( QT_QDATETIMEEDIT_SECTIONAT ) */ HB_FUNC( QT_QDATETIMEEDIT_SECTIONCOUNT ) { - hb_retni( hbqt_par_QDateTimeEdit( 1 )->sectionCount( ) ); + hb_retni( hbqt_par_QDateTimeEdit( 1 )->sectionCount() ); } /* @@ -218,7 +255,7 @@ HB_FUNC( QT_QDATETIMEEDIT_SECTIONCOUNT ) */ HB_FUNC( QT_QDATETIMEEDIT_SECTIONTEXT ) { - hb_retc( hbqt_par_QDateTimeEdit( 1 )->sectionText( ( QDateTimeEdit::Section ) hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QDateTimeEdit( 1 )->sectionText( ( QDateTimeEdit::Section ) hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -253,6 +290,22 @@ HB_FUNC( QT_QDATETIMEEDIT_SETCURRENTSECTIONINDEX ) hbqt_par_QDateTimeEdit( 1 )->setCurrentSectionIndex( hb_parni( 2 ) ); } +/* + * void setDateRange ( const QDate & min, const QDate & max ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETDATERANGE ) +{ + hbqt_par_QDateTimeEdit( 1 )->setDateRange( *hbqt_par_QDate( 2 ), *hbqt_par_QDate( 3 ) ); +} + +/* + * void setDateTimeRange ( const QDateTime & min, const QDateTime & max ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETDATETIMERANGE ) +{ + hbqt_par_QDateTimeEdit( 1 )->setDateTimeRange( *hbqt_par_QDateTime( 2 ), *hbqt_par_QDateTime( 3 ) ); +} + /* * void setDisplayFormat ( const QString & format ) */ @@ -261,6 +314,54 @@ HB_FUNC( QT_QDATETIMEEDIT_SETDISPLAYFORMAT ) hbqt_par_QDateTimeEdit( 1 )->setDisplayFormat( hbqt_par_QString( 2 ) ); } +/* + * void setMaximumDate ( const QDate & max ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETMAXIMUMDATE ) +{ + hbqt_par_QDateTimeEdit( 1 )->setMaximumDate( *hbqt_par_QDate( 2 ) ); +} + +/* + * void setMaximumDateTime ( const QDateTime & dt ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETMAXIMUMDATETIME ) +{ + hbqt_par_QDateTimeEdit( 1 )->setMaximumDateTime( *hbqt_par_QDateTime( 2 ) ); +} + +/* + * void setMaximumTime ( const QTime & max ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETMAXIMUMTIME ) +{ + hbqt_par_QDateTimeEdit( 1 )->setMaximumTime( *hbqt_par_QTime( 2 ) ); +} + +/* + * void setMinimumDate ( const QDate & min ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETMINIMUMDATE ) +{ + hbqt_par_QDateTimeEdit( 1 )->setMinimumDate( *hbqt_par_QDate( 2 ) ); +} + +/* + * void setMinimumDateTime ( const QDateTime & dt ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETMINIMUMDATETIME ) +{ + hbqt_par_QDateTimeEdit( 1 )->setMinimumDateTime( *hbqt_par_QDateTime( 2 ) ); +} + +/* + * void setMinimumTime ( const QTime & min ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETMINIMUMTIME ) +{ + hbqt_par_QDateTimeEdit( 1 )->setMinimumTime( *hbqt_par_QTime( 2 ) ); +} + /* * void setSelectedSection ( Section section ) */ @@ -269,6 +370,14 @@ HB_FUNC( QT_QDATETIMEEDIT_SETSELECTEDSECTION ) hbqt_par_QDateTimeEdit( 1 )->setSelectedSection( ( QDateTimeEdit::Section ) hb_parni( 2 ) ); } +/* + * void setTimeRange ( const QTime & min, const QTime & max ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETTIMERANGE ) +{ + hbqt_par_QDateTimeEdit( 1 )->setTimeRange( *hbqt_par_QTime( 2 ), *hbqt_par_QTime( 3 ) ); +} + /* * void setTimeSpec ( Qt::TimeSpec spec ) */ @@ -277,12 +386,44 @@ HB_FUNC( QT_QDATETIMEEDIT_SETTIMESPEC ) hbqt_par_QDateTimeEdit( 1 )->setTimeSpec( ( Qt::TimeSpec ) hb_parni( 2 ) ); } +/* + * QTime time () const + */ +HB_FUNC( QT_QDATETIMEEDIT_TIME ) +{ + hb_retptr( new QTime( hbqt_par_QDateTimeEdit( 1 )->time() ) ); +} + /* * Qt::TimeSpec timeSpec () const */ HB_FUNC( QT_QDATETIMEEDIT_TIMESPEC ) { - hb_retni( hbqt_par_QDateTimeEdit( 1 )->timeSpec( ) ); + hb_retni( ( Qt::TimeSpec ) hbqt_par_QDateTimeEdit( 1 )->timeSpec() ); +} + +/* + * void setDate ( const QDate & date ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETDATE ) +{ + hbqt_par_QDateTimeEdit( 1 )->setDate( *hbqt_par_QDate( 2 ) ); +} + +/* + * void setDateTime ( const QDateTime & dateTime ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETDATETIME ) +{ + hbqt_par_QDateTimeEdit( 1 )->setDateTime( *hbqt_par_QDateTime( 2 ) ); +} + +/* + * void setTime ( const QTime & time ) + */ +HB_FUNC( QT_QDATETIMEEDIT_SETTIME ) +{ + hbqt_par_QDateTimeEdit( 1 )->setTime( *hbqt_par_QTime( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qdesktopwidget.cpp b/harbour/contrib/hbqt/hbqt_qdesktopwidget.cpp new file mode 100644 index 0000000000..ebc5a6453b --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qdesktopwidget.cpp @@ -0,0 +1,175 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QDesktopWidget () + * ~QDesktopWidget () + */ +HB_FUNC( QT_QDESKTOPWIDGET ) +{ + hb_retptr( new QDesktopWidget() ); +} + +/* + * const QRect availableGeometry ( int screen = -1 ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_AVAILABLEGEOMETRY ) +{ + hb_retptr( new QRect( hbqt_par_QDesktopWidget( 1 )->availableGeometry( ( HB_ISNIL( 2 ) ? -1 : hb_parni( 2 ) ) ) ) ); +} + +/* + * const QRect availableGeometry ( const QWidget * widget ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_AVAILABLEGEOMETRY_1 ) +{ + hb_retptr( new QRect( hbqt_par_QDesktopWidget( 1 )->availableGeometry( hbqt_par_QWidget( 2 ) ) ) ); +} + +/* + * const QRect availableGeometry ( const QPoint & p ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_AVAILABLEGEOMETRY_2 ) +{ + hb_retptr( new QRect( hbqt_par_QDesktopWidget( 1 )->availableGeometry( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * bool isVirtualDesktop () const + */ +HB_FUNC( QT_QDESKTOPWIDGET_ISVIRTUALDESKTOP ) +{ + hb_retl( hbqt_par_QDesktopWidget( 1 )->isVirtualDesktop() ); +} + +/* + * int numScreens () const + */ +HB_FUNC( QT_QDESKTOPWIDGET_NUMSCREENS ) +{ + hb_retni( hbqt_par_QDesktopWidget( 1 )->numScreens() ); +} + +/* + * int primaryScreen () const + */ +HB_FUNC( QT_QDESKTOPWIDGET_PRIMARYSCREEN ) +{ + hb_retni( hbqt_par_QDesktopWidget( 1 )->primaryScreen() ); +} + +/* + * QWidget * screen ( int screen = -1 ) + */ +HB_FUNC( QT_QDESKTOPWIDGET_SCREEN ) +{ + hb_retptr( ( QWidget* ) hbqt_par_QDesktopWidget( 1 )->screen( ( HB_ISNIL( 2 ) ? -1 : hb_parni( 2 ) ) ) ); +} + +/* + * const QRect screenGeometry ( int screen = -1 ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_SCREENGEOMETRY ) +{ + hb_retptr( new QRect( hbqt_par_QDesktopWidget( 1 )->screenGeometry( ( HB_ISNIL( 2 ) ? -1 : hb_parni( 2 ) ) ) ) ); +} + +/* + * const QRect screenGeometry ( const QWidget * widget ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_SCREENGEOMETRY_1 ) +{ + hb_retptr( new QRect( hbqt_par_QDesktopWidget( 1 )->screenGeometry( hbqt_par_QWidget( 2 ) ) ) ); +} + +/* + * const QRect screenGeometry ( const QPoint & p ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_SCREENGEOMETRY_2 ) +{ + hb_retptr( new QRect( hbqt_par_QDesktopWidget( 1 )->screenGeometry( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * int screenNumber ( const QWidget * widget = 0 ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_SCREENNUMBER ) +{ + hb_retni( hbqt_par_QDesktopWidget( 1 )->screenNumber( hbqt_par_QWidget( 2 ) ) ); +} + +/* + * int screenNumber ( const QPoint & point ) const + */ +HB_FUNC( QT_QDESKTOPWIDGET_SCREENNUMBER_1 ) +{ + hb_retni( hbqt_par_QDesktopWidget( 1 )->screenNumber( *hbqt_par_QPoint( 2 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qdial.cpp b/harbour/contrib/hbqt/hbqt_qdial.cpp index 24d0d39aaa..c280e6db1b 100644 --- a/harbour/contrib/hbqt/hbqt_qdial.cpp +++ b/harbour/contrib/hbqt/hbqt_qdial.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QDIAL ) */ HB_FUNC( QT_QDIAL_NOTCHSIZE ) { - hb_retni( hbqt_par_QDial( 1 )->notchSize( ) ); + hb_retni( hbqt_par_QDial( 1 )->notchSize() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QDIAL_NOTCHSIZE ) */ HB_FUNC( QT_QDIAL_NOTCHTARGET ) { - hb_retnd( hbqt_par_QDial( 1 )->notchTarget( ) ); + hb_retnd( hbqt_par_QDial( 1 )->notchTarget() ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QDIAL_NOTCHTARGET ) */ HB_FUNC( QT_QDIAL_NOTCHESVISIBLE ) { - hb_retl( hbqt_par_QDial( 1 )->notchesVisible( ) ); + hb_retl( hbqt_par_QDial( 1 )->notchesVisible() ); } /* @@ -110,7 +109,23 @@ HB_FUNC( QT_QDIAL_SETNOTCHTARGET ) */ HB_FUNC( QT_QDIAL_WRAPPING ) { - hb_retl( hbqt_par_QDial( 1 )->wrapping( ) ); + hb_retl( hbqt_par_QDial( 1 )->wrapping() ); +} + +/* + * void setNotchesVisible ( bool visible ) + */ +HB_FUNC( QT_QDIAL_SETNOTCHESVISIBLE ) +{ + hbqt_par_QDial( 1 )->setNotchesVisible( hb_parl( 2 ) ); +} + +/* + * void setWrapping ( bool on ) + */ +HB_FUNC( QT_QDIAL_SETWRAPPING ) +{ + hbqt_par_QDial( 1 )->setWrapping( hb_parl( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qdialog.cpp b/harbour/contrib/hbqt/hbqt_qdialog.cpp index 54a64bf5eb..e5c003a388 100644 --- a/harbour/contrib/hbqt/hbqt_qdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QDIALOG ) */ HB_FUNC( QT_QDIALOG_ISSIZEGRIPENABLED ) { - hb_retl( hbqt_par_QDialog( 1 )->isSizeGripEnabled( ) ); + hb_retl( hbqt_par_QDialog( 1 )->isSizeGripEnabled() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QDIALOG_ISSIZEGRIPENABLED ) */ HB_FUNC( QT_QDIALOG_RESULT ) { - hb_retni( hbqt_par_QDialog( 1 )->result( ) ); + hb_retni( hbqt_par_QDialog( 1 )->result() ); } /* @@ -118,7 +117,7 @@ HB_FUNC( QT_QDIALOG_SETSIZEGRIPENABLED ) */ HB_FUNC( QT_QDIALOG_ACCEPT ) { - hbqt_par_QDialog( 1 )->accept( ); + hbqt_par_QDialog( 1 )->accept(); } /* @@ -134,7 +133,7 @@ HB_FUNC( QT_QDIALOG_DONE ) */ HB_FUNC( QT_QDIALOG_EXEC ) { - hb_retni( hbqt_par_QDialog( 1 )->exec( ) ); + hb_retni( hbqt_par_QDialog( 1 )->exec() ); } /* @@ -142,7 +141,7 @@ HB_FUNC( QT_QDIALOG_EXEC ) */ HB_FUNC( QT_QDIALOG_OPEN ) { - hbqt_par_QDialog( 1 )->open( ); + hbqt_par_QDialog( 1 )->open(); } /* @@ -150,7 +149,7 @@ HB_FUNC( QT_QDIALOG_OPEN ) */ HB_FUNC( QT_QDIALOG_REJECT ) { - hbqt_par_QDialog( 1 )->reject( ); + hbqt_par_QDialog( 1 )->reject(); } diff --git a/harbour/contrib/hbqt/hbqt_qdir.cpp b/harbour/contrib/hbqt/hbqt_qdir.cpp new file mode 100644 index 0000000000..65a983da4b --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qdir.cpp @@ -0,0 +1,361 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QDir ( const QDir & dir ) + * QDir ( const QString & path = QString() ) + * QDir ( const QString & path, const QString & nameFilter, SortFlags sort = SortFlags( Name | IgnoreCase ), Filters filters = AllEntries ) + * ~QDir () + */ +HB_FUNC( QT_QDIR ) +{ + hb_retptr( new QDir( hbqt_par_QString( 1 ) ) ); +} + +/* + * QString absoluteFilePath ( const QString & fileName ) const + */ +HB_FUNC( QT_QDIR_ABSOLUTEFILEPATH ) +{ + hb_retc( hbqt_par_QDir( 1 )->absoluteFilePath( hbqt_par_QString( 2 ) ).toLatin1().data() ); +} + +/* + * QString absolutePath () const + */ +HB_FUNC( QT_QDIR_ABSOLUTEPATH ) +{ + hb_retc( hbqt_par_QDir( 1 )->absolutePath().toLatin1().data() ); +} + +/* + * QString canonicalPath () const + */ +HB_FUNC( QT_QDIR_CANONICALPATH ) +{ + hb_retc( hbqt_par_QDir( 1 )->canonicalPath().toLatin1().data() ); +} + +/* + * bool cd ( const QString & dirName ) + */ +HB_FUNC( QT_QDIR_CD ) +{ + hb_retl( hbqt_par_QDir( 1 )->cd( hbqt_par_QString( 2 ) ) ); +} + +/* + * bool cdUp () + */ +HB_FUNC( QT_QDIR_CDUP ) +{ + hb_retl( hbqt_par_QDir( 1 )->cdUp() ); +} + +/* + * uint count () const + */ +HB_FUNC( QT_QDIR_COUNT ) +{ + hb_retni( hbqt_par_QDir( 1 )->count() ); +} + +/* + * QString dirName () const + */ +HB_FUNC( QT_QDIR_DIRNAME ) +{ + hb_retc( hbqt_par_QDir( 1 )->dirName().toLatin1().data() ); +} + +/* + * QFileInfoList entryInfoList ( const QStringList & nameFilters, Filters filters = NoFilter, SortFlags sort = NoSort ) const + */ +HB_FUNC( QT_QDIR_ENTRYINFOLIST ) +{ + hb_retptr( new QFileInfoList( hbqt_par_QDir( 1 )->entryInfoList( *hbqt_par_QStringList( 2 ), ( HB_ISNIL( 3 ) ? ( QDir::Filters ) QDir::NoFilter : ( QDir::Filters ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QDir::SortFlags ) QDir::NoSort : ( QDir::SortFlags ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QFileInfoList entryInfoList ( Filters filters = NoFilter, SortFlags sort = NoSort ) const + */ +HB_FUNC( QT_QDIR_ENTRYINFOLIST_1 ) +{ + hb_retptr( new QFileInfoList( hbqt_par_QDir( 1 )->entryInfoList( ( HB_ISNIL( 2 ) ? ( QDir::Filters ) QDir::NoFilter : ( QDir::Filters ) hb_parni( 2 ) ), ( HB_ISNIL( 3 ) ? ( QDir::SortFlags ) QDir::NoSort : ( QDir::SortFlags ) hb_parni( 3 ) ) ) ) ); +} + +/* + * QStringList entryList ( const QStringList & nameFilters, Filters filters = NoFilter, SortFlags sort = NoSort ) const + */ +HB_FUNC( QT_QDIR_ENTRYLIST ) +{ + hb_retptr( new QStringList( hbqt_par_QDir( 1 )->entryList( *hbqt_par_QStringList( 2 ), ( HB_ISNIL( 3 ) ? ( QDir::Filters ) QDir::NoFilter : ( QDir::Filters ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QDir::SortFlags ) QDir::NoSort : ( QDir::SortFlags ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QStringList entryList ( Filters filters = NoFilter, SortFlags sort = NoSort ) const + */ +HB_FUNC( QT_QDIR_ENTRYLIST_1 ) +{ + hb_retptr( new QStringList( hbqt_par_QDir( 1 )->entryList( ( HB_ISNIL( 2 ) ? ( QDir::Filters ) QDir::NoFilter : ( QDir::Filters ) hb_parni( 2 ) ), ( HB_ISNIL( 3 ) ? ( QDir::SortFlags ) QDir::NoSort : ( QDir::SortFlags ) hb_parni( 3 ) ) ) ) ); +} + +/* + * bool exists ( const QString & name ) const + */ +HB_FUNC( QT_QDIR_EXISTS ) +{ + hb_retl( hbqt_par_QDir( 1 )->exists( hbqt_par_QString( 2 ) ) ); +} + +/* + * bool exists () const + */ +HB_FUNC( QT_QDIR_EXISTS_1 ) +{ + hb_retl( hbqt_par_QDir( 1 )->exists() ); +} + +/* + * QString filePath ( const QString & fileName ) const + */ +HB_FUNC( QT_QDIR_FILEPATH ) +{ + hb_retc( hbqt_par_QDir( 1 )->filePath( hbqt_par_QString( 2 ) ).toLatin1().data() ); +} + +/* + * Filters filter () const + */ +HB_FUNC( QT_QDIR_FILTER ) +{ + hb_retni( ( QDir::Filters ) hbqt_par_QDir( 1 )->filter() ); +} + +/* + * bool isAbsolute () const + */ +HB_FUNC( QT_QDIR_ISABSOLUTE ) +{ + hb_retl( hbqt_par_QDir( 1 )->isAbsolute() ); +} + +/* + * bool isReadable () const + */ +HB_FUNC( QT_QDIR_ISREADABLE ) +{ + hb_retl( hbqt_par_QDir( 1 )->isReadable() ); +} + +/* + * bool isRelative () const + */ +HB_FUNC( QT_QDIR_ISRELATIVE ) +{ + hb_retl( hbqt_par_QDir( 1 )->isRelative() ); +} + +/* + * bool isRoot () const + */ +HB_FUNC( QT_QDIR_ISROOT ) +{ + hb_retl( hbqt_par_QDir( 1 )->isRoot() ); +} + +/* + * bool makeAbsolute () + */ +HB_FUNC( QT_QDIR_MAKEABSOLUTE ) +{ + hb_retl( hbqt_par_QDir( 1 )->makeAbsolute() ); +} + +/* + * bool mkdir ( const QString & dirName ) const + */ +HB_FUNC( QT_QDIR_MKDIR ) +{ + hb_retl( hbqt_par_QDir( 1 )->mkdir( hbqt_par_QString( 2 ) ) ); +} + +/* + * bool mkpath ( const QString & dirPath ) const + */ +HB_FUNC( QT_QDIR_MKPATH ) +{ + hb_retl( hbqt_par_QDir( 1 )->mkpath( hbqt_par_QString( 2 ) ) ); +} + +/* + * QStringList nameFilters () const + */ +HB_FUNC( QT_QDIR_NAMEFILTERS ) +{ + hb_retptr( new QStringList( hbqt_par_QDir( 1 )->nameFilters() ) ); +} + +/* + * QString path () const + */ +HB_FUNC( QT_QDIR_PATH ) +{ + hb_retc( hbqt_par_QDir( 1 )->path().toLatin1().data() ); +} + +/* + * void refresh () const + */ +HB_FUNC( QT_QDIR_REFRESH ) +{ + hbqt_par_QDir( 1 )->refresh(); +} + +/* + * QString relativeFilePath ( const QString & fileName ) const + */ +HB_FUNC( QT_QDIR_RELATIVEFILEPATH ) +{ + hb_retc( hbqt_par_QDir( 1 )->relativeFilePath( hbqt_par_QString( 2 ) ).toLatin1().data() ); +} + +/* + * bool remove ( const QString & fileName ) + */ +HB_FUNC( QT_QDIR_REMOVE ) +{ + hb_retl( hbqt_par_QDir( 1 )->remove( hbqt_par_QString( 2 ) ) ); +} + +/* + * bool rename ( const QString & oldName, const QString & newName ) + */ +HB_FUNC( QT_QDIR_RENAME ) +{ + hb_retl( hbqt_par_QDir( 1 )->rename( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ) ); +} + +/* + * bool rmdir ( const QString & dirName ) const + */ +HB_FUNC( QT_QDIR_RMDIR ) +{ + hb_retl( hbqt_par_QDir( 1 )->rmdir( hbqt_par_QString( 2 ) ) ); +} + +/* + * bool rmpath ( const QString & dirPath ) const + */ +HB_FUNC( QT_QDIR_RMPATH ) +{ + hb_retl( hbqt_par_QDir( 1 )->rmpath( hbqt_par_QString( 2 ) ) ); +} + +/* + * void setFilter ( Filters filters ) + */ +HB_FUNC( QT_QDIR_SETFILTER ) +{ + hbqt_par_QDir( 1 )->setFilter( ( QDir::Filters ) hb_parni( 2 ) ); +} + +/* + * void setNameFilters ( const QStringList & nameFilters ) + */ +HB_FUNC( QT_QDIR_SETNAMEFILTERS ) +{ + hbqt_par_QDir( 1 )->setNameFilters( *hbqt_par_QStringList( 2 ) ); +} + +/* + * void setPath ( const QString & path ) + */ +HB_FUNC( QT_QDIR_SETPATH ) +{ + hbqt_par_QDir( 1 )->setPath( hbqt_par_QString( 2 ) ); +} + +/* + * void setSorting ( SortFlags sort ) + */ +HB_FUNC( QT_QDIR_SETSORTING ) +{ + hbqt_par_QDir( 1 )->setSorting( ( QDir::SortFlags ) hb_parni( 2 ) ); +} + +/* + * SortFlags sorting () const + */ +HB_FUNC( QT_QDIR_SORTING ) +{ + hb_retni( ( QDir::SortFlags ) hbqt_par_QDir( 1 )->sorting() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qdockwidget.cpp b/harbour/contrib/hbqt/hbqt_qdockwidget.cpp new file mode 100644 index 0000000000..22f09b5d71 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qdockwidget.cpp @@ -0,0 +1,176 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QDockWidget ( const QString & title, QWidget * parent = 0, Qt::WindowFlags flags = 0 ) + * QDockWidget ( QWidget * parent = 0, Qt::WindowFlags flags = 0 ) + * ~QDockWidget () + */ +HB_FUNC( QT_QDOCKWIDGET ) +{ + hb_retptr( new QDockWidget( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); +} + +/* + * Qt::DockWidgetAreas allowedAreas () const + */ +HB_FUNC( QT_QDOCKWIDGET_ALLOWEDAREAS ) +{ + hb_retni( ( Qt::DockWidgetAreas ) hbqt_par_QDockWidget( 1 )->allowedAreas() ); +} + +/* + * DockWidgetFeatures features () const + */ +HB_FUNC( QT_QDOCKWIDGET_FEATURES ) +{ + hb_retni( ( QDockWidget::DockWidgetFeatures ) hbqt_par_QDockWidget( 1 )->features() ); +} + +/* + * bool isAreaAllowed ( Qt::DockWidgetArea area ) const + */ +HB_FUNC( QT_QDOCKWIDGET_ISAREAALLOWED ) +{ + hb_retl( hbqt_par_QDockWidget( 1 )->isAreaAllowed( ( Qt::DockWidgetArea ) hb_parni( 2 ) ) ); +} + +/* + * bool isFloating () const + */ +HB_FUNC( QT_QDOCKWIDGET_ISFLOATING ) +{ + hb_retl( hbqt_par_QDockWidget( 1 )->isFloating() ); +} + +/* + * void setAllowedAreas ( Qt::DockWidgetAreas areas ) + */ +HB_FUNC( QT_QDOCKWIDGET_SETALLOWEDAREAS ) +{ + hbqt_par_QDockWidget( 1 )->setAllowedAreas( ( Qt::DockWidgetAreas ) hb_parni( 2 ) ); +} + +/* + * void setFeatures ( DockWidgetFeatures features ) + */ +HB_FUNC( QT_QDOCKWIDGET_SETFEATURES ) +{ + hbqt_par_QDockWidget( 1 )->setFeatures( ( QDockWidget::DockWidgetFeatures ) hb_parni( 2 ) ); +} + +/* + * void setFloating ( bool floating ) + */ +HB_FUNC( QT_QDOCKWIDGET_SETFLOATING ) +{ + hbqt_par_QDockWidget( 1 )->setFloating( hb_parl( 2 ) ); +} + +/* + * void setTitleBarWidget ( QWidget * widget ) + */ +HB_FUNC( QT_QDOCKWIDGET_SETTITLEBARWIDGET ) +{ + hbqt_par_QDockWidget( 1 )->setTitleBarWidget( hbqt_par_QWidget( 2 ) ); +} + +/* + * void setWidget ( QWidget * widget ) + */ +HB_FUNC( QT_QDOCKWIDGET_SETWIDGET ) +{ + hbqt_par_QDockWidget( 1 )->setWidget( hbqt_par_QWidget( 2 ) ); +} + +/* + * QWidget * titleBarWidget () const + */ +HB_FUNC( QT_QDOCKWIDGET_TITLEBARWIDGET ) +{ + hb_retptr( ( QWidget* ) hbqt_par_QDockWidget( 1 )->titleBarWidget() ); +} + +/* + * QAction * toggleViewAction () const + */ +HB_FUNC( QT_QDOCKWIDGET_TOGGLEVIEWACTION ) +{ + hb_retptr( ( QAction* ) hbqt_par_QDockWidget( 1 )->toggleViewAction() ); +} + +/* + * QWidget * widget () const + */ +HB_FUNC( QT_QDOCKWIDGET_WIDGET ) +{ + hb_retptr( ( QWidget* ) hbqt_par_QDockWidget( 1 )->widget() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qdoublespinbox.cpp b/harbour/contrib/hbqt/hbqt_qdoublespinbox.cpp index 1f765e947b..7dfe1f93f3 100644 --- a/harbour/contrib/hbqt/hbqt_qdoublespinbox.cpp +++ b/harbour/contrib/hbqt/hbqt_qdoublespinbox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -77,7 +76,7 @@ HB_FUNC( QT_QDOUBLESPINBOX ) */ HB_FUNC( QT_QDOUBLESPINBOX_CLEANTEXT ) { - hb_retc( hbqt_par_QDoubleSpinBox( 1 )->cleanText( ).toLatin1().data() ); + hb_retc( hbqt_par_QDoubleSpinBox( 1 )->cleanText().toLatin1().data() ); } /* @@ -85,7 +84,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_CLEANTEXT ) */ HB_FUNC( QT_QDOUBLESPINBOX_DECIMALS ) { - hb_retni( hbqt_par_QDoubleSpinBox( 1 )->decimals( ) ); + hb_retni( hbqt_par_QDoubleSpinBox( 1 )->decimals() ); } /* @@ -93,7 +92,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_DECIMALS ) */ HB_FUNC( QT_QDOUBLESPINBOX_MAXIMUM ) { - hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->maximum( ) ); + hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->maximum() ); } /* @@ -101,7 +100,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_MAXIMUM ) */ HB_FUNC( QT_QDOUBLESPINBOX_MINIMUM ) { - hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->minimum( ) ); + hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->minimum() ); } /* @@ -109,7 +108,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_MINIMUM ) */ HB_FUNC( QT_QDOUBLESPINBOX_PREFIX ) { - hb_retc( hbqt_par_QDoubleSpinBox( 1 )->prefix( ).toLatin1().data() ); + hb_retc( hbqt_par_QDoubleSpinBox( 1 )->prefix().toLatin1().data() ); } /* @@ -173,7 +172,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_SETSUFFIX ) */ HB_FUNC( QT_QDOUBLESPINBOX_SINGLESTEP ) { - hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->singleStep( ) ); + hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->singleStep() ); } /* @@ -181,7 +180,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_SINGLESTEP ) */ HB_FUNC( QT_QDOUBLESPINBOX_SUFFIX ) { - hb_retc( hbqt_par_QDoubleSpinBox( 1 )->suffix( ).toLatin1().data() ); + hb_retc( hbqt_par_QDoubleSpinBox( 1 )->suffix().toLatin1().data() ); } /* @@ -189,7 +188,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_SUFFIX ) */ HB_FUNC( QT_QDOUBLESPINBOX_TEXTFROMVALUE ) { - hb_retc( hbqt_par_QDoubleSpinBox( 1 )->textFromValue( hb_parnd( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QDoubleSpinBox( 1 )->textFromValue( hb_parnd( 2 ) ).toLatin1().data() ); } /* @@ -197,7 +196,7 @@ HB_FUNC( QT_QDOUBLESPINBOX_TEXTFROMVALUE ) */ HB_FUNC( QT_QDOUBLESPINBOX_VALUE ) { - hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->value( ) ); + hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->value() ); } /* @@ -208,6 +207,14 @@ HB_FUNC( QT_QDOUBLESPINBOX_VALUEFROMTEXT ) hb_retnd( hbqt_par_QDoubleSpinBox( 1 )->valueFromText( hbqt_par_QString( 2 ) ) ); } +/* + * void setValue ( double val ) + */ +HB_FUNC( QT_QDOUBLESPINBOX_SETVALUE ) +{ + hbqt_par_QDoubleSpinBox( 1 )->setValue( hb_parnd( 2 ) ); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qerrormessage.cpp b/harbour/contrib/hbqt/hbqt_qerrormessage.cpp index 5cd7e6de3a..fc828eac42 100644 --- a/harbour/contrib/hbqt/hbqt_qerrormessage.cpp +++ b/harbour/contrib/hbqt/hbqt_qerrormessage.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,6 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ +/* + * Constructed[ 1/2 [ 50.00% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * oid showMessage ( const QString & message ) + */ #include @@ -73,6 +81,14 @@ HB_FUNC( QT_QERRORMESSAGE ) hb_retptr( ( QErrorMessage* ) new QErrorMessage( hbqt_par_QWidget( 1 ) ) ); } +/* + * void showMessage ( const QString & message, const QString & type ) + */ +HB_FUNC( QT_QERRORMESSAGE_SHOWMESSAGE ) +{ + hbqt_par_QErrorMessage( 1 )->showMessage( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qevent.cpp b/harbour/contrib/hbqt/hbqt_qevent.cpp new file mode 100644 index 0000000000..cf08aa85cf --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qevent.cpp @@ -0,0 +1,127 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QEvent ( Type type ) + * virtual ~QEvent () + */ +HB_FUNC( QT_QEVENT ) +{ + hb_retptr( ( QEvent* ) new QEvent( ( QEvent::Type ) hb_parni( 1 ) ) ); +} + +/* + * void accept () + */ +HB_FUNC( QT_QEVENT_ACCEPT ) +{ + hbqt_par_QEvent( 1 )->accept(); +} + +/* + * void ignore () + */ +HB_FUNC( QT_QEVENT_IGNORE ) +{ + hbqt_par_QEvent( 1 )->ignore(); +} + +/* + * bool isAccepted () const + */ +HB_FUNC( QT_QEVENT_ISACCEPTED ) +{ + hb_retl( hbqt_par_QEvent( 1 )->isAccepted() ); +} + +/* + * void setAccepted ( bool accepted ) + */ +HB_FUNC( QT_QEVENT_SETACCEPTED ) +{ + hbqt_par_QEvent( 1 )->setAccepted( hb_parl( 2 ) ); +} + +/* + * bool spontaneous () const + */ +HB_FUNC( QT_QEVENT_SPONTANEOUS ) +{ + hb_retl( hbqt_par_QEvent( 1 )->spontaneous() ); +} + +/* + * Type type () const + */ +HB_FUNC( QT_QEVENT_TYPE ) +{ + hb_retni( ( QEvent::Type ) hbqt_par_QEvent( 1 )->type() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qeventloop.cpp b/harbour/contrib/hbqt/hbqt_qeventloop.cpp new file mode 100644 index 0000000000..64646eea25 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qeventloop.cpp @@ -0,0 +1,127 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include +#include + +/* + * QEventLoop ( QObject * parent = 0 ) + * ~QEventLoop () + */ +HB_FUNC( QT_QEVENTLOOP ) +{ + hb_retptr( ( QEvent* ) new QEventLoop( hbqt_par_QObject( 1 ) ) ); +} + +/* + * int exec ( ProcessEventsFlags flags = AllEvents ) + */ +HB_FUNC( QT_QEVENTLOOP_EXEC ) +{ + hb_retni( hbqt_par_QEventLoop( 1 )->exec( ( HB_ISNIL( 2 ) ? ( QEventLoop::ProcessEventsFlags ) QEventLoop::AllEvents : ( QEventLoop::ProcessEventsFlags ) hb_parni( 2 ) ) ) ); +} + +/* + * void exit ( int returnCode = 0 ) + */ +HB_FUNC( QT_QEVENTLOOP_EXIT ) +{ + hbqt_par_QEventLoop( 1 )->exit( ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) ) ); +} + +/* + * bool isRunning () const + */ +HB_FUNC( QT_QEVENTLOOP_ISRUNNING ) +{ + hb_retl( hbqt_par_QEventLoop( 1 )->isRunning() ); +} + +/* + * bool processEvents ( ProcessEventsFlags flags = AllEvents ) + */ +HB_FUNC( QT_QEVENTLOOP_PROCESSEVENTS ) +{ + hb_retl( hbqt_par_QEventLoop( 1 )->processEvents( ( HB_ISNIL( 2 ) ? ( QEventLoop::ProcessEventsFlags ) QEventLoop::AllEvents : ( QEventLoop::ProcessEventsFlags ) hb_parni( 2 ) ) ) ); +} + +/* + * void processEvents ( ProcessEventsFlags flags, int maxTime ) + */ +HB_FUNC( QT_QEVENTLOOP_PROCESSEVENTS_1 ) +{ + hbqt_par_QEventLoop( 1 )->processEvents( ( QEventLoop::ProcessEventsFlags ) hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void wakeUp () + */ +HB_FUNC( QT_QEVENTLOOP_WAKEUP ) +{ + hbqt_par_QEventLoop( 1 )->wakeUp(); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qfiledialog.cpp b/harbour/contrib/hbqt/hbqt_qfiledialog.cpp index 132994e6dc..d5d51f9fc7 100644 --- a/harbour/contrib/hbqt/hbqt_qfiledialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qfiledialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,25 +59,15 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 36/47 [ 76.60% ] ] - * + * Constructed[ 44/46 [ 95.65% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * QDir directory () const - * QStringList history () const - * QStringList nameFilters () const - * bool restoreState ( const QByteArray & state ) - * QByteArray saveState () const - * QStringList selectedFiles () const - * void setDirectory ( const QDir & directory ) - * void setHistory ( const QStringList & paths ) - * void setNameFilters ( const QStringList & filters ) + * * void setSidebarUrls ( const QList & urls ) * QList sidebarUrls () const - */ + */ #include @@ -98,7 +88,7 @@ HB_FUNC( QT_QFILEDIALOG ) */ HB_FUNC( QT_QFILEDIALOG_ACCEPTMODE ) { - hb_retni( hbqt_par_QFileDialog( 1 )->acceptMode( ) ); + hb_retni( ( QFileDialog::AcceptMode ) hbqt_par_QFileDialog( 1 )->acceptMode() ); } /* @@ -106,7 +96,7 @@ HB_FUNC( QT_QFILEDIALOG_ACCEPTMODE ) */ HB_FUNC( QT_QFILEDIALOG_CONFIRMOVERWRITE ) { - hb_retl( hbqt_par_QFileDialog( 1 )->confirmOverwrite( ) ); + hb_retl( hbqt_par_QFileDialog( 1 )->confirmOverwrite() ); } /* @@ -114,7 +104,15 @@ HB_FUNC( QT_QFILEDIALOG_CONFIRMOVERWRITE ) */ HB_FUNC( QT_QFILEDIALOG_DEFAULTSUFFIX ) { - hb_retc( hbqt_par_QFileDialog( 1 )->defaultSuffix( ).toLatin1().data() ); + hb_retc( hbqt_par_QFileDialog( 1 )->defaultSuffix().toLatin1().data() ); +} + +/* + * QDir directory () const + */ +HB_FUNC( QT_QFILEDIALOG_DIRECTORY ) +{ + hb_retptr( new QDir( hbqt_par_QFileDialog( 1 )->directory() ) ); } /* @@ -122,7 +120,7 @@ HB_FUNC( QT_QFILEDIALOG_DEFAULTSUFFIX ) */ HB_FUNC( QT_QFILEDIALOG_FILEMODE ) { - hb_retni( hbqt_par_QFileDialog( 1 )->fileMode( ) ); + hb_retni( ( QFileDialog::FileMode ) hbqt_par_QFileDialog( 1 )->fileMode() ); } /* @@ -130,7 +128,15 @@ HB_FUNC( QT_QFILEDIALOG_FILEMODE ) */ HB_FUNC( QT_QFILEDIALOG_FILTER ) { - hb_retni( hbqt_par_QFileDialog( 1 )->filter( ) ); + hb_retni( ( QDir::Filters ) hbqt_par_QFileDialog( 1 )->filter() ); +} + +/* + * QStringList history () const + */ +HB_FUNC( QT_QFILEDIALOG_HISTORY ) +{ + hb_retptr( new QStringList( hbqt_par_QFileDialog( 1 )->history() ) ); } /* @@ -138,7 +144,7 @@ HB_FUNC( QT_QFILEDIALOG_FILTER ) */ HB_FUNC( QT_QFILEDIALOG_ICONPROVIDER ) { - hb_retptr( ( QFileIconProvider* ) hbqt_par_QFileDialog( 1 )->iconProvider( ) ); + hb_retptr( ( QFileIconProvider* ) hbqt_par_QFileDialog( 1 )->iconProvider() ); } /* @@ -146,7 +152,7 @@ HB_FUNC( QT_QFILEDIALOG_ICONPROVIDER ) */ HB_FUNC( QT_QFILEDIALOG_ISNAMEFILTERDETAILSVISIBLE ) { - hb_retl( hbqt_par_QFileDialog( 1 )->isNameFilterDetailsVisible( ) ); + hb_retl( hbqt_par_QFileDialog( 1 )->isNameFilterDetailsVisible() ); } /* @@ -154,7 +160,7 @@ HB_FUNC( QT_QFILEDIALOG_ISNAMEFILTERDETAILSVISIBLE ) */ HB_FUNC( QT_QFILEDIALOG_ISREADONLY ) { - hb_retl( hbqt_par_QFileDialog( 1 )->isReadOnly( ) ); + hb_retl( hbqt_par_QFileDialog( 1 )->isReadOnly() ); } /* @@ -162,7 +168,7 @@ HB_FUNC( QT_QFILEDIALOG_ISREADONLY ) */ HB_FUNC( QT_QFILEDIALOG_ITEMDELEGATE ) { - hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QFileDialog( 1 )->itemDelegate( ) ); + hb_retptr( ( QAbstractItemDelegate* ) hbqt_par_QFileDialog( 1 )->itemDelegate() ); } /* @@ -170,15 +176,15 @@ HB_FUNC( QT_QFILEDIALOG_ITEMDELEGATE ) */ HB_FUNC( QT_QFILEDIALOG_LABELTEXT ) { - hb_retc( hbqt_par_QFileDialog( 1 )->labelText( ( QFileDialog::DialogLabel ) hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QFileDialog( 1 )->labelText( ( QFileDialog::DialogLabel ) hb_parni( 2 ) ).toLatin1().data() ); } /* - * void open ( QObject * receiver, const char * member ) + * QStringList nameFilters () const */ -HB_FUNC( QT_QFILEDIALOG_OPEN ) +HB_FUNC( QT_QFILEDIALOG_NAMEFILTERS ) { - hbqt_par_QFileDialog( 1 )->open( hbqt_par_QObject( 2 ), hbqt_par_char( 3 ) ); + hb_retptr( new QStringList( hbqt_par_QFileDialog( 1 )->nameFilters() ) ); } /* @@ -186,7 +192,7 @@ HB_FUNC( QT_QFILEDIALOG_OPEN ) */ HB_FUNC( QT_QFILEDIALOG_OPTIONS ) { - hb_retni( hbqt_par_QFileDialog( 1 )->options( ) ); + hb_retni( ( QFileDialog::Options ) hbqt_par_QFileDialog( 1 )->options() ); } /* @@ -194,7 +200,7 @@ HB_FUNC( QT_QFILEDIALOG_OPTIONS ) */ HB_FUNC( QT_QFILEDIALOG_PROXYMODEL ) { - hb_retptr( ( QAbstractProxyModel* ) hbqt_par_QFileDialog( 1 )->proxyModel( ) ); + hb_retptr( ( QAbstractProxyModel* ) hbqt_par_QFileDialog( 1 )->proxyModel() ); } /* @@ -202,7 +208,23 @@ HB_FUNC( QT_QFILEDIALOG_PROXYMODEL ) */ HB_FUNC( QT_QFILEDIALOG_RESOLVESYMLINKS ) { - hb_retl( hbqt_par_QFileDialog( 1 )->resolveSymlinks( ) ); + hb_retl( hbqt_par_QFileDialog( 1 )->resolveSymlinks() ); +} + +/* + * bool restoreState ( const QByteArray & state ) + */ +HB_FUNC( QT_QFILEDIALOG_RESTORESTATE ) +{ + hb_retl( hbqt_par_QFileDialog( 1 )->restoreState( *hbqt_par_QByteArray( 2 ) ) ); +} + +/* + * QByteArray saveState () const + */ +HB_FUNC( QT_QFILEDIALOG_SAVESTATE ) +{ + hb_retptr( new QByteArray( hbqt_par_QFileDialog( 1 )->saveState() ) ); } /* @@ -221,12 +243,20 @@ HB_FUNC( QT_QFILEDIALOG_SELECTNAMEFILTER ) hbqt_par_QFileDialog( 1 )->selectNameFilter( hbqt_par_QString( 2 ) ); } +/* + * QStringList selectedFiles () const + */ +HB_FUNC( QT_QFILEDIALOG_SELECTEDFILES ) +{ + hb_retptr( new QStringList( hbqt_par_QFileDialog( 1 )->selectedFiles() ) ); +} + /* * QString selectedNameFilter () const */ HB_FUNC( QT_QFILEDIALOG_SELECTEDNAMEFILTER ) { - hb_retc( hbqt_par_QFileDialog( 1 )->selectedNameFilter( ).toLatin1().data() ); + hb_retc( hbqt_par_QFileDialog( 1 )->selectedNameFilter().toLatin1().data() ); } /* @@ -261,6 +291,14 @@ HB_FUNC( QT_QFILEDIALOG_SETDIRECTORY ) hbqt_par_QFileDialog( 1 )->setDirectory( hbqt_par_QString( 2 ) ); } +/* + * void setDirectory ( const QDir & directory ) + */ +HB_FUNC( QT_QFILEDIALOG_SETDIRECTORY_1 ) +{ + hbqt_par_QFileDialog( 1 )->setDirectory( *hbqt_par_QDir( 2 ) ); +} + /* * void setFileMode ( FileMode mode ) */ @@ -277,6 +315,14 @@ HB_FUNC( QT_QFILEDIALOG_SETFILTER ) hbqt_par_QFileDialog( 1 )->setFilter( ( QDir::Filters ) hb_parni( 2 ) ); } +/* + * void setHistory ( const QStringList & paths ) + */ +HB_FUNC( QT_QFILEDIALOG_SETHISTORY ) +{ + hbqt_par_QFileDialog( 1 )->setHistory( *hbqt_par_QStringList( 2 ) ); +} + /* * void setIconProvider ( QFileIconProvider * provider ) */ @@ -317,6 +363,14 @@ HB_FUNC( QT_QFILEDIALOG_SETNAMEFILTERDETAILSVISIBLE ) hbqt_par_QFileDialog( 1 )->setNameFilterDetailsVisible( hb_parl( 2 ) ); } +/* + * void setNameFilters ( const QStringList & filters ) + */ +HB_FUNC( QT_QFILEDIALOG_SETNAMEFILTERS ) +{ + hbqt_par_QFileDialog( 1 )->setNameFilters( *hbqt_par_QStringList( 2 ) ); +} + /* * void setOption ( Option option, bool on = true ) */ @@ -378,7 +432,7 @@ HB_FUNC( QT_QFILEDIALOG_TESTOPTION ) */ HB_FUNC( QT_QFILEDIALOG_VIEWMODE ) { - hb_retni( hbqt_par_QFileDialog( 1 )->viewMode( ) ); + hb_retni( ( QFileDialog::ViewMode ) hbqt_par_QFileDialog( 1 )->viewMode() ); } diff --git a/harbour/contrib/hbqt/hbqt_qfocusframe.cpp b/harbour/contrib/hbqt/hbqt_qfocusframe.cpp index 49f9c02b77..a198414bb7 100644 --- a/harbour/contrib/hbqt/hbqt_qfocusframe.cpp +++ b/harbour/contrib/hbqt/hbqt_qfocusframe.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -86,7 +85,7 @@ HB_FUNC( QT_QFOCUSFRAME_SETWIDGET ) */ HB_FUNC( QT_QFOCUSFRAME_WIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QFocusFrame( 1 )->widget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QFocusFrame( 1 )->widget() ); } diff --git a/harbour/contrib/hbqt/hbqt_qfont.cpp b/harbour/contrib/hbqt/hbqt_qfont.cpp index 9a7de27c73..692cf5c8b9 100644 --- a/harbour/contrib/hbqt/hbqt_qfont.cpp +++ b/harbour/contrib/hbqt/hbqt_qfont.cpp @@ -60,23 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 50/53 [ 94.34% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * FT_Face freetypeFace () const - * HFONT handle () const - * QFont resolve ( const QFont & other ) const - * - * *** Commented out protos which construct fine but do not compile *** - * - * //bool isCopyOf ( const QFont & f ) const - * //quint32 macFontID () const - */ - - #include /* @@ -105,7 +88,7 @@ HB_FUNC( QT_QFONT ) */ HB_FUNC( QT_QFONT_BOLD ) { - hb_retl( hbqt_par_QFont( 1 )->bold( ) ); + hb_retl( hbqt_par_QFont( 1 )->bold() ); } /* @@ -113,7 +96,7 @@ HB_FUNC( QT_QFONT_BOLD ) */ HB_FUNC( QT_QFONT_CAPITALIZATION ) { - hb_retni( hbqt_par_QFont( 1 )->capitalization( ) ); + hb_retni( ( QFont::Capitalization ) hbqt_par_QFont( 1 )->capitalization() ); } /* @@ -121,7 +104,7 @@ HB_FUNC( QT_QFONT_CAPITALIZATION ) */ HB_FUNC( QT_QFONT_DEFAULTFAMILY ) { - hb_retc( hbqt_par_QFont( 1 )->defaultFamily( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->defaultFamily().toLatin1().data() ); } /* @@ -129,7 +112,7 @@ HB_FUNC( QT_QFONT_DEFAULTFAMILY ) */ HB_FUNC( QT_QFONT_EXACTMATCH ) { - hb_retl( hbqt_par_QFont( 1 )->exactMatch( ) ); + hb_retl( hbqt_par_QFont( 1 )->exactMatch() ); } /* @@ -137,7 +120,7 @@ HB_FUNC( QT_QFONT_EXACTMATCH ) */ HB_FUNC( QT_QFONT_FAMILY ) { - hb_retc( hbqt_par_QFont( 1 )->family( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->family().toLatin1().data() ); } /* @@ -145,7 +128,7 @@ HB_FUNC( QT_QFONT_FAMILY ) */ HB_FUNC( QT_QFONT_FIXEDPITCH ) { - hb_retl( hbqt_par_QFont( 1 )->fixedPitch( ) ); + hb_retl( hbqt_par_QFont( 1 )->fixedPitch() ); } /* @@ -156,12 +139,20 @@ HB_FUNC( QT_QFONT_FROMSTRING ) hb_retl( hbqt_par_QFont( 1 )->fromString( hbqt_par_QString( 2 ) ) ); } +/* + * HFONT handle () const + */ +HB_FUNC( QT_QFONT_HANDLE ) +{ + hb_retptr( ( HFONT ) hbqt_par_QFont( 1 )->handle() ); +} + /* * bool italic () const */ HB_FUNC( QT_QFONT_ITALIC ) { - hb_retl( hbqt_par_QFont( 1 )->italic( ) ); + hb_retl( hbqt_par_QFont( 1 )->italic() ); } /* @@ -169,7 +160,7 @@ HB_FUNC( QT_QFONT_ITALIC ) */ HB_FUNC( QT_QFONT_KERNING ) { - hb_retl( hbqt_par_QFont( 1 )->kerning( ) ); + hb_retl( hbqt_par_QFont( 1 )->kerning() ); } /* @@ -177,7 +168,7 @@ HB_FUNC( QT_QFONT_KERNING ) */ HB_FUNC( QT_QFONT_KEY ) { - hb_retc( hbqt_par_QFont( 1 )->key( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->key().toLatin1().data() ); } /* @@ -185,7 +176,7 @@ HB_FUNC( QT_QFONT_KEY ) */ HB_FUNC( QT_QFONT_LASTRESORTFAMILY ) { - hb_retc( hbqt_par_QFont( 1 )->lastResortFamily( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->lastResortFamily().toLatin1().data() ); } /* @@ -193,7 +184,7 @@ HB_FUNC( QT_QFONT_LASTRESORTFAMILY ) */ HB_FUNC( QT_QFONT_LASTRESORTFONT ) { - hb_retc( hbqt_par_QFont( 1 )->lastResortFont( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->lastResortFont().toLatin1().data() ); } /* @@ -201,7 +192,7 @@ HB_FUNC( QT_QFONT_LASTRESORTFONT ) */ HB_FUNC( QT_QFONT_LETTERSPACING ) { - hb_retnd( hbqt_par_QFont( 1 )->letterSpacing( ) ); + hb_retnd( hbqt_par_QFont( 1 )->letterSpacing() ); } /* @@ -209,7 +200,7 @@ HB_FUNC( QT_QFONT_LETTERSPACING ) */ HB_FUNC( QT_QFONT_LETTERSPACINGTYPE ) { - hb_retni( hbqt_par_QFont( 1 )->letterSpacingType( ) ); + hb_retni( ( QFont::SpacingType ) hbqt_par_QFont( 1 )->letterSpacingType() ); } /* @@ -217,7 +208,7 @@ HB_FUNC( QT_QFONT_LETTERSPACINGTYPE ) */ HB_FUNC( QT_QFONT_OVERLINE ) { - hb_retl( hbqt_par_QFont( 1 )->overline( ) ); + hb_retl( hbqt_par_QFont( 1 )->overline() ); } /* @@ -225,7 +216,7 @@ HB_FUNC( QT_QFONT_OVERLINE ) */ HB_FUNC( QT_QFONT_PIXELSIZE ) { - hb_retni( hbqt_par_QFont( 1 )->pixelSize( ) ); + hb_retni( hbqt_par_QFont( 1 )->pixelSize() ); } /* @@ -233,7 +224,7 @@ HB_FUNC( QT_QFONT_PIXELSIZE ) */ HB_FUNC( QT_QFONT_POINTSIZE ) { - hb_retni( hbqt_par_QFont( 1 )->pointSize( ) ); + hb_retni( hbqt_par_QFont( 1 )->pointSize() ); } /* @@ -241,7 +232,7 @@ HB_FUNC( QT_QFONT_POINTSIZE ) */ HB_FUNC( QT_QFONT_POINTSIZEF ) { - hb_retnd( hbqt_par_QFont( 1 )->pointSizeF( ) ); + hb_retnd( hbqt_par_QFont( 1 )->pointSizeF() ); } /* @@ -249,7 +240,7 @@ HB_FUNC( QT_QFONT_POINTSIZEF ) */ HB_FUNC( QT_QFONT_RAWMODE ) { - hb_retl( hbqt_par_QFont( 1 )->rawMode( ) ); + hb_retl( hbqt_par_QFont( 1 )->rawMode() ); } /* @@ -257,7 +248,7 @@ HB_FUNC( QT_QFONT_RAWMODE ) */ HB_FUNC( QT_QFONT_RAWNAME ) { - hb_retc( hbqt_par_QFont( 1 )->rawName( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->rawName().toLatin1().data() ); } /* @@ -393,7 +384,7 @@ HB_FUNC( QT_QFONT_SETSTYLE ) */ HB_FUNC( QT_QFONT_SETSTYLEHINT ) { - hbqt_par_QFont( 1 )->setStyleHint( ( QFont::StyleHint ) hb_parni( 2 ), ( QFont::StyleStrategy ) hb_parni( 3 ) ); + hbqt_par_QFont( 1 )->setStyleHint( ( QFont::StyleHint ) hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QFont::StyleStrategy ) QFont::PreferDefault : ( QFont::StyleStrategy ) hb_parni( 3 ) ) ); } /* @@ -433,7 +424,7 @@ HB_FUNC( QT_QFONT_SETWORDSPACING ) */ HB_FUNC( QT_QFONT_STRETCH ) { - hb_retni( hbqt_par_QFont( 1 )->stretch( ) ); + hb_retni( hbqt_par_QFont( 1 )->stretch() ); } /* @@ -441,7 +432,7 @@ HB_FUNC( QT_QFONT_STRETCH ) */ HB_FUNC( QT_QFONT_STRIKEOUT ) { - hb_retl( hbqt_par_QFont( 1 )->strikeOut( ) ); + hb_retl( hbqt_par_QFont( 1 )->strikeOut() ); } /* @@ -449,7 +440,7 @@ HB_FUNC( QT_QFONT_STRIKEOUT ) */ HB_FUNC( QT_QFONT_STYLE ) { - hb_retni( hbqt_par_QFont( 1 )->style( ) ); + hb_retni( ( QFont::Style ) hbqt_par_QFont( 1 )->style() ); } /* @@ -457,7 +448,7 @@ HB_FUNC( QT_QFONT_STYLE ) */ HB_FUNC( QT_QFONT_STYLEHINT ) { - hb_retni( hbqt_par_QFont( 1 )->styleHint( ) ); + hb_retni( ( QFont::StyleHint ) hbqt_par_QFont( 1 )->styleHint() ); } /* @@ -465,7 +456,7 @@ HB_FUNC( QT_QFONT_STYLEHINT ) */ HB_FUNC( QT_QFONT_STYLESTRATEGY ) { - hb_retni( hbqt_par_QFont( 1 )->styleStrategy( ) ); + hb_retni( ( QFont::StyleStrategy ) hbqt_par_QFont( 1 )->styleStrategy() ); } /* @@ -473,7 +464,7 @@ HB_FUNC( QT_QFONT_STYLESTRATEGY ) */ HB_FUNC( QT_QFONT_TOSTRING ) { - hb_retc( hbqt_par_QFont( 1 )->toString( ).toLatin1().data() ); + hb_retc( hbqt_par_QFont( 1 )->toString().toLatin1().data() ); } /* @@ -481,7 +472,7 @@ HB_FUNC( QT_QFONT_TOSTRING ) */ HB_FUNC( QT_QFONT_UNDERLINE ) { - hb_retl( hbqt_par_QFont( 1 )->underline( ) ); + hb_retl( hbqt_par_QFont( 1 )->underline() ); } /* @@ -489,7 +480,7 @@ HB_FUNC( QT_QFONT_UNDERLINE ) */ HB_FUNC( QT_QFONT_WEIGHT ) { - hb_retni( hbqt_par_QFont( 1 )->weight( ) ); + hb_retni( hbqt_par_QFont( 1 )->weight() ); } /* @@ -497,10 +488,11 @@ HB_FUNC( QT_QFONT_WEIGHT ) */ HB_FUNC( QT_QFONT_WORDSPACING ) { - hb_retnd( hbqt_par_QFont( 1 )->wordSpacing( ) ); + hb_retnd( hbqt_par_QFont( 1 )->wordSpacing() ); } /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ /*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qfontcombobox.cpp b/harbour/contrib/hbqt/hbqt_qfontcombobox.cpp index 7298aaf684..36c8655ffa 100644 --- a/harbour/contrib/hbqt/hbqt_qfontcombobox.cpp +++ b/harbour/contrib/hbqt/hbqt_qfontcombobox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 4/5 [ 80.00% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QFont currentFont () const - */ - - #include @@ -82,12 +72,20 @@ HB_FUNC( QT_QFONTCOMBOBOX ) hb_retptr( ( QFontComboBox * ) new QFontComboBox( hbqt_par_QWidget( 1 ) ) ); } +/* + * QFont currentFont () const + */ +HB_FUNC( QT_QFONTCOMBOBOX_CURRENTFONT ) +{ + hb_retptr( new QFont( hbqt_par_QFontComboBox( 1 )->currentFont() ) ); +} + /* * FontFilters fontFilters () const */ HB_FUNC( QT_QFONTCOMBOBOX_FONTFILTERS ) { - hb_retni( hbqt_par_QFontComboBox( 1 )->fontFilters( ) ); + hb_retni( ( QFontComboBox::FontFilters ) hbqt_par_QFontComboBox( 1 )->fontFilters() ); } /* @@ -111,7 +109,15 @@ HB_FUNC( QT_QFONTCOMBOBOX_SETWRITINGSYSTEM ) */ HB_FUNC( QT_QFONTCOMBOBOX_WRITINGSYSTEM ) { - hb_retni( hbqt_par_QFontComboBox( 1 )->writingSystem( ) ); + hb_retni( ( QFontDatabase::WritingSystem ) hbqt_par_QFontComboBox( 1 )->writingSystem() ); +} + +/* + * void setCurrentFont ( const QFont & font ) + */ +HB_FUNC( QT_QFONTCOMBOBOX_SETCURRENTFONT ) +{ + hbqt_par_QFontComboBox( 1 )->setCurrentFont( *hbqt_par_QFont( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qfontdialog.cpp b/harbour/contrib/hbqt/hbqt_qfontdialog.cpp index f2ef1ac2e3..8b58721e12 100644 --- a/harbour/contrib/hbqt/hbqt_qfontdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qfontdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,18 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 5/8 [ 62.50% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QFont currentFont () const - * QFont selectedFont () const - * void setCurrentFont ( const QFont & font ) - */ - - #include @@ -85,11 +73,11 @@ HB_FUNC( QT_QFONTDIALOG ) } /* - * void open ( QObject * receiver, const char * member ) + * QFont currentFont () const */ -HB_FUNC( QT_QFONTDIALOG_OPEN ) +HB_FUNC( QT_QFONTDIALOG_CURRENTFONT ) { - hbqt_par_QFontDialog( 1 )->open( hbqt_par_QObject( 2 ), hbqt_par_char( 3 ) ); + hb_retptr( new QFont( hbqt_par_QFontDialog( 1 )->currentFont() ) ); } /* @@ -97,7 +85,23 @@ HB_FUNC( QT_QFONTDIALOG_OPEN ) */ HB_FUNC( QT_QFONTDIALOG_OPTIONS ) { - hb_retni( hbqt_par_QFontDialog( 1 )->options( ) ); + hb_retni( ( QFontDialog::FontDialogOptions ) hbqt_par_QFontDialog( 1 )->options() ); +} + +/* + * QFont selectedFont () const + */ +HB_FUNC( QT_QFONTDIALOG_SELECTEDFONT ) +{ + hb_retptr( new QFont( hbqt_par_QFontDialog( 1 )->selectedFont() ) ); +} + +/* + * void setCurrentFont ( const QFont & font ) + */ +HB_FUNC( QT_QFONTDIALOG_SETCURRENTFONT ) +{ + hbqt_par_QFontDialog( 1 )->setCurrentFont( *hbqt_par_QFont( 2 ) ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qfontinfo.cpp b/harbour/contrib/hbqt/hbqt_qfontinfo.cpp new file mode 100644 index 0000000000..5415d01408 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qfontinfo.cpp @@ -0,0 +1,176 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QFontInfo ( const QFont & font ) + * QFontInfo ( const QFontInfo & fi ) + * ~QFontInfo () + */ +HB_FUNC( QT_QFONTINFO ) +{ + hb_retptr( new QFontInfo( *hbqt_par_QFont( 1 ) ) ); +} + +/* + * bool bold () const + */ +HB_FUNC( QT_QFONTINFO_BOLD ) +{ + hb_retl( hbqt_par_QFontInfo( 1 )->bold() ); +} + +/* + * bool exactMatch () const + */ +HB_FUNC( QT_QFONTINFO_EXACTMATCH ) +{ + hb_retl( hbqt_par_QFontInfo( 1 )->exactMatch() ); +} + +/* + * QString family () const + */ +HB_FUNC( QT_QFONTINFO_FAMILY ) +{ + hb_retc( hbqt_par_QFontInfo( 1 )->family().toLatin1().data() ); +} + +/* + * bool fixedPitch () const + */ +HB_FUNC( QT_QFONTINFO_FIXEDPITCH ) +{ + hb_retl( hbqt_par_QFontInfo( 1 )->fixedPitch() ); +} + +/* + * bool italic () const + */ +HB_FUNC( QT_QFONTINFO_ITALIC ) +{ + hb_retl( hbqt_par_QFontInfo( 1 )->italic() ); +} + +/* + * int pixelSize () const + */ +HB_FUNC( QT_QFONTINFO_PIXELSIZE ) +{ + hb_retni( hbqt_par_QFontInfo( 1 )->pixelSize() ); +} + +/* + * int pointSize () const + */ +HB_FUNC( QT_QFONTINFO_POINTSIZE ) +{ + hb_retni( hbqt_par_QFontInfo( 1 )->pointSize() ); +} + +/* + * qreal pointSizeF () const + */ +HB_FUNC( QT_QFONTINFO_POINTSIZEF ) +{ + hb_retnd( hbqt_par_QFontInfo( 1 )->pointSizeF() ); +} + +/* + * bool rawMode () const + */ +HB_FUNC( QT_QFONTINFO_RAWMODE ) +{ + hb_retl( hbqt_par_QFontInfo( 1 )->rawMode() ); +} + +/* + * QFont::Style style () const + */ +HB_FUNC( QT_QFONTINFO_STYLE ) +{ + hb_retni( ( QFont::Style ) hbqt_par_QFontInfo( 1 )->style() ); +} + +/* + * QFont::StyleHint styleHint () const + */ +HB_FUNC( QT_QFONTINFO_STYLEHINT ) +{ + hb_retni( ( QFont::StyleHint ) hbqt_par_QFontInfo( 1 )->styleHint() ); +} + +/* + * int weight () const + */ +HB_FUNC( QT_QFONTINFO_WEIGHT ) +{ + hb_retni( hbqt_par_QFontInfo( 1 )->weight() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qformlayout.cpp b/harbour/contrib/hbqt/hbqt_qformlayout.cpp index 44275d7e35..18bf8dd566 100644 --- a/harbour/contrib/hbqt/hbqt_qformlayout.cpp +++ b/harbour/contrib/hbqt/hbqt_qformlayout.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,18 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 33/36 [ 91.67% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * void getItemPosition ( int index, int * rowPtr, ItemRole * rolePtr ) const - * void getLayoutPosition ( QLayout * layout, int * rowPtr, ItemRole * rolePtr ) const - * void getWidgetPosition ( QWidget * widget, int * rowPtr, ItemRole * rolePtr ) const - */ - - #include @@ -137,7 +125,7 @@ HB_FUNC( QT_QFORMLAYOUT_ADDROW_5 ) */ HB_FUNC( QT_QFORMLAYOUT_FIELDGROWTHPOLICY ) { - hb_retni( hbqt_par_QFormLayout( 1 )->fieldGrowthPolicy( ) ); + hb_retni( ( QFormLayout::FieldGrowthPolicy ) hbqt_par_QFormLayout( 1 )->fieldGrowthPolicy() ); } /* @@ -145,7 +133,49 @@ HB_FUNC( QT_QFORMLAYOUT_FIELDGROWTHPOLICY ) */ HB_FUNC( QT_QFORMLAYOUT_FORMALIGNMENT ) { - hb_retni( hbqt_par_QFormLayout( 1 )->formAlignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QFormLayout( 1 )->formAlignment() ); +} + +/* + * void getItemPosition ( int index, int * rowPtr, ItemRole * rolePtr ) const + */ +HB_FUNC( QT_QFORMLAYOUT_GETITEMPOSITION ) +{ + int iRowPtr = 0; + QFormLayout::ItemRole iRolePtr; + + hbqt_par_QFormLayout( 1 )->getItemPosition( hb_parni( 2 ), &iRowPtr, &iRolePtr ); + + hb_storni( iRowPtr, 3 ); + hb_storni( iRolePtr, 4 ); +} + +/* + * void getLayoutPosition ( QLayout * layout, int * rowPtr, ItemRole * rolePtr ) const + */ +HB_FUNC( QT_QFORMLAYOUT_GETLAYOUTPOSITION ) +{ + int iRowPtr = 0; + QFormLayout::ItemRole iRolePtr; + + hbqt_par_QFormLayout( 1 )->getLayoutPosition( hbqt_par_QLayout( 2 ), &iRowPtr, &iRolePtr ); + + hb_storni( iRowPtr, 3 ); + hb_storni( iRolePtr, 4 ); +} + +/* + * void getWidgetPosition ( QWidget * widget, int * rowPtr, ItemRole * rolePtr ) const + */ +HB_FUNC( QT_QFORMLAYOUT_GETWIDGETPOSITION ) +{ + int iRowPtr = 0; + QFormLayout::ItemRole iRolePtr; + + hbqt_par_QFormLayout( 1 )->getWidgetPosition( hbqt_par_QWidget( 2 ), &iRowPtr, &iRolePtr ); + + hb_storni( iRowPtr, 3 ); + hb_storni( iRolePtr, 4 ); } /* @@ -153,7 +183,7 @@ HB_FUNC( QT_QFORMLAYOUT_FORMALIGNMENT ) */ HB_FUNC( QT_QFORMLAYOUT_HORIZONTALSPACING ) { - hb_retni( hbqt_par_QFormLayout( 1 )->horizontalSpacing( ) ); + hb_retni( hbqt_par_QFormLayout( 1 )->horizontalSpacing() ); } /* @@ -217,7 +247,7 @@ HB_FUNC( QT_QFORMLAYOUT_ITEMAT ) */ HB_FUNC( QT_QFORMLAYOUT_LABELALIGNMENT ) { - hb_retni( hbqt_par_QFormLayout( 1 )->labelAlignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QFormLayout( 1 )->labelAlignment() ); } /* @@ -241,7 +271,7 @@ HB_FUNC( QT_QFORMLAYOUT_LABELFORFIELD_1 ) */ HB_FUNC( QT_QFORMLAYOUT_ROWCOUNT ) { - hb_retni( hbqt_par_QFormLayout( 1 )->rowCount( ) ); + hb_retni( hbqt_par_QFormLayout( 1 )->rowCount() ); } /* @@ -249,7 +279,7 @@ HB_FUNC( QT_QFORMLAYOUT_ROWCOUNT ) */ HB_FUNC( QT_QFORMLAYOUT_ROWWRAPPOLICY ) { - hb_retni( hbqt_par_QFormLayout( 1 )->rowWrapPolicy( ) ); + hb_retni( ( QFormLayout::RowWrapPolicy ) hbqt_par_QFormLayout( 1 )->rowWrapPolicy() ); } /* @@ -337,7 +367,7 @@ HB_FUNC( QT_QFORMLAYOUT_SETWIDGET ) */ HB_FUNC( QT_QFORMLAYOUT_SPACING ) { - hb_retni( hbqt_par_QFormLayout( 1 )->spacing( ) ); + hb_retni( hbqt_par_QFormLayout( 1 )->spacing() ); } /* @@ -345,7 +375,7 @@ HB_FUNC( QT_QFORMLAYOUT_SPACING ) */ HB_FUNC( QT_QFORMLAYOUT_VERTICALSPACING ) { - hb_retni( hbqt_par_QFormLayout( 1 )->verticalSpacing( ) ); + hb_retni( hbqt_par_QFormLayout( 1 )->verticalSpacing() ); } diff --git a/harbour/contrib/hbqt/hbqt_qframe.cpp b/harbour/contrib/hbqt/hbqt_qframe.cpp index 7f8e4a6d23..aa1cb8107b 100644 --- a/harbour/contrib/hbqt/hbqt_qframe.cpp +++ b/harbour/contrib/hbqt/hbqt_qframe.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -70,7 +69,7 @@ */ HB_FUNC( QT_QFRAME ) { - hb_retptr( new QFrame( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); + hb_retptr( new QFrame( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) ); } /* @@ -78,7 +77,7 @@ HB_FUNC( QT_QFRAME ) */ HB_FUNC( QT_QFRAME_FRAMERECT ) { - hbqt_ret_QRect( hbqt_par_QFrame( 1 )->frameRect( ) ); + hb_retptr( new QRect( hbqt_par_QFrame( 1 )->frameRect() ) ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QFRAME_FRAMERECT ) */ HB_FUNC( QT_QFRAME_FRAMESHADOW ) { - hb_retni( hbqt_par_QFrame( 1 )->frameShadow( ) ); + hb_retni( ( QFrame::Shadow ) hbqt_par_QFrame( 1 )->frameShadow() ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QFRAME_FRAMESHADOW ) */ HB_FUNC( QT_QFRAME_FRAMESHAPE ) { - hb_retni( hbqt_par_QFrame( 1 )->frameShape( ) ); + hb_retni( ( QFrame::Shape ) hbqt_par_QFrame( 1 )->frameShape() ); } /* @@ -102,7 +101,7 @@ HB_FUNC( QT_QFRAME_FRAMESHAPE ) */ HB_FUNC( QT_QFRAME_FRAMESTYLE ) { - hb_retni( hbqt_par_QFrame( 1 )->frameStyle( ) ); + hb_retni( hbqt_par_QFrame( 1 )->frameStyle() ); } /* @@ -110,7 +109,7 @@ HB_FUNC( QT_QFRAME_FRAMESTYLE ) */ HB_FUNC( QT_QFRAME_FRAMEWIDTH ) { - hb_retni( hbqt_par_QFrame( 1 )->frameWidth( ) ); + hb_retni( hbqt_par_QFrame( 1 )->frameWidth() ); } /* @@ -118,7 +117,7 @@ HB_FUNC( QT_QFRAME_FRAMEWIDTH ) */ HB_FUNC( QT_QFRAME_LINEWIDTH ) { - hb_retni( hbqt_par_QFrame( 1 )->lineWidth( ) ); + hb_retni( hbqt_par_QFrame( 1 )->lineWidth() ); } /* @@ -126,7 +125,7 @@ HB_FUNC( QT_QFRAME_LINEWIDTH ) */ HB_FUNC( QT_QFRAME_MIDLINEWIDTH ) { - hb_retni( hbqt_par_QFrame( 1 )->midLineWidth( ) ); + hb_retni( hbqt_par_QFrame( 1 )->midLineWidth() ); } /* @@ -134,7 +133,7 @@ HB_FUNC( QT_QFRAME_MIDLINEWIDTH ) */ HB_FUNC( QT_QFRAME_SETFRAMERECT ) { - hbqt_par_QFrame( 1 )->setFrameRect( hbqt_const_QRect( 2 ) ); + hbqt_par_QFrame( 1 )->setFrameRect( *hbqt_par_QRect( 2 ) ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qftp.cpp b/harbour/contrib/hbqt/hbqt_qftp.cpp new file mode 100644 index 0000000000..8aaf6b8d8c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qftp.cpp @@ -0,0 +1,295 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QFtp ( QObject * parent = 0 ) + * virtual ~QFtp () + */ +HB_FUNC( QT_QFTP ) +{ + hb_retptr( new QFtp( hbqt_par_QObject( 1 ) ) ); +} + +/* + * qint64 bytesAvailable () const + */ +HB_FUNC( QT_QFTP_BYTESAVAILABLE ) +{ + hb_retni( hbqt_par_QFtp( 1 )->bytesAvailable() ); +} + +/* + * int cd ( const QString & dir ) + */ +HB_FUNC( QT_QFTP_CD ) +{ + hb_retni( hbqt_par_QFtp( 1 )->cd( hbqt_par_QString( 2 ) ) ); +} + +/* + * void clearPendingCommands () + */ +HB_FUNC( QT_QFTP_CLEARPENDINGCOMMANDS ) +{ + hbqt_par_QFtp( 1 )->clearPendingCommands(); +} + +/* + * int close () + */ +HB_FUNC( QT_QFTP_CLOSE ) +{ + hb_retni( hbqt_par_QFtp( 1 )->close() ); +} + +/* + * int connectToHost ( const QString & host, quint16 port = 21 ) + */ +HB_FUNC( QT_QFTP_CONNECTTOHOST ) +{ + hb_retni( hbqt_par_QFtp( 1 )->connectToHost( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? 21 : hb_parni( 3 ) ) ) ); +} + +/* + * Command currentCommand () const + */ +HB_FUNC( QT_QFTP_CURRENTCOMMAND ) +{ + hb_retni( ( QFtp::Command ) hbqt_par_QFtp( 1 )->currentCommand() ); +} + +/* + * QIODevice * currentDevice () const + */ +HB_FUNC( QT_QFTP_CURRENTDEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QFtp( 1 )->currentDevice() ); +} + +/* + * int currentId () const + */ +HB_FUNC( QT_QFTP_CURRENTID ) +{ + hb_retni( hbqt_par_QFtp( 1 )->currentId() ); +} + +/* + * Error error () const + */ +HB_FUNC( QT_QFTP_ERROR ) +{ + hb_retni( ( QFtp::Error ) hbqt_par_QFtp( 1 )->error() ); +} + +/* + * QString errorString () const + */ +HB_FUNC( QT_QFTP_ERRORSTRING ) +{ + hb_retc( hbqt_par_QFtp( 1 )->errorString().toLatin1().data() ); +} + +/* + * int get ( const QString & file, QIODevice * dev = 0, TransferType type = Binary ) + */ +HB_FUNC( QT_QFTP_GET ) +{ + hb_retni( hbqt_par_QFtp( 1 )->get( hbqt_par_QString( 2 ), hbqt_par_QIODevice( 3 ), ( HB_ISNIL( 4 ) ? ( QFtp::TransferType ) QFtp::Binary : ( QFtp::TransferType ) hb_parni( 4 ) ) ) ); +} + +/* + * bool hasPendingCommands () const + */ +HB_FUNC( QT_QFTP_HASPENDINGCOMMANDS ) +{ + hb_retl( hbqt_par_QFtp( 1 )->hasPendingCommands() ); +} + +/* + * int list ( const QString & dir = QString() ) + */ +HB_FUNC( QT_QFTP_LIST ) +{ + hb_retni( hbqt_par_QFtp( 1 )->list( hbqt_par_QString( 2 ) ) ); +} + +/* + * int login ( const QString & user = QString(), const QString & password = QString() ) + */ +HB_FUNC( QT_QFTP_LOGIN ) +{ + hb_retni( hbqt_par_QFtp( 1 )->login( hbqt_par_QString( 2 ) ) ); +} + +/* + * int mkdir ( const QString & dir ) + */ +HB_FUNC( QT_QFTP_MKDIR ) +{ + hb_retni( hbqt_par_QFtp( 1 )->mkdir( hbqt_par_QString( 2 ) ) ); +} + +/* + * int put ( QIODevice * dev, const QString & file, TransferType type = Binary ) + */ +HB_FUNC( QT_QFTP_PUT ) +{ + hb_retni( hbqt_par_QFtp( 1 )->put( hbqt_par_QIODevice( 2 ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? ( QFtp::TransferType ) QFtp::Binary : ( QFtp::TransferType ) hb_parni( 4 ) ) ) ); +} + +/* + * int put ( const QByteArray & data, const QString & file, TransferType type = Binary ) + */ +HB_FUNC( QT_QFTP_PUT_1 ) +{ + hb_retni( hbqt_par_QFtp( 1 )->put( *hbqt_par_QByteArray( 2 ), hbqt_par_QString( 3 ), ( HB_ISNIL( 4 ) ? ( QFtp::TransferType ) QFtp::Binary : ( QFtp::TransferType ) hb_parni( 4 ) ) ) ); +} + +/* + * int rawCommand ( const QString & command ) + */ +HB_FUNC( QT_QFTP_RAWCOMMAND ) +{ + hb_retni( hbqt_par_QFtp( 1 )->rawCommand( hbqt_par_QString( 2 ) ) ); +} + +/* + * qint64 read ( char * data, qint64 maxlen ) + */ +HB_FUNC( QT_QFTP_READ ) +{ + hb_retni( hbqt_par_QFtp( 1 )->read( hbqt_par_char( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QByteArray readAll () + */ +HB_FUNC( QT_QFTP_READALL ) +{ + hb_retptr( new QByteArray( hbqt_par_QFtp( 1 )->readAll() ) ); +} + +/* + * int remove ( const QString & file ) + */ +HB_FUNC( QT_QFTP_REMOVE ) +{ + hb_retni( hbqt_par_QFtp( 1 )->remove( hbqt_par_QString( 2 ) ) ); +} + +/* + * int rename ( const QString & oldname, const QString & newname ) + */ +HB_FUNC( QT_QFTP_RENAME ) +{ + hb_retni( hbqt_par_QFtp( 1 )->rename( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ) ); +} + +/* + * int rmdir ( const QString & dir ) + */ +HB_FUNC( QT_QFTP_RMDIR ) +{ + hb_retni( hbqt_par_QFtp( 1 )->rmdir( hbqt_par_QString( 2 ) ) ); +} + +/* + * int setProxy ( const QString & host, quint16 port ) + */ +HB_FUNC( QT_QFTP_SETPROXY ) +{ + hb_retni( hbqt_par_QFtp( 1 )->setProxy( hbqt_par_QString( 2 ), hb_parni( 3 ) ) ); +} + +/* + * int setTransferMode ( TransferMode mode ) + */ +HB_FUNC( QT_QFTP_SETTRANSFERMODE ) +{ + hb_retni( hbqt_par_QFtp( 1 )->setTransferMode( ( QFtp::TransferMode ) hb_parni( 2 ) ) ); +} + +/* + * State state () const + */ +HB_FUNC( QT_QFTP_STATE ) +{ + hb_retni( ( QFtp::State ) hbqt_par_QFtp( 1 )->state() ); +} + +/* + * void abort () + */ +HB_FUNC( QT_QFTP_ABORT ) +{ + hbqt_par_QFtp( 1 )->abort(); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qgridlayout.cpp b/harbour/contrib/hbqt/hbqt_qgridlayout.cpp new file mode 100644 index 0000000000..9c1cfebde2 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qgridlayout.cpp @@ -0,0 +1,298 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QGridLayout ( QWidget * parent ) + * QGridLayout () + * ~QGridLayout () + */ +HB_FUNC( QT_QGRIDLAYOUT ) +{ + hb_retptr( new QGridLayout( hbqt_par_QWidget( 1 ) ) ); +} + +/* + * void addItem ( QLayoutItem * item, int row, int column, int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = 0 ) + */ +HB_FUNC( QT_QGRIDLAYOUT_ADDITEM ) +{ + hbqt_par_QGridLayout( 1 )->addItem( hbqt_par_QLayoutItem( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HB_ISNIL( 5 ) ? 1 : hb_parni( 5 ) ), ( HB_ISNIL( 6 ) ? 1 : hb_parni( 6 ) ), ( HB_ISNIL( 7 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 7 ) ) ); +} + +/* + * void addLayout ( QLayout * layout, int row, int column, Qt::Alignment alignment = 0 ) + */ +HB_FUNC( QT_QGRIDLAYOUT_ADDLAYOUT ) +{ + hbqt_par_QGridLayout( 1 )->addLayout( hbqt_par_QLayout( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 5 ) ) ); +} + +/* + * void addLayout ( QLayout * layout, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 ) + */ +HB_FUNC( QT_QGRIDLAYOUT_ADDLAYOUT_1 ) +{ + hbqt_par_QGridLayout( 1 )->addLayout( hbqt_par_QLayout( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), ( HB_ISNIL( 7 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 7 ) ) ); +} + +/* + * void addWidget ( QWidget * widget, int row, int column, Qt::Alignment alignment = 0 ) + */ +HB_FUNC( QT_QGRIDLAYOUT_ADDWIDGET ) +{ + hbqt_par_QGridLayout( 1 )->addWidget( hbqt_par_QWidget( 2 ), hb_parni( 3 ), hb_parni( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 5 ) ) ); +} + +/* + * void addWidget ( QWidget * widget, int fromRow, int fromColumn, int rowSpan, int columnSpan, Qt::Alignment alignment = 0 ) + */ +HB_FUNC( QT_QGRIDLAYOUT_ADDWIDGET_1 ) +{ + hbqt_par_QGridLayout( 1 )->addWidget( hbqt_par_QWidget( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), ( HB_ISNIL( 7 ) ? ( Qt::Alignment ) 0 : ( Qt::Alignment ) hb_parni( 7 ) ) ); +} + +/* + * QRect cellRect ( int row, int column ) const + */ +HB_FUNC( QT_QGRIDLAYOUT_CELLRECT ) +{ + hb_retptr( new QRect( hbqt_par_QGridLayout( 1 )->cellRect( hb_parni( 2 ), hb_parni( 3 ) ) ) ); +} + +/* + * int columnCount () const + */ +HB_FUNC( QT_QGRIDLAYOUT_COLUMNCOUNT ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->columnCount() ); +} + +/* + * int columnMinimumWidth ( int column ) const + */ +HB_FUNC( QT_QGRIDLAYOUT_COLUMNMINIMUMWIDTH ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->columnMinimumWidth( hb_parni( 2 ) ) ); +} + +/* + * int columnStretch ( int column ) const + */ +HB_FUNC( QT_QGRIDLAYOUT_COLUMNSTRETCH ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->columnStretch( hb_parni( 2 ) ) ); +} + +/* + * void getItemPosition ( int index, int * row, int * column, int * rowSpan, int * columnSpan ) + */ +HB_FUNC( QT_QGRIDLAYOUT_GETITEMPOSITION ) +{ + int iRow = 0; + int iColumn = 0; + int iRowSpan = 0; + int iColumnSpan = 0; + + hbqt_par_QGridLayout( 1 )->getItemPosition( hb_parni( 2 ), &iRow, &iColumn, &iRowSpan, &iColumnSpan ); + + hb_storni( iRow, 3 ); + hb_storni( iColumn, 4 ); + hb_storni( iRowSpan, 5 ); + hb_storni( iColumnSpan, 6 ); +} + +/* + * int horizontalSpacing () const + */ +HB_FUNC( QT_QGRIDLAYOUT_HORIZONTALSPACING ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->horizontalSpacing() ); +} + +/* + * QLayoutItem * itemAtPosition ( int row, int column ) const + */ +HB_FUNC( QT_QGRIDLAYOUT_ITEMATPOSITION ) +{ + hb_retptr( ( QLayoutItem* ) hbqt_par_QGridLayout( 1 )->itemAtPosition( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * Qt::Corner originCorner () const + */ +HB_FUNC( QT_QGRIDLAYOUT_ORIGINCORNER ) +{ + hb_retni( ( Qt::Corner ) hbqt_par_QGridLayout( 1 )->originCorner() ); +} + +/* + * int rowCount () const + */ +HB_FUNC( QT_QGRIDLAYOUT_ROWCOUNT ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->rowCount() ); +} + +/* + * int rowMinimumHeight ( int row ) const + */ +HB_FUNC( QT_QGRIDLAYOUT_ROWMINIMUMHEIGHT ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->rowMinimumHeight( hb_parni( 2 ) ) ); +} + +/* + * int rowStretch ( int row ) const + */ +HB_FUNC( QT_QGRIDLAYOUT_ROWSTRETCH ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->rowStretch( hb_parni( 2 ) ) ); +} + +/* + * void setColumnMinimumWidth ( int column, int minSize ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETCOLUMNMINIMUMWIDTH ) +{ + hbqt_par_QGridLayout( 1 )->setColumnMinimumWidth( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setColumnStretch ( int column, int stretch ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETCOLUMNSTRETCH ) +{ + hbqt_par_QGridLayout( 1 )->setColumnStretch( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setHorizontalSpacing ( int spacing ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETHORIZONTALSPACING ) +{ + hbqt_par_QGridLayout( 1 )->setHorizontalSpacing( hb_parni( 2 ) ); +} + +/* + * void setOriginCorner ( Qt::Corner corner ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETORIGINCORNER ) +{ + hbqt_par_QGridLayout( 1 )->setOriginCorner( ( Qt::Corner ) hb_parni( 2 ) ); +} + +/* + * void setRowMinimumHeight ( int row, int minSize ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETROWMINIMUMHEIGHT ) +{ + hbqt_par_QGridLayout( 1 )->setRowMinimumHeight( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setRowStretch ( int row, int stretch ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETROWSTRETCH ) +{ + hbqt_par_QGridLayout( 1 )->setRowStretch( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setSpacing ( int spacing ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETSPACING ) +{ + hbqt_par_QGridLayout( 1 )->setSpacing( hb_parni( 2 ) ); +} + +/* + * void setVerticalSpacing ( int spacing ) + */ +HB_FUNC( QT_QGRIDLAYOUT_SETVERTICALSPACING ) +{ + hbqt_par_QGridLayout( 1 )->setVerticalSpacing( hb_parni( 2 ) ); +} + +/* + * int spacing () const + */ +HB_FUNC( QT_QGRIDLAYOUT_SPACING ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->spacing() ); +} + +/* + * int verticalSpacing () const + */ +HB_FUNC( QT_QGRIDLAYOUT_VERTICALSPACING ) +{ + hb_retni( hbqt_par_QGridLayout( 1 )->verticalSpacing() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qgroupbox.cpp b/harbour/contrib/hbqt/hbqt_qgroupbox.cpp index 711e93793d..fa4a32b65f 100644 --- a/harbour/contrib/hbqt/hbqt_qgroupbox.cpp +++ b/harbour/contrib/hbqt/hbqt_qgroupbox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -79,7 +78,7 @@ HB_FUNC( QT_QGROUPBOX ) */ HB_FUNC( QT_QGROUPBOX_ALIGNMENT ) { - hb_retni( hbqt_par_QGroupBox( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QGroupBox( 1 )->alignment() ); } /* @@ -87,7 +86,7 @@ HB_FUNC( QT_QGROUPBOX_ALIGNMENT ) */ HB_FUNC( QT_QGROUPBOX_ISCHECKABLE ) { - hb_retl( hbqt_par_QGroupBox( 1 )->isCheckable( ) ); + hb_retl( hbqt_par_QGroupBox( 1 )->isCheckable() ); } /* @@ -95,7 +94,7 @@ HB_FUNC( QT_QGROUPBOX_ISCHECKABLE ) */ HB_FUNC( QT_QGROUPBOX_ISCHECKED ) { - hb_retl( hbqt_par_QGroupBox( 1 )->isChecked( ) ); + hb_retl( hbqt_par_QGroupBox( 1 )->isChecked() ); } /* @@ -103,7 +102,7 @@ HB_FUNC( QT_QGROUPBOX_ISCHECKED ) */ HB_FUNC( QT_QGROUPBOX_ISFLAT ) { - hb_retl( hbqt_par_QGroupBox( 1 )->isFlat( ) ); + hb_retl( hbqt_par_QGroupBox( 1 )->isFlat() ); } /* @@ -143,7 +142,15 @@ HB_FUNC( QT_QGROUPBOX_SETTITLE ) */ HB_FUNC( QT_QGROUPBOX_TITLE ) { - hb_retc( hbqt_par_QGroupBox( 1 )->title( ).toLatin1().data() ); + hb_retc( hbqt_par_QGroupBox( 1 )->title().toLatin1().data() ); +} + +/* + * void setChecked ( bool checked ) + */ +HB_FUNC( QT_QGROUPBOX_SETCHECKED ) +{ + hbqt_par_QGroupBox( 1 )->setChecked( hb_parl( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qhboxlayout.cpp b/harbour/contrib/hbqt/hbqt_qhboxlayout.cpp index 50f6d07683..89039cd549 100644 --- a/harbour/contrib/hbqt/hbqt_qhboxlayout.cpp +++ b/harbour/contrib/hbqt/hbqt_qhboxlayout.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qheaderview.cpp b/harbour/contrib/hbqt/hbqt_qheaderview.cpp new file mode 100644 index 0000000000..5640e684d0 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qheaderview.cpp @@ -0,0 +1,535 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QHeaderView ( Qt::Orientation orientation, QWidget * parent = 0 ) + * virtual ~QHeaderView () + */ +HB_FUNC( QT_QHEADERVIEW ) +{ + hb_retptr( new QHeaderView( ( Qt::Orientation ) hb_parni( 1 ), hbqt_par_QWidget( 2 ) ) ); +} + +/* + * bool cascadingSectionResizes () const + */ +HB_FUNC( QT_QHEADERVIEW_CASCADINGSECTIONRESIZES ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->cascadingSectionResizes() ); +} + +/* + * int count () const + */ +HB_FUNC( QT_QHEADERVIEW_COUNT ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->count() ); +} + +/* + * Qt::Alignment defaultAlignment () const + */ +HB_FUNC( QT_QHEADERVIEW_DEFAULTALIGNMENT ) +{ + hb_retni( ( Qt::Alignment ) hbqt_par_QHeaderView( 1 )->defaultAlignment() ); +} + +/* + * int defaultSectionSize () const + */ +HB_FUNC( QT_QHEADERVIEW_DEFAULTSECTIONSIZE ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->defaultSectionSize() ); +} + +/* + * int hiddenSectionCount () const + */ +HB_FUNC( QT_QHEADERVIEW_HIDDENSECTIONCOUNT ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->hiddenSectionCount() ); +} + +/* + * void hideSection ( int logicalIndex ) + */ +HB_FUNC( QT_QHEADERVIEW_HIDESECTION ) +{ + hbqt_par_QHeaderView( 1 )->hideSection( hb_parni( 2 ) ); +} + +/* + * bool highlightSections () const + */ +HB_FUNC( QT_QHEADERVIEW_HIGHLIGHTSECTIONS ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->highlightSections() ); +} + +/* + * bool isClickable () const + */ +HB_FUNC( QT_QHEADERVIEW_ISCLICKABLE ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->isClickable() ); +} + +/* + * bool isMovable () const + */ +HB_FUNC( QT_QHEADERVIEW_ISMOVABLE ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->isMovable() ); +} + +/* + * bool isSectionHidden ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_ISSECTIONHIDDEN ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->isSectionHidden( hb_parni( 2 ) ) ); +} + +/* + * bool isSortIndicatorShown () const + */ +HB_FUNC( QT_QHEADERVIEW_ISSORTINDICATORSHOWN ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->isSortIndicatorShown() ); +} + +/* + * int length () const + */ +HB_FUNC( QT_QHEADERVIEW_LENGTH ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->length() ); +} + +/* + * int logicalIndex ( int visualIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_LOGICALINDEX ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->logicalIndex( hb_parni( 2 ) ) ); +} + +/* + * int logicalIndexAt ( int position ) const + */ +HB_FUNC( QT_QHEADERVIEW_LOGICALINDEXAT ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->logicalIndexAt( hb_parni( 2 ) ) ); +} + +/* + * int logicalIndexAt ( int x, int y ) const + */ +HB_FUNC( QT_QHEADERVIEW_LOGICALINDEXAT_1 ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->logicalIndexAt( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * int logicalIndexAt ( const QPoint & pos ) const + */ +HB_FUNC( QT_QHEADERVIEW_LOGICALINDEXAT_2 ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->logicalIndexAt( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * int minimumSectionSize () const + */ +HB_FUNC( QT_QHEADERVIEW_MINIMUMSECTIONSIZE ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->minimumSectionSize() ); +} + +/* + * void moveSection ( int from, int to ) + */ +HB_FUNC( QT_QHEADERVIEW_MOVESECTION ) +{ + hbqt_par_QHeaderView( 1 )->moveSection( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * int offset () const + */ +HB_FUNC( QT_QHEADERVIEW_OFFSET ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->offset() ); +} + +/* + * Qt::Orientation orientation () const + */ +HB_FUNC( QT_QHEADERVIEW_ORIENTATION ) +{ + hb_retni( ( Qt::Orientation ) hbqt_par_QHeaderView( 1 )->orientation() ); +} + +/* + * ResizeMode resizeMode ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_RESIZEMODE ) +{ + hb_retni( ( QHeaderView::ResizeMode ) hbqt_par_QHeaderView( 1 )->resizeMode( hb_parni( 2 ) ) ); +} + +/* + * void resizeSection ( int logicalIndex, int size ) + */ +HB_FUNC( QT_QHEADERVIEW_RESIZESECTION ) +{ + hbqt_par_QHeaderView( 1 )->resizeSection( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void resizeSections ( QHeaderView::ResizeMode mode ) + */ +HB_FUNC( QT_QHEADERVIEW_RESIZESECTIONS ) +{ + hbqt_par_QHeaderView( 1 )->resizeSections( ( QHeaderView::ResizeMode ) hb_parni( 2 ) ); +} + +/* + * bool restoreState ( const QByteArray & state ) + */ +HB_FUNC( QT_QHEADERVIEW_RESTORESTATE ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->restoreState( *hbqt_par_QByteArray( 2 ) ) ); +} + +/* + * QByteArray saveState () const + */ +HB_FUNC( QT_QHEADERVIEW_SAVESTATE ) +{ + hb_retptr( new QByteArray( hbqt_par_QHeaderView( 1 )->saveState() ) ); +} + +/* + * int sectionPosition ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_SECTIONPOSITION ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->sectionPosition( hb_parni( 2 ) ) ); +} + +/* + * int sectionSize ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_SECTIONSIZE ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->sectionSize( hb_parni( 2 ) ) ); +} + +/* + * int sectionSizeHint ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_SECTIONSIZEHINT ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->sectionSizeHint( hb_parni( 2 ) ) ); +} + +/* + * int sectionViewportPosition ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_SECTIONVIEWPORTPOSITION ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->sectionViewportPosition( hb_parni( 2 ) ) ); +} + +/* + * bool sectionsHidden () const + */ +HB_FUNC( QT_QHEADERVIEW_SECTIONSHIDDEN ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->sectionsHidden() ); +} + +/* + * bool sectionsMoved () const + */ +HB_FUNC( QT_QHEADERVIEW_SECTIONSMOVED ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->sectionsMoved() ); +} + +/* + * void setCascadingSectionResizes ( bool enable ) + */ +HB_FUNC( QT_QHEADERVIEW_SETCASCADINGSECTIONRESIZES ) +{ + hbqt_par_QHeaderView( 1 )->setCascadingSectionResizes( hb_parl( 2 ) ); +} + +/* + * void setClickable ( bool clickable ) + */ +HB_FUNC( QT_QHEADERVIEW_SETCLICKABLE ) +{ + hbqt_par_QHeaderView( 1 )->setClickable( hb_parl( 2 ) ); +} + +/* + * void setDefaultAlignment ( Qt::Alignment alignment ) + */ +HB_FUNC( QT_QHEADERVIEW_SETDEFAULTALIGNMENT ) +{ + hbqt_par_QHeaderView( 1 )->setDefaultAlignment( ( Qt::Alignment ) hb_parni( 2 ) ); +} + +/* + * void setDefaultSectionSize ( int size ) + */ +HB_FUNC( QT_QHEADERVIEW_SETDEFAULTSECTIONSIZE ) +{ + hbqt_par_QHeaderView( 1 )->setDefaultSectionSize( hb_parni( 2 ) ); +} + +/* + * void setHighlightSections ( bool highlight ) + */ +HB_FUNC( QT_QHEADERVIEW_SETHIGHLIGHTSECTIONS ) +{ + hbqt_par_QHeaderView( 1 )->setHighlightSections( hb_parl( 2 ) ); +} + +/* + * void setMinimumSectionSize ( int size ) + */ +HB_FUNC( QT_QHEADERVIEW_SETMINIMUMSECTIONSIZE ) +{ + hbqt_par_QHeaderView( 1 )->setMinimumSectionSize( hb_parni( 2 ) ); +} + +/* + * void setMovable ( bool movable ) + */ +HB_FUNC( QT_QHEADERVIEW_SETMOVABLE ) +{ + hbqt_par_QHeaderView( 1 )->setMovable( hb_parl( 2 ) ); +} + +/* + * void setResizeMode ( ResizeMode mode ) + */ +HB_FUNC( QT_QHEADERVIEW_SETRESIZEMODE ) +{ + hbqt_par_QHeaderView( 1 )->setResizeMode( ( QHeaderView::ResizeMode ) hb_parni( 2 ) ); +} + +/* + * void setResizeMode ( int logicalIndex, ResizeMode mode ) + */ +HB_FUNC( QT_QHEADERVIEW_SETRESIZEMODE_1 ) +{ + hbqt_par_QHeaderView( 1 )->setResizeMode( hb_parni( 2 ), ( QHeaderView::ResizeMode ) hb_parni( 3 ) ); +} + +/* + * void setSectionHidden ( int logicalIndex, bool hide ) + */ +HB_FUNC( QT_QHEADERVIEW_SETSECTIONHIDDEN ) +{ + hbqt_par_QHeaderView( 1 )->setSectionHidden( hb_parni( 2 ), hb_parl( 3 ) ); +} + +/* + * void setSortIndicator ( int logicalIndex, Qt::SortOrder order ) + */ +HB_FUNC( QT_QHEADERVIEW_SETSORTINDICATOR ) +{ + hbqt_par_QHeaderView( 1 )->setSortIndicator( hb_parni( 2 ), ( Qt::SortOrder ) hb_parni( 3 ) ); +} + +/* + * void setSortIndicatorShown ( bool show ) + */ +HB_FUNC( QT_QHEADERVIEW_SETSORTINDICATORSHOWN ) +{ + hbqt_par_QHeaderView( 1 )->setSortIndicatorShown( hb_parl( 2 ) ); +} + +/* + * void setStretchLastSection ( bool stretch ) + */ +HB_FUNC( QT_QHEADERVIEW_SETSTRETCHLASTSECTION ) +{ + hbqt_par_QHeaderView( 1 )->setStretchLastSection( hb_parl( 2 ) ); +} + +/* + * void showSection ( int logicalIndex ) + */ +HB_FUNC( QT_QHEADERVIEW_SHOWSECTION ) +{ + hbqt_par_QHeaderView( 1 )->showSection( hb_parni( 2 ) ); +} + +/* + * virtual QSize sizeHint () const + */ +HB_FUNC( QT_QHEADERVIEW_SIZEHINT ) +{ + hb_retptr( new QSize( hbqt_par_QHeaderView( 1 )->sizeHint() ) ); +} + +/* + * Qt::SortOrder sortIndicatorOrder () const + */ +HB_FUNC( QT_QHEADERVIEW_SORTINDICATORORDER ) +{ + hb_retni( ( Qt::SortOrder ) hbqt_par_QHeaderView( 1 )->sortIndicatorOrder() ); +} + +/* + * int sortIndicatorSection () const + */ +HB_FUNC( QT_QHEADERVIEW_SORTINDICATORSECTION ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->sortIndicatorSection() ); +} + +/* + * bool stretchLastSection () const + */ +HB_FUNC( QT_QHEADERVIEW_STRETCHLASTSECTION ) +{ + hb_retl( hbqt_par_QHeaderView( 1 )->stretchLastSection() ); +} + +/* + * int stretchSectionCount () const + */ +HB_FUNC( QT_QHEADERVIEW_STRETCHSECTIONCOUNT ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->stretchSectionCount() ); +} + +/* + * void swapSections ( int first, int second ) + */ +HB_FUNC( QT_QHEADERVIEW_SWAPSECTIONS ) +{ + hbqt_par_QHeaderView( 1 )->swapSections( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * int visualIndex ( int logicalIndex ) const + */ +HB_FUNC( QT_QHEADERVIEW_VISUALINDEX ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->visualIndex( hb_parni( 2 ) ) ); +} + +/* + * int visualIndexAt ( int position ) const + */ +HB_FUNC( QT_QHEADERVIEW_VISUALINDEXAT ) +{ + hb_retni( hbqt_par_QHeaderView( 1 )->visualIndexAt( hb_parni( 2 ) ) ); +} + +/* + * void headerDataChanged ( Qt::Orientation orientation, int logicalFirst, int logicalLast ) + */ +HB_FUNC( QT_QHEADERVIEW_HEADERDATACHANGED ) +{ + hbqt_par_QHeaderView( 1 )->headerDataChanged( ( Qt::Orientation ) hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); +} + +/* + * void setOffset ( int offset ) + */ +HB_FUNC( QT_QHEADERVIEW_SETOFFSET ) +{ + hbqt_par_QHeaderView( 1 )->setOffset( hb_parni( 2 ) ); +} + +/* + * void setOffsetToLastSection () + */ +HB_FUNC( QT_QHEADERVIEW_SETOFFSETTOLASTSECTION ) +{ + hbqt_par_QHeaderView( 1 )->setOffsetToLastSection(); +} + +/* + * void setOffsetToSectionPosition ( int visualIndex ) + */ +HB_FUNC( QT_QHEADERVIEW_SETOFFSETTOSECTIONPOSITION ) +{ + hbqt_par_QHeaderView( 1 )->setOffsetToSectionPosition( hb_parni( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qhttp.cpp b/harbour/contrib/hbqt/hbqt_qhttp.cpp new file mode 100644 index 0000000000..1b5b2f1ba8 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qhttp.cpp @@ -0,0 +1,297 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QHttp ( QObject * parent = 0 ) + * QHttp ( const QString & hostName, quint16 port = 80, QObject * parent = 0 ) + * QHttp ( const QString & hostName, ConnectionMode mode, quint16 port = 0, QObject * parent = 0 ) + * virtual ~QHttp () + */ +HB_FUNC( QT_QHTTP ) +{ + hb_retptr( new QHttp( hbqt_par_QObject( 1 ) ) ); +} + +/* + * qint64 bytesAvailable () const + */ +HB_FUNC( QT_QHTTP_BYTESAVAILABLE ) +{ + hb_retni( hbqt_par_QHttp( 1 )->bytesAvailable() ); +} + +/* + * void clearPendingRequests () + */ +HB_FUNC( QT_QHTTP_CLEARPENDINGREQUESTS ) +{ + hbqt_par_QHttp( 1 )->clearPendingRequests(); +} + +/* + * int close () + */ +HB_FUNC( QT_QHTTP_CLOSE ) +{ + hb_retni( hbqt_par_QHttp( 1 )->close() ); +} + +/* + * QIODevice * currentDestinationDevice () const + */ +HB_FUNC( QT_QHTTP_CURRENTDESTINATIONDEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QHttp( 1 )->currentDestinationDevice() ); +} + +/* + * int currentId () const + */ +HB_FUNC( QT_QHTTP_CURRENTID ) +{ + hb_retni( hbqt_par_QHttp( 1 )->currentId() ); +} + +/* + * QHttpRequestHeader currentRequest () const + */ +HB_FUNC( QT_QHTTP_CURRENTREQUEST ) +{ + hb_retptr( new QHttpRequestHeader( hbqt_par_QHttp( 1 )->currentRequest() ) ); +} + +/* + * QIODevice * currentSourceDevice () const + */ +HB_FUNC( QT_QHTTP_CURRENTSOURCEDEVICE ) +{ + hb_retptr( ( QIODevice* ) hbqt_par_QHttp( 1 )->currentSourceDevice() ); +} + +/* + * Error error () const + */ +HB_FUNC( QT_QHTTP_ERROR ) +{ + hb_retni( ( QHttp::Error ) hbqt_par_QHttp( 1 )->error() ); +} + +/* + * QString errorString () const + */ +HB_FUNC( QT_QHTTP_ERRORSTRING ) +{ + hb_retc( hbqt_par_QHttp( 1 )->errorString().toLatin1().data() ); +} + +/* + * int get ( const QString & path, QIODevice * to = 0 ) + */ +HB_FUNC( QT_QHTTP_GET ) +{ + hb_retni( hbqt_par_QHttp( 1 )->get( hbqt_par_QString( 2 ), hbqt_par_QIODevice( 3 ) ) ); +} + +/* + * bool hasPendingRequests () const + */ +HB_FUNC( QT_QHTTP_HASPENDINGREQUESTS ) +{ + hb_retl( hbqt_par_QHttp( 1 )->hasPendingRequests() ); +} + +/* + * int head ( const QString & path ) + */ +HB_FUNC( QT_QHTTP_HEAD ) +{ + hb_retni( hbqt_par_QHttp( 1 )->head( hbqt_par_QString( 2 ) ) ); +} + +/* + * QHttpResponseHeader lastResponse () const + */ +HB_FUNC( QT_QHTTP_LASTRESPONSE ) +{ + hb_retptr( new QHttpResponseHeader( hbqt_par_QHttp( 1 )->lastResponse() ) ); +} + +/* + * int post ( const QString & path, QIODevice * data, QIODevice * to = 0 ) + */ +HB_FUNC( QT_QHTTP_POST ) +{ + hb_retni( hbqt_par_QHttp( 1 )->post( hbqt_par_QString( 2 ), hbqt_par_QIODevice( 3 ), hbqt_par_QIODevice( 4 ) ) ); +} + +/* + * int post ( const QString & path, const QByteArray & data, QIODevice * to = 0 ) + */ +HB_FUNC( QT_QHTTP_POST_1 ) +{ + hb_retni( hbqt_par_QHttp( 1 )->post( hbqt_par_QString( 2 ), *hbqt_par_QByteArray( 3 ), hbqt_par_QIODevice( 4 ) ) ); +} + +/* + * qint64 read ( char * data, qint64 maxlen ) + */ +HB_FUNC( QT_QHTTP_READ ) +{ + hb_retni( hbqt_par_QHttp( 1 )->read( hbqt_par_char( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QByteArray readAll () + */ +HB_FUNC( QT_QHTTP_READALL ) +{ + hb_retptr( new QByteArray( hbqt_par_QHttp( 1 )->readAll() ) ); +} + +/* + * int request ( const QHttpRequestHeader & header, QIODevice * data = 0, QIODevice * to = 0 ) + */ +HB_FUNC( QT_QHTTP_REQUEST ) +{ + hb_retni( hbqt_par_QHttp( 1 )->request( *hbqt_par_QHttpRequestHeader( 2 ), hbqt_par_QIODevice( 3 ), hbqt_par_QIODevice( 4 ) ) ); +} + +/* + * int request ( const QHttpRequestHeader & header, const QByteArray & data, QIODevice * to = 0 ) + */ +HB_FUNC( QT_QHTTP_REQUEST_1 ) +{ + hb_retni( hbqt_par_QHttp( 1 )->request( *hbqt_par_QHttpRequestHeader( 2 ), *hbqt_par_QByteArray( 3 ), hbqt_par_QIODevice( 4 ) ) ); +} + +/* + * int setHost ( const QString & hostName, quint16 port = 80 ) + */ +HB_FUNC( QT_QHTTP_SETHOST ) +{ + hb_retni( hbqt_par_QHttp( 1 )->setHost( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? 80 : hb_parni( 3 ) ) ) ); +} + +/* + * int setHost ( const QString & hostName, ConnectionMode mode, quint16 port = 0 ) + */ +HB_FUNC( QT_QHTTP_SETHOST_1 ) +{ + hb_retni( hbqt_par_QHttp( 1 )->setHost( hbqt_par_QString( 2 ), ( QHttp::ConnectionMode ) hb_parni( 3 ), ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) ) ) ); +} + +/* + * int setProxy ( const QString & host, int port, const QString & username = QString(), const QString & password = QString() ) + */ +HB_FUNC( QT_QHTTP_SETPROXY ) +{ + hb_retni( hbqt_par_QHttp( 1 )->setProxy( hbqt_par_QString( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ) ) ); +} + +/* + * int setProxy ( const QNetworkProxy & proxy ) + */ +HB_FUNC( QT_QHTTP_SETPROXY_1 ) +{ + hb_retni( hbqt_par_QHttp( 1 )->setProxy( *hbqt_par_QNetworkProxy( 2 ) ) ); +} + +/* + * int setSocket ( QTcpSocket * socket ) + */ +HB_FUNC( QT_QHTTP_SETSOCKET ) +{ + hb_retni( hbqt_par_QHttp( 1 )->setSocket( hbqt_par_QTcpSocket( 2 ) ) ); +} + +/* + * int setUser ( const QString & userName, const QString & password = QString() ) + */ +HB_FUNC( QT_QHTTP_SETUSER ) +{ + hb_retni( hbqt_par_QHttp( 1 )->setUser( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ) ); +} + +/* + * State state () const + */ +HB_FUNC( QT_QHTTP_STATE ) +{ + hb_retni( ( QHttp::State ) hbqt_par_QHttp( 1 )->state() ); +} + +/* + * void abort () + */ +HB_FUNC( QT_QHTTP_ABORT ) +{ + hbqt_par_QHttp( 1 )->abort(); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qicon.cpp b/harbour/contrib/hbqt/hbqt_qicon.cpp new file mode 100644 index 0000000000..5a80acc27e --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qicon.cpp @@ -0,0 +1,173 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 10/11 [ 90.91% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QList availableSizes ( Mode mode = Normal, State state = Off ) const + */ + + +#include + + +/* + * QIcon () + * QIcon ( const QPixmap & pixmap ) + * QIcon ( const QIcon & other ) + * QIcon ( const QString & fileName ) + * QIcon ( QIconEngine * engine ) + * QIcon ( QIconEngineV2 * engine ) + * ~QIcon () + */ +HB_FUNC( QT_QICON ) +{ + hb_retptr( ( QIcon* ) new QIcon() ); +} + +/* + * QSize actualSize ( const QSize & size, Mode mode = Normal, State state = Off ) const + */ +HB_FUNC( QT_QICON_ACTUALSIZE ) +{ + hb_retptr( new QSize( hbqt_par_QIcon( 1 )->actualSize( *hbqt_par_QSize( 2 ), ( HB_ISNIL( 3 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 4 ) ) ) ) ); +} + +/* + * void addFile ( const QString & fileName, const QSize & size = QSize(), Mode mode = Normal, State state = Off ) + */ +HB_FUNC( QT_QICON_ADDFILE ) +{ + hbqt_par_QIcon( 1 )->addFile( hbqt_par_QString( 2 ), *hbqt_par_QSize( 3 ) ); +} + +/* + * void addPixmap ( const QPixmap & pixmap, Mode mode = Normal, State state = Off ) + */ +HB_FUNC( QT_QICON_ADDPIXMAP ) +{ + hbqt_par_QIcon( 1 )->addPixmap( *hbqt_par_QPixmap( 2 ), ( HB_ISNIL( 3 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 4 ) ) ); +} + +/* + * qint64 cacheKey () const + */ +HB_FUNC( QT_QICON_CACHEKEY ) +{ + hb_retni( hbqt_par_QIcon( 1 )->cacheKey() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QICON_ISNULL ) +{ + hb_retl( hbqt_par_QIcon( 1 )->isNull() ); +} + +/* + * void paint ( QPainter * painter, const QRect & rect, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off ) const + */ +HB_FUNC( QT_QICON_PAINT ) +{ + hbqt_par_QIcon( 1 )->paint( hbqt_par_QPainter( 2 ), *hbqt_par_QRect( 3 ), ( HB_ISNIL( 4 ) ? ( Qt::Alignment ) Qt::AlignCenter : ( Qt::Alignment ) hb_parni( 4 ) ), ( HB_ISNIL( 5 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 5 ) ), ( HB_ISNIL( 6 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 6 ) ) ); +} + +/* + * void paint ( QPainter * painter, int x, int y, int w, int h, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off ) const + */ +HB_FUNC( QT_QICON_PAINT_1 ) +{ + hbqt_par_QIcon( 1 )->paint( hbqt_par_QPainter( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), ( HB_ISNIL( 7 ) ? ( Qt::Alignment ) Qt::AlignCenter : ( Qt::Alignment ) hb_parni( 7 ) ), ( HB_ISNIL( 8 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 8 ) ), ( HB_ISNIL( 9 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 9 ) ) ); +} + +/* + * QPixmap pixmap ( const QSize & size, Mode mode = Normal, State state = Off ) const + */ +HB_FUNC( QT_QICON_PIXMAP ) +{ + hb_retptr( new QPixmap( hbqt_par_QIcon( 1 )->pixmap( *hbqt_par_QSize( 2 ), ( HB_ISNIL( 3 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QPixmap pixmap ( int w, int h, Mode mode = Normal, State state = Off ) const + */ +HB_FUNC( QT_QICON_PIXMAP_1 ) +{ + hb_retptr( new QPixmap( hbqt_par_QIcon( 1 )->pixmap( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 4 ) ), ( HB_ISNIL( 5 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 5 ) ) ) ) ); +} + +/* + * QPixmap pixmap ( int extent, Mode mode = Normal, State state = Off ) const + */ +HB_FUNC( QT_QICON_PIXMAP_2 ) +{ + hb_retptr( new QPixmap( hbqt_par_QIcon( 1 )->pixmap( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QIcon::Mode ) QIcon::Normal : ( QIcon::Mode ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( QIcon::State ) QIcon::Off : ( QIcon::State ) hb_parni( 4 ) ) ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qinputdialog.cpp b/harbour/contrib/hbqt/hbqt_qinputdialog.cpp index 2d0337ebb6..be8f66c615 100644 --- a/harbour/contrib/hbqt/hbqt_qinputdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qinputdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,17 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 38/40 [ 95.00% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QStringList comboBoxItems () const - * void setComboBoxItems ( const QStringList & items ) - */ - - #include @@ -88,7 +77,15 @@ HB_FUNC( QT_QINPUTDIALOG ) */ HB_FUNC( QT_QINPUTDIALOG_CANCELBUTTONTEXT ) { - hb_retc( hbqt_par_QInputDialog( 1 )->cancelButtonText( ).toLatin1().data() ); + hb_retc( hbqt_par_QInputDialog( 1 )->cancelButtonText().toLatin1().data() ); +} + +/* + * QStringList comboBoxItems () const + */ +HB_FUNC( QT_QINPUTDIALOG_COMBOBOXITEMS ) +{ + hb_retptr( new QStringList( hbqt_par_QInputDialog( 1 )->comboBoxItems() ) ); } /* @@ -104,7 +101,7 @@ HB_FUNC( QT_QINPUTDIALOG_DONE ) */ HB_FUNC( QT_QINPUTDIALOG_DOUBLEDECIMALS ) { - hb_retni( hbqt_par_QInputDialog( 1 )->doubleDecimals( ) ); + hb_retni( hbqt_par_QInputDialog( 1 )->doubleDecimals() ); } /* @@ -112,7 +109,7 @@ HB_FUNC( QT_QINPUTDIALOG_DOUBLEDECIMALS ) */ HB_FUNC( QT_QINPUTDIALOG_DOUBLEMAXIMUM ) { - hb_retnd( hbqt_par_QInputDialog( 1 )->doubleMaximum( ) ); + hb_retnd( hbqt_par_QInputDialog( 1 )->doubleMaximum() ); } /* @@ -120,7 +117,7 @@ HB_FUNC( QT_QINPUTDIALOG_DOUBLEMAXIMUM ) */ HB_FUNC( QT_QINPUTDIALOG_DOUBLEMINIMUM ) { - hb_retnd( hbqt_par_QInputDialog( 1 )->doubleMinimum( ) ); + hb_retnd( hbqt_par_QInputDialog( 1 )->doubleMinimum() ); } /* @@ -128,7 +125,7 @@ HB_FUNC( QT_QINPUTDIALOG_DOUBLEMINIMUM ) */ HB_FUNC( QT_QINPUTDIALOG_DOUBLEVALUE ) { - hb_retnd( hbqt_par_QInputDialog( 1 )->doubleValue( ) ); + hb_retnd( hbqt_par_QInputDialog( 1 )->doubleValue() ); } /* @@ -136,7 +133,7 @@ HB_FUNC( QT_QINPUTDIALOG_DOUBLEVALUE ) */ HB_FUNC( QT_QINPUTDIALOG_INPUTMODE ) { - hb_retni( hbqt_par_QInputDialog( 1 )->inputMode( ) ); + hb_retni( ( QInputDialog::InputMode ) hbqt_par_QInputDialog( 1 )->inputMode() ); } /* @@ -144,7 +141,7 @@ HB_FUNC( QT_QINPUTDIALOG_INPUTMODE ) */ HB_FUNC( QT_QINPUTDIALOG_INTMAXIMUM ) { - hb_retni( hbqt_par_QInputDialog( 1 )->intMaximum( ) ); + hb_retni( hbqt_par_QInputDialog( 1 )->intMaximum() ); } /* @@ -152,7 +149,7 @@ HB_FUNC( QT_QINPUTDIALOG_INTMAXIMUM ) */ HB_FUNC( QT_QINPUTDIALOG_INTMINIMUM ) { - hb_retni( hbqt_par_QInputDialog( 1 )->intMinimum( ) ); + hb_retni( hbqt_par_QInputDialog( 1 )->intMinimum() ); } /* @@ -160,7 +157,7 @@ HB_FUNC( QT_QINPUTDIALOG_INTMINIMUM ) */ HB_FUNC( QT_QINPUTDIALOG_INTSTEP ) { - hb_retni( hbqt_par_QInputDialog( 1 )->intStep( ) ); + hb_retni( hbqt_par_QInputDialog( 1 )->intStep() ); } /* @@ -168,7 +165,7 @@ HB_FUNC( QT_QINPUTDIALOG_INTSTEP ) */ HB_FUNC( QT_QINPUTDIALOG_INTVALUE ) { - hb_retni( hbqt_par_QInputDialog( 1 )->intValue( ) ); + hb_retni( hbqt_par_QInputDialog( 1 )->intValue() ); } /* @@ -176,7 +173,7 @@ HB_FUNC( QT_QINPUTDIALOG_INTVALUE ) */ HB_FUNC( QT_QINPUTDIALOG_ISCOMBOBOXEDITABLE ) { - hb_retl( hbqt_par_QInputDialog( 1 )->isComboBoxEditable( ) ); + hb_retl( hbqt_par_QInputDialog( 1 )->isComboBoxEditable() ); } /* @@ -184,7 +181,7 @@ HB_FUNC( QT_QINPUTDIALOG_ISCOMBOBOXEDITABLE ) */ HB_FUNC( QT_QINPUTDIALOG_LABELTEXT ) { - hb_retc( hbqt_par_QInputDialog( 1 )->labelText( ).toLatin1().data() ); + hb_retc( hbqt_par_QInputDialog( 1 )->labelText().toLatin1().data() ); } /* @@ -192,7 +189,7 @@ HB_FUNC( QT_QINPUTDIALOG_LABELTEXT ) */ HB_FUNC( QT_QINPUTDIALOG_OKBUTTONTEXT ) { - hb_retc( hbqt_par_QInputDialog( 1 )->okButtonText( ).toLatin1().data() ); + hb_retc( hbqt_par_QInputDialog( 1 )->okButtonText().toLatin1().data() ); } /* @@ -208,7 +205,7 @@ HB_FUNC( QT_QINPUTDIALOG_OPEN ) */ HB_FUNC( QT_QINPUTDIALOG_OPTIONS ) { - hb_retni( hbqt_par_QInputDialog( 1 )->options( ) ); + hb_retni( ( QInputDialog::InputDialogOptions ) hbqt_par_QInputDialog( 1 )->options() ); } /* @@ -227,6 +224,14 @@ HB_FUNC( QT_QINPUTDIALOG_SETCOMBOBOXEDITABLE ) hbqt_par_QInputDialog( 1 )->setComboBoxEditable( hb_parl( 2 ) ); } +/* + * void setComboBoxItems ( const QStringList & items ) + */ +HB_FUNC( QT_QINPUTDIALOG_SETCOMBOBOXITEMS ) +{ + hbqt_par_QInputDialog( 1 )->setComboBoxItems( *hbqt_par_QStringList( 2 ) ); +} + /* * void setDoubleDecimals ( int decimals ) */ @@ -376,7 +381,7 @@ HB_FUNC( QT_QINPUTDIALOG_TESTOPTION ) */ HB_FUNC( QT_QINPUTDIALOG_TEXTECHOMODE ) { - hb_retni( hbqt_par_QInputDialog( 1 )->textEchoMode( ) ); + hb_retni( ( QLineEdit::EchoMode ) hbqt_par_QInputDialog( 1 )->textEchoMode() ); } /* @@ -384,7 +389,7 @@ HB_FUNC( QT_QINPUTDIALOG_TEXTECHOMODE ) */ HB_FUNC( QT_QINPUTDIALOG_TEXTVALUE ) { - hb_retc( hbqt_par_QInputDialog( 1 )->textValue( ).toLatin1().data() ); + hb_retc( hbqt_par_QInputDialog( 1 )->textValue().toLatin1().data() ); } diff --git a/harbour/contrib/hbqt/hbqt_qinputevent.cpp b/harbour/contrib/hbqt/hbqt_qinputevent.cpp new file mode 100644 index 0000000000..d3d7e5b404 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qinputevent.cpp @@ -0,0 +1,88 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include +#include + +/* + * + * + */ +HB_FUNC( QT_QINPUTEVENT ) +{ + hb_retptr( ( QInputEvent* ) new QInputEvent( ( QEvent::Type ) hb_parni( 1 ), + ( Qt::KeyboardModifiers ) hb_parni( 2 ) ) ); +} + +/* + * Qt::KeyboardModifiers modifiers () const + */ +HB_FUNC( QT_QINPUTEVENT_MODIFIERS ) +{ + hb_retni( ( Qt::KeyboardModifiers ) hbqt_par_QInputEvent( 1 )->modifiers() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qlabel.cpp b/harbour/contrib/hbqt/hbqt_qlabel.cpp index 530c107b9c..4174000113 100644 --- a/harbour/contrib/hbqt/hbqt_qlabel.cpp +++ b/harbour/contrib/hbqt/hbqt_qlabel.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,17 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 26/28 [ 92.86% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * void setPicture ( const QPicture & picture ) - * void setPixmap ( const QPixmap & ) - */ - - #include @@ -89,7 +78,7 @@ HB_FUNC( QT_QLABEL ) */ HB_FUNC( QT_QLABEL_ALIGNMENT ) { - hb_retni( hbqt_par_QLabel( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QLabel( 1 )->alignment() ); } /* @@ -97,7 +86,7 @@ HB_FUNC( QT_QLABEL_ALIGNMENT ) */ HB_FUNC( QT_QLABEL_BUDDY ) { - hb_retptr( ( QWidget* ) hbqt_par_QLabel( 1 )->buddy( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QLabel( 1 )->buddy() ); } /* @@ -105,7 +94,7 @@ HB_FUNC( QT_QLABEL_BUDDY ) */ HB_FUNC( QT_QLABEL_HASSCALEDCONTENTS ) { - hb_retl( hbqt_par_QLabel( 1 )->hasScaledContents( ) ); + hb_retl( hbqt_par_QLabel( 1 )->hasScaledContents() ); } /* @@ -113,7 +102,7 @@ HB_FUNC( QT_QLABEL_HASSCALEDCONTENTS ) */ HB_FUNC( QT_QLABEL_INDENT ) { - hb_retni( hbqt_par_QLabel( 1 )->indent( ) ); + hb_retni( hbqt_par_QLabel( 1 )->indent() ); } /* @@ -121,7 +110,7 @@ HB_FUNC( QT_QLABEL_INDENT ) */ HB_FUNC( QT_QLABEL_MARGIN ) { - hb_retni( hbqt_par_QLabel( 1 )->margin( ) ); + hb_retni( hbqt_par_QLabel( 1 )->margin() ); } /* @@ -129,7 +118,7 @@ HB_FUNC( QT_QLABEL_MARGIN ) */ HB_FUNC( QT_QLABEL_MOVIE ) { - hb_retptr( ( QMovie* ) hbqt_par_QLabel( 1 )->movie( ) ); + hb_retptr( ( QMovie* ) hbqt_par_QLabel( 1 )->movie() ); } /* @@ -137,7 +126,7 @@ HB_FUNC( QT_QLABEL_MOVIE ) */ HB_FUNC( QT_QLABEL_OPENEXTERNALLINKS ) { - hb_retl( hbqt_par_QLabel( 1 )->openExternalLinks( ) ); + hb_retl( hbqt_par_QLabel( 1 )->openExternalLinks() ); } /* @@ -145,7 +134,7 @@ HB_FUNC( QT_QLABEL_OPENEXTERNALLINKS ) */ HB_FUNC( QT_QLABEL_PICTURE ) { - hb_retptr( ( QPicture* ) hbqt_par_QLabel( 1 )->picture( ) ); + hb_retptr( ( QPicture* ) hbqt_par_QLabel( 1 )->picture() ); } /* @@ -153,7 +142,7 @@ HB_FUNC( QT_QLABEL_PICTURE ) */ HB_FUNC( QT_QLABEL_PIXMAP ) { - hb_retptr( ( QPixmap* ) hbqt_par_QLabel( 1 )->pixmap( ) ); + hb_retptr( ( QPixmap* ) hbqt_par_QLabel( 1 )->pixmap() ); } /* @@ -212,6 +201,14 @@ HB_FUNC( QT_QLABEL_SETTEXTFORMAT ) hbqt_par_QLabel( 1 )->setTextFormat( ( Qt::TextFormat ) hb_parni( 2 ) ); } +/* + * void setTextInteractionFlags ( Qt::TextInteractionFlags flags ) + */ +HB_FUNC( QT_QLABEL_SETTEXTINTERACTIONFLAGS ) +{ + hbqt_par_QLabel( 1 )->setTextInteractionFlags( ( Qt::TextInteractionFlags ) hb_parni( 2 ) ); +} + /* * void setWordWrap ( bool on ) */ @@ -225,7 +222,7 @@ HB_FUNC( QT_QLABEL_SETWORDWRAP ) */ HB_FUNC( QT_QLABEL_TEXT ) { - hb_retc( hbqt_par_QLabel( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QLabel( 1 )->text().toLatin1().data() ); } /* @@ -233,7 +230,7 @@ HB_FUNC( QT_QLABEL_TEXT ) */ HB_FUNC( QT_QLABEL_TEXTFORMAT ) { - hb_retni( hbqt_par_QLabel( 1 )->textFormat( ) ); + hb_retni( ( Qt::TextFormat ) hbqt_par_QLabel( 1 )->textFormat() ); } /* @@ -241,7 +238,7 @@ HB_FUNC( QT_QLABEL_TEXTFORMAT ) */ HB_FUNC( QT_QLABEL_TEXTINTERACTIONFLAGS ) { - hb_retni( hbqt_par_QLabel( 1 )->textInteractionFlags( ) ); + hb_retni( ( Qt::TextInteractionFlags ) hbqt_par_QLabel( 1 )->textInteractionFlags() ); } /* @@ -249,7 +246,7 @@ HB_FUNC( QT_QLABEL_TEXTINTERACTIONFLAGS ) */ HB_FUNC( QT_QLABEL_WORDWRAP ) { - hb_retl( hbqt_par_QLabel( 1 )->wordWrap( ) ); + hb_retl( hbqt_par_QLabel( 1 )->wordWrap() ); } /* @@ -257,7 +254,7 @@ HB_FUNC( QT_QLABEL_WORDWRAP ) */ HB_FUNC( QT_QLABEL_CLEAR ) { - hbqt_par_QLabel( 1 )->clear( ); + hbqt_par_QLabel( 1 )->clear(); } /* @@ -284,6 +281,22 @@ HB_FUNC( QT_QLABEL_SETNUM_1 ) hbqt_par_QLabel( 1 )->setNum( hb_parnd( 2 ) ); } +/* + * void setPicture ( const QPicture & picture ) + */ +HB_FUNC( QT_QLABEL_SETPICTURE ) +{ + hbqt_par_QLabel( 1 )->setPicture( *hbqt_par_QPicture( 2 ) ); +} + +/* + * void setPixmap ( const QPixmap & ) + */ +HB_FUNC( QT_QLABEL_SETPIXMAP ) +{ + hbqt_par_QLabel( 1 )->setPixmap( *hbqt_par_QPixmap( 2 ) ); +} + /* * void setText ( const QString & ) */ diff --git a/harbour/contrib/hbqt/hbqt_qlayout.cpp b/harbour/contrib/hbqt/hbqt_qlayout.cpp index be6814cd52..38d4efa06f 100644 --- a/harbour/contrib/hbqt/hbqt_qlayout.cpp +++ b/harbour/contrib/hbqt/hbqt_qlayout.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 27/28 [ 96.43% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * void getContentsMargins ( int * left, int * top, int * right, int * bottom ) const - */ - - #include @@ -87,7 +77,7 @@ HB_FUNC( QT_QLAYOUT ) */ HB_FUNC( QT_QLAYOUT_ACTIVATE ) { - hb_retl( hbqt_par_QLayout( 1 )->activate( ) ); + hb_retl( hbqt_par_QLayout( 1 )->activate() ); } /* @@ -111,7 +101,7 @@ HB_FUNC( QT_QLAYOUT_ADDWIDGET ) */ HB_FUNC( QT_QLAYOUT_CONTENTSRECT ) { - hbqt_ret_QRect( hbqt_par_QLayout( 1 )->contentsRect( ) ); + hb_retptr( new QRect( hbqt_par_QLayout( 1 )->contentsRect() ) ); } /* @@ -119,7 +109,7 @@ HB_FUNC( QT_QLAYOUT_CONTENTSRECT ) */ HB_FUNC( QT_QLAYOUT_COUNT ) { - hb_retni( hbqt_par_QLayout( 1 )->count( ) ); + hb_retni( hbqt_par_QLayout( 1 )->count() ); } /* @@ -127,7 +117,25 @@ HB_FUNC( QT_QLAYOUT_COUNT ) */ HB_FUNC( QT_QLAYOUT_EXPANDINGDIRECTIONS ) { - hb_retni( hbqt_par_QLayout( 1 )->expandingDirections( ) ); + hb_retni( ( Qt::Orientations ) hbqt_par_QLayout( 1 )->expandingDirections() ); +} + +/* + * void getContentsMargins ( int * left, int * top, int * right, int * bottom ) const + */ +HB_FUNC( QT_QLAYOUT_GETCONTENTSMARGINS ) +{ + int iLeft = 0; + int iTop = 0; + int iRight = 0; + int iBottom = 0; + + hbqt_par_QLayout( 1 )->getContentsMargins( &iLeft, &iTop, &iRight, &iBottom ); + + hb_storni( iLeft, 2 ); + hb_storni( iTop, 3 ); + hb_storni( iRight, 4 ); + hb_storni( iBottom, 5 ); } /* @@ -143,7 +151,7 @@ HB_FUNC( QT_QLAYOUT_INDEXOF ) */ HB_FUNC( QT_QLAYOUT_ISENABLED ) { - hb_retl( hbqt_par_QLayout( 1 )->isEnabled( ) ); + hb_retl( hbqt_par_QLayout( 1 )->isEnabled() ); } /* @@ -159,7 +167,7 @@ HB_FUNC( QT_QLAYOUT_ITEMAT ) */ HB_FUNC( QT_QLAYOUT_MAXIMUMSIZE ) { - hbqt_ret_QSize( hbqt_par_QLayout( 1 )->maximumSize( ) ); + hb_retptr( new QSize( hbqt_par_QLayout( 1 )->maximumSize() ) ); } /* @@ -167,7 +175,7 @@ HB_FUNC( QT_QLAYOUT_MAXIMUMSIZE ) */ HB_FUNC( QT_QLAYOUT_MENUBAR ) { - hb_retptr( ( QWidget* ) hbqt_par_QLayout( 1 )->menuBar( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QLayout( 1 )->menuBar() ); } /* @@ -175,7 +183,7 @@ HB_FUNC( QT_QLAYOUT_MENUBAR ) */ HB_FUNC( QT_QLAYOUT_MINIMUMSIZE ) { - hbqt_ret_QSize( hbqt_par_QLayout( 1 )->minimumSize( ) ); + hb_retptr( new QSize( hbqt_par_QLayout( 1 )->minimumSize() ) ); } /* @@ -183,7 +191,7 @@ HB_FUNC( QT_QLAYOUT_MINIMUMSIZE ) */ HB_FUNC( QT_QLAYOUT_PARENTWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QLayout( 1 )->parentWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QLayout( 1 )->parentWidget() ); } /* @@ -271,7 +279,7 @@ HB_FUNC( QT_QLAYOUT_SETSPACING ) */ HB_FUNC( QT_QLAYOUT_SIZECONSTRAINT ) { - hb_retni( hbqt_par_QLayout( 1 )->sizeConstraint( ) ); + hb_retni( ( QLayout::SizeConstraint ) hbqt_par_QLayout( 1 )->sizeConstraint() ); } /* @@ -279,7 +287,7 @@ HB_FUNC( QT_QLAYOUT_SIZECONSTRAINT ) */ HB_FUNC( QT_QLAYOUT_SPACING ) { - hb_retni( hbqt_par_QLayout( 1 )->spacing( ) ); + hb_retni( hbqt_par_QLayout( 1 )->spacing() ); } /* @@ -295,7 +303,7 @@ HB_FUNC( QT_QLAYOUT_TAKEAT ) */ HB_FUNC( QT_QLAYOUT_UPDATE ) { - hbqt_par_QLayout( 1 )->update( ); + hbqt_par_QLayout( 1 )->update(); } diff --git a/harbour/contrib/hbqt/hbqt_qlayoutitem.cpp b/harbour/contrib/hbqt/hbqt_qlayoutitem.cpp index cb676e4c61..15dade373d 100644 --- a/harbour/contrib/hbqt/hbqt_qlayoutitem.cpp +++ b/harbour/contrib/hbqt/hbqt_qlayoutitem.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,12 +60,12 @@ /*----------------------------------------------------------------------*/ - #include /* - + * QLayoutItem ( Qt::Alignment alignment = 0 ) + * virtual ~QLayoutItem () */ HB_FUNC( QT_QLAYOUTITEM ) { @@ -77,7 +77,7 @@ HB_FUNC( QT_QLAYOUTITEM ) */ HB_FUNC( QT_QLAYOUTITEM_ALIGNMENT ) { - hb_retni( hbqt_par_QLayoutItem( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QLayoutItem( 1 )->alignment() ); } /* @@ -85,7 +85,7 @@ HB_FUNC( QT_QLAYOUTITEM_ALIGNMENT ) */ HB_FUNC( QT_QLAYOUTITEM_CONTROLTYPES ) { - hb_retni( hbqt_par_QLayoutItem( 1 )->controlTypes( ) ); + hb_retni( ( QSizePolicy::ControlTypes ) hbqt_par_QLayoutItem( 1 )->controlTypes() ); } /* @@ -93,7 +93,7 @@ HB_FUNC( QT_QLAYOUTITEM_CONTROLTYPES ) */ HB_FUNC( QT_QLAYOUTITEM_EXPANDINGDIRECTIONS ) { - hb_retni( hbqt_par_QLayoutItem( 1 )->expandingDirections( ) ); + hb_retni( ( Qt::Orientations ) hbqt_par_QLayoutItem( 1 )->expandingDirections() ); } /* @@ -101,7 +101,7 @@ HB_FUNC( QT_QLAYOUTITEM_EXPANDINGDIRECTIONS ) */ HB_FUNC( QT_QLAYOUTITEM_GEOMETRY ) { - hbqt_ret_QRect( hbqt_par_QLayoutItem( 1 )->geometry( ) ); + hb_retptr( new QRect( hbqt_par_QLayoutItem( 1 )->geometry() ) ); } /* @@ -109,7 +109,7 @@ HB_FUNC( QT_QLAYOUTITEM_GEOMETRY ) */ HB_FUNC( QT_QLAYOUTITEM_HASHEIGHTFORWIDTH ) { - hb_retl( hbqt_par_QLayoutItem( 1 )->hasHeightForWidth( ) ); + hb_retl( hbqt_par_QLayoutItem( 1 )->hasHeightForWidth() ); } /* @@ -125,7 +125,7 @@ HB_FUNC( QT_QLAYOUTITEM_HEIGHTFORWIDTH ) */ HB_FUNC( QT_QLAYOUTITEM_INVALIDATE ) { - hbqt_par_QLayoutItem( 1 )->invalidate( ); + hbqt_par_QLayoutItem( 1 )->invalidate(); } /* @@ -133,7 +133,7 @@ HB_FUNC( QT_QLAYOUTITEM_INVALIDATE ) */ HB_FUNC( QT_QLAYOUTITEM_ISEMPTY ) { - hb_retl( hbqt_par_QLayoutItem( 1 )->isEmpty( ) ); + hb_retl( hbqt_par_QLayoutItem( 1 )->isEmpty() ); } /* @@ -141,7 +141,7 @@ HB_FUNC( QT_QLAYOUTITEM_ISEMPTY ) */ HB_FUNC( QT_QLAYOUTITEM_LAYOUT ) { - hb_retptr( ( QLayout* ) hbqt_par_QLayoutItem( 1 )->layout( ) ); + hb_retptr( ( QLayout* ) hbqt_par_QLayoutItem( 1 )->layout() ); } /* @@ -149,7 +149,7 @@ HB_FUNC( QT_QLAYOUTITEM_LAYOUT ) */ HB_FUNC( QT_QLAYOUTITEM_MAXIMUMSIZE ) { - hbqt_ret_QSize( hbqt_par_QLayoutItem( 1 )->maximumSize( ) ); + hb_retptr( new QSize( hbqt_par_QLayoutItem( 1 )->maximumSize() ) ); } /* @@ -165,7 +165,7 @@ HB_FUNC( QT_QLAYOUTITEM_MINIMUMHEIGHTFORWIDTH ) */ HB_FUNC( QT_QLAYOUTITEM_MINIMUMSIZE ) { - hbqt_ret_QSize( hbqt_par_QLayoutItem( 1 )->minimumSize( ) ); + hb_retptr( new QSize( hbqt_par_QLayoutItem( 1 )->minimumSize() ) ); } /* @@ -181,7 +181,7 @@ HB_FUNC( QT_QLAYOUTITEM_SETALIGNMENT ) */ HB_FUNC( QT_QLAYOUTITEM_SETGEOMETRY ) { - hbqt_par_QLayoutItem( 1 )->setGeometry( hbqt_const_QRect( 2 ) ); + hbqt_par_QLayoutItem( 1 )->setGeometry( *hbqt_par_QRect( 2 ) ); } /* @@ -189,7 +189,7 @@ HB_FUNC( QT_QLAYOUTITEM_SETGEOMETRY ) */ HB_FUNC( QT_QLAYOUTITEM_SIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QLayoutItem( 1 )->sizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QLayoutItem( 1 )->sizeHint() ) ); } /* @@ -197,7 +197,7 @@ HB_FUNC( QT_QLAYOUTITEM_SIZEHINT ) */ HB_FUNC( QT_QLAYOUTITEM_SPACERITEM ) { - hb_retptr( ( QSpacerItem* ) hbqt_par_QLayoutItem( 1 )->spacerItem( ) ); + hb_retptr( ( QSpacerItem* ) hbqt_par_QLayoutItem( 1 )->spacerItem() ); } /* @@ -205,7 +205,7 @@ HB_FUNC( QT_QLAYOUTITEM_SPACERITEM ) */ HB_FUNC( QT_QLAYOUTITEM_WIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QLayoutItem( 1 )->widget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QLayoutItem( 1 )->widget() ); } diff --git a/harbour/contrib/hbqt/hbqt_qlcdnumber.cpp b/harbour/contrib/hbqt/hbqt_qlcdnumber.cpp index a387b89e7a..6118b4eb93 100644 --- a/harbour/contrib/hbqt/hbqt_qlcdnumber.cpp +++ b/harbour/contrib/hbqt/hbqt_qlcdnumber.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -95,7 +94,7 @@ HB_FUNC( QT_QLCDNUMBER_CHECKOVERFLOW_1 ) */ HB_FUNC( QT_QLCDNUMBER_INTVALUE ) { - hb_retni( hbqt_par_QLCDNumber( 1 )->intValue( ) ); + hb_retni( hbqt_par_QLCDNumber( 1 )->intValue() ); } /* @@ -103,7 +102,7 @@ HB_FUNC( QT_QLCDNUMBER_INTVALUE ) */ HB_FUNC( QT_QLCDNUMBER_MODE ) { - hb_retni( hbqt_par_QLCDNumber( 1 )->mode( ) ); + hb_retni( ( QLCDNumber::Mode ) hbqt_par_QLCDNumber( 1 )->mode() ); } /* @@ -111,7 +110,7 @@ HB_FUNC( QT_QLCDNUMBER_MODE ) */ HB_FUNC( QT_QLCDNUMBER_NUMDIGITS ) { - hb_retni( hbqt_par_QLCDNumber( 1 )->numDigits( ) ); + hb_retni( hbqt_par_QLCDNumber( 1 )->numDigits() ); } /* @@ -119,7 +118,7 @@ HB_FUNC( QT_QLCDNUMBER_NUMDIGITS ) */ HB_FUNC( QT_QLCDNUMBER_SEGMENTSTYLE ) { - hb_retni( hbqt_par_QLCDNumber( 1 )->segmentStyle( ) ); + hb_retni( ( QLCDNumber::SegmentStyle ) hbqt_par_QLCDNumber( 1 )->segmentStyle() ); } /* @@ -151,7 +150,7 @@ HB_FUNC( QT_QLCDNUMBER_SETSEGMENTSTYLE ) */ HB_FUNC( QT_QLCDNUMBER_SMALLDECIMALPOINT ) { - hb_retl( hbqt_par_QLCDNumber( 1 )->smallDecimalPoint( ) ); + hb_retl( hbqt_par_QLCDNumber( 1 )->smallDecimalPoint() ); } /* @@ -159,7 +158,71 @@ HB_FUNC( QT_QLCDNUMBER_SMALLDECIMALPOINT ) */ HB_FUNC( QT_QLCDNUMBER_VALUE ) { - hb_retnd( hbqt_par_QLCDNumber( 1 )->value( ) ); + hb_retnd( hbqt_par_QLCDNumber( 1 )->value() ); +} + +/* + * void display ( const QString & s ) + */ +HB_FUNC( QT_QLCDNUMBER_DISPLAY ) +{ + hbqt_par_QLCDNumber( 1 )->display( hbqt_par_QString( 2 ) ); +} + +/* + * void display ( double num ) + */ +HB_FUNC( QT_QLCDNUMBER_DISPLAY_1 ) +{ + hbqt_par_QLCDNumber( 1 )->display( hb_parnd( 2 ) ); +} + +/* + * void display ( int num ) + */ +HB_FUNC( QT_QLCDNUMBER_DISPLAY_2 ) +{ + hbqt_par_QLCDNumber( 1 )->display( hb_parni( 2 ) ); +} + +/* + * void setBinMode () + */ +HB_FUNC( QT_QLCDNUMBER_SETBINMODE ) +{ + hbqt_par_QLCDNumber( 1 )->setBinMode(); +} + +/* + * void setDecMode () + */ +HB_FUNC( QT_QLCDNUMBER_SETDECMODE ) +{ + hbqt_par_QLCDNumber( 1 )->setDecMode(); +} + +/* + * void setHexMode () + */ +HB_FUNC( QT_QLCDNUMBER_SETHEXMODE ) +{ + hbqt_par_QLCDNumber( 1 )->setHexMode(); +} + +/* + * void setOctMode () + */ +HB_FUNC( QT_QLCDNUMBER_SETOCTMODE ) +{ + hbqt_par_QLCDNumber( 1 )->setOctMode(); +} + +/* + * void setSmallDecimalPoint ( bool ) + */ +HB_FUNC( QT_QLCDNUMBER_SETSMALLDECIMALPOINT ) +{ + hbqt_par_QLCDNumber( 1 )->setSmallDecimalPoint( hb_parl( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qlineedit.cpp b/harbour/contrib/hbqt/hbqt_qlineedit.cpp index 33a337a8a8..76af567747 100644 --- a/harbour/contrib/hbqt/hbqt_qlineedit.cpp +++ b/harbour/contrib/hbqt/hbqt_qlineedit.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 46/47 [ 97.87% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * void getTextMargins ( int * left, int * top, int * right, int * bottom ) const - */ - - #include @@ -88,7 +78,7 @@ HB_FUNC( QT_QLINEEDIT ) */ HB_FUNC( QT_QLINEEDIT_ALIGNMENT ) { - hb_retni( hbqt_par_QLineEdit( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QLineEdit( 1 )->alignment() ); } /* @@ -96,7 +86,7 @@ HB_FUNC( QT_QLINEEDIT_ALIGNMENT ) */ HB_FUNC( QT_QLINEEDIT_BACKSPACE ) { - hbqt_par_QLineEdit( 1 )->backspace( ); + hbqt_par_QLineEdit( 1 )->backspace(); } /* @@ -104,7 +94,7 @@ HB_FUNC( QT_QLINEEDIT_BACKSPACE ) */ HB_FUNC( QT_QLINEEDIT_COMPLETER ) { - hb_retptr( ( QCompleter* ) hbqt_par_QLineEdit( 1 )->completer( ) ); + hb_retptr( ( QCompleter* ) hbqt_par_QLineEdit( 1 )->completer() ); } /* @@ -112,7 +102,7 @@ HB_FUNC( QT_QLINEEDIT_COMPLETER ) */ HB_FUNC( QT_QLINEEDIT_CREATESTANDARDCONTEXTMENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QLineEdit( 1 )->createStandardContextMenu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QLineEdit( 1 )->createStandardContextMenu() ); } /* @@ -120,7 +110,7 @@ HB_FUNC( QT_QLINEEDIT_CREATESTANDARDCONTEXTMENU ) */ HB_FUNC( QT_QLINEEDIT_CURSORBACKWARD ) { - hbqt_par_QLineEdit( 1 )->cursorBackward( hb_parl( 2 ), hb_parni( 3 ) ); + hbqt_par_QLineEdit( 1 )->cursorBackward( hb_parl( 2 ), ( HB_ISNIL( 3 ) ? 1 : hb_parni( 3 ) ) ); } /* @@ -128,7 +118,7 @@ HB_FUNC( QT_QLINEEDIT_CURSORBACKWARD ) */ HB_FUNC( QT_QLINEEDIT_CURSORFORWARD ) { - hbqt_par_QLineEdit( 1 )->cursorForward( hb_parl( 2 ), hb_parni( 3 ) ); + hbqt_par_QLineEdit( 1 )->cursorForward( hb_parl( 2 ), ( HB_ISNIL( 3 ) ? 1 : hb_parni( 3 ) ) ); } /* @@ -136,7 +126,7 @@ HB_FUNC( QT_QLINEEDIT_CURSORFORWARD ) */ HB_FUNC( QT_QLINEEDIT_CURSORPOSITION ) { - hb_retni( hbqt_par_QLineEdit( 1 )->cursorPosition( ) ); + hb_retni( hbqt_par_QLineEdit( 1 )->cursorPosition() ); } /* @@ -144,7 +134,7 @@ HB_FUNC( QT_QLINEEDIT_CURSORPOSITION ) */ HB_FUNC( QT_QLINEEDIT_CURSORPOSITIONAT ) { - hb_retni( hbqt_par_QLineEdit( 1 )->cursorPositionAt( hbqt_const_QPoint( 2 ) ) ); + hb_retni( hbqt_par_QLineEdit( 1 )->cursorPositionAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -168,7 +158,7 @@ HB_FUNC( QT_QLINEEDIT_CURSORWORDFORWARD ) */ HB_FUNC( QT_QLINEEDIT_DEL ) { - hbqt_par_QLineEdit( 1 )->del( ); + hbqt_par_QLineEdit( 1 )->del(); } /* @@ -176,7 +166,7 @@ HB_FUNC( QT_QLINEEDIT_DEL ) */ HB_FUNC( QT_QLINEEDIT_DESELECT ) { - hbqt_par_QLineEdit( 1 )->deselect( ); + hbqt_par_QLineEdit( 1 )->deselect(); } /* @@ -184,7 +174,7 @@ HB_FUNC( QT_QLINEEDIT_DESELECT ) */ HB_FUNC( QT_QLINEEDIT_DISPLAYTEXT ) { - hb_retc( hbqt_par_QLineEdit( 1 )->displayText( ).toLatin1().data() ); + hb_retc( hbqt_par_QLineEdit( 1 )->displayText().toLatin1().data() ); } /* @@ -192,7 +182,7 @@ HB_FUNC( QT_QLINEEDIT_DISPLAYTEXT ) */ HB_FUNC( QT_QLINEEDIT_DRAGENABLED ) { - hb_retl( hbqt_par_QLineEdit( 1 )->dragEnabled( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->dragEnabled() ); } /* @@ -200,7 +190,7 @@ HB_FUNC( QT_QLINEEDIT_DRAGENABLED ) */ HB_FUNC( QT_QLINEEDIT_ECHOMODE ) { - hb_retni( hbqt_par_QLineEdit( 1 )->echoMode( ) ); + hb_retni( ( QLineEdit::EchoMode ) hbqt_par_QLineEdit( 1 )->echoMode() ); } /* @@ -211,12 +201,30 @@ HB_FUNC( QT_QLINEEDIT_END ) hbqt_par_QLineEdit( 1 )->end( hb_parl( 2 ) ); } +/* + * void getTextMargins ( int * left, int * top, int * right, int * bottom ) const + */ +HB_FUNC( QT_QLINEEDIT_GETTEXTMARGINS ) +{ + int iLeft = 0; + int iTop = 0; + int iRight = 0; + int iBottom = 0; + + hbqt_par_QLineEdit( 1 )->getTextMargins( &iLeft, &iTop, &iRight, &iBottom ); + + hb_storni( iLeft, 2 ); + hb_storni( iTop, 3 ); + hb_storni( iRight, 4 ); + hb_storni( iBottom, 5 ); +} + /* * bool hasAcceptableInput () const */ HB_FUNC( QT_QLINEEDIT_HASACCEPTABLEINPUT ) { - hb_retl( hbqt_par_QLineEdit( 1 )->hasAcceptableInput( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->hasAcceptableInput() ); } /* @@ -224,7 +232,7 @@ HB_FUNC( QT_QLINEEDIT_HASACCEPTABLEINPUT ) */ HB_FUNC( QT_QLINEEDIT_HASFRAME ) { - hb_retl( hbqt_par_QLineEdit( 1 )->hasFrame( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->hasFrame() ); } /* @@ -232,7 +240,7 @@ HB_FUNC( QT_QLINEEDIT_HASFRAME ) */ HB_FUNC( QT_QLINEEDIT_HASSELECTEDTEXT ) { - hb_retl( hbqt_par_QLineEdit( 1 )->hasSelectedText( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->hasSelectedText() ); } /* @@ -248,7 +256,7 @@ HB_FUNC( QT_QLINEEDIT_HOME ) */ HB_FUNC( QT_QLINEEDIT_INPUTMASK ) { - hb_retc( hbqt_par_QLineEdit( 1 )->inputMask( ).toLatin1().data() ); + hb_retc( hbqt_par_QLineEdit( 1 )->inputMask().toLatin1().data() ); } /* @@ -264,7 +272,7 @@ HB_FUNC( QT_QLINEEDIT_INSERT ) */ HB_FUNC( QT_QLINEEDIT_ISMODIFIED ) { - hb_retl( hbqt_par_QLineEdit( 1 )->isModified( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->isModified() ); } /* @@ -272,7 +280,7 @@ HB_FUNC( QT_QLINEEDIT_ISMODIFIED ) */ HB_FUNC( QT_QLINEEDIT_ISREADONLY ) { - hb_retl( hbqt_par_QLineEdit( 1 )->isReadOnly( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->isReadOnly() ); } /* @@ -280,7 +288,7 @@ HB_FUNC( QT_QLINEEDIT_ISREADONLY ) */ HB_FUNC( QT_QLINEEDIT_ISREDOAVAILABLE ) { - hb_retl( hbqt_par_QLineEdit( 1 )->isRedoAvailable( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->isRedoAvailable() ); } /* @@ -288,7 +296,7 @@ HB_FUNC( QT_QLINEEDIT_ISREDOAVAILABLE ) */ HB_FUNC( QT_QLINEEDIT_ISUNDOAVAILABLE ) { - hb_retl( hbqt_par_QLineEdit( 1 )->isUndoAvailable( ) ); + hb_retl( hbqt_par_QLineEdit( 1 )->isUndoAvailable() ); } /* @@ -296,7 +304,7 @@ HB_FUNC( QT_QLINEEDIT_ISUNDOAVAILABLE ) */ HB_FUNC( QT_QLINEEDIT_MAXLENGTH ) { - hb_retni( hbqt_par_QLineEdit( 1 )->maxLength( ) ); + hb_retni( hbqt_par_QLineEdit( 1 )->maxLength() ); } /* @@ -304,7 +312,7 @@ HB_FUNC( QT_QLINEEDIT_MAXLENGTH ) */ HB_FUNC( QT_QLINEEDIT_MINIMUMSIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QLineEdit( 1 )->minimumSizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QLineEdit( 1 )->minimumSizeHint() ) ); } /* @@ -312,7 +320,7 @@ HB_FUNC( QT_QLINEEDIT_MINIMUMSIZEHINT ) */ HB_FUNC( QT_QLINEEDIT_SELECTEDTEXT ) { - hb_retc( hbqt_par_QLineEdit( 1 )->selectedText( ).toLatin1().data() ); + hb_retc( hbqt_par_QLineEdit( 1 )->selectedText().toLatin1().data() ); } /* @@ -320,7 +328,7 @@ HB_FUNC( QT_QLINEEDIT_SELECTEDTEXT ) */ HB_FUNC( QT_QLINEEDIT_SELECTIONSTART ) { - hb_retni( hbqt_par_QLineEdit( 1 )->selectionStart( ) ); + hb_retni( hbqt_par_QLineEdit( 1 )->selectionStart() ); } /* @@ -432,7 +440,7 @@ HB_FUNC( QT_QLINEEDIT_SETVALIDATOR ) */ HB_FUNC( QT_QLINEEDIT_SIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QLineEdit( 1 )->sizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QLineEdit( 1 )->sizeHint() ) ); } /* @@ -440,7 +448,7 @@ HB_FUNC( QT_QLINEEDIT_SIZEHINT ) */ HB_FUNC( QT_QLINEEDIT_TEXT ) { - hb_retc( hbqt_par_QLineEdit( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QLineEdit( 1 )->text().toLatin1().data() ); } /* @@ -448,7 +456,71 @@ HB_FUNC( QT_QLINEEDIT_TEXT ) */ HB_FUNC( QT_QLINEEDIT_VALIDATOR ) { - hb_retptr( ( QValidator* ) hbqt_par_QLineEdit( 1 )->validator( ) ); + hb_retptr( ( QValidator* ) hbqt_par_QLineEdit( 1 )->validator() ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QLINEEDIT_CLEAR ) +{ + hbqt_par_QLineEdit( 1 )->clear(); +} + +/* + * void copy () const + */ +HB_FUNC( QT_QLINEEDIT_COPY ) +{ + hbqt_par_QLineEdit( 1 )->copy(); +} + +/* + * void cut () + */ +HB_FUNC( QT_QLINEEDIT_CUT ) +{ + hbqt_par_QLineEdit( 1 )->cut(); +} + +/* + * void paste () + */ +HB_FUNC( QT_QLINEEDIT_PASTE ) +{ + hbqt_par_QLineEdit( 1 )->paste(); +} + +/* + * void redo () + */ +HB_FUNC( QT_QLINEEDIT_REDO ) +{ + hbqt_par_QLineEdit( 1 )->redo(); +} + +/* + * void selectAll () + */ +HB_FUNC( QT_QLINEEDIT_SELECTALL ) +{ + hbqt_par_QLineEdit( 1 )->selectAll(); +} + +/* + * void setText ( const QString & ) + */ +HB_FUNC( QT_QLINEEDIT_SETTEXT ) +{ + hbqt_par_QLineEdit( 1 )->setText( hbqt_par_QString( 2 ) ); +} + +/* + * void undo () + */ +HB_FUNC( QT_QLINEEDIT_UNDO ) +{ + hbqt_par_QLineEdit( 1 )->undo(); } diff --git a/harbour/contrib/hbqt/hbqt_qlistview.cpp b/harbour/contrib/hbqt/hbqt_qlistview.cpp index 784a234af5..90beccd5b0 100644 --- a/harbour/contrib/hbqt/hbqt_qlistview.cpp +++ b/harbour/contrib/hbqt/hbqt_qlistview.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QLISTVIEW ) */ HB_FUNC( QT_QLISTVIEW_BATCHSIZE ) { - hb_retni( hbqt_par_QListView( 1 )->batchSize( ) ); + hb_retni( hbqt_par_QListView( 1 )->batchSize() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QLISTVIEW_BATCHSIZE ) */ HB_FUNC( QT_QLISTVIEW_CLEARPROPERTYFLAGS ) { - hbqt_par_QListView( 1 )->clearPropertyFlags( ); + hbqt_par_QListView( 1 )->clearPropertyFlags(); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QLISTVIEW_CLEARPROPERTYFLAGS ) */ HB_FUNC( QT_QLISTVIEW_FLOW ) { - hb_retni( hbqt_par_QListView( 1 )->flow( ) ); + hb_retni( ( QListView::Flow ) hbqt_par_QListView( 1 )->flow() ); } /* @@ -102,7 +101,7 @@ HB_FUNC( QT_QLISTVIEW_FLOW ) */ HB_FUNC( QT_QLISTVIEW_GRIDSIZE ) { - hbqt_ret_QSize( hbqt_par_QListView( 1 )->gridSize( ) ); + hb_retptr( new QSize( hbqt_par_QListView( 1 )->gridSize() ) ); } /* @@ -118,7 +117,7 @@ HB_FUNC( QT_QLISTVIEW_ISROWHIDDEN ) */ HB_FUNC( QT_QLISTVIEW_ISSELECTIONRECTVISIBLE ) { - hb_retl( hbqt_par_QListView( 1 )->isSelectionRectVisible( ) ); + hb_retl( hbqt_par_QListView( 1 )->isSelectionRectVisible() ); } /* @@ -126,7 +125,7 @@ HB_FUNC( QT_QLISTVIEW_ISSELECTIONRECTVISIBLE ) */ HB_FUNC( QT_QLISTVIEW_ISWRAPPING ) { - hb_retl( hbqt_par_QListView( 1 )->isWrapping( ) ); + hb_retl( hbqt_par_QListView( 1 )->isWrapping() ); } /* @@ -134,7 +133,7 @@ HB_FUNC( QT_QLISTVIEW_ISWRAPPING ) */ HB_FUNC( QT_QLISTVIEW_LAYOUTMODE ) { - hb_retni( hbqt_par_QListView( 1 )->layoutMode( ) ); + hb_retni( ( QListView::LayoutMode ) hbqt_par_QListView( 1 )->layoutMode() ); } /* @@ -142,7 +141,7 @@ HB_FUNC( QT_QLISTVIEW_LAYOUTMODE ) */ HB_FUNC( QT_QLISTVIEW_MODELCOLUMN ) { - hb_retni( hbqt_par_QListView( 1 )->modelColumn( ) ); + hb_retni( hbqt_par_QListView( 1 )->modelColumn() ); } /* @@ -150,7 +149,7 @@ HB_FUNC( QT_QLISTVIEW_MODELCOLUMN ) */ HB_FUNC( QT_QLISTVIEW_MOVEMENT ) { - hb_retni( hbqt_par_QListView( 1 )->movement( ) ); + hb_retni( ( QListView::Movement ) hbqt_par_QListView( 1 )->movement() ); } /* @@ -158,7 +157,7 @@ HB_FUNC( QT_QLISTVIEW_MOVEMENT ) */ HB_FUNC( QT_QLISTVIEW_RESIZEMODE ) { - hb_retni( hbqt_par_QListView( 1 )->resizeMode( ) ); + hb_retni( ( QListView::ResizeMode ) hbqt_par_QListView( 1 )->resizeMode() ); } /* @@ -182,7 +181,7 @@ HB_FUNC( QT_QLISTVIEW_SETFLOW ) */ HB_FUNC( QT_QLISTVIEW_SETGRIDSIZE ) { - hbqt_par_QListView( 1 )->setGridSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QListView( 1 )->setGridSize( *hbqt_par_QSize( 2 ) ); } /* @@ -278,7 +277,7 @@ HB_FUNC( QT_QLISTVIEW_SETWRAPPING ) */ HB_FUNC( QT_QLISTVIEW_SPACING ) { - hb_retni( hbqt_par_QListView( 1 )->spacing( ) ); + hb_retni( hbqt_par_QListView( 1 )->spacing() ); } /* @@ -286,7 +285,7 @@ HB_FUNC( QT_QLISTVIEW_SPACING ) */ HB_FUNC( QT_QLISTVIEW_UNIFORMITEMSIZES ) { - hb_retl( hbqt_par_QListView( 1 )->uniformItemSizes( ) ); + hb_retl( hbqt_par_QListView( 1 )->uniformItemSizes() ); } /* @@ -294,7 +293,7 @@ HB_FUNC( QT_QLISTVIEW_UNIFORMITEMSIZES ) */ HB_FUNC( QT_QLISTVIEW_VIEWMODE ) { - hb_retni( hbqt_par_QListView( 1 )->viewMode( ) ); + hb_retni( ( QListView::ViewMode ) hbqt_par_QListView( 1 )->viewMode() ); } /* @@ -302,7 +301,7 @@ HB_FUNC( QT_QLISTVIEW_VIEWMODE ) */ HB_FUNC( QT_QLISTVIEW_WORDWRAP ) { - hb_retl( hbqt_par_QListView( 1 )->wordWrap( ) ); + hb_retl( hbqt_par_QListView( 1 )->wordWrap() ); } diff --git a/harbour/contrib/hbqt/hbqt_qlistwidget.cpp b/harbour/contrib/hbqt/hbqt_qlistwidget.cpp new file mode 100644 index 0000000000..3a8f8d505c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qlistwidget.cpp @@ -0,0 +1,329 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 30/32 [ 93.75% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QList findItems ( const QString & text, Qt::MatchFlags flags ) const + * QList selectedItems () const + */ + + +#include + + +/* + * QListWidget ( QWidget * parent = 0 ) + * ~QListWidget () + */ +HB_FUNC( QT_QLISTWIDGET ) +{ + hb_retptr( new QListWidget( hbqt_par_QWidget( 1 ) ) ); +} + +/* + * void addItem ( const QString & label ) + */ +HB_FUNC( QT_QLISTWIDGET_ADDITEM ) +{ + hbqt_par_QListWidget( 1 )->addItem( hbqt_par_QString( 2 ) ); +} + +/* + * void addItem ( QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_ADDITEM_1 ) +{ + hbqt_par_QListWidget( 1 )->addItem( hbqt_par_QListWidgetItem( 2 ) ); +} + +/* + * void addItems ( const QStringList & labels ) + */ +HB_FUNC( QT_QLISTWIDGET_ADDITEMS ) +{ + hbqt_par_QListWidget( 1 )->addItems( *hbqt_par_QStringList( 2 ) ); +} + +/* + * void closePersistentEditor ( QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_CLOSEPERSISTENTEDITOR ) +{ + hbqt_par_QListWidget( 1 )->closePersistentEditor( hbqt_par_QListWidgetItem( 2 ) ); +} + +/* + * int count () const + */ +HB_FUNC( QT_QLISTWIDGET_COUNT ) +{ + hb_retni( hbqt_par_QListWidget( 1 )->count() ); +} + +/* + * QListWidgetItem * currentItem () const + */ +HB_FUNC( QT_QLISTWIDGET_CURRENTITEM ) +{ + hb_retptr( ( QListWidgetItem* ) hbqt_par_QListWidget( 1 )->currentItem() ); +} + +/* + * int currentRow () const + */ +HB_FUNC( QT_QLISTWIDGET_CURRENTROW ) +{ + hb_retni( hbqt_par_QListWidget( 1 )->currentRow() ); +} + +/* + * void editItem ( QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_EDITITEM ) +{ + hbqt_par_QListWidget( 1 )->editItem( hbqt_par_QListWidgetItem( 2 ) ); +} + +/* + * void insertItem ( int row, QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_INSERTITEM ) +{ + hbqt_par_QListWidget( 1 )->insertItem( hb_parni( 2 ), hbqt_par_QListWidgetItem( 3 ) ); +} + +/* + * void insertItem ( int row, const QString & label ) + */ +HB_FUNC( QT_QLISTWIDGET_INSERTITEM_1 ) +{ + hbqt_par_QListWidget( 1 )->insertItem( hb_parni( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * void insertItems ( int row, const QStringList & labels ) + */ +HB_FUNC( QT_QLISTWIDGET_INSERTITEMS ) +{ + hbqt_par_QListWidget( 1 )->insertItems( hb_parni( 2 ), *hbqt_par_QStringList( 3 ) ); +} + +/* + * bool isSortingEnabled () const + */ +HB_FUNC( QT_QLISTWIDGET_ISSORTINGENABLED ) +{ + hb_retl( hbqt_par_QListWidget( 1 )->isSortingEnabled() ); +} + +/* + * QListWidgetItem * item ( int row ) const + */ +HB_FUNC( QT_QLISTWIDGET_ITEM ) +{ + hb_retptr( ( QListWidgetItem* ) hbqt_par_QListWidget( 1 )->item( hb_parni( 2 ) ) ); +} + +/* + * QListWidgetItem * itemAt ( const QPoint & p ) const + */ +HB_FUNC( QT_QLISTWIDGET_ITEMAT ) +{ + hb_retptr( ( QListWidgetItem* ) hbqt_par_QListWidget( 1 )->itemAt( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * QListWidgetItem * itemAt ( int x, int y ) const + */ +HB_FUNC( QT_QLISTWIDGET_ITEMAT_1 ) +{ + hb_retptr( ( QListWidgetItem* ) hbqt_par_QListWidget( 1 )->itemAt( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * QWidget * itemWidget ( QListWidgetItem * item ) const + */ +HB_FUNC( QT_QLISTWIDGET_ITEMWIDGET ) +{ + hb_retptr( ( QWidget* ) hbqt_par_QListWidget( 1 )->itemWidget( hbqt_par_QListWidgetItem( 2 ) ) ); +} + +/* + * void openPersistentEditor ( QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_OPENPERSISTENTEDITOR ) +{ + hbqt_par_QListWidget( 1 )->openPersistentEditor( hbqt_par_QListWidgetItem( 2 ) ); +} + +/* + * void removeItemWidget ( QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_REMOVEITEMWIDGET ) +{ + hbqt_par_QListWidget( 1 )->removeItemWidget( hbqt_par_QListWidgetItem( 2 ) ); +} + +/* + * int row ( const QListWidgetItem * item ) const + */ +HB_FUNC( QT_QLISTWIDGET_ROW ) +{ + hb_retni( hbqt_par_QListWidget( 1 )->row( hbqt_par_QListWidgetItem( 2 ) ) ); +} + +/* + * void setCurrentItem ( QListWidgetItem * item ) + */ +HB_FUNC( QT_QLISTWIDGET_SETCURRENTITEM ) +{ + hbqt_par_QListWidget( 1 )->setCurrentItem( hbqt_par_QListWidgetItem( 2 ) ); +} + +/* + * void setCurrentItem ( QListWidgetItem * item, QItemSelectionModel::SelectionFlags command ) + */ +HB_FUNC( QT_QLISTWIDGET_SETCURRENTITEM_1 ) +{ + hbqt_par_QListWidget( 1 )->setCurrentItem( hbqt_par_QListWidgetItem( 2 ), ( QItemSelectionModel::SelectionFlags ) hb_parni( 3 ) ); +} + +/* + * void setCurrentRow ( int row ) + */ +HB_FUNC( QT_QLISTWIDGET_SETCURRENTROW ) +{ + hbqt_par_QListWidget( 1 )->setCurrentRow( hb_parni( 2 ) ); +} + +/* + * void setCurrentRow ( int row, QItemSelectionModel::SelectionFlags command ) + */ +HB_FUNC( QT_QLISTWIDGET_SETCURRENTROW_1 ) +{ + hbqt_par_QListWidget( 1 )->setCurrentRow( hb_parni( 2 ), ( QItemSelectionModel::SelectionFlags ) hb_parni( 3 ) ); +} + +/* + * void setItemWidget ( QListWidgetItem * item, QWidget * widget ) + */ +HB_FUNC( QT_QLISTWIDGET_SETITEMWIDGET ) +{ + hbqt_par_QListWidget( 1 )->setItemWidget( hbqt_par_QListWidgetItem( 2 ), hbqt_par_QWidget( 3 ) ); +} + +/* + * void setSortingEnabled ( bool enable ) + */ +HB_FUNC( QT_QLISTWIDGET_SETSORTINGENABLED ) +{ + hbqt_par_QListWidget( 1 )->setSortingEnabled( hb_parl( 2 ) ); +} + +/* + * void sortItems ( Qt::SortOrder order = Qt::AscendingOrder ) + */ +HB_FUNC( QT_QLISTWIDGET_SORTITEMS ) +{ + hbqt_par_QListWidget( 1 )->sortItems( ( HB_ISNIL( 2 ) ? ( Qt::SortOrder ) Qt::AscendingOrder : ( Qt::SortOrder ) hb_parni( 2 ) ) ); +} + +/* + * QListWidgetItem * takeItem ( int row ) + */ +HB_FUNC( QT_QLISTWIDGET_TAKEITEM ) +{ + hb_retptr( ( QListWidgetItem* ) hbqt_par_QListWidget( 1 )->takeItem( hb_parni( 2 ) ) ); +} + +/* + * QRect visualItemRect ( const QListWidgetItem * item ) const + */ +HB_FUNC( QT_QLISTWIDGET_VISUALITEMRECT ) +{ + hb_retptr( new QRect( hbqt_par_QListWidget( 1 )->visualItemRect( hbqt_par_QListWidgetItem( 2 ) ) ) ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QLISTWIDGET_CLEAR ) +{ + hbqt_par_QListWidget( 1 )->clear(); +} + +/* + * void scrollToItem ( const QListWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible ) + */ +HB_FUNC( QT_QLISTWIDGET_SCROLLTOITEM ) +{ + hbqt_par_QListWidget( 1 )->scrollToItem( hbqt_par_QListWidgetItem( 2 ), ( HB_ISNIL( 3 ) ? ( QAbstractItemView::ScrollHint ) QListWidget::EnsureVisible : ( QAbstractItemView::ScrollHint ) hb_parni( 3 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qlistwidgetitem.cpp b/harbour/contrib/hbqt/hbqt_qlistwidgetitem.cpp new file mode 100644 index 0000000000..34c9fd6f6c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qlistwidgetitem.cpp @@ -0,0 +1,362 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QListWidgetItem ( QListWidget * parent = 0, int type = Type ) + * QListWidgetItem ( const QString & text, QListWidget * parent = 0, int type = Type ) + * QListWidgetItem ( const QIcon & icon, const QString & text, QListWidget * parent = 0, int type = Type ) + * QListWidgetItem ( const QListWidgetItem & other ) + * virtual ~QListWidgetItem () + */ +HB_FUNC( QT_QLISTWIDGETITEM ) +{ + hb_retptr( new QListWidgetItem( hbqt_par_QListWidget( 1 ), hb_parni( 2 ) ) ); +} + +/* + * QBrush background () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_BACKGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QListWidgetItem( 1 )->background() ) ); +} + +/* + * Qt::CheckState checkState () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_CHECKSTATE ) +{ + hb_retni( ( Qt::CheckState ) hbqt_par_QListWidgetItem( 1 )->checkState() ); +} + +/* + * virtual QListWidgetItem * clone () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_CLONE ) +{ + hb_retptr( ( QListWidgetItem* ) hbqt_par_QListWidgetItem( 1 )->clone() ); +} + +/* + * virtual QVariant data ( int role ) const + */ +HB_FUNC( QT_QLISTWIDGETITEM_DATA ) +{ + hb_retptr( new QVariant( hbqt_par_QListWidgetItem( 1 )->data( hb_parni( 2 ) ) ) ); +} + +/* + * Qt::ItemFlags flags () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_FLAGS ) +{ + hb_retni( ( Qt::ItemFlags ) hbqt_par_QListWidgetItem( 1 )->flags() ); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QListWidgetItem( 1 )->font() ) ); +} + +/* + * QBrush foreground () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_FOREGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QListWidgetItem( 1 )->foreground() ) ); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QListWidgetItem( 1 )->icon() ) ); +} + +/* + * bool isHidden () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_ISHIDDEN ) +{ + hb_retl( hbqt_par_QListWidgetItem( 1 )->isHidden() ); +} + +/* + * bool isSelected () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_ISSELECTED ) +{ + hb_retl( hbqt_par_QListWidgetItem( 1 )->isSelected() ); +} + +/* + * QListWidget * listWidget () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_LISTWIDGET ) +{ + hb_retptr( ( QListWidget* ) hbqt_par_QListWidgetItem( 1 )->listWidget() ); +} + +/* + * virtual void read ( QDataStream & in ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_READ ) +{ + hbqt_par_QListWidgetItem( 1 )->read( *hbqt_par_QDataStream( 2 ) ); +} + +/* + * void setBackground ( const QBrush & brush ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETBACKGROUND ) +{ + hbqt_par_QListWidgetItem( 1 )->setBackground( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setCheckState ( Qt::CheckState state ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETCHECKSTATE ) +{ + hbqt_par_QListWidgetItem( 1 )->setCheckState( ( Qt::CheckState ) hb_parni( 2 ) ); +} + +/* + * virtual void setData ( int role, const QVariant & value ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETDATA ) +{ + hbqt_par_QListWidgetItem( 1 )->setData( hb_parni( 2 ), *hbqt_par_QVariant( 3 ) ); +} + +/* + * void setFlags ( Qt::ItemFlags flags ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETFLAGS ) +{ + hbqt_par_QListWidgetItem( 1 )->setFlags( ( Qt::ItemFlags ) hb_parni( 2 ) ); +} + +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETFONT ) +{ + hbqt_par_QListWidgetItem( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setForeground ( const QBrush & brush ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETFOREGROUND ) +{ + hbqt_par_QListWidgetItem( 1 )->setForeground( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setHidden ( bool hide ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETHIDDEN ) +{ + hbqt_par_QListWidgetItem( 1 )->setHidden( hb_parl( 2 ) ); +} + +/* + * void setIcon ( const QIcon & icon ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETICON ) +{ + hbqt_par_QListWidgetItem( 1 )->setIcon( QIcon( hbqt_par_QString( 2 ) ) ); +} + +/* + * void setSelected ( bool select ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETSELECTED ) +{ + hbqt_par_QListWidgetItem( 1 )->setSelected( hb_parl( 2 ) ); +} + +/* + * void setSizeHint ( const QSize & size ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETSIZEHINT ) +{ + hbqt_par_QListWidgetItem( 1 )->setSizeHint( *hbqt_par_QSize( 2 ) ); +} + +/* + * void setStatusTip ( const QString & statusTip ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETSTATUSTIP ) +{ + hbqt_par_QListWidgetItem( 1 )->setStatusTip( hbqt_par_QString( 2 ) ); +} + +/* + * void setText ( const QString & text ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETTEXT ) +{ + hbqt_par_QListWidgetItem( 1 )->setText( hbqt_par_QString( 2 ) ); +} + +/* + * void setTextAlignment ( int alignment ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETTEXTALIGNMENT ) +{ + hbqt_par_QListWidgetItem( 1 )->setTextAlignment( hb_parni( 2 ) ); +} + +/* + * void setToolTip ( const QString & toolTip ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETTOOLTIP ) +{ + hbqt_par_QListWidgetItem( 1 )->setToolTip( hbqt_par_QString( 2 ) ); +} + +/* + * void setWhatsThis ( const QString & whatsThis ) + */ +HB_FUNC( QT_QLISTWIDGETITEM_SETWHATSTHIS ) +{ + hbqt_par_QListWidgetItem( 1 )->setWhatsThis( hbqt_par_QString( 2 ) ); +} + +/* + * QSize sizeHint () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_SIZEHINT ) +{ + hb_retptr( new QSize( hbqt_par_QListWidgetItem( 1 )->sizeHint() ) ); +} + +/* + * QString statusTip () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_STATUSTIP ) +{ + hb_retc( hbqt_par_QListWidgetItem( 1 )->statusTip().toLatin1().data() ); +} + +/* + * QString text () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_TEXT ) +{ + hb_retc( hbqt_par_QListWidgetItem( 1 )->text().toLatin1().data() ); +} + +/* + * int textAlignment () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_TEXTALIGNMENT ) +{ + hb_retni( hbqt_par_QListWidgetItem( 1 )->textAlignment() ); +} + +/* + * QString toolTip () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_TOOLTIP ) +{ + hb_retc( hbqt_par_QListWidgetItem( 1 )->toolTip().toLatin1().data() ); +} + +/* + * int type () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_TYPE ) +{ + hb_retni( hbqt_par_QListWidgetItem( 1 )->type() ); +} + +/* + * QString whatsThis () const + */ +HB_FUNC( QT_QLISTWIDGETITEM_WHATSTHIS ) +{ + hb_retc( hbqt_par_QListWidgetItem( 1 )->whatsThis().toLatin1().data() ); +} + +/* + * virtual void write ( QDataStream & out ) const + */ +HB_FUNC( QT_QLISTWIDGETITEM_WRITE ) +{ + hbqt_par_QListWidgetItem( 1 )->write( *hbqt_par_QDataStream( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qmainwindow.cpp b/harbour/contrib/hbqt/hbqt_qmainwindow.cpp index 09cbf3f3ab..017fd50b6c 100644 --- a/harbour/contrib/hbqt/hbqt_qmainwindow.cpp +++ b/harbour/contrib/hbqt/hbqt_qmainwindow.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,17 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 46/49 [ 93.88% ] ] - * + * Constructed[ 48/49 [ 97.96% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * bool restoreState ( const QByteArray & state, int version = 0 ) - * QByteArray saveState ( int version = 0 ) const + * * QList tabifiedDockWidgets ( QDockWidget * dockwidget ) const - */ + */ #include @@ -129,7 +126,7 @@ HB_FUNC( QT_QMAINWINDOW_ADDTOOLBAR_2 ) */ HB_FUNC( QT_QMAINWINDOW_ADDTOOLBARBREAK ) { - hbqt_par_QMainWindow( 1 )->addToolBarBreak( ( Qt::ToolBarArea ) hb_parni( 2 ) ); + hbqt_par_QMainWindow( 1 )->addToolBarBreak( ( HB_ISNIL( 2 ) ? ( Qt::ToolBarArea ) Qt::TopToolBarArea : ( Qt::ToolBarArea ) hb_parni( 2 ) ) ); } /* @@ -137,7 +134,7 @@ HB_FUNC( QT_QMAINWINDOW_ADDTOOLBARBREAK ) */ HB_FUNC( QT_QMAINWINDOW_CENTRALWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QMainWindow( 1 )->centralWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QMainWindow( 1 )->centralWidget() ); } /* @@ -145,7 +142,7 @@ HB_FUNC( QT_QMAINWINDOW_CENTRALWIDGET ) */ HB_FUNC( QT_QMAINWINDOW_CORNER ) { - hb_retni( hbqt_par_QMainWindow( 1 )->corner( ( Qt::Corner ) hb_parni( 2 ) ) ); + hb_retni( ( Qt::DockWidgetArea ) hbqt_par_QMainWindow( 1 )->corner( ( Qt::Corner ) hb_parni( 2 ) ) ); } /* @@ -153,7 +150,7 @@ HB_FUNC( QT_QMAINWINDOW_CORNER ) */ HB_FUNC( QT_QMAINWINDOW_CREATEPOPUPMENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QMainWindow( 1 )->createPopupMenu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QMainWindow( 1 )->createPopupMenu() ); } /* @@ -161,7 +158,7 @@ HB_FUNC( QT_QMAINWINDOW_CREATEPOPUPMENU ) */ HB_FUNC( QT_QMAINWINDOW_DOCKOPTIONS ) { - hb_retni( hbqt_par_QMainWindow( 1 )->dockOptions( ) ); + hb_retni( ( QMainWindow::DockOptions ) hbqt_par_QMainWindow( 1 )->dockOptions() ); } /* @@ -169,7 +166,7 @@ HB_FUNC( QT_QMAINWINDOW_DOCKOPTIONS ) */ HB_FUNC( QT_QMAINWINDOW_DOCKWIDGETAREA ) { - hb_retni( hbqt_par_QMainWindow( 1 )->dockWidgetArea( hbqt_par_QDockWidget( 2 ) ) ); + hb_retni( ( Qt::DockWidgetArea ) hbqt_par_QMainWindow( 1 )->dockWidgetArea( hbqt_par_QDockWidget( 2 ) ) ); } /* @@ -177,7 +174,7 @@ HB_FUNC( QT_QMAINWINDOW_DOCKWIDGETAREA ) */ HB_FUNC( QT_QMAINWINDOW_DOCUMENTMODE ) { - hb_retl( hbqt_par_QMainWindow( 1 )->documentMode( ) ); + hb_retl( hbqt_par_QMainWindow( 1 )->documentMode() ); } /* @@ -185,7 +182,7 @@ HB_FUNC( QT_QMAINWINDOW_DOCUMENTMODE ) */ HB_FUNC( QT_QMAINWINDOW_ICONSIZE ) { - hbqt_ret_QSize( hbqt_par_QMainWindow( 1 )->iconSize( ) ); + hb_retptr( new QSize( hbqt_par_QMainWindow( 1 )->iconSize() ) ); } /* @@ -209,7 +206,7 @@ HB_FUNC( QT_QMAINWINDOW_INSERTTOOLBARBREAK ) */ HB_FUNC( QT_QMAINWINDOW_ISANIMATED ) { - hb_retl( hbqt_par_QMainWindow( 1 )->isAnimated( ) ); + hb_retl( hbqt_par_QMainWindow( 1 )->isAnimated() ); } /* @@ -217,7 +214,7 @@ HB_FUNC( QT_QMAINWINDOW_ISANIMATED ) */ HB_FUNC( QT_QMAINWINDOW_ISDOCKNESTINGENABLED ) { - hb_retl( hbqt_par_QMainWindow( 1 )->isDockNestingEnabled( ) ); + hb_retl( hbqt_par_QMainWindow( 1 )->isDockNestingEnabled() ); } /* @@ -225,7 +222,7 @@ HB_FUNC( QT_QMAINWINDOW_ISDOCKNESTINGENABLED ) */ HB_FUNC( QT_QMAINWINDOW_MENUBAR ) { - hb_retptr( ( QMenuBar* ) hbqt_par_QMainWindow( 1 )->menuBar( ) ); + hb_retptr( ( QMenuBar* ) hbqt_par_QMainWindow( 1 )->menuBar() ); } /* @@ -233,7 +230,7 @@ HB_FUNC( QT_QMAINWINDOW_MENUBAR ) */ HB_FUNC( QT_QMAINWINDOW_MENUWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QMainWindow( 1 )->menuWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QMainWindow( 1 )->menuWidget() ); } /* @@ -268,6 +265,22 @@ HB_FUNC( QT_QMAINWINDOW_RESTOREDOCKWIDGET ) hb_retl( hbqt_par_QMainWindow( 1 )->restoreDockWidget( hbqt_par_QDockWidget( 2 ) ) ); } +/* + * bool restoreState ( const QByteArray & state, int version = 0 ) + */ +HB_FUNC( QT_QMAINWINDOW_RESTORESTATE ) +{ + hb_retl( hbqt_par_QMainWindow( 1 )->restoreState( *hbqt_par_QByteArray( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ) ); +} + +/* + * QByteArray saveState ( int version = 0 ) const + */ +HB_FUNC( QT_QMAINWINDOW_SAVESTATE ) +{ + hb_retptr( new QByteArray( hbqt_par_QMainWindow( 1 )->saveState( ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) ) ) ) ); +} + /* * void setCentralWidget ( QWidget * widget ) */ @@ -305,7 +318,7 @@ HB_FUNC( QT_QMAINWINDOW_SETDOCUMENTMODE ) */ HB_FUNC( QT_QMAINWINDOW_SETICONSIZE ) { - hbqt_par_QMainWindow( 1 )->setIconSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QMainWindow( 1 )->setIconSize( *hbqt_par_QSize( 2 ) ); } /* @@ -377,7 +390,7 @@ HB_FUNC( QT_QMAINWINDOW_SPLITDOCKWIDGET ) */ HB_FUNC( QT_QMAINWINDOW_STATUSBAR ) { - hb_retptr( ( QStatusBar* ) hbqt_par_QMainWindow( 1 )->statusBar( ) ); + hb_retptr( ( QStatusBar* ) hbqt_par_QMainWindow( 1 )->statusBar() ); } /* @@ -385,7 +398,7 @@ HB_FUNC( QT_QMAINWINDOW_STATUSBAR ) */ HB_FUNC( QT_QMAINWINDOW_TABPOSITION ) { - hb_retni( hbqt_par_QMainWindow( 1 )->tabPosition( ( Qt::DockWidgetArea ) hb_parni( 2 ) ) ); + hb_retni( ( QTabWidget::TabPosition ) hbqt_par_QMainWindow( 1 )->tabPosition( ( Qt::DockWidgetArea ) hb_parni( 2 ) ) ); } /* @@ -393,7 +406,7 @@ HB_FUNC( QT_QMAINWINDOW_TABPOSITION ) */ HB_FUNC( QT_QMAINWINDOW_TABSHAPE ) { - hb_retni( hbqt_par_QMainWindow( 1 )->tabShape( ) ); + hb_retni( ( QTabWidget::TabShape ) hbqt_par_QMainWindow( 1 )->tabShape() ); } /* @@ -409,7 +422,7 @@ HB_FUNC( QT_QMAINWINDOW_TABIFYDOCKWIDGET ) */ HB_FUNC( QT_QMAINWINDOW_TOOLBARAREA ) { - hb_retni( hbqt_par_QMainWindow( 1 )->toolBarArea( hbqt_par_QToolBar( 2 ) ) ); + hb_retni( ( Qt::ToolBarArea ) hbqt_par_QMainWindow( 1 )->toolBarArea( hbqt_par_QToolBar( 2 ) ) ); } /* @@ -425,7 +438,7 @@ HB_FUNC( QT_QMAINWINDOW_TOOLBARBREAK ) */ HB_FUNC( QT_QMAINWINDOW_TOOLBUTTONSTYLE ) { - hb_retni( hbqt_par_QMainWindow( 1 )->toolButtonStyle( ) ); + hb_retni( ( Qt::ToolButtonStyle ) hbqt_par_QMainWindow( 1 )->toolButtonStyle() ); } /* @@ -433,7 +446,7 @@ HB_FUNC( QT_QMAINWINDOW_TOOLBUTTONSTYLE ) */ HB_FUNC( QT_QMAINWINDOW_UNIFIEDTITLEANDTOOLBARONMAC ) { - hb_retl( hbqt_par_QMainWindow( 1 )->unifiedTitleAndToolBarOnMac( ) ); + hb_retl( hbqt_par_QMainWindow( 1 )->unifiedTitleAndToolBarOnMac() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qmenu.cpp b/harbour/contrib/hbqt/hbqt_qmenu.cpp index 78b6aa919e..0c99de7f0f 100644 --- a/harbour/contrib/hbqt/hbqt_qmenu.cpp +++ b/harbour/contrib/hbqt/hbqt_qmenu.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,19 +59,15 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 30/35 [ 85.71% ] ] - * + * Constructed[ 33/35 [ 94.29% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * QAction * addAction ( const QString & text, const QObject * receiver, const char * member, const QKeySequence & shortcut = 0 ) - * QAction * addAction ( const QIcon & icon, const QString & text, const QObject * receiver, const char * member, const QKeySequence & shortcut = 0 ) - * QIcon icon () const + * * OSMenuRef macMenu ( OSMenuRef merge = 0 ) * HMENU wceMenu ( bool create = false ) - */ + */ #include @@ -99,7 +95,7 @@ HB_FUNC( QT_QMENU ) */ HB_FUNC( QT_QMENU_ACTIONAT ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->actionAt( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->actionAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -107,7 +103,7 @@ HB_FUNC( QT_QMENU_ACTIONAT ) */ HB_FUNC( QT_QMENU_ACTIONGEOMETRY ) { - hbqt_ret_QRect( hbqt_par_QMenu( 1 )->actionGeometry( hbqt_par_QAction( 2 ) ) ); + hb_retptr( new QRect( hbqt_par_QMenu( 1 )->actionGeometry( hbqt_par_QAction( 2 ) ) ) ); } /* @@ -115,7 +111,7 @@ HB_FUNC( QT_QMENU_ACTIONGEOMETRY ) */ HB_FUNC( QT_QMENU_ACTIVEACTION ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->activeAction( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->activeAction() ); } /* @@ -135,9 +131,25 @@ HB_FUNC( QT_QMENU_ADDACTION_1 ) } /* - * void addAction ( QAction * action ) + * QAction * addAction ( const QString & text, const QObject * receiver, const char * member, const QKeySequence & shortcut = 0 ) */ HB_FUNC( QT_QMENU_ADDACTION_2 ) +{ + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->addAction( hbqt_par_QString( 2 ), hbqt_par_QObject( 3 ), hbqt_par_char( 4 ), *hbqt_par_QKeySequence( 5 ) ) ); +} + +/* + * QAction * addAction ( const QIcon & icon, const QString & text, const QObject * receiver, const char * member, const QKeySequence & shortcut = 0 ) + */ +HB_FUNC( QT_QMENU_ADDACTION_3 ) +{ + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->addAction( QIcon( hbqt_par_QString( 2 ) ), hbqt_par_QString( 3 ), hbqt_par_QObject( 4 ), hbqt_par_char( 5 ), *hbqt_par_QKeySequence( 6 ) ) ); +} + +/* + * void addAction ( QAction * action ) + */ +HB_FUNC( QT_QMENU_ADDACTION_4 ) { hbqt_par_QMenu( 1 )->addAction( hbqt_par_QAction( 2 ) ); } @@ -171,7 +183,7 @@ HB_FUNC( QT_QMENU_ADDMENU_2 ) */ HB_FUNC( QT_QMENU_ADDSEPARATOR ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->addSeparator( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->addSeparator() ); } /* @@ -179,7 +191,7 @@ HB_FUNC( QT_QMENU_ADDSEPARATOR ) */ HB_FUNC( QT_QMENU_CLEAR ) { - hbqt_par_QMenu( 1 )->clear( ); + hbqt_par_QMenu( 1 )->clear(); } /* @@ -187,7 +199,7 @@ HB_FUNC( QT_QMENU_CLEAR ) */ HB_FUNC( QT_QMENU_DEFAULTACTION ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->defaultAction( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->defaultAction() ); } /* @@ -195,7 +207,7 @@ HB_FUNC( QT_QMENU_DEFAULTACTION ) */ HB_FUNC( QT_QMENU_EXEC ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->exec( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->exec() ); } /* @@ -203,7 +215,7 @@ HB_FUNC( QT_QMENU_EXEC ) */ HB_FUNC( QT_QMENU_EXEC_1 ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->exec( hbqt_const_QPoint( 2 ), hbqt_par_QAction( 3 ) ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->exec( *hbqt_par_QPoint( 2 ), hbqt_par_QAction( 3 ) ) ); } /* @@ -211,7 +223,15 @@ HB_FUNC( QT_QMENU_EXEC_1 ) */ HB_FUNC( QT_QMENU_HIDETEAROFFMENU ) { - hbqt_par_QMenu( 1 )->hideTearOffMenu( ); + hbqt_par_QMenu( 1 )->hideTearOffMenu(); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QMENU_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QMenu( 1 )->icon() ) ); } /* @@ -235,7 +255,7 @@ HB_FUNC( QT_QMENU_INSERTSEPARATOR ) */ HB_FUNC( QT_QMENU_ISEMPTY ) { - hb_retl( hbqt_par_QMenu( 1 )->isEmpty( ) ); + hb_retl( hbqt_par_QMenu( 1 )->isEmpty() ); } /* @@ -243,7 +263,7 @@ HB_FUNC( QT_QMENU_ISEMPTY ) */ HB_FUNC( QT_QMENU_ISTEAROFFENABLED ) { - hb_retl( hbqt_par_QMenu( 1 )->isTearOffEnabled( ) ); + hb_retl( hbqt_par_QMenu( 1 )->isTearOffEnabled() ); } /* @@ -251,7 +271,7 @@ HB_FUNC( QT_QMENU_ISTEAROFFENABLED ) */ HB_FUNC( QT_QMENU_ISTEAROFFMENUVISIBLE ) { - hb_retl( hbqt_par_QMenu( 1 )->isTearOffMenuVisible( ) ); + hb_retl( hbqt_par_QMenu( 1 )->isTearOffMenuVisible() ); } /* @@ -259,7 +279,7 @@ HB_FUNC( QT_QMENU_ISTEAROFFMENUVISIBLE ) */ HB_FUNC( QT_QMENU_MENUACTION ) { - hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->menuAction( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenu( 1 )->menuAction() ); } /* @@ -267,7 +287,7 @@ HB_FUNC( QT_QMENU_MENUACTION ) */ HB_FUNC( QT_QMENU_POPUP ) { - hbqt_par_QMenu( 1 )->popup( hbqt_const_QPoint( 2 ), hbqt_par_QAction( 3 ) ); + hbqt_par_QMenu( 1 )->popup( *hbqt_par_QPoint( 2 ), hbqt_par_QAction( 3 ) ); } /* @@ -275,7 +295,7 @@ HB_FUNC( QT_QMENU_POPUP ) */ HB_FUNC( QT_QMENU_SEPARATORSCOLLAPSIBLE ) { - hb_retl( hbqt_par_QMenu( 1 )->separatorsCollapsible( ) ); + hb_retl( hbqt_par_QMenu( 1 )->separatorsCollapsible() ); } /* @@ -331,7 +351,7 @@ HB_FUNC( QT_QMENU_SETTITLE ) */ HB_FUNC( QT_QMENU_TITLE ) { - hb_retc( hbqt_par_QMenu( 1 )->title( ).toLatin1().data() ); + hb_retc( hbqt_par_QMenu( 1 )->title().toLatin1().data() ); } diff --git a/harbour/contrib/hbqt/hbqt_qmenubar.cpp b/harbour/contrib/hbqt/hbqt_qmenubar.cpp index 134a5cf3cc..e9912fd2fa 100644 --- a/harbour/contrib/hbqt/hbqt_qmenubar.cpp +++ b/harbour/contrib/hbqt/hbqt_qmenubar.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,20 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* * Constructed[ 14/15 [ 93.33% ] ] - * + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * OSMenuRef macMenu () - * - * *** Commented out protos which construct fine but do not compile *** - * - * // QAction * defaultAction () const - * // void setDefaultAction ( QAction * act ) - */ + */ #include @@ -92,7 +86,7 @@ HB_FUNC( QT_QMENUBAR ) */ HB_FUNC( QT_QMENUBAR_ACTIVEACTION ) { - hb_retptr( ( QAction* ) hbqt_par_QMenuBar( 1 )->activeAction( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenuBar( 1 )->activeAction() ); } /* @@ -148,7 +142,7 @@ HB_FUNC( QT_QMENUBAR_ADDMENU_2 ) */ HB_FUNC( QT_QMENUBAR_ADDSEPARATOR ) { - hb_retptr( ( QAction* ) hbqt_par_QMenuBar( 1 )->addSeparator( ) ); + hb_retptr( ( QAction* ) hbqt_par_QMenuBar( 1 )->addSeparator() ); } /* @@ -156,7 +150,7 @@ HB_FUNC( QT_QMENUBAR_ADDSEPARATOR ) */ HB_FUNC( QT_QMENUBAR_CLEAR ) { - hbqt_par_QMenuBar( 1 )->clear( ); + hbqt_par_QMenuBar( 1 )->clear(); } /* @@ -180,7 +174,7 @@ HB_FUNC( QT_QMENUBAR_INSERTSEPARATOR ) */ HB_FUNC( QT_QMENUBAR_ISDEFAULTUP ) { - hb_retl( hbqt_par_QMenuBar( 1 )->isDefaultUp( ) ); + hb_retl( hbqt_par_QMenuBar( 1 )->isDefaultUp() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qmessagebox.cpp b/harbour/contrib/hbqt/hbqt_qmessagebox.cpp index c397d0d4bc..e2e49f33ee 100644 --- a/harbour/contrib/hbqt/hbqt_qmessagebox.cpp +++ b/harbour/contrib/hbqt/hbqt_qmessagebox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,17 +59,14 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 29/32 [ 90.63% ] ] - * + * Constructed[ 32/33 [ 96.97% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * QList buttons () const - * QPixmap iconPixmap () const - * void setIconPixmap ( const QPixmap & pixmap ) - */ + */ #include @@ -122,7 +119,7 @@ HB_FUNC( QT_QMESSAGEBOX_BUTTON ) */ HB_FUNC( QT_QMESSAGEBOX_BUTTONROLE ) { - hb_retni( hbqt_par_QMessageBox( 1 )->buttonRole( hbqt_par_QAbstractButton( 2 ) ) ); + hb_retni( ( QMessageBox::ButtonRole ) hbqt_par_QMessageBox( 1 )->buttonRole( hbqt_par_QAbstractButton( 2 ) ) ); } /* @@ -130,7 +127,7 @@ HB_FUNC( QT_QMESSAGEBOX_BUTTONROLE ) */ HB_FUNC( QT_QMESSAGEBOX_CLICKEDBUTTON ) { - hb_retptr( ( QAbstractButton* ) hbqt_par_QMessageBox( 1 )->clickedButton( ) ); + hb_retptr( ( QAbstractButton* ) hbqt_par_QMessageBox( 1 )->clickedButton() ); } /* @@ -138,7 +135,7 @@ HB_FUNC( QT_QMESSAGEBOX_CLICKEDBUTTON ) */ HB_FUNC( QT_QMESSAGEBOX_DEFAULTBUTTON ) { - hb_retptr( ( QPushButton* ) hbqt_par_QMessageBox( 1 )->defaultButton( ) ); + hb_retptr( ( QPushButton* ) hbqt_par_QMessageBox( 1 )->defaultButton() ); } /* @@ -146,7 +143,7 @@ HB_FUNC( QT_QMESSAGEBOX_DEFAULTBUTTON ) */ HB_FUNC( QT_QMESSAGEBOX_DETAILEDTEXT ) { - hb_retc( hbqt_par_QMessageBox( 1 )->detailedText( ).toLatin1().data() ); + hb_retc( hbqt_par_QMessageBox( 1 )->detailedText().toLatin1().data() ); } /* @@ -154,7 +151,7 @@ HB_FUNC( QT_QMESSAGEBOX_DETAILEDTEXT ) */ HB_FUNC( QT_QMESSAGEBOX_ESCAPEBUTTON ) { - hb_retptr( ( QAbstractButton* ) hbqt_par_QMessageBox( 1 )->escapeButton( ) ); + hb_retptr( ( QAbstractButton* ) hbqt_par_QMessageBox( 1 )->escapeButton() ); } /* @@ -162,7 +159,15 @@ HB_FUNC( QT_QMESSAGEBOX_ESCAPEBUTTON ) */ HB_FUNC( QT_QMESSAGEBOX_ICON ) { - hb_retni( hbqt_par_QMessageBox( 1 )->icon( ) ); + hb_retni( ( QMessageBox::Icon ) hbqt_par_QMessageBox( 1 )->icon() ); +} + +/* + * QPixmap iconPixmap () const + */ +HB_FUNC( QT_QMESSAGEBOX_ICONPIXMAP ) +{ + hb_retptr( new QPixmap( hbqt_par_QMessageBox( 1 )->iconPixmap() ) ); } /* @@ -170,7 +175,7 @@ HB_FUNC( QT_QMESSAGEBOX_ICON ) */ HB_FUNC( QT_QMESSAGEBOX_INFORMATIVETEXT ) { - hb_retc( hbqt_par_QMessageBox( 1 )->informativeText( ).toLatin1().data() ); + hb_retc( hbqt_par_QMessageBox( 1 )->informativeText().toLatin1().data() ); } /* @@ -237,6 +242,14 @@ HB_FUNC( QT_QMESSAGEBOX_SETICON ) hbqt_par_QMessageBox( 1 )->setIcon( ( QMessageBox::Icon ) hb_parni( 2 ) ); } +/* + * void setIconPixmap ( const QPixmap & pixmap ) + */ +HB_FUNC( QT_QMESSAGEBOX_SETICONPIXMAP ) +{ + hbqt_par_QMessageBox( 1 )->setIconPixmap( *hbqt_par_QPixmap( 2 ) ); +} + /* * void setInformativeText ( const QString & text ) */ @@ -290,7 +303,7 @@ HB_FUNC( QT_QMESSAGEBOX_SETWINDOWTITLE ) */ HB_FUNC( QT_QMESSAGEBOX_STANDARDBUTTON ) { - hb_retni( hbqt_par_QMessageBox( 1 )->standardButton( hbqt_par_QAbstractButton( 2 ) ) ); + hb_retni( ( QMessageBox::StandardButton ) hbqt_par_QMessageBox( 1 )->standardButton( hbqt_par_QAbstractButton( 2 ) ) ); } /* @@ -298,7 +311,7 @@ HB_FUNC( QT_QMESSAGEBOX_STANDARDBUTTON ) */ HB_FUNC( QT_QMESSAGEBOX_STANDARDBUTTONS ) { - hb_retni( hbqt_par_QMessageBox( 1 )->standardButtons( ) ); + hb_retni( ( QMessageBox::StandardButtons ) hbqt_par_QMessageBox( 1 )->standardButtons() ); } /* @@ -306,7 +319,7 @@ HB_FUNC( QT_QMESSAGEBOX_STANDARDBUTTONS ) */ HB_FUNC( QT_QMESSAGEBOX_TEXT ) { - hb_retc( hbqt_par_QMessageBox( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QMessageBox( 1 )->text().toLatin1().data() ); } /* @@ -314,7 +327,15 @@ HB_FUNC( QT_QMESSAGEBOX_TEXT ) */ HB_FUNC( QT_QMESSAGEBOX_TEXTFORMAT ) { - hb_retni( hbqt_par_QMessageBox( 1 )->textFormat( ) ); + hb_retni( ( Qt::TextFormat ) hbqt_par_QMessageBox( 1 )->textFormat() ); +} + +/* + * int exec () + */ +HB_FUNC( QT_QMESSAGEBOX_EXEC ) +{ + hb_retni( hbqt_par_QMessageBox( 1 )->exec() ); } diff --git a/harbour/contrib/hbqt/hbqt_qobject.cpp b/harbour/contrib/hbqt/hbqt_qobject.cpp index 9e2247b8df..0930f58d96 100644 --- a/harbour/contrib/hbqt/hbqt_qobject.cpp +++ b/harbour/contrib/hbqt/hbqt_qobject.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,25 +59,20 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 22/29 [ 75.86% ] ] - * + * Constructed[ 26/29 [ 89.66% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * const QObjectList & children () const + * * QList dynamicPropertyNames () const - * T findChild ( const QString & name = QString() ) const * QList findChildren ( const QString & name = QString() ) const * QList findChildren ( const QRegExp & regExp ) const - * QVariant property ( const char * name ) const - * bool setProperty ( const char * name, const QVariant & value ) - */ + */ #include - +#include /* * Q_INVOKABLE QObject ( QObject * parent = 0 ) @@ -96,12 +91,20 @@ HB_FUNC( QT_QOBJECT_BLOCKSIGNALS ) hb_retl( hbqt_par_QObject( 1 )->blockSignals( hb_parl( 2 ) ) ); } +/* + * const QObjectList & children () const + */ +HB_FUNC( QT_QOBJECT_CHILDREN ) +{ + hb_retptr( new QObjectList( hbqt_par_QObject( 1 )->children() ) ); +} + /* * bool connect ( const QObject * sender, const char * signal, const char * method, Qt::ConnectionType type = Qt::AutoConnection ) const */ HB_FUNC( QT_QOBJECT_CONNECT ) { - hb_retl( hbqt_par_QObject( 1 )->connect( hbqt_par_QObject( 2 ), hbqt_par_char( 3 ), hbqt_par_char( 4 ), ( Qt::ConnectionType ) hb_parni( 5 ) ) ); + hb_retl( hbqt_par_QObject( 1 )->connect( hbqt_par_QObject( 2 ), hbqt_par_char( 3 ), hbqt_par_char( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::ConnectionType ) Qt::AutoConnection : ( Qt::ConnectionType ) hb_parni( 5 ) ) ) ); } /* @@ -125,7 +128,7 @@ HB_FUNC( QT_QOBJECT_DISCONNECT_1 ) */ HB_FUNC( QT_QOBJECT_DUMPOBJECTINFO ) { - hbqt_par_QObject( 1 )->dumpObjectInfo( ); + hbqt_par_QObject( 1 )->dumpObjectInfo(); } /* @@ -133,7 +136,7 @@ HB_FUNC( QT_QOBJECT_DUMPOBJECTINFO ) */ HB_FUNC( QT_QOBJECT_DUMPOBJECTTREE ) { - hbqt_par_QObject( 1 )->dumpObjectTree( ); + hbqt_par_QObject( 1 )->dumpObjectTree(); } /* @@ -173,7 +176,7 @@ HB_FUNC( QT_QOBJECT_INSTALLEVENTFILTER ) */ HB_FUNC( QT_QOBJECT_ISWIDGETTYPE ) { - hb_retl( hbqt_par_QObject( 1 )->isWidgetType( ) ); + hb_retl( hbqt_par_QObject( 1 )->isWidgetType() ); } /* @@ -189,7 +192,7 @@ HB_FUNC( QT_QOBJECT_KILLTIMER ) */ HB_FUNC( QT_QOBJECT_METAOBJECT ) { - hb_retptr( ( QMetaObject* ) hbqt_par_QObject( 1 )->metaObject( ) ); + hb_retptr( ( QMetaObject* ) hbqt_par_QObject( 1 )->metaObject() ); } /* @@ -205,7 +208,7 @@ HB_FUNC( QT_QOBJECT_MOVETOTHREAD ) */ HB_FUNC( QT_QOBJECT_OBJECTNAME ) { - hb_retc( hbqt_par_QObject( 1 )->objectName( ).toLatin1().data() ); + hb_retc( hbqt_par_QObject( 1 )->objectName().toLatin1().data() ); } /* @@ -213,7 +216,15 @@ HB_FUNC( QT_QOBJECT_OBJECTNAME ) */ HB_FUNC( QT_QOBJECT_PARENT ) { - hb_retptr( ( QObject* ) hbqt_par_QObject( 1 )->parent( ) ); + hb_retptr( ( QObject* ) hbqt_par_QObject( 1 )->parent() ); +} + +/* + * QVariant property ( const char * name ) const + */ +HB_FUNC( QT_QOBJECT_PROPERTY ) +{ + hb_retptr( new QVariant( hbqt_par_QObject( 1 )->property( hbqt_par_char( 2 ) ) ) ); } /* @@ -240,12 +251,20 @@ HB_FUNC( QT_QOBJECT_SETPARENT ) hbqt_par_QObject( 1 )->setParent( hbqt_par_QObject( 2 ) ); } +/* + * bool setProperty ( const char * name, const QVariant & value ) + */ +HB_FUNC( QT_QOBJECT_SETPROPERTY ) +{ + hb_retl( hbqt_par_QObject( 1 )->setProperty( hbqt_par_char( 2 ), *hbqt_par_QVariant( 3 ) ) ); +} + /* * bool signalsBlocked () const */ HB_FUNC( QT_QOBJECT_SIGNALSBLOCKED ) { - hb_retl( hbqt_par_QObject( 1 )->signalsBlocked( ) ); + hb_retl( hbqt_par_QObject( 1 )->signalsBlocked() ); } /* @@ -261,7 +280,15 @@ HB_FUNC( QT_QOBJECT_STARTTIMER ) */ HB_FUNC( QT_QOBJECT_THREAD ) { - hb_retptr( ( QThread* ) hbqt_par_QObject( 1 )->thread( ) ); + hb_retptr( ( QThread* ) hbqt_par_QObject( 1 )->thread() ); +} + +/* + * void deleteLater () + */ +HB_FUNC( QT_QOBJECT_DELETELATER ) +{ + hbqt_par_QObject( 1 )->deleteLater(); } diff --git a/harbour/contrib/hbqt/hbqt_qpagesetupdialog.cpp b/harbour/contrib/hbqt/hbqt_qpagesetupdialog.cpp index 0f6a8dd623..06911a86b9 100644 --- a/harbour/contrib/hbqt/hbqt_qpagesetupdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qpagesetupdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -73,7 +72,7 @@ HB_FUNC( QT_QPAGESETUPDIALOG ) if( hb_pcount() >= 2 ) hb_retptr( ( QPageSetupDialog* ) new QPageSetupDialog( hbqt_par_QPrinter( 1 ), hbqt_par_QWidget( 1 ) ) ); else - hb_retptr( ( QPageSetupDialog* ) new QPageSetupDialog( hbqt_par_QWidget( 1 ) ) ); + hb_retptr( ( QPageSetupDialog* ) new QPageSetupDialog( hbqt_par_QWidget( 1 ) ) ); } /* @@ -81,7 +80,7 @@ HB_FUNC( QT_QPAGESETUPDIALOG ) */ HB_FUNC( QT_QPAGESETUPDIALOG_EXEC ) { - hb_retni( hbqt_par_QPageSetupDialog( 1 )->exec( ) ); + hb_retni( hbqt_par_QPageSetupDialog( 1 )->exec() ); } /* @@ -97,7 +96,7 @@ HB_FUNC( QT_QPAGESETUPDIALOG_OPEN ) */ HB_FUNC( QT_QPAGESETUPDIALOG_OPTIONS ) { - hb_retni( hbqt_par_QPageSetupDialog( 1 )->options( ) ); + hb_retni( ( QPageSetupDialog::PageSetupDialogOptions ) hbqt_par_QPageSetupDialog( 1 )->options() ); } /* @@ -105,7 +104,7 @@ HB_FUNC( QT_QPAGESETUPDIALOG_OPTIONS ) */ HB_FUNC( QT_QPAGESETUPDIALOG_PRINTER ) { - hb_retptr( ( QPrinter* ) hbqt_par_QPageSetupDialog( 1 )->printer( ) ); + hb_retptr( ( QPrinter* ) hbqt_par_QPageSetupDialog( 1 )->printer() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qpaintdevice.cpp b/harbour/contrib/hbqt/hbqt_qpaintdevice.cpp index dad7ca2aaf..0052009db6 100644 --- a/harbour/contrib/hbqt/hbqt_qpaintdevice.cpp +++ b/harbour/contrib/hbqt/hbqt_qpaintdevice.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include /* @@ -76,7 +75,7 @@ HB_FUNC( QT_QPAINTDEVICE ) */ HB_FUNC( QT_QPAINTDEVICE_DEPTH ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->depth( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->depth() ); } /* @@ -84,7 +83,7 @@ HB_FUNC( QT_QPAINTDEVICE_DEPTH ) */ HB_FUNC( QT_QPAINTDEVICE_HEIGHT ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->height( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->height() ); } /* @@ -92,7 +91,7 @@ HB_FUNC( QT_QPAINTDEVICE_HEIGHT ) */ HB_FUNC( QT_QPAINTDEVICE_HEIGHTMM ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->heightMM( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->heightMM() ); } /* @@ -100,7 +99,7 @@ HB_FUNC( QT_QPAINTDEVICE_HEIGHTMM ) */ HB_FUNC( QT_QPAINTDEVICE_LOGICALDPIX ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->logicalDpiX( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->logicalDpiX() ); } /* @@ -108,7 +107,7 @@ HB_FUNC( QT_QPAINTDEVICE_LOGICALDPIX ) */ HB_FUNC( QT_QPAINTDEVICE_LOGICALDPIY ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->logicalDpiY( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->logicalDpiY() ); } /* @@ -116,7 +115,7 @@ HB_FUNC( QT_QPAINTDEVICE_LOGICALDPIY ) */ HB_FUNC( QT_QPAINTDEVICE_NUMCOLORS ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->numColors( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->numColors() ); } /* @@ -124,7 +123,7 @@ HB_FUNC( QT_QPAINTDEVICE_NUMCOLORS ) */ HB_FUNC( QT_QPAINTDEVICE_PAINTENGINE ) { - hb_retptr( ( QPaintEngine* ) hbqt_par_QPaintDevice( 1 )->paintEngine( ) ); + hb_retptr( ( QPaintEngine* ) hbqt_par_QPaintDevice( 1 )->paintEngine() ); } /* @@ -132,7 +131,7 @@ HB_FUNC( QT_QPAINTDEVICE_PAINTENGINE ) */ HB_FUNC( QT_QPAINTDEVICE_PAINTINGACTIVE ) { - hb_retl( hbqt_par_QPaintDevice( 1 )->paintingActive( ) ); + hb_retl( hbqt_par_QPaintDevice( 1 )->paintingActive() ); } /* @@ -140,7 +139,7 @@ HB_FUNC( QT_QPAINTDEVICE_PAINTINGACTIVE ) */ HB_FUNC( QT_QPAINTDEVICE_PHYSICALDPIX ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->physicalDpiX( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->physicalDpiX() ); } /* @@ -148,7 +147,7 @@ HB_FUNC( QT_QPAINTDEVICE_PHYSICALDPIX ) */ HB_FUNC( QT_QPAINTDEVICE_PHYSICALDPIY ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->physicalDpiY( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->physicalDpiY() ); } /* @@ -156,7 +155,7 @@ HB_FUNC( QT_QPAINTDEVICE_PHYSICALDPIY ) */ HB_FUNC( QT_QPAINTDEVICE_WIDTH ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->width( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->width() ); } /* @@ -164,7 +163,7 @@ HB_FUNC( QT_QPAINTDEVICE_WIDTH ) */ HB_FUNC( QT_QPAINTDEVICE_WIDTHMM ) { - hb_retni( hbqt_par_QPaintDevice( 1 )->widthMM( ) ); + hb_retni( hbqt_par_QPaintDevice( 1 )->widthMM() ); } diff --git a/harbour/contrib/hbqt/hbqt_qpainter.cpp b/harbour/contrib/hbqt/hbqt_qpainter.cpp index 29cbb084ba..ae26fb176d 100644 --- a/harbour/contrib/hbqt/hbqt_qpainter.cpp +++ b/harbour/contrib/hbqt/hbqt_qpainter.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,115 +59,19 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 79/180 [ 43.89% ] ] - * + * Constructed[ 179/185 [ 96.76% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * const QBrush & background () const - * QRectF boundingRect ( const QRectF & rectangle, int flags, const QString & text ) - * QRectF boundingRect ( const QRectF & rectangle, const QString & text, const QTextOption & option = QTextOption() ) - * const QBrush & brush () const - * QPainterPath clipPath () const - * QRegion clipRegion () const - * QMatrix combinedMatrix () const - * QTransform combinedTransform () const - * const QMatrix & deviceMatrix () const - * const QTransform & deviceTransform () const - * void drawArc ( const QRectF & rectangle, int startAngle, int spanAngle ) - * void drawChord ( const QRectF & rectangle, int startAngle, int spanAngle ) - * void drawConvexPolygon ( const QPoint * points, int pointCount ) - * void drawConvexPolygon ( const QPolygonF & polygon ) - * void drawConvexPolygon ( const QPolygon & polygon ) - * void drawEllipse ( const QRectF & rectangle ) - * void drawEllipse ( const QPointF & center, qreal rx, qreal ry ) - * void drawImage ( const QPointF & point, const QImage & image ) - * void drawImage ( const QPoint & point, const QImage & image ) - * void drawImage ( const QRectF & rectangle, const QImage & image ) - * void drawImage ( const QRect & rectangle, const QImage & image ) - * void drawLine ( const QLineF & line ) - * void drawLine ( const QLine & line ) - * void drawLine ( const QPointF & p1, const QPointF & p2 ) - * void drawLines ( const QPoint * pointPairs, int lineCount ) + * * void drawLines ( const QVector & pointPairs ) * void drawLines ( const QVector & pointPairs ) * void drawLines ( const QVector & lines ) * void drawLines ( const QVector & lines ) - * void drawPath ( const QPainterPath & path ) - * void drawPicture ( const QPointF & point, const QPicture & picture ) - * void drawPicture ( const QPoint & point, const QPicture & picture ) - * void drawPicture ( int x, int y, const QPicture & picture ) - * void drawPie ( const QRectF & rectangle, int startAngle, int spanAngle ) - * void drawPixmap ( const QRectF & target, const QPixmap & pixmap, const QRectF & source ) - * void drawPixmap ( const QRect & target, const QPixmap & pixmap, const QRect & source ) - * void drawPixmap ( const QPointF & point, const QPixmap & pixmap, const QRectF & source ) - * void drawPixmap ( const QPoint & point, const QPixmap & pixmap, const QRect & source ) - * void drawPixmap ( const QPointF & point, const QPixmap & pixmap ) - * void drawPixmap ( const QPoint & point, const QPixmap & pixmap ) - * void drawPixmap ( int x, int y, const QPixmap & pixmap ) - * void drawPixmap ( const QRect & rectangle, const QPixmap & pixmap ) - * void drawPixmap ( int x, int y, int width, int height, const QPixmap & pixmap ) - * void drawPixmap ( int x, int y, int w, int h, const QPixmap & pixmap, int sx, int sy, int sw, int sh ) - * void drawPixmap ( int x, int y, const QPixmap & pixmap, int sx, int sy, int sw, int sh ) - * void drawPoint ( const QPointF & position ) - * void drawPoints ( const QPoint * points, int pointCount ) - * void drawPoints ( const QPolygonF & points ) - * void drawPoints ( const QPolygon & points ) - * void drawPolygon ( const QPoint * points, int pointCount, Qt::FillRule fillRule = Qt::OddEvenFill ) - * void drawPolygon ( const QPolygonF & points, Qt::FillRule fillRule = Qt::OddEvenFill ) - * void drawPolygon ( const QPolygon & points, Qt::FillRule fillRule = Qt::OddEvenFill ) - * void drawPolyline ( const QPoint * points, int pointCount ) - * void drawPolyline ( const QPolygonF & points ) - * void drawPolyline ( const QPolygon & points ) - * void drawRect ( const QRectF & rectangle ) - * void drawRects ( const QRect * rectangles, int rectCount ) * void drawRects ( const QVector & rectangles ) * void drawRects ( const QVector & rectangles ) - * void drawRoundedRect ( const QRectF & rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize ) - * void drawText ( const QPointF & position, const QString & text ) - * void drawText ( const QRectF & rectangle, int flags, const QString & text, QRectF * boundingRect = 0 ) - * void drawText ( const QRect & rectangle, int flags, const QString & text, QRect * boundingRect = 0 ) - * void drawText ( int x, int y, int width, int height, int flags, const QString & text, QRect * boundingRect = 0 ) - * void drawText ( const QRectF & rectangle, const QString & text, const QTextOption & option = QTextOption() ) - * void drawTiledPixmap ( const QRectF & rectangle, const QPixmap & pixmap, const QPointF & position = QPointF() ) - * void drawTiledPixmap ( const QRect & rectangle, const QPixmap & pixmap, const QPoint & position = QPoint() ) - * void drawTiledPixmap ( int x, int y, int width, int height, const QPixmap & pixmap, int sx = 0, int sy = 0 ) - * void eraseRect ( const QRectF & rectangle ) - * void fillPath ( const QPainterPath & path, const QBrush & brush ) - * void fillRect ( const QRectF & rectangle, const QBrush & brush ) - * void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) - * void fillRect ( const QRect & rectangle, const QBrush & brush ) - * void fillRect ( const QRect & rectangle, const QColor & color ) - * void fillRect ( const QRectF & rectangle, const QColor & color ) - * void fillRect ( int x, int y, int width, int height, const QBrush & brush ) - * void fillRect ( int x, int y, int width, int height, const QColor & color ) - * void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) - * const QFont & font () const - * QFontInfo fontInfo () const - * QFontMetrics fontMetrics () const - * const QPen & pen () const - * RenderHints renderHints () const - * void setBackground ( const QBrush & brush ) - * void setBrush ( const QBrush & brush ) - * void setBrushOrigin ( const QPointF & position ) - * void setClipPath ( const QPainterPath & path, Qt::ClipOperation operation = Qt::ReplaceClip ) - * void setClipRect ( const QRectF & rectangle, Qt::ClipOperation operation = Qt::ReplaceClip ) - * void setClipRegion ( const QRegion & region, Qt::ClipOperation operation = Qt::ReplaceClip ) - * void setFont ( const QFont & font ) - * void setPen ( const QPen & pen ) - * void setPen ( const QColor & color ) - * void setRenderHints ( RenderHints hints, bool on = true ) - * void setTransform ( const QTransform & transform, bool combine = false ) - * void setWorldMatrix ( const QMatrix & matrix, bool combine = false ) - * void setWorldTransform ( const QTransform & matrix, bool combine = false ) - * void strokePath ( const QPainterPath & path, const QPen & pen ) - * const QTransform & transform () const - * void translate ( const QPointF & offset ) - * const QMatrix & worldMatrix () const - * const QTransform & worldTransform () const - */ + */ #include @@ -186,7 +90,15 @@ HB_FUNC( QT_QPAINTER ) else { hb_retptr( ( QPainter* ) new QPainter() ); - } + } +} + +/* + * const QBrush & background () const + */ +HB_FUNC( QT_QPAINTER_BACKGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QPainter( 1 )->background() ) ); } /* @@ -194,7 +106,7 @@ HB_FUNC( QT_QPAINTER ) */ HB_FUNC( QT_QPAINTER_BACKGROUNDMODE ) { - hb_retni( hbqt_par_QPainter( 1 )->backgroundMode( ) ); + hb_retni( ( Qt::BGMode ) hbqt_par_QPainter( 1 )->backgroundMode() ); } /* @@ -206,19 +118,43 @@ HB_FUNC( QT_QPAINTER_BEGIN ) } /* - * QRect boundingRect ( const QRect & rectangle, int flags, const QString & text ) + * QRectF boundingRect ( const QRectF & rectangle, int flags, const QString & text ) */ HB_FUNC( QT_QPAINTER_BOUNDINGRECT ) { - hbqt_ret_QRect( hbqt_par_QPainter( 1 )->boundingRect( hbqt_const_QRect( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ) ) ); + hb_retptr( new QRectF( hbqt_par_QPainter( 1 )->boundingRect( *hbqt_par_QRectF( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ) ) ) ); +} + +/* + * QRect boundingRect ( const QRect & rectangle, int flags, const QString & text ) + */ +HB_FUNC( QT_QPAINTER_BOUNDINGRECT_1 ) +{ + hb_retptr( new QRect( hbqt_par_QPainter( 1 )->boundingRect( *hbqt_par_QRect( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ) ) ) ); } /* * QRect boundingRect ( int x, int y, int w, int h, int flags, const QString & text ) */ -HB_FUNC( QT_QPAINTER_BOUNDINGRECT_1 ) +HB_FUNC( QT_QPAINTER_BOUNDINGRECT_2 ) { - hbqt_ret_QRect( hbqt_par_QPainter( 1 )->boundingRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hbqt_par_QString( 7 ) ) ); + hb_retptr( new QRect( hbqt_par_QPainter( 1 )->boundingRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hbqt_par_QString( 7 ) ) ) ); +} + +/* + * QRectF boundingRect ( const QRectF & rectangle, const QString & text, const QTextOption & option = QTextOption() ) + */ +HB_FUNC( QT_QPAINTER_BOUNDINGRECT_3 ) +{ + hb_retptr( new QRectF( hbqt_par_QPainter( 1 )->boundingRect( *hbqt_par_QRectF( 2 ), hbqt_par_QString( 3 ), *hbqt_par_QTextOption( 4 ) ) ) ); +} + +/* + * const QBrush & brush () const + */ +HB_FUNC( QT_QPAINTER_BRUSH ) +{ + hb_retptr( new QBrush( hbqt_par_QPainter( 1 )->brush() ) ); } /* @@ -226,7 +162,39 @@ HB_FUNC( QT_QPAINTER_BOUNDINGRECT_1 ) */ HB_FUNC( QT_QPAINTER_BRUSHORIGIN ) { - hbqt_ret_QPoint( hbqt_par_QPainter( 1 )->brushOrigin( ) ); + hb_retptr( new QPoint( hbqt_par_QPainter( 1 )->brushOrigin() ) ); +} + +/* + * QPainterPath clipPath () const + */ +HB_FUNC( QT_QPAINTER_CLIPPATH ) +{ + hb_retptr( new QPainterPath( hbqt_par_QPainter( 1 )->clipPath() ) ); +} + +/* + * QRegion clipRegion () const + */ +HB_FUNC( QT_QPAINTER_CLIPREGION ) +{ + hb_retptr( new QRegion( hbqt_par_QPainter( 1 )->clipRegion() ) ); +} + +/* + * QMatrix combinedMatrix () const + */ +HB_FUNC( QT_QPAINTER_COMBINEDMATRIX ) +{ + hb_retptr( new QMatrix( hbqt_par_QPainter( 1 )->combinedMatrix() ) ); +} + +/* + * QTransform combinedTransform () const + */ +HB_FUNC( QT_QPAINTER_COMBINEDTRANSFORM ) +{ + hb_retptr( new QTransform( hbqt_par_QPainter( 1 )->combinedTransform() ) ); } /* @@ -234,7 +202,7 @@ HB_FUNC( QT_QPAINTER_BRUSHORIGIN ) */ HB_FUNC( QT_QPAINTER_COMPOSITIONMODE ) { - hb_retni( hbqt_par_QPainter( 1 )->compositionMode( ) ); + hb_retni( ( QPainter::CompositionMode ) hbqt_par_QPainter( 1 )->compositionMode() ); } /* @@ -242,37 +210,69 @@ HB_FUNC( QT_QPAINTER_COMPOSITIONMODE ) */ HB_FUNC( QT_QPAINTER_DEVICE ) { - hb_retptr( ( QPaintDevice* ) hbqt_par_QPainter( 1 )->device( ) ); + hb_retptr( ( QPaintDevice* ) hbqt_par_QPainter( 1 )->device() ); +} + +/* + * const QMatrix & deviceMatrix () const + */ +HB_FUNC( QT_QPAINTER_DEVICEMATRIX ) +{ + hb_retptr( new QMatrix( hbqt_par_QPainter( 1 )->deviceMatrix() ) ); +} + +/* + * const QTransform & deviceTransform () const + */ +HB_FUNC( QT_QPAINTER_DEVICETRANSFORM ) +{ + hb_retptr( new QTransform( hbqt_par_QPainter( 1 )->deviceTransform() ) ); +} + +/* + * void drawArc ( const QRectF & rectangle, int startAngle, int spanAngle ) + */ +HB_FUNC( QT_QPAINTER_DRAWARC ) +{ + hbqt_par_QPainter( 1 )->drawArc( *hbqt_par_QRectF( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); } /* * void drawArc ( const QRect & rectangle, int startAngle, int spanAngle ) */ -HB_FUNC( QT_QPAINTER_DRAWARC ) +HB_FUNC( QT_QPAINTER_DRAWARC_1 ) { - hbqt_par_QPainter( 1 )->drawArc( hbqt_const_QRect( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); + hbqt_par_QPainter( 1 )->drawArc( *hbqt_par_QRect( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); } /* * void drawArc ( int x, int y, int width, int height, int startAngle, int spanAngle ) */ -HB_FUNC( QT_QPAINTER_DRAWARC_1 ) +HB_FUNC( QT_QPAINTER_DRAWARC_2 ) { hbqt_par_QPainter( 1 )->drawArc( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hb_parni( 7 ) ); } /* - * void drawChord ( const QRect & rectangle, int startAngle, int spanAngle ) + * void drawChord ( const QRectF & rectangle, int startAngle, int spanAngle ) */ HB_FUNC( QT_QPAINTER_DRAWCHORD ) { - hbqt_par_QPainter( 1 )->drawChord( hbqt_const_QRect( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); + hbqt_par_QPainter( 1 )->drawChord( *hbqt_par_QRectF( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); +} + +/* + * void drawChord ( const QRect & rectangle, int startAngle, int spanAngle ) + */ +HB_FUNC( QT_QPAINTER_DRAWCHORD_1 ) +{ + hbqt_par_QPainter( 1 )->drawChord( *hbqt_par_QRect( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); } /* * void drawChord ( int x, int y, int width, int height, int startAngle, int spanAngle ) */ -HB_FUNC( QT_QPAINTER_DRAWCHORD_1 ) +HB_FUNC( QT_QPAINTER_DRAWCHORD_2 ) { hbqt_par_QPainter( 1 )->drawChord( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hb_parni( 7 ) ); } @@ -286,41 +286,177 @@ HB_FUNC( QT_QPAINTER_DRAWCONVEXPOLYGON ) } /* - * void drawEllipse ( const QRect & rectangle ) + * void drawConvexPolygon ( const QPoint * points, int pointCount ) + */ +HB_FUNC( QT_QPAINTER_DRAWCONVEXPOLYGON_1 ) +{ + hbqt_par_QPainter( 1 )->drawConvexPolygon( hbqt_par_QPoint( 2 ), hb_parni( 3 ) ); +} + +/* + * void drawConvexPolygon ( const QPolygonF & polygon ) + */ +HB_FUNC( QT_QPAINTER_DRAWCONVEXPOLYGON_2 ) +{ + hbqt_par_QPainter( 1 )->drawConvexPolygon( *hbqt_par_QPolygonF( 2 ) ); +} + +/* + * void drawConvexPolygon ( const QPolygon & polygon ) + */ +HB_FUNC( QT_QPAINTER_DRAWCONVEXPOLYGON_3 ) +{ + hbqt_par_QPainter( 1 )->drawConvexPolygon( *hbqt_par_QPolygon( 2 ) ); +} + +/* + * void drawEllipse ( const QRectF & rectangle ) */ HB_FUNC( QT_QPAINTER_DRAWELLIPSE ) { - hbqt_par_QPainter( 1 )->drawEllipse( hbqt_const_QRect( 2 ) ); + hbqt_par_QPainter( 1 )->drawEllipse( *hbqt_par_QRectF( 2 ) ); +} + +/* + * void drawEllipse ( const QRect & rectangle ) + */ +HB_FUNC( QT_QPAINTER_DRAWELLIPSE_1 ) +{ + hbqt_par_QPainter( 1 )->drawEllipse( *hbqt_par_QRect( 2 ) ); } /* * void drawEllipse ( int x, int y, int width, int height ) */ -HB_FUNC( QT_QPAINTER_DRAWELLIPSE_1 ) +HB_FUNC( QT_QPAINTER_DRAWELLIPSE_2 ) { hbqt_par_QPainter( 1 )->drawEllipse( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); } +/* + * void drawEllipse ( const QPointF & center, qreal rx, qreal ry ) + */ +HB_FUNC( QT_QPAINTER_DRAWELLIPSE_3 ) +{ + hbqt_par_QPainter( 1 )->drawEllipse( *hbqt_par_QPointF( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) ); +} + /* * void drawEllipse ( const QPoint & center, int rx, int ry ) */ -HB_FUNC( QT_QPAINTER_DRAWELLIPSE_2 ) +HB_FUNC( QT_QPAINTER_DRAWELLIPSE_4 ) { - hbqt_par_QPainter( 1 )->drawEllipse( hbqt_const_QPoint( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); + hbqt_par_QPainter( 1 )->drawEllipse( *hbqt_par_QPoint( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); +} + +/* + * void drawImage ( const QRectF & target, const QImage & image, const QRectF & source, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QRectF( 2 ), *hbqt_par_QImage( 3 ), *hbqt_par_QRectF( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 5 ) ) ); +} + +/* + * void drawImage ( const QRect & target, const QImage & image, const QRect & source, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_1 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QRect( 2 ), *hbqt_par_QImage( 3 ), *hbqt_par_QRect( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 5 ) ) ); +} + +/* + * void drawImage ( const QPointF & point, const QImage & image ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_2 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QPointF( 2 ), *hbqt_par_QImage( 3 ) ); +} + +/* + * void drawImage ( const QPoint & point, const QImage & image ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_3 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QPoint( 2 ), *hbqt_par_QImage( 3 ) ); +} + +/* + * void drawImage ( const QPointF & point, const QImage & image, const QRectF & source, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_4 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QPointF( 2 ), *hbqt_par_QImage( 3 ), *hbqt_par_QRectF( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 5 ) ) ); +} + +/* + * void drawImage ( const QPoint & point, const QImage & image, const QRect & source, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_5 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QPoint( 2 ), *hbqt_par_QImage( 3 ), *hbqt_par_QRect( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 5 ) ) ); +} + +/* + * void drawImage ( const QRectF & rectangle, const QImage & image ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_6 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QRectF( 2 ), *hbqt_par_QImage( 3 ) ); +} + +/* + * void drawImage ( const QRect & rectangle, const QImage & image ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_7 ) +{ + hbqt_par_QPainter( 1 )->drawImage( *hbqt_par_QRect( 2 ), *hbqt_par_QImage( 3 ) ); +} + +/* + * void drawImage ( int x, int y, const QImage & image, int sx = 0, int sy = 0, int sw = -1, int sh = -1, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPAINTER_DRAWIMAGE_8 ) +{ + hbqt_par_QPainter( 1 )->drawImage( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QImage( 4 ), ( HB_ISNIL( 5 ) ? 0 : hb_parni( 5 ) ), ( HB_ISNIL( 6 ) ? 0 : hb_parni( 6 ) ), ( HB_ISNIL( 7 ) ? -1 : hb_parni( 7 ) ), ( HB_ISNIL( 8 ) ? -1 : hb_parni( 8 ) ), ( HB_ISNIL( 9 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 9 ) ) ); +} + +/* + * void drawLine ( const QLineF & line ) + */ +HB_FUNC( QT_QPAINTER_DRAWLINE ) +{ + hbqt_par_QPainter( 1 )->drawLine( *hbqt_par_QLineF( 2 ) ); +} + +/* + * void drawLine ( const QLine & line ) + */ +HB_FUNC( QT_QPAINTER_DRAWLINE_1 ) +{ + hbqt_par_QPainter( 1 )->drawLine( *hbqt_par_QLine( 2 ) ); } /* * void drawLine ( const QPoint & p1, const QPoint & p2 ) */ -HB_FUNC( QT_QPAINTER_DRAWLINE ) +HB_FUNC( QT_QPAINTER_DRAWLINE_2 ) { - hbqt_par_QPainter( 1 )->drawLine( hbqt_const_QPoint( 2 ), hbqt_const_QPoint( 3 ) ); + hbqt_par_QPainter( 1 )->drawLine( *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ); +} + +/* + * void drawLine ( const QPointF & p1, const QPointF & p2 ) + */ +HB_FUNC( QT_QPAINTER_DRAWLINE_3 ) +{ + hbqt_par_QPainter( 1 )->drawLine( *hbqt_par_QPointF( 2 ), *hbqt_par_QPointF( 3 ) ); } /* * void drawLine ( int x1, int y1, int x2, int y2 ) */ -HB_FUNC( QT_QPAINTER_DRAWLINE_1 ) +HB_FUNC( QT_QPAINTER_DRAWLINE_4 ) { hbqt_par_QPainter( 1 )->drawLine( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); } @@ -350,33 +486,177 @@ HB_FUNC( QT_QPAINTER_DRAWLINES_2 ) } /* - * void drawPie ( const QRect & rectangle, int startAngle, int spanAngle ) + * void drawLines ( const QPoint * pointPairs, int lineCount ) + */ +HB_FUNC( QT_QPAINTER_DRAWLINES_3 ) +{ + hbqt_par_QPainter( 1 )->drawLines( hbqt_par_QPoint( 2 ), hb_parni( 3 ) ); +} + +/* + * void drawPath ( const QPainterPath & path ) + */ +HB_FUNC( QT_QPAINTER_DRAWPATH ) +{ + hbqt_par_QPainter( 1 )->drawPath( *hbqt_par_QPainterPath( 2 ) ); +} + +/* + * void drawPicture ( const QPointF & point, const QPicture & picture ) + */ +HB_FUNC( QT_QPAINTER_DRAWPICTURE ) +{ + hbqt_par_QPainter( 1 )->drawPicture( *hbqt_par_QPointF( 2 ), *hbqt_par_QPicture( 3 ) ); +} + +/* + * void drawPicture ( const QPoint & point, const QPicture & picture ) + */ +HB_FUNC( QT_QPAINTER_DRAWPICTURE_1 ) +{ + hbqt_par_QPainter( 1 )->drawPicture( *hbqt_par_QPoint( 2 ), *hbqt_par_QPicture( 3 ) ); +} + +/* + * void drawPicture ( int x, int y, const QPicture & picture ) + */ +HB_FUNC( QT_QPAINTER_DRAWPICTURE_2 ) +{ + hbqt_par_QPainter( 1 )->drawPicture( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QPicture( 4 ) ); +} + +/* + * void drawPie ( const QRectF & rectangle, int startAngle, int spanAngle ) */ HB_FUNC( QT_QPAINTER_DRAWPIE ) { - hbqt_par_QPainter( 1 )->drawPie( hbqt_const_QRect( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); + hbqt_par_QPainter( 1 )->drawPie( *hbqt_par_QRectF( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); +} + +/* + * void drawPie ( const QRect & rectangle, int startAngle, int spanAngle ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIE_1 ) +{ + hbqt_par_QPainter( 1 )->drawPie( *hbqt_par_QRect( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); } /* * void drawPie ( int x, int y, int width, int height, int startAngle, int spanAngle ) */ -HB_FUNC( QT_QPAINTER_DRAWPIE_1 ) +HB_FUNC( QT_QPAINTER_DRAWPIE_2 ) { hbqt_par_QPainter( 1 )->drawPie( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hb_parni( 7 ) ); } /* - * void drawPoint ( const QPoint & position ) + * void drawPixmap ( const QRectF & target, const QPixmap & pixmap, const QRectF & source ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QRectF( 2 ), *hbqt_par_QPixmap( 3 ), *hbqt_par_QRectF( 4 ) ); +} + +/* + * void drawPixmap ( const QRect & target, const QPixmap & pixmap, const QRect & source ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_1 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QRect( 2 ), *hbqt_par_QPixmap( 3 ), *hbqt_par_QRect( 4 ) ); +} + +/* + * void drawPixmap ( const QPointF & point, const QPixmap & pixmap, const QRectF & source ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_2 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QPointF( 2 ), *hbqt_par_QPixmap( 3 ), *hbqt_par_QRectF( 4 ) ); +} + +/* + * void drawPixmap ( const QPoint & point, const QPixmap & pixmap, const QRect & source ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_3 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QPoint( 2 ), *hbqt_par_QPixmap( 3 ), *hbqt_par_QRect( 4 ) ); +} + +/* + * void drawPixmap ( const QPointF & point, const QPixmap & pixmap ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_4 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QPointF( 2 ), *hbqt_par_QPixmap( 3 ) ); +} + +/* + * void drawPixmap ( const QPoint & point, const QPixmap & pixmap ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_5 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QPoint( 2 ), *hbqt_par_QPixmap( 3 ) ); +} + +/* + * void drawPixmap ( int x, int y, const QPixmap & pixmap ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_6 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QPixmap( 4 ) ); +} + +/* + * void drawPixmap ( const QRect & rectangle, const QPixmap & pixmap ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_7 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( *hbqt_par_QRect( 2 ), *hbqt_par_QPixmap( 3 ) ); +} + +/* + * void drawPixmap ( int x, int y, int width, int height, const QPixmap & pixmap ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_8 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), *hbqt_par_QPixmap( 6 ) ); +} + +/* + * void drawPixmap ( int x, int y, int w, int h, const QPixmap & pixmap, int sx, int sy, int sw, int sh ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_9 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), *hbqt_par_QPixmap( 6 ), hb_parni( 7 ), hb_parni( 8 ), hb_parni( 9 ), hb_parni( 10 ) ); +} + +/* + * void drawPixmap ( int x, int y, const QPixmap & pixmap, int sx, int sy, int sw, int sh ) + */ +HB_FUNC( QT_QPAINTER_DRAWPIXMAP_10 ) +{ + hbqt_par_QPainter( 1 )->drawPixmap( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QPixmap( 4 ), hb_parni( 5 ), hb_parni( 6 ), hb_parni( 7 ), hb_parni( 8 ) ); +} + +/* + * void drawPoint ( const QPointF & position ) */ HB_FUNC( QT_QPAINTER_DRAWPOINT ) { - hbqt_par_QPainter( 1 )->drawPoint( hbqt_const_QPoint( 2 ) ); + hbqt_par_QPainter( 1 )->drawPoint( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void drawPoint ( const QPoint & position ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOINT_1 ) +{ + hbqt_par_QPainter( 1 )->drawPoint( *hbqt_par_QPoint( 2 ) ); } /* * void drawPoint ( int x, int y ) */ -HB_FUNC( QT_QPAINTER_DRAWPOINT_1 ) +HB_FUNC( QT_QPAINTER_DRAWPOINT_2 ) { hbqt_par_QPainter( 1 )->drawPoint( hb_parni( 2 ), hb_parni( 3 ) ); } @@ -389,12 +669,60 @@ HB_FUNC( QT_QPAINTER_DRAWPOINTS ) hbqt_par_QPainter( 1 )->drawPoints( hbqt_par_QPointF( 2 ), hb_parni( 3 ) ); } +/* + * void drawPoints ( const QPoint * points, int pointCount ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOINTS_1 ) +{ + hbqt_par_QPainter( 1 )->drawPoints( hbqt_par_QPoint( 2 ), hb_parni( 3 ) ); +} + +/* + * void drawPoints ( const QPolygonF & points ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOINTS_2 ) +{ + hbqt_par_QPainter( 1 )->drawPoints( *hbqt_par_QPolygonF( 2 ) ); +} + +/* + * void drawPoints ( const QPolygon & points ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOINTS_3 ) +{ + hbqt_par_QPainter( 1 )->drawPoints( *hbqt_par_QPolygon( 2 ) ); +} + /* * void drawPolygon ( const QPointF * points, int pointCount, Qt::FillRule fillRule = Qt::OddEvenFill ) */ HB_FUNC( QT_QPAINTER_DRAWPOLYGON ) { - hbqt_par_QPainter( 1 )->drawPolygon( hbqt_par_QPointF( 2 ), hb_parni( 3 ), ( Qt::FillRule ) hb_parni( 4 ) ); + hbqt_par_QPainter( 1 )->drawPolygon( hbqt_par_QPointF( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? ( Qt::FillRule ) Qt::OddEvenFill : ( Qt::FillRule ) hb_parni( 4 ) ) ); +} + +/* + * void drawPolygon ( const QPoint * points, int pointCount, Qt::FillRule fillRule = Qt::OddEvenFill ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOLYGON_1 ) +{ + hbqt_par_QPainter( 1 )->drawPolygon( hbqt_par_QPoint( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? ( Qt::FillRule ) Qt::OddEvenFill : ( Qt::FillRule ) hb_parni( 4 ) ) ); +} + +/* + * void drawPolygon ( const QPolygonF & points, Qt::FillRule fillRule = Qt::OddEvenFill ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOLYGON_2 ) +{ + hbqt_par_QPainter( 1 )->drawPolygon( *hbqt_par_QPolygonF( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::FillRule ) Qt::OddEvenFill : ( Qt::FillRule ) hb_parni( 3 ) ) ); +} + +/* + * void drawPolygon ( const QPolygon & points, Qt::FillRule fillRule = Qt::OddEvenFill ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOLYGON_3 ) +{ + hbqt_par_QPainter( 1 )->drawPolygon( *hbqt_par_QPolygon( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::FillRule ) Qt::OddEvenFill : ( Qt::FillRule ) hb_parni( 3 ) ) ); } /* @@ -406,17 +734,49 @@ HB_FUNC( QT_QPAINTER_DRAWPOLYLINE ) } /* - * void drawRect ( const QRect & rectangle ) + * void drawPolyline ( const QPoint * points, int pointCount ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOLYLINE_1 ) +{ + hbqt_par_QPainter( 1 )->drawPolyline( hbqt_par_QPoint( 2 ), hb_parni( 3 ) ); +} + +/* + * void drawPolyline ( const QPolygonF & points ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOLYLINE_2 ) +{ + hbqt_par_QPainter( 1 )->drawPolyline( *hbqt_par_QPolygonF( 2 ) ); +} + +/* + * void drawPolyline ( const QPolygon & points ) + */ +HB_FUNC( QT_QPAINTER_DRAWPOLYLINE_3 ) +{ + hbqt_par_QPainter( 1 )->drawPolyline( *hbqt_par_QPolygon( 2 ) ); +} + +/* + * void drawRect ( const QRectF & rectangle ) */ HB_FUNC( QT_QPAINTER_DRAWRECT ) { - hbqt_par_QPainter( 1 )->drawRect( hbqt_const_QRect( 2 ) ); + hbqt_par_QPainter( 1 )->drawRect( *hbqt_par_QRectF( 2 ) ); +} + +/* + * void drawRect ( const QRect & rectangle ) + */ +HB_FUNC( QT_QPAINTER_DRAWRECT_1 ) +{ + hbqt_par_QPainter( 1 )->drawRect( *hbqt_par_QRect( 2 ) ); } /* * void drawRect ( int x, int y, int width, int height ) */ -HB_FUNC( QT_QPAINTER_DRAWRECT_1 ) +HB_FUNC( QT_QPAINTER_DRAWRECT_2 ) { hbqt_par_QPainter( 1 )->drawRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); } @@ -430,65 +790,169 @@ HB_FUNC( QT_QPAINTER_DRAWRECTS ) } /* - * void drawRoundedRect ( const QRect & rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize ) + * void drawRects ( const QRect * rectangles, int rectCount ) + */ +HB_FUNC( QT_QPAINTER_DRAWRECTS_1 ) +{ + hbqt_par_QPainter( 1 )->drawRects( hbqt_par_QRect( 2 ), hb_parni( 3 ) ); +} + +/* + * void drawRoundedRect ( const QRectF & rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize ) */ HB_FUNC( QT_QPAINTER_DRAWROUNDEDRECT ) { - hbqt_par_QPainter( 1 )->drawRoundedRect( hbqt_const_QRect( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( Qt::SizeMode ) hb_parni( 5 ) ); + hbqt_par_QPainter( 1 )->drawRoundedRect( *hbqt_par_QRectF( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::SizeMode ) Qt::AbsoluteSize : ( Qt::SizeMode ) hb_parni( 5 ) ) ); +} + +/* + * void drawRoundedRect ( const QRect & rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize ) + */ +HB_FUNC( QT_QPAINTER_DRAWROUNDEDRECT_1 ) +{ + hbqt_par_QPainter( 1 )->drawRoundedRect( *hbqt_par_QRect( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), ( HB_ISNIL( 5 ) ? ( Qt::SizeMode ) Qt::AbsoluteSize : ( Qt::SizeMode ) hb_parni( 5 ) ) ); } /* * void drawRoundedRect ( int x, int y, int w, int h, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize ) */ -HB_FUNC( QT_QPAINTER_DRAWROUNDEDRECT_1 ) +HB_FUNC( QT_QPAINTER_DRAWROUNDEDRECT_2 ) { - hbqt_par_QPainter( 1 )->drawRoundedRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parnd( 6 ), hb_parnd( 7 ), ( Qt::SizeMode ) hb_parni( 8 ) ); + hbqt_par_QPainter( 1 )->drawRoundedRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parnd( 6 ), hb_parnd( 7 ), ( HB_ISNIL( 8 ) ? ( Qt::SizeMode ) Qt::AbsoluteSize : ( Qt::SizeMode ) hb_parni( 8 ) ) ); +} + +/* + * void drawText ( const QPointF & position, const QString & text ) + */ +HB_FUNC( QT_QPAINTER_DRAWTEXT ) +{ + hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QPointF( 2 ), hbqt_par_QString( 3 ) ); } /* * void drawText ( const QPoint & position, const QString & text ) */ -HB_FUNC( QT_QPAINTER_DRAWTEXT ) +HB_FUNC( QT_QPAINTER_DRAWTEXT_1 ) { - hbqt_par_QPainter( 1 )->drawText( hbqt_const_QPoint( 2 ), hbqt_par_QString( 3 ) ); + hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QPoint( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * void drawText ( const QRectF & rectangle, int flags, const QString & text, QRectF * boundingRect = 0 ) + */ +HB_FUNC( QT_QPAINTER_DRAWTEXT_2 ) +{ + hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QRectF( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ), hbqt_par_QRectF( 5 ) ); +} + +/* + * void drawText ( const QRect & rectangle, int flags, const QString & text, QRect * boundingRect = 0 ) + */ +HB_FUNC( QT_QPAINTER_DRAWTEXT_3 ) +{ + hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QRect( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ), hbqt_par_QRect( 5 ) ); } /* * void drawText ( int x, int y, const QString & text ) */ -HB_FUNC( QT_QPAINTER_DRAWTEXT_1 ) +HB_FUNC( QT_QPAINTER_DRAWTEXT_4 ) { hbqt_par_QPainter( 1 )->drawText( hb_parni( 2 ), hb_parni( 3 ), hbqt_par_QString( 4 ) ); } +/* + * void drawText ( int x, int y, int width, int height, int flags, const QString & text, QRect * boundingRect = 0 ) + */ +HB_FUNC( QT_QPAINTER_DRAWTEXT_5 ) +{ + hbqt_par_QPainter( 1 )->drawText( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hbqt_par_QString( 7 ), hbqt_par_QRect( 8 ) ); +} + +/* + * void drawText ( const QRectF & rectangle, const QString & text, const QTextOption & option = QTextOption() ) + */ +HB_FUNC( QT_QPAINTER_DRAWTEXT_6 ) +{ + hbqt_par_QPainter( 1 )->drawText( *hbqt_par_QRectF( 2 ), hbqt_par_QString( 3 ), *hbqt_par_QTextOption( 4 ) ); +} + +/* + * void drawTiledPixmap ( const QRectF & rectangle, const QPixmap & pixmap, const QPointF & position = QPointF() ) + */ +HB_FUNC( QT_QPAINTER_DRAWTILEDPIXMAP ) +{ + hbqt_par_QPainter( 1 )->drawTiledPixmap( *hbqt_par_QRectF( 2 ), *hbqt_par_QPixmap( 3 ), *hbqt_par_QPointF( 4 ) ); +} + +/* + * void drawTiledPixmap ( const QRect & rectangle, const QPixmap & pixmap, const QPoint & position = QPoint() ) + */ +HB_FUNC( QT_QPAINTER_DRAWTILEDPIXMAP_1 ) +{ + hbqt_par_QPainter( 1 )->drawTiledPixmap( *hbqt_par_QRect( 2 ), *hbqt_par_QPixmap( 3 ), *hbqt_par_QPoint( 4 ) ); +} + +/* + * void drawTiledPixmap ( int x, int y, int width, int height, const QPixmap & pixmap, int sx = 0, int sy = 0 ) + */ +HB_FUNC( QT_QPAINTER_DRAWTILEDPIXMAP_2 ) +{ + hbqt_par_QPainter( 1 )->drawTiledPixmap( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), *hbqt_par_QPixmap( 6 ), ( HB_ISNIL( 7 ) ? 0 : hb_parni( 7 ) ), ( HB_ISNIL( 8 ) ? 0 : hb_parni( 8 ) ) ); +} + /* * bool end () */ HB_FUNC( QT_QPAINTER_END ) { - hb_retl( hbqt_par_QPainter( 1 )->end( ) ); + hb_retl( hbqt_par_QPainter( 1 )->end() ); +} + +/* + * void eraseRect ( const QRectF & rectangle ) + */ +HB_FUNC( QT_QPAINTER_ERASERECT ) +{ + hbqt_par_QPainter( 1 )->eraseRect( *hbqt_par_QRectF( 2 ) ); } /* * void eraseRect ( const QRect & rectangle ) */ -HB_FUNC( QT_QPAINTER_ERASERECT ) +HB_FUNC( QT_QPAINTER_ERASERECT_1 ) { - hbqt_par_QPainter( 1 )->eraseRect( hbqt_const_QRect( 2 ) ); + hbqt_par_QPainter( 1 )->eraseRect( *hbqt_par_QRect( 2 ) ); } /* * void eraseRect ( int x, int y, int width, int height ) */ -HB_FUNC( QT_QPAINTER_ERASERECT_1 ) +HB_FUNC( QT_QPAINTER_ERASERECT_2 ) { hbqt_par_QPainter( 1 )->eraseRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); } /* - * void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) + * void fillPath ( const QPainterPath & path, const QBrush & brush ) + */ +HB_FUNC( QT_QPAINTER_FILLPATH ) +{ + hbqt_par_QPainter( 1 )->fillPath( *hbqt_par_QPainterPath( 2 ), *hbqt_par_QBrush( 3 ) ); +} + +/* + * void fillRect ( const QRectF & rectangle, const QBrush & brush ) */ HB_FUNC( QT_QPAINTER_FILLRECT ) +{ + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRectF( 2 ), *hbqt_par_QBrush( 3 ) ); +} + +/* + * void fillRect ( int x, int y, int width, int height, Qt::BrushStyle style ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_1 ) { hbqt_par_QPainter( 1 )->fillRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), ( Qt::BrushStyle ) hb_parni( 6 ) ); } @@ -496,15 +960,63 @@ HB_FUNC( QT_QPAINTER_FILLRECT ) /* * void fillRect ( const QRect & rectangle, Qt::BrushStyle style ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_1 ) +HB_FUNC( QT_QPAINTER_FILLRECT_2 ) { - hbqt_par_QPainter( 1 )->fillRect( hbqt_const_QRect( 2 ), ( Qt::BrushStyle ) hb_parni( 3 ) ); + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRect( 2 ), ( Qt::BrushStyle ) hb_parni( 3 ) ); +} + +/* + * void fillRect ( const QRectF & rectangle, Qt::BrushStyle style ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_3 ) +{ + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRectF( 2 ), ( Qt::BrushStyle ) hb_parni( 3 ) ); +} + +/* + * void fillRect ( const QRect & rectangle, const QBrush & brush ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_4 ) +{ + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRect( 2 ), *hbqt_par_QBrush( 3 ) ); +} + +/* + * void fillRect ( const QRect & rectangle, const QColor & color ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_5 ) +{ + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRect( 2 ), *hbqt_par_QColor( 3 ) ); +} + +/* + * void fillRect ( const QRectF & rectangle, const QColor & color ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_6 ) +{ + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRectF( 2 ), *hbqt_par_QColor( 3 ) ); +} + +/* + * void fillRect ( int x, int y, int width, int height, const QBrush & brush ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_7 ) +{ + hbqt_par_QPainter( 1 )->fillRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), *hbqt_par_QBrush( 6 ) ); +} + +/* + * void fillRect ( int x, int y, int width, int height, const QColor & color ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_8 ) +{ + hbqt_par_QPainter( 1 )->fillRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), *hbqt_par_QColor( 6 ) ); } /* * void fillRect ( int x, int y, int width, int height, Qt::GlobalColor color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_2 ) +HB_FUNC( QT_QPAINTER_FILLRECT_9 ) { hbqt_par_QPainter( 1 )->fillRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), ( Qt::GlobalColor ) hb_parni( 6 ) ); } @@ -512,9 +1024,41 @@ HB_FUNC( QT_QPAINTER_FILLRECT_2 ) /* * void fillRect ( const QRect & rectangle, Qt::GlobalColor color ) */ -HB_FUNC( QT_QPAINTER_FILLRECT_3 ) +HB_FUNC( QT_QPAINTER_FILLRECT_10 ) { - hbqt_par_QPainter( 1 )->fillRect( hbqt_const_QRect( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRect( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); +} + +/* + * void fillRect ( const QRectF & rectangle, Qt::GlobalColor color ) + */ +HB_FUNC( QT_QPAINTER_FILLRECT_11 ) +{ + hbqt_par_QPainter( 1 )->fillRect( *hbqt_par_QRectF( 2 ), ( Qt::GlobalColor ) hb_parni( 3 ) ); +} + +/* + * const QFont & font () const + */ +HB_FUNC( QT_QPAINTER_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QPainter( 1 )->font() ) ); +} + +/* + * QFontInfo fontInfo () const + */ +HB_FUNC( QT_QPAINTER_FONTINFO ) +{ + hb_retptr( new QFontInfo( hbqt_par_QPainter( 1 )->fontInfo() ) ); +} + +/* + * QFontMetrics fontMetrics () const + */ +HB_FUNC( QT_QPAINTER_FONTMETRICS ) +{ + hb_retptr( new QFontMetrics( hbqt_par_QPainter( 1 )->fontMetrics() ) ); } /* @@ -522,7 +1066,7 @@ HB_FUNC( QT_QPAINTER_FILLRECT_3 ) */ HB_FUNC( QT_QPAINTER_HASCLIPPING ) { - hb_retl( hbqt_par_QPainter( 1 )->hasClipping( ) ); + hb_retl( hbqt_par_QPainter( 1 )->hasClipping() ); } /* @@ -538,7 +1082,7 @@ HB_FUNC( QT_QPAINTER_INITFROM ) */ HB_FUNC( QT_QPAINTER_ISACTIVE ) { - hb_retl( hbqt_par_QPainter( 1 )->isActive( ) ); + hb_retl( hbqt_par_QPainter( 1 )->isActive() ); } /* @@ -546,7 +1090,7 @@ HB_FUNC( QT_QPAINTER_ISACTIVE ) */ HB_FUNC( QT_QPAINTER_LAYOUTDIRECTION ) { - hb_retni( hbqt_par_QPainter( 1 )->layoutDirection( ) ); + hb_retni( ( Qt::LayoutDirection ) hbqt_par_QPainter( 1 )->layoutDirection() ); } /* @@ -554,7 +1098,7 @@ HB_FUNC( QT_QPAINTER_LAYOUTDIRECTION ) */ HB_FUNC( QT_QPAINTER_OPACITY ) { - hb_retnd( hbqt_par_QPainter( 1 )->opacity( ) ); + hb_retnd( hbqt_par_QPainter( 1 )->opacity() ); } /* @@ -562,7 +1106,23 @@ HB_FUNC( QT_QPAINTER_OPACITY ) */ HB_FUNC( QT_QPAINTER_PAINTENGINE ) { - hb_retptr( ( QPaintEngine* ) hbqt_par_QPainter( 1 )->paintEngine( ) ); + hb_retptr( ( QPaintEngine* ) hbqt_par_QPainter( 1 )->paintEngine() ); +} + +/* + * const QPen & pen () const + */ +HB_FUNC( QT_QPAINTER_PEN ) +{ + hb_retptr( new QPen( hbqt_par_QPainter( 1 )->pen() ) ); +} + +/* + * RenderHints renderHints () const + */ +HB_FUNC( QT_QPAINTER_RENDERHINTS ) +{ + hb_retni( ( QPainter::RenderHints ) hbqt_par_QPainter( 1 )->renderHints() ); } /* @@ -570,7 +1130,7 @@ HB_FUNC( QT_QPAINTER_PAINTENGINE ) */ HB_FUNC( QT_QPAINTER_RESETMATRIX ) { - hbqt_par_QPainter( 1 )->resetMatrix( ); + hbqt_par_QPainter( 1 )->resetMatrix(); } /* @@ -578,7 +1138,7 @@ HB_FUNC( QT_QPAINTER_RESETMATRIX ) */ HB_FUNC( QT_QPAINTER_RESETTRANSFORM ) { - hbqt_par_QPainter( 1 )->resetTransform( ); + hbqt_par_QPainter( 1 )->resetTransform(); } /* @@ -586,7 +1146,7 @@ HB_FUNC( QT_QPAINTER_RESETTRANSFORM ) */ HB_FUNC( QT_QPAINTER_RESTORE ) { - hbqt_par_QPainter( 1 )->restore( ); + hbqt_par_QPainter( 1 )->restore(); } /* @@ -602,7 +1162,7 @@ HB_FUNC( QT_QPAINTER_ROTATE ) */ HB_FUNC( QT_QPAINTER_SAVE ) { - hbqt_par_QPainter( 1 )->save( ); + hbqt_par_QPainter( 1 )->save(); } /* @@ -613,6 +1173,14 @@ HB_FUNC( QT_QPAINTER_SCALE ) hbqt_par_QPainter( 1 )->scale( hb_parnd( 2 ), hb_parnd( 3 ) ); } +/* + * void setBackground ( const QBrush & brush ) + */ +HB_FUNC( QT_QPAINTER_SETBACKGROUND ) +{ + hbqt_par_QPainter( 1 )->setBackground( *hbqt_par_QBrush( 2 ) ); +} + /* * void setBackgroundMode ( Qt::BGMode mode ) */ @@ -622,43 +1190,83 @@ HB_FUNC( QT_QPAINTER_SETBACKGROUNDMODE ) } /* - * void setBrush ( Qt::BrushStyle style ) + * void setBrush ( const QBrush & brush ) */ HB_FUNC( QT_QPAINTER_SETBRUSH ) +{ + hbqt_par_QPainter( 1 )->setBrush( *hbqt_par_QBrush( 2 ) ); +} + +/* + * void setBrush ( Qt::BrushStyle style ) + */ +HB_FUNC( QT_QPAINTER_SETBRUSH_1 ) { hbqt_par_QPainter( 1 )->setBrush( ( Qt::BrushStyle ) hb_parni( 2 ) ); } /* - * void setBrushOrigin ( const QPoint & position ) + * void setBrushOrigin ( const QPointF & position ) */ HB_FUNC( QT_QPAINTER_SETBRUSHORIGIN ) { - hbqt_par_QPainter( 1 )->setBrushOrigin( hbqt_const_QPoint( 2 ) ); + hbqt_par_QPainter( 1 )->setBrushOrigin( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setBrushOrigin ( const QPoint & position ) + */ +HB_FUNC( QT_QPAINTER_SETBRUSHORIGIN_1 ) +{ + hbqt_par_QPainter( 1 )->setBrushOrigin( *hbqt_par_QPoint( 2 ) ); } /* * void setBrushOrigin ( int x, int y ) */ -HB_FUNC( QT_QPAINTER_SETBRUSHORIGIN_1 ) +HB_FUNC( QT_QPAINTER_SETBRUSHORIGIN_2 ) { hbqt_par_QPainter( 1 )->setBrushOrigin( hb_parni( 2 ), hb_parni( 3 ) ); } /* - * void setClipRect ( int x, int y, int width, int height, Qt::ClipOperation operation = Qt::ReplaceClip ) + * void setClipPath ( const QPainterPath & path, Qt::ClipOperation operation = Qt::ReplaceClip ) + */ +HB_FUNC( QT_QPAINTER_SETCLIPPATH ) +{ + hbqt_par_QPainter( 1 )->setClipPath( *hbqt_par_QPainterPath( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::ClipOperation ) Qt::ReplaceClip : ( Qt::ClipOperation ) hb_parni( 3 ) ) ); +} + +/* + * void setClipRect ( const QRectF & rectangle, Qt::ClipOperation operation = Qt::ReplaceClip ) */ HB_FUNC( QT_QPAINTER_SETCLIPRECT ) { - hbqt_par_QPainter( 1 )->setClipRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), ( Qt::ClipOperation ) hb_parni( 6 ) ); + hbqt_par_QPainter( 1 )->setClipRect( *hbqt_par_QRectF( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::ClipOperation ) Qt::ReplaceClip : ( Qt::ClipOperation ) hb_parni( 3 ) ) ); +} + +/* + * void setClipRect ( int x, int y, int width, int height, Qt::ClipOperation operation = Qt::ReplaceClip ) + */ +HB_FUNC( QT_QPAINTER_SETCLIPRECT_1 ) +{ + hbqt_par_QPainter( 1 )->setClipRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), ( HB_ISNIL( 6 ) ? ( Qt::ClipOperation ) Qt::ReplaceClip : ( Qt::ClipOperation ) hb_parni( 6 ) ) ); } /* * void setClipRect ( const QRect & rectangle, Qt::ClipOperation operation = Qt::ReplaceClip ) */ -HB_FUNC( QT_QPAINTER_SETCLIPRECT_1 ) +HB_FUNC( QT_QPAINTER_SETCLIPRECT_2 ) { - hbqt_par_QPainter( 1 )->setClipRect( hbqt_const_QRect( 2 ), ( Qt::ClipOperation ) hb_parni( 3 ) ); + hbqt_par_QPainter( 1 )->setClipRect( *hbqt_par_QRect( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::ClipOperation ) Qt::ReplaceClip : ( Qt::ClipOperation ) hb_parni( 3 ) ) ); +} + +/* + * void setClipRegion ( const QRegion & region, Qt::ClipOperation operation = Qt::ReplaceClip ) + */ +HB_FUNC( QT_QPAINTER_SETCLIPREGION ) +{ + hbqt_par_QPainter( 1 )->setClipRegion( *hbqt_par_QRegion( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::ClipOperation ) Qt::ReplaceClip : ( Qt::ClipOperation ) hb_parni( 3 ) ) ); } /* @@ -677,6 +1285,14 @@ HB_FUNC( QT_QPAINTER_SETCOMPOSITIONMODE ) hbqt_par_QPainter( 1 )->setCompositionMode( ( QPainter::CompositionMode ) hb_parni( 2 ) ); } +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QPAINTER_SETFONT ) +{ + hbqt_par_QPainter( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + /* * void setLayoutDirection ( Qt::LayoutDirection direction ) */ @@ -694,9 +1310,25 @@ HB_FUNC( QT_QPAINTER_SETOPACITY ) } /* - * void setPen ( Qt::PenStyle style ) + * void setPen ( const QPen & pen ) */ HB_FUNC( QT_QPAINTER_SETPEN ) +{ + hbqt_par_QPainter( 1 )->setPen( *hbqt_par_QPen( 2 ) ); +} + +/* + * void setPen ( const QColor & color ) + */ +HB_FUNC( QT_QPAINTER_SETPEN_1 ) +{ + hbqt_par_QPainter( 1 )->setPen( *hbqt_par_QColor( 2 ) ); +} + +/* + * void setPen ( Qt::PenStyle style ) + */ +HB_FUNC( QT_QPAINTER_SETPEN_2 ) { hbqt_par_QPainter( 1 )->setPen( ( Qt::PenStyle ) hb_parni( 2 ) ); } @@ -709,6 +1341,22 @@ HB_FUNC( QT_QPAINTER_SETRENDERHINT ) hbqt_par_QPainter( 1 )->setRenderHint( ( QPainter::RenderHint ) hb_parni( 2 ), hb_parl( 3 ) ); } +/* + * void setRenderHints ( RenderHints hints, bool on = true ) + */ +HB_FUNC( QT_QPAINTER_SETRENDERHINTS ) +{ + hbqt_par_QPainter( 1 )->setRenderHints( ( QPainter::RenderHints ) hb_parni( 2 ), hb_parl( 3 ) ); +} + +/* + * void setTransform ( const QTransform & transform, bool combine = false ) + */ +HB_FUNC( QT_QPAINTER_SETTRANSFORM ) +{ + hbqt_par_QPainter( 1 )->setTransform( *hbqt_par_QTransform( 2 ), hb_parl( 3 ) ); +} + /* * void setViewTransformEnabled ( bool enable ) */ @@ -722,7 +1370,7 @@ HB_FUNC( QT_QPAINTER_SETVIEWTRANSFORMENABLED ) */ HB_FUNC( QT_QPAINTER_SETVIEWPORT ) { - hbqt_par_QPainter( 1 )->setViewport( hbqt_const_QRect( 2 ) ); + hbqt_par_QPainter( 1 )->setViewport( *hbqt_par_QRect( 2 ) ); } /* @@ -738,7 +1386,7 @@ HB_FUNC( QT_QPAINTER_SETVIEWPORT_1 ) */ HB_FUNC( QT_QPAINTER_SETWINDOW ) { - hbqt_par_QPainter( 1 )->setWindow( hbqt_const_QRect( 2 ) ); + hbqt_par_QPainter( 1 )->setWindow( *hbqt_par_QRect( 2 ) ); } /* @@ -749,6 +1397,14 @@ HB_FUNC( QT_QPAINTER_SETWINDOW_1 ) hbqt_par_QPainter( 1 )->setWindow( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); } +/* + * void setWorldMatrix ( const QMatrix & matrix, bool combine = false ) + */ +HB_FUNC( QT_QPAINTER_SETWORLDMATRIX ) +{ + hbqt_par_QPainter( 1 )->setWorldMatrix( *hbqt_par_QMatrix( 2 ), hb_parl( 3 ) ); +} + /* * void setWorldMatrixEnabled ( bool enable ) */ @@ -757,6 +1413,14 @@ HB_FUNC( QT_QPAINTER_SETWORLDMATRIXENABLED ) hbqt_par_QPainter( 1 )->setWorldMatrixEnabled( hb_parl( 2 ) ); } +/* + * void setWorldTransform ( const QTransform & matrix, bool combine = false ) + */ +HB_FUNC( QT_QPAINTER_SETWORLDTRANSFORM ) +{ + hbqt_par_QPainter( 1 )->setWorldTransform( *hbqt_par_QTransform( 2 ), hb_parl( 3 ) ); +} + /* * void shear ( qreal sh, qreal sv ) */ @@ -765,6 +1429,14 @@ HB_FUNC( QT_QPAINTER_SHEAR ) hbqt_par_QPainter( 1 )->shear( hb_parnd( 2 ), hb_parnd( 3 ) ); } +/* + * void strokePath ( const QPainterPath & path, const QPen & pen ) + */ +HB_FUNC( QT_QPAINTER_STROKEPATH ) +{ + hbqt_par_QPainter( 1 )->strokePath( *hbqt_par_QPainterPath( 2 ), *hbqt_par_QPen( 3 ) ); +} + /* * bool testRenderHint ( RenderHint hint ) const */ @@ -774,17 +1446,33 @@ HB_FUNC( QT_QPAINTER_TESTRENDERHINT ) } /* - * void translate ( const QPoint & offset ) + * const QTransform & transform () const + */ +HB_FUNC( QT_QPAINTER_TRANSFORM ) +{ + hb_retptr( new QTransform( hbqt_par_QPainter( 1 )->transform() ) ); +} + +/* + * void translate ( const QPointF & offset ) */ HB_FUNC( QT_QPAINTER_TRANSLATE ) { - hbqt_par_QPainter( 1 )->translate( hbqt_const_QPoint( 2 ) ); + hbqt_par_QPainter( 1 )->translate( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void translate ( const QPoint & offset ) + */ +HB_FUNC( QT_QPAINTER_TRANSLATE_1 ) +{ + hbqt_par_QPainter( 1 )->translate( *hbqt_par_QPoint( 2 ) ); } /* * void translate ( qreal dx, qreal dy ) */ -HB_FUNC( QT_QPAINTER_TRANSLATE_1 ) +HB_FUNC( QT_QPAINTER_TRANSLATE_2 ) { hbqt_par_QPainter( 1 )->translate( hb_parnd( 2 ), hb_parnd( 3 ) ); } @@ -794,7 +1482,7 @@ HB_FUNC( QT_QPAINTER_TRANSLATE_1 ) */ HB_FUNC( QT_QPAINTER_VIEWTRANSFORMENABLED ) { - hb_retl( hbqt_par_QPainter( 1 )->viewTransformEnabled( ) ); + hb_retl( hbqt_par_QPainter( 1 )->viewTransformEnabled() ); } /* @@ -802,7 +1490,7 @@ HB_FUNC( QT_QPAINTER_VIEWTRANSFORMENABLED ) */ HB_FUNC( QT_QPAINTER_VIEWPORT ) { - hbqt_ret_QRect( hbqt_par_QPainter( 1 )->viewport( ) ); + hb_retptr( new QRect( hbqt_par_QPainter( 1 )->viewport() ) ); } /* @@ -810,7 +1498,15 @@ HB_FUNC( QT_QPAINTER_VIEWPORT ) */ HB_FUNC( QT_QPAINTER_WINDOW ) { - hbqt_ret_QRect( hbqt_par_QPainter( 1 )->window( ) ); + hb_retptr( new QRect( hbqt_par_QPainter( 1 )->window() ) ); +} + +/* + * const QMatrix & worldMatrix () const + */ +HB_FUNC( QT_QPAINTER_WORLDMATRIX ) +{ + hb_retptr( new QMatrix( hbqt_par_QPainter( 1 )->worldMatrix() ) ); } /* @@ -818,7 +1514,15 @@ HB_FUNC( QT_QPAINTER_WINDOW ) */ HB_FUNC( QT_QPAINTER_WORLDMATRIXENABLED ) { - hb_retl( hbqt_par_QPainter( 1 )->worldMatrixEnabled( ) ); + hb_retl( hbqt_par_QPainter( 1 )->worldMatrixEnabled() ); +} + +/* + * const QTransform & worldTransform () const + */ +HB_FUNC( QT_QPAINTER_WORLDTRANSFORM ) +{ + hb_retptr( new QTransform( hbqt_par_QPainter( 1 )->worldTransform() ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qpaintevent.cpp b/harbour/contrib/hbqt/hbqt_qpaintevent.cpp new file mode 100644 index 0000000000..3936d8221d --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qpaintevent.cpp @@ -0,0 +1,95 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QPaintEvent ( const QRegion & paintRegion ) + * QPaintEvent ( const QRect & paintRect ) + */ +HB_FUNC( QT_QPAINTEVENT ) +{ + hb_retptr( ( QPaintEvent* ) new QPaintEvent( *hbqt_par_QRect( 1 ) ) ); +} + +/* + * const QRect & rect () const + */ +HB_FUNC( QT_QPAINTEVENT_RECT ) +{ + hb_retptr( new QRect( hbqt_par_QPaintEvent( 1 )->rect() ) ); +} + +/* + * const QRegion & region () const + */ +HB_FUNC( QT_QPAINTEVENT_REGION ) +{ + hb_retptr( new QRegion( hbqt_par_QPaintEvent( 1 )->region() ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qpen.cpp b/harbour/contrib/hbqt/hbqt_qpen.cpp index e621ab1623..ed44744834 100644 --- a/harbour/contrib/hbqt/hbqt_qpen.cpp +++ b/harbour/contrib/hbqt/hbqt_qpen.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,20 +59,15 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 17/23 [ 73.91% ] ] - * + * Constructed[ 21/23 [ 91.30% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * QBrush brush () const - * QColor color () const + * * QVector dashPattern () const - * void setBrush ( const QBrush & brush ) - * void setColor ( const QColor & color ) * void setDashPattern ( const QVector & pattern ) - */ + */ #include @@ -98,12 +93,28 @@ HB_FUNC( QT_QPEN ) } } +/* + * QBrush brush () const + */ +HB_FUNC( QT_QPEN_BRUSH ) +{ + hb_retptr( new QBrush( hbqt_par_QPen( 1 )->brush() ) ); +} + /* * Qt::PenCapStyle capStyle () const */ HB_FUNC( QT_QPEN_CAPSTYLE ) { - hb_retni( hbqt_par_QPen( 1 )->capStyle( ) ); + hb_retni( ( Qt::PenCapStyle ) hbqt_par_QPen( 1 )->capStyle() ); +} + +/* + * QColor color () const + */ +HB_FUNC( QT_QPEN_COLOR ) +{ + hb_retptr( new QColor( hbqt_par_QPen( 1 )->color() ) ); } /* @@ -111,7 +122,7 @@ HB_FUNC( QT_QPEN_CAPSTYLE ) */ HB_FUNC( QT_QPEN_DASHOFFSET ) { - hb_retnd( hbqt_par_QPen( 1 )->dashOffset( ) ); + hb_retnd( hbqt_par_QPen( 1 )->dashOffset() ); } /* @@ -119,7 +130,7 @@ HB_FUNC( QT_QPEN_DASHOFFSET ) */ HB_FUNC( QT_QPEN_ISCOSMETIC ) { - hb_retl( hbqt_par_QPen( 1 )->isCosmetic( ) ); + hb_retl( hbqt_par_QPen( 1 )->isCosmetic() ); } /* @@ -127,7 +138,7 @@ HB_FUNC( QT_QPEN_ISCOSMETIC ) */ HB_FUNC( QT_QPEN_ISSOLID ) { - hb_retl( hbqt_par_QPen( 1 )->isSolid( ) ); + hb_retl( hbqt_par_QPen( 1 )->isSolid() ); } /* @@ -135,7 +146,7 @@ HB_FUNC( QT_QPEN_ISSOLID ) */ HB_FUNC( QT_QPEN_JOINSTYLE ) { - hb_retni( hbqt_par_QPen( 1 )->joinStyle( ) ); + hb_retni( ( Qt::PenJoinStyle ) hbqt_par_QPen( 1 )->joinStyle() ); } /* @@ -143,7 +154,15 @@ HB_FUNC( QT_QPEN_JOINSTYLE ) */ HB_FUNC( QT_QPEN_MITERLIMIT ) { - hb_retnd( hbqt_par_QPen( 1 )->miterLimit( ) ); + hb_retnd( hbqt_par_QPen( 1 )->miterLimit() ); +} + +/* + * void setBrush ( const QBrush & brush ) + */ +HB_FUNC( QT_QPEN_SETBRUSH ) +{ + hbqt_par_QPen( 1 )->setBrush( *hbqt_par_QBrush( 2 ) ); } /* @@ -154,6 +173,14 @@ HB_FUNC( QT_QPEN_SETCAPSTYLE ) hbqt_par_QPen( 1 )->setCapStyle( ( Qt::PenCapStyle ) hb_parni( 2 ) ); } +/* + * void setColor ( const QColor & color ) + */ +HB_FUNC( QT_QPEN_SETCOLOR ) +{ + hbqt_par_QPen( 1 )->setColor( *hbqt_par_QColor( 2 ) ); +} + /* * void setCosmetic ( bool cosmetic ) */ @@ -215,7 +242,7 @@ HB_FUNC( QT_QPEN_SETWIDTHF ) */ HB_FUNC( QT_QPEN_STYLE ) { - hb_retni( hbqt_par_QPen( 1 )->style( ) ); + hb_retni( ( Qt::PenStyle ) hbqt_par_QPen( 1 )->style() ); } /* @@ -223,7 +250,7 @@ HB_FUNC( QT_QPEN_STYLE ) */ HB_FUNC( QT_QPEN_WIDTH ) { - hb_retni( hbqt_par_QPen( 1 )->width( ) ); + hb_retni( hbqt_par_QPen( 1 )->width() ); } /* @@ -231,7 +258,7 @@ HB_FUNC( QT_QPEN_WIDTH ) */ HB_FUNC( QT_QPEN_WIDTHF ) { - hb_retnd( hbqt_par_QPen( 1 )->widthF( ) ); + hb_retnd( hbqt_par_QPen( 1 )->widthF() ); } diff --git a/harbour/contrib/hbqt/hbqt_qpixmap.cpp b/harbour/contrib/hbqt/hbqt_qpixmap.cpp new file mode 100644 index 0000000000..84358effe6 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qpixmap.cpp @@ -0,0 +1,364 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include +#include + +/* + * QPixmap () + * QPixmap ( int width, int height ) + * QPixmap ( const QString & fileName, const char * format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor ) + * QPixmap ( const char * const[] xpm ) + * QPixmap ( const QPixmap & pixmap ) + * QPixmap ( const QSize & size ) + * ~QPixmap () + */ +HB_FUNC( QT_QPIXMAP ) +{ + hb_retptr( ( QPixmap* ) new QPixmap() ); +} + +/* + * QPixmap alphaChannel () const + */ +HB_FUNC( QT_QPIXMAP_ALPHACHANNEL ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->alphaChannel() ) ); +} + +/* + * qint64 cacheKey () const + */ +HB_FUNC( QT_QPIXMAP_CACHEKEY ) +{ + hb_retni( hbqt_par_QPixmap( 1 )->cacheKey() ); +} + +/* + * QPixmap copy ( const QRect & rectangle = QRect() ) const + */ +HB_FUNC( QT_QPIXMAP_COPY ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->copy( *hbqt_par_QRect( 2 ) ) ) ); +} + +/* + * QPixmap copy ( int x, int y, int width, int height ) const + */ +HB_FUNC( QT_QPIXMAP_COPY_1 ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->copy( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ) ) ); +} + +/* + * QBitmap createHeuristicMask ( bool clipTight = true ) const + */ +HB_FUNC( QT_QPIXMAP_CREATEHEURISTICMASK ) +{ + hb_retptr( new QBitmap( hbqt_par_QPixmap( 1 )->createHeuristicMask( hb_parl( 2 ) ) ) ); +} + +/* + * QBitmap createMaskFromColor ( const QColor & maskColor, Qt::MaskMode mode ) const + */ +HB_FUNC( QT_QPIXMAP_CREATEMASKFROMCOLOR ) +{ + hb_retptr( new QBitmap( hbqt_par_QPixmap( 1 )->createMaskFromColor( *hbqt_par_QColor( 2 ), ( Qt::MaskMode ) hb_parni( 3 ) ) ) ); +} + +/* + * QBitmap createMaskFromColor ( const QColor & maskColor ) const + */ +HB_FUNC( QT_QPIXMAP_CREATEMASKFROMCOLOR_1 ) +{ + hb_retptr( new QBitmap( hbqt_par_QPixmap( 1 )->createMaskFromColor( *hbqt_par_QColor( 2 ) ) ) ); +} + +/* + * int depth () const + */ +HB_FUNC( QT_QPIXMAP_DEPTH ) +{ + hb_retni( hbqt_par_QPixmap( 1 )->depth() ); +} + +/* + * void detach () + */ +HB_FUNC( QT_QPIXMAP_DETACH ) +{ + hbqt_par_QPixmap( 1 )->detach(); +} + +/* + * void fill ( const QColor & color = Qt::white ) + */ +HB_FUNC( QT_QPIXMAP_FILL ) +{ + hbqt_par_QPixmap( 1 )->fill( *hbqt_par_QColor( 2 ) ); +} + +/* + * void fill ( const QWidget * widget, const QPoint & offset ) + */ +HB_FUNC( QT_QPIXMAP_FILL_1 ) +{ + hbqt_par_QPixmap( 1 )->fill( hbqt_par_QWidget( 2 ), *hbqt_par_QPoint( 3 ) ); +} + +/* + * void fill ( const QWidget * widget, int x, int y ) + */ +HB_FUNC( QT_QPIXMAP_FILL_2 ) +{ + hbqt_par_QPixmap( 1 )->fill( hbqt_par_QWidget( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); +} + +/* + * bool hasAlpha () const + */ +HB_FUNC( QT_QPIXMAP_HASALPHA ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->hasAlpha() ); +} + +/* + * bool hasAlphaChannel () const + */ +HB_FUNC( QT_QPIXMAP_HASALPHACHANNEL ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->hasAlphaChannel() ); +} + +/* + * int height () const + */ +HB_FUNC( QT_QPIXMAP_HEIGHT ) +{ + hb_retni( hbqt_par_QPixmap( 1 )->height() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QPIXMAP_ISNULL ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->isNull() ); +} + +/* + * bool isQBitmap () const + */ +HB_FUNC( QT_QPIXMAP_ISQBITMAP ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->isQBitmap() ); +} + +/* + * bool load ( const QString & fileName, const char * format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPIXMAP_LOAD ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->load( hbqt_par_QString( 2 ), hbqt_par_char( 3 ), ( HB_ISNIL( 4 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 4 ) ) ) ); +} + +/* + * bool loadFromData ( const QByteArray & data, const char * format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor ) + */ +HB_FUNC( QT_QPIXMAP_LOADFROMDATA ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->loadFromData( *hbqt_par_QByteArray( 2 ), hbqt_par_char( 3 ), ( HB_ISNIL( 4 ) ? ( Qt::ImageConversionFlags ) Qt::AutoColor : ( Qt::ImageConversionFlags ) hb_parni( 4 ) ) ) ); +} + +/* + * QBitmap mask () const + */ +HB_FUNC( QT_QPIXMAP_MASK ) +{ + hb_retptr( new QBitmap( hbqt_par_QPixmap( 1 )->mask() ) ); +} + +/* + * QRect rect () const + */ +HB_FUNC( QT_QPIXMAP_RECT ) +{ + hb_retptr( new QRect( hbqt_par_QPixmap( 1 )->rect() ) ); +} + +/* + * bool save ( const QString & fileName, const char * format = 0, int quality = -1 ) const + */ +HB_FUNC( QT_QPIXMAP_SAVE ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->save( hbqt_par_QString( 2 ), hbqt_par_char( 3 ), ( HB_ISNIL( 4 ) ? -1 : hb_parni( 4 ) ) ) ); +} + +/* + * bool save ( QIODevice * device, const char * format = 0, int quality = -1 ) const + */ +HB_FUNC( QT_QPIXMAP_SAVE_1 ) +{ + hb_retl( hbqt_par_QPixmap( 1 )->save( hbqt_par_QIODevice( 2 ), hbqt_par_char( 3 ), ( HB_ISNIL( 4 ) ? -1 : hb_parni( 4 ) ) ) ); +} + +/* + * QPixmap scaled ( const QSize & size, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QPIXMAP_SCALED ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->scaled( *hbqt_par_QSize( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::AspectRatioMode ) Qt::IgnoreAspectRatio : ( Qt::AspectRatioMode ) hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? ( Qt::TransformationMode ) Qt::FastTransformation : ( Qt::TransformationMode ) hb_parni( 4 ) ) ) ) ); +} + +/* + * QPixmap scaled ( int width, int height, Qt::AspectRatioMode aspectRatioMode = Qt::IgnoreAspectRatio, Qt::TransformationMode transformMode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QPIXMAP_SCALED_1 ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->scaled( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? ( Qt::AspectRatioMode ) Qt::IgnoreAspectRatio : ( Qt::AspectRatioMode ) hb_parni( 4 ) ), ( HB_ISNIL( 5 ) ? ( Qt::TransformationMode ) Qt::FastTransformation : ( Qt::TransformationMode ) hb_parni( 5 ) ) ) ) ); +} + +/* + * QPixmap scaledToHeight ( int height, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QPIXMAP_SCALEDTOHEIGHT ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->scaledToHeight( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::TransformationMode ) Qt::FastTransformation : ( Qt::TransformationMode ) hb_parni( 3 ) ) ) ) ); +} + +/* + * QPixmap scaledToWidth ( int width, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QPIXMAP_SCALEDTOWIDTH ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->scaledToWidth( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::TransformationMode ) Qt::FastTransformation : ( Qt::TransformationMode ) hb_parni( 3 ) ) ) ) ); +} + +/* + * void setAlphaChannel ( const QPixmap & alphaChannel ) + */ +HB_FUNC( QT_QPIXMAP_SETALPHACHANNEL ) +{ + hbqt_par_QPixmap( 1 )->setAlphaChannel( *hbqt_par_QPixmap( 2 ) ); +} + +/* + * void setMask ( const QBitmap & mask ) + */ +HB_FUNC( QT_QPIXMAP_SETMASK ) +{ + hbqt_par_QPixmap( 1 )->setMask( *hbqt_par_QBitmap( 2 ) ); +} + +/* + * QSize size () const + */ +HB_FUNC( QT_QPIXMAP_SIZE ) +{ + hb_retptr( new QSize( hbqt_par_QPixmap( 1 )->size() ) ); +} + +/* + * QImage toImage () const + */ +HB_FUNC( QT_QPIXMAP_TOIMAGE ) +{ + hb_retptr( new QImage( hbqt_par_QPixmap( 1 )->toImage() ) ); +} + +/* + * HBITMAP toWinHBITMAP ( HBitmapFormat format = NoAlpha ) const + */ +HB_FUNC( QT_QPIXMAP_TOWINHBITMAP ) +{ + hb_retptr( new HBITMAP( hbqt_par_QPixmap( 1 )->toWinHBITMAP( ( HB_ISNIL( 2 ) ? ( QPixmap::HBitmapFormat ) QPixmap::NoAlpha : ( QPixmap::HBitmapFormat ) hb_parni( 2 ) ) ) ) ); +} + +/* + * QPixmap transformed ( const QTransform & transform, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QPIXMAP_TRANSFORMED ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->transformed( *hbqt_par_QTransform( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::TransformationMode ) Qt::FastTransformation : ( Qt::TransformationMode ) hb_parni( 3 ) ) ) ) ); +} + +/* + * QPixmap transformed ( const QMatrix & matrix, Qt::TransformationMode mode = Qt::FastTransformation ) const + */ +HB_FUNC( QT_QPIXMAP_TRANSFORMED_1 ) +{ + hb_retptr( new QPixmap( hbqt_par_QPixmap( 1 )->transformed( *hbqt_par_QMatrix( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::TransformationMode ) Qt::FastTransformation : ( Qt::TransformationMode ) hb_parni( 3 ) ) ) ) ); +} + +/* + * int width () const + */ +HB_FUNC( QT_QPIXMAP_WIDTH ) +{ + hb_retni( hbqt_par_QPixmap( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qpoint.cpp b/harbour/contrib/hbqt/hbqt_qpoint.cpp new file mode 100644 index 0000000000..a93d90c850 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qpoint.cpp @@ -0,0 +1,143 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QPoint () + * QPoint ( int x, int y ) + */ +HB_FUNC( QT_QPOINT ) +{ + hb_retptr( ( QPoint* ) new QPoint( hb_parni( 1 ), hb_parni( 2 ) ) ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QPOINT_ISNULL ) +{ + hb_retl( hbqt_par_QPoint( 1 )->isNull() ); +} + +/* + * int manhattanLength () const + */ +HB_FUNC( QT_QPOINT_MANHATTANLENGTH ) +{ + hb_retni( hbqt_par_QPoint( 1 )->manhattanLength() ); +} + +/* + * int & rx () + */ +HB_FUNC( QT_QPOINT_RX ) +{ + hb_retni( hbqt_par_QPoint( 1 )->rx() ); +} + +/* + * int & ry () + */ +HB_FUNC( QT_QPOINT_RY ) +{ + hb_retni( hbqt_par_QPoint( 1 )->ry() ); +} + +/* + * void setX ( int x ) + */ +HB_FUNC( QT_QPOINT_SETX ) +{ + hbqt_par_QPoint( 1 )->setX( hb_parni( 2 ) ); +} + +/* + * void setY ( int y ) + */ +HB_FUNC( QT_QPOINT_SETY ) +{ + hbqt_par_QPoint( 1 )->setY( hb_parni( 2 ) ); +} + +/* + * int x () const + */ +HB_FUNC( QT_QPOINT_X ) +{ + hb_retni( hbqt_par_QPoint( 1 )->x() ); +} + +/* + * int y () const + */ +HB_FUNC( QT_QPOINT_Y ) +{ + hb_retni( hbqt_par_QPoint( 1 )->y() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qpointf.cpp b/harbour/contrib/hbqt/hbqt_qpointf.cpp new file mode 100644 index 0000000000..514b23628d --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qpointf.cpp @@ -0,0 +1,145 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QPointF () + * QPointF ( const QPoint & point ) + * QPointF ( qreal x, qreal y ) + */ +HB_FUNC( QT_QPOINTF ) +{ + hb_retptr( ( QPointF* ) new QPointF( ( qreal ) hb_parnd( 1 ), + ( qreal ) hb_parnd( 2 ) ) ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QPOINTF_ISNULL ) +{ + hb_retl( hbqt_par_QPointF( 1 )->isNull() ); +} + +/* + * qreal & rx () + */ +HB_FUNC( QT_QPOINTF_RX ) +{ + hb_retnd( hbqt_par_QPointF( 1 )->rx() ); +} + +/* + * qreal & ry () + */ +HB_FUNC( QT_QPOINTF_RY ) +{ + hb_retnd( hbqt_par_QPointF( 1 )->ry() ); +} + +/* + * void setX ( qreal x ) + */ +HB_FUNC( QT_QPOINTF_SETX ) +{ + hbqt_par_QPointF( 1 )->setX( hb_parnd( 2 ) ); +} + +/* + * void setY ( qreal y ) + */ +HB_FUNC( QT_QPOINTF_SETY ) +{ + hbqt_par_QPointF( 1 )->setY( hb_parnd( 2 ) ); +} + +/* + * QPoint toPoint () const + */ +HB_FUNC( QT_QPOINTF_TOPOINT ) +{ + hb_retptr( new QPoint( hbqt_par_QPointF( 1 )->toPoint() ) ); +} + +/* + * qreal x () const + */ +HB_FUNC( QT_QPOINTF_X ) +{ + hb_retnd( hbqt_par_QPointF( 1 )->x() ); +} + +/* + * qreal y () const + */ +HB_FUNC( QT_QPOINTF_Y ) +{ + hb_retnd( hbqt_par_QPointF( 1 )->y() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qprintdialog.cpp b/harbour/contrib/hbqt/hbqt_qprintdialog.cpp index eb054207b0..91bd6d5690 100644 --- a/harbour/contrib/hbqt/hbqt_qprintdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qprintdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -95,7 +94,7 @@ HB_FUNC( QT_QPRINTDIALOG_OPEN ) */ HB_FUNC( QT_QPRINTDIALOG_OPTIONS ) { - hb_retni( hbqt_par_QPrintDialog( 1 )->options( ) ); + hb_retni( ( QPrintDialog::PrintDialogOptions ) hbqt_par_QPrintDialog( 1 )->options() ); } /* @@ -103,7 +102,7 @@ HB_FUNC( QT_QPRINTDIALOG_OPTIONS ) */ HB_FUNC( QT_QPRINTDIALOG_PRINTER ) { - hb_retptr( ( QPrinter* ) hbqt_par_QPrintDialog( 1 )->printer( ) ); + hb_retptr( ( QPrinter* ) hbqt_par_QPrintDialog( 1 )->printer() ); } /* @@ -111,7 +110,7 @@ HB_FUNC( QT_QPRINTDIALOG_PRINTER ) */ HB_FUNC( QT_QPRINTDIALOG_PRINTER_1 ) { - hb_retptr( ( QPrinter* ) hbqt_par_QPrintDialog( 1 )->printer( ) ); + hb_retptr( ( QPrinter* ) hbqt_par_QPrintDialog( 1 )->printer() ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qprintpreviewdialog.cpp b/harbour/contrib/hbqt/hbqt_qprintpreviewdialog.cpp index d68ab85e2a..2ce33474d4 100644 --- a/harbour/contrib/hbqt/hbqt_qprintpreviewdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qprintpreviewdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -92,7 +91,7 @@ HB_FUNC( QT_QPRINTPREVIEWDIALOG_OPEN ) */ HB_FUNC( QT_QPRINTPREVIEWDIALOG_PRINTER ) { - hb_retptr( ( QPrinter* ) hbqt_par_QPrintPreviewDialog( 1 )->printer( ) ); + hb_retptr( ( QPrinter* ) hbqt_par_QPrintPreviewDialog( 1 )->printer() ); } diff --git a/harbour/contrib/hbqt/hbqt_qprogressbar.cpp b/harbour/contrib/hbqt/hbqt_qprogressbar.cpp index 7d543e438b..210b2c2cd6 100644 --- a/harbour/contrib/hbqt/hbqt_qprogressbar.cpp +++ b/harbour/contrib/hbqt/hbqt_qprogressbar.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -77,7 +76,7 @@ HB_FUNC( QT_QPROGRESSBAR ) */ HB_FUNC( QT_QPROGRESSBAR_ALIGNMENT ) { - hb_retni( hbqt_par_QProgressBar( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QProgressBar( 1 )->alignment() ); } /* @@ -85,7 +84,7 @@ HB_FUNC( QT_QPROGRESSBAR_ALIGNMENT ) */ HB_FUNC( QT_QPROGRESSBAR_FORMAT ) { - hb_retc( hbqt_par_QProgressBar( 1 )->format( ).toLatin1().data() ); + hb_retc( hbqt_par_QProgressBar( 1 )->format().toLatin1().data() ); } /* @@ -93,7 +92,7 @@ HB_FUNC( QT_QPROGRESSBAR_FORMAT ) */ HB_FUNC( QT_QPROGRESSBAR_INVERTEDAPPEARANCE ) { - hb_retl( hbqt_par_QProgressBar( 1 )->invertedAppearance( ) ); + hb_retl( hbqt_par_QProgressBar( 1 )->invertedAppearance() ); } /* @@ -101,7 +100,7 @@ HB_FUNC( QT_QPROGRESSBAR_INVERTEDAPPEARANCE ) */ HB_FUNC( QT_QPROGRESSBAR_ISTEXTVISIBLE ) { - hb_retl( hbqt_par_QProgressBar( 1 )->isTextVisible( ) ); + hb_retl( hbqt_par_QProgressBar( 1 )->isTextVisible() ); } /* @@ -109,7 +108,7 @@ HB_FUNC( QT_QPROGRESSBAR_ISTEXTVISIBLE ) */ HB_FUNC( QT_QPROGRESSBAR_MAXIMUM ) { - hb_retni( hbqt_par_QProgressBar( 1 )->maximum( ) ); + hb_retni( hbqt_par_QProgressBar( 1 )->maximum() ); } /* @@ -117,7 +116,7 @@ HB_FUNC( QT_QPROGRESSBAR_MAXIMUM ) */ HB_FUNC( QT_QPROGRESSBAR_MINIMUM ) { - hb_retni( hbqt_par_QProgressBar( 1 )->minimum( ) ); + hb_retni( hbqt_par_QProgressBar( 1 )->minimum() ); } /* @@ -125,7 +124,7 @@ HB_FUNC( QT_QPROGRESSBAR_MINIMUM ) */ HB_FUNC( QT_QPROGRESSBAR_ORIENTATION ) { - hb_retni( hbqt_par_QProgressBar( 1 )->orientation( ) ); + hb_retni( ( Qt::Orientation ) hbqt_par_QProgressBar( 1 )->orientation() ); } /* @@ -173,7 +172,7 @@ HB_FUNC( QT_QPROGRESSBAR_SETTEXTVISIBLE ) */ HB_FUNC( QT_QPROGRESSBAR_TEXT ) { - hb_retc( hbqt_par_QProgressBar( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QProgressBar( 1 )->text().toLatin1().data() ); } /* @@ -181,7 +180,7 @@ HB_FUNC( QT_QPROGRESSBAR_TEXT ) */ HB_FUNC( QT_QPROGRESSBAR_TEXTDIRECTION ) { - hb_retni( hbqt_par_QProgressBar( 1 )->textDirection( ) ); + hb_retni( ( QProgressBar::Direction ) hbqt_par_QProgressBar( 1 )->textDirection() ); } /* @@ -189,7 +188,55 @@ HB_FUNC( QT_QPROGRESSBAR_TEXTDIRECTION ) */ HB_FUNC( QT_QPROGRESSBAR_VALUE ) { - hb_retni( hbqt_par_QProgressBar( 1 )->value( ) ); + hb_retni( hbqt_par_QProgressBar( 1 )->value() ); +} + +/* + * void reset () + */ +HB_FUNC( QT_QPROGRESSBAR_RESET ) +{ + hbqt_par_QProgressBar( 1 )->reset(); +} + +/* + * void setMaximum ( int maximum ) + */ +HB_FUNC( QT_QPROGRESSBAR_SETMAXIMUM ) +{ + hbqt_par_QProgressBar( 1 )->setMaximum( hb_parni( 2 ) ); +} + +/* + * void setMinimum ( int minimum ) + */ +HB_FUNC( QT_QPROGRESSBAR_SETMINIMUM ) +{ + hbqt_par_QProgressBar( 1 )->setMinimum( hb_parni( 2 ) ); +} + +/* + * void setOrientation ( Qt::Orientation ) + */ +HB_FUNC( QT_QPROGRESSBAR_SETORIENTATION ) +{ + hbqt_par_QProgressBar( 1 )->setOrientation( ( Qt::Orientation ) hb_parni( 2 ) ); +} + +/* + * void setRange ( int minimum, int maximum ) + */ +HB_FUNC( QT_QPROGRESSBAR_SETRANGE ) +{ + hbqt_par_QProgressBar( 1 )->setRange( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void setValue ( int value ) + */ +HB_FUNC( QT_QPROGRESSBAR_SETVALUE ) +{ + hbqt_par_QProgressBar( 1 )->setValue( hb_parni( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qprogressdialog.cpp b/harbour/contrib/hbqt/hbqt_qprogressdialog.cpp index 169f6b2306..1b0de2a314 100644 --- a/harbour/contrib/hbqt/hbqt_qprogressdialog.cpp +++ b/harbour/contrib/hbqt/hbqt_qprogressdialog.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -79,7 +78,7 @@ HB_FUNC( QT_QPROGRESSDIALOG ) */ HB_FUNC( QT_QPROGRESSDIALOG_AUTOCLOSE ) { - hb_retl( hbqt_par_QProgressDialog( 1 )->autoClose( ) ); + hb_retl( hbqt_par_QProgressDialog( 1 )->autoClose() ); } /* @@ -87,7 +86,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_AUTOCLOSE ) */ HB_FUNC( QT_QPROGRESSDIALOG_AUTORESET ) { - hb_retl( hbqt_par_QProgressDialog( 1 )->autoReset( ) ); + hb_retl( hbqt_par_QProgressDialog( 1 )->autoReset() ); } /* @@ -95,7 +94,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_AUTORESET ) */ HB_FUNC( QT_QPROGRESSDIALOG_LABELTEXT ) { - hb_retc( hbqt_par_QProgressDialog( 1 )->labelText( ).toLatin1().data() ); + hb_retc( hbqt_par_QProgressDialog( 1 )->labelText().toLatin1().data() ); } /* @@ -103,7 +102,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_LABELTEXT ) */ HB_FUNC( QT_QPROGRESSDIALOG_MAXIMUM ) { - hb_retni( hbqt_par_QProgressDialog( 1 )->maximum( ) ); + hb_retni( hbqt_par_QProgressDialog( 1 )->maximum() ); } /* @@ -111,7 +110,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_MAXIMUM ) */ HB_FUNC( QT_QPROGRESSDIALOG_MINIMUM ) { - hb_retni( hbqt_par_QProgressDialog( 1 )->minimum( ) ); + hb_retni( hbqt_par_QProgressDialog( 1 )->minimum() ); } /* @@ -119,7 +118,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_MINIMUM ) */ HB_FUNC( QT_QPROGRESSDIALOG_MINIMUMDURATION ) { - hb_retni( hbqt_par_QProgressDialog( 1 )->minimumDuration( ) ); + hb_retni( hbqt_par_QProgressDialog( 1 )->minimumDuration() ); } /* @@ -175,7 +174,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_SETLABEL ) */ HB_FUNC( QT_QPROGRESSDIALOG_SIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QProgressDialog( 1 )->sizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QProgressDialog( 1 )->sizeHint() ) ); } /* @@ -183,7 +182,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_SIZEHINT ) */ HB_FUNC( QT_QPROGRESSDIALOG_VALUE ) { - hb_retni( hbqt_par_QProgressDialog( 1 )->value( ) ); + hb_retni( hbqt_par_QProgressDialog( 1 )->value() ); } /* @@ -191,7 +190,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_VALUE ) */ HB_FUNC( QT_QPROGRESSDIALOG_WASCANCELED ) { - hb_retl( hbqt_par_QProgressDialog( 1 )->wasCanceled( ) ); + hb_retl( hbqt_par_QProgressDialog( 1 )->wasCanceled() ); } /* @@ -199,7 +198,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_WASCANCELED ) */ HB_FUNC( QT_QPROGRESSDIALOG_CANCEL ) { - hbqt_par_QProgressDialog( 1 )->cancel( ); + hbqt_par_QProgressDialog( 1 )->cancel(); } /* @@ -207,7 +206,7 @@ HB_FUNC( QT_QPROGRESSDIALOG_CANCEL ) */ HB_FUNC( QT_QPROGRESSDIALOG_RESET ) { - hbqt_par_QProgressDialog( 1 )->reset( ); + hbqt_par_QProgressDialog( 1 )->reset(); } /* diff --git a/harbour/contrib/hbqt/hbqt_qpushbutton.cpp b/harbour/contrib/hbqt/hbqt_qpushbutton.cpp index 30a99e4299..0dc176a20f 100644 --- a/harbour/contrib/hbqt/hbqt_qpushbutton.cpp +++ b/harbour/contrib/hbqt/hbqt_qpushbutton.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -85,7 +84,7 @@ HB_FUNC( QT_QPUSHBUTTON ) */ HB_FUNC( QT_QPUSHBUTTON_AUTODEFAULT ) { - hb_retl( hbqt_par_QPushButton( 1 )->autoDefault( ) ); + hb_retl( hbqt_par_QPushButton( 1 )->autoDefault() ); } /* @@ -93,7 +92,7 @@ HB_FUNC( QT_QPUSHBUTTON_AUTODEFAULT ) */ HB_FUNC( QT_QPUSHBUTTON_ISDEFAULT ) { - hb_retl( hbqt_par_QPushButton( 1 )->isDefault( ) ); + hb_retl( hbqt_par_QPushButton( 1 )->isDefault() ); } /* @@ -101,7 +100,7 @@ HB_FUNC( QT_QPUSHBUTTON_ISDEFAULT ) */ HB_FUNC( QT_QPUSHBUTTON_ISFLAT ) { - hb_retl( hbqt_par_QPushButton( 1 )->isFlat( ) ); + hb_retl( hbqt_par_QPushButton( 1 )->isFlat() ); } /* @@ -109,7 +108,7 @@ HB_FUNC( QT_QPUSHBUTTON_ISFLAT ) */ HB_FUNC( QT_QPUSHBUTTON_MENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QPushButton( 1 )->menu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QPushButton( 1 )->menu() ); } /* @@ -144,6 +143,14 @@ HB_FUNC( QT_QPUSHBUTTON_SETMENU ) hbqt_par_QPushButton( 1 )->setMenu( hbqt_par_QMenu( 2 ) ); } +/* + * void showMenu () + */ +HB_FUNC( QT_QPUSHBUTTON_SHOWMENU ) +{ + hbqt_par_QPushButton( 1 )->showMenu(); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qradiobutton.cpp b/harbour/contrib/hbqt/hbqt_qradiobutton.cpp index a183ff6749..612d683274 100644 --- a/harbour/contrib/hbqt/hbqt_qradiobutton.cpp +++ b/harbour/contrib/hbqt/hbqt_qradiobutton.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qrect.cpp b/harbour/contrib/hbqt/hbqt_qrect.cpp new file mode 100644 index 0000000000..05201c06cf --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qrect.cpp @@ -0,0 +1,573 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QRect () + * QRect ( const QPoint & topLeft, const QPoint & bottomRight ) + * QRect ( const QPoint & topLeft, const QSize & size ) + * QRect ( int x, int y, int width, int height ) + */ +HB_FUNC( QT_QRECT ) +{ + hb_retptr( ( QRect* ) new QRect( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) ); +} + +/* + * void adjust ( int dx1, int dy1, int dx2, int dy2 ) + */ +HB_FUNC( QT_QRECT_ADJUST ) +{ + hbqt_par_QRect( 1 )->adjust( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); +} + +/* + * QRect adjusted ( int dx1, int dy1, int dx2, int dy2 ) const + */ +HB_FUNC( QT_QRECT_ADJUSTED ) +{ + hb_retptr( new QRect( hbqt_par_QRect( 1 )->adjusted( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ) ) ); +} + +/* + * int bottom () const + */ +HB_FUNC( QT_QRECT_BOTTOM ) +{ + hb_retni( hbqt_par_QRect( 1 )->bottom() ); +} + +/* + * QPoint bottomLeft () const + */ +HB_FUNC( QT_QRECT_BOTTOMLEFT ) +{ + hb_retptr( new QPoint( hbqt_par_QRect( 1 )->bottomLeft() ) ); +} + +/* + * QPoint bottomRight () const + */ +HB_FUNC( QT_QRECT_BOTTOMRIGHT ) +{ + hb_retptr( new QPoint( hbqt_par_QRect( 1 )->bottomRight() ) ); +} + +/* + * QPoint center () const + */ +HB_FUNC( QT_QRECT_CENTER ) +{ + hb_retptr( new QPoint( hbqt_par_QRect( 1 )->center() ) ); +} + +/* + * bool contains ( const QPoint & point, bool proper = false ) const + */ +HB_FUNC( QT_QRECT_CONTAINS ) +{ + hb_retl( hbqt_par_QRect( 1 )->contains( *hbqt_par_QPoint( 2 ), hb_parl( 3 ) ) ); +} + +/* + * bool contains ( int x, int y, bool proper ) const + */ +HB_FUNC( QT_QRECT_CONTAINS_1 ) +{ + hb_retl( hbqt_par_QRect( 1 )->contains( hb_parni( 2 ), hb_parni( 3 ), hb_parl( 4 ) ) ); +} + +/* + * bool contains ( int x, int y ) const + */ +HB_FUNC( QT_QRECT_CONTAINS_2 ) +{ + hb_retl( hbqt_par_QRect( 1 )->contains( hb_parni( 2 ), hb_parni( 3 ) ) ); +} + +/* + * bool contains ( const QRect & rectangle, bool proper = false ) const + */ +HB_FUNC( QT_QRECT_CONTAINS_3 ) +{ + hb_retl( hbqt_par_QRect( 1 )->contains( *hbqt_par_QRect( 2 ), hb_parl( 3 ) ) ); +} + +/* + * void getCoords ( int * x1, int * y1, int * x2, int * y2 ) const + */ +HB_FUNC( QT_QRECT_GETCOORDS ) +{ + int iX1 = 0; + int iY1 = 0; + int iX2 = 0; + int iY2 = 0; + + hbqt_par_QRect( 1 )->getCoords( &iX1, &iY1, &iX2, &iY2 ); + + hb_storni( iX1, 2 ); + hb_storni( iY1, 3 ); + hb_storni( iX2, 4 ); + hb_storni( iY2, 5 ); +} + +/* + * void getRect ( int * x, int * y, int * width, int * height ) const + */ +HB_FUNC( QT_QRECT_GETRECT ) +{ + int iX = 0; + int iY = 0; + int iWidth = 0; + int iHeight = 0; + + hbqt_par_QRect( 1 )->getRect( &iX, &iY, &iWidth, &iHeight ); + + hb_storni( iX, 2 ); + hb_storni( iY, 3 ); + hb_storni( iWidth, 4 ); + hb_storni( iHeight, 5 ); +} + +/* + * int height () const + */ +HB_FUNC( QT_QRECT_HEIGHT ) +{ + hb_retni( hbqt_par_QRect( 1 )->height() ); +} + +/* + * QRect intersected ( const QRect & rectangle ) const + */ +HB_FUNC( QT_QRECT_INTERSECTED ) +{ + hb_retptr( new QRect( hbqt_par_QRect( 1 )->intersected( *hbqt_par_QRect( 2 ) ) ) ); +} + +/* + * bool intersects ( const QRect & rectangle ) const + */ +HB_FUNC( QT_QRECT_INTERSECTS ) +{ + hb_retl( hbqt_par_QRect( 1 )->intersects( *hbqt_par_QRect( 2 ) ) ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QRECT_ISEMPTY ) +{ + hb_retl( hbqt_par_QRect( 1 )->isEmpty() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QRECT_ISNULL ) +{ + hb_retl( hbqt_par_QRect( 1 )->isNull() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QRECT_ISVALID ) +{ + hb_retl( hbqt_par_QRect( 1 )->isValid() ); +} + +/* + * int left () const + */ +HB_FUNC( QT_QRECT_LEFT ) +{ + hb_retni( hbqt_par_QRect( 1 )->left() ); +} + +/* + * void moveBottom ( int y ) + */ +HB_FUNC( QT_QRECT_MOVEBOTTOM ) +{ + hbqt_par_QRect( 1 )->moveBottom( hb_parni( 2 ) ); +} + +/* + * void moveBottomLeft ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_MOVEBOTTOMLEFT ) +{ + hbqt_par_QRect( 1 )->moveBottomLeft( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void moveBottomRight ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_MOVEBOTTOMRIGHT ) +{ + hbqt_par_QRect( 1 )->moveBottomRight( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void moveCenter ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_MOVECENTER ) +{ + hbqt_par_QRect( 1 )->moveCenter( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void moveLeft ( int x ) + */ +HB_FUNC( QT_QRECT_MOVELEFT ) +{ + hbqt_par_QRect( 1 )->moveLeft( hb_parni( 2 ) ); +} + +/* + * void moveRight ( int x ) + */ +HB_FUNC( QT_QRECT_MOVERIGHT ) +{ + hbqt_par_QRect( 1 )->moveRight( hb_parni( 2 ) ); +} + +/* + * void moveTo ( int x, int y ) + */ +HB_FUNC( QT_QRECT_MOVETO ) +{ + hbqt_par_QRect( 1 )->moveTo( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void moveTo ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_MOVETO_1 ) +{ + hbqt_par_QRect( 1 )->moveTo( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void moveTop ( int y ) + */ +HB_FUNC( QT_QRECT_MOVETOP ) +{ + hbqt_par_QRect( 1 )->moveTop( hb_parni( 2 ) ); +} + +/* + * void moveTopLeft ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_MOVETOPLEFT ) +{ + hbqt_par_QRect( 1 )->moveTopLeft( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void moveTopRight ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_MOVETOPRIGHT ) +{ + hbqt_par_QRect( 1 )->moveTopRight( *hbqt_par_QPoint( 2 ) ); +} + +/* + * QRect normalized () const + */ +HB_FUNC( QT_QRECT_NORMALIZED ) +{ + hb_retptr( new QRect( hbqt_par_QRect( 1 )->normalized() ) ); +} + +/* + * int right () const + */ +HB_FUNC( QT_QRECT_RIGHT ) +{ + hb_retni( hbqt_par_QRect( 1 )->right() ); +} + +/* + * void setBottom ( int y ) + */ +HB_FUNC( QT_QRECT_SETBOTTOM ) +{ + hbqt_par_QRect( 1 )->setBottom( hb_parni( 2 ) ); +} + +/* + * void setBottomLeft ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_SETBOTTOMLEFT ) +{ + hbqt_par_QRect( 1 )->setBottomLeft( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setBottomRight ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_SETBOTTOMRIGHT ) +{ + hbqt_par_QRect( 1 )->setBottomRight( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setCoords ( int x1, int y1, int x2, int y2 ) + */ +HB_FUNC( QT_QRECT_SETCOORDS ) +{ + hbqt_par_QRect( 1 )->setCoords( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); +} + +/* + * void setHeight ( int height ) + */ +HB_FUNC( QT_QRECT_SETHEIGHT ) +{ + hbqt_par_QRect( 1 )->setHeight( hb_parni( 2 ) ); +} + +/* + * void setLeft ( int x ) + */ +HB_FUNC( QT_QRECT_SETLEFT ) +{ + hbqt_par_QRect( 1 )->setLeft( hb_parni( 2 ) ); +} + +/* + * void setRect ( int x, int y, int width, int height ) + */ +HB_FUNC( QT_QRECT_SETRECT ) +{ + hbqt_par_QRect( 1 )->setRect( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); +} + +/* + * void setRight ( int x ) + */ +HB_FUNC( QT_QRECT_SETRIGHT ) +{ + hbqt_par_QRect( 1 )->setRight( hb_parni( 2 ) ); +} + +/* + * void setSize ( const QSize & size ) + */ +HB_FUNC( QT_QRECT_SETSIZE ) +{ + hbqt_par_QRect( 1 )->setSize( *hbqt_par_QSize( 2 ) ); +} + +/* + * void setTop ( int y ) + */ +HB_FUNC( QT_QRECT_SETTOP ) +{ + hbqt_par_QRect( 1 )->setTop( hb_parni( 2 ) ); +} + +/* + * void setTopLeft ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_SETTOPLEFT ) +{ + hbqt_par_QRect( 1 )->setTopLeft( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setTopRight ( const QPoint & position ) + */ +HB_FUNC( QT_QRECT_SETTOPRIGHT ) +{ + hbqt_par_QRect( 1 )->setTopRight( *hbqt_par_QPoint( 2 ) ); +} + +/* + * void setWidth ( int width ) + */ +HB_FUNC( QT_QRECT_SETWIDTH ) +{ + hbqt_par_QRect( 1 )->setWidth( hb_parni( 2 ) ); +} + +/* + * void setX ( int x ) + */ +HB_FUNC( QT_QRECT_SETX ) +{ + hbqt_par_QRect( 1 )->setX( hb_parni( 2 ) ); +} + +/* + * void setY ( int y ) + */ +HB_FUNC( QT_QRECT_SETY ) +{ + hbqt_par_QRect( 1 )->setY( hb_parni( 2 ) ); +} + +/* + * QSize size () const + */ +HB_FUNC( QT_QRECT_SIZE ) +{ + hb_retptr( new QSize( hbqt_par_QRect( 1 )->size() ) ); +} + +/* + * int top () const + */ +HB_FUNC( QT_QRECT_TOP ) +{ + hb_retni( hbqt_par_QRect( 1 )->top() ); +} + +/* + * QPoint topLeft () const + */ +HB_FUNC( QT_QRECT_TOPLEFT ) +{ + hb_retptr( new QPoint( hbqt_par_QRect( 1 )->topLeft() ) ); +} + +/* + * QPoint topRight () const + */ +HB_FUNC( QT_QRECT_TOPRIGHT ) +{ + hb_retptr( new QPoint( hbqt_par_QRect( 1 )->topRight() ) ); +} + +/* + * void translate ( int dx, int dy ) + */ +HB_FUNC( QT_QRECT_TRANSLATE ) +{ + hbqt_par_QRect( 1 )->translate( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void translate ( const QPoint & offset ) + */ +HB_FUNC( QT_QRECT_TRANSLATE_1 ) +{ + hbqt_par_QRect( 1 )->translate( *hbqt_par_QPoint( 2 ) ); +} + +/* + * QRect translated ( int dx, int dy ) const + */ +HB_FUNC( QT_QRECT_TRANSLATED ) +{ + hb_retptr( new QRect( hbqt_par_QRect( 1 )->translated( hb_parni( 2 ), hb_parni( 3 ) ) ) ); +} + +/* + * QRect translated ( const QPoint & offset ) const + */ +HB_FUNC( QT_QRECT_TRANSLATED_1 ) +{ + hb_retptr( new QRect( hbqt_par_QRect( 1 )->translated( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * QRect united ( const QRect & rectangle ) const + */ +HB_FUNC( QT_QRECT_UNITED ) +{ + hb_retptr( new QRect( hbqt_par_QRect( 1 )->united( *hbqt_par_QRect( 2 ) ) ) ); +} + +/* + * int width () const + */ +HB_FUNC( QT_QRECT_WIDTH ) +{ + hb_retni( hbqt_par_QRect( 1 )->width() ); +} + +/* + * int x () const + */ +HB_FUNC( QT_QRECT_X ) +{ + hb_retni( hbqt_par_QRect( 1 )->x() ); +} + +/* + * int y () const + */ +HB_FUNC( QT_QRECT_Y ) +{ + hb_retni( hbqt_par_QRect( 1 )->y() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qrectf.cpp b/harbour/contrib/hbqt/hbqt_qrectf.cpp new file mode 100644 index 0000000000..04d47aace8 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qrectf.cpp @@ -0,0 +1,585 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QRectF () + * QRectF ( const QPointF & topLeft, const QSizeF & size ) + * QRectF ( const QPointF & topLeft, const QPointF & bottomRight ) + * QRectF ( qreal x, qreal y, qreal width, qreal height ) + * QRectF ( const QRect & rectangle ) + */ +HB_FUNC( QT_QRECTF ) +{ + hb_retptr( ( QRectF* ) new QRectF( ( qreal ) hb_parnd( 1 ), + ( qreal ) hb_parnd( 2 ), + ( qreal ) hb_parnd( 3 ), + ( qreal ) hb_parnd( 4 ) ) ); +} + +/* + * void adjust ( qreal dx1, qreal dy1, qreal dx2, qreal dy2 ) + */ +HB_FUNC( QT_QRECTF_ADJUST ) +{ + hbqt_par_QRectF( 1 )->adjust( hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ) ); +} + +/* + * QRectF adjusted ( qreal dx1, qreal dy1, qreal dx2, qreal dy2 ) const + */ +HB_FUNC( QT_QRECTF_ADJUSTED ) +{ + hb_retptr( new QRectF( hbqt_par_QRectF( 1 )->adjusted( hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ) ) ) ); +} + +/* + * qreal bottom () const + */ +HB_FUNC( QT_QRECTF_BOTTOM ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->bottom() ); +} + +/* + * QPointF bottomLeft () const + */ +HB_FUNC( QT_QRECTF_BOTTOMLEFT ) +{ + hb_retptr( new QPointF( hbqt_par_QRectF( 1 )->bottomLeft() ) ); +} + +/* + * QPointF bottomRight () const + */ +HB_FUNC( QT_QRECTF_BOTTOMRIGHT ) +{ + hb_retptr( new QPointF( hbqt_par_QRectF( 1 )->bottomRight() ) ); +} + +/* + * QPointF center () const + */ +HB_FUNC( QT_QRECTF_CENTER ) +{ + hb_retptr( new QPointF( hbqt_par_QRectF( 1 )->center() ) ); +} + +/* + * bool contains ( const QPointF & point ) const + */ +HB_FUNC( QT_QRECTF_CONTAINS ) +{ + hb_retl( hbqt_par_QRectF( 1 )->contains( *hbqt_par_QPointF( 2 ) ) ); +} + +/* + * bool contains ( qreal x, qreal y ) const + */ +HB_FUNC( QT_QRECTF_CONTAINS_1 ) +{ + hb_retl( hbqt_par_QRectF( 1 )->contains( hb_parnd( 2 ), hb_parnd( 3 ) ) ); +} + +/* + * bool contains ( const QRectF & rectangle ) const + */ +HB_FUNC( QT_QRECTF_CONTAINS_2 ) +{ + hb_retl( hbqt_par_QRectF( 1 )->contains( *hbqt_par_QRectF( 2 ) ) ); +} + +/* + * void getCoords ( qreal * x1, qreal * y1, qreal * x2, qreal * y2 ) const + */ +HB_FUNC( QT_QRECTF_GETCOORDS ) +{ + qreal qrX1 = 0; + qreal qrY1 = 0; + qreal qrX2 = 0; + qreal qrY2 = 0; + + hbqt_par_QRectF( 1 )->getCoords( &qrX1, &qrY1, &qrX2, &qrY2 ); + + hb_stornd( qrX1, 2 ); + hb_stornd( qrY1, 3 ); + hb_stornd( qrX2, 4 ); + hb_stornd( qrY2, 5 ); +} + +/* + * void getRect ( qreal * x, qreal * y, qreal * width, qreal * height ) const + */ +HB_FUNC( QT_QRECTF_GETRECT ) +{ + qreal qrX = 0; + qreal qrY = 0; + qreal qrWidth = 0; + qreal qrHeight = 0; + + hbqt_par_QRectF( 1 )->getRect( &qrX, &qrY, &qrWidth, &qrHeight ); + + hb_stornd( qrX, 2 ); + hb_stornd( qrY, 3 ); + hb_stornd( qrWidth, 4 ); + hb_stornd( qrHeight, 5 ); +} + +/* + * qreal height () const + */ +HB_FUNC( QT_QRECTF_HEIGHT ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->height() ); +} + +/* + * QRectF intersected ( const QRectF & rectangle ) const + */ +HB_FUNC( QT_QRECTF_INTERSECTED ) +{ + hb_retptr( new QRectF( hbqt_par_QRectF( 1 )->intersected( *hbqt_par_QRectF( 2 ) ) ) ); +} + +/* + * bool intersects ( const QRectF & rectangle ) const + */ +HB_FUNC( QT_QRECTF_INTERSECTS ) +{ + hb_retl( hbqt_par_QRectF( 1 )->intersects( *hbqt_par_QRectF( 2 ) ) ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QRECTF_ISEMPTY ) +{ + hb_retl( hbqt_par_QRectF( 1 )->isEmpty() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QRECTF_ISNULL ) +{ + hb_retl( hbqt_par_QRectF( 1 )->isNull() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QRECTF_ISVALID ) +{ + hb_retl( hbqt_par_QRectF( 1 )->isValid() ); +} + +/* + * qreal left () const + */ +HB_FUNC( QT_QRECTF_LEFT ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->left() ); +} + +/* + * void moveBottom ( qreal y ) + */ +HB_FUNC( QT_QRECTF_MOVEBOTTOM ) +{ + hbqt_par_QRectF( 1 )->moveBottom( hb_parnd( 2 ) ); +} + +/* + * void moveBottomLeft ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_MOVEBOTTOMLEFT ) +{ + hbqt_par_QRectF( 1 )->moveBottomLeft( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void moveBottomRight ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_MOVEBOTTOMRIGHT ) +{ + hbqt_par_QRectF( 1 )->moveBottomRight( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void moveCenter ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_MOVECENTER ) +{ + hbqt_par_QRectF( 1 )->moveCenter( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void moveLeft ( qreal x ) + */ +HB_FUNC( QT_QRECTF_MOVELEFT ) +{ + hbqt_par_QRectF( 1 )->moveLeft( hb_parnd( 2 ) ); +} + +/* + * void moveRight ( qreal x ) + */ +HB_FUNC( QT_QRECTF_MOVERIGHT ) +{ + hbqt_par_QRectF( 1 )->moveRight( hb_parnd( 2 ) ); +} + +/* + * void moveTo ( qreal x, qreal y ) + */ +HB_FUNC( QT_QRECTF_MOVETO ) +{ + hbqt_par_QRectF( 1 )->moveTo( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + +/* + * void moveTo ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_MOVETO_1 ) +{ + hbqt_par_QRectF( 1 )->moveTo( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void moveTop ( qreal y ) + */ +HB_FUNC( QT_QRECTF_MOVETOP ) +{ + hbqt_par_QRectF( 1 )->moveTop( hb_parnd( 2 ) ); +} + +/* + * void moveTopLeft ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_MOVETOPLEFT ) +{ + hbqt_par_QRectF( 1 )->moveTopLeft( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void moveTopRight ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_MOVETOPRIGHT ) +{ + hbqt_par_QRectF( 1 )->moveTopRight( *hbqt_par_QPointF( 2 ) ); +} + +/* + * QRectF normalized () const + */ +HB_FUNC( QT_QRECTF_NORMALIZED ) +{ + hb_retptr( new QRectF( hbqt_par_QRectF( 1 )->normalized() ) ); +} + +/* + * qreal right () const + */ +HB_FUNC( QT_QRECTF_RIGHT ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->right() ); +} + +/* + * void setBottom ( qreal y ) + */ +HB_FUNC( QT_QRECTF_SETBOTTOM ) +{ + hbqt_par_QRectF( 1 )->setBottom( hb_parnd( 2 ) ); +} + +/* + * void setBottomLeft ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_SETBOTTOMLEFT ) +{ + hbqt_par_QRectF( 1 )->setBottomLeft( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setBottomRight ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_SETBOTTOMRIGHT ) +{ + hbqt_par_QRectF( 1 )->setBottomRight( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setCoords ( qreal x1, qreal y1, qreal x2, qreal y2 ) + */ +HB_FUNC( QT_QRECTF_SETCOORDS ) +{ + hbqt_par_QRectF( 1 )->setCoords( hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ) ); +} + +/* + * void setHeight ( qreal height ) + */ +HB_FUNC( QT_QRECTF_SETHEIGHT ) +{ + hbqt_par_QRectF( 1 )->setHeight( hb_parnd( 2 ) ); +} + +/* + * void setLeft ( qreal x ) + */ +HB_FUNC( QT_QRECTF_SETLEFT ) +{ + hbqt_par_QRectF( 1 )->setLeft( hb_parnd( 2 ) ); +} + +/* + * void setRect ( qreal x, qreal y, qreal width, qreal height ) + */ +HB_FUNC( QT_QRECTF_SETRECT ) +{ + hbqt_par_QRectF( 1 )->setRect( hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ) ); +} + +/* + * void setRight ( qreal x ) + */ +HB_FUNC( QT_QRECTF_SETRIGHT ) +{ + hbqt_par_QRectF( 1 )->setRight( hb_parnd( 2 ) ); +} + +/* + * void setSize ( const QSizeF & size ) + */ +HB_FUNC( QT_QRECTF_SETSIZE ) +{ + hbqt_par_QRectF( 1 )->setSize( *hbqt_par_QSizeF( 2 ) ); +} + +/* + * void setTop ( qreal y ) + */ +HB_FUNC( QT_QRECTF_SETTOP ) +{ + hbqt_par_QRectF( 1 )->setTop( hb_parnd( 2 ) ); +} + +/* + * void setTopLeft ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_SETTOPLEFT ) +{ + hbqt_par_QRectF( 1 )->setTopLeft( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setTopRight ( const QPointF & position ) + */ +HB_FUNC( QT_QRECTF_SETTOPRIGHT ) +{ + hbqt_par_QRectF( 1 )->setTopRight( *hbqt_par_QPointF( 2 ) ); +} + +/* + * void setWidth ( qreal width ) + */ +HB_FUNC( QT_QRECTF_SETWIDTH ) +{ + hbqt_par_QRectF( 1 )->setWidth( hb_parnd( 2 ) ); +} + +/* + * void setX ( qreal x ) + */ +HB_FUNC( QT_QRECTF_SETX ) +{ + hbqt_par_QRectF( 1 )->setX( hb_parnd( 2 ) ); +} + +/* + * void setY ( qreal y ) + */ +HB_FUNC( QT_QRECTF_SETY ) +{ + hbqt_par_QRectF( 1 )->setY( hb_parnd( 2 ) ); +} + +/* + * QSizeF size () const + */ +HB_FUNC( QT_QRECTF_SIZE ) +{ + hb_retptr( new QSizeF( hbqt_par_QRectF( 1 )->size() ) ); +} + +/* + * QRect toAlignedRect () const + */ +HB_FUNC( QT_QRECTF_TOALIGNEDRECT ) +{ + hb_retptr( new QRect( hbqt_par_QRectF( 1 )->toAlignedRect() ) ); +} + +/* + * QRect toRect () const + */ +HB_FUNC( QT_QRECTF_TORECT ) +{ + hb_retptr( new QRect( hbqt_par_QRectF( 1 )->toRect() ) ); +} + +/* + * qreal top () const + */ +HB_FUNC( QT_QRECTF_TOP ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->top() ); +} + +/* + * QPointF topLeft () const + */ +HB_FUNC( QT_QRECTF_TOPLEFT ) +{ + hb_retptr( new QPointF( hbqt_par_QRectF( 1 )->topLeft() ) ); +} + +/* + * QPointF topRight () const + */ +HB_FUNC( QT_QRECTF_TOPRIGHT ) +{ + hb_retptr( new QPointF( hbqt_par_QRectF( 1 )->topRight() ) ); +} + +/* + * void translate ( qreal dx, qreal dy ) + */ +HB_FUNC( QT_QRECTF_TRANSLATE ) +{ + hbqt_par_QRectF( 1 )->translate( hb_parnd( 2 ), hb_parnd( 3 ) ); +} + +/* + * void translate ( const QPointF & offset ) + */ +HB_FUNC( QT_QRECTF_TRANSLATE_1 ) +{ + hbqt_par_QRectF( 1 )->translate( *hbqt_par_QPointF( 2 ) ); +} + +/* + * QRectF translated ( qreal dx, qreal dy ) const + */ +HB_FUNC( QT_QRECTF_TRANSLATED ) +{ + hb_retptr( new QRectF( hbqt_par_QRectF( 1 )->translated( hb_parnd( 2 ), hb_parnd( 3 ) ) ) ); +} + +/* + * QRectF translated ( const QPointF & offset ) const + */ +HB_FUNC( QT_QRECTF_TRANSLATED_1 ) +{ + hb_retptr( new QRectF( hbqt_par_QRectF( 1 )->translated( *hbqt_par_QPointF( 2 ) ) ) ); +} + +/* + * QRectF united ( const QRectF & rectangle ) const + */ +HB_FUNC( QT_QRECTF_UNITED ) +{ + hb_retptr( new QRectF( hbqt_par_QRectF( 1 )->united( *hbqt_par_QRectF( 2 ) ) ) ); +} + +/* + * qreal width () const + */ +HB_FUNC( QT_QRECTF_WIDTH ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->width() ); +} + +/* + * qreal x () const + */ +HB_FUNC( QT_QRECTF_X ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->x() ); +} + +/* + * qreal y () const + */ +HB_FUNC( QT_QRECTF_Y ) +{ + hb_retnd( hbqt_par_QRectF( 1 )->y() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qregion.cpp b/harbour/contrib/hbqt/hbqt_qregion.cpp new file mode 100644 index 0000000000..b60e13d66b --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qregion.cpp @@ -0,0 +1,246 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 19/20 [ 95.00% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QVector rects () const + */ + + +#include + + +/* + * QRegion () + * QRegion ( int x, int y, int w, int h, RegionType t = Rectangle ) + * QRegion ( const QPolygon & a, Qt::FillRule fillRule = Qt::OddEvenFill ) + * QRegion ( const QRegion & r ) + * QRegion ( const QBitmap & bm ) + * QRegion ( const QRect & r, RegionType t = Rectangle ) + */ +HB_FUNC( QT_QREGION ) +{ + hb_retptr( ( QRegion* ) new QRegion( hb_parni( 1 ), hb_parni( 2 ), + hb_parni( 3 ), hb_parni( 4 ), + ( QRegion::RegionType ) ( HB_ISNUM( 5 ) ? hb_parni( 5 ) : QRegion::Rectangle ) ) ); +} + +/* + * QRect boundingRect () const + */ +HB_FUNC( QT_QREGION_BOUNDINGRECT ) +{ + hb_retptr( new QRect( hbqt_par_QRegion( 1 )->boundingRect() ) ); +} + +/* + * bool contains ( const QPoint & p ) const + */ +HB_FUNC( QT_QREGION_CONTAINS ) +{ + hb_retl( hbqt_par_QRegion( 1 )->contains( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * bool contains ( const QRect & r ) const + */ +HB_FUNC( QT_QREGION_CONTAINS_1 ) +{ + hb_retl( hbqt_par_QRegion( 1 )->contains( *hbqt_par_QRect( 2 ) ) ); +} + +/* + * HRGN handle () const + */ +HB_FUNC( QT_QREGION_HANDLE ) +{ + hb_retptr( ( HRGN ) hbqt_par_QRegion( 1 )->handle() ); +} + +/* + * QRegion intersected ( const QRegion & r ) const + */ +HB_FUNC( QT_QREGION_INTERSECTED ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->intersected( *hbqt_par_QRegion( 2 ) ) ) ); +} + +/* + * QRegion intersected ( const QRect & rect ) const + */ +HB_FUNC( QT_QREGION_INTERSECTED_1 ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->intersected( *hbqt_par_QRect( 2 ) ) ) ); +} + +/* + * bool intersects ( const QRegion & region ) const + */ +HB_FUNC( QT_QREGION_INTERSECTS ) +{ + hb_retl( hbqt_par_QRegion( 1 )->intersects( *hbqt_par_QRegion( 2 ) ) ); +} + +/* + * bool intersects ( const QRect & rect ) const + */ +HB_FUNC( QT_QREGION_INTERSECTS_1 ) +{ + hb_retl( hbqt_par_QRegion( 1 )->intersects( *hbqt_par_QRect( 2 ) ) ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QREGION_ISEMPTY ) +{ + hb_retl( hbqt_par_QRegion( 1 )->isEmpty() ); +} + +/* + * int numRects () const + */ +HB_FUNC( QT_QREGION_NUMRECTS ) +{ + hb_retni( hbqt_par_QRegion( 1 )->numRects() ); +} + +/* + * void setRects ( const QRect * rects, int number ) + */ +HB_FUNC( QT_QREGION_SETRECTS ) +{ + hbqt_par_QRegion( 1 )->setRects( hbqt_par_QRect( 2 ), hb_parni( 3 ) ); +} + +/* + * QRegion subtracted ( const QRegion & r ) const + */ +HB_FUNC( QT_QREGION_SUBTRACTED ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->subtracted( *hbqt_par_QRegion( 2 ) ) ) ); +} + +/* + * void translate ( int dx, int dy ) + */ +HB_FUNC( QT_QREGION_TRANSLATE ) +{ + hbqt_par_QRegion( 1 )->translate( hb_parni( 2 ), hb_parni( 3 ) ); +} + +/* + * void translate ( const QPoint & point ) + */ +HB_FUNC( QT_QREGION_TRANSLATE_1 ) +{ + hbqt_par_QRegion( 1 )->translate( *hbqt_par_QPoint( 2 ) ); +} + +/* + * QRegion translated ( int dx, int dy ) const + */ +HB_FUNC( QT_QREGION_TRANSLATED ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->translated( hb_parni( 2 ), hb_parni( 3 ) ) ) ); +} + +/* + * QRegion translated ( const QPoint & p ) const + */ +HB_FUNC( QT_QREGION_TRANSLATED_1 ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->translated( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * QRegion united ( const QRegion & r ) const + */ +HB_FUNC( QT_QREGION_UNITED ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->united( *hbqt_par_QRegion( 2 ) ) ) ); +} + +/* + * QRegion united ( const QRect & rect ) const + */ +HB_FUNC( QT_QREGION_UNITED_1 ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->united( *hbqt_par_QRect( 2 ) ) ) ); +} + +/* + * QRegion xored ( const QRegion & r ) const + */ +HB_FUNC( QT_QREGION_XORED ) +{ + hb_retptr( new QRegion( hbqt_par_QRegion( 1 )->xored( *hbqt_par_QRegion( 2 ) ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qscrollarea.cpp b/harbour/contrib/hbqt/hbqt_qscrollarea.cpp index 221c2273f2..845b406876 100644 --- a/harbour/contrib/hbqt/hbqt_qscrollarea.cpp +++ b/harbour/contrib/hbqt/hbqt_qscrollarea.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QSCROLLAREA ) */ HB_FUNC( QT_QSCROLLAREA_ALIGNMENT ) { - hb_retni( hbqt_par_QScrollArea( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QScrollArea( 1 )->alignment() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QSCROLLAREA_ALIGNMENT ) */ HB_FUNC( QT_QSCROLLAREA_ENSUREVISIBLE ) { - hbqt_par_QScrollArea( 1 )->ensureVisible( hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ); + hbqt_par_QScrollArea( 1 )->ensureVisible( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISNIL( 4 ) ? 50 : hb_parni( 4 ) ), ( HB_ISNIL( 5 ) ? 50 : hb_parni( 5 ) ) ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QSCROLLAREA_ENSUREVISIBLE ) */ HB_FUNC( QT_QSCROLLAREA_ENSUREWIDGETVISIBLE ) { - hbqt_par_QScrollArea( 1 )->ensureWidgetVisible( hbqt_par_QWidget( 2 ), hb_parni( 3 ), hb_parni( 4 ) ); + hbqt_par_QScrollArea( 1 )->ensureWidgetVisible( hbqt_par_QWidget( 2 ), ( HB_ISNIL( 3 ) ? 50 : hb_parni( 3 ) ), ( HB_ISNIL( 4 ) ? 50 : hb_parni( 4 ) ) ); } /* @@ -126,7 +125,7 @@ HB_FUNC( QT_QSCROLLAREA_SETWIDGETRESIZABLE ) */ HB_FUNC( QT_QSCROLLAREA_TAKEWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QScrollArea( 1 )->takeWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QScrollArea( 1 )->takeWidget() ); } /* @@ -134,7 +133,7 @@ HB_FUNC( QT_QSCROLLAREA_TAKEWIDGET ) */ HB_FUNC( QT_QSCROLLAREA_WIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QScrollArea( 1 )->widget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QScrollArea( 1 )->widget() ); } /* @@ -142,7 +141,7 @@ HB_FUNC( QT_QSCROLLAREA_WIDGET ) */ HB_FUNC( QT_QSCROLLAREA_WIDGETRESIZABLE ) { - hb_retl( hbqt_par_QScrollArea( 1 )->widgetResizable( ) ); + hb_retl( hbqt_par_QScrollArea( 1 )->widgetResizable() ); } diff --git a/harbour/contrib/hbqt/hbqt_qscrollbar.cpp b/harbour/contrib/hbqt/hbqt_qscrollbar.cpp index be8016e3d5..4ebe2b5c9f 100644 --- a/harbour/contrib/hbqt/hbqt_qscrollbar.cpp +++ b/harbour/contrib/hbqt/hbqt_qscrollbar.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qsignalmapper.cpp b/harbour/contrib/hbqt/hbqt_qsignalmapper.cpp new file mode 100644 index 0000000000..25759a214d --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qsignalmapper.cpp @@ -0,0 +1,167 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QSignalMapper ( QObject * parent = 0 ) + * ~QSignalMapper () + */ +HB_FUNC( QT_QSIGNALMAPPER ) +{ + hb_retptr( new QSignalMapper( hbqt_par_QObject( 1 ) ) ); +} + +/* + * QObject * mapping ( int id ) const + */ +HB_FUNC( QT_QSIGNALMAPPER_MAPPING ) +{ + hb_retptr( ( QObject* ) hbqt_par_QSignalMapper( 1 )->mapping( hb_parni( 2 ) ) ); +} + +/* + * QObject * mapping ( const QString & id ) const + */ +HB_FUNC( QT_QSIGNALMAPPER_MAPPING_1 ) +{ + hb_retptr( ( QObject* ) hbqt_par_QSignalMapper( 1 )->mapping( hbqt_par_QString( 2 ) ) ); +} + +/* + * QObject * mapping ( QWidget * widget ) const + */ +HB_FUNC( QT_QSIGNALMAPPER_MAPPING_2 ) +{ + hb_retptr( ( QObject* ) hbqt_par_QSignalMapper( 1 )->mapping( hbqt_par_QWidget( 2 ) ) ); +} + +/* + * QObject * mapping ( QObject * object ) const + */ +HB_FUNC( QT_QSIGNALMAPPER_MAPPING_3 ) +{ + hb_retptr( ( QObject* ) hbqt_par_QSignalMapper( 1 )->mapping( hbqt_par_QObject( 2 ) ) ); +} + +/* + * void removeMappings ( QObject * sender ) + */ +HB_FUNC( QT_QSIGNALMAPPER_REMOVEMAPPINGS ) +{ + hbqt_par_QSignalMapper( 1 )->removeMappings( hbqt_par_QObject( 2 ) ); +} + +/* + * void setMapping ( QObject * sender, int id ) + */ +HB_FUNC( QT_QSIGNALMAPPER_SETMAPPING ) +{ + hbqt_par_QSignalMapper( 1 )->setMapping( hbqt_par_QObject( 2 ), hb_parni( 3 ) ); +} + +/* + * void setMapping ( QObject * sender, const QString & text ) + */ +HB_FUNC( QT_QSIGNALMAPPER_SETMAPPING_1 ) +{ + hbqt_par_QSignalMapper( 1 )->setMapping( hbqt_par_QObject( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * void setMapping ( QObject * sender, QWidget * widget ) + */ +HB_FUNC( QT_QSIGNALMAPPER_SETMAPPING_2 ) +{ + hbqt_par_QSignalMapper( 1 )->setMapping( hbqt_par_QObject( 2 ), hbqt_par_QWidget( 3 ) ); +} + +/* + * void setMapping ( QObject * sender, QObject * object ) + */ +HB_FUNC( QT_QSIGNALMAPPER_SETMAPPING_3 ) +{ + hbqt_par_QSignalMapper( 1 )->setMapping( hbqt_par_QObject( 2 ), hbqt_par_QObject( 3 ) ); +} + +/* + * void map () + */ +HB_FUNC( QT_QSIGNALMAPPER_MAP ) +{ + hbqt_par_QSignalMapper( 1 )->map(); +} + +/* + * void map ( QObject * sender ) + */ +HB_FUNC( QT_QSIGNALMAPPER_MAP_1 ) +{ + hbqt_par_QSignalMapper( 1 )->map( hbqt_par_QObject( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qsize.cpp b/harbour/contrib/hbqt/hbqt_qsize.cpp new file mode 100644 index 0000000000..7dba331f54 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qsize.cpp @@ -0,0 +1,177 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QSize () + * QSize ( int width, int height ) + * QSize boundedTo ( const QSize & otherSize ) const + * QSize expandedTo ( const QSize & otherSize ) const + */ +HB_FUNC( QT_QSIZE ) +{ + hb_retptr( ( QSize* ) new QSize( hb_parni( 1 ), hb_parni( 2 ) ) ); +} + +/* + * int height () const + */ +HB_FUNC( QT_QSIZE_HEIGHT ) +{ + hb_retni( hbqt_par_QSize( 1 )->height() ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QSIZE_ISEMPTY ) +{ + hb_retl( hbqt_par_QSize( 1 )->isEmpty() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QSIZE_ISNULL ) +{ + hb_retl( hbqt_par_QSize( 1 )->isNull() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QSIZE_ISVALID ) +{ + hb_retl( hbqt_par_QSize( 1 )->isValid() ); +} + +/* + * int & rheight () + */ +HB_FUNC( QT_QSIZE_RHEIGHT ) +{ + hb_retni( hbqt_par_QSize( 1 )->rheight() ); +} + +/* + * int & rwidth () + */ +HB_FUNC( QT_QSIZE_RWIDTH ) +{ + hb_retni( hbqt_par_QSize( 1 )->rwidth() ); +} + +/* + * void scale ( int width, int height, Qt::AspectRatioMode mode ) + */ +HB_FUNC( QT_QSIZE_SCALE ) +{ + hbqt_par_QSize( 1 )->scale( hb_parni( 2 ), hb_parni( 3 ), ( Qt::AspectRatioMode ) hb_parni( 4 ) ); +} + +/* + * void scale ( const QSize & size, Qt::AspectRatioMode mode ) + */ +HB_FUNC( QT_QSIZE_SCALE_1 ) +{ + hbqt_par_QSize( 1 )->scale( *hbqt_par_QSize( 2 ), ( Qt::AspectRatioMode ) hb_parni( 3 ) ); +} + +/* + * void setHeight ( int height ) + */ +HB_FUNC( QT_QSIZE_SETHEIGHT ) +{ + hbqt_par_QSize( 1 )->setHeight( hb_parni( 2 ) ); +} + +/* + * void setWidth ( int width ) + */ +HB_FUNC( QT_QSIZE_SETWIDTH ) +{ + hbqt_par_QSize( 1 )->setWidth( hb_parni( 2 ) ); +} + +/* + * void transpose () + */ +HB_FUNC( QT_QSIZE_TRANSPOSE ) +{ + hbqt_par_QSize( 1 )->transpose(); +} + +/* + * int width () const + */ +HB_FUNC( QT_QSIZE_WIDTH ) +{ + hb_retni( hbqt_par_QSize( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qsizef.cpp b/harbour/contrib/hbqt/hbqt_qsizef.cpp new file mode 100644 index 0000000000..4280a4439c --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qsizef.cpp @@ -0,0 +1,186 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QSizeF () + * QSizeF ( const QSize & size ) + * QSizeF ( qreal width, qreal height ) + * QSizeF boundedTo ( const QSizeF & otherSize ) const + * QSizeF expandedTo ( const QSizeF & otherSize ) const + */ +HB_FUNC( QT_QSIZEF ) +{ + hb_retptr( ( QSizeF* ) new QSizeF( hb_parnd( 1 ), hb_parnd( 2 ) ) ); +} + +/* + * qreal height () const + */ +HB_FUNC( QT_QSIZEF_HEIGHT ) +{ + hb_retnd( hbqt_par_QSizeF( 1 )->height() ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QSIZEF_ISEMPTY ) +{ + hb_retl( hbqt_par_QSizeF( 1 )->isEmpty() ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QSIZEF_ISNULL ) +{ + hb_retl( hbqt_par_QSizeF( 1 )->isNull() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QSIZEF_ISVALID ) +{ + hb_retl( hbqt_par_QSizeF( 1 )->isValid() ); +} + +/* + * qreal & rheight () + */ +HB_FUNC( QT_QSIZEF_RHEIGHT ) +{ + hb_retnd( hbqt_par_QSizeF( 1 )->rheight() ); +} + +/* + * qreal & rwidth () + */ +HB_FUNC( QT_QSIZEF_RWIDTH ) +{ + hb_retnd( hbqt_par_QSizeF( 1 )->rwidth() ); +} + +/* + * void scale ( qreal width, qreal height, Qt::AspectRatioMode mode ) + */ +HB_FUNC( QT_QSIZEF_SCALE ) +{ + hbqt_par_QSizeF( 1 )->scale( hb_parnd( 2 ), hb_parnd( 3 ), ( Qt::AspectRatioMode ) hb_parni( 4 ) ); +} + +/* + * void scale ( const QSizeF & size, Qt::AspectRatioMode mode ) + */ +HB_FUNC( QT_QSIZEF_SCALE_1 ) +{ + hbqt_par_QSizeF( 1 )->scale( *hbqt_par_QSizeF( 2 ), ( Qt::AspectRatioMode ) hb_parni( 3 ) ); +} + +/* + * void setHeight ( qreal height ) + */ +HB_FUNC( QT_QSIZEF_SETHEIGHT ) +{ + hbqt_par_QSizeF( 1 )->setHeight( hb_parnd( 2 ) ); +} + +/* + * void setWidth ( qreal width ) + */ +HB_FUNC( QT_QSIZEF_SETWIDTH ) +{ + hbqt_par_QSizeF( 1 )->setWidth( hb_parnd( 2 ) ); +} + +/* + * QSize toSize () const + */ +HB_FUNC( QT_QSIZEF_TOSIZE ) +{ + hb_retptr( new QSize( hbqt_par_QSizeF( 1 )->toSize() ) ); +} + +/* + * void transpose () + */ +HB_FUNC( QT_QSIZEF_TRANSPOSE ) +{ + hbqt_par_QSizeF( 1 )->transpose(); +} + +/* + * qreal width () const + */ +HB_FUNC( QT_QSIZEF_WIDTH ) +{ + hb_retnd( hbqt_par_QSizeF( 1 )->width() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qsizegrip.cpp b/harbour/contrib/hbqt/hbqt_qsizegrip.cpp index 9446d769a0..90ec50960b 100644 --- a/harbour/contrib/hbqt/hbqt_qsizegrip.cpp +++ b/harbour/contrib/hbqt/hbqt_qsizegrip.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qslider.cpp b/harbour/contrib/hbqt/hbqt_qslider.cpp index dd01a995e6..4536781620 100644 --- a/harbour/contrib/hbqt/hbqt_qslider.cpp +++ b/harbour/contrib/hbqt/hbqt_qslider.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -98,7 +97,7 @@ HB_FUNC( QT_QSLIDER_SETTICKPOSITION ) */ HB_FUNC( QT_QSLIDER_TICKINTERVAL ) { - hb_retni( hbqt_par_QSlider( 1 )->tickInterval( ) ); + hb_retni( hbqt_par_QSlider( 1 )->tickInterval() ); } /* @@ -106,7 +105,7 @@ HB_FUNC( QT_QSLIDER_TICKINTERVAL ) */ HB_FUNC( QT_QSLIDER_TICKPOSITION ) { - hb_retni( hbqt_par_QSlider( 1 )->tickPosition( ) ); + hb_retni( ( QSlider::TickPosition ) hbqt_par_QSlider( 1 )->tickPosition() ); } diff --git a/harbour/contrib/hbqt/hbqt_qspinbox.cpp b/harbour/contrib/hbqt/hbqt_qspinbox.cpp index 85a93a9687..af4d8534a6 100644 --- a/harbour/contrib/hbqt/hbqt_qspinbox.cpp +++ b/harbour/contrib/hbqt/hbqt_qspinbox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -77,7 +76,7 @@ HB_FUNC( QT_QSPINBOX ) */ HB_FUNC( QT_QSPINBOX_CLEANTEXT ) { - hb_retc( hbqt_par_QSpinBox( 1 )->cleanText( ).toLatin1().data() ); + hb_retc( hbqt_par_QSpinBox( 1 )->cleanText().toLatin1().data() ); } /* @@ -85,7 +84,7 @@ HB_FUNC( QT_QSPINBOX_CLEANTEXT ) */ HB_FUNC( QT_QSPINBOX_MAXIMUM ) { - hb_retni( hbqt_par_QSpinBox( 1 )->maximum( ) ); + hb_retni( hbqt_par_QSpinBox( 1 )->maximum() ); } /* @@ -93,7 +92,7 @@ HB_FUNC( QT_QSPINBOX_MAXIMUM ) */ HB_FUNC( QT_QSPINBOX_MINIMUM ) { - hb_retni( hbqt_par_QSpinBox( 1 )->minimum( ) ); + hb_retni( hbqt_par_QSpinBox( 1 )->minimum() ); } /* @@ -101,7 +100,7 @@ HB_FUNC( QT_QSPINBOX_MINIMUM ) */ HB_FUNC( QT_QSPINBOX_PREFIX ) { - hb_retc( hbqt_par_QSpinBox( 1 )->prefix( ).toLatin1().data() ); + hb_retc( hbqt_par_QSpinBox( 1 )->prefix().toLatin1().data() ); } /* @@ -157,7 +156,7 @@ HB_FUNC( QT_QSPINBOX_SETSUFFIX ) */ HB_FUNC( QT_QSPINBOX_SINGLESTEP ) { - hb_retni( hbqt_par_QSpinBox( 1 )->singleStep( ) ); + hb_retni( hbqt_par_QSpinBox( 1 )->singleStep() ); } /* @@ -165,7 +164,7 @@ HB_FUNC( QT_QSPINBOX_SINGLESTEP ) */ HB_FUNC( QT_QSPINBOX_SUFFIX ) { - hb_retc( hbqt_par_QSpinBox( 1 )->suffix( ).toLatin1().data() ); + hb_retc( hbqt_par_QSpinBox( 1 )->suffix().toLatin1().data() ); } /* @@ -173,7 +172,15 @@ HB_FUNC( QT_QSPINBOX_SUFFIX ) */ HB_FUNC( QT_QSPINBOX_VALUE ) { - hb_retni( hbqt_par_QSpinBox( 1 )->value( ) ); + hb_retni( hbqt_par_QSpinBox( 1 )->value() ); +} + +/* + * void setValue ( int val ) + */ +HB_FUNC( QT_QSPINBOX_SETVALUE ) +{ + hbqt_par_QSpinBox( 1 )->setValue( hb_parni( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qsplashscreen.cpp b/harbour/contrib/hbqt/hbqt_qsplashscreen.cpp new file mode 100644 index 0000000000..76366ea77d --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qsplashscreen.cpp @@ -0,0 +1,128 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QSplashScreen ( const QPixmap & pixmap = QPixmap(), Qt::WindowFlags f = 0 ) + * QSplashScreen ( QWidget * parent, const QPixmap & pixmap = QPixmap(), Qt::WindowFlags f = 0 ) + * virtual ~QSplashScreen () + */ +HB_FUNC( QT_QSPLASHSCREEN ) +{ + hb_retptr( new QSplashScreen( hbqt_par_QWidget( 1 ) ) ); +} + +/* + * void finish ( QWidget * mainWin ) + */ +HB_FUNC( QT_QSPLASHSCREEN_FINISH ) +{ + hbqt_par_QSplashScreen( 1 )->finish( hbqt_par_QWidget( 2 ) ); +} + +/* + * const QPixmap pixmap () const + */ +HB_FUNC( QT_QSPLASHSCREEN_PIXMAP ) +{ + hb_retptr( new QPixmap( hbqt_par_QSplashScreen( 1 )->pixmap() ) ); +} + +/* + * void repaint () + */ +HB_FUNC( QT_QSPLASHSCREEN_REPAINT ) +{ + hbqt_par_QSplashScreen( 1 )->repaint(); +} + +/* + * void setPixmap ( const QPixmap & pixmap ) + */ +HB_FUNC( QT_QSPLASHSCREEN_SETPIXMAP ) +{ + hbqt_par_QSplashScreen( 1 )->setPixmap( *hbqt_par_QPixmap( 2 ) ); +} + +/* + * void clearMessage () + */ +HB_FUNC( QT_QSPLASHSCREEN_CLEARMESSAGE ) +{ + hbqt_par_QSplashScreen( 1 )->clearMessage(); +} + +/* + * void showMessage ( const QString & message, int alignment = Qt::AlignLeft, const QColor & color = Qt::black ) + */ +HB_FUNC( QT_QSPLASHSCREEN_SHOWMESSAGE ) +{ + hbqt_par_QSplashScreen( 1 )->showMessage( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? Qt::AlignLeft : hb_parni( 3 ) ), *hbqt_par_QColor( 4 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qsplitter.cpp b/harbour/contrib/hbqt/hbqt_qsplitter.cpp index 3cb06d1587..2ff40e050b 100644 --- a/harbour/contrib/hbqt/hbqt_qsplitter.cpp +++ b/harbour/contrib/hbqt/hbqt_qsplitter.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,19 +59,15 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 18/23 [ 78.26% ] ] - * + * Constructed[ 21/23 [ 91.30% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * void getRange ( int index, int * min, int * max ) const - * bool restoreState ( const QByteArray & state ) - * QByteArray saveState () const + * * void setSizes ( const QList & list ) * QList sizes () const - */ + */ #include @@ -103,7 +99,7 @@ HB_FUNC( QT_QSPLITTER_ADDWIDGET ) */ HB_FUNC( QT_QSPLITTER_CHILDRENCOLLAPSIBLE ) { - hb_retl( hbqt_par_QSplitter( 1 )->childrenCollapsible( ) ); + hb_retl( hbqt_par_QSplitter( 1 )->childrenCollapsible() ); } /* @@ -111,7 +107,21 @@ HB_FUNC( QT_QSPLITTER_CHILDRENCOLLAPSIBLE ) */ HB_FUNC( QT_QSPLITTER_COUNT ) { - hb_retni( hbqt_par_QSplitter( 1 )->count( ) ); + hb_retni( hbqt_par_QSplitter( 1 )->count() ); +} + +/* + * void getRange ( int index, int * min, int * max ) const + */ +HB_FUNC( QT_QSPLITTER_GETRANGE ) +{ + int iMin = 0; + int iMax = 0; + + hbqt_par_QSplitter( 1 )->getRange( hb_parni( 2 ), &iMin, &iMax ); + + hb_storni( iMin, 3 ); + hb_storni( iMax, 4 ); } /* @@ -127,7 +137,7 @@ HB_FUNC( QT_QSPLITTER_HANDLE ) */ HB_FUNC( QT_QSPLITTER_HANDLEWIDTH ) { - hb_retni( hbqt_par_QSplitter( 1 )->handleWidth( ) ); + hb_retni( hbqt_par_QSplitter( 1 )->handleWidth() ); } /* @@ -159,7 +169,7 @@ HB_FUNC( QT_QSPLITTER_ISCOLLAPSIBLE ) */ HB_FUNC( QT_QSPLITTER_OPAQUERESIZE ) { - hb_retl( hbqt_par_QSplitter( 1 )->opaqueResize( ) ); + hb_retl( hbqt_par_QSplitter( 1 )->opaqueResize() ); } /* @@ -167,7 +177,7 @@ HB_FUNC( QT_QSPLITTER_OPAQUERESIZE ) */ HB_FUNC( QT_QSPLITTER_ORIENTATION ) { - hb_retni( hbqt_par_QSplitter( 1 )->orientation( ) ); + hb_retni( ( Qt::Orientation ) hbqt_par_QSplitter( 1 )->orientation() ); } /* @@ -175,7 +185,23 @@ HB_FUNC( QT_QSPLITTER_ORIENTATION ) */ HB_FUNC( QT_QSPLITTER_REFRESH ) { - hbqt_par_QSplitter( 1 )->refresh( ); + hbqt_par_QSplitter( 1 )->refresh(); +} + +/* + * bool restoreState ( const QByteArray & state ) + */ +HB_FUNC( QT_QSPLITTER_RESTORESTATE ) +{ + hb_retl( hbqt_par_QSplitter( 1 )->restoreState( *hbqt_par_QByteArray( 2 ) ) ); +} + +/* + * QByteArray saveState () const + */ +HB_FUNC( QT_QSPLITTER_SAVESTATE ) +{ + hb_retptr( new QByteArray( hbqt_par_QSplitter( 1 )->saveState() ) ); } /* diff --git a/harbour/contrib/hbqt/hbqt_qstatusbar.cpp b/harbour/contrib/hbqt/hbqt_qstatusbar.cpp new file mode 100644 index 0000000000..bbdeea9df7 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qstatusbar.cpp @@ -0,0 +1,159 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QStatusBar ( QWidget * parent = 0 ) + * virtual ~QStatusBar () + */ +HB_FUNC( QT_QSTATUSBAR ) +{ + hb_retptr( ( QStatusBar* ) new QStatusBar( hbqt_par_QWidget( 1 ) ) ); +} + +/* + * void addPermanentWidget ( QWidget * widget, int stretch = 0 ) + */ +HB_FUNC( QT_QSTATUSBAR_ADDPERMANENTWIDGET ) +{ + hbqt_par_QStatusBar( 1 )->addPermanentWidget( hbqt_par_QWidget( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); +} + +/* + * void addWidget ( QWidget * widget, int stretch = 0 ) + */ +HB_FUNC( QT_QSTATUSBAR_ADDWIDGET ) +{ + hbqt_par_QStatusBar( 1 )->addWidget( hbqt_par_QWidget( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); +} + +/* + * QString currentMessage () const + */ +HB_FUNC( QT_QSTATUSBAR_CURRENTMESSAGE ) +{ + hb_retc( hbqt_par_QStatusBar( 1 )->currentMessage().toLatin1().data() ); +} + +/* + * int insertPermanentWidget ( int index, QWidget * widget, int stretch = 0 ) + */ +HB_FUNC( QT_QSTATUSBAR_INSERTPERMANENTWIDGET ) +{ + hb_retni( hbqt_par_QStatusBar( 1 )->insertPermanentWidget( hb_parni( 2 ), hbqt_par_QWidget( 3 ), ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) ) ) ); +} + +/* + * int insertWidget ( int index, QWidget * widget, int stretch = 0 ) + */ +HB_FUNC( QT_QSTATUSBAR_INSERTWIDGET ) +{ + hb_retni( hbqt_par_QStatusBar( 1 )->insertWidget( hb_parni( 2 ), hbqt_par_QWidget( 3 ), ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) ) ) ); +} + +/* + * bool isSizeGripEnabled () const + */ +HB_FUNC( QT_QSTATUSBAR_ISSIZEGRIPENABLED ) +{ + hb_retl( hbqt_par_QStatusBar( 1 )->isSizeGripEnabled() ); +} + +/* + * void removeWidget ( QWidget * widget ) + */ +HB_FUNC( QT_QSTATUSBAR_REMOVEWIDGET ) +{ + hbqt_par_QStatusBar( 1 )->removeWidget( hbqt_par_QWidget( 2 ) ); +} + +/* + * void setSizeGripEnabled ( bool ) + */ +HB_FUNC( QT_QSTATUSBAR_SETSIZEGRIPENABLED ) +{ + hbqt_par_QStatusBar( 1 )->setSizeGripEnabled( hb_parl( 2 ) ); +} + +/* + * void clearMessage () + */ +HB_FUNC( QT_QSTATUSBAR_CLEARMESSAGE ) +{ + hbqt_par_QStatusBar( 1 )->clearMessage(); +} + +/* + * void showMessage ( const QString & message, int timeout = 0 ) + */ +HB_FUNC( QT_QSTATUSBAR_SHOWMESSAGE ) +{ + hbqt_par_QStatusBar( 1 )->showMessage( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qstyle.cpp b/harbour/contrib/hbqt/hbqt_qstyle.cpp new file mode 100644 index 0000000000..4ff4166f1b --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qstyle.cpp @@ -0,0 +1,263 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QStyle () + * virtual ~QStyle () + */ +HB_FUNC( QT_QSTYLE ) +{ + +} + +/* + * int combinedLayoutSpacing ( QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption * option = 0, QWidget * widget = 0 ) const + */ +HB_FUNC( QT_QSTYLE_COMBINEDLAYOUTSPACING ) +{ + hb_retni( hbqt_par_QStyle( 1 )->combinedLayoutSpacing( ( QSizePolicy::ControlTypes ) hb_parni( 2 ), ( QSizePolicy::ControlTypes ) hb_parni( 3 ), ( Qt::Orientation ) hb_parni( 4 ), hbqt_par_QStyleOption( 5 ), hbqt_par_QWidget( 6 ) ) ); +} + +/* + * virtual void drawComplexControl ( ComplexControl control, const QStyleOptionComplex * option, QPainter * painter, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_DRAWCOMPLEXCONTROL ) +{ + hbqt_par_QStyle( 1 )->drawComplexControl( ( QStyle::ComplexControl ) hb_parni( 2 ), hbqt_par_QStyleOptionComplex( 3 ), hbqt_par_QPainter( 4 ), hbqt_par_QWidget( 5 ) ); +} + +/* + * virtual void drawControl ( ControlElement element, const QStyleOption * option, QPainter * painter, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_DRAWCONTROL ) +{ + hbqt_par_QStyle( 1 )->drawControl( ( QStyle::ControlElement ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), hbqt_par_QPainter( 4 ), hbqt_par_QWidget( 5 ) ); +} + +/* + * virtual void drawItemPixmap ( QPainter * painter, const QRect & rectangle, int alignment, const QPixmap & pixmap ) const + */ +HB_FUNC( QT_QSTYLE_DRAWITEMPIXMAP ) +{ + hbqt_par_QStyle( 1 )->drawItemPixmap( hbqt_par_QPainter( 2 ), *hbqt_par_QRect( 3 ), hb_parni( 4 ), *hbqt_par_QPixmap( 5 ) ); +} + +/* + * virtual void drawItemText ( QPainter * painter, const QRect & rectangle, int alignment, const QPalette & palette, bool enabled, const QString & text, QPalette::ColorRole textRole = QPalette::NoRole ) const + */ +HB_FUNC( QT_QSTYLE_DRAWITEMTEXT ) +{ + hbqt_par_QStyle( 1 )->drawItemText( hbqt_par_QPainter( 2 ), *hbqt_par_QRect( 3 ), hb_parni( 4 ), *hbqt_par_QPalette( 5 ), hb_parl( 6 ), hbqt_par_QString( 7 ), ( HB_ISNIL( 8 ) ? ( QPalette::ColorRole ) QPalette::NoRole : ( QPalette::ColorRole ) hb_parni( 8 ) ) ); +} + +/* + * virtual void drawPrimitive ( PrimitiveElement element, const QStyleOption * option, QPainter * painter, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_DRAWPRIMITIVE ) +{ + hbqt_par_QStyle( 1 )->drawPrimitive( ( QStyle::PrimitiveElement ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), hbqt_par_QPainter( 4 ), hbqt_par_QWidget( 5 ) ); +} + +/* + * virtual QPixmap generatedIconPixmap ( QIcon::Mode iconMode, const QPixmap & pixmap, const QStyleOption * option ) const = 0 + */ +HB_FUNC( QT_QSTYLE_GENERATEDICONPIXMAP ) +{ + hb_retptr( new QPixmap( hbqt_par_QStyle( 1 )->generatedIconPixmap( ( QIcon::Mode ) hb_parni( 2 ), *hbqt_par_QPixmap( 3 ), hbqt_par_QStyleOption( 4 ) ) ) ); +} + +/* + * virtual SubControl hitTestComplexControl ( ComplexControl control, const QStyleOptionComplex * option, const QPoint & position, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_HITTESTCOMPLEXCONTROL ) +{ + hb_retni( ( QStyle::SubControl ) hbqt_par_QStyle( 1 )->hitTestComplexControl( ( QStyle::ComplexControl ) hb_parni( 2 ), hbqt_par_QStyleOptionComplex( 3 ), *hbqt_par_QPoint( 4 ), hbqt_par_QWidget( 5 ) ) ); +} + +/* + * virtual QRect itemPixmapRect ( const QRect & rectangle, int alignment, const QPixmap & pixmap ) const + */ +HB_FUNC( QT_QSTYLE_ITEMPIXMAPRECT ) +{ + hb_retptr( new QRect( hbqt_par_QStyle( 1 )->itemPixmapRect( *hbqt_par_QRect( 2 ), hb_parni( 3 ), *hbqt_par_QPixmap( 4 ) ) ) ); +} + +/* + * virtual QRect itemTextRect ( const QFontMetrics & metrics, const QRect & rectangle, int alignment, bool enabled, const QString & text ) const + */ +HB_FUNC( QT_QSTYLE_ITEMTEXTRECT ) +{ + hb_retptr( new QRect( hbqt_par_QStyle( 1 )->itemTextRect( *hbqt_par_QFontMetrics( 2 ), *hbqt_par_QRect( 3 ), hb_parni( 4 ), hb_parl( 5 ), hbqt_par_QString( 6 ) ) ) ); +} + +/* + * int layoutSpacing ( QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption * option = 0, const QWidget * widget = 0 ) const + */ +HB_FUNC( QT_QSTYLE_LAYOUTSPACING ) +{ + hb_retni( hbqt_par_QStyle( 1 )->layoutSpacing( ( QSizePolicy::ControlType ) hb_parni( 2 ), ( QSizePolicy::ControlType ) hb_parni( 3 ), ( Qt::Orientation ) hb_parni( 4 ), hbqt_par_QStyleOption( 5 ), hbqt_par_QWidget( 6 ) ) ); +} + +/* + * virtual int pixelMetric ( PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_PIXELMETRIC ) +{ + hb_retni( hbqt_par_QStyle( 1 )->pixelMetric( ( QStyle::PixelMetric ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), hbqt_par_QWidget( 4 ) ) ); +} + +/* + * virtual void polish ( QWidget * widget ) + */ +HB_FUNC( QT_QSTYLE_POLISH ) +{ + hbqt_par_QStyle( 1 )->polish( hbqt_par_QWidget( 2 ) ); +} + +/* + * virtual void polish ( QApplication * application ) + */ +HB_FUNC( QT_QSTYLE_POLISH_1 ) +{ + hbqt_par_QStyle( 1 )->polish( hbqt_par_QApplication( 2 ) ); +} + +/* + * virtual void polish ( QPalette & palette ) + */ +HB_FUNC( QT_QSTYLE_POLISH_2 ) +{ + hbqt_par_QStyle( 1 )->polish( *hbqt_par_QPalette( 2 ) ); +} + +/* + * virtual QSize sizeFromContents ( ContentsType type, const QStyleOption * option, const QSize & contentsSize, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_SIZEFROMCONTENTS ) +{ + hb_retptr( new QSize( hbqt_par_QStyle( 1 )->sizeFromContents( ( QStyle::ContentsType ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), *hbqt_par_QSize( 4 ), hbqt_par_QWidget( 5 ) ) ) ); +} + +/* + * QIcon standardIcon ( StandardPixmap standardIcon, const QStyleOption * option = 0, const QWidget * widget = 0 ) const + */ +HB_FUNC( QT_QSTYLE_STANDARDICON ) +{ + hb_retptr( new QIcon( hbqt_par_QStyle( 1 )->standardIcon( ( QStyle::StandardPixmap ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), hbqt_par_QWidget( 4 ) ) ) ); +} + +/* + * virtual QPalette standardPalette () const + */ +HB_FUNC( QT_QSTYLE_STANDARDPALETTE ) +{ + hb_retptr( new QPalette( hbqt_par_QStyle( 1 )->standardPalette() ) ); +} + +/* + * virtual int styleHint ( StyleHint hint, const QStyleOption * option = 0, const QWidget * widget = 0, QStyleHintReturn * returnData = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_STYLEHINT ) +{ + hb_retni( hbqt_par_QStyle( 1 )->styleHint( ( QStyle::StyleHint ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), hbqt_par_QWidget( 4 ), hbqt_par_QStyleHintReturn( 5 ) ) ); +} + +/* + * virtual QRect subControlRect ( ComplexControl control, const QStyleOptionComplex * option, SubControl subControl, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_SUBCONTROLRECT ) +{ + hb_retptr( new QRect( hbqt_par_QStyle( 1 )->subControlRect( ( QStyle::ComplexControl ) hb_parni( 2 ), hbqt_par_QStyleOptionComplex( 3 ), ( QStyle::SubControl ) hb_parni( 4 ), hbqt_par_QWidget( 5 ) ) ) ); +} + +/* + * virtual QRect subElementRect ( SubElement element, const QStyleOption * option, const QWidget * widget = 0 ) const = 0 + */ +HB_FUNC( QT_QSTYLE_SUBELEMENTRECT ) +{ + hb_retptr( new QRect( hbqt_par_QStyle( 1 )->subElementRect( ( QStyle::SubElement ) hb_parni( 2 ), hbqt_par_QStyleOption( 3 ), hbqt_par_QWidget( 4 ) ) ) ); +} + +/* + * virtual void unpolish ( QWidget * widget ) + */ +HB_FUNC( QT_QSTYLE_UNPOLISH ) +{ + hbqt_par_QStyle( 1 )->unpolish( hbqt_par_QWidget( 2 ) ); +} + +/* + * virtual void unpolish ( QApplication * application ) + */ +HB_FUNC( QT_QSTYLE_UNPOLISH_1 ) +{ + hbqt_par_QStyle( 1 )->unpolish( hbqt_par_QApplication( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtabbar.cpp b/harbour/contrib/hbqt/hbqt_qtabbar.cpp index 6b5ca8f163..8d9e4450ee 100644 --- a/harbour/contrib/hbqt/hbqt_qtabbar.cpp +++ b/harbour/contrib/hbqt/hbqt_qtabbar.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,28 +60,9 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 38/43 [ 88.37% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * void setTabData ( int index, const QVariant & data ) - * void setTabTextColor ( int index, const QColor & color ) - * QVariant tabData ( int index ) const - * QIcon tabIcon ( int index ) const - * QColor tabTextColor ( int index ) const - * - * *** Commented out protos which construct fine but do not compile *** - * - * // int addTab ( const QIcon & icon, const QString & text ) - * // int insertTab ( int index, const QIcon & icon, const QString & text ) - * // void setTabIcon ( int index, const QIcon & icon ) - */ - - #include - +#include +#include /* * QTabBar ( QWidget * parent = 0 ) @@ -105,7 +86,7 @@ HB_FUNC( QT_QTABBAR_ADDTAB ) */ HB_FUNC( QT_QTABBAR_COUNT ) { - hb_retni( hbqt_par_QTabBar( 1 )->count( ) ); + hb_retni( hbqt_par_QTabBar( 1 )->count() ); } /* @@ -113,7 +94,7 @@ HB_FUNC( QT_QTABBAR_COUNT ) */ HB_FUNC( QT_QTABBAR_CURRENTINDEX ) { - hb_retni( hbqt_par_QTabBar( 1 )->currentIndex( ) ); + hb_retni( hbqt_par_QTabBar( 1 )->currentIndex() ); } /* @@ -121,7 +102,7 @@ HB_FUNC( QT_QTABBAR_CURRENTINDEX ) */ HB_FUNC( QT_QTABBAR_DOCUMENTMODE ) { - hb_retl( hbqt_par_QTabBar( 1 )->documentMode( ) ); + hb_retl( hbqt_par_QTabBar( 1 )->documentMode() ); } /* @@ -129,7 +110,7 @@ HB_FUNC( QT_QTABBAR_DOCUMENTMODE ) */ HB_FUNC( QT_QTABBAR_DRAWBASE ) { - hb_retl( hbqt_par_QTabBar( 1 )->drawBase( ) ); + hb_retl( hbqt_par_QTabBar( 1 )->drawBase() ); } /* @@ -137,7 +118,7 @@ HB_FUNC( QT_QTABBAR_DRAWBASE ) */ HB_FUNC( QT_QTABBAR_ELIDEMODE ) { - hb_retni( hbqt_par_QTabBar( 1 )->elideMode( ) ); + hb_retni( ( Qt::TextElideMode ) hbqt_par_QTabBar( 1 )->elideMode() ); } /* @@ -145,7 +126,7 @@ HB_FUNC( QT_QTABBAR_ELIDEMODE ) */ HB_FUNC( QT_QTABBAR_EXPANDING ) { - hb_retl( hbqt_par_QTabBar( 1 )->expanding( ) ); + hb_retl( hbqt_par_QTabBar( 1 )->expanding() ); } /* @@ -153,7 +134,7 @@ HB_FUNC( QT_QTABBAR_EXPANDING ) */ HB_FUNC( QT_QTABBAR_ICONSIZE ) { - hbqt_ret_QSize( hbqt_par_QTabBar( 1 )->iconSize( ) ); + hb_retptr( new QSize( hbqt_par_QTabBar( 1 )->iconSize() ) ); } /* @@ -169,7 +150,7 @@ HB_FUNC( QT_QTABBAR_INSERTTAB ) */ HB_FUNC( QT_QTABBAR_ISMOVABLE ) { - hb_retl( hbqt_par_QTabBar( 1 )->isMovable( ) ); + hb_retl( hbqt_par_QTabBar( 1 )->isMovable() ); } /* @@ -201,7 +182,7 @@ HB_FUNC( QT_QTABBAR_REMOVETAB ) */ HB_FUNC( QT_QTABBAR_SELECTIONBEHAVIORONREMOVE ) { - hb_retni( hbqt_par_QTabBar( 1 )->selectionBehaviorOnRemove( ) ); + hb_retni( ( QTabBar::SelectionBehavior ) hbqt_par_QTabBar( 1 )->selectionBehaviorOnRemove() ); } /* @@ -241,7 +222,7 @@ HB_FUNC( QT_QTABBAR_SETEXPANDING ) */ HB_FUNC( QT_QTABBAR_SETICONSIZE ) { - hbqt_par_QTabBar( 1 )->setIconSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QTabBar( 1 )->setIconSize( *hbqt_par_QSize( 2 ) ); } /* @@ -276,6 +257,14 @@ HB_FUNC( QT_QTABBAR_SETTABBUTTON ) hbqt_par_QTabBar( 1 )->setTabButton( hb_parni( 2 ), ( QTabBar::ButtonPosition ) hb_parni( 3 ), hbqt_par_QWidget( 4 ) ); } +/* + * void setTabData ( int index, const QVariant & data ) + */ +HB_FUNC( QT_QTABBAR_SETTABDATA ) +{ + hbqt_par_QTabBar( 1 )->setTabData( hb_parni( 2 ), *hbqt_par_QVariant( 3 ) ); +} + /* * void setTabEnabled ( int index, bool enabled ) */ @@ -292,6 +281,14 @@ HB_FUNC( QT_QTABBAR_SETTABTEXT ) hbqt_par_QTabBar( 1 )->setTabText( hb_parni( 2 ), hbqt_par_QString( 3 ) ); } +/* + * void setTabTextColor ( int index, const QColor & color ) + */ +HB_FUNC( QT_QTABBAR_SETTABTEXTCOLOR ) +{ + hbqt_par_QTabBar( 1 )->setTabTextColor( hb_parni( 2 ), *hbqt_par_QColor( 3 ) ); +} + /* * void setTabToolTip ( int index, const QString & tip ) */ @@ -329,7 +326,7 @@ HB_FUNC( QT_QTABBAR_SETUSESSCROLLBUTTONS ) */ HB_FUNC( QT_QTABBAR_SHAPE ) { - hb_retni( hbqt_par_QTabBar( 1 )->shape( ) ); + hb_retni( ( QTabBar::Shape ) hbqt_par_QTabBar( 1 )->shape() ); } /* @@ -337,7 +334,7 @@ HB_FUNC( QT_QTABBAR_SHAPE ) */ HB_FUNC( QT_QTABBAR_TABAT ) { - hb_retni( hbqt_par_QTabBar( 1 )->tabAt( hbqt_const_QPoint( 2 ) ) ); + hb_retni( hbqt_par_QTabBar( 1 )->tabAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -348,12 +345,28 @@ HB_FUNC( QT_QTABBAR_TABBUTTON ) hb_retptr( ( QWidget* ) hbqt_par_QTabBar( 1 )->tabButton( hb_parni( 2 ), ( QTabBar::ButtonPosition ) hb_parni( 3 ) ) ); } +/* + * QVariant tabData ( int index ) const + */ +HB_FUNC( QT_QTABBAR_TABDATA ) +{ + hb_retptr( new QVariant( hbqt_par_QTabBar( 1 )->tabData( hb_parni( 2 ) ) ) ); +} + +/* + * QIcon tabIcon ( int index ) const + */ +HB_FUNC( QT_QTABBAR_TABICON ) +{ + hb_retptr( new QIcon( hbqt_par_QTabBar( 1 )->tabIcon( hb_parni( 2 ) ) ) ); +} + /* * QRect tabRect ( int index ) const */ HB_FUNC( QT_QTABBAR_TABRECT ) { - hbqt_ret_QRect( hbqt_par_QTabBar( 1 )->tabRect( hb_parni( 2 ) ) ); + hb_retptr( new QRect( hbqt_par_QTabBar( 1 )->tabRect( hb_parni( 2 ) ) ) ); } /* @@ -361,7 +374,15 @@ HB_FUNC( QT_QTABBAR_TABRECT ) */ HB_FUNC( QT_QTABBAR_TABTEXT ) { - hb_retc( hbqt_par_QTabBar( 1 )->tabText( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTabBar( 1 )->tabText( hb_parni( 2 ) ).toLatin1().data() ); +} + +/* + * QColor tabTextColor ( int index ) const + */ +HB_FUNC( QT_QTABBAR_TABTEXTCOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QTabBar( 1 )->tabTextColor( hb_parni( 2 ) ) ) ); } /* @@ -369,7 +390,7 @@ HB_FUNC( QT_QTABBAR_TABTEXT ) */ HB_FUNC( QT_QTABBAR_TABTOOLTIP ) { - hb_retc( hbqt_par_QTabBar( 1 )->tabToolTip( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTabBar( 1 )->tabToolTip( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -377,7 +398,7 @@ HB_FUNC( QT_QTABBAR_TABTOOLTIP ) */ HB_FUNC( QT_QTABBAR_TABWHATSTHIS ) { - hb_retc( hbqt_par_QTabBar( 1 )->tabWhatsThis( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTabBar( 1 )->tabWhatsThis( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -385,7 +406,7 @@ HB_FUNC( QT_QTABBAR_TABWHATSTHIS ) */ HB_FUNC( QT_QTABBAR_TABSCLOSABLE ) { - hb_retl( hbqt_par_QTabBar( 1 )->tabsClosable( ) ); + hb_retl( hbqt_par_QTabBar( 1 )->tabsClosable() ); } /* @@ -393,7 +414,15 @@ HB_FUNC( QT_QTABBAR_TABSCLOSABLE ) */ HB_FUNC( QT_QTABBAR_USESSCROLLBUTTONS ) { - hb_retl( hbqt_par_QTabBar( 1 )->usesScrollButtons( ) ); + hb_retl( hbqt_par_QTabBar( 1 )->usesScrollButtons() ); +} + +/* + * void setCurrentIndex ( int index ) + */ +HB_FUNC( QT_QTABBAR_SETCURRENTINDEX ) +{ + hbqt_par_QTabBar( 1 )->setCurrentIndex( hb_parni( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qtableview.cpp b/harbour/contrib/hbqt/hbqt_qtableview.cpp index eb92954839..03e7ea387b 100644 --- a/harbour/contrib/hbqt/hbqt_qtableview.cpp +++ b/harbour/contrib/hbqt/hbqt_qtableview.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 30/31 [ 96.77% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * virtual QModelIndex indexAt ( const QPoint & pos ) const - */ - - #include @@ -87,7 +77,7 @@ HB_FUNC( QT_QTABLEVIEW ) */ HB_FUNC( QT_QTABLEVIEW_CLEARSPANS ) { - hbqt_par_QTableView( 1 )->clearSpans( ); + hbqt_par_QTableView( 1 )->clearSpans(); } /* @@ -127,7 +117,7 @@ HB_FUNC( QT_QTABLEVIEW_COLUMNWIDTH ) */ HB_FUNC( QT_QTABLEVIEW_GRIDSTYLE ) { - hb_retni( hbqt_par_QTableView( 1 )->gridStyle( ) ); + hb_retni( ( Qt::PenStyle ) hbqt_par_QTableView( 1 )->gridStyle() ); } /* @@ -135,7 +125,15 @@ HB_FUNC( QT_QTABLEVIEW_GRIDSTYLE ) */ HB_FUNC( QT_QTABLEVIEW_HORIZONTALHEADER ) { - hb_retptr( ( QHeaderView* ) hbqt_par_QTableView( 1 )->horizontalHeader( ) ); + hb_retptr( ( QHeaderView* ) hbqt_par_QTableView( 1 )->horizontalHeader() ); +} + +/* + * virtual QModelIndex indexAt ( const QPoint & pos ) const + */ +HB_FUNC( QT_QTABLEVIEW_INDEXAT ) +{ + hb_retptr( new QModelIndex( hbqt_par_QTableView( 1 )->indexAt( *hbqt_par_QPoint( 2 ) ) ) ); } /* @@ -151,7 +149,7 @@ HB_FUNC( QT_QTABLEVIEW_ISCOLUMNHIDDEN ) */ HB_FUNC( QT_QTABLEVIEW_ISCORNERBUTTONENABLED ) { - hb_retl( hbqt_par_QTableView( 1 )->isCornerButtonEnabled( ) ); + hb_retl( hbqt_par_QTableView( 1 )->isCornerButtonEnabled() ); } /* @@ -167,7 +165,7 @@ HB_FUNC( QT_QTABLEVIEW_ISROWHIDDEN ) */ HB_FUNC( QT_QTABLEVIEW_ISSORTINGENABLED ) { - hb_retl( hbqt_par_QTableView( 1 )->isSortingEnabled( ) ); + hb_retl( hbqt_par_QTableView( 1 )->isSortingEnabled() ); } /* @@ -295,7 +293,7 @@ HB_FUNC( QT_QTABLEVIEW_SETWORDWRAP ) */ HB_FUNC( QT_QTABLEVIEW_SHOWGRID ) { - hb_retl( hbqt_par_QTableView( 1 )->showGrid( ) ); + hb_retl( hbqt_par_QTableView( 1 )->showGrid() ); } /* @@ -311,7 +309,7 @@ HB_FUNC( QT_QTABLEVIEW_SORTBYCOLUMN ) */ HB_FUNC( QT_QTABLEVIEW_VERTICALHEADER ) { - hb_retptr( ( QHeaderView* ) hbqt_par_QTableView( 1 )->verticalHeader( ) ); + hb_retptr( ( QHeaderView* ) hbqt_par_QTableView( 1 )->verticalHeader() ); } /* @@ -319,7 +317,95 @@ HB_FUNC( QT_QTABLEVIEW_VERTICALHEADER ) */ HB_FUNC( QT_QTABLEVIEW_WORDWRAP ) { - hb_retl( hbqt_par_QTableView( 1 )->wordWrap( ) ); + hb_retl( hbqt_par_QTableView( 1 )->wordWrap() ); +} + +/* + * void hideColumn ( int column ) + */ +HB_FUNC( QT_QTABLEVIEW_HIDECOLUMN ) +{ + hbqt_par_QTableView( 1 )->hideColumn( hb_parni( 2 ) ); +} + +/* + * void hideRow ( int row ) + */ +HB_FUNC( QT_QTABLEVIEW_HIDEROW ) +{ + hbqt_par_QTableView( 1 )->hideRow( hb_parni( 2 ) ); +} + +/* + * void resizeColumnToContents ( int column ) + */ +HB_FUNC( QT_QTABLEVIEW_RESIZECOLUMNTOCONTENTS ) +{ + hbqt_par_QTableView( 1 )->resizeColumnToContents( hb_parni( 2 ) ); +} + +/* + * void resizeColumnsToContents () + */ +HB_FUNC( QT_QTABLEVIEW_RESIZECOLUMNSTOCONTENTS ) +{ + hbqt_par_QTableView( 1 )->resizeColumnsToContents(); +} + +/* + * void resizeRowToContents ( int row ) + */ +HB_FUNC( QT_QTABLEVIEW_RESIZEROWTOCONTENTS ) +{ + hbqt_par_QTableView( 1 )->resizeRowToContents( hb_parni( 2 ) ); +} + +/* + * void resizeRowsToContents () + */ +HB_FUNC( QT_QTABLEVIEW_RESIZEROWSTOCONTENTS ) +{ + hbqt_par_QTableView( 1 )->resizeRowsToContents(); +} + +/* + * void selectColumn ( int column ) + */ +HB_FUNC( QT_QTABLEVIEW_SELECTCOLUMN ) +{ + hbqt_par_QTableView( 1 )->selectColumn( hb_parni( 2 ) ); +} + +/* + * void selectRow ( int row ) + */ +HB_FUNC( QT_QTABLEVIEW_SELECTROW ) +{ + hbqt_par_QTableView( 1 )->selectRow( hb_parni( 2 ) ); +} + +/* + * void setShowGrid ( bool show ) + */ +HB_FUNC( QT_QTABLEVIEW_SETSHOWGRID ) +{ + hbqt_par_QTableView( 1 )->setShowGrid( hb_parl( 2 ) ); +} + +/* + * void showColumn ( int column ) + */ +HB_FUNC( QT_QTABLEVIEW_SHOWCOLUMN ) +{ + hbqt_par_QTableView( 1 )->showColumn( hb_parni( 2 ) ); +} + +/* + * void showRow ( int row ) + */ +HB_FUNC( QT_QTABLEVIEW_SHOWROW ) +{ + hbqt_par_QTableView( 1 )->showRow( hb_parni( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qtablewidget.cpp b/harbour/contrib/hbqt/hbqt_qtablewidget.cpp index c991000884..84179e1101 100644 --- a/harbour/contrib/hbqt/hbqt_qtablewidget.cpp +++ b/harbour/contrib/hbqt/hbqt_qtablewidget.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,19 +59,16 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 36/41 [ 87.80% ] ] - * + * Constructed[ 46/49 [ 93.88% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * + * QList findItems ( const QString & text, Qt::MatchFlags flags ) const * QList selectedItems () * QList selectedRanges () const - * void setHorizontalHeaderLabels ( const QStringList & labels ) - * void setRangeSelected ( const QTableWidgetSelectionRange & range, bool select ) - * void setVerticalHeaderLabels ( const QStringList & labels ) - */ + */ #include @@ -119,7 +116,7 @@ HB_FUNC( QT_QTABLEWIDGET_COLUMN ) */ HB_FUNC( QT_QTABLEWIDGET_COLUMNCOUNT ) { - hb_retni( hbqt_par_QTableWidget( 1 )->columnCount( ) ); + hb_retni( hbqt_par_QTableWidget( 1 )->columnCount() ); } /* @@ -127,7 +124,7 @@ HB_FUNC( QT_QTABLEWIDGET_COLUMNCOUNT ) */ HB_FUNC( QT_QTABLEWIDGET_CURRENTCOLUMN ) { - hb_retni( hbqt_par_QTableWidget( 1 )->currentColumn( ) ); + hb_retni( hbqt_par_QTableWidget( 1 )->currentColumn() ); } /* @@ -135,7 +132,7 @@ HB_FUNC( QT_QTABLEWIDGET_CURRENTCOLUMN ) */ HB_FUNC( QT_QTABLEWIDGET_CURRENTITEM ) { - hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidget( 1 )->currentItem( ) ); + hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidget( 1 )->currentItem() ); } /* @@ -143,7 +140,7 @@ HB_FUNC( QT_QTABLEWIDGET_CURRENTITEM ) */ HB_FUNC( QT_QTABLEWIDGET_CURRENTROW ) { - hb_retni( hbqt_par_QTableWidget( 1 )->currentRow( ) ); + hb_retni( hbqt_par_QTableWidget( 1 )->currentRow() ); } /* @@ -175,7 +172,7 @@ HB_FUNC( QT_QTABLEWIDGET_ITEM ) */ HB_FUNC( QT_QTABLEWIDGET_ITEMAT ) { - hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidget( 1 )->itemAt( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidget( 1 )->itemAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -191,7 +188,7 @@ HB_FUNC( QT_QTABLEWIDGET_ITEMAT_1 ) */ HB_FUNC( QT_QTABLEWIDGET_ITEMPROTOTYPE ) { - hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidget( 1 )->itemPrototype( ) ); + hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidget( 1 )->itemPrototype() ); } /* @@ -223,7 +220,7 @@ HB_FUNC( QT_QTABLEWIDGET_ROW ) */ HB_FUNC( QT_QTABLEWIDGET_ROWCOUNT ) { - hb_retni( hbqt_par_QTableWidget( 1 )->rowCount( ) ); + hb_retni( hbqt_par_QTableWidget( 1 )->rowCount() ); } /* @@ -282,6 +279,14 @@ HB_FUNC( QT_QTABLEWIDGET_SETHORIZONTALHEADERITEM ) hbqt_par_QTableWidget( 1 )->setHorizontalHeaderItem( hb_parni( 2 ), hbqt_par_QTableWidgetItem( 3 ) ); } +/* + * void setHorizontalHeaderLabels ( const QStringList & labels ) + */ +HB_FUNC( QT_QTABLEWIDGET_SETHORIZONTALHEADERLABELS ) +{ + hbqt_par_QTableWidget( 1 )->setHorizontalHeaderLabels( *hbqt_par_QStringList( 2 ) ); +} + /* * void setItem ( int row, int column, QTableWidgetItem * item ) */ @@ -298,6 +303,14 @@ HB_FUNC( QT_QTABLEWIDGET_SETITEMPROTOTYPE ) hbqt_par_QTableWidget( 1 )->setItemPrototype( hbqt_par_QTableWidgetItem( 2 ) ); } +/* + * void setRangeSelected ( const QTableWidgetSelectionRange & range, bool select ) + */ +HB_FUNC( QT_QTABLEWIDGET_SETRANGESELECTED ) +{ + hbqt_par_QTableWidget( 1 )->setRangeSelected( *hbqt_par_QTableWidgetSelectionRange( 2 ), hb_parl( 3 ) ); +} + /* * void setRowCount ( int rows ) */ @@ -314,12 +327,20 @@ HB_FUNC( QT_QTABLEWIDGET_SETVERTICALHEADERITEM ) hbqt_par_QTableWidget( 1 )->setVerticalHeaderItem( hb_parni( 2 ), hbqt_par_QTableWidgetItem( 3 ) ); } +/* + * void setVerticalHeaderLabels ( const QStringList & labels ) + */ +HB_FUNC( QT_QTABLEWIDGET_SETVERTICALHEADERLABELS ) +{ + hbqt_par_QTableWidget( 1 )->setVerticalHeaderLabels( *hbqt_par_QStringList( 2 ) ); +} + /* * void sortItems ( int column, Qt::SortOrder order = Qt::AscendingOrder ) */ HB_FUNC( QT_QTABLEWIDGET_SORTITEMS ) { - hbqt_par_QTableWidget( 1 )->sortItems( hb_parni( 2 ), ( Qt::SortOrder ) hb_parni( 3 ) ); + hbqt_par_QTableWidget( 1 )->sortItems( hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::SortOrder ) Qt::AscendingOrder : ( Qt::SortOrder ) hb_parni( 3 ) ) ); } /* @@ -367,7 +388,7 @@ HB_FUNC( QT_QTABLEWIDGET_VISUALCOLUMN ) */ HB_FUNC( QT_QTABLEWIDGET_VISUALITEMRECT ) { - hbqt_ret_QRect( hbqt_par_QTableWidget( 1 )->visualItemRect( hbqt_par_QTableWidgetItem( 2 ) ) ); + hb_retptr( new QRect( hbqt_par_QTableWidget( 1 )->visualItemRect( hbqt_par_QTableWidgetItem( 2 ) ) ) ); } /* @@ -378,6 +399,62 @@ HB_FUNC( QT_QTABLEWIDGET_VISUALROW ) hb_retni( hbqt_par_QTableWidget( 1 )->visualRow( hb_parni( 2 ) ) ); } +/* + * void clear () + */ +HB_FUNC( QT_QTABLEWIDGET_CLEAR ) +{ + hbqt_par_QTableWidget( 1 )->clear(); +} + +/* + * void clearContents () + */ +HB_FUNC( QT_QTABLEWIDGET_CLEARCONTENTS ) +{ + hbqt_par_QTableWidget( 1 )->clearContents(); +} + +/* + * void insertColumn ( int column ) + */ +HB_FUNC( QT_QTABLEWIDGET_INSERTCOLUMN ) +{ + hbqt_par_QTableWidget( 1 )->insertColumn( hb_parni( 2 ) ); +} + +/* + * void insertRow ( int row ) + */ +HB_FUNC( QT_QTABLEWIDGET_INSERTROW ) +{ + hbqt_par_QTableWidget( 1 )->insertRow( hb_parni( 2 ) ); +} + +/* + * void removeColumn ( int column ) + */ +HB_FUNC( QT_QTABLEWIDGET_REMOVECOLUMN ) +{ + hbqt_par_QTableWidget( 1 )->removeColumn( hb_parni( 2 ) ); +} + +/* + * void removeRow ( int row ) + */ +HB_FUNC( QT_QTABLEWIDGET_REMOVEROW ) +{ + hbqt_par_QTableWidget( 1 )->removeRow( hb_parni( 2 ) ); +} + +/* + * void scrollToItem ( const QTableWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible ) + */ +HB_FUNC( QT_QTABLEWIDGET_SCROLLTOITEM ) +{ + hbqt_par_QTableWidget( 1 )->scrollToItem( hbqt_par_QTableWidgetItem( 2 ), ( HB_ISNIL( 3 ) ? ( QAbstractItemView::ScrollHint ) QTableWidget::EnsureVisible : ( QAbstractItemView::ScrollHint ) hb_parni( 3 ) ) ); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qtablewidgetitem.cpp b/harbour/contrib/hbqt/hbqt_qtablewidgetitem.cpp index cd88173968..d23e2cce62 100644 --- a/harbour/contrib/hbqt/hbqt_qtablewidgetitem.cpp +++ b/harbour/contrib/hbqt/hbqt_qtablewidgetitem.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,26 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 22/33 [ 66.67% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QBrush background () const - * virtual QVariant data ( int role ) const - * QFont font () const - * QBrush foreground () const - * QIcon icon () const - * virtual void read ( QDataStream & in ) - * void setBackground ( const QBrush & brush ) - * virtual void setData ( int role, const QVariant & value ) - * void setFont ( const QFont & font ) - * void setForeground ( const QBrush & brush ) - * virtual void write ( QDataStream & out ) const - */ - - #include @@ -100,19 +80,27 @@ HB_FUNC( QT_QTABLEWIDGETITEM ) { hb_retptr( ( QTableWidgetItem* ) new QTableWidgetItem( hb_parni( 1 ) ) ); } - + #if 0 hb_retptr( ( QTableWidgetItem* ) new QTableWidgetItem( QIcon( hbqt_par_QString( 1 ) ),hbqt_par_QString( 2 ), hb_parni( 3 ) ) ); hb_retptr( ( QTableWidgetItem* ) new QTableWidgetItem( hbqt_par_QTableWidgetItem( 1 ) ) ); #endif } +/* + * QBrush background () const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_BACKGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QTableWidgetItem( 1 )->background() ) ); +} + /* * Qt::CheckState checkState () const */ HB_FUNC( QT_QTABLEWIDGETITEM_CHECKSTATE ) { - hb_retni( hbqt_par_QTableWidgetItem( 1 )->checkState( ) ); + hb_retni( ( Qt::CheckState ) hbqt_par_QTableWidgetItem( 1 )->checkState() ); } /* @@ -120,7 +108,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_CHECKSTATE ) */ HB_FUNC( QT_QTABLEWIDGETITEM_CLONE ) { - hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidgetItem( 1 )->clone( ) ); + hb_retptr( ( QTableWidgetItem* ) hbqt_par_QTableWidgetItem( 1 )->clone() ); } /* @@ -128,7 +116,47 @@ HB_FUNC( QT_QTABLEWIDGETITEM_CLONE ) */ HB_FUNC( QT_QTABLEWIDGETITEM_COLUMN ) { - hb_retni( hbqt_par_QTableWidgetItem( 1 )->column( ) ); + hb_retni( hbqt_par_QTableWidgetItem( 1 )->column() ); +} + +/* + * virtual QVariant data ( int role ) const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_DATA ) +{ + hb_retptr( new QVariant( hbqt_par_QTableWidgetItem( 1 )->data( hb_parni( 2 ) ) ) ); +} + +/* + * Qt::ItemFlags flags () const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_FLAGS ) +{ + hb_retni( ( Qt::ItemFlags ) hbqt_par_QTableWidgetItem( 1 )->flags() ); +} + +/* + * QFont font () const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QTableWidgetItem( 1 )->font() ) ); +} + +/* + * QBrush foreground () const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_FOREGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QTableWidgetItem( 1 )->foreground() ) ); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QTableWidgetItem( 1 )->icon() ) ); } /* @@ -136,7 +164,15 @@ HB_FUNC( QT_QTABLEWIDGETITEM_COLUMN ) */ HB_FUNC( QT_QTABLEWIDGETITEM_ISSELECTED ) { - hb_retl( hbqt_par_QTableWidgetItem( 1 )->isSelected( ) ); + hb_retl( hbqt_par_QTableWidgetItem( 1 )->isSelected() ); +} + +/* + * virtual void read ( QDataStream & in ) + */ +HB_FUNC( QT_QTABLEWIDGETITEM_READ ) +{ + hbqt_par_QTableWidgetItem( 1 )->read( *hbqt_par_QDataStream( 2 ) ); } /* @@ -144,7 +180,15 @@ HB_FUNC( QT_QTABLEWIDGETITEM_ISSELECTED ) */ HB_FUNC( QT_QTABLEWIDGETITEM_ROW ) { - hb_retni( hbqt_par_QTableWidgetItem( 1 )->row( ) ); + hb_retni( hbqt_par_QTableWidgetItem( 1 )->row() ); +} + +/* + * void setBackground ( const QBrush & brush ) + */ +HB_FUNC( QT_QTABLEWIDGETITEM_SETBACKGROUND ) +{ + hbqt_par_QTableWidgetItem( 1 )->setBackground( *hbqt_par_QBrush( 2 ) ); } /* @@ -155,6 +199,38 @@ HB_FUNC( QT_QTABLEWIDGETITEM_SETCHECKSTATE ) hbqt_par_QTableWidgetItem( 1 )->setCheckState( ( Qt::CheckState ) hb_parni( 2 ) ); } +/* + * virtual void setData ( int role, const QVariant & value ) + */ +HB_FUNC( QT_QTABLEWIDGETITEM_SETDATA ) +{ + hbqt_par_QTableWidgetItem( 1 )->setData( hb_parni( 2 ), *hbqt_par_QVariant( 3 ) ); +} + +/* + * void setFlags ( Qt::ItemFlags flags ) + */ +HB_FUNC( QT_QTABLEWIDGETITEM_SETFLAGS ) +{ + hbqt_par_QTableWidgetItem( 1 )->setFlags( ( Qt::ItemFlags ) hb_parni( 2 ) ); +} + +/* + * void setFont ( const QFont & font ) + */ +HB_FUNC( QT_QTABLEWIDGETITEM_SETFONT ) +{ + hbqt_par_QTableWidgetItem( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setForeground ( const QBrush & brush ) + */ +HB_FUNC( QT_QTABLEWIDGETITEM_SETFOREGROUND ) +{ + hbqt_par_QTableWidgetItem( 1 )->setForeground( *hbqt_par_QBrush( 2 ) ); +} + /* * void setIcon ( const QIcon & icon ) */ @@ -176,7 +252,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_SETSELECTED ) */ HB_FUNC( QT_QTABLEWIDGETITEM_SETSIZEHINT ) { - hbqt_par_QTableWidgetItem( 1 )->setSizeHint( hbqt_const_QSize( 2 ) ); + hbqt_par_QTableWidgetItem( 1 )->setSizeHint( *hbqt_par_QSize( 2 ) ); } /* @@ -224,7 +300,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_SETWHATSTHIS ) */ HB_FUNC( QT_QTABLEWIDGETITEM_SIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QTableWidgetItem( 1 )->sizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QTableWidgetItem( 1 )->sizeHint() ) ); } /* @@ -232,7 +308,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_SIZEHINT ) */ HB_FUNC( QT_QTABLEWIDGETITEM_STATUSTIP ) { - hb_retc( hbqt_par_QTableWidgetItem( 1 )->statusTip( ).toLatin1().data() ); + hb_retc( hbqt_par_QTableWidgetItem( 1 )->statusTip().toLatin1().data() ); } /* @@ -240,7 +316,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_STATUSTIP ) */ HB_FUNC( QT_QTABLEWIDGETITEM_TABLEWIDGET ) { - hb_retptr( ( QTableWidget* ) hbqt_par_QTableWidgetItem( 1 )->tableWidget( ) ); + hb_retptr( ( QTableWidget* ) hbqt_par_QTableWidgetItem( 1 )->tableWidget() ); } /* @@ -248,7 +324,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_TABLEWIDGET ) */ HB_FUNC( QT_QTABLEWIDGETITEM_TEXT ) { - hb_retc( hbqt_par_QTableWidgetItem( 1 )->text( ).toLatin1().data() ); + hb_retc( hbqt_par_QTableWidgetItem( 1 )->text().toLatin1().data() ); } /* @@ -256,7 +332,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_TEXT ) */ HB_FUNC( QT_QTABLEWIDGETITEM_TEXTALIGNMENT ) { - hb_retni( hbqt_par_QTableWidgetItem( 1 )->textAlignment( ) ); + hb_retni( hbqt_par_QTableWidgetItem( 1 )->textAlignment() ); } /* @@ -264,7 +340,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_TEXTALIGNMENT ) */ HB_FUNC( QT_QTABLEWIDGETITEM_TOOLTIP ) { - hb_retc( hbqt_par_QTableWidgetItem( 1 )->toolTip( ).toLatin1().data() ); + hb_retc( hbqt_par_QTableWidgetItem( 1 )->toolTip().toLatin1().data() ); } /* @@ -272,7 +348,7 @@ HB_FUNC( QT_QTABLEWIDGETITEM_TOOLTIP ) */ HB_FUNC( QT_QTABLEWIDGETITEM_TYPE ) { - hb_retni( hbqt_par_QTableWidgetItem( 1 )->type( ) ); + hb_retni( hbqt_par_QTableWidgetItem( 1 )->type() ); } /* @@ -280,7 +356,15 @@ HB_FUNC( QT_QTABLEWIDGETITEM_TYPE ) */ HB_FUNC( QT_QTABLEWIDGETITEM_WHATSTHIS ) { - hb_retc( hbqt_par_QTableWidgetItem( 1 )->whatsThis( ).toLatin1().data() ); + hb_retc( hbqt_par_QTableWidgetItem( 1 )->whatsThis().toLatin1().data() ); +} + +/* + * virtual void write ( QDataStream & out ) const + */ +HB_FUNC( QT_QTABLEWIDGETITEM_WRITE ) +{ + hbqt_par_QTableWidgetItem( 1 )->write( *hbqt_par_QDataStream( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qtabwidget.cpp b/harbour/contrib/hbqt/hbqt_qtabwidget.cpp index 21ad9f64fa..8344d7972d 100644 --- a/harbour/contrib/hbqt/hbqt_qtabwidget.cpp +++ b/harbour/contrib/hbqt/hbqt_qtabwidget.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 38/39 [ 97.44% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QIcon tabIcon ( int index ) const - */ - - #include @@ -103,7 +93,7 @@ HB_FUNC( QT_QTABWIDGET_ADDTAB_1 ) */ HB_FUNC( QT_QTABWIDGET_CLEAR ) { - hbqt_par_QTabWidget( 1 )->clear( ); + hbqt_par_QTabWidget( 1 )->clear(); } /* @@ -111,7 +101,7 @@ HB_FUNC( QT_QTABWIDGET_CLEAR ) */ HB_FUNC( QT_QTABWIDGET_CORNERWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QTabWidget( 1 )->cornerWidget( ( Qt::Corner ) hb_parni( 2 ) ) ); + hb_retptr( ( QWidget* ) hbqt_par_QTabWidget( 1 )->cornerWidget( ( HB_ISNIL( 2 ) ? ( Qt::Corner ) Qt::TopRightCorner : ( Qt::Corner ) hb_parni( 2 ) ) ) ); } /* @@ -119,7 +109,7 @@ HB_FUNC( QT_QTABWIDGET_CORNERWIDGET ) */ HB_FUNC( QT_QTABWIDGET_COUNT ) { - hb_retni( hbqt_par_QTabWidget( 1 )->count( ) ); + hb_retni( hbqt_par_QTabWidget( 1 )->count() ); } /* @@ -127,7 +117,7 @@ HB_FUNC( QT_QTABWIDGET_COUNT ) */ HB_FUNC( QT_QTABWIDGET_CURRENTINDEX ) { - hb_retni( hbqt_par_QTabWidget( 1 )->currentIndex( ) ); + hb_retni( hbqt_par_QTabWidget( 1 )->currentIndex() ); } /* @@ -135,7 +125,7 @@ HB_FUNC( QT_QTABWIDGET_CURRENTINDEX ) */ HB_FUNC( QT_QTABWIDGET_CURRENTWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QTabWidget( 1 )->currentWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QTabWidget( 1 )->currentWidget() ); } /* @@ -143,7 +133,7 @@ HB_FUNC( QT_QTABWIDGET_CURRENTWIDGET ) */ HB_FUNC( QT_QTABWIDGET_DOCUMENTMODE ) { - hb_retl( hbqt_par_QTabWidget( 1 )->documentMode( ) ); + hb_retl( hbqt_par_QTabWidget( 1 )->documentMode() ); } /* @@ -151,7 +141,7 @@ HB_FUNC( QT_QTABWIDGET_DOCUMENTMODE ) */ HB_FUNC( QT_QTABWIDGET_ELIDEMODE ) { - hb_retni( hbqt_par_QTabWidget( 1 )->elideMode( ) ); + hb_retni( ( Qt::TextElideMode ) hbqt_par_QTabWidget( 1 )->elideMode() ); } /* @@ -159,7 +149,7 @@ HB_FUNC( QT_QTABWIDGET_ELIDEMODE ) */ HB_FUNC( QT_QTABWIDGET_ICONSIZE ) { - hbqt_ret_QSize( hbqt_par_QTabWidget( 1 )->iconSize( ) ); + hb_retptr( new QSize( hbqt_par_QTabWidget( 1 )->iconSize() ) ); } /* @@ -191,7 +181,7 @@ HB_FUNC( QT_QTABWIDGET_INSERTTAB_1 ) */ HB_FUNC( QT_QTABWIDGET_ISMOVABLE ) { - hb_retl( hbqt_par_QTabWidget( 1 )->isMovable( ) ); + hb_retl( hbqt_par_QTabWidget( 1 )->isMovable() ); } /* @@ -215,7 +205,7 @@ HB_FUNC( QT_QTABWIDGET_REMOVETAB ) */ HB_FUNC( QT_QTABWIDGET_SETCORNERWIDGET ) { - hbqt_par_QTabWidget( 1 )->setCornerWidget( hbqt_par_QWidget( 2 ), ( Qt::Corner ) hb_parni( 3 ) ); + hbqt_par_QTabWidget( 1 )->setCornerWidget( hbqt_par_QWidget( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::Corner ) Qt::TopRightCorner : ( Qt::Corner ) hb_parni( 3 ) ) ); } /* @@ -239,7 +229,7 @@ HB_FUNC( QT_QTABWIDGET_SETELIDEMODE ) */ HB_FUNC( QT_QTABWIDGET_SETICONSIZE ) { - hbqt_par_QTabWidget( 1 )->setIconSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QTabWidget( 1 )->setIconSize( *hbqt_par_QSize( 2 ) ); } /* @@ -322,12 +312,20 @@ HB_FUNC( QT_QTABWIDGET_SETUSESSCROLLBUTTONS ) hbqt_par_QTabWidget( 1 )->setUsesScrollButtons( hb_parl( 2 ) ); } +/* + * QIcon tabIcon ( int index ) const + */ +HB_FUNC( QT_QTABWIDGET_TABICON ) +{ + hb_retptr( new QIcon( hbqt_par_QTabWidget( 1 )->tabIcon( hb_parni( 2 ) ) ) ); +} + /* * TabPosition tabPosition () const */ HB_FUNC( QT_QTABWIDGET_TABPOSITION ) { - hb_retni( hbqt_par_QTabWidget( 1 )->tabPosition( ) ); + hb_retni( ( QTabWidget::TabPosition ) hbqt_par_QTabWidget( 1 )->tabPosition() ); } /* @@ -335,7 +333,7 @@ HB_FUNC( QT_QTABWIDGET_TABPOSITION ) */ HB_FUNC( QT_QTABWIDGET_TABSHAPE ) { - hb_retni( hbqt_par_QTabWidget( 1 )->tabShape( ) ); + hb_retni( ( QTabWidget::TabShape ) hbqt_par_QTabWidget( 1 )->tabShape() ); } /* @@ -343,7 +341,7 @@ HB_FUNC( QT_QTABWIDGET_TABSHAPE ) */ HB_FUNC( QT_QTABWIDGET_TABTEXT ) { - hb_retc( hbqt_par_QTabWidget( 1 )->tabText( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTabWidget( 1 )->tabText( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -351,7 +349,7 @@ HB_FUNC( QT_QTABWIDGET_TABTEXT ) */ HB_FUNC( QT_QTABWIDGET_TABTOOLTIP ) { - hb_retc( hbqt_par_QTabWidget( 1 )->tabToolTip( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTabWidget( 1 )->tabToolTip( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -359,7 +357,7 @@ HB_FUNC( QT_QTABWIDGET_TABTOOLTIP ) */ HB_FUNC( QT_QTABWIDGET_TABWHATSTHIS ) { - hb_retc( hbqt_par_QTabWidget( 1 )->tabWhatsThis( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTabWidget( 1 )->tabWhatsThis( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -367,7 +365,7 @@ HB_FUNC( QT_QTABWIDGET_TABWHATSTHIS ) */ HB_FUNC( QT_QTABWIDGET_TABSCLOSABLE ) { - hb_retl( hbqt_par_QTabWidget( 1 )->tabsClosable( ) ); + hb_retl( hbqt_par_QTabWidget( 1 )->tabsClosable() ); } /* @@ -375,7 +373,7 @@ HB_FUNC( QT_QTABWIDGET_TABSCLOSABLE ) */ HB_FUNC( QT_QTABWIDGET_USESSCROLLBUTTONS ) { - hb_retl( hbqt_par_QTabWidget( 1 )->usesScrollButtons( ) ); + hb_retl( hbqt_par_QTabWidget( 1 )->usesScrollButtons() ); } /* @@ -386,6 +384,22 @@ HB_FUNC( QT_QTABWIDGET_WIDGET ) hb_retptr( ( QWidget* ) hbqt_par_QTabWidget( 1 )->widget( hb_parni( 2 ) ) ); } +/* + * void setCurrentIndex ( int index ) + */ +HB_FUNC( QT_QTABWIDGET_SETCURRENTINDEX ) +{ + hbqt_par_QTabWidget( 1 )->setCurrentIndex( hb_parni( 2 ) ); +} + +/* + * void setCurrentWidget ( QWidget * widget ) + */ +HB_FUNC( QT_QTABWIDGET_SETCURRENTWIDGET ) +{ + hbqt_par_QTabWidget( 1 )->setCurrentWidget( hbqt_par_QWidget( 2 ) ); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qtextedit.cpp b/harbour/contrib/hbqt/hbqt_qtextedit.cpp index 58c345d02b..0d49ed2c79 100644 --- a/harbour/contrib/hbqt/hbqt_qtextedit.cpp +++ b/harbour/contrib/hbqt/hbqt_qtextedit.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,27 +59,18 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 44/60 [ 73.33% ] ] - * + * Constructed[ 81/86 [ 94.19% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * QTextCharFormat currentCharFormat () const - * QFont currentFont () const - * QTextCursor cursorForPosition ( const QPoint & pos ) const - * QRect cursorRect ( const QTextCursor & cursor ) const + * + * QTextEdit ( QWidget * parent = 0 ) + * QTextEdit ( const QString & text, QWidget * parent = 0 ) + * virtual ~QTextEdit () * QList extraSelections () const - * virtual QVariant loadResource ( int type, const QUrl & name ) - * void mergeCurrentCharFormat ( const QTextCharFormat & modifier ) - * void setCurrentCharFormat ( const QTextCharFormat & format ) * void setExtraSelections ( const QList & selections ) - * void setTextCursor ( const QTextCursor & cursor ) - * QColor textBackgroundColor () const - * QColor textColor () const - * QTextCursor textCursor () const - */ + */ #include @@ -101,7 +92,7 @@ HB_FUNC( QT_QTEXTEDIT ) */ HB_FUNC( QT_QTEXTEDIT_ACCEPTRICHTEXT ) { - hb_retl( hbqt_par_QTextEdit( 1 )->acceptRichText( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->acceptRichText() ); } /* @@ -109,7 +100,7 @@ HB_FUNC( QT_QTEXTEDIT_ACCEPTRICHTEXT ) */ HB_FUNC( QT_QTEXTEDIT_ALIGNMENT ) { - hb_retni( hbqt_par_QTextEdit( 1 )->alignment( ) ); + hb_retni( ( Qt::Alignment ) hbqt_par_QTextEdit( 1 )->alignment() ); } /* @@ -117,7 +108,7 @@ HB_FUNC( QT_QTEXTEDIT_ALIGNMENT ) */ HB_FUNC( QT_QTEXTEDIT_ANCHORAT ) { - hb_retc( hbqt_par_QTextEdit( 1 )->anchorAt( hbqt_const_QPoint( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTextEdit( 1 )->anchorAt( *hbqt_par_QPoint( 2 ) ).toLatin1().data() ); } /* @@ -125,7 +116,7 @@ HB_FUNC( QT_QTEXTEDIT_ANCHORAT ) */ HB_FUNC( QT_QTEXTEDIT_AUTOFORMATTING ) { - hb_retni( hbqt_par_QTextEdit( 1 )->autoFormatting( ) ); + hb_retni( ( QTextEdit::AutoFormatting ) hbqt_par_QTextEdit( 1 )->autoFormatting() ); } /* @@ -133,7 +124,7 @@ HB_FUNC( QT_QTEXTEDIT_AUTOFORMATTING ) */ HB_FUNC( QT_QTEXTEDIT_CANPASTE ) { - hb_retl( hbqt_par_QTextEdit( 1 )->canPaste( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->canPaste() ); } /* @@ -141,7 +132,7 @@ HB_FUNC( QT_QTEXTEDIT_CANPASTE ) */ HB_FUNC( QT_QTEXTEDIT_CREATESTANDARDCONTEXTMENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QTextEdit( 1 )->createStandardContextMenu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QTextEdit( 1 )->createStandardContextMenu() ); } /* @@ -149,15 +140,47 @@ HB_FUNC( QT_QTEXTEDIT_CREATESTANDARDCONTEXTMENU ) */ HB_FUNC( QT_QTEXTEDIT_CREATESTANDARDCONTEXTMENU_1 ) { - hb_retptr( ( QMenu* ) hbqt_par_QTextEdit( 1 )->createStandardContextMenu( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( ( QMenu* ) hbqt_par_QTextEdit( 1 )->createStandardContextMenu( *hbqt_par_QPoint( 2 ) ) ); +} + +/* + * QTextCharFormat currentCharFormat () const + */ +HB_FUNC( QT_QTEXTEDIT_CURRENTCHARFORMAT ) +{ + hb_retptr( new QTextCharFormat( hbqt_par_QTextEdit( 1 )->currentCharFormat() ) ); +} + +/* + * QFont currentFont () const + */ +HB_FUNC( QT_QTEXTEDIT_CURRENTFONT ) +{ + hb_retptr( new QFont( hbqt_par_QTextEdit( 1 )->currentFont() ) ); +} + +/* + * QTextCursor cursorForPosition ( const QPoint & pos ) const + */ +HB_FUNC( QT_QTEXTEDIT_CURSORFORPOSITION ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextEdit( 1 )->cursorForPosition( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * QRect cursorRect ( const QTextCursor & cursor ) const + */ +HB_FUNC( QT_QTEXTEDIT_CURSORRECT ) +{ + hb_retptr( new QRect( hbqt_par_QTextEdit( 1 )->cursorRect( *hbqt_par_QTextCursor( 2 ) ) ) ); } /* * QRect cursorRect () const */ -HB_FUNC( QT_QTEXTEDIT_CURSORRECT ) +HB_FUNC( QT_QTEXTEDIT_CURSORRECT_1 ) { - hbqt_ret_QRect( hbqt_par_QTextEdit( 1 )->cursorRect( ) ); + hb_retptr( new QRect( hbqt_par_QTextEdit( 1 )->cursorRect() ) ); } /* @@ -165,7 +188,7 @@ HB_FUNC( QT_QTEXTEDIT_CURSORRECT ) */ HB_FUNC( QT_QTEXTEDIT_CURSORWIDTH ) { - hb_retni( hbqt_par_QTextEdit( 1 )->cursorWidth( ) ); + hb_retni( hbqt_par_QTextEdit( 1 )->cursorWidth() ); } /* @@ -173,7 +196,7 @@ HB_FUNC( QT_QTEXTEDIT_CURSORWIDTH ) */ HB_FUNC( QT_QTEXTEDIT_DOCUMENT ) { - hb_retptr( ( QTextDocument* ) hbqt_par_QTextEdit( 1 )->document( ) ); + hb_retptr( ( QTextDocument* ) hbqt_par_QTextEdit( 1 )->document() ); } /* @@ -181,7 +204,7 @@ HB_FUNC( QT_QTEXTEDIT_DOCUMENT ) */ HB_FUNC( QT_QTEXTEDIT_DOCUMENTTITLE ) { - hb_retc( hbqt_par_QTextEdit( 1 )->documentTitle( ).toLatin1().data() ); + hb_retc( hbqt_par_QTextEdit( 1 )->documentTitle().toLatin1().data() ); } /* @@ -189,7 +212,7 @@ HB_FUNC( QT_QTEXTEDIT_DOCUMENTTITLE ) */ HB_FUNC( QT_QTEXTEDIT_ENSURECURSORVISIBLE ) { - hbqt_par_QTextEdit( 1 )->ensureCursorVisible( ); + hbqt_par_QTextEdit( 1 )->ensureCursorVisible(); } /* @@ -197,7 +220,7 @@ HB_FUNC( QT_QTEXTEDIT_ENSURECURSORVISIBLE ) */ HB_FUNC( QT_QTEXTEDIT_FIND ) { - hb_retl( hbqt_par_QTextEdit( 1 )->find( hbqt_par_QString( 2 ), ( QTextDocument::FindFlags ) hb_parni( 3 ) ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->find( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? ( QTextDocument::FindFlags ) 0 : ( QTextDocument::FindFlags ) hb_parni( 3 ) ) ) ); } /* @@ -205,7 +228,7 @@ HB_FUNC( QT_QTEXTEDIT_FIND ) */ HB_FUNC( QT_QTEXTEDIT_FONTFAMILY ) { - hb_retc( hbqt_par_QTextEdit( 1 )->fontFamily( ).toLatin1().data() ); + hb_retc( hbqt_par_QTextEdit( 1 )->fontFamily().toLatin1().data() ); } /* @@ -213,7 +236,7 @@ HB_FUNC( QT_QTEXTEDIT_FONTFAMILY ) */ HB_FUNC( QT_QTEXTEDIT_FONTITALIC ) { - hb_retl( hbqt_par_QTextEdit( 1 )->fontItalic( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->fontItalic() ); } /* @@ -221,7 +244,7 @@ HB_FUNC( QT_QTEXTEDIT_FONTITALIC ) */ HB_FUNC( QT_QTEXTEDIT_FONTPOINTSIZE ) { - hb_retnd( hbqt_par_QTextEdit( 1 )->fontPointSize( ) ); + hb_retnd( hbqt_par_QTextEdit( 1 )->fontPointSize() ); } /* @@ -229,7 +252,7 @@ HB_FUNC( QT_QTEXTEDIT_FONTPOINTSIZE ) */ HB_FUNC( QT_QTEXTEDIT_FONTUNDERLINE ) { - hb_retl( hbqt_par_QTextEdit( 1 )->fontUnderline( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->fontUnderline() ); } /* @@ -237,7 +260,7 @@ HB_FUNC( QT_QTEXTEDIT_FONTUNDERLINE ) */ HB_FUNC( QT_QTEXTEDIT_FONTWEIGHT ) { - hb_retni( hbqt_par_QTextEdit( 1 )->fontWeight( ) ); + hb_retni( hbqt_par_QTextEdit( 1 )->fontWeight() ); } /* @@ -245,7 +268,7 @@ HB_FUNC( QT_QTEXTEDIT_FONTWEIGHT ) */ HB_FUNC( QT_QTEXTEDIT_ISREADONLY ) { - hb_retl( hbqt_par_QTextEdit( 1 )->isReadOnly( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->isReadOnly() ); } /* @@ -253,7 +276,7 @@ HB_FUNC( QT_QTEXTEDIT_ISREADONLY ) */ HB_FUNC( QT_QTEXTEDIT_ISUNDOREDOENABLED ) { - hb_retl( hbqt_par_QTextEdit( 1 )->isUndoRedoEnabled( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->isUndoRedoEnabled() ); } /* @@ -261,7 +284,7 @@ HB_FUNC( QT_QTEXTEDIT_ISUNDOREDOENABLED ) */ HB_FUNC( QT_QTEXTEDIT_LINEWRAPCOLUMNORWIDTH ) { - hb_retni( hbqt_par_QTextEdit( 1 )->lineWrapColumnOrWidth( ) ); + hb_retni( hbqt_par_QTextEdit( 1 )->lineWrapColumnOrWidth() ); } /* @@ -269,7 +292,23 @@ HB_FUNC( QT_QTEXTEDIT_LINEWRAPCOLUMNORWIDTH ) */ HB_FUNC( QT_QTEXTEDIT_LINEWRAPMODE ) { - hb_retni( hbqt_par_QTextEdit( 1 )->lineWrapMode( ) ); + hb_retni( ( QTextEdit::LineWrapMode ) hbqt_par_QTextEdit( 1 )->lineWrapMode() ); +} + +/* + * virtual QVariant loadResource ( int type, const QUrl & name ) + */ +HB_FUNC( QT_QTEXTEDIT_LOADRESOURCE ) +{ + hb_retptr( new QVariant( hbqt_par_QTextEdit( 1 )->loadResource( hb_parni( 2 ), *hbqt_par_QUrl( 3 ) ) ) ); +} + +/* + * void mergeCurrentCharFormat ( const QTextCharFormat & modifier ) + */ +HB_FUNC( QT_QTEXTEDIT_MERGECURRENTCHARFORMAT ) +{ + hbqt_par_QTextEdit( 1 )->mergeCurrentCharFormat( *hbqt_par_QTextCharFormat( 2 ) ); } /* @@ -277,7 +316,7 @@ HB_FUNC( QT_QTEXTEDIT_LINEWRAPMODE ) */ HB_FUNC( QT_QTEXTEDIT_MOVECURSOR ) { - hbqt_par_QTextEdit( 1 )->moveCursor( ( QTextCursor::MoveOperation ) hb_parni( 2 ), ( QTextCursor::MoveMode ) hb_parni( 3 ) ); + hbqt_par_QTextEdit( 1 )->moveCursor( ( QTextCursor::MoveOperation ) hb_parni( 2 ), ( HB_ISNIL( 3 ) ? ( QTextCursor::MoveMode ) QTextCursor::MoveAnchor : ( QTextCursor::MoveMode ) hb_parni( 3 ) ) ); } /* @@ -285,7 +324,7 @@ HB_FUNC( QT_QTEXTEDIT_MOVECURSOR ) */ HB_FUNC( QT_QTEXTEDIT_OVERWRITEMODE ) { - hb_retl( hbqt_par_QTextEdit( 1 )->overwriteMode( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->overwriteMode() ); } /* @@ -312,6 +351,14 @@ HB_FUNC( QT_QTEXTEDIT_SETAUTOFORMATTING ) hbqt_par_QTextEdit( 1 )->setAutoFormatting( ( QTextEdit::AutoFormatting ) hb_parni( 2 ) ); } +/* + * void setCurrentCharFormat ( const QTextCharFormat & format ) + */ +HB_FUNC( QT_QTEXTEDIT_SETCURRENTCHARFORMAT ) +{ + hbqt_par_QTextEdit( 1 )->setCurrentCharFormat( *hbqt_par_QTextCharFormat( 2 ) ); +} + /* * void setCursorWidth ( int width ) */ @@ -384,6 +431,22 @@ HB_FUNC( QT_QTEXTEDIT_SETTABSTOPWIDTH ) hbqt_par_QTextEdit( 1 )->setTabStopWidth( hb_parni( 2 ) ); } +/* + * void setTextCursor ( const QTextCursor & cursor ) + */ +HB_FUNC( QT_QTEXTEDIT_SETTEXTCURSOR ) +{ + hbqt_par_QTextEdit( 1 )->setTextCursor( *hbqt_par_QTextCursor( 2 ) ); +} + +/* + * void setTextInteractionFlags ( Qt::TextInteractionFlags flags ) + */ +HB_FUNC( QT_QTEXTEDIT_SETTEXTINTERACTIONFLAGS ) +{ + hbqt_par_QTextEdit( 1 )->setTextInteractionFlags( ( Qt::TextInteractionFlags ) hb_parni( 2 ) ); +} + /* * void setUndoRedoEnabled ( bool enable ) */ @@ -405,7 +468,7 @@ HB_FUNC( QT_QTEXTEDIT_SETWORDWRAPMODE ) */ HB_FUNC( QT_QTEXTEDIT_TABCHANGESFOCUS ) { - hb_retl( hbqt_par_QTextEdit( 1 )->tabChangesFocus( ) ); + hb_retl( hbqt_par_QTextEdit( 1 )->tabChangesFocus() ); } /* @@ -413,7 +476,31 @@ HB_FUNC( QT_QTEXTEDIT_TABCHANGESFOCUS ) */ HB_FUNC( QT_QTEXTEDIT_TABSTOPWIDTH ) { - hb_retni( hbqt_par_QTextEdit( 1 )->tabStopWidth( ) ); + hb_retni( hbqt_par_QTextEdit( 1 )->tabStopWidth() ); +} + +/* + * QColor textBackgroundColor () const + */ +HB_FUNC( QT_QTEXTEDIT_TEXTBACKGROUNDCOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QTextEdit( 1 )->textBackgroundColor() ) ); +} + +/* + * QColor textColor () const + */ +HB_FUNC( QT_QTEXTEDIT_TEXTCOLOR ) +{ + hb_retptr( new QColor( hbqt_par_QTextEdit( 1 )->textColor() ) ); +} + +/* + * QTextCursor textCursor () const + */ +HB_FUNC( QT_QTEXTEDIT_TEXTCURSOR ) +{ + hb_retptr( new QTextCursor( hbqt_par_QTextEdit( 1 )->textCursor() ) ); } /* @@ -421,7 +508,7 @@ HB_FUNC( QT_QTEXTEDIT_TABSTOPWIDTH ) */ HB_FUNC( QT_QTEXTEDIT_TEXTINTERACTIONFLAGS ) { - hb_retni( hbqt_par_QTextEdit( 1 )->textInteractionFlags( ) ); + hb_retni( ( Qt::TextInteractionFlags ) hbqt_par_QTextEdit( 1 )->textInteractionFlags() ); } /* @@ -429,7 +516,7 @@ HB_FUNC( QT_QTEXTEDIT_TEXTINTERACTIONFLAGS ) */ HB_FUNC( QT_QTEXTEDIT_TOHTML ) { - hb_retc( hbqt_par_QTextEdit( 1 )->toHtml( ).toLatin1().data() ); + hb_retc( hbqt_par_QTextEdit( 1 )->toHtml().toLatin1().data() ); } /* @@ -437,7 +524,7 @@ HB_FUNC( QT_QTEXTEDIT_TOHTML ) */ HB_FUNC( QT_QTEXTEDIT_TOPLAINTEXT ) { - hb_retc( hbqt_par_QTextEdit( 1 )->toPlainText( ).toLatin1().data() ); + hb_retc( hbqt_par_QTextEdit( 1 )->toPlainText().toLatin1().data() ); } /* @@ -445,7 +532,207 @@ HB_FUNC( QT_QTEXTEDIT_TOPLAINTEXT ) */ HB_FUNC( QT_QTEXTEDIT_WORDWRAPMODE ) { - hb_retni( hbqt_par_QTextEdit( 1 )->wordWrapMode( ) ); + hb_retni( ( QTextOption::WrapMode ) hbqt_par_QTextEdit( 1 )->wordWrapMode() ); +} + +/* + * void append ( const QString & text ) + */ +HB_FUNC( QT_QTEXTEDIT_APPEND ) +{ + hbqt_par_QTextEdit( 1 )->append( hbqt_par_QString( 2 ) ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QTEXTEDIT_CLEAR ) +{ + hbqt_par_QTextEdit( 1 )->clear(); +} + +/* + * void copy () + */ +HB_FUNC( QT_QTEXTEDIT_COPY ) +{ + hbqt_par_QTextEdit( 1 )->copy(); +} + +/* + * void cut () + */ +HB_FUNC( QT_QTEXTEDIT_CUT ) +{ + hbqt_par_QTextEdit( 1 )->cut(); +} + +/* + * void insertHtml ( const QString & text ) + */ +HB_FUNC( QT_QTEXTEDIT_INSERTHTML ) +{ + hbqt_par_QTextEdit( 1 )->insertHtml( hbqt_par_QString( 2 ) ); +} + +/* + * void insertPlainText ( const QString & text ) + */ +HB_FUNC( QT_QTEXTEDIT_INSERTPLAINTEXT ) +{ + hbqt_par_QTextEdit( 1 )->insertPlainText( hbqt_par_QString( 2 ) ); +} + +/* + * void paste () + */ +HB_FUNC( QT_QTEXTEDIT_PASTE ) +{ + hbqt_par_QTextEdit( 1 )->paste(); +} + +/* + * void redo () + */ +HB_FUNC( QT_QTEXTEDIT_REDO ) +{ + hbqt_par_QTextEdit( 1 )->redo(); +} + +/* + * void scrollToAnchor ( const QString & name ) + */ +HB_FUNC( QT_QTEXTEDIT_SCROLLTOANCHOR ) +{ + hbqt_par_QTextEdit( 1 )->scrollToAnchor( hbqt_par_QString( 2 ) ); +} + +/* + * void selectAll () + */ +HB_FUNC( QT_QTEXTEDIT_SELECTALL ) +{ + hbqt_par_QTextEdit( 1 )->selectAll(); +} + +/* + * void setAlignment ( Qt::Alignment a ) + */ +HB_FUNC( QT_QTEXTEDIT_SETALIGNMENT ) +{ + hbqt_par_QTextEdit( 1 )->setAlignment( ( Qt::Alignment ) hb_parni( 2 ) ); +} + +/* + * void setCurrentFont ( const QFont & f ) + */ +HB_FUNC( QT_QTEXTEDIT_SETCURRENTFONT ) +{ + hbqt_par_QTextEdit( 1 )->setCurrentFont( *hbqt_par_QFont( 2 ) ); +} + +/* + * void setFontFamily ( const QString & fontFamily ) + */ +HB_FUNC( QT_QTEXTEDIT_SETFONTFAMILY ) +{ + hbqt_par_QTextEdit( 1 )->setFontFamily( hbqt_par_QString( 2 ) ); +} + +/* + * void setFontItalic ( bool italic ) + */ +HB_FUNC( QT_QTEXTEDIT_SETFONTITALIC ) +{ + hbqt_par_QTextEdit( 1 )->setFontItalic( hb_parl( 2 ) ); +} + +/* + * void setFontPointSize ( qreal s ) + */ +HB_FUNC( QT_QTEXTEDIT_SETFONTPOINTSIZE ) +{ + hbqt_par_QTextEdit( 1 )->setFontPointSize( hb_parnd( 2 ) ); +} + +/* + * void setFontUnderline ( bool underline ) + */ +HB_FUNC( QT_QTEXTEDIT_SETFONTUNDERLINE ) +{ + hbqt_par_QTextEdit( 1 )->setFontUnderline( hb_parl( 2 ) ); +} + +/* + * void setFontWeight ( int weight ) + */ +HB_FUNC( QT_QTEXTEDIT_SETFONTWEIGHT ) +{ + hbqt_par_QTextEdit( 1 )->setFontWeight( hb_parni( 2 ) ); +} + +/* + * void setHtml ( const QString & text ) + */ +HB_FUNC( QT_QTEXTEDIT_SETHTML ) +{ + hbqt_par_QTextEdit( 1 )->setHtml( hbqt_par_QString( 2 ) ); +} + +/* + * void setPlainText ( const QString & text ) + */ +HB_FUNC( QT_QTEXTEDIT_SETPLAINTEXT ) +{ + hbqt_par_QTextEdit( 1 )->setPlainText( hbqt_par_QString( 2 ) ); +} + +/* + * void setText ( const QString & text ) + */ +HB_FUNC( QT_QTEXTEDIT_SETTEXT ) +{ + hbqt_par_QTextEdit( 1 )->setText( hbqt_par_QString( 2 ) ); +} + +/* + * void setTextBackgroundColor ( const QColor & c ) + */ +HB_FUNC( QT_QTEXTEDIT_SETTEXTBACKGROUNDCOLOR ) +{ + hbqt_par_QTextEdit( 1 )->setTextBackgroundColor( *hbqt_par_QColor( 2 ) ); +} + +/* + * void setTextColor ( const QColor & c ) + */ +HB_FUNC( QT_QTEXTEDIT_SETTEXTCOLOR ) +{ + hbqt_par_QTextEdit( 1 )->setTextColor( *hbqt_par_QColor( 2 ) ); +} + +/* + * void undo () + */ +HB_FUNC( QT_QTEXTEDIT_UNDO ) +{ + hbqt_par_QTextEdit( 1 )->undo(); +} + +/* + * void zoomIn ( int range = 1 ) + */ +HB_FUNC( QT_QTEXTEDIT_ZOOMIN ) +{ + hbqt_par_QTextEdit( 1 )->zoomIn( ( HB_ISNIL( 2 ) ? 1 : hb_parni( 2 ) ) ); +} + +/* + * void zoomOut ( int range = 1 ) + */ +HB_FUNC( QT_QTEXTEDIT_ZOOMOUT ) +{ + hbqt_par_QTextEdit( 1 )->zoomOut( ( HB_ISNIL( 2 ) ? 1 : hb_parni( 2 ) ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qtimeedit.cpp b/harbour/contrib/hbqt/hbqt_qtimeedit.cpp index ed2040d56d..ac9037c488 100644 --- a/harbour/contrib/hbqt/hbqt_qtimeedit.cpp +++ b/harbour/contrib/hbqt/hbqt_qtimeedit.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qtimer.cpp b/harbour/contrib/hbqt/hbqt_qtimer.cpp new file mode 100644 index 0000000000..4930f3bfb8 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qtimer.cpp @@ -0,0 +1,151 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QTimer ( QObject * parent = 0 ) + * ~QTimer () + */ +HB_FUNC( QT_QTIMER ) +{ + hb_retptr( new QTimer( hbqt_par_QObject( 1 ) ) ); +} + +/* + * int interval () const + */ +HB_FUNC( QT_QTIMER_INTERVAL ) +{ + hb_retni( hbqt_par_QTimer( 1 )->interval() ); +} + +/* + * bool isActive () const + */ +HB_FUNC( QT_QTIMER_ISACTIVE ) +{ + hb_retl( hbqt_par_QTimer( 1 )->isActive() ); +} + +/* + * bool isSingleShot () const + */ +HB_FUNC( QT_QTIMER_ISSINGLESHOT ) +{ + hb_retl( hbqt_par_QTimer( 1 )->isSingleShot() ); +} + +/* + * void setInterval ( int msec ) + */ +HB_FUNC( QT_QTIMER_SETINTERVAL ) +{ + hbqt_par_QTimer( 1 )->setInterval( hb_parni( 2 ) ); +} + +/* + * void setSingleShot ( bool singleShot ) + */ +HB_FUNC( QT_QTIMER_SETSINGLESHOT ) +{ + hbqt_par_QTimer( 1 )->setSingleShot( hb_parl( 2 ) ); +} + +/* + * int timerId () const + */ +HB_FUNC( QT_QTIMER_TIMERID ) +{ + hb_retni( hbqt_par_QTimer( 1 )->timerId() ); +} + +/* + * void start () + */ +HB_FUNC( QT_QTIMER_START ) +{ + hbqt_par_QTimer( 1 )->start(); +} + +/* + * void stop () + */ +HB_FUNC( QT_QTIMER_STOP ) +{ + hbqt_par_QTimer( 1 )->stop(); +} + +/* + * void start ( int msec ) + */ +HB_FUNC( QT_QTIMER_START_1 ) +{ + hbqt_par_QTimer( 1 )->start( hb_parni( 2 ) ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qtoolbar.cpp b/harbour/contrib/hbqt/hbqt_qtoolbar.cpp index 25ad2fc693..b5a4bd5470 100644 --- a/harbour/contrib/hbqt/hbqt_qtoolbar.cpp +++ b/harbour/contrib/hbqt/hbqt_qtoolbar.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include #include @@ -82,7 +81,7 @@ HB_FUNC( QT_QTOOLBAR ) */ HB_FUNC( QT_QTOOLBAR_ACTIONAT ) { - hb_retptr( ( QAction* ) hbqt_par_QToolBar( 1 )->actionAt( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( ( QAction* ) hbqt_par_QToolBar( 1 )->actionAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -138,7 +137,7 @@ HB_FUNC( QT_QTOOLBAR_ADDACTION_4 ) */ HB_FUNC( QT_QTOOLBAR_ADDSEPARATOR ) { - hb_retptr( ( QAction* ) hbqt_par_QToolBar( 1 )->addSeparator( ) ); + hb_retptr( ( QAction* ) hbqt_par_QToolBar( 1 )->addSeparator() ); } /* @@ -154,7 +153,7 @@ HB_FUNC( QT_QTOOLBAR_ADDWIDGET ) */ HB_FUNC( QT_QTOOLBAR_ALLOWEDAREAS ) { - hb_retni( hbqt_par_QToolBar( 1 )->allowedAreas( ) ); + hb_retni( ( Qt::ToolBarAreas ) hbqt_par_QToolBar( 1 )->allowedAreas() ); } /* @@ -162,7 +161,7 @@ HB_FUNC( QT_QTOOLBAR_ALLOWEDAREAS ) */ HB_FUNC( QT_QTOOLBAR_CLEAR ) { - hbqt_par_QToolBar( 1 )->clear( ); + hbqt_par_QToolBar( 1 )->clear(); } /* @@ -170,7 +169,7 @@ HB_FUNC( QT_QTOOLBAR_CLEAR ) */ HB_FUNC( QT_QTOOLBAR_ICONSIZE ) { - hbqt_ret_QSize( hbqt_par_QToolBar( 1 )->iconSize( ) ); + hb_retptr( new QSize( hbqt_par_QToolBar( 1 )->iconSize() ) ); } /* @@ -202,7 +201,7 @@ HB_FUNC( QT_QTOOLBAR_ISAREAALLOWED ) */ HB_FUNC( QT_QTOOLBAR_ISFLOATABLE ) { - hb_retl( hbqt_par_QToolBar( 1 )->isFloatable( ) ); + hb_retl( hbqt_par_QToolBar( 1 )->isFloatable() ); } /* @@ -210,7 +209,7 @@ HB_FUNC( QT_QTOOLBAR_ISFLOATABLE ) */ HB_FUNC( QT_QTOOLBAR_ISFLOATING ) { - hb_retl( hbqt_par_QToolBar( 1 )->isFloating( ) ); + hb_retl( hbqt_par_QToolBar( 1 )->isFloating() ); } /* @@ -218,7 +217,7 @@ HB_FUNC( QT_QTOOLBAR_ISFLOATING ) */ HB_FUNC( QT_QTOOLBAR_ISMOVABLE ) { - hb_retl( hbqt_par_QToolBar( 1 )->isMovable( ) ); + hb_retl( hbqt_par_QToolBar( 1 )->isMovable() ); } /* @@ -226,7 +225,7 @@ HB_FUNC( QT_QTOOLBAR_ISMOVABLE ) */ HB_FUNC( QT_QTOOLBAR_ORIENTATION ) { - hb_retni( hbqt_par_QToolBar( 1 )->orientation( ) ); + hb_retni( ( Qt::Orientation ) hbqt_par_QToolBar( 1 )->orientation() ); } /* @@ -266,7 +265,7 @@ HB_FUNC( QT_QTOOLBAR_SETORIENTATION ) */ HB_FUNC( QT_QTOOLBAR_TOGGLEVIEWACTION ) { - hb_retptr( ( QAction* ) hbqt_par_QToolBar( 1 )->toggleViewAction( ) ); + hb_retptr( ( QAction* ) hbqt_par_QToolBar( 1 )->toggleViewAction() ); } /* @@ -274,7 +273,7 @@ HB_FUNC( QT_QTOOLBAR_TOGGLEVIEWACTION ) */ HB_FUNC( QT_QTOOLBAR_TOOLBUTTONSTYLE ) { - hb_retni( hbqt_par_QToolBar( 1 )->toolButtonStyle( ) ); + hb_retni( ( Qt::ToolButtonStyle ) hbqt_par_QToolBar( 1 )->toolButtonStyle() ); } /* @@ -285,6 +284,22 @@ HB_FUNC( QT_QTOOLBAR_WIDGETFORACTION ) hb_retptr( ( QWidget* ) hbqt_par_QToolBar( 1 )->widgetForAction( hbqt_par_QAction( 2 ) ) ); } +/* + * void setIconSize ( const QSize & iconSize ) + */ +HB_FUNC( QT_QTOOLBAR_SETICONSIZE ) +{ + hbqt_par_QToolBar( 1 )->setIconSize( *hbqt_par_QSize( 2 ) ); +} + +/* + * void setToolButtonStyle ( Qt::ToolButtonStyle toolButtonStyle ) + */ +HB_FUNC( QT_QTOOLBAR_SETTOOLBUTTONSTYLE ) +{ + hbqt_par_QToolBar( 1 )->setToolButtonStyle( ( Qt::ToolButtonStyle ) hb_parni( 2 ) ); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qtoolbox.cpp b/harbour/contrib/hbqt/hbqt_qtoolbox.cpp index 657b584d39..e7769208f5 100644 --- a/harbour/contrib/hbqt/hbqt_qtoolbox.cpp +++ b/harbour/contrib/hbqt/hbqt_qtoolbox.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,16 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 17/18 [ 94.44% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QIcon itemIcon ( int index ) const - */ - - #include @@ -103,7 +93,7 @@ HB_FUNC( QT_QTOOLBOX_ADDITEM_1 ) */ HB_FUNC( QT_QTOOLBOX_COUNT ) { - hb_retni( hbqt_par_QToolBox( 1 )->count( ) ); + hb_retni( hbqt_par_QToolBox( 1 )->count() ); } /* @@ -111,7 +101,7 @@ HB_FUNC( QT_QTOOLBOX_COUNT ) */ HB_FUNC( QT_QTOOLBOX_CURRENTINDEX ) { - hb_retni( hbqt_par_QToolBox( 1 )->currentIndex( ) ); + hb_retni( hbqt_par_QToolBox( 1 )->currentIndex() ); } /* @@ -119,7 +109,7 @@ HB_FUNC( QT_QTOOLBOX_CURRENTINDEX ) */ HB_FUNC( QT_QTOOLBOX_CURRENTWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QToolBox( 1 )->currentWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QToolBox( 1 )->currentWidget() ); } /* @@ -154,12 +144,20 @@ HB_FUNC( QT_QTOOLBOX_ISITEMENABLED ) hb_retl( hbqt_par_QToolBox( 1 )->isItemEnabled( hb_parni( 2 ) ) ); } +/* + * QIcon itemIcon ( int index ) const + */ +HB_FUNC( QT_QTOOLBOX_ITEMICON ) +{ + hb_retptr( new QIcon( hbqt_par_QToolBox( 1 )->itemIcon( hb_parni( 2 ) ) ) ); +} + /* * QString itemText ( int index ) const */ HB_FUNC( QT_QTOOLBOX_ITEMTEXT ) { - hb_retc( hbqt_par_QToolBox( 1 )->itemText( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QToolBox( 1 )->itemText( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -167,7 +165,7 @@ HB_FUNC( QT_QTOOLBOX_ITEMTEXT ) */ HB_FUNC( QT_QTOOLBOX_ITEMTOOLTIP ) { - hb_retc( hbqt_par_QToolBox( 1 )->itemToolTip( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QToolBox( 1 )->itemToolTip( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -218,6 +216,22 @@ HB_FUNC( QT_QTOOLBOX_WIDGET ) hb_retptr( ( QWidget* ) hbqt_par_QToolBox( 1 )->widget( hb_parni( 2 ) ) ); } +/* + * void setCurrentIndex ( int index ) + */ +HB_FUNC( QT_QTOOLBOX_SETCURRENTINDEX ) +{ + hbqt_par_QToolBox( 1 )->setCurrentIndex( hb_parni( 2 ) ); +} + +/* + * void setCurrentWidget ( QWidget * widget ) + */ +HB_FUNC( QT_QTOOLBOX_SETCURRENTWIDGET ) +{ + hbqt_par_QToolBox( 1 )->setCurrentWidget( hbqt_par_QWidget( 2 ) ); +} + /*----------------------------------------------------------------------*/ #endif /* #if QT_VERSION >= 0x040500 */ diff --git a/harbour/contrib/hbqt/hbqt_qtoolbutton.cpp b/harbour/contrib/hbqt/hbqt_qtoolbutton.cpp index 21e75382f1..a57b370914 100644 --- a/harbour/contrib/hbqt/hbqt_qtoolbutton.cpp +++ b/harbour/contrib/hbqt/hbqt_qtoolbutton.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include @@ -78,7 +77,7 @@ HB_FUNC( QT_QTOOLBUTTON ) */ HB_FUNC( QT_QTOOLBUTTON_ARROWTYPE ) { - hb_retni( hbqt_par_QToolButton( 1 )->arrowType( ) ); + hb_retni( ( Qt::ArrowType ) hbqt_par_QToolButton( 1 )->arrowType() ); } /* @@ -86,7 +85,7 @@ HB_FUNC( QT_QTOOLBUTTON_ARROWTYPE ) */ HB_FUNC( QT_QTOOLBUTTON_AUTORAISE ) { - hb_retl( hbqt_par_QToolButton( 1 )->autoRaise( ) ); + hb_retl( hbqt_par_QToolButton( 1 )->autoRaise() ); } /* @@ -94,7 +93,7 @@ HB_FUNC( QT_QTOOLBUTTON_AUTORAISE ) */ HB_FUNC( QT_QTOOLBUTTON_DEFAULTACTION ) { - hb_retptr( ( QAction* ) hbqt_par_QToolButton( 1 )->defaultAction( ) ); + hb_retptr( ( QAction* ) hbqt_par_QToolButton( 1 )->defaultAction() ); } /* @@ -102,7 +101,7 @@ HB_FUNC( QT_QTOOLBUTTON_DEFAULTACTION ) */ HB_FUNC( QT_QTOOLBUTTON_MENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QToolButton( 1 )->menu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QToolButton( 1 )->menu() ); } /* @@ -110,7 +109,7 @@ HB_FUNC( QT_QTOOLBUTTON_MENU ) */ HB_FUNC( QT_QTOOLBUTTON_POPUPMODE ) { - hb_retni( hbqt_par_QToolButton( 1 )->popupMode( ) ); + hb_retni( ( QToolButton::ToolButtonPopupMode ) hbqt_par_QToolButton( 1 )->popupMode() ); } /* @@ -150,7 +149,31 @@ HB_FUNC( QT_QTOOLBUTTON_SETPOPUPMODE ) */ HB_FUNC( QT_QTOOLBUTTON_TOOLBUTTONSTYLE ) { - hb_retni( hbqt_par_QToolButton( 1 )->toolButtonStyle( ) ); + hb_retni( ( Qt::ToolButtonStyle ) hbqt_par_QToolButton( 1 )->toolButtonStyle() ); +} + +/* + * void setDefaultAction ( QAction * action ) + */ +HB_FUNC( QT_QTOOLBUTTON_SETDEFAULTACTION ) +{ + hbqt_par_QToolButton( 1 )->setDefaultAction( hbqt_par_QAction( 2 ) ); +} + +/* + * void setToolButtonStyle ( Qt::ToolButtonStyle style ) + */ +HB_FUNC( QT_QTOOLBUTTON_SETTOOLBUTTONSTYLE ) +{ + hbqt_par_QToolButton( 1 )->setToolButtonStyle( ( Qt::ToolButtonStyle ) hb_parni( 2 ) ); +} + +/* + * void showMenu () + */ +HB_FUNC( QT_QTOOLBUTTON_SHOWMENU ) +{ + hbqt_par_QToolButton( 1 )->showMenu(); } diff --git a/harbour/contrib/hbqt/hbqt_qtreeview.cpp b/harbour/contrib/hbqt/hbqt_qtreeview.cpp index d719886256..c3f1930a0b 100644 --- a/harbour/contrib/hbqt/hbqt_qtreeview.cpp +++ b/harbour/contrib/hbqt/hbqt_qtreeview.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,25 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 31/41 [ 75.61% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QModelIndex indexAbove ( const QModelIndex & index ) const - * QModelIndex indexBelow ( const QModelIndex & index ) const - * bool isExpanded ( const QModelIndex & index ) const - * bool isFirstColumnSpanned ( int row, const QModelIndex & parent ) const - * bool isRowHidden ( int row, const QModelIndex & parent ) const - * virtual void scrollTo ( const QModelIndex & index, ScrollHint hint = EnsureVisible ) - * void setExpanded ( const QModelIndex & index, bool expanded ) - * void setFirstColumnSpanned ( int row, const QModelIndex & parent, bool span ) - * void setRowHidden ( int row, const QModelIndex & parent, bool hide ) - * virtual QRect visualRect ( const QModelIndex & index ) const - */ - - #include @@ -96,7 +77,7 @@ HB_FUNC( QT_QTREEVIEW ) */ HB_FUNC( QT_QTREEVIEW_ALLCOLUMNSSHOWFOCUS ) { - hb_retl( hbqt_par_QTreeView( 1 )->allColumnsShowFocus( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->allColumnsShowFocus() ); } /* @@ -104,7 +85,7 @@ HB_FUNC( QT_QTREEVIEW_ALLCOLUMNSSHOWFOCUS ) */ HB_FUNC( QT_QTREEVIEW_AUTOEXPANDDELAY ) { - hb_retni( hbqt_par_QTreeView( 1 )->autoExpandDelay( ) ); + hb_retni( hbqt_par_QTreeView( 1 )->autoExpandDelay() ); } /* @@ -136,7 +117,7 @@ HB_FUNC( QT_QTREEVIEW_COLUMNWIDTH ) */ HB_FUNC( QT_QTREEVIEW_EXPANDSONDOUBLECLICK ) { - hb_retl( hbqt_par_QTreeView( 1 )->expandsOnDoubleClick( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->expandsOnDoubleClick() ); } /* @@ -144,7 +125,7 @@ HB_FUNC( QT_QTREEVIEW_EXPANDSONDOUBLECLICK ) */ HB_FUNC( QT_QTREEVIEW_HEADER ) { - hb_retptr( ( QHeaderView* ) hbqt_par_QTreeView( 1 )->header( ) ); + hb_retptr( ( QHeaderView* ) hbqt_par_QTreeView( 1 )->header() ); } /* @@ -152,7 +133,23 @@ HB_FUNC( QT_QTREEVIEW_HEADER ) */ HB_FUNC( QT_QTREEVIEW_INDENTATION ) { - hb_retni( hbqt_par_QTreeView( 1 )->indentation( ) ); + hb_retni( hbqt_par_QTreeView( 1 )->indentation() ); +} + +/* + * QModelIndex indexAbove ( const QModelIndex & index ) const + */ +HB_FUNC( QT_QTREEVIEW_INDEXABOVE ) +{ + hb_retptr( new QModelIndex( hbqt_par_QTreeView( 1 )->indexAbove( *hbqt_par_QModelIndex( 2 ) ) ) ); +} + +/* + * QModelIndex indexBelow ( const QModelIndex & index ) const + */ +HB_FUNC( QT_QTREEVIEW_INDEXBELOW ) +{ + hb_retptr( new QModelIndex( hbqt_par_QTreeView( 1 )->indexBelow( *hbqt_par_QModelIndex( 2 ) ) ) ); } /* @@ -160,7 +157,7 @@ HB_FUNC( QT_QTREEVIEW_INDENTATION ) */ HB_FUNC( QT_QTREEVIEW_ISANIMATED ) { - hb_retl( hbqt_par_QTreeView( 1 )->isAnimated( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->isAnimated() ); } /* @@ -171,12 +168,36 @@ HB_FUNC( QT_QTREEVIEW_ISCOLUMNHIDDEN ) hb_retl( hbqt_par_QTreeView( 1 )->isColumnHidden( hb_parni( 2 ) ) ); } +/* + * bool isExpanded ( const QModelIndex & index ) const + */ +HB_FUNC( QT_QTREEVIEW_ISEXPANDED ) +{ + hb_retl( hbqt_par_QTreeView( 1 )->isExpanded( *hbqt_par_QModelIndex( 2 ) ) ); +} + +/* + * bool isFirstColumnSpanned ( int row, const QModelIndex & parent ) const + */ +HB_FUNC( QT_QTREEVIEW_ISFIRSTCOLUMNSPANNED ) +{ + hb_retl( hbqt_par_QTreeView( 1 )->isFirstColumnSpanned( hb_parni( 2 ), *hbqt_par_QModelIndex( 3 ) ) ); +} + /* * bool isHeaderHidden () const */ HB_FUNC( QT_QTREEVIEW_ISHEADERHIDDEN ) { - hb_retl( hbqt_par_QTreeView( 1 )->isHeaderHidden( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->isHeaderHidden() ); +} + +/* + * bool isRowHidden ( int row, const QModelIndex & parent ) const + */ +HB_FUNC( QT_QTREEVIEW_ISROWHIDDEN ) +{ + hb_retl( hbqt_par_QTreeView( 1 )->isRowHidden( hb_parni( 2 ), *hbqt_par_QModelIndex( 3 ) ) ); } /* @@ -184,7 +205,7 @@ HB_FUNC( QT_QTREEVIEW_ISHEADERHIDDEN ) */ HB_FUNC( QT_QTREEVIEW_ISSORTINGENABLED ) { - hb_retl( hbqt_par_QTreeView( 1 )->isSortingEnabled( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->isSortingEnabled() ); } /* @@ -192,7 +213,7 @@ HB_FUNC( QT_QTREEVIEW_ISSORTINGENABLED ) */ HB_FUNC( QT_QTREEVIEW_ITEMSEXPANDABLE ) { - hb_retl( hbqt_par_QTreeView( 1 )->itemsExpandable( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->itemsExpandable() ); } /* @@ -200,7 +221,15 @@ HB_FUNC( QT_QTREEVIEW_ITEMSEXPANDABLE ) */ HB_FUNC( QT_QTREEVIEW_ROOTISDECORATED ) { - hb_retl( hbqt_par_QTreeView( 1 )->rootIsDecorated( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->rootIsDecorated() ); +} + +/* + * virtual void scrollTo ( const QModelIndex & index, ScrollHint hint = EnsureVisible ) + */ +HB_FUNC( QT_QTREEVIEW_SCROLLTO ) +{ + hbqt_par_QTreeView( 1 )->scrollTo( *hbqt_par_QModelIndex( 2 ), ( HB_ISNIL( 3 ) ? ( QTreeView::ScrollHint ) QTreeView::EnsureVisible : ( QTreeView::ScrollHint ) hb_parni( 3 ) ) ); } /* @@ -243,6 +272,14 @@ HB_FUNC( QT_QTREEVIEW_SETCOLUMNWIDTH ) hbqt_par_QTreeView( 1 )->setColumnWidth( hb_parni( 2 ), hb_parni( 3 ) ); } +/* + * void setExpanded ( const QModelIndex & index, bool expanded ) + */ +HB_FUNC( QT_QTREEVIEW_SETEXPANDED ) +{ + hbqt_par_QTreeView( 1 )->setExpanded( *hbqt_par_QModelIndex( 2 ), hb_parl( 3 ) ); +} + /* * void setExpandsOnDoubleClick ( bool enable ) */ @@ -251,6 +288,14 @@ HB_FUNC( QT_QTREEVIEW_SETEXPANDSONDOUBLECLICK ) hbqt_par_QTreeView( 1 )->setExpandsOnDoubleClick( hb_parl( 2 ) ); } +/* + * void setFirstColumnSpanned ( int row, const QModelIndex & parent, bool span ) + */ +HB_FUNC( QT_QTREEVIEW_SETFIRSTCOLUMNSPANNED ) +{ + hbqt_par_QTreeView( 1 )->setFirstColumnSpanned( hb_parni( 2 ), *hbqt_par_QModelIndex( 3 ), hb_parl( 4 ) ); +} + /* * void setHeader ( QHeaderView * header ) */ @@ -291,6 +336,14 @@ HB_FUNC( QT_QTREEVIEW_SETROOTISDECORATED ) hbqt_par_QTreeView( 1 )->setRootIsDecorated( hb_parl( 2 ) ); } +/* + * void setRowHidden ( int row, const QModelIndex & parent, bool hide ) + */ +HB_FUNC( QT_QTREEVIEW_SETROWHIDDEN ) +{ + hbqt_par_QTreeView( 1 )->setRowHidden( hb_parni( 2 ), *hbqt_par_QModelIndex( 3 ), hb_parl( 4 ) ); +} + /* * void setSortingEnabled ( bool enable ) */ @@ -328,7 +381,15 @@ HB_FUNC( QT_QTREEVIEW_SORTBYCOLUMN ) */ HB_FUNC( QT_QTREEVIEW_UNIFORMROWHEIGHTS ) { - hb_retl( hbqt_par_QTreeView( 1 )->uniformRowHeights( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->uniformRowHeights() ); +} + +/* + * virtual QRect visualRect ( const QModelIndex & index ) const + */ +HB_FUNC( QT_QTREEVIEW_VISUALRECT ) +{ + hb_retptr( new QRect( hbqt_par_QTreeView( 1 )->visualRect( *hbqt_par_QModelIndex( 2 ) ) ) ); } /* @@ -336,7 +397,71 @@ HB_FUNC( QT_QTREEVIEW_UNIFORMROWHEIGHTS ) */ HB_FUNC( QT_QTREEVIEW_WORDWRAP ) { - hb_retl( hbqt_par_QTreeView( 1 )->wordWrap( ) ); + hb_retl( hbqt_par_QTreeView( 1 )->wordWrap() ); +} + +/* + * void collapse ( const QModelIndex & index ) + */ +HB_FUNC( QT_QTREEVIEW_COLLAPSE ) +{ + hbqt_par_QTreeView( 1 )->collapse( *hbqt_par_QModelIndex( 2 ) ); +} + +/* + * void collapseAll () + */ +HB_FUNC( QT_QTREEVIEW_COLLAPSEALL ) +{ + hbqt_par_QTreeView( 1 )->collapseAll(); +} + +/* + * void expand ( const QModelIndex & index ) + */ +HB_FUNC( QT_QTREEVIEW_EXPAND ) +{ + hbqt_par_QTreeView( 1 )->expand( *hbqt_par_QModelIndex( 2 ) ); +} + +/* + * void expandAll () + */ +HB_FUNC( QT_QTREEVIEW_EXPANDALL ) +{ + hbqt_par_QTreeView( 1 )->expandAll(); +} + +/* + * void expandToDepth ( int depth ) + */ +HB_FUNC( QT_QTREEVIEW_EXPANDTODEPTH ) +{ + hbqt_par_QTreeView( 1 )->expandToDepth( hb_parni( 2 ) ); +} + +/* + * void hideColumn ( int column ) + */ +HB_FUNC( QT_QTREEVIEW_HIDECOLUMN ) +{ + hbqt_par_QTreeView( 1 )->hideColumn( hb_parni( 2 ) ); +} + +/* + * void resizeColumnToContents ( int column ) + */ +HB_FUNC( QT_QTREEVIEW_RESIZECOLUMNTOCONTENTS ) +{ + hbqt_par_QTreeView( 1 )->resizeColumnToContents( hb_parni( 2 ) ); +} + +/* + * void showColumn ( int column ) + */ +HB_FUNC( QT_QTREEVIEW_SHOWCOLUMN ) +{ + hbqt_par_QTreeView( 1 )->showColumn( hb_parni( 2 ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qtreewidget.cpp b/harbour/contrib/hbqt/hbqt_qtreewidget.cpp index 53fd77594e..8322c62d67 100644 --- a/harbour/contrib/hbqt/hbqt_qtreewidget.cpp +++ b/harbour/contrib/hbqt/hbqt_qtreewidget.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,19 +59,17 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 32/37 [ 86.49% ] ] - * + * Constructed[ 37/41 [ 90.24% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * void addTopLevelItems ( const QList & items ) * QList findItems ( const QString & text, Qt::MatchFlags flags, int column = 0 ) const * void insertTopLevelItems ( int index, const QList & items ) * QList selectedItems () const - * void setHeaderLabels ( const QStringList & labels ) - */ + */ #include @@ -99,7 +97,7 @@ HB_FUNC( QT_QTREEWIDGET_ADDTOPLEVELITEM ) */ HB_FUNC( QT_QTREEWIDGET_CLOSEPERSISTENTEDITOR ) { - hbqt_par_QTreeWidget( 1 )->closePersistentEditor( hbqt_par_QTreeWidgetItem( 2 ), hb_parni( 3 ) ); + hbqt_par_QTreeWidget( 1 )->closePersistentEditor( hbqt_par_QTreeWidgetItem( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); } /* @@ -107,7 +105,7 @@ HB_FUNC( QT_QTREEWIDGET_CLOSEPERSISTENTEDITOR ) */ HB_FUNC( QT_QTREEWIDGET_COLUMNCOUNT ) { - hb_retni( hbqt_par_QTreeWidget( 1 )->columnCount( ) ); + hb_retni( hbqt_par_QTreeWidget( 1 )->columnCount() ); } /* @@ -115,7 +113,7 @@ HB_FUNC( QT_QTREEWIDGET_COLUMNCOUNT ) */ HB_FUNC( QT_QTREEWIDGET_CURRENTCOLUMN ) { - hb_retni( hbqt_par_QTreeWidget( 1 )->currentColumn( ) ); + hb_retni( hbqt_par_QTreeWidget( 1 )->currentColumn() ); } /* @@ -123,7 +121,7 @@ HB_FUNC( QT_QTREEWIDGET_CURRENTCOLUMN ) */ HB_FUNC( QT_QTREEWIDGET_CURRENTITEM ) { - hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->currentItem( ) ); + hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->currentItem() ); } /* @@ -131,7 +129,7 @@ HB_FUNC( QT_QTREEWIDGET_CURRENTITEM ) */ HB_FUNC( QT_QTREEWIDGET_EDITITEM ) { - hbqt_par_QTreeWidget( 1 )->editItem( hbqt_par_QTreeWidgetItem( 2 ), hb_parni( 3 ) ); + hbqt_par_QTreeWidget( 1 )->editItem( hbqt_par_QTreeWidgetItem( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); } /* @@ -139,7 +137,7 @@ HB_FUNC( QT_QTREEWIDGET_EDITITEM ) */ HB_FUNC( QT_QTREEWIDGET_HEADERITEM ) { - hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->headerItem( ) ); + hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->headerItem() ); } /* @@ -163,7 +161,7 @@ HB_FUNC( QT_QTREEWIDGET_INSERTTOPLEVELITEM ) */ HB_FUNC( QT_QTREEWIDGET_INVISIBLEROOTITEM ) { - hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->invisibleRootItem( ) ); + hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->invisibleRootItem() ); } /* @@ -187,7 +185,7 @@ HB_FUNC( QT_QTREEWIDGET_ITEMABOVE ) */ HB_FUNC( QT_QTREEWIDGET_ITEMAT ) { - hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->itemAt( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidget( 1 )->itemAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -219,7 +217,7 @@ HB_FUNC( QT_QTREEWIDGET_ITEMWIDGET ) */ HB_FUNC( QT_QTREEWIDGET_OPENPERSISTENTEDITOR ) { - hbqt_par_QTreeWidget( 1 )->openPersistentEditor( hbqt_par_QTreeWidgetItem( 2 ), hb_parni( 3 ) ); + hbqt_par_QTreeWidget( 1 )->openPersistentEditor( hbqt_par_QTreeWidgetItem( 2 ), ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) ) ); } /* @@ -286,6 +284,14 @@ HB_FUNC( QT_QTREEWIDGET_SETHEADERLABEL ) hbqt_par_QTreeWidget( 1 )->setHeaderLabel( hbqt_par_QString( 2 ) ); } +/* + * void setHeaderLabels ( const QStringList & labels ) + */ +HB_FUNC( QT_QTREEWIDGET_SETHEADERLABELS ) +{ + hbqt_par_QTreeWidget( 1 )->setHeaderLabels( *hbqt_par_QStringList( 2 ) ); +} + /* * void setItemWidget ( QTreeWidgetItem * item, int column, QWidget * widget ) */ @@ -299,7 +305,7 @@ HB_FUNC( QT_QTREEWIDGET_SETITEMWIDGET ) */ HB_FUNC( QT_QTREEWIDGET_SORTCOLUMN ) { - hb_retni( hbqt_par_QTreeWidget( 1 )->sortColumn( ) ); + hb_retni( hbqt_par_QTreeWidget( 1 )->sortColumn() ); } /* @@ -331,7 +337,7 @@ HB_FUNC( QT_QTREEWIDGET_TOPLEVELITEM ) */ HB_FUNC( QT_QTREEWIDGET_TOPLEVELITEMCOUNT ) { - hb_retni( hbqt_par_QTreeWidget( 1 )->topLevelItemCount( ) ); + hb_retni( hbqt_par_QTreeWidget( 1 )->topLevelItemCount() ); } /* @@ -339,7 +345,39 @@ HB_FUNC( QT_QTREEWIDGET_TOPLEVELITEMCOUNT ) */ HB_FUNC( QT_QTREEWIDGET_VISUALITEMRECT ) { - hbqt_ret_QRect( hbqt_par_QTreeWidget( 1 )->visualItemRect( hbqt_par_QTreeWidgetItem( 2 ) ) ); + hb_retptr( new QRect( hbqt_par_QTreeWidget( 1 )->visualItemRect( hbqt_par_QTreeWidgetItem( 2 ) ) ) ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QTREEWIDGET_CLEAR ) +{ + hbqt_par_QTreeWidget( 1 )->clear(); +} + +/* + * void collapseItem ( const QTreeWidgetItem * item ) + */ +HB_FUNC( QT_QTREEWIDGET_COLLAPSEITEM ) +{ + hbqt_par_QTreeWidget( 1 )->collapseItem( hbqt_par_QTreeWidgetItem( 2 ) ); +} + +/* + * void expandItem ( const QTreeWidgetItem * item ) + */ +HB_FUNC( QT_QTREEWIDGET_EXPANDITEM ) +{ + hbqt_par_QTreeWidget( 1 )->expandItem( hbqt_par_QTreeWidgetItem( 2 ) ); +} + +/* + * void scrollToItem ( const QTreeWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible ) + */ +HB_FUNC( QT_QTREEWIDGET_SCROLLTOITEM ) +{ + hbqt_par_QTreeWidget( 1 )->scrollToItem( hbqt_par_QTreeWidgetItem( 2 ), ( HB_ISNIL( 3 ) ? ( QAbstractItemView::ScrollHint ) QTreeWidget::EnsureVisible : ( QAbstractItemView::ScrollHint ) hb_parni( 3 ) ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qtreewidgetitem.cpp b/harbour/contrib/hbqt/hbqt_qtreewidgetitem.cpp index 967dd63b09..016e3c0bc6 100644 --- a/harbour/contrib/hbqt/hbqt_qtreewidgetitem.cpp +++ b/harbour/contrib/hbqt/hbqt_qtreewidgetitem.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,27 +59,16 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 40/53 [ 75.47% ] ] - * + * Constructed[ 52/55 [ 94.55% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * void addChildren ( const QList & children ) - * QBrush background ( int column ) const - * virtual QVariant data ( int column, int role ) const - * QFont font ( int column ) const - * QBrush foreground ( int column ) const - * QIcon icon ( int column ) const * void insertChildren ( int index, const QList & children ) - * virtual void read ( QDataStream & in ) - * void setBackground ( int column, const QBrush & brush ) - * virtual void setData ( int column, int role, const QVariant & value ) - * void setFont ( int column, const QFont & font ) - * void setForeground ( int column, const QBrush & brush ) * QList takeChildren () - */ + */ #include @@ -117,12 +106,20 @@ HB_FUNC( QT_QTREEWIDGETITEM_ADDCHILD ) hbqt_par_QTreeWidgetItem( 1 )->addChild( hbqt_par_QTreeWidgetItem( 2 ) ); } +/* + * QBrush background ( int column ) const + */ +HB_FUNC( QT_QTREEWIDGETITEM_BACKGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QTreeWidgetItem( 1 )->background( hb_parni( 2 ) ) ) ); +} + /* * Qt::CheckState checkState ( int column ) const */ HB_FUNC( QT_QTREEWIDGETITEM_CHECKSTATE ) { - hb_retni( hbqt_par_QTreeWidgetItem( 1 )->checkState( hb_parni( 2 ) ) ); + hb_retni( ( Qt::CheckState ) hbqt_par_QTreeWidgetItem( 1 )->checkState( hb_parni( 2 ) ) ); } /* @@ -138,7 +135,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_CHILD ) */ HB_FUNC( QT_QTREEWIDGETITEM_CHILDCOUNT ) { - hb_retni( hbqt_par_QTreeWidgetItem( 1 )->childCount( ) ); + hb_retni( hbqt_par_QTreeWidgetItem( 1 )->childCount() ); } /* @@ -146,7 +143,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_CHILDCOUNT ) */ HB_FUNC( QT_QTREEWIDGETITEM_CHILDINDICATORPOLICY ) { - hb_retni( hbqt_par_QTreeWidgetItem( 1 )->childIndicatorPolicy( ) ); + hb_retni( ( QTreeWidgetItem::ChildIndicatorPolicy ) hbqt_par_QTreeWidgetItem( 1 )->childIndicatorPolicy() ); } /* @@ -154,7 +151,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_CHILDINDICATORPOLICY ) */ HB_FUNC( QT_QTREEWIDGETITEM_CLONE ) { - hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidgetItem( 1 )->clone( ) ); + hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidgetItem( 1 )->clone() ); } /* @@ -162,7 +159,47 @@ HB_FUNC( QT_QTREEWIDGETITEM_CLONE ) */ HB_FUNC( QT_QTREEWIDGETITEM_COLUMNCOUNT ) { - hb_retni( hbqt_par_QTreeWidgetItem( 1 )->columnCount( ) ); + hb_retni( hbqt_par_QTreeWidgetItem( 1 )->columnCount() ); +} + +/* + * virtual QVariant data ( int column, int role ) const + */ +HB_FUNC( QT_QTREEWIDGETITEM_DATA ) +{ + hb_retptr( new QVariant( hbqt_par_QTreeWidgetItem( 1 )->data( hb_parni( 2 ), hb_parni( 3 ) ) ) ); +} + +/* + * Qt::ItemFlags flags () const + */ +HB_FUNC( QT_QTREEWIDGETITEM_FLAGS ) +{ + hb_retni( ( Qt::ItemFlags ) hbqt_par_QTreeWidgetItem( 1 )->flags() ); +} + +/* + * QFont font ( int column ) const + */ +HB_FUNC( QT_QTREEWIDGETITEM_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QTreeWidgetItem( 1 )->font( hb_parni( 2 ) ) ) ); +} + +/* + * QBrush foreground ( int column ) const + */ +HB_FUNC( QT_QTREEWIDGETITEM_FOREGROUND ) +{ + hb_retptr( new QBrush( hbqt_par_QTreeWidgetItem( 1 )->foreground( hb_parni( 2 ) ) ) ); +} + +/* + * QIcon icon ( int column ) const + */ +HB_FUNC( QT_QTREEWIDGETITEM_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QTreeWidgetItem( 1 )->icon( hb_parni( 2 ) ) ) ); } /* @@ -186,7 +223,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_INSERTCHILD ) */ HB_FUNC( QT_QTREEWIDGETITEM_ISDISABLED ) { - hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isDisabled( ) ); + hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isDisabled() ); } /* @@ -194,7 +231,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_ISDISABLED ) */ HB_FUNC( QT_QTREEWIDGETITEM_ISEXPANDED ) { - hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isExpanded( ) ); + hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isExpanded() ); } /* @@ -202,7 +239,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_ISEXPANDED ) */ HB_FUNC( QT_QTREEWIDGETITEM_ISFIRSTCOLUMNSPANNED ) { - hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isFirstColumnSpanned( ) ); + hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isFirstColumnSpanned() ); } /* @@ -210,7 +247,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_ISFIRSTCOLUMNSPANNED ) */ HB_FUNC( QT_QTREEWIDGETITEM_ISHIDDEN ) { - hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isHidden( ) ); + hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isHidden() ); } /* @@ -218,7 +255,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_ISHIDDEN ) */ HB_FUNC( QT_QTREEWIDGETITEM_ISSELECTED ) { - hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isSelected( ) ); + hb_retl( hbqt_par_QTreeWidgetItem( 1 )->isSelected() ); } /* @@ -226,7 +263,15 @@ HB_FUNC( QT_QTREEWIDGETITEM_ISSELECTED ) */ HB_FUNC( QT_QTREEWIDGETITEM_PARENT ) { - hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidgetItem( 1 )->parent( ) ); + hb_retptr( ( QTreeWidgetItem* ) hbqt_par_QTreeWidgetItem( 1 )->parent() ); +} + +/* + * virtual void read ( QDataStream & in ) + */ +HB_FUNC( QT_QTREEWIDGETITEM_READ ) +{ + hbqt_par_QTreeWidgetItem( 1 )->read( *hbqt_par_QDataStream( 2 ) ); } /* @@ -237,6 +282,14 @@ HB_FUNC( QT_QTREEWIDGETITEM_REMOVECHILD ) hbqt_par_QTreeWidgetItem( 1 )->removeChild( hbqt_par_QTreeWidgetItem( 2 ) ); } +/* + * void setBackground ( int column, const QBrush & brush ) + */ +HB_FUNC( QT_QTREEWIDGETITEM_SETBACKGROUND ) +{ + hbqt_par_QTreeWidgetItem( 1 )->setBackground( hb_parni( 2 ), *hbqt_par_QBrush( 3 ) ); +} + /* * void setCheckState ( int column, Qt::CheckState state ) */ @@ -253,6 +306,14 @@ HB_FUNC( QT_QTREEWIDGETITEM_SETCHILDINDICATORPOLICY ) hbqt_par_QTreeWidgetItem( 1 )->setChildIndicatorPolicy( ( QTreeWidgetItem::ChildIndicatorPolicy ) hb_parni( 2 ) ); } +/* + * virtual void setData ( int column, int role, const QVariant & value ) + */ +HB_FUNC( QT_QTREEWIDGETITEM_SETDATA ) +{ + hbqt_par_QTreeWidgetItem( 1 )->setData( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QVariant( 4 ) ); +} + /* * void setDisabled ( bool disabled ) */ @@ -277,6 +338,30 @@ HB_FUNC( QT_QTREEWIDGETITEM_SETFIRSTCOLUMNSPANNED ) hbqt_par_QTreeWidgetItem( 1 )->setFirstColumnSpanned( hb_parl( 2 ) ); } +/* + * void setFlags ( Qt::ItemFlags flags ) + */ +HB_FUNC( QT_QTREEWIDGETITEM_SETFLAGS ) +{ + hbqt_par_QTreeWidgetItem( 1 )->setFlags( ( Qt::ItemFlags ) hb_parni( 2 ) ); +} + +/* + * void setFont ( int column, const QFont & font ) + */ +HB_FUNC( QT_QTREEWIDGETITEM_SETFONT ) +{ + hbqt_par_QTreeWidgetItem( 1 )->setFont( hb_parni( 2 ), *hbqt_par_QFont( 3 ) ); +} + +/* + * void setForeground ( int column, const QBrush & brush ) + */ +HB_FUNC( QT_QTREEWIDGETITEM_SETFOREGROUND ) +{ + hbqt_par_QTreeWidgetItem( 1 )->setForeground( hb_parni( 2 ), *hbqt_par_QBrush( 3 ) ); +} + /* * void setHidden ( bool hide ) */ @@ -306,7 +391,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_SETSELECTED ) */ HB_FUNC( QT_QTREEWIDGETITEM_SETSIZEHINT ) { - hbqt_par_QTreeWidgetItem( 1 )->setSizeHint( hb_parni( 2 ), hbqt_const_QSize( 3 ) ); + hbqt_par_QTreeWidgetItem( 1 )->setSizeHint( hb_parni( 2 ), *hbqt_par_QSize( 3 ) ); } /* @@ -354,7 +439,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_SETWHATSTHIS ) */ HB_FUNC( QT_QTREEWIDGETITEM_SIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QTreeWidgetItem( 1 )->sizeHint( hb_parni( 2 ) ) ); + hb_retptr( new QSize( hbqt_par_QTreeWidgetItem( 1 )->sizeHint( hb_parni( 2 ) ) ) ); } /* @@ -370,7 +455,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_SORTCHILDREN ) */ HB_FUNC( QT_QTREEWIDGETITEM_STATUSTIP ) { - hb_retc( hbqt_par_QTreeWidgetItem( 1 )->statusTip( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTreeWidgetItem( 1 )->statusTip( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -386,7 +471,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_TAKECHILD ) */ HB_FUNC( QT_QTREEWIDGETITEM_TEXT ) { - hb_retc( hbqt_par_QTreeWidgetItem( 1 )->text( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTreeWidgetItem( 1 )->text( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -402,7 +487,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_TEXTALIGNMENT ) */ HB_FUNC( QT_QTREEWIDGETITEM_TOOLTIP ) { - hb_retc( hbqt_par_QTreeWidgetItem( 1 )->toolTip( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTreeWidgetItem( 1 )->toolTip( hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -410,7 +495,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_TOOLTIP ) */ HB_FUNC( QT_QTREEWIDGETITEM_TREEWIDGET ) { - hb_retptr( ( QTreeWidget* ) hbqt_par_QTreeWidgetItem( 1 )->treeWidget( ) ); + hb_retptr( ( QTreeWidget* ) hbqt_par_QTreeWidgetItem( 1 )->treeWidget() ); } /* @@ -418,7 +503,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_TREEWIDGET ) */ HB_FUNC( QT_QTREEWIDGETITEM_TYPE ) { - hb_retni( hbqt_par_QTreeWidgetItem( 1 )->type( ) ); + hb_retni( hbqt_par_QTreeWidgetItem( 1 )->type() ); } /* @@ -426,7 +511,7 @@ HB_FUNC( QT_QTREEWIDGETITEM_TYPE ) */ HB_FUNC( QT_QTREEWIDGETITEM_WHATSTHIS ) { - hb_retc( hbqt_par_QTreeWidgetItem( 1 )->whatsThis( hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QTreeWidgetItem( 1 )->whatsThis( hb_parni( 2 ) ).toLatin1().data() ); } diff --git a/harbour/contrib/hbqt/hbqt_qurl.cpp b/harbour/contrib/hbqt/hbqt_qurl.cpp new file mode 100644 index 0000000000..517c12f9f2 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qurl.cpp @@ -0,0 +1,582 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 60/65 [ 92.31% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QList allEncodedQueryItemValues ( const QByteArray & key ) const + * QList > encodedQueryItems () const + * QList > queryItems () const + * void setEncodedQueryItems ( const QList > & query ) + * void setQueryItems ( const QList > & query ) + */ + + +#include + + +/* + * QUrl () + * QUrl ( const QString & url ) + * QUrl ( const QUrl & other ) + * QUrl ( const QString & url, ParsingMode parsingMode ) + * ~QUrl () + */ +HB_FUNC( QT_QURL ) +{ + hb_retptr( new QUrl( hbqt_par_QString( 1 ) ) ); +} +/* + * void setQueryDelimiters ( char valueDelimiter, char pairDelimiter ) + */ +HB_FUNC( QT_QURL_SETQUERYDELIMITERS ) +{ + hbqt_par_QUrl( 1 )->setQueryDelimiters( ( char ) hb_parni( 2 ), ( char ) hb_parni( 3 ) ); +} + +/* + * void addEncodedQueryItem ( const QByteArray & key, const QByteArray & value ) + */ +HB_FUNC( QT_QURL_ADDENCODEDQUERYITEM ) +{ + hbqt_par_QUrl( 1 )->addEncodedQueryItem( *hbqt_par_QByteArray( 2 ), *hbqt_par_QByteArray( 3 ) ); +} + +/* + * void addQueryItem ( const QString & key, const QString & value ) + */ +HB_FUNC( QT_QURL_ADDQUERYITEM ) +{ + hbqt_par_QUrl( 1 )->addQueryItem( hbqt_par_QString( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * QStringList allQueryItemValues ( const QString & key ) const + */ +HB_FUNC( QT_QURL_ALLQUERYITEMVALUES ) +{ + hb_retptr( new QStringList( hbqt_par_QUrl( 1 )->allQueryItemValues( hbqt_par_QString( 2 ) ) ) ); +} + +/* + * QString authority () const + */ +HB_FUNC( QT_QURL_AUTHORITY ) +{ + hb_retc( hbqt_par_QUrl( 1 )->authority().toLatin1().data() ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QURL_CLEAR ) +{ + hbqt_par_QUrl( 1 )->clear(); +} + +/* + * QByteArray encodedFragment () const + */ +HB_FUNC( QT_QURL_ENCODEDFRAGMENT ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedFragment() ) ); +} + +/* + * QByteArray encodedHost () const + */ +HB_FUNC( QT_QURL_ENCODEDHOST ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedHost() ) ); +} + +/* + * QByteArray encodedPassword () const + */ +HB_FUNC( QT_QURL_ENCODEDPASSWORD ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedPassword() ) ); +} + +/* + * QByteArray encodedPath () const + */ +HB_FUNC( QT_QURL_ENCODEDPATH ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedPath() ) ); +} + +/* + * QByteArray encodedQuery () const + */ +HB_FUNC( QT_QURL_ENCODEDQUERY ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedQuery() ) ); +} + +/* + * QByteArray encodedQueryItemValue ( const QByteArray & key ) const + */ +HB_FUNC( QT_QURL_ENCODEDQUERYITEMVALUE ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedQueryItemValue( *hbqt_par_QByteArray( 2 ) ) ) ); +} + +/* + * QByteArray encodedUserName () const + */ +HB_FUNC( QT_QURL_ENCODEDUSERNAME ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->encodedUserName() ) ); +} + +/* + * QString errorString () const + */ +HB_FUNC( QT_QURL_ERRORSTRING ) +{ + hb_retc( hbqt_par_QUrl( 1 )->errorString().toLatin1().data() ); +} + +/* + * QString fragment () const + */ +HB_FUNC( QT_QURL_FRAGMENT ) +{ + hb_retc( hbqt_par_QUrl( 1 )->fragment().toLatin1().data() ); +} + +/* + * bool hasEncodedQueryItem ( const QByteArray & key ) const + */ +HB_FUNC( QT_QURL_HASENCODEDQUERYITEM ) +{ + hb_retl( hbqt_par_QUrl( 1 )->hasEncodedQueryItem( *hbqt_par_QByteArray( 2 ) ) ); +} + +/* + * bool hasFragment () const + */ +HB_FUNC( QT_QURL_HASFRAGMENT ) +{ + hb_retl( hbqt_par_QUrl( 1 )->hasFragment() ); +} + +/* + * bool hasQuery () const + */ +HB_FUNC( QT_QURL_HASQUERY ) +{ + hb_retl( hbqt_par_QUrl( 1 )->hasQuery() ); +} + +/* + * bool hasQueryItem ( const QString & key ) const + */ +HB_FUNC( QT_QURL_HASQUERYITEM ) +{ + hb_retl( hbqt_par_QUrl( 1 )->hasQueryItem( hbqt_par_QString( 2 ) ) ); +} + +/* + * QString host () const + */ +HB_FUNC( QT_QURL_HOST ) +{ + hb_retc( hbqt_par_QUrl( 1 )->host().toLatin1().data() ); +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QURL_ISEMPTY ) +{ + hb_retl( hbqt_par_QUrl( 1 )->isEmpty() ); +} + +/* + * bool isParentOf ( const QUrl & childUrl ) const + */ +HB_FUNC( QT_QURL_ISPARENTOF ) +{ + hb_retl( hbqt_par_QUrl( 1 )->isParentOf( *hbqt_par_QUrl( 2 ) ) ); +} + +/* + * bool isRelative () const + */ +HB_FUNC( QT_QURL_ISRELATIVE ) +{ + hb_retl( hbqt_par_QUrl( 1 )->isRelative() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QURL_ISVALID ) +{ + hb_retl( hbqt_par_QUrl( 1 )->isValid() ); +} + +/* + * QString password () const + */ +HB_FUNC( QT_QURL_PASSWORD ) +{ + hb_retc( hbqt_par_QUrl( 1 )->password().toLatin1().data() ); +} + +/* + * QString path () const + */ +HB_FUNC( QT_QURL_PATH ) +{ + hb_retc( hbqt_par_QUrl( 1 )->path().toLatin1().data() ); +} + +/* + * int port () const + */ +HB_FUNC( QT_QURL_PORT ) +{ + hb_retni( hbqt_par_QUrl( 1 )->port() ); +} + +/* + * int port ( int defaultPort ) const + */ +HB_FUNC( QT_QURL_PORT_1 ) +{ + hb_retni( hbqt_par_QUrl( 1 )->port( hb_parni( 2 ) ) ); +} + +/* + * QString queryItemValue ( const QString & key ) const + */ +HB_FUNC( QT_QURL_QUERYITEMVALUE ) +{ + hb_retc( hbqt_par_QUrl( 1 )->queryItemValue( hbqt_par_QString( 2 ) ).toLatin1().data() ); +} + +/* + * char queryPairDelimiter () const + */ +HB_FUNC( QT_QURL_QUERYPAIRDELIMITER ) +{ + hb_retni( hbqt_par_QUrl( 1 )->queryPairDelimiter() ); +} + +/* + * char queryValueDelimiter () const + */ +HB_FUNC( QT_QURL_QUERYVALUEDELIMITER ) +{ + hb_retni( hbqt_par_QUrl( 1 )->queryValueDelimiter() ); +} + +/* + * void removeAllEncodedQueryItems ( const QByteArray & key ) + */ +HB_FUNC( QT_QURL_REMOVEALLENCODEDQUERYITEMS ) +{ + hbqt_par_QUrl( 1 )->removeAllEncodedQueryItems( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void removeAllQueryItems ( const QString & key ) + */ +HB_FUNC( QT_QURL_REMOVEALLQUERYITEMS ) +{ + hbqt_par_QUrl( 1 )->removeAllQueryItems( hbqt_par_QString( 2 ) ); +} + +/* + * void removeEncodedQueryItem ( const QByteArray & key ) + */ +HB_FUNC( QT_QURL_REMOVEENCODEDQUERYITEM ) +{ + hbqt_par_QUrl( 1 )->removeEncodedQueryItem( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void removeQueryItem ( const QString & key ) + */ +HB_FUNC( QT_QURL_REMOVEQUERYITEM ) +{ + hbqt_par_QUrl( 1 )->removeQueryItem( hbqt_par_QString( 2 ) ); +} + +/* + * QUrl resolved ( const QUrl & relative ) const + */ +HB_FUNC( QT_QURL_RESOLVED ) +{ + hb_retptr( new QUrl( hbqt_par_QUrl( 1 )->resolved( *hbqt_par_QUrl( 2 ) ) ) ); +} + +/* + * QString scheme () const + */ +HB_FUNC( QT_QURL_SCHEME ) +{ + hb_retc( hbqt_par_QUrl( 1 )->scheme().toLatin1().data() ); +} + +/* + * void setAuthority ( const QString & authority ) + */ +HB_FUNC( QT_QURL_SETAUTHORITY ) +{ + hbqt_par_QUrl( 1 )->setAuthority( hbqt_par_QString( 2 ) ); +} + +/* + * void setEncodedFragment ( const QByteArray & fragment ) + */ +HB_FUNC( QT_QURL_SETENCODEDFRAGMENT ) +{ + hbqt_par_QUrl( 1 )->setEncodedFragment( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setEncodedHost ( const QByteArray & host ) + */ +HB_FUNC( QT_QURL_SETENCODEDHOST ) +{ + hbqt_par_QUrl( 1 )->setEncodedHost( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setEncodedPassword ( const QByteArray & password ) + */ +HB_FUNC( QT_QURL_SETENCODEDPASSWORD ) +{ + hbqt_par_QUrl( 1 )->setEncodedPassword( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setEncodedPath ( const QByteArray & path ) + */ +HB_FUNC( QT_QURL_SETENCODEDPATH ) +{ + hbqt_par_QUrl( 1 )->setEncodedPath( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setEncodedQuery ( const QByteArray & query ) + */ +HB_FUNC( QT_QURL_SETENCODEDQUERY ) +{ + hbqt_par_QUrl( 1 )->setEncodedQuery( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setEncodedUrl ( const QByteArray & encodedUrl ) + */ +HB_FUNC( QT_QURL_SETENCODEDURL ) +{ + hbqt_par_QUrl( 1 )->setEncodedUrl( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setEncodedUrl ( const QByteArray & encodedUrl, ParsingMode parsingMode ) + */ +HB_FUNC( QT_QURL_SETENCODEDURL_1 ) +{ + hbqt_par_QUrl( 1 )->setEncodedUrl( *hbqt_par_QByteArray( 2 ), ( QUrl::ParsingMode ) hb_parni( 3 ) ); +} + +/* + * void setEncodedUserName ( const QByteArray & userName ) + */ +HB_FUNC( QT_QURL_SETENCODEDUSERNAME ) +{ + hbqt_par_QUrl( 1 )->setEncodedUserName( *hbqt_par_QByteArray( 2 ) ); +} + +/* + * void setFragment ( const QString & fragment ) + */ +HB_FUNC( QT_QURL_SETFRAGMENT ) +{ + hbqt_par_QUrl( 1 )->setFragment( hbqt_par_QString( 2 ) ); +} + +/* + * void setHost ( const QString & host ) + */ +HB_FUNC( QT_QURL_SETHOST ) +{ + hbqt_par_QUrl( 1 )->setHost( hbqt_par_QString( 2 ) ); +} + +/* + * void setPassword ( const QString & password ) + */ +HB_FUNC( QT_QURL_SETPASSWORD ) +{ + hbqt_par_QUrl( 1 )->setPassword( hbqt_par_QString( 2 ) ); +} + +/* + * void setPath ( const QString & path ) + */ +HB_FUNC( QT_QURL_SETPATH ) +{ + hbqt_par_QUrl( 1 )->setPath( hbqt_par_QString( 2 ) ); +} + +/* + * void setPort ( int port ) + */ +HB_FUNC( QT_QURL_SETPORT ) +{ + hbqt_par_QUrl( 1 )->setPort( hb_parni( 2 ) ); +} + +/* + * void setScheme ( const QString & scheme ) + */ +HB_FUNC( QT_QURL_SETSCHEME ) +{ + hbqt_par_QUrl( 1 )->setScheme( hbqt_par_QString( 2 ) ); +} + +/* + * void setUrl ( const QString & url ) + */ +HB_FUNC( QT_QURL_SETURL ) +{ + hbqt_par_QUrl( 1 )->setUrl( hbqt_par_QString( 2 ) ); +} + +/* + * void setUrl ( const QString & url, ParsingMode parsingMode ) + */ +HB_FUNC( QT_QURL_SETURL_1 ) +{ + hbqt_par_QUrl( 1 )->setUrl( hbqt_par_QString( 2 ), ( QUrl::ParsingMode ) hb_parni( 3 ) ); +} + +/* + * void setUserInfo ( const QString & userInfo ) + */ +HB_FUNC( QT_QURL_SETUSERINFO ) +{ + hbqt_par_QUrl( 1 )->setUserInfo( hbqt_par_QString( 2 ) ); +} + +/* + * void setUserName ( const QString & userName ) + */ +HB_FUNC( QT_QURL_SETUSERNAME ) +{ + hbqt_par_QUrl( 1 )->setUserName( hbqt_par_QString( 2 ) ); +} + +/* + * QByteArray toEncoded ( FormattingOptions options = None ) const + */ +HB_FUNC( QT_QURL_TOENCODED ) +{ + hb_retptr( new QByteArray( hbqt_par_QUrl( 1 )->toEncoded( ( HB_ISNIL( 2 ) ? ( QUrl::FormattingOptions ) QUrl::None : ( QUrl::FormattingOptions ) hb_parni( 2 ) ) ) ) ); +} + +/* + * QString toLocalFile () const + */ +HB_FUNC( QT_QURL_TOLOCALFILE ) +{ + hb_retc( hbqt_par_QUrl( 1 )->toLocalFile().toLatin1().data() ); +} + +/* + * QString toString ( FormattingOptions options = None ) const + */ +HB_FUNC( QT_QURL_TOSTRING ) +{ + hb_retc( hbqt_par_QUrl( 1 )->toString( ( HB_ISNIL( 2 ) ? ( QUrl::FormattingOptions ) QUrl::None : ( QUrl::FormattingOptions ) hb_parni( 2 ) ) ).toLatin1().data() ); +} + +/* + * QString userInfo () const + */ +HB_FUNC( QT_QURL_USERINFO ) +{ + hb_retc( hbqt_par_QUrl( 1 )->userInfo().toLatin1().data() ); +} + +/* + * QString userName () const + */ +HB_FUNC( QT_QURL_USERNAME ) +{ + hb_retc( hbqt_par_QUrl( 1 )->userName().toLatin1().data() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qvariant.cpp b/harbour/contrib/hbqt/hbqt_qvariant.cpp new file mode 100644 index 0000000000..500696af23 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qvariant.cpp @@ -0,0 +1,413 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +/* + * Constructed[ 33/36 [ 91.67% ] ] + * + * *** Unconvered Prototypes *** + * ----------------------------- + * + * QHash toHash () const + * QList toList () const + * QMap toMap () const + */ + + +#include +#include +#include +#include +#include + + +/* +QVariant () +QVariant ( Qt::GlobalColor color ) +QVariant ( Type type ) +QVariant ( int typeOrUserType, const void * copy ) +QVariant ( const QVariant & p ) +QVariant ( QDataStream & s ) +QVariant ( int val ) +QVariant ( uint val ) +QVariant ( qlonglong val ) +QVariant ( qulonglong val ) +QVariant ( bool val ) +QVariant ( double val ) +QVariant ( const char * val ) +QVariant ( const QByteArray & val ) +QVariant ( const QBitArray & val ) +QVariant ( const QString & val ) +QVariant ( const QLatin1String & val ) +QVariant ( const QStringList & val ) +QVariant ( const QChar & c ) +QVariant ( const QDate & val ) +QVariant ( const QTime & val ) +QVariant ( const QDateTime & val ) +QVariant ( const QList & val ) +QVariant ( const QMap & val ) +QVariant ( const QHash & val ) +QVariant ( const QSize & val ) +QVariant ( const QSizeF & val ) +QVariant ( const QPoint & val ) +QVariant ( const QPointF & val ) +QVariant ( const QLine & val ) +QVariant ( const QLineF & val ) +QVariant ( const QRect & val ) +QVariant ( const QRectF & val ) +QVariant ( const QUrl & val ) +QVariant ( const QLocale & l ) +QVariant ( const QRegExp & regExp ) +~QVariant () + */ +HB_FUNC( QT_QVARIANT ) +{ + hb_retptr( ( QVariant* ) new QVariant() ); +} + +/* + * bool canConvert ( Type t ) const + */ +HB_FUNC( QT_QVARIANT_CANCONVERT ) +{ + hb_retl( hbqt_par_QVariant( 1 )->canConvert( ( QVariant::Type ) hb_parni( 2 ) ) ); +} + +/* + * bool canConvert ( Type t ) const + */ +HB_FUNC( QT_QVARIANT_CANCONVERT_1 ) +{ + hb_retl( hbqt_par_QVariant( 1 )->canConvert( ( QVariant::Type ) hb_parni( 2 ) ) ); +} + +/* + * void clear () + */ +HB_FUNC( QT_QVARIANT_CLEAR ) +{ + hbqt_par_QVariant( 1 )->clear(); +} + +/* + * bool convert ( Type t ) + */ +HB_FUNC( QT_QVARIANT_CONVERT ) +{ + hb_retl( hbqt_par_QVariant( 1 )->convert( ( QVariant::Type ) hb_parni( 2 ) ) ); +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QVARIANT_ISNULL ) +{ + hb_retl( hbqt_par_QVariant( 1 )->isNull() ); +} + +/* + * bool isValid () const + */ +HB_FUNC( QT_QVARIANT_ISVALID ) +{ + hb_retl( hbqt_par_QVariant( 1 )->isValid() ); +} + +/* + * void setValue ( const T & value ) + */ +HB_FUNC( QT_QVARIANT_SETVALUE ) +{ + hbqt_par_QVariant( 1 )->setValue( hb_param( 2, HB_IT_ANY ) ); +} + +/* + * QBitArray toBitArray () const + */ +HB_FUNC( QT_QVARIANT_TOBITARRAY ) +{ + hb_retptr( new QBitArray( hbqt_par_QVariant( 1 )->toBitArray() ) ); +} + +/* + * bool toBool () const + */ +HB_FUNC( QT_QVARIANT_TOBOOL ) +{ + hb_retl( hbqt_par_QVariant( 1 )->toBool() ); +} + +/* + * QByteArray toByteArray () const + */ +HB_FUNC( QT_QVARIANT_TOBYTEARRAY ) +{ + hb_retptr( new QByteArray( hbqt_par_QVariant( 1 )->toByteArray() ) ); +} + +/* + * QDate toDate () const + */ +HB_FUNC( QT_QVARIANT_TODATE ) +{ + hb_retptr( new QDate( hbqt_par_QVariant( 1 )->toDate() ) ); +} + +/* + * QDateTime toDateTime () const + */ +HB_FUNC( QT_QVARIANT_TODATETIME ) +{ + hb_retptr( new QDateTime( hbqt_par_QVariant( 1 )->toDateTime() ) ); +} + +/* + * double toDouble ( bool * ok = 0 ) const + */ +HB_FUNC( QT_QVARIANT_TODOUBLE ) +{ + bool iOk = 0; + + hb_retnd( hbqt_par_QVariant( 1 )->toDouble( &iOk ) ); + + hb_stornl( iOk, 2 ); +} + +/* + * int toInt ( bool * ok = 0 ) const + */ +HB_FUNC( QT_QVARIANT_TOINT ) +{ + bool iOk = 0; + + hb_retni( hbqt_par_QVariant( 1 )->toInt( &iOk ) ); + + hb_stornl( iOk, 2 ); +} + +/* + * QLine toLine () const + */ +HB_FUNC( QT_QVARIANT_TOLINE ) +{ + hb_retptr( new QLine( hbqt_par_QVariant( 1 )->toLine() ) ); +} + +/* + * QLineF toLineF () const + */ +HB_FUNC( QT_QVARIANT_TOLINEF ) +{ + hb_retptr( new QLineF( hbqt_par_QVariant( 1 )->toLineF() ) ); +} + +/* + * QLocale toLocale () const + */ +HB_FUNC( QT_QVARIANT_TOLOCALE ) +{ + hb_retptr( new QLocale( hbqt_par_QVariant( 1 )->toLocale() ) ); +} + +/* + * qlonglong toLongLong ( bool * ok = 0 ) const + */ +HB_FUNC( QT_QVARIANT_TOLONGLONG ) +{ + bool iOk = 0; + + hb_retni( hbqt_par_QVariant( 1 )->toLongLong( &iOk ) ); + + hb_stornl( iOk, 2 ); +} + +/* + * QPoint toPoint () const + */ +HB_FUNC( QT_QVARIANT_TOPOINT ) +{ + hb_retptr( new QPoint( hbqt_par_QVariant( 1 )->toPoint() ) ); +} + +/* + * QPointF toPointF () const + */ +HB_FUNC( QT_QVARIANT_TOPOINTF ) +{ + hb_retptr( new QPointF( hbqt_par_QVariant( 1 )->toPointF() ) ); +} + +/* + * QRect toRect () const + */ +HB_FUNC( QT_QVARIANT_TORECT ) +{ + hb_retptr( new QRect( hbqt_par_QVariant( 1 )->toRect() ) ); +} + +/* + * QRectF toRectF () const + */ +HB_FUNC( QT_QVARIANT_TORECTF ) +{ + hb_retptr( new QRectF( hbqt_par_QVariant( 1 )->toRectF() ) ); +} + +/* + * QRegExp toRegExp () const + */ +HB_FUNC( QT_QVARIANT_TOREGEXP ) +{ + hb_retptr( new QRegExp( hbqt_par_QVariant( 1 )->toRegExp() ) ); +} + +/* + * QSize toSize () const + */ +HB_FUNC( QT_QVARIANT_TOSIZE ) +{ + hb_retptr( new QSize( hbqt_par_QVariant( 1 )->toSize() ) ); +} + +/* + * QSizeF toSizeF () const + */ +HB_FUNC( QT_QVARIANT_TOSIZEF ) +{ + hb_retptr( new QSizeF( hbqt_par_QVariant( 1 )->toSizeF() ) ); +} + +/* + * QString toString () const + */ +HB_FUNC( QT_QVARIANT_TOSTRING ) +{ + hb_retc( hbqt_par_QVariant( 1 )->toString().toLatin1().data() ); +} + +/* + * QStringList toStringList () const + */ +HB_FUNC( QT_QVARIANT_TOSTRINGLIST ) +{ + hb_retptr( new QStringList( hbqt_par_QVariant( 1 )->toStringList() ) ); +} + +/* + * QTime toTime () const + */ +HB_FUNC( QT_QVARIANT_TOTIME ) +{ + hb_retptr( new QTime( hbqt_par_QVariant( 1 )->toTime() ) ); +} + +/* + * uint toUInt ( bool * ok = 0 ) const + */ +HB_FUNC( QT_QVARIANT_TOUINT ) +{ + bool iOk = 0; + + hb_retni( hbqt_par_QVariant( 1 )->toUInt( &iOk ) ); + + hb_stornl( iOk, 2 ); +} + +/* + * qulonglong toULongLong ( bool * ok = 0 ) const + */ +HB_FUNC( QT_QVARIANT_TOULONGLONG ) +{ + bool iOk = 0; + + hb_retni( hbqt_par_QVariant( 1 )->toULongLong( &iOk ) ); + + hb_stornl( iOk, 2 ); +} + +/* + * QUrl toUrl () const + */ +HB_FUNC( QT_QVARIANT_TOURL ) +{ + hb_retptr( new QUrl( hbqt_par_QVariant( 1 )->toUrl() ) ); +} + +/* + * Type type () const + */ +HB_FUNC( QT_QVARIANT_TYPE ) +{ + hb_retni( ( QVariant::Type ) hbqt_par_QVariant( 1 )->type() ); +} + +/* + * int userType () const + */ +HB_FUNC( QT_QVARIANT_USERTYPE ) +{ + hb_retni( hbqt_par_QVariant( 1 )->userType() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qvboxlayout.cpp b/harbour/contrib/hbqt/hbqt_qvboxlayout.cpp index a2fbf178ee..210106213a 100644 --- a/harbour/contrib/hbqt/hbqt_qvboxlayout.cpp +++ b/harbour/contrib/hbqt/hbqt_qvboxlayout.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,7 +60,6 @@ /*----------------------------------------------------------------------*/ - #include diff --git a/harbour/contrib/hbqt/hbqt_qwebpage.cpp b/harbour/contrib/hbqt/hbqt_qwebpage.cpp index 29256d494c..396fd43268 100644 --- a/harbour/contrib/hbqt/hbqt_qwebpage.cpp +++ b/harbour/contrib/hbqt/hbqt_qwebpage.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,26 +60,8 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 29/34 [ 85.29% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * quint64 bytesReceived () const - * QVariant inputMethodQuery ( Qt::InputMethodQuery property ) const - * QPalette palette () const - * void setPalette ( const QPalette & palette ) - * quint64 totalBytes () const - * - * *** Commented out protos which construct fine but do not compile *** - * - * // virtual bool extension ( Extension extension, const ExtensionOption * option = 0, ExtensionReturn * output = 0 ) - */ - - #include - +#include /* @@ -99,12 +81,20 @@ HB_FUNC( QT_QWEBPAGE_ACTION ) hb_retptr( ( QAction* ) hbqt_par_QWebPage( 1 )->action( ( QWebPage::WebAction ) hb_parni( 2 ) ) ); } +/* + * quint64 bytesReceived () const + */ +HB_FUNC( QT_QWEBPAGE_BYTESRECEIVED ) +{ + hb_retni( hbqt_par_QWebPage( 1 )->bytesReceived() ); +} + /* * QMenu * createStandardContextMenu () */ HB_FUNC( QT_QWEBPAGE_CREATESTANDARDCONTEXTMENU ) { - hb_retptr( ( QMenu* ) hbqt_par_QWebPage( 1 )->createStandardContextMenu( ) ); + hb_retptr( ( QMenu* ) hbqt_par_QWebPage( 1 )->createStandardContextMenu() ); } /* @@ -112,7 +102,7 @@ HB_FUNC( QT_QWEBPAGE_CREATESTANDARDCONTEXTMENU ) */ HB_FUNC( QT_QWEBPAGE_CURRENTFRAME ) { - hb_retptr( ( QWebFrame* ) hbqt_par_QWebPage( 1 )->currentFrame( ) ); + hb_retptr( ( QWebFrame* ) hbqt_par_QWebPage( 1 )->currentFrame() ); } /* @@ -120,7 +110,7 @@ HB_FUNC( QT_QWEBPAGE_CURRENTFRAME ) */ HB_FUNC( QT_QWEBPAGE_FINDTEXT ) { - hb_retl( hbqt_par_QWebPage( 1 )->findText( hbqt_par_QString( 2 ), ( QWebPage::FindFlags ) hb_parni( 3 ) ) ); + hb_retl( hbqt_par_QWebPage( 1 )->findText( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? ( QWebPage::FindFlags ) 0 : ( QWebPage::FindFlags ) hb_parni( 3 ) ) ) ); } /* @@ -136,7 +126,7 @@ HB_FUNC( QT_QWEBPAGE_FOCUSNEXTPREVCHILD ) */ HB_FUNC( QT_QWEBPAGE_FORWARDUNSUPPORTEDCONTENT ) { - hb_retl( hbqt_par_QWebPage( 1 )->forwardUnsupportedContent( ) ); + hb_retl( hbqt_par_QWebPage( 1 )->forwardUnsupportedContent() ); } /* @@ -144,7 +134,15 @@ HB_FUNC( QT_QWEBPAGE_FORWARDUNSUPPORTEDCONTENT ) */ HB_FUNC( QT_QWEBPAGE_HISTORY ) { - hb_retptr( ( QWebHistory* ) hbqt_par_QWebPage( 1 )->history( ) ); + hb_retptr( ( QWebHistory* ) hbqt_par_QWebPage( 1 )->history() ); +} + +/* + * QVariant inputMethodQuery ( Qt::InputMethodQuery property ) const + */ +HB_FUNC( QT_QWEBPAGE_INPUTMETHODQUERY ) +{ + hb_retptr( new QVariant( hbqt_par_QWebPage( 1 )->inputMethodQuery( ( Qt::InputMethodQuery ) hb_parni( 2 ) ) ) ); } /* @@ -152,7 +150,7 @@ HB_FUNC( QT_QWEBPAGE_HISTORY ) */ HB_FUNC( QT_QWEBPAGE_ISCONTENTEDITABLE ) { - hb_retl( hbqt_par_QWebPage( 1 )->isContentEditable( ) ); + hb_retl( hbqt_par_QWebPage( 1 )->isContentEditable() ); } /* @@ -160,7 +158,7 @@ HB_FUNC( QT_QWEBPAGE_ISCONTENTEDITABLE ) */ HB_FUNC( QT_QWEBPAGE_ISMODIFIED ) { - hb_retl( hbqt_par_QWebPage( 1 )->isModified( ) ); + hb_retl( hbqt_par_QWebPage( 1 )->isModified() ); } /* @@ -168,7 +166,7 @@ HB_FUNC( QT_QWEBPAGE_ISMODIFIED ) */ HB_FUNC( QT_QWEBPAGE_LINKDELEGATIONPOLICY ) { - hb_retni( hbqt_par_QWebPage( 1 )->linkDelegationPolicy( ) ); + hb_retni( ( QWebPage::LinkDelegationPolicy ) hbqt_par_QWebPage( 1 )->linkDelegationPolicy() ); } /* @@ -176,7 +174,7 @@ HB_FUNC( QT_QWEBPAGE_LINKDELEGATIONPOLICY ) */ HB_FUNC( QT_QWEBPAGE_MAINFRAME ) { - hb_retptr( ( QWebFrame* ) hbqt_par_QWebPage( 1 )->mainFrame( ) ); + hb_retptr( ( QWebFrame* ) hbqt_par_QWebPage( 1 )->mainFrame() ); } /* @@ -184,7 +182,15 @@ HB_FUNC( QT_QWEBPAGE_MAINFRAME ) */ HB_FUNC( QT_QWEBPAGE_NETWORKACCESSMANAGER ) { - hb_retptr( ( QNetworkAccessManager* ) hbqt_par_QWebPage( 1 )->networkAccessManager( ) ); + hb_retptr( ( QNetworkAccessManager* ) hbqt_par_QWebPage( 1 )->networkAccessManager() ); +} + +/* + * QPalette palette () const + */ +HB_FUNC( QT_QWEBPAGE_PALETTE ) +{ + hb_retptr( new QPalette( hbqt_par_QWebPage( 1 )->palette() ) ); } /* @@ -192,7 +198,7 @@ HB_FUNC( QT_QWEBPAGE_NETWORKACCESSMANAGER ) */ HB_FUNC( QT_QWEBPAGE_PLUGINFACTORY ) { - hb_retptr( ( QWebPluginFactory* ) hbqt_par_QWebPage( 1 )->pluginFactory( ) ); + hb_retptr( ( QWebPluginFactory* ) hbqt_par_QWebPage( 1 )->pluginFactory() ); } /* @@ -200,7 +206,7 @@ HB_FUNC( QT_QWEBPAGE_PLUGINFACTORY ) */ HB_FUNC( QT_QWEBPAGE_SELECTEDTEXT ) { - hb_retc( hbqt_par_QWebPage( 1 )->selectedText( ).toLatin1().data() ); + hb_retc( hbqt_par_QWebPage( 1 )->selectedText().toLatin1().data() ); } /* @@ -235,6 +241,14 @@ HB_FUNC( QT_QWEBPAGE_SETNETWORKACCESSMANAGER ) hbqt_par_QWebPage( 1 )->setNetworkAccessManager( hbqt_par_QNetworkAccessManager( 2 ) ); } +/* + * void setPalette ( const QPalette & palette ) + */ +HB_FUNC( QT_QWEBPAGE_SETPALETTE ) +{ + hbqt_par_QWebPage( 1 )->setPalette( *hbqt_par_QPalette( 2 ) ); +} + /* * void setPluginFactory ( QWebPluginFactory * factory ) */ @@ -256,7 +270,7 @@ HB_FUNC( QT_QWEBPAGE_SETVIEW ) */ HB_FUNC( QT_QWEBPAGE_SETVIEWPORTSIZE ) { - hbqt_par_QWebPage( 1 )->setViewportSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QWebPage( 1 )->setViewportSize( *hbqt_par_QSize( 2 ) ); } /* @@ -264,7 +278,7 @@ HB_FUNC( QT_QWEBPAGE_SETVIEWPORTSIZE ) */ HB_FUNC( QT_QWEBPAGE_SETTINGS ) { - hb_retptr( ( QWebSettings* ) hbqt_par_QWebPage( 1 )->settings( ) ); + hb_retptr( ( QWebSettings* ) hbqt_par_QWebPage( 1 )->settings() ); } /* @@ -283,6 +297,14 @@ HB_FUNC( QT_QWEBPAGE_SWALLOWCONTEXTMENUEVENT ) hb_retl( hbqt_par_QWebPage( 1 )->swallowContextMenuEvent( hbqt_par_QContextMenuEvent( 2 ) ) ); } +/* + * quint64 totalBytes () const + */ +HB_FUNC( QT_QWEBPAGE_TOTALBYTES ) +{ + hb_retni( hbqt_par_QWebPage( 1 )->totalBytes() ); +} + /* * virtual void triggerAction ( WebAction action, bool checked = false ) */ @@ -296,7 +318,7 @@ HB_FUNC( QT_QWEBPAGE_TRIGGERACTION ) */ HB_FUNC( QT_QWEBPAGE_UNDOSTACK ) { - hb_retptr( ( QUndoStack* ) hbqt_par_QWebPage( 1 )->undoStack( ) ); + hb_retptr( ( QUndoStack* ) hbqt_par_QWebPage( 1 )->undoStack() ); } /* @@ -304,7 +326,7 @@ HB_FUNC( QT_QWEBPAGE_UNDOSTACK ) */ HB_FUNC( QT_QWEBPAGE_UPDATEPOSITIONDEPENDENTACTIONS ) { - hbqt_par_QWebPage( 1 )->updatePositionDependentActions( hbqt_const_QPoint( 2 ) ); + hbqt_par_QWebPage( 1 )->updatePositionDependentActions( *hbqt_par_QPoint( 2 ) ); } /* @@ -312,7 +334,7 @@ HB_FUNC( QT_QWEBPAGE_UPDATEPOSITIONDEPENDENTACTIONS ) */ HB_FUNC( QT_QWEBPAGE_VIEW ) { - hb_retptr( ( QWidget* ) hbqt_par_QWebPage( 1 )->view( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWebPage( 1 )->view() ); } /* @@ -320,7 +342,7 @@ HB_FUNC( QT_QWEBPAGE_VIEW ) */ HB_FUNC( QT_QWEBPAGE_VIEWPORTSIZE ) { - hbqt_ret_QSize( hbqt_par_QWebPage( 1 )->viewportSize( ) ); + hb_retptr( new QSize( hbqt_par_QWebPage( 1 )->viewportSize() ) ); } diff --git a/harbour/contrib/hbqt/hbqt_qwebview.cpp b/harbour/contrib/hbqt/hbqt_qwebview.cpp index 7db3d0a2e7..9ea8d0cb59 100644 --- a/harbour/contrib/hbqt/hbqt_qwebview.cpp +++ b/harbour/contrib/hbqt/hbqt_qwebview.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -60,22 +60,6 @@ /*----------------------------------------------------------------------*/ -/* - * Constructed[ 19/26 [ 73.08% ] ] - * - * *** Unconvered Prototypes *** - * ----------------------------- - * - * QIcon icon () const - * void load ( const QUrl & url ) - * void load ( const QNetworkRequest & request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray & body = QByteArray() ) - * void setContent ( const QByteArray & data, const QString & mimeType = QString(), const QUrl & baseUrl = QUrl() ) - * void setHtml ( const QString & html, const QUrl & baseUrl = QUrl() ) - * void setUrl ( const QUrl & url ) - * QUrl url () const - */ - - #include @@ -94,7 +78,7 @@ HB_FUNC( QT_QWEBVIEW ) */ HB_FUNC( QT_QWEBVIEW_FINDTEXT ) { - hb_retl( hbqt_par_QWebView( 1 )->findText( hbqt_par_QString( 2 ), ( QWebPage::FindFlags ) hb_parni( 3 ) ) ); + hb_retl( hbqt_par_QWebView( 1 )->findText( hbqt_par_QString( 2 ), ( HB_ISNIL( 3 ) ? ( QWebPage::FindFlags ) 0 : ( QWebPage::FindFlags ) hb_parni( 3 ) ) ) ); } /* @@ -102,7 +86,15 @@ HB_FUNC( QT_QWEBVIEW_FINDTEXT ) */ HB_FUNC( QT_QWEBVIEW_HISTORY ) { - hb_retptr( ( QWebHistory* ) hbqt_par_QWebView( 1 )->history( ) ); + hb_retptr( ( QWebHistory* ) hbqt_par_QWebView( 1 )->history() ); +} + +/* + * QIcon icon () const + */ +HB_FUNC( QT_QWEBVIEW_ICON ) +{ + hb_retptr( new QIcon( hbqt_par_QWebView( 1 )->icon() ) ); } /* @@ -110,7 +102,23 @@ HB_FUNC( QT_QWEBVIEW_HISTORY ) */ HB_FUNC( QT_QWEBVIEW_ISMODIFIED ) { - hb_retl( hbqt_par_QWebView( 1 )->isModified( ) ); + hb_retl( hbqt_par_QWebView( 1 )->isModified() ); +} + +/* + * void load ( const QUrl & url ) + */ +HB_FUNC( QT_QWEBVIEW_LOAD ) +{ + hbqt_par_QWebView( 1 )->load( *hbqt_par_QUrl( 2 ) ); +} + +/* + * void load ( const QNetworkRequest & request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray & body = QByteArray() ) + */ +HB_FUNC( QT_QWEBVIEW_LOAD_1 ) +{ + hbqt_par_QWebView( 1 )->load( *hbqt_par_QNetworkRequest( 2 ), ( HB_ISNIL( 3 ) ? ( QNetworkAccessManager::Operation ) QNetworkAccessManager::GetOperation : ( QNetworkAccessManager::Operation ) hb_parni( 3 ) ), *hbqt_par_QByteArray( 4 ) ); } /* @@ -118,7 +126,7 @@ HB_FUNC( QT_QWEBVIEW_ISMODIFIED ) */ HB_FUNC( QT_QWEBVIEW_PAGE ) { - hb_retptr( ( QWebPage* ) hbqt_par_QWebView( 1 )->page( ) ); + hb_retptr( ( QWebPage* ) hbqt_par_QWebView( 1 )->page() ); } /* @@ -134,7 +142,23 @@ HB_FUNC( QT_QWEBVIEW_PAGEACTION ) */ HB_FUNC( QT_QWEBVIEW_SELECTEDTEXT ) { - hb_retc( hbqt_par_QWebView( 1 )->selectedText( ).toLatin1().data() ); + hb_retc( hbqt_par_QWebView( 1 )->selectedText().toLatin1().data() ); +} + +/* + * void setContent ( const QByteArray & data, const QString & mimeType = QString(), const QUrl & baseUrl = QUrl() ) + */ +HB_FUNC( QT_QWEBVIEW_SETCONTENT ) +{ + hbqt_par_QWebView( 1 )->setContent( *hbqt_par_QByteArray( 2 ), hbqt_par_QString( 3 ) ); +} + +/* + * void setHtml ( const QString & html, const QUrl & baseUrl = QUrl() ) + */ +HB_FUNC( QT_QWEBVIEW_SETHTML ) +{ + hbqt_par_QWebView( 1 )->setHtml( hbqt_par_QString( 2 ), *hbqt_par_QUrl( 3 ) ); } /* @@ -153,6 +177,14 @@ HB_FUNC( QT_QWEBVIEW_SETTEXTSIZEMULTIPLIER ) hbqt_par_QWebView( 1 )->setTextSizeMultiplier( hb_parnd( 2 ) ); } +/* + * void setUrl ( const QUrl & url ) + */ +HB_FUNC( QT_QWEBVIEW_SETURL ) +{ + hbqt_par_QWebView( 1 )->setUrl( *hbqt_par_QUrl( 2 ) ); +} + /* * void setZoomFactor ( qreal factor ) */ @@ -166,7 +198,7 @@ HB_FUNC( QT_QWEBVIEW_SETZOOMFACTOR ) */ HB_FUNC( QT_QWEBVIEW_SETTINGS ) { - hb_retptr( ( QWebSettings* ) hbqt_par_QWebView( 1 )->settings( ) ); + hb_retptr( ( QWebSettings* ) hbqt_par_QWebView( 1 )->settings() ); } /* @@ -174,7 +206,7 @@ HB_FUNC( QT_QWEBVIEW_SETTINGS ) */ HB_FUNC( QT_QWEBVIEW_TEXTSIZEMULTIPLIER ) { - hb_retnd( hbqt_par_QWebView( 1 )->textSizeMultiplier( ) ); + hb_retnd( hbqt_par_QWebView( 1 )->textSizeMultiplier() ); } /* @@ -182,7 +214,7 @@ HB_FUNC( QT_QWEBVIEW_TEXTSIZEMULTIPLIER ) */ HB_FUNC( QT_QWEBVIEW_TITLE ) { - hb_retc( hbqt_par_QWebView( 1 )->title( ).toLatin1().data() ); + hb_retc( hbqt_par_QWebView( 1 )->title().toLatin1().data() ); } /* @@ -193,12 +225,20 @@ HB_FUNC( QT_QWEBVIEW_TRIGGERPAGEACTION ) hbqt_par_QWebView( 1 )->triggerPageAction( ( QWebPage::WebAction ) hb_parni( 2 ), hb_parl( 3 ) ); } +/* + * QUrl url () const + */ +HB_FUNC( QT_QWEBVIEW_URL ) +{ + hb_retptr( new QUrl( hbqt_par_QWebView( 1 )->url() ) ); +} + /* * qreal zoomFactor () const */ HB_FUNC( QT_QWEBVIEW_ZOOMFACTOR ) { - hb_retnd( hbqt_par_QWebView( 1 )->zoomFactor( ) ); + hb_retnd( hbqt_par_QWebView( 1 )->zoomFactor() ); } /* @@ -206,7 +246,7 @@ HB_FUNC( QT_QWEBVIEW_ZOOMFACTOR ) */ HB_FUNC( QT_QWEBVIEW_BACK ) { - hbqt_par_QWebView( 1 )->back( ); + hbqt_par_QWebView( 1 )->back(); } /* @@ -214,7 +254,7 @@ HB_FUNC( QT_QWEBVIEW_BACK ) */ HB_FUNC( QT_QWEBVIEW_FORWARD ) { - hbqt_par_QWebView( 1 )->forward( ); + hbqt_par_QWebView( 1 )->forward(); } /* @@ -230,7 +270,7 @@ HB_FUNC( QT_QWEBVIEW_PRINT ) */ HB_FUNC( QT_QWEBVIEW_RELOAD ) { - hbqt_par_QWebView( 1 )->reload( ); + hbqt_par_QWebView( 1 )->reload(); } /* @@ -238,7 +278,7 @@ HB_FUNC( QT_QWEBVIEW_RELOAD ) */ HB_FUNC( QT_QWEBVIEW_STOP ) { - hbqt_par_QWebView( 1 )->stop( ); + hbqt_par_QWebView( 1 )->stop(); } diff --git a/harbour/contrib/hbqt/hbqt_qwidget.cpp b/harbour/contrib/hbqt/hbqt_qwidget.cpp index ccc04a00c7..5187fdb0b0 100644 --- a/harbour/contrib/hbqt/hbqt_qwidget.cpp +++ b/harbour/contrib/hbqt/hbqt_qwidget.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,63 +59,22 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 182/219 [ 83.11% ] ] - * + * Constructed[ 216/219 [ 98.63% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * + * * QList actions () const * void addActions ( QList actions ) - * QRegion childrenRegion () const - * QCursor cursor () const - * WId effectiveWinId () const - * const QFont & font () const - * QFontInfo fontInfo () const - * QFontMetrics fontMetrics () const - * const QRect & geometry () const - * void getContentsMargins ( int * left, int * top, int * right, int * bottom ) const - * virtual HDC getDC () const - * void grabMouse ( const QCursor & cursor ) - * int grabShortcut ( const QKeySequence & key, Qt::ShortcutContext context = Qt::WindowShortcut ) - * virtual QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const * void insertActions ( QAction * before, QList actions ) - * QLocale locale () const - * QRegion mask () const - * const QPalette & palette () const - * virtual void releaseDC ( HDC hdc ) const - * void render ( QPaintDevice * target, const QPoint & targetOffset = QPoint(), const QRegion & sourceRegion = QRegion(), RenderFlags renderFlags = RenderFlags( DrawWindowBackground | DrawChildren ) ) - * void render ( QPainter * painter, const QPoint & targetOffset = QPoint(), const QRegion & sourceRegion = QRegion(), RenderFlags renderFlags = RenderFlags( DrawWindowBackground | DrawChildren ) ) - * void repaint ( const QRegion & rgn ) - * bool restoreGeometry ( const QByteArray & geometry ) - * QByteArray saveGeometry () const - * void setCursor ( const QCursor & ) - * void setFont ( const QFont & ) - * void setLocale ( const QLocale & locale ) - * void setMask ( const QBitmap & bitmap ) - * void setMask ( const QRegion & region ) - * void setPalette ( const QPalette & ) - * void setSizePolicy ( QSizePolicy ) - * QSizePolicy sizePolicy () const - * void update ( const QRegion & rgn ) - * QRegion visibleRegion () const - * WId winId () const - * QIcon windowIcon () const - * QWindowSurface * windowSurface () const (preliminary) - * - * *** Commented out protos which construct fine but do not compile *** - * - * //bool hasEditFocus () const - * //Qt::HANDLE macCGHandle () const - * //Qt::HANDLE macQDHandle () const - * //void setEditFocus ( bool enable ) - * //Qt::HANDLE x11PictureHandle () const - */ + */ #include #include +#include +#include /* @@ -131,7 +90,7 @@ HB_FUNC( QT_QWIDGET ) */ HB_FUNC( QT_QWIDGET_ACCEPTDROPS ) { - hb_retl( hbqt_par_QWidget( 1 )->acceptDrops( ) ); + hb_retl( hbqt_par_QWidget( 1 )->acceptDrops() ); } /* @@ -139,7 +98,7 @@ HB_FUNC( QT_QWIDGET_ACCEPTDROPS ) */ HB_FUNC( QT_QWIDGET_ACCESSIBLEDESCRIPTION ) { - hb_retc( hbqt_par_QWidget( 1 )->accessibleDescription( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->accessibleDescription().toLatin1().data() ); } /* @@ -147,7 +106,7 @@ HB_FUNC( QT_QWIDGET_ACCESSIBLEDESCRIPTION ) */ HB_FUNC( QT_QWIDGET_ACCESSIBLENAME ) { - hb_retc( hbqt_par_QWidget( 1 )->accessibleName( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->accessibleName().toLatin1().data() ); } /* @@ -155,7 +114,7 @@ HB_FUNC( QT_QWIDGET_ACCESSIBLENAME ) */ HB_FUNC( QT_QWIDGET_ACTIVATEWINDOW ) { - hbqt_par_QWidget( 1 )->activateWindow( ); + hbqt_par_QWidget( 1 )->activateWindow(); } /* @@ -171,7 +130,7 @@ HB_FUNC( QT_QWIDGET_ADDACTION ) */ HB_FUNC( QT_QWIDGET_ADJUSTSIZE ) { - hbqt_par_QWidget( 1 )->adjustSize( ); + hbqt_par_QWidget( 1 )->adjustSize(); } /* @@ -179,7 +138,7 @@ HB_FUNC( QT_QWIDGET_ADJUSTSIZE ) */ HB_FUNC( QT_QWIDGET_AUTOFILLBACKGROUND ) { - hb_retl( hbqt_par_QWidget( 1 )->autoFillBackground( ) ); + hb_retl( hbqt_par_QWidget( 1 )->autoFillBackground() ); } /* @@ -187,7 +146,7 @@ HB_FUNC( QT_QWIDGET_AUTOFILLBACKGROUND ) */ HB_FUNC( QT_QWIDGET_BACKGROUNDROLE ) { - hb_retni( hbqt_par_QWidget( 1 )->backgroundRole( ) ); + hb_retni( ( QPalette::ColorRole ) hbqt_par_QWidget( 1 )->backgroundRole() ); } /* @@ -195,7 +154,7 @@ HB_FUNC( QT_QWIDGET_BACKGROUNDROLE ) */ HB_FUNC( QT_QWIDGET_BASESIZE ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->baseSize( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->baseSize() ) ); } /* @@ -211,7 +170,7 @@ HB_FUNC( QT_QWIDGET_CHILDAT ) */ HB_FUNC( QT_QWIDGET_CHILDAT_1 ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->childAt( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->childAt( *hbqt_par_QPoint( 2 ) ) ); } /* @@ -219,7 +178,15 @@ HB_FUNC( QT_QWIDGET_CHILDAT_1 ) */ HB_FUNC( QT_QWIDGET_CHILDRENRECT ) { - hbqt_ret_QRect( hbqt_par_QWidget( 1 )->childrenRect( ) ); + hb_retptr( new QRect( hbqt_par_QWidget( 1 )->childrenRect() ) ); +} + +/* + * QRegion childrenRegion () const + */ +HB_FUNC( QT_QWIDGET_CHILDRENREGION ) +{ + hb_retptr( new QRegion( hbqt_par_QWidget( 1 )->childrenRegion() ) ); } /* @@ -227,7 +194,7 @@ HB_FUNC( QT_QWIDGET_CHILDRENRECT ) */ HB_FUNC( QT_QWIDGET_CLEARFOCUS ) { - hbqt_par_QWidget( 1 )->clearFocus( ); + hbqt_par_QWidget( 1 )->clearFocus(); } /* @@ -235,7 +202,7 @@ HB_FUNC( QT_QWIDGET_CLEARFOCUS ) */ HB_FUNC( QT_QWIDGET_CLEARMASK ) { - hbqt_par_QWidget( 1 )->clearMask( ); + hbqt_par_QWidget( 1 )->clearMask(); } /* @@ -243,7 +210,7 @@ HB_FUNC( QT_QWIDGET_CLEARMASK ) */ HB_FUNC( QT_QWIDGET_CONTENTSRECT ) { - hbqt_ret_QRect( hbqt_par_QWidget( 1 )->contentsRect( ) ); + hb_retptr( new QRect( hbqt_par_QWidget( 1 )->contentsRect() ) ); } /* @@ -251,7 +218,23 @@ HB_FUNC( QT_QWIDGET_CONTENTSRECT ) */ HB_FUNC( QT_QWIDGET_CONTEXTMENUPOLICY ) { - hb_retni( hbqt_par_QWidget( 1 )->contextMenuPolicy( ) ); + hb_retni( ( Qt::ContextMenuPolicy ) hbqt_par_QWidget( 1 )->contextMenuPolicy() ); +} + +/* + * QCursor cursor () const + */ +HB_FUNC( QT_QWIDGET_CURSOR ) +{ + hb_retptr( new QCursor( hbqt_par_QWidget( 1 )->cursor() ) ); +} + +/* + * WId effectiveWinId () const + */ +HB_FUNC( QT_QWIDGET_EFFECTIVEWINID ) +{ + hb_retptr( ( HWND ) hbqt_par_QWidget( 1 )->effectiveWinId() ); } /* @@ -259,7 +242,7 @@ HB_FUNC( QT_QWIDGET_CONTEXTMENUPOLICY ) */ HB_FUNC( QT_QWIDGET_ENSUREPOLISHED ) { - hbqt_par_QWidget( 1 )->ensurePolished( ); + hbqt_par_QWidget( 1 )->ensurePolished(); } /* @@ -267,7 +250,7 @@ HB_FUNC( QT_QWIDGET_ENSUREPOLISHED ) */ HB_FUNC( QT_QWIDGET_FOCUSPOLICY ) { - hb_retni( hbqt_par_QWidget( 1 )->focusPolicy( ) ); + hb_retni( ( Qt::FocusPolicy ) hbqt_par_QWidget( 1 )->focusPolicy() ); } /* @@ -275,7 +258,7 @@ HB_FUNC( QT_QWIDGET_FOCUSPOLICY ) */ HB_FUNC( QT_QWIDGET_FOCUSPROXY ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->focusProxy( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->focusProxy() ); } /* @@ -283,7 +266,31 @@ HB_FUNC( QT_QWIDGET_FOCUSPROXY ) */ HB_FUNC( QT_QWIDGET_FOCUSWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->focusWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->focusWidget() ); +} + +/* + * const QFont & font () const + */ +HB_FUNC( QT_QWIDGET_FONT ) +{ + hb_retptr( new QFont( hbqt_par_QWidget( 1 )->font() ) ); +} + +/* + * QFontInfo fontInfo () const + */ +HB_FUNC( QT_QWIDGET_FONTINFO ) +{ + hb_retptr( new QFontInfo( hbqt_par_QWidget( 1 )->fontInfo() ) ); +} + +/* + * QFontMetrics fontMetrics () const + */ +HB_FUNC( QT_QWIDGET_FONTMETRICS ) +{ + hb_retptr( new QFontMetrics( hbqt_par_QWidget( 1 )->fontMetrics() ) ); } /* @@ -291,7 +298,7 @@ HB_FUNC( QT_QWIDGET_FOCUSWIDGET ) */ HB_FUNC( QT_QWIDGET_FOREGROUNDROLE ) { - hb_retni( hbqt_par_QWidget( 1 )->foregroundRole( ) ); + hb_retni( ( QPalette::ColorRole ) hbqt_par_QWidget( 1 )->foregroundRole() ); } /* @@ -299,7 +306,7 @@ HB_FUNC( QT_QWIDGET_FOREGROUNDROLE ) */ HB_FUNC( QT_QWIDGET_FRAMEGEOMETRY ) { - hbqt_ret_QRect( hbqt_par_QWidget( 1 )->frameGeometry( ) ); + hb_retptr( new QRect( hbqt_par_QWidget( 1 )->frameGeometry() ) ); } /* @@ -307,7 +314,41 @@ HB_FUNC( QT_QWIDGET_FRAMEGEOMETRY ) */ HB_FUNC( QT_QWIDGET_FRAMESIZE ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->frameSize( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->frameSize() ) ); +} + +/* + * const QRect & geometry () const + */ +HB_FUNC( QT_QWIDGET_GEOMETRY ) +{ + hb_retptr( new QRect( hbqt_par_QWidget( 1 )->geometry() ) ); +} + +/* + * void getContentsMargins ( int * left, int * top, int * right, int * bottom ) const + */ +HB_FUNC( QT_QWIDGET_GETCONTENTSMARGINS ) +{ + int iLeft = 0; + int iTop = 0; + int iRight = 0; + int iBottom = 0; + + hbqt_par_QWidget( 1 )->getContentsMargins( &iLeft, &iTop, &iRight, &iBottom ); + + hb_storni( iLeft, 2 ); + hb_storni( iTop, 3 ); + hb_storni( iRight, 4 ); + hb_storni( iBottom, 5 ); +} + +/* + * virtual HDC getDC () const + */ +HB_FUNC( QT_QWIDGET_GETDC ) +{ + hb_retptr( ( HDC ) hbqt_par_QWidget( 1 )->getDC() ); } /* @@ -315,7 +356,7 @@ HB_FUNC( QT_QWIDGET_FRAMESIZE ) */ HB_FUNC( QT_QWIDGET_GRABKEYBOARD ) { - hbqt_par_QWidget( 1 )->grabKeyboard( ); + hbqt_par_QWidget( 1 )->grabKeyboard(); } /* @@ -323,7 +364,23 @@ HB_FUNC( QT_QWIDGET_GRABKEYBOARD ) */ HB_FUNC( QT_QWIDGET_GRABMOUSE ) { - hbqt_par_QWidget( 1 )->grabMouse( ); + hbqt_par_QWidget( 1 )->grabMouse(); +} + +/* + * void grabMouse ( const QCursor & cursor ) + */ +HB_FUNC( QT_QWIDGET_GRABMOUSE_1 ) +{ + hbqt_par_QWidget( 1 )->grabMouse( *hbqt_par_QCursor( 2 ) ); +} + +/* + * int grabShortcut ( const QKeySequence & key, Qt::ShortcutContext context = Qt::WindowShortcut ) + */ +HB_FUNC( QT_QWIDGET_GRABSHORTCUT ) +{ + hb_retni( hbqt_par_QWidget( 1 )->grabShortcut( *hbqt_par_QKeySequence( 2 ), ( HB_ISNIL( 3 ) ? ( Qt::ShortcutContext ) Qt::WindowShortcut : ( Qt::ShortcutContext ) hb_parni( 3 ) ) ) ); } /* @@ -331,7 +388,7 @@ HB_FUNC( QT_QWIDGET_GRABMOUSE ) */ HB_FUNC( QT_QWIDGET_GRAPHICSPROXYWIDGET ) { - hb_retptr( ( QGraphicsProxyWidget* ) hbqt_par_QWidget( 1 )->graphicsProxyWidget( ) ); + hb_retptr( ( QGraphicsProxyWidget* ) hbqt_par_QWidget( 1 )->graphicsProxyWidget() ); } /* @@ -339,7 +396,7 @@ HB_FUNC( QT_QWIDGET_GRAPHICSPROXYWIDGET ) */ HB_FUNC( QT_QWIDGET_HASFOCUS ) { - hb_retl( hbqt_par_QWidget( 1 )->hasFocus( ) ); + hb_retl( hbqt_par_QWidget( 1 )->hasFocus() ); } /* @@ -347,7 +404,7 @@ HB_FUNC( QT_QWIDGET_HASFOCUS ) */ HB_FUNC( QT_QWIDGET_HASMOUSETRACKING ) { - hb_retl( hbqt_par_QWidget( 1 )->hasMouseTracking( ) ); + hb_retl( hbqt_par_QWidget( 1 )->hasMouseTracking() ); } /* @@ -355,7 +412,7 @@ HB_FUNC( QT_QWIDGET_HASMOUSETRACKING ) */ HB_FUNC( QT_QWIDGET_HEIGHT ) { - hb_retni( hbqt_par_QWidget( 1 )->height( ) ); + hb_retni( hbqt_par_QWidget( 1 )->height() ); } /* @@ -371,7 +428,15 @@ HB_FUNC( QT_QWIDGET_HEIGHTFORWIDTH ) */ HB_FUNC( QT_QWIDGET_INPUTCONTEXT ) { - hb_retptr( ( QInputContext* ) hbqt_par_QWidget( 1 )->inputContext( ) ); + hb_retptr( ( QInputContext* ) hbqt_par_QWidget( 1 )->inputContext() ); +} + +/* + * virtual QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const + */ +HB_FUNC( QT_QWIDGET_INPUTMETHODQUERY ) +{ + hb_retptr( new QVariant( hbqt_par_QWidget( 1 )->inputMethodQuery( ( Qt::InputMethodQuery ) hb_parni( 2 ) ) ) ); } /* @@ -387,7 +452,7 @@ HB_FUNC( QT_QWIDGET_INSERTACTION ) */ HB_FUNC( QT_QWIDGET_ISACTIVEWINDOW ) { - hb_retl( hbqt_par_QWidget( 1 )->isActiveWindow( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isActiveWindow() ); } /* @@ -403,7 +468,7 @@ HB_FUNC( QT_QWIDGET_ISANCESTOROF ) */ HB_FUNC( QT_QWIDGET_ISENABLED ) { - hb_retl( hbqt_par_QWidget( 1 )->isEnabled( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isEnabled() ); } /* @@ -419,7 +484,7 @@ HB_FUNC( QT_QWIDGET_ISENABLEDTO ) */ HB_FUNC( QT_QWIDGET_ISFULLSCREEN ) { - hb_retl( hbqt_par_QWidget( 1 )->isFullScreen( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isFullScreen() ); } /* @@ -427,7 +492,7 @@ HB_FUNC( QT_QWIDGET_ISFULLSCREEN ) */ HB_FUNC( QT_QWIDGET_ISHIDDEN ) { - hb_retl( hbqt_par_QWidget( 1 )->isHidden( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isHidden() ); } /* @@ -435,7 +500,7 @@ HB_FUNC( QT_QWIDGET_ISHIDDEN ) */ HB_FUNC( QT_QWIDGET_ISMAXIMIZED ) { - hb_retl( hbqt_par_QWidget( 1 )->isMaximized( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isMaximized() ); } /* @@ -443,7 +508,7 @@ HB_FUNC( QT_QWIDGET_ISMAXIMIZED ) */ HB_FUNC( QT_QWIDGET_ISMINIMIZED ) { - hb_retl( hbqt_par_QWidget( 1 )->isMinimized( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isMinimized() ); } /* @@ -451,7 +516,7 @@ HB_FUNC( QT_QWIDGET_ISMINIMIZED ) */ HB_FUNC( QT_QWIDGET_ISMODAL ) { - hb_retl( hbqt_par_QWidget( 1 )->isModal( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isModal() ); } /* @@ -459,7 +524,7 @@ HB_FUNC( QT_QWIDGET_ISMODAL ) */ HB_FUNC( QT_QWIDGET_ISVISIBLE ) { - hb_retl( hbqt_par_QWidget( 1 )->isVisible( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isVisible() ); } /* @@ -475,7 +540,7 @@ HB_FUNC( QT_QWIDGET_ISVISIBLETO ) */ HB_FUNC( QT_QWIDGET_ISWINDOW ) { - hb_retl( hbqt_par_QWidget( 1 )->isWindow( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isWindow() ); } /* @@ -483,7 +548,7 @@ HB_FUNC( QT_QWIDGET_ISWINDOW ) */ HB_FUNC( QT_QWIDGET_ISWINDOWMODIFIED ) { - hb_retl( hbqt_par_QWidget( 1 )->isWindowModified( ) ); + hb_retl( hbqt_par_QWidget( 1 )->isWindowModified() ); } /* @@ -491,7 +556,7 @@ HB_FUNC( QT_QWIDGET_ISWINDOWMODIFIED ) */ HB_FUNC( QT_QWIDGET_LAYOUT ) { - hb_retptr( ( QLayout* ) hbqt_par_QWidget( 1 )->layout( ) ); + hb_retptr( ( QLayout* ) hbqt_par_QWidget( 1 )->layout() ); } /* @@ -499,7 +564,15 @@ HB_FUNC( QT_QWIDGET_LAYOUT ) */ HB_FUNC( QT_QWIDGET_LAYOUTDIRECTION ) { - hb_retni( hbqt_par_QWidget( 1 )->layoutDirection( ) ); + hb_retni( ( Qt::LayoutDirection ) hbqt_par_QWidget( 1 )->layoutDirection() ); +} + +/* + * QLocale locale () const + */ +HB_FUNC( QT_QWIDGET_LOCALE ) +{ + hb_retptr( new QLocale( hbqt_par_QWidget( 1 )->locale() ) ); } /* @@ -507,7 +580,7 @@ HB_FUNC( QT_QWIDGET_LAYOUTDIRECTION ) */ HB_FUNC( QT_QWIDGET_MAPFROM ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->mapFrom( hbqt_par_QWidget( 2 ), hbqt_const_QPoint( 3 ) ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->mapFrom( hbqt_par_QWidget( 2 ), *hbqt_par_QPoint( 3 ) ) ) ); } /* @@ -515,7 +588,7 @@ HB_FUNC( QT_QWIDGET_MAPFROM ) */ HB_FUNC( QT_QWIDGET_MAPFROMGLOBAL ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->mapFromGlobal( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->mapFromGlobal( *hbqt_par_QPoint( 2 ) ) ) ); } /* @@ -523,7 +596,7 @@ HB_FUNC( QT_QWIDGET_MAPFROMGLOBAL ) */ HB_FUNC( QT_QWIDGET_MAPFROMPARENT ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->mapFromParent( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->mapFromParent( *hbqt_par_QPoint( 2 ) ) ) ); } /* @@ -531,7 +604,7 @@ HB_FUNC( QT_QWIDGET_MAPFROMPARENT ) */ HB_FUNC( QT_QWIDGET_MAPTO ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->mapTo( hbqt_par_QWidget( 2 ), hbqt_const_QPoint( 3 ) ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->mapTo( hbqt_par_QWidget( 2 ), *hbqt_par_QPoint( 3 ) ) ) ); } /* @@ -539,7 +612,7 @@ HB_FUNC( QT_QWIDGET_MAPTO ) */ HB_FUNC( QT_QWIDGET_MAPTOGLOBAL ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->mapToGlobal( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->mapToGlobal( *hbqt_par_QPoint( 2 ) ) ) ); } /* @@ -547,7 +620,15 @@ HB_FUNC( QT_QWIDGET_MAPTOGLOBAL ) */ HB_FUNC( QT_QWIDGET_MAPTOPARENT ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->mapToParent( hbqt_const_QPoint( 2 ) ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->mapToParent( *hbqt_par_QPoint( 2 ) ) ) ); +} + +/* + * QRegion mask () const + */ +HB_FUNC( QT_QWIDGET_MASK ) +{ + hb_retptr( new QRegion( hbqt_par_QWidget( 1 )->mask() ) ); } /* @@ -555,7 +636,7 @@ HB_FUNC( QT_QWIDGET_MAPTOPARENT ) */ HB_FUNC( QT_QWIDGET_MAXIMUMHEIGHT ) { - hb_retni( hbqt_par_QWidget( 1 )->maximumHeight( ) ); + hb_retni( hbqt_par_QWidget( 1 )->maximumHeight() ); } /* @@ -563,7 +644,7 @@ HB_FUNC( QT_QWIDGET_MAXIMUMHEIGHT ) */ HB_FUNC( QT_QWIDGET_MAXIMUMSIZE ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->maximumSize( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->maximumSize() ) ); } /* @@ -571,7 +652,7 @@ HB_FUNC( QT_QWIDGET_MAXIMUMSIZE ) */ HB_FUNC( QT_QWIDGET_MAXIMUMWIDTH ) { - hb_retni( hbqt_par_QWidget( 1 )->maximumWidth( ) ); + hb_retni( hbqt_par_QWidget( 1 )->maximumWidth() ); } /* @@ -579,7 +660,7 @@ HB_FUNC( QT_QWIDGET_MAXIMUMWIDTH ) */ HB_FUNC( QT_QWIDGET_MINIMUMHEIGHT ) { - hb_retni( hbqt_par_QWidget( 1 )->minimumHeight( ) ); + hb_retni( hbqt_par_QWidget( 1 )->minimumHeight() ); } /* @@ -587,7 +668,7 @@ HB_FUNC( QT_QWIDGET_MINIMUMHEIGHT ) */ HB_FUNC( QT_QWIDGET_MINIMUMSIZE ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->minimumSize( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->minimumSize() ) ); } /* @@ -595,7 +676,7 @@ HB_FUNC( QT_QWIDGET_MINIMUMSIZE ) */ HB_FUNC( QT_QWIDGET_MINIMUMSIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->minimumSizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->minimumSizeHint() ) ); } /* @@ -603,31 +684,31 @@ HB_FUNC( QT_QWIDGET_MINIMUMSIZEHINT ) */ HB_FUNC( QT_QWIDGET_MINIMUMWIDTH ) { - hb_retni( hbqt_par_QWidget( 1 )->minimumWidth( ) ); -} - -/* - * void move ( const QPoint & ) - */ -HB_FUNC( QT_QWIDGET_MOVE ) -{ - hbqt_par_QWidget( 1 )->move( hbqt_const_QPoint( 2 ) ); + hb_retni( hbqt_par_QWidget( 1 )->minimumWidth() ); } /* * void move ( int x, int y ) */ -HB_FUNC( QT_QWIDGET_MOVE_1 ) +HB_FUNC( QT_QWIDGET_MOVE ) { hbqt_par_QWidget( 1 )->move( hb_parni( 2 ), hb_parni( 3 ) ); } +/* + * void move ( const QPoint & ) + */ +HB_FUNC( QT_QWIDGET_MOVE_1 ) +{ + hbqt_par_QWidget( 1 )->move( *hbqt_par_QPoint( 2 ) ); +} + /* * QWidget * nativeParentWidget () const */ HB_FUNC( QT_QWIDGET_NATIVEPARENTWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->nativeParentWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->nativeParentWidget() ); } /* @@ -635,7 +716,7 @@ HB_FUNC( QT_QWIDGET_NATIVEPARENTWIDGET ) */ HB_FUNC( QT_QWIDGET_NEXTINFOCUSCHAIN ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->nextInFocusChain( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->nextInFocusChain() ); } /* @@ -643,7 +724,15 @@ HB_FUNC( QT_QWIDGET_NEXTINFOCUSCHAIN ) */ HB_FUNC( QT_QWIDGET_NORMALGEOMETRY ) { - hbqt_ret_QRect( hbqt_par_QWidget( 1 )->normalGeometry( ) ); + hb_retptr( new QRect( hbqt_par_QWidget( 1 )->normalGeometry() ) ); +} + +/* + * void overrideWindowFlags ( Qt::WindowFlags flags ) + */ +HB_FUNC( QT_QWIDGET_OVERRIDEWINDOWFLAGS ) +{ + hbqt_par_QWidget( 1 )->overrideWindowFlags( ( Qt::WindowFlags ) hb_parni( 2 ) ); } /* @@ -651,7 +740,15 @@ HB_FUNC( QT_QWIDGET_NORMALGEOMETRY ) */ HB_FUNC( QT_QWIDGET_PAINTENGINE ) { - hb_retptr( ( QPaintEngine* ) hbqt_par_QWidget( 1 )->paintEngine( ) ); + hb_retptr( ( QPaintEngine* ) hbqt_par_QWidget( 1 )->paintEngine() ); +} + +/* + * const QPalette & palette () const + */ +HB_FUNC( QT_QWIDGET_PALETTE ) +{ + hb_retptr( new QPalette( hbqt_par_QWidget( 1 )->palette() ) ); } /* @@ -659,7 +756,7 @@ HB_FUNC( QT_QWIDGET_PAINTENGINE ) */ HB_FUNC( QT_QWIDGET_PARENTWIDGET ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->parentWidget( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->parentWidget() ); } /* @@ -667,7 +764,7 @@ HB_FUNC( QT_QWIDGET_PARENTWIDGET ) */ HB_FUNC( QT_QWIDGET_POS ) { - hbqt_ret_QPoint( hbqt_par_QWidget( 1 )->pos( ) ); + hb_retptr( new QPoint( hbqt_par_QWidget( 1 )->pos() ) ); } /* @@ -675,7 +772,15 @@ HB_FUNC( QT_QWIDGET_POS ) */ HB_FUNC( QT_QWIDGET_RECT ) { - hbqt_ret_QRect( hbqt_par_QWidget( 1 )->rect( ) ); + hb_retptr( new QRect( hbqt_par_QWidget( 1 )->rect() ) ); +} + +/* + * virtual void releaseDC ( HDC hdc ) const + */ +HB_FUNC( QT_QWIDGET_RELEASEDC ) +{ + hbqt_par_QWidget( 1 )->releaseDC( *hbqt_par_HDC( 2 ) ); } /* @@ -683,7 +788,7 @@ HB_FUNC( QT_QWIDGET_RECT ) */ HB_FUNC( QT_QWIDGET_RELEASEKEYBOARD ) { - hbqt_par_QWidget( 1 )->releaseKeyboard( ); + hbqt_par_QWidget( 1 )->releaseKeyboard(); } /* @@ -691,7 +796,7 @@ HB_FUNC( QT_QWIDGET_RELEASEKEYBOARD ) */ HB_FUNC( QT_QWIDGET_RELEASEMOUSE ) { - hbqt_par_QWidget( 1 )->releaseMouse( ); + hbqt_par_QWidget( 1 )->releaseMouse(); } /* @@ -710,6 +815,22 @@ HB_FUNC( QT_QWIDGET_REMOVEACTION ) hbqt_par_QWidget( 1 )->removeAction( hbqt_par_QAction( 2 ) ); } +/* + * void render ( QPaintDevice * target, const QPoint & targetOffset = QPoint(), const QRegion & sourceRegion = QRegion(), RenderFlags renderFlags = RenderFlags( DrawWindowBackground | DrawChildren ) ) + */ +HB_FUNC( QT_QWIDGET_RENDER ) +{ + hbqt_par_QWidget( 1 )->render( hbqt_par_QPaintDevice( 2 ), *hbqt_par_QPoint( 3 ) ); +} + +/* + * void render ( QPainter * painter, const QPoint & targetOffset = QPoint(), const QRegion & sourceRegion = QRegion(), RenderFlags renderFlags = RenderFlags( DrawWindowBackground | DrawChildren ) ) + */ +HB_FUNC( QT_QWIDGET_RENDER_1 ) +{ + hbqt_par_QWidget( 1 )->render( hbqt_par_QPainter( 2 ), *hbqt_par_QPoint( 3 ) ); +} + /* * void repaint ( int x, int y, int w, int h ) */ @@ -723,25 +844,49 @@ HB_FUNC( QT_QWIDGET_REPAINT ) */ HB_FUNC( QT_QWIDGET_REPAINT_1 ) { - hbqt_par_QWidget( 1 )->repaint( hbqt_const_QRect( 2 ) ); + hbqt_par_QWidget( 1 )->repaint( *hbqt_par_QRect( 2 ) ); } /* - * void resize ( const QSize & ) + * void repaint ( const QRegion & rgn ) */ -HB_FUNC( QT_QWIDGET_RESIZE ) +HB_FUNC( QT_QWIDGET_REPAINT_2 ) { - hbqt_par_QWidget( 1 )->resize( hbqt_const_QSize( 2 ) ); + hbqt_par_QWidget( 1 )->repaint( *hbqt_par_QRegion( 2 ) ); } /* * void resize ( int w, int h ) */ -HB_FUNC( QT_QWIDGET_RESIZE_1 ) +HB_FUNC( QT_QWIDGET_RESIZE ) { hbqt_par_QWidget( 1 )->resize( hb_parni( 2 ), hb_parni( 3 ) ); } +/* + * void resize ( const QSize & ) + */ +HB_FUNC( QT_QWIDGET_RESIZE_1 ) +{ + hbqt_par_QWidget( 1 )->resize( *hbqt_par_QSize( 2 ) ); +} + +/* + * bool restoreGeometry ( const QByteArray & geometry ) + */ +HB_FUNC( QT_QWIDGET_RESTOREGEOMETRY ) +{ + hb_retl( hbqt_par_QWidget( 1 )->restoreGeometry( *hbqt_par_QByteArray( 2 ) ) ); +} + +/* + * QByteArray saveGeometry () const + */ +HB_FUNC( QT_QWIDGET_SAVEGEOMETRY ) +{ + hb_retptr( new QByteArray( hbqt_par_QWidget( 1 )->saveGeometry() ) ); +} + /* * void scroll ( int dx, int dy ) */ @@ -755,7 +900,7 @@ HB_FUNC( QT_QWIDGET_SCROLL ) */ HB_FUNC( QT_QWIDGET_SCROLL_1 ) { - hbqt_par_QWidget( 1 )->scroll( hb_parni( 2 ), hb_parni( 3 ), hbqt_const_QRect( 4 ) ); + hbqt_par_QWidget( 1 )->scroll( hb_parni( 2 ), hb_parni( 3 ), *hbqt_par_QRect( 4 ) ); } /* @@ -811,7 +956,7 @@ HB_FUNC( QT_QWIDGET_SETBACKGROUNDROLE ) */ HB_FUNC( QT_QWIDGET_SETBASESIZE ) { - hbqt_par_QWidget( 1 )->setBaseSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QWidget( 1 )->setBaseSize( *hbqt_par_QSize( 2 ) ); } /* @@ -838,6 +983,14 @@ HB_FUNC( QT_QWIDGET_SETCONTEXTMENUPOLICY ) hbqt_par_QWidget( 1 )->setContextMenuPolicy( ( Qt::ContextMenuPolicy ) hb_parni( 2 ) ); } +/* + * void setCursor ( const QCursor & ) + */ +HB_FUNC( QT_QWIDGET_SETCURSOR ) +{ + hbqt_par_QWidget( 1 )->setCursor( *hbqt_par_QCursor( 2 ) ); +} + /* * void setFixedHeight ( int h ) */ @@ -851,7 +1004,7 @@ HB_FUNC( QT_QWIDGET_SETFIXEDHEIGHT ) */ HB_FUNC( QT_QWIDGET_SETFIXEDSIZE ) { - hbqt_par_QWidget( 1 )->setFixedSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QWidget( 1 )->setFixedSize( *hbqt_par_QSize( 2 ) ); } /* @@ -894,6 +1047,14 @@ HB_FUNC( QT_QWIDGET_SETFOCUSPROXY ) hbqt_par_QWidget( 1 )->setFocusProxy( hbqt_par_QWidget( 2 ) ); } +/* + * void setFont ( const QFont & ) + */ +HB_FUNC( QT_QWIDGET_SETFONT ) +{ + hbqt_par_QWidget( 1 )->setFont( *hbqt_par_QFont( 2 ) ); +} + /* * void setForegroundRole ( QPalette::ColorRole role ) */ @@ -907,7 +1068,7 @@ HB_FUNC( QT_QWIDGET_SETFOREGROUNDROLE ) */ HB_FUNC( QT_QWIDGET_SETGEOMETRY ) { - hbqt_par_QWidget( 1 )->setGeometry( hbqt_const_QRect( 2 ) ); + hbqt_par_QWidget( 1 )->setGeometry( *hbqt_par_QRect( 2 ) ); } /* @@ -942,6 +1103,30 @@ HB_FUNC( QT_QWIDGET_SETLAYOUTDIRECTION ) hbqt_par_QWidget( 1 )->setLayoutDirection( ( Qt::LayoutDirection ) hb_parni( 2 ) ); } +/* + * void setLocale ( const QLocale & locale ) + */ +HB_FUNC( QT_QWIDGET_SETLOCALE ) +{ + hbqt_par_QWidget( 1 )->setLocale( *hbqt_par_QLocale( 2 ) ); +} + +/* + * void setMask ( const QBitmap & bitmap ) + */ +HB_FUNC( QT_QWIDGET_SETMASK ) +{ + hbqt_par_QWidget( 1 )->setMask( *hbqt_par_QBitmap( 2 ) ); +} + +/* + * void setMask ( const QRegion & region ) + */ +HB_FUNC( QT_QWIDGET_SETMASK_1 ) +{ + hbqt_par_QWidget( 1 )->setMask( *hbqt_par_QRegion( 2 ) ); +} + /* * void setMaximumHeight ( int maxh ) */ @@ -955,7 +1140,7 @@ HB_FUNC( QT_QWIDGET_SETMAXIMUMHEIGHT ) */ HB_FUNC( QT_QWIDGET_SETMAXIMUMSIZE ) { - hbqt_par_QWidget( 1 )->setMaximumSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QWidget( 1 )->setMaximumSize( *hbqt_par_QSize( 2 ) ); } /* @@ -987,7 +1172,7 @@ HB_FUNC( QT_QWIDGET_SETMINIMUMHEIGHT ) */ HB_FUNC( QT_QWIDGET_SETMINIMUMSIZE ) { - hbqt_par_QWidget( 1 )->setMinimumSize( hbqt_const_QSize( 2 ) ); + hbqt_par_QWidget( 1 )->setMinimumSize( *hbqt_par_QSize( 2 ) ); } /* @@ -1014,6 +1199,14 @@ HB_FUNC( QT_QWIDGET_SETMOUSETRACKING ) hbqt_par_QWidget( 1 )->setMouseTracking( hb_parl( 2 ) ); } +/* + * void setPalette ( const QPalette & ) + */ +HB_FUNC( QT_QWIDGET_SETPALETTE ) +{ + hbqt_par_QWidget( 1 )->setPalette( *hbqt_par_QPalette( 2 ) ); +} + /* * void setParent ( QWidget * parent ) */ @@ -1051,7 +1244,7 @@ HB_FUNC( QT_QWIDGET_SETSHORTCUTENABLED ) */ HB_FUNC( QT_QWIDGET_SETSIZEINCREMENT ) { - hbqt_par_QWidget( 1 )->setSizeIncrement( hbqt_const_QSize( 2 ) ); + hbqt_par_QWidget( 1 )->setSizeIncrement( *hbqt_par_QSize( 2 ) ); } /* @@ -1187,7 +1380,7 @@ HB_FUNC( QT_QWIDGET_SETWINDOWSURFACE ) */ HB_FUNC( QT_QWIDGET_SIZE ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->size( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->size() ) ); } /* @@ -1195,7 +1388,7 @@ HB_FUNC( QT_QWIDGET_SIZE ) */ HB_FUNC( QT_QWIDGET_SIZEHINT ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->sizeHint( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->sizeHint() ) ); } /* @@ -1203,7 +1396,15 @@ HB_FUNC( QT_QWIDGET_SIZEHINT ) */ HB_FUNC( QT_QWIDGET_SIZEINCREMENT ) { - hbqt_ret_QSize( hbqt_par_QWidget( 1 )->sizeIncrement( ) ); + hb_retptr( new QSize( hbqt_par_QWidget( 1 )->sizeIncrement() ) ); +} + +/* + * QSizePolicy sizePolicy () const + */ +HB_FUNC( QT_QWIDGET_SIZEPOLICY ) +{ + hb_retptr( new QSizePolicy( hbqt_par_QWidget( 1 )->sizePolicy() ) ); } /* @@ -1219,7 +1420,7 @@ HB_FUNC( QT_QWIDGET_STACKUNDER ) */ HB_FUNC( QT_QWIDGET_STATUSTIP ) { - hb_retc( hbqt_par_QWidget( 1 )->statusTip( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->statusTip().toLatin1().data() ); } /* @@ -1227,7 +1428,7 @@ HB_FUNC( QT_QWIDGET_STATUSTIP ) */ HB_FUNC( QT_QWIDGET_STYLE ) { - hb_retptr( ( QStyle* ) hbqt_par_QWidget( 1 )->style( ) ); + hb_retptr( ( QStyle* ) hbqt_par_QWidget( 1 )->style() ); } /* @@ -1235,7 +1436,7 @@ HB_FUNC( QT_QWIDGET_STYLE ) */ HB_FUNC( QT_QWIDGET_STYLESHEET ) { - hb_retc( hbqt_par_QWidget( 1 )->styleSheet( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->styleSheet().toLatin1().data() ); } /* @@ -1251,7 +1452,7 @@ HB_FUNC( QT_QWIDGET_TESTATTRIBUTE ) */ HB_FUNC( QT_QWIDGET_TOOLTIP ) { - hb_retc( hbqt_par_QWidget( 1 )->toolTip( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->toolTip().toLatin1().data() ); } /* @@ -1259,7 +1460,7 @@ HB_FUNC( QT_QWIDGET_TOOLTIP ) */ HB_FUNC( QT_QWIDGET_UNDERMOUSE ) { - hb_retl( hbqt_par_QWidget( 1 )->underMouse( ) ); + hb_retl( hbqt_par_QWidget( 1 )->underMouse() ); } /* @@ -1267,7 +1468,7 @@ HB_FUNC( QT_QWIDGET_UNDERMOUSE ) */ HB_FUNC( QT_QWIDGET_UNSETCURSOR ) { - hbqt_par_QWidget( 1 )->unsetCursor( ); + hbqt_par_QWidget( 1 )->unsetCursor(); } /* @@ -1275,7 +1476,7 @@ HB_FUNC( QT_QWIDGET_UNSETCURSOR ) */ HB_FUNC( QT_QWIDGET_UNSETLAYOUTDIRECTION ) { - hbqt_par_QWidget( 1 )->unsetLayoutDirection( ); + hbqt_par_QWidget( 1 )->unsetLayoutDirection(); } /* @@ -1283,7 +1484,7 @@ HB_FUNC( QT_QWIDGET_UNSETLAYOUTDIRECTION ) */ HB_FUNC( QT_QWIDGET_UNSETLOCALE ) { - hbqt_par_QWidget( 1 )->unsetLocale( ); + hbqt_par_QWidget( 1 )->unsetLocale(); } /* @@ -1299,7 +1500,15 @@ HB_FUNC( QT_QWIDGET_UPDATE ) */ HB_FUNC( QT_QWIDGET_UPDATE_1 ) { - hbqt_par_QWidget( 1 )->update( hbqt_const_QRect( 2 ) ); + hbqt_par_QWidget( 1 )->update( *hbqt_par_QRect( 2 ) ); +} + +/* + * void update ( const QRegion & rgn ) + */ +HB_FUNC( QT_QWIDGET_UPDATE_2 ) +{ + hbqt_par_QWidget( 1 )->update( *hbqt_par_QRegion( 2 ) ); } /* @@ -1307,7 +1516,7 @@ HB_FUNC( QT_QWIDGET_UPDATE_1 ) */ HB_FUNC( QT_QWIDGET_UPDATEGEOMETRY ) { - hbqt_par_QWidget( 1 )->updateGeometry( ); + hbqt_par_QWidget( 1 )->updateGeometry(); } /* @@ -1315,7 +1524,15 @@ HB_FUNC( QT_QWIDGET_UPDATEGEOMETRY ) */ HB_FUNC( QT_QWIDGET_UPDATESENABLED ) { - hb_retl( hbqt_par_QWidget( 1 )->updatesEnabled( ) ); + hb_retl( hbqt_par_QWidget( 1 )->updatesEnabled() ); +} + +/* + * QRegion visibleRegion () const + */ +HB_FUNC( QT_QWIDGET_VISIBLEREGION ) +{ + hb_retptr( new QRegion( hbqt_par_QWidget( 1 )->visibleRegion() ) ); } /* @@ -1323,7 +1540,7 @@ HB_FUNC( QT_QWIDGET_UPDATESENABLED ) */ HB_FUNC( QT_QWIDGET_WHATSTHIS ) { - hb_retc( hbqt_par_QWidget( 1 )->whatsThis( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->whatsThis().toLatin1().data() ); } /* @@ -1331,7 +1548,15 @@ HB_FUNC( QT_QWIDGET_WHATSTHIS ) */ HB_FUNC( QT_QWIDGET_WIDTH ) { - hb_retni( hbqt_par_QWidget( 1 )->width( ) ); + hb_retni( hbqt_par_QWidget( 1 )->width() ); +} + +/* + * WId winId () const + */ +HB_FUNC( QT_QWIDGET_WINID ) +{ + hb_retptr( ( HWND ) hbqt_par_QWidget( 1 )->winId() ); } /* @@ -1339,7 +1564,7 @@ HB_FUNC( QT_QWIDGET_WIDTH ) */ HB_FUNC( QT_QWIDGET_WINDOW ) { - hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->window( ) ); + hb_retptr( ( QWidget* ) hbqt_par_QWidget( 1 )->window() ); } /* @@ -1347,7 +1572,7 @@ HB_FUNC( QT_QWIDGET_WINDOW ) */ HB_FUNC( QT_QWIDGET_WINDOWFILEPATH ) { - hb_retc( hbqt_par_QWidget( 1 )->windowFilePath( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->windowFilePath().toLatin1().data() ); } /* @@ -1355,7 +1580,15 @@ HB_FUNC( QT_QWIDGET_WINDOWFILEPATH ) */ HB_FUNC( QT_QWIDGET_WINDOWFLAGS ) { - hb_retni( hbqt_par_QWidget( 1 )->windowFlags( ) ); + hb_retni( ( Qt::WindowFlags ) hbqt_par_QWidget( 1 )->windowFlags() ); +} + +/* + * QIcon windowIcon () const + */ +HB_FUNC( QT_QWIDGET_WINDOWICON ) +{ + hb_retptr( new QIcon( hbqt_par_QWidget( 1 )->windowIcon() ) ); } /* @@ -1363,7 +1596,7 @@ HB_FUNC( QT_QWIDGET_WINDOWFLAGS ) */ HB_FUNC( QT_QWIDGET_WINDOWICONTEXT ) { - hb_retc( hbqt_par_QWidget( 1 )->windowIconText( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->windowIconText().toLatin1().data() ); } /* @@ -1371,7 +1604,7 @@ HB_FUNC( QT_QWIDGET_WINDOWICONTEXT ) */ HB_FUNC( QT_QWIDGET_WINDOWMODALITY ) { - hb_retni( hbqt_par_QWidget( 1 )->windowModality( ) ); + hb_retni( ( Qt::WindowModality ) hbqt_par_QWidget( 1 )->windowModality() ); } /* @@ -1379,7 +1612,7 @@ HB_FUNC( QT_QWIDGET_WINDOWMODALITY ) */ HB_FUNC( QT_QWIDGET_WINDOWOPACITY ) { - hb_retnd( hbqt_par_QWidget( 1 )->windowOpacity( ) ); + hb_retnd( hbqt_par_QWidget( 1 )->windowOpacity() ); } /* @@ -1387,7 +1620,7 @@ HB_FUNC( QT_QWIDGET_WINDOWOPACITY ) */ HB_FUNC( QT_QWIDGET_WINDOWROLE ) { - hb_retc( hbqt_par_QWidget( 1 )->windowRole( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->windowRole().toLatin1().data() ); } /* @@ -1395,7 +1628,15 @@ HB_FUNC( QT_QWIDGET_WINDOWROLE ) */ HB_FUNC( QT_QWIDGET_WINDOWSTATE ) { - hb_retni( hbqt_par_QWidget( 1 )->windowState( ) ); + hb_retni( ( Qt::WindowStates ) hbqt_par_QWidget( 1 )->windowState() ); +} + +/* + * QWindowSurface * windowSurface () const (preliminary) + */ +HB_FUNC( QT_QWIDGET_WINDOWSURFACE ) +{ + hb_retptr( ( QWindowSurface* ) hbqt_par_QWidget( 1 )->windowSurface() ); } /* @@ -1403,7 +1644,7 @@ HB_FUNC( QT_QWIDGET_WINDOWSTATE ) */ HB_FUNC( QT_QWIDGET_WINDOWTITLE ) { - hb_retc( hbqt_par_QWidget( 1 )->windowTitle( ).toLatin1().data() ); + hb_retc( hbqt_par_QWidget( 1 )->windowTitle().toLatin1().data() ); } /* @@ -1411,7 +1652,7 @@ HB_FUNC( QT_QWIDGET_WINDOWTITLE ) */ HB_FUNC( QT_QWIDGET_WINDOWTYPE ) { - hb_retni( hbqt_par_QWidget( 1 )->windowType( ) ); + hb_retni( ( Qt::WindowType ) hbqt_par_QWidget( 1 )->windowType() ); } /* @@ -1419,7 +1660,7 @@ HB_FUNC( QT_QWIDGET_WINDOWTYPE ) */ HB_FUNC( QT_QWIDGET_X ) { - hb_retni( hbqt_par_QWidget( 1 )->x( ) ); + hb_retni( hbqt_par_QWidget( 1 )->x() ); } /* @@ -1427,7 +1668,7 @@ HB_FUNC( QT_QWIDGET_X ) */ HB_FUNC( QT_QWIDGET_Y ) { - hb_retni( hbqt_par_QWidget( 1 )->y( ) ); + hb_retni( hbqt_par_QWidget( 1 )->y() ); } /* @@ -1435,7 +1676,7 @@ HB_FUNC( QT_QWIDGET_Y ) */ HB_FUNC( QT_QWIDGET_CLOSE ) { - hb_retl( hbqt_par_QWidget( 1 )->close( ) ); + hb_retl( hbqt_par_QWidget( 1 )->close() ); } /* @@ -1443,7 +1684,7 @@ HB_FUNC( QT_QWIDGET_CLOSE ) */ HB_FUNC( QT_QWIDGET_HIDE ) { - hbqt_par_QWidget( 1 )->hide( ); + hbqt_par_QWidget( 1 )->hide(); } /* @@ -1451,7 +1692,7 @@ HB_FUNC( QT_QWIDGET_HIDE ) */ HB_FUNC( QT_QWIDGET_LOWER ) { - hbqt_par_QWidget( 1 )->lower( ); + hbqt_par_QWidget( 1 )->lower(); } /* @@ -1459,15 +1700,15 @@ HB_FUNC( QT_QWIDGET_LOWER ) */ HB_FUNC( QT_QWIDGET_RAISE ) { - hbqt_par_QWidget( 1 )->raise( ); + hbqt_par_QWidget( 1 )->raise(); } /* * void repaint () */ -HB_FUNC( QT_QWIDGET_REPAINT_2 ) +HB_FUNC( QT_QWIDGET_REPAINT_3 ) { - hbqt_par_QWidget( 1 )->repaint( ); + hbqt_par_QWidget( 1 )->repaint(); } /* @@ -1491,7 +1732,7 @@ HB_FUNC( QT_QWIDGET_SETENABLED ) */ HB_FUNC( QT_QWIDGET_SETFOCUS_1 ) { - hbqt_par_QWidget( 1 )->setFocus( ); + hbqt_par_QWidget( 1 )->setFocus(); } /* @@ -1539,7 +1780,7 @@ HB_FUNC( QT_QWIDGET_SETWINDOWTITLE ) */ HB_FUNC( QT_QWIDGET_SHOW ) { - hbqt_par_QWidget( 1 )->show( ); + hbqt_par_QWidget( 1 )->show(); } /* @@ -1547,7 +1788,7 @@ HB_FUNC( QT_QWIDGET_SHOW ) */ HB_FUNC( QT_QWIDGET_SHOWFULLSCREEN ) { - hbqt_par_QWidget( 1 )->showFullScreen( ); + hbqt_par_QWidget( 1 )->showFullScreen(); } /* @@ -1555,7 +1796,7 @@ HB_FUNC( QT_QWIDGET_SHOWFULLSCREEN ) */ HB_FUNC( QT_QWIDGET_SHOWMAXIMIZED ) { - hbqt_par_QWidget( 1 )->showMaximized( ); + hbqt_par_QWidget( 1 )->showMaximized(); } /* @@ -1563,7 +1804,7 @@ HB_FUNC( QT_QWIDGET_SHOWMAXIMIZED ) */ HB_FUNC( QT_QWIDGET_SHOWMINIMIZED ) { - hbqt_par_QWidget( 1 )->showMinimized( ); + hbqt_par_QWidget( 1 )->showMinimized(); } /* @@ -1571,15 +1812,15 @@ HB_FUNC( QT_QWIDGET_SHOWMINIMIZED ) */ HB_FUNC( QT_QWIDGET_SHOWNORMAL ) { - hbqt_par_QWidget( 1 )->showNormal( ); + hbqt_par_QWidget( 1 )->showNormal(); } /* * void update () */ -HB_FUNC( QT_QWIDGET_UPDATE_2 ) +HB_FUNC( QT_QWIDGET_UPDATE_3 ) { - hbqt_par_QWidget( 1 )->update( ); + hbqt_par_QWidget( 1 )->update(); } diff --git a/harbour/contrib/hbqt/hbqt_qwindowsstyle.cpp b/harbour/contrib/hbqt/hbqt_qwindowsstyle.cpp new file mode 100644 index 0000000000..1f469c1d26 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qwindowsstyle.cpp @@ -0,0 +1,80 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QWindowsStyle () + * ~QWindowsStyle () + * + */ +HB_FUNC( QT_QWINDOWSSTYLE ) +{ + hb_retptr( ( QWindowsStyle* ) new QWindowsStyle() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qwindowsxpstyle.cpp b/harbour/contrib/hbqt/hbqt_qwindowsxpstyle.cpp new file mode 100644 index 0000000000..2473d61c72 --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_qwindowsxpstyle.cpp @@ -0,0 +1,80 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2009 Marcos Antonio Gambeta + * Copyright 2009 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. + * + */ +/*----------------------------------------------------------------------*/ + +#include "hbapi.h" +#include "hbqt.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + + +#include + + +/* + * QWindowsXPStyle () + * ~QWindowsXPStyle () + * + */ +HB_FUNC( QT_QWINDOWSXPSTYLE ) +{ + hb_retptr( ( QWindowsXPStyle* ) new QWindowsXPStyle() ); +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/hbqt_qwizard.cpp b/harbour/contrib/hbqt/hbqt_qwizard.cpp index db2246c9d0..d1033c9a96 100644 --- a/harbour/contrib/hbqt/hbqt_qwizard.cpp +++ b/harbour/contrib/hbqt/hbqt_qwizard.cpp @@ -1,42 +1,42 @@ /* * $Id$ */ - -/* + +/* * Harbour Project source code: * QT wrapper main header - * + * * Copyright 2009 Marcos Antonio Gambeta * Copyright 2009 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 @@ -44,7 +44,7 @@ * 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. @@ -59,25 +59,20 @@ #if QT_VERSION >= 0x040500 /*----------------------------------------------------------------------*/ - /* - * Constructed[ 29/36 [ 80.56% ] ] - * + * Constructed[ 33/36 [ 91.67% ] ] + * * *** Unconvered Prototypes *** * ----------------------------- - * - * QVariant field ( const QString & name ) const + * * QList pageIds () const - * QPixmap pixmap ( WizardPixmap which ) const * void setButtonLayout ( const QList & layout ) - * void setField ( const QString & name, const QVariant & value ) - * void setPixmap ( WizardPixmap which, const QPixmap & pixmap ) * QList visitedPages () const - */ + */ #include - +#include /* @@ -110,7 +105,7 @@ HB_FUNC( QT_QWIZARD_BUTTON ) */ HB_FUNC( QT_QWIZARD_BUTTONTEXT ) { - hb_retc( hbqt_par_QWizard( 1 )->buttonText( ( QWizard::WizardButton ) hb_parni( 2 )).toLatin1().data() ); + hb_retc( hbqt_par_QWizard( 1 )->buttonText( ( QWizard::WizardButton ) hb_parni( 2 ) ).toLatin1().data() ); } /* @@ -118,7 +113,7 @@ HB_FUNC( QT_QWIZARD_BUTTONTEXT ) */ HB_FUNC( QT_QWIZARD_CURRENTID ) { - hb_retni( hbqt_par_QWizard( 1 )->currentId( ) ); + hb_retni( hbqt_par_QWizard( 1 )->currentId() ); } /* @@ -126,7 +121,15 @@ HB_FUNC( QT_QWIZARD_CURRENTID ) */ HB_FUNC( QT_QWIZARD_CURRENTPAGE ) { - hb_retptr( ( QWizardPage* ) hbqt_par_QWizard( 1 )->currentPage( ) ); + hb_retptr( ( QWizardPage* ) hbqt_par_QWizard( 1 )->currentPage() ); +} + +/* + * QVariant field ( const QString & name ) const + */ +HB_FUNC( QT_QWIZARD_FIELD ) +{ + hb_retptr( new QVariant( hbqt_par_QWizard( 1 )->field( hbqt_par_QString( 2 ) ) ) ); } /* @@ -142,7 +145,7 @@ HB_FUNC( QT_QWIZARD_HASVISITEDPAGE ) */ HB_FUNC( QT_QWIZARD_NEXTID ) { - hb_retni( hbqt_par_QWizard( 1 )->nextId( ) ); + hb_retni( hbqt_par_QWizard( 1 )->nextId() ); } /* @@ -150,7 +153,7 @@ HB_FUNC( QT_QWIZARD_NEXTID ) */ HB_FUNC( QT_QWIZARD_OPTIONS ) { - hb_retni( hbqt_par_QWizard( 1 )->options( ) ); + hb_retni( ( QWizard::WizardOptions ) hbqt_par_QWizard( 1 )->options() ); } /* @@ -161,6 +164,14 @@ HB_FUNC( QT_QWIZARD_PAGE ) hb_retptr( ( QWizardPage* ) hbqt_par_QWizard( 1 )->page( hb_parni( 2 ) ) ); } +/* + * QPixmap pixmap ( WizardPixmap which ) const + */ +HB_FUNC( QT_QWIZARD_PIXMAP ) +{ + hb_retptr( new QPixmap( hbqt_par_QWizard( 1 )->pixmap( ( QWizard::WizardPixmap ) hb_parni( 2 ) ) ) ); +} + /* * void removePage ( int id ) */ @@ -193,6 +204,14 @@ HB_FUNC( QT_QWIZARD_SETDEFAULTPROPERTY ) hbqt_par_QWizard( 1 )->setDefaultProperty( hbqt_par_char( 2 ), hbqt_par_char( 3 ), hbqt_par_char( 4 ) ); } +/* + * void setField ( const QString & name, const QVariant & value ) + */ +HB_FUNC( QT_QWIZARD_SETFIELD ) +{ + hbqt_par_QWizard( 1 )->setField( hbqt_par_QString( 2 ), *hbqt_par_QVariant( 3 ) ); +} + /* * void setOption ( WizardOption option, bool on = true ) */ @@ -217,6 +236,14 @@ HB_FUNC( QT_QWIZARD_SETPAGE ) hbqt_par_QWizard( 1 )->setPage( hb_parni( 2 ), hbqt_par_QWizardPage( 3 ) ); } +/* + * void setPixmap ( WizardPixmap which, const QPixmap & pixmap ) + */ +HB_FUNC( QT_QWIZARD_SETPIXMAP ) +{ + hbqt_par_QWizard( 1 )->setPixmap( ( QWizard::WizardPixmap ) hb_parni( 2 ), *hbqt_par_QPixmap( 3 ) ); +} + /* * void setStartId ( int id ) */ @@ -254,7 +281,7 @@ HB_FUNC( QT_QWIZARD_SETWIZARDSTYLE ) */ HB_FUNC( QT_QWIZARD_STARTID ) { - hb_retni( hbqt_par_QWizard( 1 )->startId( ) ); + hb_retni( hbqt_par_QWizard( 1 )->startId() ); } /* @@ -262,7 +289,7 @@ HB_FUNC( QT_QWIZARD_STARTID ) */ HB_FUNC( QT_QWIZARD_SUBTITLEFORMAT ) { - hb_retni( hbqt_par_QWizard( 1 )->subTitleFormat( ) ); + hb_retni( ( Qt::TextFormat ) hbqt_par_QWizard( 1 )->subTitleFormat() ); } /* @@ -278,7 +305,7 @@ HB_FUNC( QT_QWIZARD_TESTOPTION ) */ HB_FUNC( QT_QWIZARD_TITLEFORMAT ) { - hb_retni( hbqt_par_QWizard( 1 )->titleFormat( ) ); + hb_retni( ( Qt::TextFormat ) hbqt_par_QWizard( 1 )->titleFormat() ); } /* @@ -286,7 +313,7 @@ HB_FUNC( QT_QWIZARD_TITLEFORMAT ) */ HB_FUNC( QT_QWIZARD_VALIDATECURRENTPAGE ) { - hb_retl( hbqt_par_QWizard( 1 )->validateCurrentPage( ) ); + hb_retl( hbqt_par_QWizard( 1 )->validateCurrentPage() ); } /* @@ -294,7 +321,7 @@ HB_FUNC( QT_QWIZARD_VALIDATECURRENTPAGE ) */ HB_FUNC( QT_QWIZARD_WIZARDSTYLE ) { - hb_retni( hbqt_par_QWizard( 1 )->wizardStyle( ) ); + hb_retni( ( QWizard::WizardStyle ) hbqt_par_QWizard( 1 )->wizardStyle() ); } /* @@ -302,7 +329,7 @@ HB_FUNC( QT_QWIZARD_WIZARDSTYLE ) */ HB_FUNC( QT_QWIZARD_BACK ) { - hbqt_par_QWizard( 1 )->back( ); + hbqt_par_QWizard( 1 )->back(); } /* @@ -310,7 +337,7 @@ HB_FUNC( QT_QWIZARD_BACK ) */ HB_FUNC( QT_QWIZARD_NEXT ) { - hbqt_par_QWizard( 1 )->next( ); + hbqt_par_QWizard( 1 )->next(); } /* @@ -318,7 +345,7 @@ HB_FUNC( QT_QWIZARD_NEXT ) */ HB_FUNC( QT_QWIZARD_RESTART ) { - hbqt_par_QWizard( 1 )->restart( ); + hbqt_par_QWizard( 1 )->restart(); }