Beispiel #1
0
 def load_tabs(self):
     if self.template != None:
         tabIndex = 0
         for tab in self.template.iter("tab"):
             widget = Tab(self, tabIndex, tab)
             tabIndex += 1
             self.tabs.addTab(widget, tab.find("title").text)
Beispiel #2
0
    def __init__(self, parent):
        super(QWidget, self).__init__(parent)

        self.parent = parent

        mainLayout = QHBoxLayout()
        layout_v = QVBoxLayout()

        #--- figure
        figure = MyMplCanvas(parent=self, width=6, height=6, isAxis=False)

        #---control panel
        control = Tab(self)

        #--- log
        log = QTextEdit()
        log.setReadOnly(True)

        # setup layout
        layout_v.addWidget(control)
        layout_v.addWidget(log)

        mainLayout.addLayout(layout_v, stretch=3)
        mainLayout.addWidget(figure,stretch=5)

        self.setLayout(mainLayout)

        #-- set self
        self.setSelf(figure=figure,log=log)
        self.showTextInLog("Software initialized.")
Beispiel #3
0
    def __init__(self):
        super(TabWindow, self).__init__()
        self.tabs_names = ['Methods', 'Local errors', 'Approximation Errors']
        self.tabs = {str: Tab}
        self.tabs = {
            k: v
            for k, v in zip(self.tabs_names, (
                Tab(self) for i in range(len(self.tabs_names))))
        }

        self.insert_tabs()