Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pyforms
#1
Hey guys!

With Pyforms I'm trying to make the following

First row: 2 sliders that can have values from 0-10
Second row: 2 graphs that react to the values put in in the sliders, for example y=e^x and y=x^x
Last row: Another 2 graphs

I have been trying to make this for a while and don't know if pyforms is the best option. I can't find how to connect these values I get from the sliders and how to make these graphs in pyforms. If someone could help me that would be great.

this is my code so far:

 
from pyforms.basewidget import BaseWidget
from pyforms.controls   import ControlFile
from pyforms.controls   import ControlText
from pyforms.controls   import ControlSlider
from pyforms.controls   import ControlPlayer
from pyforms.controls   import ControlButton

class ComputerVisionAlgorithm(BaseWidget):

    def __init__(self, *args, **kwargs):
        super().__init__('Computer vision algorithm example')

        #Definition of the forms fields
        
        self._slider1   = ControlSlider('some t', default=100, minimum=0, maximum=200)
        self._slider2   = ControlSlider('some x ', default=100, minimum=0, maximum=200)
        #Here I want to have 4 graphs in a 2 by 2 forms
#       self.graph1     =
#       self.graph2     =
#       self.FTrasnfor1 = 
#       self.FTransfor2 =
        
        
        #Define the organization of the Form Controls
        self._formset = [
            ('_slider1',
            '_slider2')
        ]
        
    def __process_frame(self, frame):
        """
        Do some processing to the frame and return the result frame
        """
        return frame

    def run_event(self):
        """
        After setting the best parameters run the full algorithm
        """
        print("The function was executed", self._videofile.value)


if __name__ == '__main__':

    from pyforms import start_app
    start_app(ComputerVisionAlgorithm)
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020