Welcome to the Project Developers' Table

Moderator: Rathinagiri

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 for the info Marek. Now it works. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
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 hate this state of my mind, when everything I try generates runtime error :(
I think so simple operation like this:

Code: Select all

			oImage = QPixmap():new()
			oImage:load(cValue)
			Self:setPixmap(oImage)
should work. But it won't :twisted:

I have no idea.
I'm not sure since I've not seen your complete code, but, consider that the harbour level object is not the same as QT object, meaning that 'self' is not the same as ::oQTObject.
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,

Please, do not forget to add credits for your work to the source code license text.

TIA.
Regards/Saludos,

Roberto


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

Re: Welcome to the Project Developers' Table

Post by mol »

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.
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Welcome to the Project Developers' Table

Post by dhaine_adp »

Hi Friends,

Here's the GRID control Create Method() code snapshot attached on this post, though unfinished but somehow I'd be able to scratch the tip of the iceberg. I prefer to used the QTableView():New() but I am also a none HBQT expert so I used QTableWidget():New(). For the time being, this will be the case and as I work along, I might change this early implementation. Code comments is included as an aid on my conceptualization rather than drawing it on the paper.

Note: QTableWidget() grid with known rows and columns, QTableView() can be implemented later with setItems to increase the row and colums, e.g. rowCount( ( alias->lastrec() ) - lesstheDeletedRecs ) so that there will be no blank rows on the grid. I think it's a long way over. LOL! Anyway I think HMG.4 would work with QTableWidget while I'm working with the extension.

I will work on the properties and some methods tomorrow night. Your comments are welcome and seems to be of vital importance... :)

Regards,

Danny
Attachments
grid.zip
(4.15 KiB) Downloaded 168 times
Regards,

Danny
Manila, Philippines
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Welcome to the Project Developers' Table

Post by dhaine_adp »

Hi,

I forget to mention that the grid isn't working yet. What I wanted is for our Project Director, Roberto to see if what I am heading for is the right direction. Sorry, I forget to mention on my earlier post.

Danny
Regards,

Danny
Manila, Philippines
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:Hi,

I forget to mention that the grid isn't working yet. What I wanted is for our Project Director, Roberto to see if what I am heading for is the right direction. Sorry, I forget to mention on my earlier post.

Danny
Ok.

The OOP design of HMG.4 is done for simplicity.

Allowing the user to call the method new() without parameters for all classes (excepting popup that requires only one).

The create() method is called automatically at parent window activation and optionally, the user could call prior to window activation for any object, but the create method must not require parameters, simply because it picks the adequate property values previously stored in variables such as ::nRow, ::nCol, etc.

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.
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 »

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.
Ok.

I'll take a look at it, if I found the problem I'll post a note here.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Welcome to the Project Developers' Table

Post by dhaine_adp »

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
Regards,

Danny
Manila, Philippines
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: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 :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply