#include <BALL/VIEW/DIALOGS/molecularFileDialog.h>
Public Slots | |
virtual void | readFiles () |
virtual bool | writeFile () |
Public Member Functions | |
MolecularFileDialog (QWidget *parent=0, const char *name="MolecularFileDialog") | |
virtual | ~MolecularFileDialog () |
Destructor. | |
virtual void | initializeWidget (MainControl &main_control) |
virtual bool | canHandle (const String &fileformat) const |
virtual bool | openFile (const String &filename) |
virtual System * | openMolecularFile (const String &file) |
virtual System * | openMolecularFile (const String &filename, const String &filetype, const String &system_name) |
System * | openPDBFile () |
System * | openHINFile () |
System * | openMOLFile () |
System * | openMOL2File () |
System * | openSDFile () |
System * | openXYZFile () |
System * | readPDBFile (String filename, String system_name) |
System * | readHINFile (String filename, String system_name) |
System * | readMOLFile (String filename, String system_name) |
System * | readMOL2File (String filename, String system_name) |
System * | readSDFile (String filename, String system_name) |
System * | readXYZFile (String filename, String system_name) |
bool | writePDBFile (String filename, const System &system) |
bool | writeHINFile (String filename, const System &system) |
bool | writeMOLFile (String filename, const System &system) |
bool | writeMOL2File (String filename, const System &system) |
bool | writeSDFile (String filename, const System &system) |
bool | writeXYZFile (String filename, const System &system) |
virtual void | checkMenu (MainControl &main_control) |
Overloaded from ModularWidget. | |
virtual String | getSupportedFileFormats () const |
virtual String | getSupportedFileFormatsList () const |
void | setReadPDBModels (bool read) |
Protected Types | |
enum | FileFormats { PDB_FILE = 0, HIN_FILE, MOL_FILE, MOL2_FILE, SD_FILE, XYZ_FILE } |
Protected Member Functions | |
virtual void | onNotify (Message *message) |
MolecularFileDialog (const MolecularFileDialog &mfd) | |
virtual bool | finish_ (const String &filename, const String &system_name, System *system) |
System * | openFile_ (String type) |
Protected Attributes | |
QAction * | save_id_ |
QAction * | open_id_ |
String | file_format_ |
bool | read_all_pdb_models_ |
Dialog for opening molecular data files. This class is used to read or write Molecular files in one of several file formats. Currently supported file formats are:
enum BALL::VIEW::MolecularFileDialog::FileFormats [protected] |
BALL::VIEW::MolecularFileDialog::MolecularFileDialog | ( | QWidget * | parent = 0 , |
|
const char * | name = "MolecularFileDialog" | |||
) |
Default Constructor. Calls ModularWidget::registerWidget()
virtual BALL::VIEW::MolecularFileDialog::~MolecularFileDialog | ( | ) | [virtual] |
Destructor.
BALL::VIEW::MolecularFileDialog::MolecularFileDialog | ( | const MolecularFileDialog & | mfd | ) | [protected] |
virtual bool BALL::VIEW::MolecularFileDialog::canHandle | ( | const String & | fileformat | ) | const [virtual] |
Test if this ModularWidget can handle a given file format. (Overloaded from ModularWidget)
fileform | short string with the file extension (e.g. PDB) |
Reimplemented from BALL::VIEW::ModularWidget.
virtual void BALL::VIEW::MolecularFileDialog::checkMenu | ( | MainControl & | main_control | ) | [virtual] |
Overloaded from ModularWidget.
Reimplemented from BALL::VIEW::ModularWidget.
virtual bool BALL::VIEW::MolecularFileDialog::finish_ | ( | const String & | filename, | |
const String & | system_name, | |||
System * | system | |||
) | [protected, virtual] |
virtual String BALL::VIEW::MolecularFileDialog::getSupportedFileFormats | ( | ) | const [virtual] |
virtual String BALL::VIEW::MolecularFileDialog::getSupportedFileFormatsList | ( | ) | const [virtual] |
virtual void BALL::VIEW::MolecularFileDialog::initializeWidget | ( | MainControl & | main_control | ) | [virtual] |
Initializes the menu entries in File. This method is called automatically immediately before the main application is started. This method will be called MainControl::show().
main_control | the MainControl object to be initialized |
Reimplemented from BALL::VIEW::ModularWidget.
virtual void BALL::VIEW::MolecularFileDialog::onNotify | ( | Message * | message | ) | [protected, virtual] |
Message handling method. This method handles messages sent to this connectionObject. If a certain message should be processed for this connectionObject this method must be overridden. With the help of the RTTI methods one can easily determine if an incoming message is relevant for this connectionObject. See Message for further information concerning messages.
message | a pointer to a message. Do not delete the message in this method. |
Reimplemented from BALL::VIEW::ConnectionObject.
Tell this ModularWidget to open a given file. (Overloaded from ModularWidget)
Reimplemented from BALL::VIEW::ModularWidget.
System* BALL::VIEW::MolecularFileDialog::openHINFile | ( | ) |
System* BALL::VIEW::MolecularFileDialog::openMOL2File | ( | ) |
virtual System* BALL::VIEW::MolecularFileDialog::openMolecularFile | ( | const String & | filename, | |
const String & | filetype, | |||
const String & | system_name | |||
) | [virtual] |
Wrapper for the read methods. The filetype String is used to indentify the file type (HIN, PDP, MOL, MOL2). It is possible to give the system a designated name, otherwise it is named by the file.
virtual System* BALL::VIEW::MolecularFileDialog::openMolecularFile | ( | const String & | file | ) | [virtual] |
Open a given molecular file. The file type is identified by the filename extension. This method can be used to load molecular files, which were given as command line arguments.
Referenced by BALL::VIEW::DemoTutorialDialog::nextStepDemo_().
System* BALL::VIEW::MolecularFileDialog::openMOLFile | ( | ) |
System* BALL::VIEW::MolecularFileDialog::openPDBFile | ( | ) |
System* BALL::VIEW::MolecularFileDialog::openSDFile | ( | ) |
System* BALL::VIEW::MolecularFileDialog::openXYZFile | ( | ) |
virtual void BALL::VIEW::MolecularFileDialog::readFiles | ( | ) | [virtual, slot] |
Open a molecular file. This method tries to open and read a molecular file, selected from a QFileDialog, and, if susccesfull, converts is into a System. Then it sends a CompositeMessage containing the System to the other ConnectionObject instances.
Read a HIN file
Read a MOL2 file
Read a MOL file
Read a PDB file
Read a SD file
Read a XYZ file
void BALL::VIEW::MolecularFileDialog::setReadPDBModels | ( | bool | read | ) | [inline] |
virtual bool BALL::VIEW::MolecularFileDialog::writeFile | ( | ) | [virtual, slot] |
Write a molecular file. This method takes a System and saves it into a molecular file, selected from a QFileDialog.
Write a HIN file
Write a MOL2 file
Write a MOL file
Write a PDB file
Write a SD file
Write a XYZ file
String BALL::VIEW::MolecularFileDialog::file_format_ [protected] |
QAction * BALL::VIEW::MolecularFileDialog::open_id_ [protected] |
QAction* BALL::VIEW::MolecularFileDialog::save_id_ [protected] |