'Switch between discrete/continuous/no_class mode'

def switchRanksMode(self, index):

    self.rankMode = index
    self.ranksViewStack.setCurrentIndex(index)
    if (index == 0):
        self.ranksView = self.discRanksView
        self.ranksModel = self.discRanksModel
        self.ranksProxyModel = self.discRanksProxyModel
        self.measures = self.discMeasures
        self.selected_checks = self.cls_default_selected
        self.reg_scoring_box.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
        self.cls_scoring_box.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
    elif (index == 1):
        self.ranksView = self.contRanksView
        self.ranksModel = self.contRanksModel
        self.ranksProxyModel = self.contRanksProxyModel
        self.measures = self.contMeasures
        self.selected_checks = self.reg_default_selected
        self.cls_scoring_box.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
        self.reg_scoring_box.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
    else:
        self.ranksView = self.noClassRanksView
        self.ranksModel = self.noClassRanksModel
        self.ranksProxyModel = self.noClassRanksProxyModel
        self.measures = []
        self.selected_checks = set()
        self.reg_scoring_box.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
        self.cls_scoring_box.setSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
    shape = ((len(self.measures) + len(self.learners)), 0)
    self.measure_scores = table(shape, None)
    self.update_scores = False
    for (check, score) in zip(self.score_checks, SCORES):
        check.setChecked((score.name in self.selected_checks))
    self.update_scores = True
    self.score_stack.setCurrentIndex(index)
    self.updateVisibleScoreColumns()
