Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
mrjt is currently offline  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.


Smile 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 712 times)

[Updated on: Tue, 25 March 2008 12:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DocEdit call RemoveLines make Assertion failed.
Next Topic: editing selection in doc edit
Goto Forum:
  


Current Time: Wed Apr 24 14:30:05 CEST 2024

Total time taken to generate the page: 0.01727 seconds