First, add a NoScan class.
Before, the builder GUI only supported RangeScan. When NoScan class is added, feature for selecting the type of scan we want is needed. So this feature will also be added.
Since Scan classes share common method and some variables, it seems that base class for all Scan classes is needed.
How the feature is implemented
NoScan has two important parameters, value and repetitions. Use QDoubleSpinBox for control value, and QSpinBox for repetitions. It has similar structure with RangeScan class.
Since we added NoScan class, ScanEntry class should be updated. Use QStackedWidget to store each scan type entry. And Use QRadioButton to make selection button gui. All radio buttons are added at QHBoxLayout. If one of button is checked by user, method scanTypeToggled is called and update current widget at ScanEntry. Original iquip code used QButtonGroup, but as I checked there was no reason to use it.
Add BaseScan class that is the base class for Scan classes. Since all Scan classes use applyProperties method to initialize there widget, BaseScan class can have that method.
Feature you want to implement
First, add a NoScan class. Before, the builder GUI only supported RangeScan. When NoScan class is added, feature for selecting the type of scan we want is needed. So this feature will also be added. Since Scan classes share common method and some variables, it seems that base class for all Scan classes is needed.
How the feature is implemented
value
andrepetitions
. UseQDoubleSpinBox
for controlvalue
, andQSpinBox
forrepetitions
. It has similar structure withRangeScan
class.QStackedWidget
to store each scan type entry. And UseQRadioButton
to make selection button gui. All radio buttons are added atQHBoxLayout
. If one of button is checked by user, methodscanTypeToggled
is called and update current widget at ScanEntry. Original iquip code usedQButtonGroup
, but as I checked there was no reason to use it.applyProperties
method to initialize there widget, BaseScan class can have that method.