Пример #1
0
class ScatterPlotWizard(QtGui.QWizard):
    def __init__(self, model, old_scatterplot_params={}, prev_scatterplot_data=None, parent=None):
        super(ScatterPlotWizard, self).__init__(parent)
        
        self.model=model
        self.setWindowTitle("Scatterplot Wizard")
        self.setWizardStyle(QWizard.ClassicStyle)

        self.data_select_page = ScatterplotDataSelectPage(model=model, prev_scatterplot_data=prev_scatterplot_data)
        self.scatterplot_page = ScatterPlotPage(old_scatterplot_params=old_scatterplot_params)
        self.setPage(Page_ScatterplotDataSelectPage, self.data_select_page)
        self.setPage(Page_ScatterplotParams, self.scatterplot_page)
        
    def nextId(self):
        if self.currentId()==Page_ScatterplotDataSelectPage:
            return Page_ScatterplotParams
        elif self.currentId() == Page_ScatterplotParams:
            return -1
        
    def get_selected_vars(self):
        return self.data_select_page.get_selected_vars()

    def get_scatterplot_params(self):
        return self.scatterplot_page.get_parameters()
    
    def get_annotate_plot_with_study_labels(self):
        return self.scatterplot_page.get_annotate_plot_with_study_labels()
 def __init__(self, form_type, params, parent=None):
     super(EditDataExplorationPlotForm, self).__init__(parent)
     
     self.form_type = form_type
     
     if form_type == "histogram":
         self.page = HistogramPage(old_histogram_params=params)
     elif form_type == "scatterplot":
         self.page = ScatterPlotPage(old_scatterplot_params=params)
     else:
         raise Exception("Unrecognized page type")
     self.page.initializePage()
     ####self.funnelpage = FunnelPage(old_funnel_params=funnel_params)
     self.buttonbox = QDialogButtonBox(QDialogButtonBox.Ok|QDialogButtonBox.Cancel)
     
     
     self.buttonbox.accepted.connect(self.accept)
     self.buttonbox.rejected.connect(self.reject)
     
     self.ok_button= self.buttonbox.button(QDialogButtonBox.Ok)
     self.page.completeChanged.connect(self.setenable_OK)
     
     vlayout = QVBoxLayout()
     vlayout.addWidget(self.page)
     vlayout.addWidget(self.buttonbox)
     self.setLayout(vlayout)
     self.adjustSize()
Пример #3
0
    def __init__(self, model, old_scatterplot_params={}, prev_scatterplot_data=None, parent=None):
        super(ScatterPlotWizard, self).__init__(parent)
        
        self.model=model
        self.setWindowTitle("Scatterplot Wizard")
        self.setWizardStyle(QWizard.ClassicStyle)

        self.data_select_page = ScatterplotDataSelectPage(model=model, prev_scatterplot_data=prev_scatterplot_data)
        self.scatterplot_page = ScatterPlotPage(old_scatterplot_params=old_scatterplot_params)
        self.setPage(Page_ScatterplotDataSelectPage, self.data_select_page)
        self.setPage(Page_ScatterplotParams, self.scatterplot_page)