diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3231f0861e..e578b1ccad 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,283 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-17 02:06 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/filelist.mk + + contrib/hbqt/hbqt_misc.prg + + * contrib/hbqt/generator/hbqtgen.prg + + * contrib/hbqt/qtcore/TQAbstractItemModel.prg + * contrib/hbqt/qtcore/TQAbstractListModel.prg + * contrib/hbqt/qtcore/TQAbstractTableModel.prg + * contrib/hbqt/qtcore/TQBitArray.prg + * contrib/hbqt/qtcore/TQByteArray.prg + * contrib/hbqt/qtcore/TQCoreApplication.prg + * contrib/hbqt/qtcore/TQDataStream.prg + * contrib/hbqt/qtcore/TQDate.prg + * contrib/hbqt/qtcore/TQDateTime.prg + * contrib/hbqt/qtcore/TQDir.prg + * contrib/hbqt/qtcore/TQEvent.prg + * contrib/hbqt/qtcore/TQEventLoop.prg + * contrib/hbqt/qtcore/TQFile.prg + * contrib/hbqt/qtcore/TQFileInfo.prg + * contrib/hbqt/qtcore/TQIODevice.prg + * contrib/hbqt/qtcore/TQLatin1Char.prg + * contrib/hbqt/qtcore/TQLatin1String.prg + * contrib/hbqt/qtcore/TQLine.prg + * contrib/hbqt/qtcore/TQLineF.prg + * contrib/hbqt/qtcore/TQList.prg + * contrib/hbqt/qtcore/TQLocale.prg + * contrib/hbqt/qtcore/TQMimeData.prg + * contrib/hbqt/qtcore/TQModelIndex.prg + * contrib/hbqt/qtcore/TQObject.prg + * contrib/hbqt/qtcore/TQPoint.prg + * contrib/hbqt/qtcore/TQPointF.prg + * contrib/hbqt/qtcore/TQProcess.prg + * contrib/hbqt/qtcore/TQRect.prg + * contrib/hbqt/qtcore/TQRectF.prg + * contrib/hbqt/qtcore/TQRegExp.prg + * contrib/hbqt/qtcore/TQResource.prg + * contrib/hbqt/qtcore/TQSignalMapper.prg + * contrib/hbqt/qtcore/TQSize.prg + * contrib/hbqt/qtcore/TQSizeF.prg + * contrib/hbqt/qtcore/TQStringList.prg + * contrib/hbqt/qtcore/TQTextBoundaryFinder.prg + * contrib/hbqt/qtcore/TQTextCodec.prg + * contrib/hbqt/qtcore/TQTextDecoder.prg + * contrib/hbqt/qtcore/TQTextEncoder.prg + * contrib/hbqt/qtcore/TQTextStream.prg + * contrib/hbqt/qtcore/TQThread.prg + * contrib/hbqt/qtcore/TQTime.prg + * contrib/hbqt/qtcore/TQTimer.prg + * contrib/hbqt/qtcore/TQTranslator.prg + * contrib/hbqt/qtcore/TQUiLoader.prg + * contrib/hbqt/qtcore/TQUrl.prg + * contrib/hbqt/qtcore/TQVariant.prg + * contrib/hbqt/qtgui/TQAbstractButton.prg + * contrib/hbqt/qtgui/TQAbstractItemDelegate.prg + * contrib/hbqt/qtgui/TQAbstractItemView.prg + * contrib/hbqt/qtgui/TQAbstractPrintDialog.prg + * contrib/hbqt/qtgui/TQAbstractProxyModel.prg + * contrib/hbqt/qtgui/TQAbstractScrollArea.prg + * contrib/hbqt/qtgui/TQAbstractSlider.prg + * contrib/hbqt/qtgui/TQAbstractSpinBox.prg + * contrib/hbqt/qtgui/TQAbstractTextDocumentLayout.prg + * contrib/hbqt/qtgui/TQAction.prg + * contrib/hbqt/qtgui/TQActionGroup.prg + * contrib/hbqt/qtgui/TQApplication.prg + * contrib/hbqt/qtgui/TQBitmap.prg + * contrib/hbqt/qtgui/TQBoxLayout.prg + * contrib/hbqt/qtgui/TQBrush.prg + * contrib/hbqt/qtgui/TQButtonGroup.prg + * contrib/hbqt/qtgui/TQCalendarWidget.prg + * contrib/hbqt/qtgui/TQCheckBox.prg + * contrib/hbqt/qtgui/TQClipboard.prg + * contrib/hbqt/qtgui/TQColor.prg + * contrib/hbqt/qtgui/TQColorDialog.prg + * contrib/hbqt/qtgui/TQComboBox.prg + * contrib/hbqt/qtgui/TQCommandLinkButton.prg + * contrib/hbqt/qtgui/TQCommonStyle.prg + * contrib/hbqt/qtgui/TQCompleter.prg + * contrib/hbqt/qtgui/TQConicalGradient.prg + * contrib/hbqt/qtgui/TQContextMenuEvent.prg + * contrib/hbqt/qtgui/TQCursor.prg + * contrib/hbqt/qtgui/TQDateEdit.prg + * contrib/hbqt/qtgui/TQDateTimeEdit.prg + * contrib/hbqt/qtgui/TQDesktopWidget.prg + * contrib/hbqt/qtgui/TQDial.prg + * contrib/hbqt/qtgui/TQDialog.prg + * contrib/hbqt/qtgui/TQDirModel.prg + * contrib/hbqt/qtgui/TQDockWidget.prg + * contrib/hbqt/qtgui/TQDoubleSpinBox.prg + * contrib/hbqt/qtgui/TQDragEnterEvent.prg + * contrib/hbqt/qtgui/TQDragLeaveEvent.prg + * contrib/hbqt/qtgui/TQDragMoveEvent.prg + * contrib/hbqt/qtgui/TQDropEvent.prg + * contrib/hbqt/qtgui/TQErrorMessage.prg + * contrib/hbqt/qtgui/TQFileDialog.prg + * contrib/hbqt/qtgui/TQFileIconProvider.prg + * contrib/hbqt/qtgui/TQFileSystemModel.prg + * contrib/hbqt/qtgui/TQFocusEvent.prg + * contrib/hbqt/qtgui/TQFocusFrame.prg + * contrib/hbqt/qtgui/TQFont.prg + * contrib/hbqt/qtgui/TQFontComboBox.prg + * contrib/hbqt/qtgui/TQFontDatabase.prg + * contrib/hbqt/qtgui/TQFontDialog.prg + * contrib/hbqt/qtgui/TQFontInfo.prg + * contrib/hbqt/qtgui/TQFontMetrics.prg + * contrib/hbqt/qtgui/TQFontMetricsF.prg + * contrib/hbqt/qtgui/TQFormLayout.prg + * contrib/hbqt/qtgui/TQFrame.prg + * contrib/hbqt/qtgui/TQGradient.prg + * contrib/hbqt/qtgui/TQGridLayout.prg + * contrib/hbqt/qtgui/TQGroupBox.prg + * contrib/hbqt/qtgui/TQHBoxLayout.prg + * contrib/hbqt/qtgui/TQHeaderView.prg + * contrib/hbqt/qtgui/TQHelpEvent.prg + * contrib/hbqt/qtgui/TQIcon.prg + * contrib/hbqt/qtgui/TQImage.prg + * contrib/hbqt/qtgui/TQImageReader.prg + * contrib/hbqt/qtgui/TQImageWriter.prg + * contrib/hbqt/qtgui/TQInputContext.prg + * contrib/hbqt/qtgui/TQInputDialog.prg + * contrib/hbqt/qtgui/TQInputEvent.prg + * contrib/hbqt/qtgui/TQInputMethodEvent.prg + * contrib/hbqt/qtgui/TQItemSelection.prg + * contrib/hbqt/qtgui/TQItemSelectionModel.prg + * contrib/hbqt/qtgui/TQKeyEvent.prg + * contrib/hbqt/qtgui/TQKeySequence.prg + * contrib/hbqt/qtgui/TQLabel.prg + * contrib/hbqt/qtgui/TQLayout.prg + * contrib/hbqt/qtgui/TQLayoutItem.prg + * contrib/hbqt/qtgui/TQLCDNumber.prg + * contrib/hbqt/qtgui/TQLinearGradient.prg + * contrib/hbqt/qtgui/TQLineEdit.prg + * contrib/hbqt/qtgui/TQListView.prg + * contrib/hbqt/qtgui/TQListWidget.prg + * contrib/hbqt/qtgui/TQListWidgetItem.prg + * contrib/hbqt/qtgui/TQMainWindow.prg + * contrib/hbqt/qtgui/TQMatrix.prg + * contrib/hbqt/qtgui/TQMenu.prg + * contrib/hbqt/qtgui/TQMenuBar.prg + * contrib/hbqt/qtgui/TQMessageBox.prg + * contrib/hbqt/qtgui/TQMouseEvent.prg + * contrib/hbqt/qtgui/TQMoveEvent.prg + * contrib/hbqt/qtgui/TQMovie.prg + * contrib/hbqt/qtgui/TQPageSetupDialog.prg + * contrib/hbqt/qtgui/TQPaintDevice.prg + * contrib/hbqt/qtgui/TQPainter.prg + * contrib/hbqt/qtgui/TQPainterPath.prg + * contrib/hbqt/qtgui/TQPaintEvent.prg + * contrib/hbqt/qtgui/TQPalette.prg + * contrib/hbqt/qtgui/TQPen.prg + * contrib/hbqt/qtgui/TQPicture.prg + * contrib/hbqt/qtgui/TQPixmap.prg + * contrib/hbqt/qtgui/TQPlainTextEdit.prg + * contrib/hbqt/qtgui/TQPolygon.prg + * contrib/hbqt/qtgui/TQPolygonF.prg + * contrib/hbqt/qtgui/TQPrintDialog.prg + * contrib/hbqt/qtgui/TQPrintEngine.prg + * contrib/hbqt/qtgui/TQPrinter.prg + * contrib/hbqt/qtgui/TQPrintPreviewDialog.prg + * contrib/hbqt/qtgui/TQProgressBar.prg + * contrib/hbqt/qtgui/TQProgressDialog.prg + * contrib/hbqt/qtgui/TQPushButton.prg + * contrib/hbqt/qtgui/TQRadialGradient.prg + * contrib/hbqt/qtgui/TQRadioButton.prg + * contrib/hbqt/qtgui/TQRegion.prg + * contrib/hbqt/qtgui/TQResizeEvent.prg + * contrib/hbqt/qtgui/TQScrollArea.prg + * contrib/hbqt/qtgui/TQScrollBar.prg + * contrib/hbqt/qtgui/TQSessionManager.prg + * contrib/hbqt/qtgui/TQSizeGrip.prg + * contrib/hbqt/qtgui/TQSizePolicy.prg + * contrib/hbqt/qtgui/TQSlider.prg + * contrib/hbqt/qtgui/TQSound.prg + * contrib/hbqt/qtgui/TQSpacerItem.prg + * contrib/hbqt/qtgui/TQSpinBox.prg + * contrib/hbqt/qtgui/TQSplashScreen.prg + * contrib/hbqt/qtgui/TQSplitter.prg + * contrib/hbqt/qtgui/TQStandardItem.prg + * contrib/hbqt/qtgui/TQStandardItemModel.prg + * contrib/hbqt/qtgui/TQStatusBar.prg + * contrib/hbqt/qtgui/TQStringListModel.prg + * contrib/hbqt/qtgui/TQStyle.prg + * contrib/hbqt/qtgui/TQStyledItemDelegate.prg + * contrib/hbqt/qtgui/TQStyleFactory.prg + * contrib/hbqt/qtgui/TQStyleHintReturn.prg + * contrib/hbqt/qtgui/TQStyleHintReturnMask.prg + * contrib/hbqt/qtgui/TQStyleHintReturnVariant.prg + * contrib/hbqt/qtgui/TQStyleOption.prg + * contrib/hbqt/qtgui/TQStyleOptionButton.prg + * contrib/hbqt/qtgui/TQStyleOptionComboBox.prg + * contrib/hbqt/qtgui/TQStyleOptionComplex.prg + * contrib/hbqt/qtgui/TQStyleOptionDockWidget.prg + * contrib/hbqt/qtgui/TQStyleOptionFocusRect.prg + * contrib/hbqt/qtgui/TQStyleOptionFrame.prg + * contrib/hbqt/qtgui/TQStyleOptionGroupBox.prg + * contrib/hbqt/qtgui/TQStyleOptionHeader.prg + * contrib/hbqt/qtgui/TQStyleOptionMenuItem.prg + * contrib/hbqt/qtgui/TQStyleOptionProgressBar.prg + * contrib/hbqt/qtgui/TQStyleOptionSizeGrip.prg + * contrib/hbqt/qtgui/TQStyleOptionSlider.prg + * contrib/hbqt/qtgui/TQStyleOptionSpinBox.prg + * contrib/hbqt/qtgui/TQStyleOptionTab.prg + * contrib/hbqt/qtgui/TQStyleOptionTabBarBase.prg + * contrib/hbqt/qtgui/TQStyleOptionTabWidgetFrame.prg + * contrib/hbqt/qtgui/TQStyleOptionTitleBar.prg + * contrib/hbqt/qtgui/TQStyleOptionToolBar.prg + * contrib/hbqt/qtgui/TQStyleOptionToolBox.prg + * contrib/hbqt/qtgui/TQStyleOptionToolButton.prg + * contrib/hbqt/qtgui/TQStyleOptionViewItem.prg + * contrib/hbqt/qtgui/TQStylePainter.prg + * contrib/hbqt/qtgui/TQSyntaxHighlighter.prg + * contrib/hbqt/qtgui/TQSystemTrayIcon.prg + * contrib/hbqt/qtgui/TQTabBar.prg + * contrib/hbqt/qtgui/TQTableView.prg + * contrib/hbqt/qtgui/TQTableWidget.prg + * contrib/hbqt/qtgui/TQTableWidgetItem.prg + * contrib/hbqt/qtgui/TQTableWidgetSelectionRange.prg + * contrib/hbqt/qtgui/TQTabWidget.prg + * contrib/hbqt/qtgui/TQTextBlock.prg + * contrib/hbqt/qtgui/TQTextBlockFormat.prg + * contrib/hbqt/qtgui/TQTextBlockGroup.prg + * contrib/hbqt/qtgui/TQTextBrowser.prg + * contrib/hbqt/qtgui/TQTextCharFormat.prg + * contrib/hbqt/qtgui/TQTextCursor.prg + * contrib/hbqt/qtgui/TQTextDocument.prg + * contrib/hbqt/qtgui/TQTextDocumentFragment.prg + * contrib/hbqt/qtgui/TQTextDocumentWriter.prg + * contrib/hbqt/qtgui/TQTextEdit.prg + * contrib/hbqt/qtgui/TQTextFormat.prg + * contrib/hbqt/qtgui/TQTextFragment.prg + * contrib/hbqt/qtgui/TQTextFrame.prg + * contrib/hbqt/qtgui/TQTextFrameFormat.prg + * contrib/hbqt/qtgui/TQTextImageFormat.prg + * contrib/hbqt/qtgui/TQTextInlineObject.prg + * contrib/hbqt/qtgui/TQTextItem.prg + * contrib/hbqt/qtgui/TQTextLayout.prg + * contrib/hbqt/qtgui/TQTextLength.prg + * contrib/hbqt/qtgui/TQTextLine.prg + * contrib/hbqt/qtgui/TQTextListFormat.prg + * contrib/hbqt/qtgui/TQTextObject.prg + * contrib/hbqt/qtgui/TQTextOption.prg + * contrib/hbqt/qtgui/TQTextTableFormat.prg + * contrib/hbqt/qtgui/TQTimeEdit.prg + * contrib/hbqt/qtgui/TQToolBar.prg + * contrib/hbqt/qtgui/TQToolBox.prg + * contrib/hbqt/qtgui/TQToolButton.prg + * contrib/hbqt/qtgui/TQTransform.prg + * contrib/hbqt/qtgui/TQTreeView.prg + * contrib/hbqt/qtgui/TQTreeWidget.prg + * contrib/hbqt/qtgui/TQTreeWidgetItem.prg + * contrib/hbqt/qtgui/TQValidator.prg + * contrib/hbqt/qtgui/TQVBoxLayout.prg + * contrib/hbqt/qtgui/TQWheelEvent.prg + * contrib/hbqt/qtgui/TQWidget.prg + * contrib/hbqt/qtgui/TQWidgetAction.prg + * contrib/hbqt/qtgui/TQWidgetItem.prg + * contrib/hbqt/qtgui/TQWindowsStyle.prg + * contrib/hbqt/qtgui/TQWizard.prg + * contrib/hbqt/qtgui/TQWizardPage.prg + * contrib/hbqt/qtnetwork/TQFtp.prg + * contrib/hbqt/qtnetwork/TQHttp.prg + * contrib/hbqt/qtnetwork/TQHttpRequestHeader.prg + * contrib/hbqt/qtnetwork/TQHttpResponseHeader.prg + * contrib/hbqt/qtnetwork/TQNetworkRequest.prg + + * contrib/hbide/hbide.prg + + + Implemented to avoid use of QT_PTROF() and QT_PTROFXBP() macros. + The functionality is transparent and accepts HBQT and HBXBP objects + as is. + + TODO: Method SomeQtClass:new( ... ) + ::pPtr := QSomeClass( ... ) + In above construct it is not known how many parameters + are of type pointer and otherwise and how, if resolved, + be forwarded to Qt wrapper with (...) syntax. + 2009-12-17 11:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! added protection against putting K_RESIZE into keyboard queue @@ -35,6 +312,7 @@ It fixes national character translations in selections (clipboard) broken during recent modifications for new CDP API. +>>>>>>> .r13274 2009-12-17 03:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! fixed timeout checking in function taking text from clipboard. diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 671388d489..a91c03af4b 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -288,14 +288,14 @@ METHOD HbIde:create( cProjIni ) ::qLayout:setHorizontalSpacing( 0 ) ::qLayout:setVerticalSpacing( 0 ) - ::oDa:oWidget:setLayout( QT_PTROF( ::qLayout ) ) + ::oDa:oWidget:setLayout( ::qLayout ) - ::qSplitter := QSplitter():new( QT_PTROF( ::oDa:oWidget ) ) + ::qSplitter := QSplitter():new( ::oDa ) - ::qLayout:addWidget_1( QT_PTROF( ::qSplitter ), 0, 0, 1, 1 ) + ::qLayout:addWidget_1( ::qSplitter, 0, 0, 1, 1 ) - ::qSplitter:addWidget( QT_PTROFXBP( ::oProjTree ) ) - ::qSplitter:addWidget( QT_PTROFXBP( ::oDa:oTabWidget ) ) + ::qSplitter:addWidget( ::oProjTree ) + ::qSplitter:addWidget( ::oDa:oTabWidget ) ::qSplitter:show() @@ -543,7 +543,7 @@ METHOD HbIde:convertSelection( cKey ) ::qCursor:insertText( cBuffer ) ::qCursor:setPosition( nB ) ::qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nL ) - ::qCurEdit:setTextCursor( QT_PTROF( ::qCursor ) ) + ::qCurEdit:setTextCursor( ::qCursor ) ::qCursor:endEditBlock() ENDIF ENDIF @@ -605,10 +605,10 @@ METHOD HbIde:editSource( cSourceFile, nPos, nHPos, nVPos ) oTab := ::buildTabPage( ::oDa, cSourceFile ) - qEdit := QPlainTextEdit():new( QT_PTROFXBP( oTab ) ) + qEdit := QPlainTextEdit():new( oTab ) qEdit:setPlainText( memoread( cSourceFile ) ) qEdit:setLineWrapMode( QTextEdit_NoWrap ) - qEdit:setFont( QT_PTROFXBP( ::oFont ) ) + qEdit:setFont( ::oFont ) qEdit:ensureCursorVisible() qDocument := QTextDocument():configure( qEdit:document() ) @@ -616,9 +616,9 @@ METHOD HbIde:editSource( cSourceFile, nPos, nHPos, nVPos ) qLayout := QBoxLayout():new() qLayout:setDirection( 0 ) qLayout:setContentsMargins( 0,0,0,0 ) - qLayout:addWidget( QT_PTROF( qEdit ) ) + qLayout:addWidget( qEdit ) - oTab:oWidget:setLayout( QT_PTROF( qLayout ) ) + oTab:oWidget:setLayout( qLayout ) qHiliter := QSyntaxHighlighter():new( qEdit:document() ) @@ -664,8 +664,8 @@ METHOD HbIde:buildTabPage( oWnd, cSource ) oTab:create() - ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( QT_PTROFXBP( oTab ) ) ) - ::qTabWidget:setTabTooltip( ::qTabWidget:indexOf( QT_PTROFXBP( oTab ) ), cSource ) + ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( oTab ) ) + ::qTabWidget:setTabTooltip( ::qTabWidget:indexOf( oTab ), cSource ) oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) } oTab:closeRequested := {|mp1,mp2,oXbp| ::closeTab( mp1, mp2, oXbp ) } @@ -675,7 +675,7 @@ METHOD HbIde:buildTabPage( oWnd, cSource ) /*----------------------------------------------------------------------*/ METHOD HbIde:setTabImage( oTab, qEdit, nPos, lFirst, qDocument ) - LOCAL nIndex := ::qTabWidget:indexOf( QT_PTROFXBP( oTab ) ) + LOCAL nIndex := ::qTabWidget:indexOf( oTab ) LOCAL lModified := qDocument:isModified() ::qTabWidget:setTabIcon( nIndex, s_resPath + iif( lModified, "tabmodified.png", "tabunmodified.png" ) ) @@ -686,7 +686,7 @@ METHOD HbIde:setTabImage( oTab, qEdit, nPos, lFirst, qDocument ) lFirst := .f. ::qCursor:configure( qEdit:textCursor() ) ::qCursor:setPosition( nPos, QTextCursor_MoveAnchor ) - qEdit:setTextCursor( QT_PTROF( ::qCursor ) ) + qEdit:setTextCursor( ::qCursor ) ENDIF RETURN Self @@ -715,7 +715,7 @@ METHOD HbIde:closeSource( nTab ) IF !empty( nTab ) ::oFuncList:clear() ::saveSource( nTab ) - ::qTabWidget:removeTab( ::qTabWidget:indexOf( QT_PTROFXBP( ::aTabs[ nTab,1 ] ) ) ) + ::qTabWidget:removeTab( ::qTabWidget:indexOf( ::aTabs[ nTab,1 ] ) ) cSource := ::aTabs[ nTab, 5 ] @@ -785,7 +785,7 @@ METHOD HbIde:saveSource( nTab, lConfirm ) ENDIF ENDIF - nIndex := ::qTabWidget:indexOf( QT_PTROFXBP( ::aTabs[ nTab, 1 ] ) ) + nIndex := ::qTabWidget:indexOf( ::aTabs[ nTab, 1 ] ) ::qTabWidget:setTabIcon( nIndex, s_resPath + "tabunmodified.png" ) ::oSBar:getItem( 7 ):caption := " " ENDIF @@ -1008,13 +1008,13 @@ METHOD HbIde:manageItemSelected( oXbpTreeItem ) IF ( n := ascan( ::aTabs, {|e_| PathNormalized( e_[ 5 ] ) == cSource } ) ) == 0 ::editSource( cSource ) ELSE - ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( QT_PTROFXBP( ::aTabs[ n,1 ] ) ) ) + ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( ::aTabs[ n,1 ] ) ) ENDIF CASE ::aProjData[ n, 2 ] == "Opened Source" cSource := ::aProjData[ n, 5 ] IF ( n := ascan( ::aTabs, {|e_| PathNormalized( e_[ 5 ] ) == cSource } ) ) > 0 - ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( QT_PTROFXBP( ::aTabs[ n,1 ] ) ) ) + ::qTabWidget:setCurrentIndex( ::qTabWidget:indexOf( ::aTabs[ n,1 ] ) ) ENDIF CASE ::aProjData[ n, 2 ] == "Path" @@ -1189,7 +1189,7 @@ METHOD HbIde:buildDialog() METHOD HbIde:buildFuncList() ::oDockR := XbpWindow():new( ::oDa ) - ::oDockR:oWidget := QDockWidget():new( QT_PTROFXBP( ::oDlg ) ) + ::oDockR:oWidget := QDockWidget():new( ::oDlg ) ::oDlg:addChild( ::oDockR ) ::oDockR:oWidget:setFeatures( QDockWidget_DockWidgetClosable + QDockWidget_DockWidgetMovable ) ::oDockR:oWidget:setAllowedAreas( Qt_RightDockWidgetArea ) @@ -1208,13 +1208,14 @@ METHOD HbIde:buildFuncList() ::oFuncList:oWidget:setEditTriggers( QAbstractItemView_NoEditTriggers ) - ::oDockR:oWidget:setWidget( QT_PTROFXBP( ::oFuncList ) ) + ::oDockR:oWidget:setWidget( ::oFuncList ) - ::oDlg:oWidget:addDockWidget_1( Qt_RightDockWidgetArea, QT_PTROFXBP( ::oDockR ), Qt_Horizontal ) + ::oDlg:oWidget:addDockWidget_1( Qt_RightDockWidgetArea, ::oDockR, Qt_Horizontal ) IF ::aIni[ INI_HBIDE, FunctionListVisible ] == "YES" ::lDockRVisible := .t. - //::setSizeAndPosByIni( ::oDockR:oWidget, FunctionListGeometry ) + ::oDockR:show() + //::setPosAndSizeByIni( ::oDockR:oWidget, FunctionListGeometry ) ELSE ::lDockRVisible := .f. ::oDockR:hide() @@ -1316,8 +1317,8 @@ METHOD HbIde:buildBottomArea() ::buildLinkResults() ::buildOutputResults() - ::oDlg:oWidget:tabifyDockWidget( QT_PTROFXBP( ::oDockB ), QT_PTROFXBP( ::oDockB1 ) ) - ::oDlg:oWidget:tabifyDockWidget( QT_PTROFXBP( ::oDockB1 ), QT_PTROFXBP( ::oDockB2 ) ) + ::oDlg:oWidget:tabifyDockWidget( ::oDockB, ::oDockB1 ) + ::oDlg:oWidget:tabifyDockWidget( ::oDockB1, ::oDockB2 ) RETURN Self @@ -1326,7 +1327,7 @@ METHOD HbIde:buildBottomArea() METHOD HbIde:buildCompileResults() ::oDockB := XbpWindow():new( ::oDa ) - ::oDockB:oWidget := QDockWidget():new( QT_PTROFXBP( ::oDlg ) ) + ::oDockB:oWidget := QDockWidget():new( ::oDlg ) ::oDlg:addChild( ::oDockB ) ::oDockB:oWidget:setFeatures( QDockWidget_DockWidgetClosable ) ::oDockB:oWidget:setAllowedAreas( Qt_BottomDockWidgetArea ) @@ -1336,9 +1337,9 @@ METHOD HbIde:buildCompileResults() ::oDockB:oWidget:setFocusPolicy( Qt_NoFocus ) ::oCompileResult := XbpMLE():new( ::oDockB ):create( , , { 0,0 }, { 100,400 }, , .t. ) - ::oDockB:oWidget:setWidget( QT_PTROFXBP( ::oCompileResult ) ) + ::oDockB:oWidget:setWidget( ::oCompileResult ) - ::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, QT_PTROFXBP( ::oDockB ), Qt_Vertical ) + ::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, ::oDockB, Qt_Vertical ) ::oDockB:hide() RETURN Self @@ -1348,7 +1349,7 @@ METHOD HbIde:buildCompileResults() METHOD HbIde:buildLinkResults() ::oDockB1 := XbpWindow():new( ::oDa ) - ::oDockB1:oWidget := QDockWidget():new( QT_PTROFXBP( ::oDlg ) ) + ::oDockB1:oWidget := QDockWidget():new( ::oDlg ) ::oDlg:addChild( ::oDockB1 ) ::oDockB1:oWidget:setFeatures( QDockWidget_DockWidgetClosable ) ::oDockB1:oWidget:setAllowedAreas( Qt_BottomDockWidgetArea ) @@ -1358,9 +1359,9 @@ METHOD HbIde:buildLinkResults() ::oDockB1:oWidget:setFocusPolicy( Qt_NoFocus ) ::oLinkResult := XbpMLE():new( ::oDockB1 ):create( , , { 0,0 }, { 100, 400 }, , .t. ) - ::oDockB1:oWidget:setWidget( QT_PTROFXBP( ::oLinkResult ) ) + ::oDockB1:oWidget:setWidget( ::oLinkResult ) - ::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, QT_PTROFXBP( ::oDockB1 ), Qt_Vertical ) + ::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, ::oDockB1, Qt_Vertical ) ::oDockB1:hide() RETURN Self @@ -1370,7 +1371,7 @@ METHOD HbIde:buildLinkResults() METHOD HbIde:buildOutputResults() ::oDockB2 := XbpWindow():new( ::oDa ) - ::oDockB2:oWidget := QDockWidget():new( QT_PTROFXBP( ::oDlg ) ) + ::oDockB2:oWidget := QDockWidget():new( ::oDlg ) ::oDlg:addChild( ::oDockB2 ) ::oDockB2:oWidget:setFeatures( QDockWidget_DockWidgetClosable ) ::oDockB2:oWidget:setAllowedAreas( Qt_BottomDockWidgetArea ) @@ -1383,9 +1384,9 @@ METHOD HbIde:buildOutputResults() ::oOutputResult:wordWrap := .f. //::oOutputResult:dataLink := {|x| IIf( x==NIL, cText, cText := x ) } - ::oDockB2:oWidget:setWidget( QT_PTROFXBP( ::oOutputResult ) ) + ::oDockB2:oWidget:setWidget( ::oOutputResult ) - ::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, QT_PTROFXBP( ::oDockB2 ), Qt_Vertical ) + ::oDlg:oWidget:addDockWidget_1( Qt_BottomDockWidgetArea, ::oDockB2, Qt_Vertical ) ::oDockB2:hide() RETURN Self @@ -1397,7 +1398,7 @@ METHOD HbIde:buildOutputResults() METHOD HbIde:printPreview() LOCAL qDlg - qDlg := QPrintPreviewDialog():new( QT_PTROFXBP( ::oDlg ) ) + qDlg := QPrintPreviewDialog():new( ::oDlg ) qDlg:setWindowTitle( "Harbour-QT Preview Dialog" ) Qt_Connect_Signal( qDlg:pPtr, "paintRequested(QPrinter)", {|o,p| ::paintRequested( p,o ) } ) qDlg:exec() @@ -1412,7 +1413,7 @@ METHOD HbIde:paintRequested( pPrinter ) qPrinter := QPrinter():configure( pPrinter ) - ::qCurEdit:print( QT_PTROF( qPrinter ) ) + ::qCurEdit:print( qPrinter ) RETURN Self @@ -1529,7 +1530,7 @@ METHOD HbIde:loadUI( cUi ) qFile := QFile():new( cUiFull ) IF qFile:open( 1 ) qUiLoader := QUiLoader():new() - qDialog := QDialog():configure( qUiLoader:load( QT_PTROF( qFile ), QT_PTROFXBP( ::oDlg ) ) ) + qDialog := QDialog():configure( qUiLoader:load( qFile, ::oDlg ) ) qFile:close() ENDIF ENDIF @@ -1546,7 +1547,7 @@ METHOD HbIde:findReplace( cUi ) qFile := QFile():new( cUiFull ) IF qFile:open( 1 ) qUiLoader := QUiLoader():new() - ::qFindDlg := QDialog():configure( qUiLoader:load( QT_PTROF( qFile ), QT_PTROFXBP( ::oDlg ) ) ) + ::qFindDlg := QDialog():configure( qUiLoader:load( qFile, ::oDlg ) ) qFile:close() // ::qFindDlg:setWindowFlags( Qt_Sheet ) @@ -1892,7 +1893,7 @@ METHOD HbIde:buildProjectViaQt( cProject ) Qt_Connect_Signal( QT_PTROF( ::qProcess ), "readyReadStandardOutput()", {|o,i| ::readProcessInfo( 3, i, o ) } ) Qt_Connect_Signal( QT_PTROF( ::qProcess ), "finished(int,int)" , {|o,i| ::readProcessInfo( 2, i, o ) } ) - ::qProcess:start( "hbmk2.exe", QT_PTROF( qStringList ) ) + ::qProcess:start( "hbmk2.exe", qStringList ) RETURN Self @@ -1927,3 +1928,4 @@ METHOD HbIde:readProcessInfo( nMode, iBytes ) /*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbqt/filelist.mk b/harbour/contrib/hbqt/filelist.mk index 3b9e2642b4..5582ad3917 100644 --- a/harbour/contrib/hbqt/filelist.mk +++ b/harbour/contrib/hbqt/filelist.mk @@ -21,5 +21,8 @@ CPP_SOURCES := \ hbqt_hbqsyntaxhighlighter.cpp \ hbqt_hbqtableview.cpp \ +PRG_SOURCES := \ + hbqt_misc.prg \ + # Don't delete this comment, it's here to ensure empty # line above is kept intact. diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index 24c8be1190..2989667405 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -2,6 +2,55 @@ * $Id$ */ +/* + * Harbour Project source code: + * Harbour-Qt wrapper generator. + * + * 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 "common.ch" #include "fileio.ch" @@ -1538,9 +1587,10 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut, subCls_ ) cCall := strtran( s, ss, '::pPtr' ) aadd( mth_, { cM, cCall } ) - //aadd( txt_, ' METHOD ' + cM + ' INLINE ' + cCall ) aadd( txt_, ' METHOD ' + cM ) + // cDocs += IF( left( aA[ PRT_DOC ], 1 ) == "p", "Qt_Ptr( " + aA[ PRT_DOC ] + " )", aA[ PRT_DOC ] ) + ', ' + ENDIF NEXT aadd( txt_, '' ) @@ -1558,7 +1608,8 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut, subCls_ ) DO CASE CASE cClassType == "PLAINOBJECT" - aadd( txt_, 'METHOD New( ... ) CLASS ' + cWidget ) + aadd( txt_, 'METHOD ' + cWidget + ':new( ... )' ) +// aadd( txt_, 'METHOD New( ... ) CLASS ' + cWidget ) aadd( txt_, '' ) aadd( txt_, ' ::pPtr := Qt_' + cWidget + '( ... )' ) aadd( txt_, '' ) @@ -1567,7 +1618,7 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut, subCls_ ) OTHERWISE aadd( txt_, 'METHOD ' + cWidget + ':new( pParent )' ) - aadd( txt_, ' ::pPtr := Qt_' + cWidget + '( pParent )' ) + aadd( txt_, ' ::pPtr := Qt_' + cWidget + '( hbqt_ptr( pParent ) )' ) aadd( txt_, ' RETURN Self' ) aadd( txt_, '' ) @@ -1587,7 +1638,7 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut, subCls_ ) FOR i := 1 TO len( mth_ ) aadd( txt_, ' ' ) aadd( txt_, 'METHOD ' + cWidget + ':' + mth_[ i, 1 ] ) - aadd( txt_, ' RETURN ' + mth_[ i, 2 ] ) + aadd( txt_, ' RETURN ' + ParsePtr( mth_[ i, 2 ] ) ) aadd( txt_, ' ' ) NEXT @@ -2305,3 +2356,45 @@ FUNCTION Get_Command( cWgt, cCmn ) RETURN cRet /*----------------------------------------------------------------------*/ + +FUNCTION ParsePtr( cParam ) + LOCAL cPar := "" + LOCAL s, n + + + IF at( " p" , cParam ) > 0 + DO WHILE .t. + + IF ( n := at( " p" , cParam ) ) > 0 + cPar += substr( cParam, 1, n ) + cParam := substr( cParam, n+1 ) + + IF ( n := at( ",", cParam ) ) > 0 + s := substr( cParam, 1, n-1 ) + cParam := substr( cParam, n ) + cPar += "hbqt_ptr( " + s + " )" + + ELSEIF ( n := at( " ", cParam ) ) > 0 + s := substr( cParam, 1, n-1 ) + cParam := substr( cParam, n ) + cPar += "hbqt_ptr( " + s + " )" + cPar += cParam + EXIT + + ENDIF + + ELSE + cPar += cParam + EXIT + + ENDif + ENDDO + + ELSE + cPar := cParam + + ENDIF + + RETURN cPar + +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/hbqt_misc.prg b/harbour/contrib/hbqt/hbqt_misc.prg new file mode 100644 index 0000000000..48ebbe6a7a --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_misc.prg @@ -0,0 +1,76 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * 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. + * + */ +/*----------------------------------------------------------------------*/ + +FUNCTION hbqt_ptr( xParam ) + LOCAL cClsName + + IF hb_isObject( xParam ) + cClsName := __ObjGetClsName( xParam ) + + IF left( cClsName, 1 ) == "Q" + RETURN xParam:pPtr + + ELSEIF left( cClsName, 2 ) == "HB" + RETURN xParam:pPtr + + ELSEIF left( cClsName, 3 ) == "XBP" + RETURN xParam:oWidget:pPtr + + ELSE /* we don't care, programmer is at a fault */ + + ENDIF + ENDIF + + RETURN xParam + +/*----------------------------------------------------------------------*/ +