My plugin gui is attached below which has two functions one is selecting state, cities from the combo box and distance to be entered in the lineedit and the other is if we click a pushbutton it will automatically allows user to select features from mapcanvas and provided the distance is entered in lineedit, it will find buffer for all the selected features. But Run button is common for both the functions. I want my code to do one function when run button is clicked. To be more detail, the 1st part has 3 functions 1.add state names 2.find city names 3.calc buffer
And 2nd part, Select area from map has 1 function 1.Bufferarea
Now i want my run button to perform one part when clicked depends on the user selection. FOr example, if the user clicks select area from map (2nd part) it should call bufferarea function and should give result and it should not check the functions under first part and throws error. How this can be done in my py file and what changes should be done in the codes?
It would be more clear if you can see my image.