Loading...
Searching...
No Matches
molecularFileDialog.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
#define BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
# include <BALL/VIEW/KERNEL/modularWidget.h>
#endif
#ifndef BALL_VIEW_KERNEL_COMMON_H
# include <BALL/VIEW/KERNEL/common.h>
#endif
class QMenu;
namespace BALL
{
class System;
namespace VIEW
{
class BALL_VIEW_EXPORT MolecularFileDialog
: public QWidget,
public ModularWidget
{
Q_OBJECT
public:
BALL_EMBEDDABLE(MolecularFileDialog, ModularWidget)
MolecularFileDialog(QWidget* parent = 0, const char* name = "MolecularFileDialog");
virtual ~MolecularFileDialog();
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* openACFile();
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* readACFile(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 writeACFile(String filename, const System& system);
bool writeXYZFile(String filename, const System& system);
virtual void checkMenu(MainControl& main_control);
virtual String getSupportedFileFormats() const;
virtual String getSupportedFileFormatsList() const;
void setReadPDBModels(bool read) { read_all_pdb_models_ = read; }
public Q_SLOTS:
virtual void readFiles();
virtual bool writeFile();
protected:
virtual void onNotify(Message *message);
// Only for Python interface
MolecularFileDialog(const MolecularFileDialog& mfd);
virtual bool finish_(const String& filename, const String& system_name, System* system);
System* openFile_(String type);
enum FileFormats
{
PDB_FILE = 0,
HIN_FILE,
MOL_FILE,
MOL2_FILE,
SD_FILE,
XYZ_FILE
};
QAction* save_id_, *open_id_;
String file_format_;
bool read_all_pdb_models_;
};
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_DIALOGS_MOLECULARFILEDIALOG_H
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
common.h
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
BALL::VIEW::MainControl
Definition mainControl.h:118
BALL::VIEW::Message
Definition message.h:53
BALL::VIEW::ModularWidget::ModularWidget
ModularWidget(const char *name="<ModularWidget>")
BALL::VIEW::MolecularFileDialog::openFile
virtual bool openFile(const String &filename)
BALL::VIEW::MolecularFileDialog::FileFormats
FileFormats
Definition molecularFileDialog.h:216
BALL::VIEW::MolecularFileDialog::MOL2_FILE
@ MOL2_FILE
Definition molecularFileDialog.h:220
BALL::VIEW::MolecularFileDialog::PDB_FILE
@ PDB_FILE
Definition molecularFileDialog.h:217
BALL::VIEW::MolecularFileDialog::MOL_FILE
@ MOL_FILE
Definition molecularFileDialog.h:219
BALL::VIEW::MolecularFileDialog::XYZ_FILE
@ XYZ_FILE
Definition molecularFileDialog.h:222
BALL::VIEW::MolecularFileDialog::HIN_FILE
@ HIN_FILE
Definition molecularFileDialog.h:218
BALL::VIEW::MolecularFileDialog::SD_FILE
@ SD_FILE
Definition molecularFileDialog.h:221
BALL::VIEW::MolecularFileDialog::writeSDFile
bool writeSDFile(String filename, const System &system)
BALL::VIEW::MolecularFileDialog::readSDFile
System * readSDFile(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::writeMOL2File
bool writeMOL2File(String filename, const System &system)
BALL::VIEW::MolecularFileDialog::openMOLFile
System * openMOLFile()
BALL::VIEW::MolecularFileDialog::checkMenu
virtual void checkMenu(MainControl &main_control)
Overloaded from ModularWidget.
BALL::VIEW::MolecularFileDialog::finish_
virtual bool finish_(const String &filename, const String &system_name, System *system)
BALL::VIEW::MolecularFileDialog::readPDBFile
System * readPDBFile(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::readMOL2File
System * readMOL2File(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::openACFile
System * openACFile()
BALL::VIEW::MolecularFileDialog::MolecularFileDialog
MolecularFileDialog(const MolecularFileDialog &mfd)
BALL::VIEW::MolecularFileDialog::onNotify
virtual void onNotify(Message *message)
BALL::VIEW::MolecularFileDialog::getSupportedFileFormats
virtual String getSupportedFileFormats() const
BALL::VIEW::MolecularFileDialog::writeACFile
bool writeACFile(String filename, const System &system)
BALL::VIEW::MolecularFileDialog::initializeWidget
virtual void initializeWidget(MainControl &main_control)
BALL::VIEW::MolecularFileDialog::canHandle
virtual bool canHandle(const String &fileformat) const
BALL::VIEW::MolecularFileDialog::read_all_pdb_models_
bool read_all_pdb_models_
Definition molecularFileDialog.h:227
BALL::VIEW::MolecularFileDialog::openMolecularFile
virtual System * openMolecularFile(const String &file)
BALL::VIEW::MolecularFileDialog::openMOL2File
System * openMOL2File()
BALL::VIEW::MolecularFileDialog::openXYZFile
System * openXYZFile()
BALL::VIEW::MolecularFileDialog::readHINFile
System * readHINFile(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::writeFile
virtual bool writeFile()
BALL::VIEW::MolecularFileDialog::writeHINFile
bool writeHINFile(String filename, const System &system)
BALL::VIEW::MolecularFileDialog::getSupportedFileFormatsList
virtual String getSupportedFileFormatsList() const
BALL::VIEW::MolecularFileDialog::file_format_
String file_format_
Definition molecularFileDialog.h:226
BALL::VIEW::MolecularFileDialog::openHINFile
System * openHINFile()
BALL::VIEW::MolecularFileDialog::openPDBFile
System * openPDBFile()
BALL::VIEW::MolecularFileDialog::save_id_
QAction * save_id_
Definition molecularFileDialog.h:225
BALL::VIEW::MolecularFileDialog::setReadPDBModels
void setReadPDBModels(bool read)
Definition molecularFileDialog.h:184
BALL::VIEW::MolecularFileDialog::readMOLFile
System * readMOLFile(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::readACFile
System * readACFile(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::openFile_
System * openFile_(String type)
BALL::VIEW::MolecularFileDialog::open_id_
QAction * open_id_
Definition molecularFileDialog.h:225
BALL::VIEW::MolecularFileDialog::MolecularFileDialog
MolecularFileDialog(QWidget *parent=0, const char *name="MolecularFileDialog")
BALL::VIEW::MolecularFileDialog::writeXYZFile
bool writeXYZFile(String filename, const System &system)
BALL::VIEW::MolecularFileDialog::readXYZFile
System * readXYZFile(String filename, String system_name)
BALL::VIEW::MolecularFileDialog::openSDFile
System * openSDFile()
BALL::VIEW::MolecularFileDialog::writeMOLFile
bool writeMOLFile(String filename, const System &system)
BALL::VIEW::MolecularFileDialog::readFiles
virtual void readFiles()
BALL::VIEW::MolecularFileDialog::writePDBFile
bool writePDBFile(String filename, const System &system)
QWidget
BALL_EMBEDDABLE
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
modularWidget.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13