diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-21 14:24:51 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-21 14:24:51 +0100 |
commit | 20f7c0e65607f2fb8607ed0e5e96181a36be76ca (patch) | |
tree | dabd600bde4231f9cd0bba62843057f6ae7f2630 /module/gui/MainWindow.py | |
parent | GUI: new docks (diff) | |
download | pyload-20f7c0e65607f2fb8607ed0e5e96181a36be76ca.tar.xz |
new update threads, link dock works now
Diffstat (limited to 'module/gui/MainWindow.py')
-rw-r--r-- | module/gui/MainWindow.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py index 9c972dea1..ccca6b697 100644 --- a/module/gui/MainWindow.py +++ b/module/gui/MainWindow.py @@ -33,10 +33,12 @@ class MainWindow(QMainWindow): self.setWindowIcon(QIcon("icons/logo.png")) self.resize(750,500) + #init docks self.newPackDock = NewPackageDock() self.addDockWidget(Qt.RightDockWidgetArea, self.newPackDock) self.newLinkDock = NewLinkDock() self.addDockWidget(Qt.RightDockWidgetArea, self.newLinkDock) + self.connect(self.newLinkDock, SIGNAL("done"), self.slotAddLinks) #central widget, layout self.masterlayout = QVBoxLayout() @@ -104,8 +106,8 @@ class MainWindow(QMainWindow): packageAction = self.addMenu.addAction("Package") linkAction = self.addMenu.addAction("Links") self.connect(self.actions["add"], SIGNAL("triggered()"), self.slotAdd) - self.connect(packageAction, SIGNAL("triggered()"), self.slotAddPackage) - self.connect(linkAction, SIGNAL("triggered()"), self.slotAddLinks) + self.connect(packageAction, SIGNAL("triggered()"), self.slotShowAddPackage) + self.connect(linkAction, SIGNAL("triggered()"), self.slotShowAddLinks) def init_tabs(self): """ @@ -125,7 +127,7 @@ class MainWindow(QMainWindow): 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() + self.tabs["collector"]["link_view"] = QTreeWidget() groupPackage.layout().addWidget(self.tabs["collector"]["package_view"]) groupLinks.layout().addWidget(self.tabs["collector"]["link_view"]) self.tabs["collector"]["l"].addWidget(groupPackage, 0, 0) @@ -140,13 +142,16 @@ class MainWindow(QMainWindow): def slotAdd(self): self.addMenu.exec_(QCursor.pos()) - def slotAddPackage(self): + def slotShowAddPackage(self): self.tabw.setCurrentIndex(1) self.newPackDock.show() - def slotAddLinks(self): + def slotShowAddLinks(self): self.tabw.setCurrentIndex(1) self.newLinkDock.show() def slotShowConnector(self): self.emit(SIGNAL("connector")) + + def slotAddLinks(self, links): + self.emit(SIGNAL("addLinks"), links) |