eric6/UI/BrowserModel.py

changeset 8270
6ba3564b7161
parent 8260
2161475d9639
child 8273
698ae46f40a4
child 8282
16b243bdb12f
diff -r 87f521f359d5 -r 6ba3564b7161 eric6/UI/BrowserModel.py
--- a/eric6/UI/BrowserModel.py	Thu Apr 29 17:39:17 2021 +0200
+++ b/eric6/UI/BrowserModel.py	Fri Apr 30 19:54:20 2021 +0200
@@ -1155,6 +1155,7 @@
         
         self._moduleName = ''
         
+        # TODO: add icon for eric graphics file
         pixName = ""
         if self.isPython3File():
             pixName = "filePython"
@@ -1300,7 +1301,8 @@
         """
         Public method to check, if this file is a Ruby script.
         
-        @return flag indicating a Ruby file (boolean)
+        @return flag indicating a Ruby file
+        @rtype bool
         """
         return (
             self.fileext == '.rb' or
@@ -1311,7 +1313,8 @@
         """
         Public method to check, if this file is a Qt-Designer file.
         
-        @return flag indicating a Qt-Designer file (boolean)
+        @return flag indicating a Qt-Designer file
+        @rtype bool
         """
         return self.fileext == '.ui'
     
@@ -1319,7 +1322,8 @@
         """
         Public method to check, if this file is a Qt-Linguist file.
         
-        @return flag indicating a Qt-Linguist file (boolean)
+        @return flag indicating a Qt-Linguist file
+        @rtype bool
         """
         return self.fileext in ['.ts', '.qm']
     
@@ -1327,7 +1331,8 @@
         """
         Public method to check, if this file is a Qt-Resources file.
         
-        @return flag indicating a Qt-Resources file (boolean)
+        @return flag indicating a Qt-Resources file
+        @rtype bool
         """
         return self.fileext == '.qrc'
     
@@ -1335,7 +1340,8 @@
         """
         Public method to check, if this file is an eric project file.
         
-        @return flag indicating an eric project file (boolean)
+        @return flag indicating an eric project file
+        @rtype bool
         """
         return self.fileext in ('.epj', '.e4p')
     
@@ -1343,7 +1349,8 @@
         """
         Public method to check, if this file is an eric multi project file.
         
-        @return flag indicating an eric project file (boolean)
+        @return flag indicating an eric project file
+        @rtype bool
         """
         return self.fileext in ('.emj', '.e4m', '.e5m')
     
@@ -1351,7 +1358,8 @@
         """
         Public method to check, if this file is a CORBA IDL file.
         
-        @return flag indicating a CORBA IDL file (boolean)
+        @return flag indicating a CORBA IDL file
+        @rtype bool
         """
         return self.fileext == '.idl'
     
@@ -1368,7 +1376,8 @@
         """
         Public method to check, if this file is a JavaScript file.
         
-        @return flag indicating a JavaScript file (boolean)
+        @return flag indicating a JavaScript file
+        @rtype bool
         """
         return self.fileext == '.js'
     
@@ -1376,7 +1385,8 @@
         """
         Public method to check, if this file is a pixmap file.
         
-        @return flag indicating a pixmap file (boolean)
+        @return flag indicating a pixmap file
+        @rtype bool
         """
         return self.fileext[1:] in QImageReader.supportedImageFormats()
     
@@ -1384,7 +1394,8 @@
         """
         Public method to check, if this file is a SVG file.
         
-        @return flag indicating a SVG file (boolean)
+        @return flag indicating a SVG file
+        @rtype bool
         """
         return self.fileext == '.svg'
     
@@ -1399,6 +1410,15 @@
             (self.fileext == "" and self.sourceLanguage == "D")
         )
     
+    def isEricGraphicsFile(self):
+        """
+        Public method to check, if this is an eric graphics file.
+        
+        @return flag indicating an eric graphics file
+        @rtype bool
+        """
+        return self.fileext in ('.egj', '.e5g')
+    
     def lessThan(self, other, column, order):
         """
         Public method to check, if the item is less than the other one.

eric ide

mercurial