コード例 #1
0
ファイル: gantt.py プロジェクト: plusxp/grant-diagram
    def __init__(self, parent):
        super().__init__(parent)

        self.ui = Ui_Gantt()
        self.ui.setupUi(self)

        fproject = Table.tables['tasks']['project_id']
        projects = app.session.get_fk_values(fproject) or ()
        ps = self.ui.projectSelect
        for key, value in projects:
            ps.addItem(value, key)
        ps.currentIndexChanged.connect(self.drawGantt)
        self.ps = ps
        ps.currentIndexChanged.emit(ps.currentIndex())
コード例 #2
0
ファイル: gantt.py プロジェクト: plusxp/grant-diagram
class GanttForm(QtGui.QWidget):
    def __init__(self, parent):
        super().__init__(parent)

        self.ui = Ui_Gantt()
        self.ui.setupUi(self)

        fproject = Table.tables['tasks']['project_id']
        projects = app.session.get_fk_values(fproject) or ()
        ps = self.ui.projectSelect
        for key, value in projects:
            ps.addItem(value, key)
        ps.currentIndexChanged.connect(self.drawGantt)
        self.ps = ps
        ps.currentIndexChanged.emit(ps.currentIndex())

    def updateTable(self):
        self.drawGantt(0)

    def drawGantt(self, index):
        gen = GanttGenerator(self.ps.itemData(index))
        self.ui.webView.setHtml(gen.dumpGantt())
コード例 #3
0
ファイル: gantt.py プロジェクト: B-Rich/grant-diagram
class GanttForm(QtGui.QWidget):
    def __init__(self, parent):
        super().__init__(parent)

        self.ui = Ui_Gantt()
        self.ui.setupUi(self)

        fproject = Table.tables['tasks']['project_id']
        projects = app.session.get_fk_values(fproject) or ()
        ps = self.ui.projectSelect
        for key, value in projects:
            ps.addItem(value, key)
        ps.currentIndexChanged.connect(self.drawGantt)
        self.ps = ps
        ps.currentIndexChanged.emit(ps.currentIndex())

    def updateTable(self):
        self.drawGantt(0)

    def drawGantt(self, index):
        gen = GanttGenerator(self.ps.itemData(index))
        self.ui.webView.setHtml(gen.dumpGantt())
コード例 #4
0
ファイル: gantt.py プロジェクト: B-Rich/grant-diagram
    def __init__(self, parent):
        super().__init__(parent)

        self.ui = Ui_Gantt()
        self.ui.setupUi(self)

        fproject = Table.tables['tasks']['project_id']
        projects = app.session.get_fk_values(fproject) or ()
        ps = self.ui.projectSelect
        for key, value in projects:
            ps.addItem(value, key)
        ps.currentIndexChanged.connect(self.drawGantt)
        self.ps = ps
        ps.currentIndexChanged.emit(ps.currentIndex())