summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-20 18:25:19 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-20 18:25:19 +0100
commitab5d907f48a8879f717e0c6482695ef1afe280a0 (patch)
tree1f4fa87f31439991bad46557f1cc797576e02932 /module
parentgui toolbar with dummy actions (diff)
downloadpyload-ab5d907f48a8879f717e0c6482695ef1afe280a0.tar.xz
gui can return to connection manager, new collector
Diffstat (limited to 'module')
-rw-r--r--module/gui/MainWindow.py35
-rw-r--r--module/gui/Queue.py3
2 files changed, 23 insertions, 15 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index 5878d18d4..f9d2d0fb8 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -64,17 +64,17 @@ class MainWindow(QMainWindow):
self.tabw = QTabWidget()
self.tabs = {}
self.tabs["queue"] = {"w":QWidget()}
- self.tabs["collector_packages"] = {"w":QWidget()}
- self.tabs["collector_links"] = {"w":QWidget()}
+ self.tabs["collector"] = {"w":QWidget()}
self.tabw.addTab(self.tabs["queue"]["w"], "Queue")
- self.tabw.addTab(self.tabs["collector_packages"]["w"], "Package collector")
- self.tabw.addTab(self.tabs["collector_links"]["w"], "Link collector")
+ self.tabw.addTab(self.tabs["collector"]["w"], "Collector")
#init tabs
self.init_tabs()
#layout
self.masterlayout.addWidget(self.tabw)
+
+ self.connect(self.mactions["manager"], SIGNAL("triggered()"), self.slotShowConnector)
def init_toolbar(self):
self.toolbar = self.addToolBar("main")
@@ -104,17 +104,19 @@ class MainWindow(QMainWindow):
self.tabs["queue"]["view"] = QTreeWidget()
self.tabs["queue"]["l"].addWidget(self.tabs["queue"]["view"])
- #collector_packages
- self.tabs["collector_packages"]["l"] = QGridLayout()
- self.tabs["collector_packages"]["w"].setLayout(self.tabs["collector_packages"]["l"])
- self.tabs["collector_packages"]["treewidget"] = QTreeWidget()
- self.tabs["collector_packages"]["l"].addWidget(self.tabs["collector_packages"]["treewidget"])
-
- #collector_links
- self.tabs["collector_links"]["l"] = QGridLayout()
- self.tabs["collector_links"]["w"].setLayout(self.tabs["collector_links"]["l"])
- self.tabs["collector_links"]["listwidget"] = QListWidget()
- self.tabs["collector_links"]["l"].addWidget(self.tabs["collector_links"]["listwidget"])
+ #collector
+ groupPackage = QGroupBox("Packages")
+ groupLinks = QGroupBox("Links")
+ groupPackage.setLayout(QVBoxLayout())
+ groupLinks.setLayout(QVBoxLayout())
+ self.tabs["collector"]["l"] = QGridLayout()
+ self.tabs["collector"]["w"].setLayout(self.tabs["collector"]["l"])
+ self.tabs["collector"]["package_view"] = QTreeWidget()
+ self.tabs["collector"]["link_view"] = QListWidget()
+ groupPackage.layout().addWidget(self.tabs["collector"]["package_view"])
+ groupLinks.layout().addWidget(self.tabs["collector"]["link_view"])
+ self.tabs["collector"]["l"].addWidget(groupPackage, 0, 0)
+ self.tabs["collector"]["l"].addWidget(groupLinks, 0, 1)
def slotToggleStatus(self, status):
print "toggle status", status
@@ -124,3 +126,6 @@ class MainWindow(QMainWindow):
def slotAdd(self):
print "add"
+
+ def slotShowConnector(self):
+ self.emit(SIGNAL("connector"))
diff --git a/module/gui/Queue.py b/module/gui/Queue.py
index 7e63e6180..52f11fd8c 100644
--- a/module/gui/Queue.py
+++ b/module/gui/Queue.py
@@ -46,6 +46,9 @@ class Queue(QThread):
self.update()
sleep(self.interval)
+ def stop(self):
+ self.running = False
+
def update(self):
locker = QMutexLocker(self.mutex)
packs = self.connector.getPackageQueue()