示例#1
0
    def globebutton(self):
        if self.plot2D:
            self.plot2D = False
            self.btnglobe.setText('Map view')
            self.slyear.setMaximum(0)
            self.slyear.setMaximum(360)
            self.updFig()

        else:
            self.plot2D = True
            self.btnglobe.setText('Globe view')
            self.year = get_minyear(self.engine)
            self.slyear.setMaximum(get_maxyear(self.engine))
            self.slyear.setMinimum(self.year)
            self.updFig()
示例#2
0
    def globebutton(self):
        if self.plot2D:
            self.plot2D = False
            self.btnglobe.setText('Map view')
            self.slyear.setMaximum(0)
            self.slyear.setMaximum(360)
            self.updFig()

        else:
            self.plot2D = True
            self.btnglobe.setText('Globe view')
            self.year = get_minyear(self.engine)
            self.slyear.setMaximum(get_maxyear(self.engine))
            self.slyear.setMinimum(self.year)
            self.updFig()
示例#3
0
    def __init__(self, ):
        ######################### Get database info #########################
        self.engine = '' # engine variable stores database information
        self.wedit = db.DBInfo(self)
        self.wedit.exec_()
        self.plot2D = True
        self.Echeck = True
        self.Eplot = True
        self.Ccheck = True
        self.Cplot = True
        self.plotall = False
        
        super(Main, self).__init__()
        self.setupUi(self)
        
        # TODO: make queries for max year and min year
        self.year = get_minyear(self.engine)
        self.slyear.setMaximum(get_maxyear(self.engine))
        self.slyear.setMinimum(self.year)

        ######################### Initialize text for selected year #########################
        self.txtyear.setText(str(self.slyear.value()))

        ######################### Program events #########################
        self.slyear.valueChanged.connect(self.updTxt)
        self.slyear.sliderReleased.connect(self.updFig)
        self.txtyear.returnPressed.connect(self.updSl)
        self.actionDatabase_info.triggered.connect(self.edit)
        self.btnglobe.clicked.connect(self.globebutton)
        self.chkconflicts.stateChanged.connect(self.conflictCheck)
        self.chkeclipses.stateChanged.connect(self.eclipseCheck)
        self.actionGenerate_Globe.triggered.connect(self.globemovie)
        self.actionPlot_all.triggered.connect(self.plot_all_datapoints)

        fig = plotmap()
        self.addmpl(fig)

        self.chkconflicts.toggle()
        self.chkeclipses.toggle()
示例#4
0
    def __init__(self, ):
        ######################### Get database info #########################
        self.engine = ''  # engine variable stores database information
        self.wedit = db.DBInfo(self)
        self.wedit.exec_()
        self.plot2D = True
        self.Echeck = True
        self.Eplot = True
        self.Ccheck = True
        self.Cplot = True
        self.plotall = False

        super(Main, self).__init__()
        self.setupUi(self)

        # TODO: make queries for max year and min year
        self.year = get_minyear(self.engine)
        self.slyear.setMaximum(get_maxyear(self.engine))
        self.slyear.setMinimum(self.year)

        ######################### Initialize text for selected year #########################
        self.txtyear.setText(str(self.slyear.value()))

        ######################### Program events #########################
        self.slyear.valueChanged.connect(self.updTxt)
        self.slyear.sliderReleased.connect(self.updFig)
        self.txtyear.returnPressed.connect(self.updSl)
        self.actionDatabase_info.triggered.connect(self.edit)
        self.btnglobe.clicked.connect(self.globebutton)
        self.chkconflicts.stateChanged.connect(self.conflictCheck)
        self.chkeclipses.stateChanged.connect(self.eclipseCheck)
        self.actionGenerate_Globe.triggered.connect(self.globemovie)
        self.actionPlot_all.triggered.connect(self.plot_all_datapoints)

        fig = plotmap()
        self.addmpl(fig)

        self.chkconflicts.toggle()
        self.chkeclipses.toggle()