## Welcome to the Project Developers' Table

Moderator: Rathinagiri

Rathinagiri
Posts: 5268
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 171 times
Been thanked: 174 times
Contact:

### Re: Welcome to the Project Developers' Table

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.

Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times
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()
Self:setPixmap(oImage)

should work. But it won't

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)

Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times
Hi Team,

TIA.
Regards/Saludos,

Roberto

(Veritas Filia Temporis)

mol
Posts: 3255
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 235 times
Been thanked: 132 times
Contact:
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.

Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 2 times
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
Regards,

Danny
Manila, Philippines

Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 2 times
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

Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times

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)

Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times
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)

Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 2 times
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

Roberto Lopez
HMG Founder
Posts: 3980
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 27 times
Been thanked: 168 times
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.

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

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)