Recent

Author Topic: uEControls  (Read 37529 times)

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: uEControls
« Reply #15 on: February 13, 2014, 02:52:21 pm »
Thanks, I added the file from the SVN and now everything is fine.
I added some functionality that I needed:
1. Property LTicksAuto- forces the number of the large ticks (LTicks property) to be equal to the difference between min and max. Of course, using it makes sense only with integer values. While doing this, I came across a bug- If LTicks is set to 1 (for example), the actual number of ticks is 2. I did not fix it, in case it is done on purpose.
2. Properties UseValueList and ValueList- Instead of Arabic numbers, elements from a comma delimited values are used. For example, when ValueList:='a,b,c,d,e' then the scale labels are a, b,c....  If the number of the element is smaller than the number of LTicks, the remaining values will be added with arabic numbers. An example is attached.
The updated source is attached in the 7zip.
I still lack some functionality- I would like to have thicker LTicks.
The other one is that, as seen on the attached image, the „clock“ is somehow reverted- the I should be at 30 degrees, but it is at 210. MinAngle and MaxAngle did not help.

Opps, I just found out that the Selector does exactly what I've done ;)
Edit: Nope, the selector is not proper for an indicator, or at least for a one, that changes values smoothly.
« Last Edit: February 13, 2014, 03:11:09 pm by paskal »
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #16 on: February 14, 2014, 12:27:12 am »
Thank you, I fix the zip.


I cannot install the LPK. I get
Quote
C:\lazarus\extra\uecontrols\uemultiturn.pas(548,4) Fatal: Can't open include file "ueMultiTurn_icon.lrs"
 

I could not find ueMultiTurn_icon.lrs anywhere.
Help?!

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #17 on: February 14, 2014, 01:27:45 am »
You can change the background to an image and make the control transparent, also you can use the event onpaint to make some changes.

I upload a zip file with an example:

[image]https://sourceforge.net/p/uecomponents/screenshot/TestKnob_v0.3.png[/image]
https://downloads.sourceforge.net/project/uecomponents/TestKnob_v0.3.zip

Do you want to make a clock?

Maybe the uERotImage can make more for you.

Regards.


Thanks, I added the file from the SVN and now everything is fine.
I added some functionality that I needed:
1. Property LTicksAuto- forces the number of the large ticks (LTicks property) to be equal to the difference between min and max. Of course, using it makes sense only with integer values. While doing this, I came across a bug- If LTicks is set to 1 (for example), the actual number of ticks is 2. I did not fix it, in case it is done on purpose.
2. Properties UseValueList and ValueList- Instead of Arabic numbers, elements from a comma delimited values are used. For example, when ValueList:='a,b,c,d,e' then the scale labels are a, b,c....  If the number of the element is smaller than the number of LTicks, the remaining values will be added with arabic numbers. An example is attached.
The updated source is attached in the 7zip.
I still lack some functionality- I would like to have thicker LTicks.
The other one is that, as seen on the attached image, the „clock“ is somehow reverted- the I should be at 30 degrees, but it is at 210. MinAngle and MaxAngle did not help.

Opps, I just found out that the Selector does exactly what I've done ;)
Edit: Nope, the selector is not proper for an indicator, or at least for a one, that changes values smoothly.

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: uEControls
« Reply #18 on: February 14, 2014, 01:01:07 pm »
I did not intend to make a clock, but I gave it as an example. Then I found that I cannot make one.
I changed TuEAngle = 0..3600; to TuEAngle = 1..7200; and I set MinAngle:=2100 and MaxAngle=5400; and everything went fine. I am not saying that the final solution is so simple.
BTW, you had a mistake-  TuEAngle = 0..3600; should be eitherTuEAngle = 1..3600; or  TuEAngle = 0..3599;
This control is a good start, but it still lacks some functionality. Since I need it, I will have to make some improvements. We could do it together or I could fork it. What's you opinion about that?
I suppose you have made some changes since yesterday, because the example that you have attached does not run.
Also, SourceForge says that you code is under LGPL, but inside it it is written Mozilla Public License Version 1.1.

Edit: It occurs that that angle thing is not working, there are some problems with rotation. I fixed it
Code: [Select]
function TCustomuEKnob.AngleToPos(AnAngle: TuEAngle): Real;
// Convert angle AnAngle to a position.
begin
  if FMinAngle<= AnAngle then
    Result:= FMin + ((FMax - FMin) * (AnAngle - FMinAngle)/(FMaxAngle - FMinAngle))
  else
    Result:= FMin + FMax - abs((FMax - FMin) * (AnAngle - FMinAngle)/(FMaxAngle - FMinAngle));  //New line, tha ABS seems quite useless, though
end;
All the updates are in the attached file.
« Last Edit: February 14, 2014, 02:44:36 pm by paskal »
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #19 on: February 14, 2014, 03:51:25 pm »
You can use uEMultiturn to unlock the angle restrictions. I made the example in Typhon, maybe is necessary to change some dependencies to compile it in lazarus. The controls are pre alfa, maybe the final license could be Mozilla. Im evaluating that.

Regards.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #20 on: February 14, 2014, 06:42:56 pm »
I re-upload the sample project. It load and compile in Lazarus 1.0.8 with the last ueConrtrols 5.13 versión. Note also that there is a zip file with a fix 5.13 versión with the file missing last time.

Regards.

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: uEControls
« Reply #21 on: February 15, 2014, 06:07:57 pm »
...Since I need it, I will have to make some improvements. We could do it together or I could fork it. What's you opinion about that?
I made no comment on that, so I suppose it means that I should fork.
 
You can use uEMultiturn to unlock the angle restrictions.
I the file that I have attached in my previous post the angle issue is solved. IMHO, instead of MinAngle and MaxAngle, there should be MinAngle and RangeAngle (whatever it is called). Respectively MaxAngle= RangeAngle-MinAngle. MaxAngle could exist as a variable, but not as a published property.
I also tried to add a LTicksWidth property. It does not look very nice, because:
  1. Lines become rounded, instead of strictly rectangular.
  2. Lines overlap the text.


Otherwise it compiles and installs just fine.
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #22 on: February 15, 2014, 07:24:33 pm »
...Since I need it, I will have to make some improvements. We could do it together or I could fork it. What's you opinion about that?
I made no comment on that, so I suppose it means that I should fork.

Thank you, but we want to have the functionality as it is for now. Of course you can take our code and make the changes that you need for your particular application just as any other lazarus component here.

Regards.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #23 on: February 17, 2014, 10:44:21 am »
New demo for the uEKnob control. Only work with the 5.14 version:

http://sourceforge.net/projects/uecomponents/files/TestKnob_v0.4.zip/download

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: uEControls
« Reply #24 on: March 20, 2014, 08:04:40 am »
Here is another bug in ueKnob on line startting with  LBitmap.TextOut(... in procedure TCustomuEKnob.DrawScales(LBitmap:TBGRABitmap);  causing Ltick labels to overlap the ticks.
I fixed it the following way:
Code: [Select]
if x2< xc then LabelX:= trunc(x2-5) else LabelX:= trunc(x2+5);
      if y2< yc then LabelY:= trunc(y2-ts.cy/2-5) else LabelY:= trunc(y2-ts.cy/2+5);
      LBitmap.TextOut(LabelX, LabelY, la, vc, taCenter);
I used +5 and -5, which is maybe too much and 3 might be sufficient.Edit: 3 is not enough.
« Last Edit: March 20, 2014, 02:00:53 pm by paskal »
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #25 on: May 23, 2015, 09:02:52 am »
New version of uEControls have been released

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #26 on: May 23, 2015, 09:10:55 am »

I have a question, this can be added in BGRAControls?

Sorry, but this set is going to grow with more components for instrumentation applications. we use that for our own developments then is more easy to us if ueControls is a separate set of controls.

Microelectronics Group
http://ue.accesus.com

BGRAControls conflicts with the installation of new releases. Please remove the uEControls from it.
« Last Edit: May 26, 2015, 03:39:32 am by mrisco »

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: uEControls
« Reply #27 on: June 02, 2015, 10:36:37 pm »
I would like to see a list of the changes if such exists.
Are there any changes in the older components?
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #28 on: June 03, 2015, 12:16:20 am »
I would like to see a list of the changes if such exists.
Are there any changes in the older components?

You can go to: http://ue.accesus.com/uecontrols
for older controls some improvements in rendering, all controls now descending from uebase.

M.A.R.C.

  • Jr. Member
  • **
  • Posts: 68
Re: uEControls
« Reply #29 on: October 21, 2015, 07:45:24 am »
I was read about copyrights problems with codetyphon, but also I was read that codetyphon's developers do not erase the author copyright notices from the original source of the control. But It is not totally true in the case of ueControls. The "about" property was removed with no justification.

I'm requesting to the codetyphon team to remove the uecontrols from their controls library.

 

TinyPortal © 2005-2018