Ejemplo n.º 1
0
 def __init__(self, Title, mechanism_data=[], parent=None):
     super(ChartDialog, self).__init__(parent)
     self.setWindowTitle("Chart")
     self.setWindowFlags(self.windowFlags() | Qt.WindowMaximizeButtonHint)
     self.setSizeGripEnabled(True)
     self.setModal(True)
     self.setMinimumSize(QSize(800, 600))
     self.Title = Title
     self.mechanism_data = mechanism_data
     #Widgets
     main_layout = QVBoxLayout(self)
     main_layout.setContentsMargins(6, 6, 6, 6)
     self.tabWidget = QTabWidget(self)
     self.setChart("Fitness / Generation Chart", 0, 1)
     self.setChart("Generation / Time Chart", 2, 0)
     self.setChart("Fitness / Time Chart", 2, 1)
     main_layout.addWidget(self.tabWidget)
Ejemplo n.º 2
0
 def __init__(self, parent=None):
     super(Collections, self).__init__(parent)
     layout = QVBoxLayout(self)
     tabWidget = QTabWidget(self)
     layout.addWidget(tabWidget)
     self.setWindowIcon(QIcon(QPixmap(":/icons/collections.png")))
     self.CollectionsStructure = CollectionsStructure(parent)
     self.CollectionsTriangularIteration = CollectionsTriangularIteration(
         parent)
     self.CollectionsTriangularIteration.addToCollection = self.CollectionsStructure.addCollection
     tabWidget.addTab(self.CollectionsStructure,
                      self.CollectionsStructure.windowIcon(), "Structure")
     tabWidget.addTab(self.CollectionsTriangularIteration,
                      self.CollectionsTriangularIteration.windowIcon(),
                      "Triangular iteration")
     self.CollectionsStructure.triangle_button.clicked.connect(
         lambda: tabWidget.setCurrentIndex(1))
     self.CollectionsStructure.layout_sender.connect(
         self.CollectionsTriangularIteration.setGraph)
Ejemplo n.º 3
0
 def __init__(self, parent: QWidget):
     """Create two widget page and using main window to make their parent."""
     super(Collections, self).__init__(parent)
     layout = QVBoxLayout(self)
     tab_widget = QTabWidget(self)
     layout.addWidget(tab_widget)
     self.setWindowIcon(QIcon(QPixmap(":/icons/collections.png")))
     self.StructureWidget = StructureWidget(parent)
     self.TriangularIterationWidget = TriangularIterationWidget(
         self.StructureWidget.addCollection, parent)
     tab_widget.addTab(self.StructureWidget,
                       self.StructureWidget.windowIcon(), "Structures")
     tab_widget.addTab(self.TriangularIterationWidget,
                       self.TriangularIterationWidget.windowIcon(),
                       "Triangular iteration")
     self.StructureWidget.triangle_button.clicked.connect(
         lambda: tab_widget.setCurrentIndex(1))
     self.StructureWidget.layout_sender.connect(
         self.TriangularIterationWidget.setGraph)
Ejemplo n.º 4
0
    def __init__(self, title, algorithm_data, parent: QWidget):
        """Add three tabs of chart."""
        super(ChartDialog, self).__init__(parent)
        self.setWindowTitle("Chart")
        self.setWindowFlags(self.windowFlags() | Qt.WindowMaximizeButtonHint)
        self.setSizeGripEnabled(True)
        self.setModal(True)
        self.setMinimumSize(QSize(800, 600))

        self.__title = title
        self.__algorithm_data = algorithm_data

        # Widgets
        main_layout = QVBoxLayout(self)
        main_layout.setContentsMargins(6, 6, 6, 6)
        self.tabWidget = QTabWidget(self)
        self.__set_chart("Fitness / Generation Chart", 0, 1)
        self.__set_chart("Generation / Time Chart", 2, 0)
        self.__set_chart("Fitness / Time Chart", 2, 1)
        main_layout.addWidget(self.tabWidget)
Ejemplo n.º 5
0
 def __init__(self, parent: MainWindowBase):
     """Create two widget page and using main window to make their parent."""
     super(Collections, self).__init__(parent)
     layout = QVBoxLayout(self)
     self.tab_widget = QTabWidget(self)
     layout.addWidget(self.tab_widget)
     self.setWindowIcon(QIcon(QPixmap(":/icons/collections.png")))
     self.structure_widget = StructureWidget(parent)
     self.configure_widget = ConfigureWidget(
         self.structure_widget.add_collection, parent)
     self.tab_widget.addTab(self.structure_widget,
                            self.structure_widget.windowIcon(),
                            "Structures")
     self.tab_widget.addTab(self.configure_widget,
                            self.configure_widget.windowIcon(),
                            "Configuration")
     self.structure_widget.configure_button.clicked.connect(
         lambda: self.tab_widget.setCurrentIndex(1))
     self.structure_widget.layout_sender.connect(
         self.configure_widget.set_graph)