eric6/MicroPython/MicroPythonFileManagerWidget.py

Mon, 22 Jul 2019 18:48:27 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 22 Jul 2019 18:48:27 +0200
branch
micropython
changeset 7078
bca506f8c756
child 7080
9a3adf033f90
permissions
-rw-r--r--

MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.

7078
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a file manager for MicroPython devices.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from __future__ import unicode_literals
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import os
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 from PyQt5.QtCore import pyqtSlot, Qt
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 from PyQt5.QtWidgets import QWidget, QTreeWidgetItem, QHeaderView
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 from E5Gui import E5MessageBox
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 from E5Gui.E5Application import e5App
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 from .Ui_MicroPythonFileManagerWidget import Ui_MicroPythonFileManagerWidget
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 from .MicroPythonFileSystem import (
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 MicroPythonFileManager, decoratedName, mode2string, mtime2string
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 )
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 import UI.PixmapCache
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 import Preferences
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 class MicroPythonFileManagerWidget(QWidget, Ui_MicroPythonFileManagerWidget):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Class implementing a file manager for MicroPython devices.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 def __init__(self, port, parent=None):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 Constructor
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @param port port name of the device
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 @type str
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 @param parent reference to the parent widget
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 @type QWidget
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 super(MicroPythonFileManagerWidget, self).__init__(parent)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.setupUi(self)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 self.putButton.setIcon(UI.PixmapCache.getIcon("1rightarrow"))
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 self.getButton.setIcon(UI.PixmapCache.getIcon("1leftarrow"))
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 self.putButton.setEnabled(False)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.getButton.setEnabled(False)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 self.localFileTreeWidget.header().setSortIndicator(
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 0, Qt.AscendingOrder)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 self.deviceFileTreeWidget.header().setSortIndicator(
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 0, Qt.AscendingOrder)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 self.__fileManager = MicroPythonFileManager(port, self)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 self.__fileManager.longListFiles.connect(self.__handleLongListFiles)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 self.__fileManager.currentDir.connect(self.__handleCurrentDir)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 self.__fileManager.longListFilesFailed.connect(self.__handleError)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 self.__fileManager.currentDirFailed.connect(self.__handleError)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 def start(self):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 Public method to start the widget.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 self.__fileManager.connect()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 dirname = ""
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 vm = e5App().getObject("ViewManager")
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 aw = vm.activeWindow()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 if aw:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 dirname = os.path.dirname(aw.getFileName())
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 if not dirname:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 dirname = (Preferences.getMultiProject("Workspace") or
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 os.path.expanduser("~"))
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 self.__listLocalFiles(dirname)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 self.__fileManager.pwd()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 def stop(self):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 Public method to stop the widget.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 self.__fileManager.disconnect()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 @pyqtSlot(str)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 def __handleError(self, error):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 Private slot to handle errors.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 @param error error message
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 @type str
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 E5MessageBox.warning(
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self,
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 self.tr("Error handling device"),
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.tr("<p>There was an error communicating with the connected"
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 " device.</p><p>Message: {0}</p>").format(error))
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 @pyqtSlot(str)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 def __handleCurrentDir(self, dirname):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 Private slot to handle a change of the current directory of the device.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 @param dirname name of the current directory
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 @type str
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 self.deviceCwd.setText(dirname)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 self.__fileManager.lls(dirname)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 @pyqtSlot(tuple)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 def __handleLongListFiles(self, filesList):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 Private slot to receive a long directory listing.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 @param filesList tuple containing tuples with name, mode, size and time
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 for each directory entry
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 @type tuple of (str, str, str, str)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 self.deviceFileTreeWidget.clear()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 for name, mode, size, time in filesList:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 itm = QTreeWidgetItem(self.deviceFileTreeWidget,
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 [name, mode, size, time])
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 itm.setTextAlignment(1, Qt.AlignHCenter)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 itm.setTextAlignment(2, Qt.AlignRight)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 self.deviceFileTreeWidget.header().resizeSections(
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 QHeaderView.ResizeToContents)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 def __listLocalFiles(self, dirname=""):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 Private method to populate the local files list.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 @param dirname name of the local directory to be listed
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 @type str
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 """ # __IGNORE_WARNING_D234__
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 def isvisible(name):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 return not name.startswith(".") and not name.endswith("~")
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 def stat(filename):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 try:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 rstat = os.lstat(filename)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 except Exception:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 rstat = os.stat(filename)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 return tuple(rstat)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 def listdir_stat(dirname):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 try:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 if dirname:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 files = os.listdir(dirname)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 else:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 files = os.listdir()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 except OSError:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 return []
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 if dirname in ('', '/'):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 return [(f, stat(f)) for f in files if isvisible(f)]
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 return [(f, stat(os.path.join(dirname, f))) for f in files
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 if isvisible(f)]
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 if not dirname:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 dirname = os.getcwd()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 self.localCwd.setText(dirname)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 filesStatList = listdir_stat(dirname)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 filesList = [(
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 decoratedName(f, s[0]),
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 mode2string(s[0]),
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 str(s[6]),
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 mtime2string(s[8])) for f, s in filesStatList]
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 self.localFileTreeWidget.clear()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 for item in filesList:
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 itm = QTreeWidgetItem(self.localFileTreeWidget, item)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 itm.setTextAlignment(1, Qt.AlignHCenter)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 itm.setTextAlignment(2, Qt.AlignRight)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 self.localFileTreeWidget.header().resizeSections(
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 QHeaderView.ResizeToContents)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 @pyqtSlot(QTreeWidgetItem, int)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 def on_localFileTreeWidget_itemActivated(self, item, column):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183 Slot documentation goes here.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 @param item DESCRIPTION
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 @type QTreeWidgetItem
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 @param column DESCRIPTION
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 @type int
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 # TODO: not implemented yet
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 # show listing of activated directory
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 @pyqtSlot()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 def on_localFileTreeWidget_itemSelectionChanged(self):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 Slot documentation goes here.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 # TODO: not implemented yet
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 @pyqtSlot(QTreeWidgetItem, int)
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 def on_deviceFileTreeWidget_itemActivated(self, item, column):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 Slot documentation goes here.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 @param item DESCRIPTION
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 @type QTreeWidgetItem
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 @param column DESCRIPTION
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 @type int
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 # TODO: not implemented yet
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 # chdir to activated directory triggering a pwd triggering a lls
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 @pyqtSlot()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 def on_deviceFileTreeWidget_itemSelectionChanged(self):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 Slot documentation goes here.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 # TODO: not implemented yet
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 @pyqtSlot()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 def on_putButton_clicked(self):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 Slot documentation goes here.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 # TODO: not implemented yet
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227 @pyqtSlot()
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 def on_getButton_clicked(self):
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 Slot documentation goes here.
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 """
bca506f8c756 MicroPython: started to implement the file manager widget; added the forgotten MicroPythonFileManagerWidget.[py, ui] files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 # TODO: not implemented yet

eric ide

mercurial