PythonQt
Public Member Functions | List of all members
PythonQtImportFileInterface Class Referenceabstract

#include <PythonQtImportFileInterface.h>

Inheritance diagram for PythonQtImportFileInterface:
PythonQtQFileImporter

Public Member Functions

virtual ~PythonQtImportFileInterface ()
 
 PythonQtImportFileInterface ()
 
virtual QByteArray readFileAsBytes (const QString &filename)=0
 read the given file as byte array, without doing any linefeed translations More...
 
virtual QByteArray readSourceFile (const QString &filename, bool &ok)=0
 
virtual bool exists (const QString &filename)=0
 returns if the file exists More...
 
virtual bool isEggArchive (const QString &filename)=0
 
virtual QDateTime lastModifiedDate (const QString &filename)=0
 get the last modified data of a file More...
 
virtual bool ignoreUpdatedPythonSourceFiles ()
 
virtual void importedModule (const QString &)
 

Detailed Description

Defines an abstract interface to file access for the Python import statement. see PythonQt::setImporter()

Definition at line 52 of file PythonQtImportFileInterface.h.

Constructor & Destructor Documentation

◆ ~PythonQtImportFileInterface()

virtual PythonQtImportFileInterface::~PythonQtImportFileInterface ( )
inlinevirtual

Definition at line 56 of file PythonQtImportFileInterface.h.

56 {}

◆ PythonQtImportFileInterface()

PythonQtImportFileInterface::PythonQtImportFileInterface ( )
inline

Definition at line 57 of file PythonQtImportFileInterface.h.

57 {}

Member Function Documentation

◆ exists()

virtual bool PythonQtImportFileInterface::exists ( const QString &  filename)
pure virtual

returns if the file exists

Implemented in PythonQtQFileImporter.

◆ ignoreUpdatedPythonSourceFiles()

virtual bool PythonQtImportFileInterface::ignoreUpdatedPythonSourceFiles ( )
inlinevirtual

indicates that *.py files which are newer than their corresponding *.pyc files are ignored

Definition at line 78 of file PythonQtImportFileInterface.h.

78 { return false; }

◆ importedModule()

virtual void PythonQtImportFileInterface::importedModule ( const QString &  )
inlinevirtual

called by PythonQt after successful import to allow recording of imports

Definition at line 82 of file PythonQtImportFileInterface.h.

82 {}

◆ isEggArchive()

virtual bool PythonQtImportFileInterface::isEggArchive ( const QString &  filename)
pure virtual

returns true if the given file is an egg archive (e.g. zip). If the egg is a directory then false is returned.

Implemented in PythonQtQFileImporter.

◆ lastModifiedDate()

virtual QDateTime PythonQtImportFileInterface::lastModifiedDate ( const QString &  filename)
pure virtual

get the last modified data of a file

Implemented in PythonQtQFileImporter.

◆ readFileAsBytes()

virtual QByteArray PythonQtImportFileInterface::readFileAsBytes ( const QString &  filename)
pure virtual

read the given file as byte array, without doing any linefeed translations

Implemented in PythonQtQFileImporter.

◆ readSourceFile()

virtual QByteArray PythonQtImportFileInterface::readSourceFile ( const QString &  filename,
bool &  ok 
)
pure virtual

read a source file, expects a readable Python text file with translated line feeds. If the file can not be load OR it can not be verified, ok is set to false

Implemented in PythonQtQFileImporter.


The documentation for this class was generated from the following file: