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 » Slider&ProgressIndicator » ProgressIndicater: Get / SetData missing?
ProgressIndicater: Get / SetData missing? [message #28864] Mon, 20 September 2010 16:08 Go to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi all

ProgressIndicater (like some other controls) appear to have the default GetData / SetData interface beeing missing.. is this by design? it would ease things on common handling in a Ctrl based factory lot.. by not needing to sace extra info, just invoke GetDa
ta/SetData known interface..

just add
Progress.h:27
	int   Get() const                           { return actual; }

	void   SetData(const Value& v)              { Set(v); }
	Value  GetData() const                      { return Get(); }

[Updated on: Mon, 20 September 2010 16:10]

Report message to a moderator

Re: ProgressIndicater: Get / SetData missing? [message #29334 is a reply to message #28864] Fri, 15 October 2010 14:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Mon, 20 September 2010 10:08

hi all

ProgressIndicater (like some other controls) appear to have the default GetData / SetData interface beeing missing.. is this by design? it would ease things on common handling in a Ctrl based factory lot.. by not needing to sace extra info, just invoke GetDa
ta/SetData known interface..

just add
Progress.h:27
	int   Get() const                           { return actual; }

	void   SetData(const Value& v)              { Set(v); }
	Value  GetData() const                      { return Get(); }



Not quite sure it is completely right:

ProgressIndicator is kind of static value - user cannot change it. So far the policy was that only widgets that are editable have Value.

The reason is that if you want to store all user supplied values in the dialog, you can simply go through all widgets and store the value if it is not Value::Void - that indicates that the widget does not have associated value.


Re: ProgressIndicater: Get / SetData missing? [message #29335 is a reply to message #29334] Fri, 15 October 2010 14:58 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
ah...ok that makes soome sense..

this 'policy' is one of the things to be mentioned in CtrlDesignConcepts Smile

thank you

PS: if you think of ProgressIndicater as beeing sort of a slider a user later could change, this might involve extension of ProgressIndicater ofcorse, but is quite helpfull. Sliders dont look too cool sometimes Smile (CMeter in bazaar was an attempt to overcome these shortcomings)
Previous Topic: Slider Vert - from bottom (min) to top (max)
Next Topic: Slider with thermometer like scale
Goto Forum:
  


Current Time: Thu Mar 28 10:46:06 CET 2024

Total time taken to generate the page: 0.00866 seconds