bugpyFormex - Bugs: bug #44093, fslider executes a function at...

 
 

bug #44093: fslider executes a function at value change, and at mouse button release?

Submitted by:  gianluca de santis <gianlucadesi>
Submitted on:  Mon 26 Jan 2015 02:01:23 PM UTC  
 
Category: GUISeverity: 1 - Wish
Item Group: Feature requestStatus: Fixed
Privacy: PublicAssigned to: Benedict Verhegghe <bverheg>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 26 Jan 2015 05:29:23 PM UTC, comment #4:

I suggest we leave this to the user to implement using standard Qt functionality. Adding options for all available events is very tedious and would harm the idea of a simplified interface.

Note that any InputItem can be found from the Dialog by simple indexing with the field name. Then you can have a look at the implementation of the InputItem to add/change its behavior.

In this case you would want to do something like this:

I think that the function will be passed the slider object as first (probably only) argument.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 26 Jan 2015 04:33:34 PM UTC, comment #3:

The 'tracking' helps, but I have a more specific need:

use a slider to translate and re-draw an object

I would like to be able to execute the function to preview the object every 0.4 seconds (easy with timer) and then execute another function when releasing the mouse button. This should be possible using the sliderReleased() which gives the signal when the mouse button is released:

https://www.vision.ee.ethz.ch/computing/sepp-irix/qt-3.0-mo/qslider.html#sliderReleased

. Would it be possible to add to the slider and fslider a second function called when button is released?

gianluca de santis <gianlucadesi>
Project Member
Mon 26 Jan 2015 02:48:46 PM UTC, comment #2:

In efd7165 a parameter 'tracking' is added to slider/fslider.
Setting it to False will make the user func only being called when releasing the slider.

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 26 Jan 2015 02:01:23 PM UTC, comment #1:

This item has been reassigned from the project pyFormex support tracker to your tracker.

The original report is still available at support #108735

Following are the information included in the original report:

[field #0] Item ID: 108735
[field #1] Group ID: 10866
[field #2] Open/Closed: Open
[field #3] Severity: 1 - Wish
[field #4] Privacy: Public
[field #9] Category: GUI
[field #10] Submitted by: gianlucadesi
[field #11] Assigned to: None
[field #12] Submitted on: Mon 26 Jan 2015 01:07:21 PM CET
[field #13] Summary: fslider executes a function at value change, and at mouse button release?
[field #14] Original Submission: The widget fslider gives the possibility to CALL a function whenever the user moves the slider. However, this can happend very quickly so the function could be called many many times within a short time (see plugins/cameratools.setNear()).

For some longer processes (e.g. use a slide to translate and re-draw an object) this can be problematic. It easy of course to add a timer to skip the call if a minimum period of time has not yet passed from previous call. But how can we be sure that the call is executed the last time, ie. when the mouse button is released? Maybe a second function should be added to fslider, to be called when the mouse button is release?
[field #16] Item Group: None
[field #17] Status: None
[field #18] Component Version: None
[field #19] Operating System: None
[field #20] Reproducibility: None
[field #21] Size (loc): None
[field #22] Fixed Release: None
[field #23] Planned Release: None
[field #24] Effort: 0.00
[field #28] Priority: 5 - Normal
[field #31] Percent Complete: 0%
[field #33] Release: None
[field #58] Custom Select Box #1: None
[field #59] Custom Select Box #2: None
[field #60] Custom Select Box #3: None
[field #61] Custom Select Box #4: None
[field #62] Custom Select Box #5: None
[field #63] Custom Select Box #6: None
[field #64] Custom Select Box #7: None
[field #65] Custom Select Box #8: None
[field #66] Custom Select Box #9: None
[field #67] Custom Select Box #10: None

Benedict Verhegghe <bverheg>
Project AdministratorIn charge of this item.
Mon 26 Jan 2015 02:01:23 PM UTC, original submission:

The widget fslider gives the possibility to CALL a function whenever the user moves the slider. However, this can happend very quickly so the function could be called many many times within a short time (see plugins/cameratools.setNear()).

For some longer processes (e.g. use a slide to translate and re-draw an object) this can be problematic. It easy of course to add a timer to skip the call if a minimum period of time has not yet passed from previous call. But how can we be sure that the call is executed the last time, ie. when the mouse button is released? Maybe a second function should be added to fslider, to be called when the mouse button is release?

gianluca de santis <gianlucadesi>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by gianlucadesi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Feb 2015 12:55:20 PM UTCbverhegOpen/ClosedOpen=>Closed
    Mon 26 Jan 2015 02:48:46 PM UTCbverhegCategoryNone=>GUI
      Item GroupNone=>Feature request
      StatusNone=>Fixed
      Assigned toNone=>bverheg
    Mon 26 Jan 2015 02:01:24 PM UTCbverhegReassign itempyFormex, sr #108735=>pyFormex, bug #44093

    Back to the top


    Powered by Savane 3.1-cleanup1