eric6/E5Network/E5UrlInfo.py

Sat, 11 Apr 2020 14:13:25 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 11 Apr 2020 14:13:25 +0200
changeset 7522
e0e05a1b576f
parent 7360
9190402e4505
child 7780
41420f82c0ac
permissions
-rw-r--r--

Styles: added some Qt style sheets and some highlighter styles.

2077
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7360
9190402e4505 Updated copyright for 2020.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
3 # Copyright (c) 2012 - 2020 Detlev Offenbach <detlev@die-offenbachs.de>
2077
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a class replacing QUrlInfo.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
10
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
11 from PyQt5.QtCore import QDateTime
2077
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 class E5UrlInfo(object):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 Class implementing a replacement for QUrlInfo.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 ReadOwner = 0o0400
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 WriteOwner = 0o0200
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 ExeOwner = 0o0100
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 ReadGroup = 0o0040
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 WriteGroup = 0o0020
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 ExeGroup = 0o0010
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 ReadOther = 0o0004
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 WriteOther = 0o0002
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 ExeOther = 0o0001
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 def __init__(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 Constructor
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 self.__valid = False
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.__permissions = 0
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.__size = 0
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.__isDir = False
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 self.__isFile = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 self.__isSymlink = False
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.__isWritable = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.__isReadable = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.__isExecutable = False
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 self.__name = ""
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 self.__owner = ""
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.__group = ""
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 self.__lastModified = QDateTime()
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 self.__lastRead = QDateTime()
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 def isValid(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 Public method to check the validity of the object.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 @return flag indicating validity (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 return self.__valid
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 def setName(self, name):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 Public method to set the name.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 @param name name to be set (string)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 self.__name = name
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 def setPermissions(self, permissions):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 Public method to set the permissions.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 @param permissions permissions to be set (integer)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 self.__permissions = permissions
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 def setDir(self, isDir):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 Public method to indicate a directory.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 @param isDir flag indicating a directory (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 self.__isDir = isDir
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 def setFile(self, isFile):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 Public method to indicate a file.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 @param isFile flag indicating a file (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.__isFile = isFile
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 def setSymLink(self, isSymLink):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 Public method to indicate a symbolic link.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 @param isSymLink flag indicating a symbolic link (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self.__isSymLink = isSymLink
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 def setOwner(self, owner):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 Public method to set the owner.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 @param owner owner to be set (string)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 self.__owner = owner
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 def setGroup(self, group):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 Public method to set the group.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 @param group group to be set (string)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 self.__group = group
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 def setSize(self, size):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 Public method to set the size.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 @param size size to be set (integer)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 self.__size = size
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 def setWritable(self, isWritable):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 Public method to a writable entry.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 @param isWritable flag indicating a writable entry (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 self.__isWritable = isWritable
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 def setReadable(self, isReadable):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 Public method to a readable entry.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 @param isReadable flag indicating a readable entry (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 self.__isReadable = isReadable
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 def setLastModified(self, dt):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 Public method to set the last modified date and time.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 @param dt date and time to set (QDateTime)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 self.__lastModified = QDateTime(dt)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 def setLastRead(self, dt):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 Public method to set the last read date and time.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 @param dt date and time to set (QDateTime)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161 self.__lastRead = QDateTime(dt)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 self.__valid = True
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 def name(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 Public method to get the name.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
168 @return name (string)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 return self.__name
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 def permissions(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 Public method to get the permissions.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 @return permissions (integer)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 return self.__permissions
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 def owner(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 Public method to get the owner.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 @return owner (string)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 return self.__owner
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188 def group(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 Public method to get the group.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 @return group (string)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 return self.__group
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 def size(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 Public method to get the size.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 @return size (integer)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 return self.__size
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 def lastModified(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 Public method to get the last modified date and time.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 @return last modified date and time (QDateTime)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 return QDateTime(self.__lastModified)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 def lastRead(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 Public method to get the last read date and time.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 @return last read date and time (QDateTime)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 return QDateTime(self.__lastRead)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 def isDir(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 Public method to test, if the entry is a directory.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 @return flag indicating a directory (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226 return self.__isDir
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 def isFile(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 Public method to test, if the entry is a file.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 @return flag indicating a file (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 return self.__isFile
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 def isSymLink(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 Public method to test, if the entry is a symbolic link.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 @return flag indicating a symbolic link (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 return self.__isSymlink
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 def isWritable(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 Public method to test, if the entry is writable.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 @return flag indicating writable (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250 return self.__isWritable
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
251
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
252 def isReadable(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254 Public method to test, if the entry is readable.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 @return flag indicating readable (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
257 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
258 return self.__isReadable
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 def isExecutable(self):
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 Public method to test, if the entry is executable.
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 @return flag indicating executable (boolean)
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265 """
68a34718a0ce Made the first set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
266 return self.__isExecutable

eric ide

mercurial