What do I change to include a lib in the build process ?
Moderator: Rathinagiri
What do I change to include a lib in the build process ?
Hi.
I made changes in almost all prgs in order to introduce NEW() methods in all controls in order to instanciate the corresponding QT object sooner.
This pusshed me to also made kind of big changes in the code in order to permit controls to have children.
In the way it was coded, we have a main "parent" that was the "main Window" and this window was the parent of everything else.
If a control is inside another control the container control should be the parent but it was the main Window.
And when this didn´t work the workaround was to set a "container" that, in fact, was the real parent...
Part of the problem was that I had to know the control parent without knowing it name.
And since all source is coded in WITH OBJECT nested structures I extracted the parent from the WITH OBJECT control stack.
One great problem was with tabs and tabpages. Tabpages inherited from tabs when they should inherit from control and tabpages have inner controls that must point to it as parents.
Changing this, letting controls have child controls, I eliminated the need of the weird oCurrentTab, oPriorTab, oCurrentPage, oPriorPage controlling stuff.
Another big one was SplitBox. It inherited from Window and should be from Control.
Also Statusbar.
I took 2 weeks changing the code and testing every sample in order to be sure of the compatibility with older code.
I am ready to up the changings but I need a function in a Harbour lib to be linked in.
The function is HB_QWith() and the lib XHB.LIB
But I do not know where do I set this...
Where should I change to include this lib in the building process ?
I made all the changes passing the lib as a parameter to BUILD.BAT...
I made changes in almost all prgs in order to introduce NEW() methods in all controls in order to instanciate the corresponding QT object sooner.
This pusshed me to also made kind of big changes in the code in order to permit controls to have children.
In the way it was coded, we have a main "parent" that was the "main Window" and this window was the parent of everything else.
If a control is inside another control the container control should be the parent but it was the main Window.
And when this didn´t work the workaround was to set a "container" that, in fact, was the real parent...
Part of the problem was that I had to know the control parent without knowing it name.
And since all source is coded in WITH OBJECT nested structures I extracted the parent from the WITH OBJECT control stack.
One great problem was with tabs and tabpages. Tabpages inherited from tabs when they should inherit from control and tabpages have inner controls that must point to it as parents.
Changing this, letting controls have child controls, I eliminated the need of the weird oCurrentTab, oPriorTab, oCurrentPage, oPriorPage controlling stuff.
Another big one was SplitBox. It inherited from Window and should be from Control.
Also Statusbar.
I took 2 weeks changing the code and testing every sample in order to be sure of the compatibility with older code.
I am ready to up the changings but I need a function in a Harbour lib to be linked in.
The function is HB_QWith() and the lib XHB.LIB
But I do not know where do I set this...
Where should I change to include this lib in the building process ?
I made all the changes passing the lib as a parameter to BUILD.BAT...
[[]] Mauricio Ventura Faria
Re: What do I change to include a lib in the build process ?
Good work !!!!concentra wrote: Where should I change to include this lib in the building process ?
You should solve adding the line
libs=hbxhb.hbc
to hmg.hbc
Probably you need the full path, but first try without it
Re: What do I change to include a lib in the build process ?
Mauricio,
please have a look at Layout... layouts should be ALWAYS used in Qt programs... In a book I read on Qt, absolute positioning (x,y coordinates) was NEVER mentioned, only layout was used...
please have a look at Layout... layouts should be ALWAYS used in Qt programs... In a book I read on Qt, absolute positioning (x,y coordinates) was NEVER mentioned, only layout was used...
Re: What do I change to include a lib in the build process ?
Hi.
I read something about this some time ago, and it is related to running the same application on multiple plataforms, and preserving the presentation layout. Not all but most of them.
All the code I inspected uses absolute positioning. No mention on layouts...mrduck wrote:Mauricio,
please have a look at Layout... layouts should be ALWAYS used in Qt programs... In a book I read on Qt, absolute positioning (x,y coordinates) was NEVER mentioned, only layout was used...
I read something about this some time ago, and it is related to running the same application on multiple plataforms, and preserving the presentation layout. Not all but most of them.
[[]] Mauricio Ventura Faria
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: What do I change to include a lib in the build process ?
Fantastic work! Now, can you build the whole thing?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: What do I change to include a lib in the build process ?
Hi.
Sorry, I didn´t understand... What is "the whole thing" ? The lib ?rathinagiri wrote:can you build the whole thing?
[[]] Mauricio Ventura Faria
Re: What do I change to include a lib in the build process ?
Hi guys,
I think there is another simple way to manage parent and give inheritance: with one shared array.
Abstract: every object, which acts as a container, has a beginning and an end (eg: define window / end window, define tab / end tab, define page / end page).
I assume "aParentLevel" is the shared array.
With pseudo-code
likewise, I could have this situation
At startup aParentLevel := {}
Cheers
I think there is another simple way to manage parent and give inheritance: with one shared array.
Abstract: every object, which acts as a container, has a beginning and an end (eg: define window / end window, define tab / end tab, define page / end page).
I assume "aParentLevel" is the shared array.
With pseudo-code
Code: Select all
At startup aParentLevel := {} (my pov: there is hmgwindows super parent)
define window MainForm --> AADD( aParentLevel, Self )
define textbox --> its parent it's the last value in aParentLevel
define tab --> AADD( aParentLevel, Self ) its parent it's the last value in aParentLevel
define page1 --> AADD( aParentLevel, Self ) its parent it's the last value in aParentLevel
define textbox --> its parent it's the last value in aParentLevel
end page1 --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
define page2 --> AADD( aParentLevel, Self ) its parent it's the last value in aParentLevel
define textbox --> its parent it's the last value in aParentLevel
end page2 --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
end tab --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
end window --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
At startup aParentLevel := {}
Code: Select all
define window MainForm --> AADD( aParentLevel, Self )
define window SubForm1 --> AADD( aParentLevel, Self )
define window SubForm2 --> AADD( aParentLevel, Self )
end window --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
end window --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
end window --> aParentLevel := ASIZE( aParentLevel, LEN( aParentLevel ) - 1 ) remove the last one
Luigi from Italy
www.L3W.it
www.L3W.it
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: What do I change to include a lib in the build process ?
Yes. Building the hmg library and successfully compiling all the samples with the required libraries.concentra wrote:Hi.Sorry, I didn´t understand... What is "the whole thing" ? The lib ?rathinagiri wrote:can you build the whole thing?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: What do I change to include a lib in the build process ?
Hi.
I commited the code, please take a look.
Yes, I did.rathinagiri wrote:Yes. Building the hmg library and successfully compiling all the samples with the required libraries.
I commited the code, please take a look.
[[]] Mauricio Ventura Faria