Package schrodinger :: Package ui :: Package qt :: Module filedialog :: Class PhaseDatabaseIconProvider
[hide private]
[frames] | no frames]

Class PhaseDatabaseIconProvider

                   object --+        
                            |        
            sip.simplewrapper --+    
                                |    
PyQt5.QtWidgets.QFileIconProvider --+
                                    |
                                   PhaseDatabaseIconProvider

Class to ensure that projects get the proper icon in the file open dialog, and also are labeled as type "Project"

Nested Classes [hide private]

Inherited from PyQt5.QtWidgets.QFileIconProvider: IconType, Option, Options

Instance Methods [hide private]
 
__init__(self)
Create a PhaseDatabaseIconProvider instance
QIcon
icon(self, arg)
Return the proper icon for the file/directory that arg points to.
bool
isPhaseDatabase(self, info)
Determine if info points to a Phase database.
str
type(self, arg)
Return the proper type for the file/directory that arg points to.

Inherited from PyQt5.QtWidgets.QFileIconProvider: options, setOptions

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from PyQt5.QtWidgets.QFileIconProvider: Computer, Desktop, DontUseCustomDirectoryIcons, Drive, File, Folder, Network, Trashcan

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Create a PhaseDatabaseIconProvider instance

Overrides: object.__init__

icon(self, arg)

 

Return the proper icon for the file/directory that arg points to.

This will be the default icon except if arg points to a Phase database, in which case it will be a custom icon.

Parameters:
  • arg (QFileInfo) - Information for the current file/directory. This is used to determine what type of icon should be displayed for the file.
Returns: QIcon
The proper icon for arg's file/directory.
Overrides: PyQt5.QtWidgets.QFileIconProvider.icon

isPhaseDatabase(self, info)

 

Determine if info points to a Phase database.

Parameters:
  • info (QFileInfo) - Information for the current file/directory
Returns: bool
True if info points to a project, False if not

type(self, arg)

 

Return the proper type for the file/directory that arg points to.

This will be the default type except if arg points to a Phase database, in which case it will be 'Phase Database'

Parameters:
  • arg (QFileInfo) - Information for the current file/directory. This is used to determine what type should be displayed for the file.
Returns: str
The proper type for arg's file/directory.
Overrides: PyQt5.QtWidgets.QFileIconProvider.type