summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-21 00:41:08 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-21 00:41:08 +0100
commit9f342ea3f73148154054515c4a3d3fa8ab35bf51 (patch)
treec6dca7bc2bc83f2ae4bf3b7ad3f2f17d42cbcf4a /module
parentNormal linklist plugin (diff)
downloadpyload-9f342ea3f73148154054515c4a3d3fa8ab35bf51.tar.xz
GUI: new docks
Diffstat (limited to 'module')
-rw-r--r--module/gui/MainWindow.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index f9d2d0fb8..9c972dea1 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -19,6 +19,9 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *
+from module.gui.PackageDock import *
+from module.gui.LinkDock import *
+
class MainWindow(QMainWindow):
def __init__(self):
"""
@@ -30,6 +33,11 @@ class MainWindow(QMainWindow):
self.setWindowIcon(QIcon("icons/logo.png"))
self.resize(750,500)
+ self.newPackDock = NewPackageDock()
+ self.addDockWidget(Qt.RightDockWidgetArea, self.newPackDock)
+ self.newLinkDock = NewLinkDock()
+ self.addDockWidget(Qt.RightDockWidgetArea, self.newLinkDock)
+
#central widget, layout
self.masterlayout = QVBoxLayout()
lw = QWidget()
@@ -92,7 +100,12 @@ class MainWindow(QMainWindow):
self.connect(self.actions["toggle_status"], SIGNAL("toggled(bool)"), self.slotToggleStatus)
self.connect(self.actions["status_stop"], SIGNAL("triggered()"), self.slotStatusStop)
+ self.addMenu = QMenu()
+ 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)
def init_tabs(self):
"""
@@ -125,7 +138,15 @@ class MainWindow(QMainWindow):
print "stop!"
def slotAdd(self):
- print "add"
+ self.addMenu.exec_(QCursor.pos())
+
+ def slotAddPackage(self):
+ self.tabw.setCurrentIndex(1)
+ self.newPackDock.show()
+
+ def slotAddLinks(self):
+ self.tabw.setCurrentIndex(1)
+ self.newLinkDock.show()
def slotShowConnector(self):
self.emit(SIGNAL("connector"))