Recent

Author Topic: New component tab with graphic components like TArrow, TLed etc.  (Read 44603 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #45 on: May 24, 2013, 01:33:39 pm »
Quote
While you're at it would you know under what license ($LazarusDir)/images falls?

I have no idea.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #46 on: May 24, 2013, 01:56:35 pm »
No problem... somebody will sometime ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

howardpc

  • Hero Member
  • *****
  • Posts: 3043
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #47 on: May 24, 2013, 10:03:02 pm »
You might like to look at the attached numerical LED component I've written based on the look of a classic 7-segment number LED. It supports integers from -maxint to +maxint, and offers both hex and decimal display and left, right and centred alignment.
Because it is 'pure' Lazarus code it supports Align, anchors and Autosize which the Cindy components (as Delphi ports) are not so good at. It is also quite lightweight (9kb zipped including the icon).

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #48 on: May 25, 2013, 11:11:07 am »
hello howardpc, good job about your component, but the component lednumber used actually in IndustrialStuff is more "generic" , it can have alphanumeric characters, more than one line ...  for the missing properties, it will be easy to add them in the published part of the component ( public in the ancestor class). Would it be better to adjust or improve the existant components ? for example preferred size constraints etc...
to do :
may be change the name for lednumber  ---> ledalpha
the delphi converted components have some properties to be published ( for example ancestors)
bug 24472 mantis  :
Quote
place a component with photo and change it size, place the other side with the same photo and do not change the size ... see that all two had the same size ... I eliminate the line Autosize = true when the problem is solved


not the good solution to eliminate the line  , better solution
replace
Code: [Select]
property AutoSizeby
Code: [Select]
  property AutoSize  default true;in the published properties

other bug :
png  picture have only one bit alpha transparency on lazarus linux gtk ---> the png pictures of the advled are not very beautifull on linux because they are 8 bits alpha transparency pictures.



Friendly J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #49 on: May 25, 2013, 11:45:48 am »
howardpc and Jurassic Pork,
you must start providing patches, preferably uploaded to a issue report, after you agree about what must be done.
I don't have opinions for this. I would happily give the maintenance of "Industrial" package to one of you.
What do you think if I move the package to Lazarus-CCR and ask for commit access for one of you?

The idea was to move it to Lazarus-CCR later when a new integrated package download / installation system (Aarre) works in Lazarus, but it could be moved already now.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #50 on: May 25, 2013, 12:42:03 pm »
Hello Juha,
i think that Howardpc has more experience that me with lazarus and svn.  il woud be a better "comitter".
For the patches, i have answered to the bug 24472 mantis with a patch. Can you tell me if the patch is in a good format ( i use tortoise svn)?
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #51 on: May 25, 2013, 01:38:24 pm »
i think that Howardpc has more experience that me with lazarus and svn.  il woud be a better "comitter".

That is an excuse. Commiting changes is as easy as creating a patch.
Anyway, what does Howardpc say? Do you want to be a maintainer?

Quote
For the patches, i have answered to the bug 24472 mantis with a patch. Can you tell me if the patch is in a good format ( i use tortoise svn)?

Yes it is OK.
Now that you asked it, the best patch would be made from the source root directory so that file paths are included, too.
Then I can apply it from the root  dir without worrying about paths.
 $ patch -p0 < ~/patch/AdvLed.pas.patch

With your patch I must first move to the right source directory and then apply.
 $ cd components/IndustrialStuff/source/
 $ patch -p0 < ~/patch/AdvLed.pas.patch

No big deal, but with some patches I don't know where the file is. I must first search it to get its path.
A patch made from the root directory is also more self-documenting. I see the paths in Kompare (diff viewer) and can use them for opening files in editor for example.

wp

  • Hero Member
  • *****
  • Posts: 5852
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #52 on: May 25, 2013, 03:27:49 pm »
How to change the colors of AdvLed? I think it is strange the states lsOff and lsDisabled are some kind of gray, and lsOn is red - I'd expect lsOn to be green, lsOff red and lsDisabled gray, and maybe other users have different preferences.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #53 on: May 25, 2013, 03:39:53 pm »
to change the color  -> change the kind :
lkRedLight, lkGreenLight,lkYellowLight
for the moment only the state lson change the color : the lsOff and lsDisabled display a dark led
you can use the kind lkcustom to put your state's pictures.
May be in the future , this will be improve.
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

howardpc

  • Hero Member
  • *****
  • Posts: 3043
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #54 on: May 25, 2013, 04:31:11 pm »
Quote
Anyway, what does Howardpc say? Do you want to be a maintainer?
No I would rather let Jurassic Pork take this on, though I am happy to help working on bugs or whatever might be needed, in collaboration with whoever becomes the maintainer. Like JP I have no experience with SVN except using Tortoise to copy/update a few open source repositories to make them local (though obviously it would be good to learn more).
My principal interest is in documentation of existing components and libraries (not in producing ever more components), and if I were to give significant chunks of time to Lazarus as a commitment, then documentation is the area I would be motivated to help with in terms of maintenance.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #55 on: May 26, 2013, 10:03:04 am »
FYI: Patch with description for the package at
http://bugs.freepascal.org/view.php?id=24479

Thanks for Avra for the abbreviations ;)

Also, I think one of the controls is called TStopLight. While that is very understandable to me (it's the Dutch term for traffic light) I wonder whether it is good/comprehensible English.
Wouldn't TTrafficLight be better? (I would hate something like TSemaphore - I'm always thinking of interprocess communication).

Your thoughts?
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

howardpc

  • Hero Member
  • *****
  • Posts: 3043
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #56 on: May 26, 2013, 01:17:06 pm »
FYI: Patch with description for the package at
http://bugs.freepascal.org/view.php?id=24479
Also, I think one of the controls is called TStopLight. While that is very understandable to me (it's the Dutch term for traffic light) I wonder whether it is good/comprehensible English.
Wouldn't TTrafficLight be better? (I would hate something like TSemaphore - I'm always thinking of interprocess communication).

TStopLight is eminently comprehensible English (albeit American rather than UK) and has the minor advantage that it is slightly shorter to write. American/British distinctions are increasingly blurred and unimportant in the internationalised web environment, and the LCL usually reflects American spellings where they differ from UK spellings, since it is VCL compatible, and of course the VCL came first and was 100% American. I agree that TSemaphore is a confusing misnomer.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #57 on: May 26, 2013, 01:57:17 pm »
@Howard: thanks for the explanation - seems like TStopLight is here to stay ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

derles

  • New member
  • *
  • Posts: 31
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #58 on: March 25, 2014, 12:48:49 pm »
Hello. Very good job. Thanks !

I wonder if this set of components available and ready for Lazarus.
After reading the entire post it is not clear to me if it is available and where to get it.

Thanks folks

Daniel
(sorry my english)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #59 on: March 25, 2014, 01:03:56 pm »
In Lazarus, go to Package/Install/Uninstall Packages..
then in the "Available for installation" list look for Industrial

If it's there, you can mark it for installation & rebuild Lazarus.

If not, easiest is probably to upgrade Lazarus. I don't know in which version these components appeared; have a look at the release notes for the various versions on the wiki for details, e.g.
http://wiki.lazarus.freepascal.org/Lazarus_1.2.0_release_notes
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified