Start building Uploads widget

This commit is contained in:
Micah Lee 2018-05-04 16:26:54 -07:00
parent 30c9f50d2e
commit dcea459580
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 38 additions and 1 deletions

View file

@ -22,6 +22,7 @@ from PyQt5 import QtCore, QtWidgets, QtGui
from onionshare import strings from onionshare import strings
from onionshare.web import Web from onionshare.web import Web
from .uploads import Uploads
from ..mode import Mode from ..mode import Mode
class ReceiveMode(Mode): class ReceiveMode(Mode):
@ -46,7 +47,7 @@ class ReceiveMode(Mode):
self.server_status.update() self.server_status.update()
# Downloads # Downloads
#self.uploads = Uploads(self.common) self.uploads = Uploads(self.common)
self.uploads_in_progress = 0 self.uploads_in_progress = 0
self.uploads_completed = 0 self.uploads_completed = 0
self.new_upload = False # For scrolling to the bottom of the uploads list self.new_upload = False # For scrolling to the bottom of the uploads list

View file

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
"""
OnionShare | https://onionshare.org/
Copyright (C) 2014-2018 Micah Lee <micah@micahflee.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from PyQt5 import QtCore, QtWidgets, QtGui
from onionshare import strings
class Uploads(QtWidgets.QWidget):
"""
The uploads chunk of the GUI. This lists all of the active upload
progress bars, as well as information about each upload.
"""
def __init__(self, common):
super(Uploads, self).__init__()
self.common = common
self.layout = QtWidgets.QVBoxLayout()
self.layout.addStretch()
self.setLayout(self.layout)