def __init__(self, host, port): """ Constructs an instance of DeadlineCon. Params: host name of the web service (string) port number the web service is listening on (integer) """ #Builds the ConnectionProperty object used for sending requests address = host + ":" + str(port) self.connectionProperties = ConnectionProperty(address) #The different request groups use the ConnectionProperty object to send their requests self.Jobs = Jobs.Jobs(self.connectionProperties) self.SlavesRenderingJob = SlavesRenderingJob.SlavesRenderingJob( self.connectionProperties) self.Tasks = Tasks.Tasks(self.connectionProperties) self.TaskReports = TaskReports.TaskReports(self.connectionProperties) self.JobReports = JobReports.JobReports(self.connectionProperties) self.LimitGroups = Limits.LimitGroups(self.connectionProperties) self.Pulse = Pulse.Pulse(self.connectionProperties) self.Repository = Repository.Repository(self.connectionProperties) self.MappedPaths = MappedPaths.MappedPaths(self.connectionProperties) self.MaximumPriority = MaximumPriority.MaximumPriority( self.connectionProperties) self.Pools = Pools.Pools(self.connectionProperties) self.Groups = Groups.Groups(self.connectionProperties) self.Plugins = Plugins.Plugins(self.connectionProperties) self.Slaves = Slaves.Slaves(self.connectionProperties) self.Users = Users.Users(self.connectionProperties) self.Balancer = Balancer.Balancer(self.connectionProperties)
def __init__(self, app_name, app_version, window_name, parent=None): QtWidgets.QMainWindow.__init__(self, parent) # Setup variables self.qApp = QtGui.qApp self.settings = QtGui.qApp.settings self.windows_names = [app_name] + [ "%s_%s" % (app_name, num) for num in xrange(2, 5) ] self.app_name = app_name self.app_version = app_version if window_name: self.name = window_name else: self.name = self.windows_names[0] # Provides a location for widgets to the right of the menu menuLayout = QtWidgets.QHBoxLayout() menuLayout.addStretch() self.menuBar().setLayout(menuLayout) # Configure window self.setMinimumSize(600, 400) self.setAnimated(False) self.setDockNestingEnabled(True) # Register this window self.__windowOpened() # Create menus self.__createMenus() # Setup plugins self.__plugins = Plugins.Plugins(self, self.name) self.__plugins.setupPluginMenu(self.PluginMenu) # Restore saved settings self.__restoreSettings() QtGui.qApp.status.connect(self.showStatusBarMessage) self.showStatusBarMessage("Ready")