Exemplo n.º 1
0
class TacoTabWidget(qt.qwidget()):
    name = ""
    short_name = ""

    def __init__(self, parent):
        qt.qwidget().__init__(self)
        qt.qtablewidget()()
        self.parent = parent
        self.initVars()
        self.initLayout()

    """
    Responsible for initializing any class specific variables, allowed to do nothing
    """
    def initVars(self):
        pass

    """
    Initializes the per-widget tab layout
    """
    def initLayout(self):
        raise Exception("Widgets must override this")

    """
    Initialize the tab itself

    @return Tuple that contains QWidget consisting of tab layout + data and name of tab
    """
    def getTacoTab(self):
        raise Exception("Widgets must override this")


    """
    Responsible for loading data into the TacoTab
    """
    def load(self):
        raise Exception("Widgets must override this")
Exemplo n.º 2
0
 def getTacoTab(self):
     taco_tab = qt.qwidget()()
     layout = qt.qvboxlayout()()
     layout.addWidget(self)
     taco_tab.setLayout(layout)
     return taco_tab, self.name
Exemplo n.º 3
0
 def __init__(self, parent):
     qt.qwidget().__init__(self)
     qt.qtablewidget()()
     self.parent = parent
     self.initVars()
     self.initLayout()