No HMG4 Font object

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

No HMG4 Font object

Post by concentra »

I am new to HMG and am converting a FiveWin printing tool to HMG4 and I was unable to find references to FONT objects in HMG4...
HMG4 don´t have FONT objects ?
In FiveWin I can create independent FONT objects and set them to other objects like PRINT, WINDOW, etc.
In HMG4 this is not possible ? Or do I have to manipulate QT font objects directly ?

Another thing I considered strange is that if an incorrect or invalid printer is selected, the printing subsystem will only manage this AFTER generating the full report. Im my opinion this would be checked earlier, in the printer selection functions. I think I am able to make this change by myself but the development managers have to agree and I also don´t have access to make changes in the SVN.

Where can I find QT documentations ?

Maurício Faria
[[]] Mauricio Ventura Faria
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: No HMG4 Font object

Post by danielmaximiliano »

Hola Mauricio
Puedes mirar hmg.4.html dentro de la carpeta ..\doc en tu instalacion HMG.4
en HMG4 Release 28-10-10 http://hmgforum.com/viewtopic.php?f=2&t=1754
tienes varios Ejemplos sobre PRINT y manejo de FONT
instala primero esta version y actualiza despues con la nueva version liberada 01-02-11

baja Tortoise SVN para mantener actualizado la carpeta ..\..\Samples
http://tortoisesvn.tigris.org/

Lenguaje Portugues para Tortoise
http://sourceforge.net/projects/tortois ... i/download

despues lee esto
HMG.4 2011.02.01 README
-----------------------

- The samples are in svn/samples folder.

- To build a sample type

build <sample>

- To distribute your executable you must provide all dll files located at qt\bin
folder. If your app uses .jpg, .gif, .ico, or .tif files you must provide the
plugin dlls located at qt\plugins\imageformats with the qt.conf file pointing
to dll files location in the target system.

- The sources are in svn/source folder.

- If you want to get updated sources, you can download at:

http://hmg.svn.sourceforge.net/viewvc/hmg/?view=tar

and unpack the content of hmg folder at c:\hmg.4\svn (you can unpack it with winrar).

- If you are a project contributor:

1. Download Tortoise SVN client (http://sourceforge.net/projects/tortoisesvn/).
2. Install according the setup wizard directions.
3. Open Windows explorer.
4. Right click in the C:\HMG.4\SVN folder.
5. Select 'SVN Checkout' (project url is: https://hmg.svn.sourceforge.net/svnroot/hmg).
6. If you change the code of your local copy and want to upload, Right click in
the C:\HMG.4\SVN and select SVN Commit...
7. If you want download the changes from the server, Right click in
the C:\HMG.4\SVN and select SVN Update.

- To become a contributor you need a SourceForge.net account and must be to be
authorized by the HMG team at http://www.hmgforum.com.
Saludos
DaNiElMaXiMiLiAnO
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: No HMG4 Font object

Post by concentra »

danielmaximiliano wrote:Hola Mauricio
Puedes mirar hmg.4.html dentro de la carpeta ..\doc en tu instalacion HMG.4
en HMG4 Release 28-10-10 http://hmgforum.com/viewtopic.php?f=2&t=1754
tienes varios Ejemplos sobre PRINT y manejo de FONT
instala primero esta version y actualiza despues con la nueva version liberada 01-02-11

Daniel, I did it, but was unable to find any sample about PRINT nor FONT management in hmg.4.html ...
I only see a HMG 4.0 Status Report on 2010-09-24.
Will do a SVN checkout to see what I get in the current trunk...

[[]] Maurício Faria
[[]] Mauricio Ventura Faria
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: No HMG4 Font object

Post by danielmaximiliano »

mauricio, guarda este ejemplo en tu carpeta Samples como
..\Samples\Print

DaNiElMaXiMiLiAnO

Pd: Samples completo
Attachments
samples.rar
Ejemplos completo
(1.11 MiB) Downloaded 433 times
print.rar
(13.45 KiB) Downloaded 352 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: No HMG4 Font object

Post by concentra »

danielmaximiliano wrote:mauricio, guarda este ejemplo en tu carpeta Samples como
..\Samples\Print

Daniel thahks, but I already had this samples.
Maybe I wasn´t clear in what I am looking for.
Forget about printing, I am looking for FONT management functions.
Like defining a FONT object and manipulating their properties like font name, size, bold, italic, etc.

[[]] Maurício Faria
[[]] Mauricio Ventura Faria
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: No HMG4 Font object

Post by Rathinagiri »

Maurício Faria,

Thanks a lot for your interest.

As of now, our main concern is to port HMG 3 applications to HMG 4. In HMG 3, we have separate definition of fonts for each control. (Since HMG 3 is not an OOP model).

Definitely a separate font object will be required and we have to create the same in the future.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: No HMG4 Font object

Post by concentra »

Ok, I see.
May I try to write this ?
Who authorizes write access to SF ?

[[]] Maurício Faria
[[]] Mauricio Ventura Faria
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: No HMG4 Font object

Post by Rathinagiri »

If you want, yes you can.

Kindly give your SF username.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: No HMG4 Font object

Post by concentra »

Hi, Rathinagiri.
My SF id is concentra.

But, while studying HMG4 in order to do the job, I realised that it´s easier to work with the QFont object directly since all HMG4 controls uses fonts in this way ( directly ) !

Maurício Faria
[[]] Mauricio Ventura Faria
User avatar
concentra
Posts: 256
Joined: Fri Nov 26, 2010 11:31 am
Location: Piracicaba - Brasil

Re: No HMG4 Font object

Post by concentra »

While testing some code I found some weird behaviors...
One is that in a BUTTON, when changing the button caption I need to change 2 properties -> :caption and :cCaption !
If I change only one ( any one ) the button caption do not change !
Is this the expected behavior or am I doing something wrong ?
PLease test the folowing code with the latest HMG4 (02/2011) :

--------------------------------------------------------

#include "hmg.ch"

Function Main

Local oWindow , oButton1

With Object oWindow := Window():New()
:Width := 200
:Height := 80
:Type := WND_MAIN

With Object oButton1 := Button():New()
:Row := 20
:Col := 20
:Width := 160
:Caption := 'Click to Change Caption !'
:OnClick := { || ChangeCaption(oButton1) }
End With

End With

oWindow:Activate()

Return




FUNCTION ChangeCaption(oButton1)

Static lOnOff

IF lOnOff == NIL
lOnOff := .T.
ENDIF

IF lOnOff
oButton1:cCaption := 'Click to change back...'
oButton1:Caption := 'Click to change back...'
ELSE
oButton1:cCaption := 'Click to Change Caption !'
oButton1:Caption := 'Click to Change Caption !'
ENDIF

lOnOff := ! lOnOff

RETURN NIL
[[]] Mauricio Ventura Faria
Post Reply