Page 6 of 106

Re: Welcome to the Project Developers' Table

Posted: Fri Aug 20, 2010 1:29 pm
by Rathinagiri
Thanks for the info Marek. Now it works. :)

Re: Welcome to the Project Developers' Table

Posted: Fri Aug 20, 2010 1:45 pm
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.

Re: Welcome to the Project Developers' Table

Posted: Fri Aug 20, 2010 1:53 pm
by Roberto Lopez
Hi Team,

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

TIA.

Re: Welcome to the Project Developers' Table

Posted: Fri Aug 20, 2010 3:39 pm
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.

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 12:19 am
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

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 4:57 am
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

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 2:03 pm
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.

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 2:06 pm
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.

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 2:12 pm
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

Re: Welcome to the Project Developers' Table

Posted: Sat Aug 21, 2010 2:59 pm
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 :)