Beispiel #1
0
    def __init__(self, app):
        """ constructor """
        super(DialogProcessingOptions, self).__init__()
        self.ui = Ui_procOptionsDialog()
        self.ui.setupUi(self)
        self.setFixedSize(self.size())

        self.app = app

        # connect slot (ui event)
        self.ui.btn_ok.clicked.connect(self.accept)
        self.ui.btn_close.clicked.connect(self.reject)
Beispiel #2
0
class DialogProcessingOptions(Ui_procOptionsDialog, QDialog):
    """
    dialog specifying options for creating mapping scheme
    """
    def __init__(self, app):
        """ constructor """
        super(DialogProcessingOptions, self).__init__()
        self.ui = Ui_procOptionsDialog()
        self.ui.setupUi(self)
        self.setFixedSize(self.size())        
        
        self.app = app        
        
        # connect slot (ui event)
        self.ui.btn_ok.clicked.connect(self.accept)
        self.ui.btn_close.clicked.connect(self.reject)        

    def __dir__(self):
        return ['extrapolation']

    def resetOptions(self):
        self.extrapolation = ExtrapolateOptions.Fraction

    @property
    def extrapolation(self):
        if self.ui.radio_random.isChecked():
            return ExtrapolateOptions.RandomWalk
        elif self.ui.radio_actual.isChecked():
            return ExtrapolateOptions.Fraction
        elif self.ui.radio_actual_rounded.isChecked():
            return ExtrapolateOptions.FractionRounded
        else:
            # default case
            return ExtrapolateOptions.Fraction
    
    @extrapolation.setter
    def extrapolation(self, value):
        if value == ExtrapolateOptions.RandomWalk:
            self.ui.radio_random.setChecked(True)
        elif value == ExtrapolateOptions.Fraction:
            self.ui.radio_actual.setChecked(True)
        elif value == ExtrapolateOptions.FractionRounded:
            self.ui.radio_actual_rounded.setChecked(True)
        else:
            # default case
            self.ui.radio_actual.setChecked(True)
Beispiel #3
0
class DialogProcessingOptions(Ui_procOptionsDialog, QDialog):
    """
    dialog specifying options for creating mapping scheme
    """
    def __init__(self, app):
        """ constructor """
        super(DialogProcessingOptions, self).__init__()
        self.ui = Ui_procOptionsDialog()
        self.ui.setupUi(self)
        self.setFixedSize(self.size())

        self.app = app

        # connect slot (ui event)
        self.ui.btn_ok.clicked.connect(self.accept)
        self.ui.btn_close.clicked.connect(self.reject)

    def __dir__(self):
        return ['extrapolation']

    def resetOptions(self):
        self.extrapolation = ExtrapolateOptions.Fraction

    @property
    def extrapolation(self):
        if self.ui.radio_random.isChecked():
            return ExtrapolateOptions.RandomWalk
        elif self.ui.radio_actual.isChecked():
            return ExtrapolateOptions.Fraction
        elif self.ui.radio_actual_rounded.isChecked():
            return ExtrapolateOptions.FractionRounded
        else:
            # default case
            return ExtrapolateOptions.Fraction

    @extrapolation.setter
    def extrapolation(self, value):
        if value == ExtrapolateOptions.RandomWalk:
            self.ui.radio_random.setChecked(True)
        elif value == ExtrapolateOptions.Fraction:
            self.ui.radio_actual.setChecked(True)
        elif value == ExtrapolateOptions.FractionRounded:
            self.ui.radio_actual_rounded.setChecked(True)
        else:
            # default case
            self.ui.radio_actual.setChecked(True)
Beispiel #4
0
 def __init__(self, app):
     """ constructor """
     super(DialogProcessingOptions, self).__init__()
     self.ui = Ui_procOptionsDialog()
     self.ui.setupUi(self)
     self.setFixedSize(self.size())        
     
     self.app = app        
     
     # connect slot (ui event)
     self.ui.btn_ok.clicked.connect(self.accept)
     self.ui.btn_close.clicked.connect(self.reject)