eric7.Project.ProjectResourcesBrowser

Module implementing a class used to display the resources part of the project.

Global Attributes

None

Classes

ProjectResourcesBrowser A class used to display the resources part of the project.

Functions

None


ProjectResourcesBrowser

A class used to display the resources part of the project.

Signals

appendStderr(str)
emitted after something was received from a QProcess on stderr
showMenu(str, QMenu)
emitted when a menu is about to be shown. The name of the menu and a reference to the menu are given.

Derived from

ProjectBaseBrowser

Class Attributes

RCFilenameFormatPython

Class Methods

None

Methods

ProjectResourcesBrowser Constructor
__addResourceFiles Private method to add resource files to the project.
__addResourcesDirectory Private method to add resource files of a directory to the project.
__checkResourcesNewer Private method to check, if any file referenced in a resource file is newer than a given time.
__compileAllResources Private method to compile all resources to source files.
__compileChangedResources Private method to compile all changed resources to source files.
__compileQRC Private method to compile a .qrc file to a .py file.
__compileQRCDone Private slot to handle the finished signal of the compile process.
__compileResource Private method to compile a resource to a source file.
__compileSelectedResources Private method to compile selected resources to source files.
__configureRccCompiler Private slot to configure some non-common rcc compiler options.
__deleteFile Private method to delete a resource file from the project.
__newResource Private slot to handle the New Resource menu action.
__openFile Private slot to handle the Open menu action.
__readStderr Private slot to handle the readyReadStandardError signal of the pyrcc5/pyside2-rcc/pyside6-rcc process.
__readStdout Private slot to handle the readyReadStandardOutput signal of the pyrcc5/pyside2-rcc/pyside6-rcc process.
__showContextMenu Private slot called by the menu aboutToShow signal.
__showContextMenuBack Private slot called by the backMenu aboutToShow signal.
__showContextMenuDir Private slot called by the dirMenu aboutToShow signal.
__showContextMenuDirMulti Private slot called by the dirMultiMenu aboutToShow signal.
__showContextMenuMulti Private slot called by the multiMenu aboutToShow signal.
_contextMenuRequested Protected slot to show the context menu.
_createPopupMenus Protected overloaded method to generate the popup menu.
_initHookMethods Protected method to initialize the hooks dictionary.
_openItem Protected slot to handle the open popup menu entry.
getIcon Public method to get an icon for the project browser.
handlePreferencesChanged Public slot used to handle the preferencesChanged signal.

Static Methods

None

ProjectResourcesBrowser (Constructor)

ProjectResourcesBrowser(project, projectBrowser, parent=None)

Constructor

project (Project)
reference to the project object
projectBrowser (ProjectBrowser)
reference to the project browser object
parent (QWidget)
parent widget of this browser

ProjectResourcesBrowser.__addResourceFiles

__addResourceFiles()

Private method to add resource files to the project.

ProjectResourcesBrowser.__addResourcesDirectory

__addResourcesDirectory()

Private method to add resource files of a directory to the project.

ProjectResourcesBrowser.__checkResourcesNewer

__checkResourcesNewer(filename, mtime)

Private method to check, if any file referenced in a resource file is newer than a given time.

filename (str)
filename of the resource file
mtime (int)
modification time to check against
Return:
flag indicating some file is newer
Return Type:
boolean)

ProjectResourcesBrowser.__compileAllResources

__compileAllResources()

Private method to compile all resources to source files.

ProjectResourcesBrowser.__compileChangedResources

__compileChangedResources()

Private method to compile all changed resources to source files.

ProjectResourcesBrowser.__compileQRC

__compileQRC(fn, noDialog=False, progress=None)

Private method to compile a .qrc file to a .py file.

fn (str)
filename of the .ui file to be compiled
noDialog (bool)
flag indicating silent operations
progress (QProgressDialog)
reference to the progress dialog
Return:
reference to the compile process
Return Type:
QProcess

ProjectResourcesBrowser.__compileQRCDone

__compileQRCDone(exitCode, exitStatus)

Private slot to handle the finished signal of the compile process.

exitCode (int)
exit code of the process
exitStatus (QProcess.ExitStatus)
exit status of the process

ProjectResourcesBrowser.__compileResource

__compileResource()

Private method to compile a resource to a source file.

ProjectResourcesBrowser.__compileSelectedResources

__compileSelectedResources()

Private method to compile selected resources to source files.

ProjectResourcesBrowser.__configureRccCompiler

__configureRccCompiler()

Private slot to configure some non-common rcc compiler options.

ProjectResourcesBrowser.__deleteFile

__deleteFile()

Private method to delete a resource file from the project.

ProjectResourcesBrowser.__newResource

__newResource()

Private slot to handle the New Resource menu action.

ProjectResourcesBrowser.__openFile

__openFile()

Private slot to handle the Open menu action.

ProjectResourcesBrowser.__readStderr

__readStderr()

Private slot to handle the readyReadStandardError signal of the pyrcc5/pyside2-rcc/pyside6-rcc process.

ProjectResourcesBrowser.__readStdout

__readStdout()

Private slot to handle the readyReadStandardOutput signal of the pyrcc5/pyside2-rcc/pyside6-rcc process.

ProjectResourcesBrowser.__showContextMenu

__showContextMenu()

Private slot called by the menu aboutToShow signal.

ProjectResourcesBrowser.__showContextMenuBack

__showContextMenuBack()

Private slot called by the backMenu aboutToShow signal.

ProjectResourcesBrowser.__showContextMenuDir

__showContextMenuDir()

Private slot called by the dirMenu aboutToShow signal.

ProjectResourcesBrowser.__showContextMenuDirMulti

__showContextMenuDirMulti()

Private slot called by the dirMultiMenu aboutToShow signal.

ProjectResourcesBrowser.__showContextMenuMulti

__showContextMenuMulti()

Private slot called by the multiMenu aboutToShow signal.

ProjectResourcesBrowser._contextMenuRequested

_contextMenuRequested(coord)

Protected slot to show the context menu.

coord (QPoint)
the position of the mouse pointer

ProjectResourcesBrowser._createPopupMenus

_createPopupMenus()

Protected overloaded method to generate the popup menu.

ProjectResourcesBrowser._initHookMethods

_initHookMethods()

Protected method to initialize the hooks dictionary.

Supported hook methods are:

Note: Filenames are relative to the project directory, if not specified differently.

ProjectResourcesBrowser._openItem

_openItem()

Protected slot to handle the open popup menu entry.

ProjectResourcesBrowser.getIcon

getIcon()

Public method to get an icon for the project browser.

Return:
icon for the browser
Return Type:
QIcon

ProjectResourcesBrowser.handlePreferencesChanged

handlePreferencesChanged()

Public slot used to handle the preferencesChanged signal.

Up