def __init__(self, cluster, hosts=None, parent = None):
     super().__init__(parent)
     loadUi("HWWizard.ui", self)
     self._cluster = cluster
     if hosts is None:
         self.hosts = {}
     else:
         self.hosts = HostSelectionPage.group_hosts(hosts)
     # Default answeres:
     self.template_props = {}
     self.template_hw_prop_set_name = ""
     self.remaining_props = "setPerHost"
     # Create pages
     for i in range(len(HWWizard.PAGES_REV)):
         page = eval("{0}()".format(HWWizard.PAGES_REV[i]))
         self.setPage(i, page)
    def __init__(self, parent, uifilepath):
        QDialog.__init__(self, parent)

        # load ui file
        self.ui = loadUi(uifilepath, self)

        # this is for PySide only
        # create a layout, add the loaded ui
        # this is to make sure the widget doesn't
        # get garbaged collected
        self.centralLayout = QGridLayout(self)
        self.centralLayout.setContentsMargins(9, 9, 9, 9)
        self.centralLayout.addWidget(self.ui)

        # since PySide doesn't load the ui like PyQt
        # lets get some properties from the ui file that are still relevant...
        # the size of the dialog set in QtDesigner
        self.resize(self.ui.size())
        # the window title set in QtDesigner
        self.setWindowTitle(self.ui.windowTitle())

        # connect to the createCube function
        self.ui.uiCreateCube.clicked.connect(self.createCube)
Esempio n. 3
0
    def __init__( self, parent, uifilepath ):
        QDialog.__init__( self, parent )
        
        # load ui file
        self.ui = loadUi( uifilepath, self )

        # this is for PySide only
        # create a layout, add the loaded ui
        # this is to make sure the widget doesn't
        # get garbaged collected
        self.centralLayout = QGridLayout( self )
        self.centralLayout.setContentsMargins( 9, 9, 9, 9 )
        self.centralLayout.addWidget( self.ui )

        # since PySide doesn't load the ui like PyQt
        # lets get some properties from the ui file that are still relevant...
        # the size of the dialog set in QtDesigner
        self.resize( self.ui.size() )
        # the window title set in QtDesigner
        self.setWindowTitle( self.ui.windowTitle() )
        
        # connect to the createCube function
        self.ui.uiCreateCube.clicked.connect( self.createCube )
 def __init__(self, parent = None):
     super().__init__(parent)
     loadUi("PerHostHWPropSetPage.ui", self)
 def __init__(self, parent = None):
     print("ResolveMultipleGroupsPage.__init__()")
     super().__init__(parent)
     loadUi("ResolveMultipleGroupsPage.ui", self, {"HWPropsTableWidget": HWPropsTableWidget})
Esempio n. 6
0
 def __init__(self, parent=None):
     QWidget.__init__(self, parent)
     ui = loadUi('form.ui', self)
     children = ui.children()
     for child in children:
         child.setParent(self)
Esempio n. 7
0
 def __init__(self, parent=None):
     super().__init__(parent)
     loadUi("MainWindow.ui", self)
     self.hosts = {
         1: Host("beo-01", {"# CPU cores": "1",
                            "# CPU sockets": "1",
                            "Size of RAM (GB)": "1",
                            "IB Adapter": "True",
                            "IPMI Adapter": "False"}),
         2: Host("beo-02", {"# CPU cores": "1",
                            "# CPU sockets": "1",
                            "Size of RAM (GB)": "1",
                            "IB Adapter": "True",
                            "IPMI Adapter": "False"}),
         3: Host("beo-03", {"# CPU cores": "1",
                            "# CPU sockets": "1",
                            "Size of RAM (GB)": "1",
                            "IB Adapter": "True",
                            "IPMI Adapter": "False"}),
         4: Host("beo-04", {"# CPU cores": "1",
                            "# CPU sockets": "1",
                            "Size of RAM (GB)": "2",
                            "IB Adapter": "True",
                            "IPMI Adapter": "False"}),
         5: Host("beo-05", {"# CPU cores": "1",
                            "# CPU sockets": "1",
                            "Size of RAM (GB)": "2",
                            "IB Adapter": "True",
                            "IPMI Adapter": "False"}),
     }
     self.hw_prop_set_names = {
         1: Name("Existing"),
         2: Name("Similar"),
         3: Name("Bad"),
     }
     self.hw_prop_names = {
         1: Name("# CPU cores"),
         2: Name("# CPU sockets"),
         3: Name("Size of RAM (GB)"),
         4: Name("IB Adapter"),
         5: Name("IPMI Adapter"),
         6: Name("Other"),
     }
     self.hw_props = {
         1: Prop(1, "1"),
         2: Prop(2, "1"),
         3: Prop(3, "1"),
         4: Prop(4, "True"),
         5: Prop(5, "False"),
         6: Prop(6, "something"),
         7: Prop(1, "2"),
     }
     self.hw_prop_sets = {
         1: PropSet(1, 1),
         2: PropSet(1, 2),
         3: PropSet(1, 3),
         4: PropSet(1, 4),
         5: PropSet(1, 5),
         6: PropSet(2, 1),
         7: PropSet(2, 2),
         8: PropSet(2, 3),
         9: PropSet(2, 4),
         10: PropSet(2, 5),
         11: PropSet(2, 6),
         12: PropSet(3, 7),
         13: PropSet(3, 2),
         14: PropSet(3, 3),
         15: PropSet(3, 4),
         16: PropSet(3, 5),
     }
 def __init__(self, parent = None):
     super().__init__(parent)
     loadUi("HostSelectionPage.ui", self)