Page 7 of 106

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 3:03 pm
by Roberto Lopez
dhaine_adp wrote:
So, the support for parameters in grid's create method is out of HMG.4 design.

Regarding other possible things, this is an early version yet to get some other conclusions.
Hi Roberto,

OK. I'll post the changes here again.

Danny
Thanks.

Re: Welcome to the Project Developers' Table

Posted: Sun Aug 22, 2010 4:13 am
by Roberto Lopez
Hi Team,

I've uploaded the first version of Tab control (we finally can nest tabs!!!:)).

Currently only EditBox and Button are supported.

Please, do the following modification in your controls to get Tab support too:

In the create() method, please, change the Qt object creation to have two alternative parents in the case that a parent tab been specified.

IE, for Editbox I've changed in the following way:

Code: Select all

	* Create QT Object and other initialization tasks

	If valtype( ::oContainer ) == 'U'

		::oQTObject := QTextEdit():new( ::oParent:oQTObject ) * <- ORIGINAL

	Else

		::oQTObject := QTextEdit():new( ::oContainer:oQTObject ) 

	EndIf

Thanks!

Re: Welcome to the Project Developers' Table

Posted: Sun Aug 22, 2010 4:49 am
by Rathinagiri
Thanks Roberto CheckBox and DatePicker are added to Tab. :)

Re: Welcome to the Project Developers' Table

Posted: Sun Aug 22, 2010 4:51 am
by Rathinagiri
we finally can nest tabs!!!:)
That, really is a great news!

Re: Welcome to the Project Developers' Table

Posted: Sun Aug 22, 2010 9:27 am
by mol
Roberto Lopez wrote:
mol wrote:Hello Roberto!
I've commited my code for IMAGE class souce\label.prg and samples\demo_1.prg

It won't work, but, maybe later, I'll find few minutes to work over it.
Forgot your additions to demo4.prg

It takes only two lines of code to instruct to current label class to show an image instead a text.

Go to label.prg and about line #179 add this:

Code: Select all

	
<...>
if ValType (::lAutoSize)	!= 'U'	; Self:AutoSize	:= ::lAutoSize		; endif

	qPixmap := QPixmap():new( "save.png" ) * <- NEW CODE
	::oQTObject:setPixmap( qPixmap )  <- NEW CODE

	// set default label word wrapping to .T.

<...>
Of course, 'save.png' must be located at your test app folder.

You could copy the current LABEL.PRG into IMAGE.PRG and start the new image class around it. Eventually, later the image class could be optimized to inherit from label, so, saving code, but now we have more important things in mind, like make it work first :)
I have always tried with .jpg and gif files.
And now, I've observed qpixmap() works directly only with .png and .bmp files :(
two days of searching, wrrr
Maybe there is a bug in QT?
I've found in QT doc something like that:
Reading and writing SVG files is supported through Qt's SVG Module.

To configure Qt with GIF support, pass -qt-gif to the configure script or check the appropriate option in the graphical installer.

See also setFormat(), QImageWriter::supportedImageFormats(), and QImageIOPlugin.

Re: Welcome to the Project Developers' Table

Posted: Mon Aug 23, 2010 12:51 pm
by Roberto Lopez
mol wrote: <...>
two days of searching, wrrr
Welcome to my world :)
mol wrote: Maybe there is a bug in QT?
I've found in QT doc something like that:
Reading and writing SVG files is supported through Qt's SVG Module.

To configure Qt with GIF support, pass -qt-gif to the configure script or check the appropriate option in the graphical installer.

See also setFormat(), QImageWriter::supportedImageFormats(), and QImageIOPlugin.
As I've already pointed, I've just learning about QT, step by step, as it is needed, so, I have not an answer for you about this right now.

I'll start to research about this issue and if some appears, I'll keep you posted.

Re: Welcome to the Project Developers' Table

Posted: Mon Aug 23, 2010 1:10 pm
by mol
I'm still lerning QT and reading documentation.
IMAGE is realized, maybe not ended, but working with PNG images.
I think, I can take next control to create. Please assign me next job!

Re: Welcome to the Project Developers' Table

Posted: Mon Aug 23, 2010 2:34 pm
by Roberto Lopez
mol wrote:I'm still lerning QT and reading documentation.
IMAGE is realized, maybe not ended, but working with PNG images.
I think, I can take next control to create. Please assign me next job!
Ok.

I guess that Combobox is free, so you could work on it.

You could need to synchronize your work with rathinagiri, sin he is working on listbox and maybe you can share code for some properties.

Re: Welcome to the Project Developers' Table

Posted: Mon Aug 23, 2010 2:46 pm
by Roberto Lopez
Roberto Lopez wrote:
mol wrote:I'm still lerning QT and reading documentation.
IMAGE is realized, maybe not ended, but working with PNG images.
I think, I can take next control to create. Please assign me next job!
Ok.

I guess that Combobox is free, so you could work on it.

You could need to synchronize your work with rathinagiri, sin he is working on listbox and maybe you can share code for some properties.
Anyway...

My sample works with gif files.

If you change the current label code adding the following code in Create() method.

Code: Select all

<...>
if ValType (::lAutoSize)   != 'U'   ; Self:AutoSize   := ::lAutoSize      ; endif

   qPixmap := QPixmap():new( "hmg.gif" ) * <- NEW CODE
   ::oQTObject:setPixmap( qPixmap ) * <- NEW CODE

   // set default label word wrapping to .T.

<...>
Then go to label samples folder, copy on it the hmg.gif file and compile the demo_1.

hmg.gif, will be show instead label text.

So, gifs are directly supported.

Re: Welcome to the Project Developers' Table

Posted: Mon Aug 23, 2010 2:50 pm
by Roberto Lopez
Roberto Lopez wrote: Then go to label samples folder, copy on it the hmg.gif file and compile the demo_1.

hmg.gif, will be show instead label text.

So, gifs are directly supported.
The same applies to .jpg files.

I've changed references to hmg.gif by hmg.jpg and works perfectly.