summaryrefslogtreecommitdiffstats
path: root/module/gui/MainWindow.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-12-19 14:12:03 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-12-19 14:12:03 +0100
commit5120d1a26cac79ab283f38db8d7f18c9c010e786 (patch)
tree219f8874869ac6f9c1656fea9df8db17b55ce034 /module/gui/MainWindow.py
parentacc manager fix (diff)
downloadpyload-5120d1a26cac79ab283f38db8d7f18c9c010e786.tar.xz
new experimental backend, new gui status (unfinished)
Diffstat (limited to 'module/gui/MainWindow.py')
-rw-r--r--module/gui/MainWindow.py46
1 files changed, 35 insertions, 11 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index c0fe6e804..a02ea7989 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -62,16 +62,40 @@ class MainWindow(QMainWindow):
self.setCentralWidget(lw)
#status
- #@TODO: build a fancy box
-
- #self.statusw = QFrame()
- #self.statusw.setFrameStyle(QFrame.StyledPanel | QFrame.Raised)
- #self.statusw.setLineWidth(2)
- #self.statusw.setLayout(QGridLayout())
- #l = self.statusw.layout()
- #l.addWidget(QLabel("Status:"), 0, 0)
- #l.addWidget(QLabel("Speed:"), 0, 3)
- #l.addWidget(QLabel("Space:"), 0, 5)
+ self.statusw = QFrame()
+ self.statusw.setFrameStyle(QFrame.StyledPanel | QFrame.Raised)
+ self.statusw.setLineWidth(2)
+ self.statusw.setLayout(QGridLayout())
+ l = self.statusw.layout()
+ l.addWidget(QLabel(_("packages:")), 0, 0)
+ l.addWidget(QLabel(_("files:")), 1, 0)
+ self.packageCount = QLabel("0")
+ self.fileCount = QLabel("0")
+ l.addWidget(self.packageCount, 0, 1)
+ l.addWidget(self.fileCount, 1, 1)
+
+ l.addWidget(QLabel(_("status:")), 0, 3)
+ l.addWidget(QLabel(_("ip:")), 1, 3)
+ self.status = QLabel("running")
+ self.ip = QLabel("")
+ l.addWidget(self.status, 0, 4)
+ l.addWidget(self.ip, 1, 4)
+
+ l.addWidget(QLabel(_("speed:")), 0, 5)
+ l.addWidget(QLabel(_("space:")), 1, 5)
+ self.speed = QLabel("")
+ self.space = QLabel("")
+ l.addWidget(self.speed, 0, 6)
+ l.addWidget(self.space, 1, 6)
+
+ l.addWidget(QLabel(_("max. downloads:")), 0, 7)
+ l.addWidget(QLabel(_("max. chunks:")), 1, 7)
+ self.maxDownloads = QSpinBox()
+ self.maxDownloads.setEnabled(False)
+ self.maxChunks = QSpinBox()
+ self.maxChunks.setEnabled(False)
+ l.addWidget(self.maxDownloads, 0, 8)
+ l.addWidget(self.maxChunks, 1, 8)
#set menubar and statusbar
self.menubar = self.menuBar()
@@ -126,7 +150,7 @@ class MainWindow(QMainWindow):
#layout
self.masterlayout.addWidget(self.tabw)
- #self.masterlayout.addWidget(self.statusw)
+ self.masterlayout.addWidget(self.statusw)
#signals..
self.connect(self.mactions["manager"], SIGNAL("triggered()"), self.slotShowConnector)