コード例 #1
0
ファイル: app.py プロジェクト: stungkit/nut
	def initUI(self):
		self.isInitialized = False
		self.setWindowTitle(self.title)
		screen = QDesktopWidget().screenGeometry()
		left = int(screen.width() / 4)
		top = int(screen.height() / 4)
		width = int(screen.width() / 2)
		height = int(screen.height() / 2)
		self.setGeometry(left, top, width, height)

		layout = QVBoxLayout()

		self.header = Header(self)
		layout.addLayout(self.header.layout)
		self.files = gui.panes.files.Files()

		self.tabs = gui.tabs.Tabs({
			tr('main.grid.files'): self.files,
			tr('main.grid.filters'): gui.panes.filters.Filters(),
			tr('main.grid.save_paths'): gui.panes.format.Format(),
			tr('main.grid.local_scan_paths'): gui.panes.dirlist.DirList(Config.paths.scan, self.saveScanPaths, rowType=gui.panes.dirlist.DirectoryLocal),
			tr('main.grid.remote_pull_paths'): gui.panes.dirlist.DirList(Config.pullUrls, self.savePullUrls, rowType=gui.panes.dirlist.DirectoryNetwork),
			tr('main.grid.users'): gui.panes.dirlist.DirList(list(Users.users.values()), self.saveUsers, rowType=gui.panes.dirlist.User),  # rowType
			tr('main.grid.options'): gui.panes.options.Options()
		})
		layout.addWidget(self.tabs)

		self.progress = Progress(self)
		layout.addLayout(self.progress.layout)

		self.setLayout(layout)

		self.isInitialized = True
		self.show()
コード例 #2
0
ファイル: main.py プロジェクト: pars-linux/uludag
 def updateRepo(self, update_repo=True):
     """
         Fetches package index and retrieves list of package and components.
     """
     # Progress dialog
     self.progress = Progress(self)
     # Update project
     self.updateProject()
     # Get repository
     try:
         self.repo = self.project.get_repo(self.progress,
                                           update_repo=update_repo)
     except ExIndexBogus, e:
         self.progress.finished()
         QMessageBox.warning(
             self, self.title,
             _("Unable to load package index. URL is wrong, or file is corrupt."
               ))
         return False