summaryrefslogtreecommitdiff
path: root/nephilim/plugins/Filebrowser.py
diff options
context:
space:
mode:
Diffstat (limited to 'nephilim/plugins/Filebrowser.py')
-rw-r--r--nephilim/plugins/Filebrowser.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/nephilim/plugins/Filebrowser.py b/nephilim/plugins/Filebrowser.py
index cb0a6e7..f9b07f6 100644
--- a/nephilim/plugins/Filebrowser.py
+++ b/nephilim/plugins/Filebrowser.py
@@ -15,7 +15,7 @@
# along with Nephilim. If not, see <http://www.gnu.org/licenses/>.
#
-from PyQt4 import QtGui, QtCore
+from PyQt5 import QtWidgets, QtCore
import os
import shutil
@@ -36,29 +36,29 @@ class Filebrowser(Plugin):
def _get_dock_widget(self):
return self._create_dock(self.o)
-class wgFilebrowser(QtGui.QWidget):
+class wgFilebrowser(QtWidgets.QWidget):
view = None
model = None
path = None
plugin = None
logger = None
- class FileView(QtGui.QListView):
+ class FileView(QtWidgets.QListView):
"context menu"
menu = None
plugin = None
logger = None
def __init__(self, model, plugin):
- QtGui.QListView.__init__(self)
+ QtWidgets.QListView.__init__(self)
self.plugin = plugin
self.logger = plugin.logger
self.setModel(model)
self.setRootIndex(self.model().index(os.path.expanduser('~')))
- self.setSelectionMode(QtGui.QTreeWidget.ExtendedSelection)
+ self.setSelectionMode(QtWidgets.QTreeWidget.ExtendedSelection)
- self.menu = QtGui.QMenu('file')
+ self.menu = QtWidgets.QMenu('file')
self.menu.addAction('&Make file(s) readable for MPD.', self.selection_make_readable)
self.menu.addAction('***EXPERIMENTAL DON\'T USE*** &Copy to collection.', self.selection_copy_to_collection)
@@ -103,23 +103,23 @@ class wgFilebrowser(QtGui.QWidget):
def __init__(self, plugin):
- QtGui.QWidget.__init__(self)
+ QtWidgets.QWidget.__init__(self)
self.plugin = plugin
self.logger = plugin.logger
- self.model = QtGui.QDirModel()
+ self.model = QtWidgets.QDirModel()
self.model.setFilter(QtCore.QDir.AllDirs|QtCore.QDir.AllEntries)
self.model.setSorting(QtCore.QDir.DirsFirst)
self.view = self.FileView(self.model, self.plugin)
self.view.activated.connect(self.item_activated)
- self.path = QtGui.QLineEdit(self.model.filePath(self.view.rootIndex()))
+ self.path = QtWidgets.QLineEdit(self.model.filePath(self.view.rootIndex()))
self.path.returnPressed.connect(self.path_changed)
- self.setLayout(QtGui.QVBoxLayout())
+ self.setLayout(QtWidgets.QVBoxLayout())
self.layout().setSpacing(0)
- self.layout().setMargin(0)
+ self.layout().setContentsMargins(0, 0, 0, 0)
self.layout().addWidget(self.path)
self.layout().addWidget(self.view)