AvogadroApp
Public Slots | Signals | Public Member Functions | List of all members
BackgroundFileFormat Class Reference

#include <backgroundfileformat.h>

Inheritance diagram for BackgroundFileFormat:

Public Slots

void read ()
 
void write ()
 

Signals

void finished ()
 

Public Member Functions

 BackgroundFileFormat (Io::FileFormat *format, QObject *aparent=0)
 
Io::FileFormat * fileFormat () const
 
bool success () const
 
QString error () const
 
void setMolecule (Core::Molecule *mol)
 
Core::Molecule * molecule () const
 
void setFileName (const QString &filename)
 
QString fileName () const
 

Detailed Description

The BackgroundFileFormat class provides a thin QObject wrapper around an instance of Io::FileFormat.

Constructor & Destructor Documentation

◆ BackgroundFileFormat()

BackgroundFileFormat ( Io::FileFormat *  format,
QObject *  aparent = 0 
)
explicit

This class takes ownership of format and will delete it when destructed.

Member Function Documentation

◆ setMolecule()

void setMolecule ( Core::Molecule *  mol)

The molecule instance to read/write.

◆ molecule()

Core::Molecule* molecule ( ) const

The molecule instance to read/write.

◆ setFileName()

void setFileName ( const QString &  filename)

The name of the file to read/write.

◆ fileName()

QString fileName ( ) const

The name of the file to read/write.

◆ fileFormat()

Io::FileFormat* fileFormat ( ) const

The Io::FileFormat to use.

◆ success()

bool success ( ) const
Returns
True if the operation was successful.

◆ error()

QString error ( ) const
Returns
An error string, set if success() is false.

◆ finished

void finished ( )
signal

Emitted when a call to read or write is called.

◆ read

void read ( )
slot

Use the fileFormat() to read fileName() into molecule().

◆ write

void write ( )
slot

Use the fileFormat() to write fileName() from molecule().