Home » U++ Library support » LineEdit, EditFields, DocEdit » Enter time as duration
|
|
|
|
|
Re: Enter time as duration [message #15005 is a reply to message #14892] |
Tue, 25 March 2008 12:05 |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
You shouldn't need to modify UppSrc, all you need is:
- A Duration class with operators to/from int, operators >, < etc. (just convert to int and compare)
- A custom Convert class/Edit ctrl
Since most of this is copying from existing code it really isn't much work, see attached. ToInt/FromInt could probably be improved, and you may wish to add Null support.
jlfranks |
Not as simple as just a new typedef as stated earlier:
typedef EditMinMax<Time, ConvertDuration> EditDur;
More is involved.
|
I did say that you had to define a new Convert class, which is where all the work is done. It's possible, but perhaps not the best solution.
-
Attachment: Duration.h
(Size: 3.52KB, Downloaded 713 times)
[Updated on: Tue, 25 March 2008 12:50] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 04 10:37:58 CEST 2024
Total time taken to generate the page: 0.02234 seconds
|