Welcome to the Project Developers' Table

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Welcome to the Project Developers' Table

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Welcome to the Project Developers' Table

Post 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!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Welcome to the Project Developers' Table

Post by Rathinagiri »

Thanks Roberto CheckBox and DatePicker are added to Tab. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Welcome to the Project Developers' Table

Post by Rathinagiri »

we finally can nest tabs!!!:)
That, really is a great news!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Welcome to the Project Developers' Table

Post 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.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Welcome to the Project Developers' Table

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Welcome to the Project Developers' Table

Post 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!
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Welcome to the Project Developers' Table

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Welcome to the Project Developers' Table

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Welcome to the Project Developers' Table

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply