Loading...
Searching...
No Matches
BALL::VIEW::MolecularFileDialog Class Reference
Visualisation » QT Dialogs

`#include <BALL/VIEW/DIALOGS/molecularFileDialog.h>`

Inheritance diagram for BALL::VIEW::MolecularFileDialog:

## 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 * | 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)
| Overloaded from ModularWidget.
virtual String | getSupportedFileFormats () const
virtual String | getSupportedFileFormatsList () const
void | setReadPDBModels (bool read)
Public Member Functions inherited from BALL::VIEW::ModularWidget
| ModularWidget (const char *name="<ModularWidget>")
| ModularWidget (const ModularWidget &widget)
virtual | ~ModularWidget ()
virtual void | destroy ()
virtual void | clear ()
QAction * | insertMenuEntry (Position parent_id, const QString &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence(), const QString &menu_hint=QString(""), UIOperationMode::OperationMode minimal_mode=UIOperationMode::MODE_ALL)
BALL_DEPRECATED void | setMenuHelp (QAction *, const String &)
virtual BALL_DEPRECATED void | registerForHelpSystem (const QObject *, const String &)
virtual void | addToolBarEntries (QToolBar *main_tb)
void | setIcon (QAction *action, const String &filename, bool add_to_main_toolbar=true)
virtual void | initializePreferencesTab (Preferences &preferences)
virtual void | finalizePreferencesTab (Preferences &preferences)
virtual void | applyPreferences ()
virtual void | fetchPreferences (INIFile &inifile)
virtual void | writePreferences (INIFile &inifile)
bool | lockComposites ()
bool | unlockComposites ()
| Unlock the Composites.
MainControl * | getMainControl () const
virtual void | setStatusbarText (const String &text, bool important=false)
virtual void | setStatusbarText (const QString &text, bool important=false)
String | getWorkingDir ()
| Implemented for convenience.
void | setWorkingDir (const String &dir)
| Implemented for convenience.
FragmentDB & | getFragmentDB () const
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
void | setWorkingDirFromFilename_ (String filename)
virtual BALL_DEPRECATED void | showHelp (const String &)
virtual void | finalizeWidget (MainControl &main_control)
Public Member Functions inherited from BALL::Embeddable
| Embeddable (const String &identifier="<Embeddable>")
| Embeddable (const Embeddable &embeddable)
virtual | ~Embeddable ()
void | setIdentifier (const String &identifier)
const String & | getIdentifier () const
void | unregisterThis ()
virtual void | registerThis ()
Public Member Functions inherited from BALL::VIEW::ConnectionObject
| ConnectionObject ()
virtual | ~ConnectionObject ()
void | registerConnectionObject (ConnectionObject &object)
void | unregisterConnectionObject (ConnectionObject &object)
bool | isConnectionObjectRegistered (const ConnectionObject &object)
ConnectionObject * | getParent () const
ConnectionObject * | getRoot ()
virtual bool | isValid () const

## 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)
void | notify_ (Message *message)
void | notify_ (Message &message)
void | onNotify_ (Message *message)

## Protected Attributes

QAction * | save_id_
QAction * | open_id_
String | file_format_
bool | read_all_pdb_models_
QAction * | window_menu_entry_
bool | show_window_enty_
bool | default_visible_
QList< QAction * > | main_toolbar_actions_

## Additional Inherited Members

Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
static void | registerWidget (ModularWidget *mwidget)
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance)
static void | unregisterInstance_ (const Embeddable *instance)
static Size | countInstances_ (const std::type_info &type)
static Embeddable * | getInstance_ (const std::type_info &type, Position index)
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier)

## Detailed Description

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:

  HIN, MOL, MOL2, PDB, SD, XYZ

  Upon reading a file, the information will be stored in a System. This class can also take a System and write it in one of the supported file formats. This class is derived from ModularWidget.

See also
  HINFile
  MOLFile
  MOL2File
  PDBFile
  SDFile
  XYZFile

Definition at line 45 of file molecularFileDialog.h.

## Member Enumeration Documentation

## FileFormats

enum BALL::VIEW::MolecularFileDialog::FileFormats

protected

Enumerator
PDB_FILE |
HIN_FILE |
MOL_FILE |
MOL2_FILE |
SD_FILE |
XYZ_FILE |

Definition at line 215 of file molecularFileDialog.h.

## Constructor & Destructor Documentation

## MolecularFileDialog() [1/2]

BALL::VIEW::MolecularFileDialog::MolecularFileDialog | ( | QWidget * | parent = 0,
|  | const char * | name = "MolecularFileDialog" )

Default Constructor. Calls ModularWidget::registerWidget()

## ~MolecularFileDialog()

virtual BALL::VIEW::MolecularFileDialog::~MolecularFileDialog | ( |  | ) |

virtual

Destructor.

## MolecularFileDialog() [2/2]

BALL::VIEW::MolecularFileDialog::MolecularFileDialog | ( | const MolecularFileDialog & | mfd | ) |

protected

## Member Function Documentation

## canHandle()

virtual bool BALL::VIEW::MolecularFileDialog::canHandle | ( | const String & | fileformat | ) | const

virtual

Test if this ModularWidget can handle a given file format. (Overloaded from ModularWidget)

Parameters

  fileform | short string with the file extension (e.g. PDB)

See also
  openFile

Reimplemented from BALL::VIEW::ModularWidget.

## checkMenu()

virtual void BALL::VIEW::MolecularFileDialog::checkMenu | ( | MainControl & | main_control | ) |

virtual

Overloaded from ModularWidget.

Reimplemented from BALL::VIEW::ModularWidget.

## finish_()

virtual bool BALL::VIEW::MolecularFileDialog::finish_ | ( | const String & | filename,
|  | const String & | system_name,
|  | System * | system )

protected virtual

## getSupportedFileFormats()

virtual String BALL::VIEW::MolecularFileDialog::getSupportedFileFormats | ( |  | ) | const

virtual

## getSupportedFileFormatsList()

virtual String BALL::VIEW::MolecularFileDialog::getSupportedFileFormatsList | ( |  | ) | const

virtual

## initializeWidget()

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().

Parameters

  main_control | the MainControl object to be initialized

See also
  finalizeWidget

Reimplemented from BALL::VIEW::ModularWidget.

## onNotify()

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.

Parameters

  message | a pointer to a message. Do not delete the message in this method.

Reimplemented from BALL::VIEW::ConnectionObject.

## openACFile()

System * BALL::VIEW::MolecularFileDialog::openACFile | ( |  | ) |

## openFile()

virtual bool BALL::VIEW::MolecularFileDialog::openFile | ( | const String & | filename | ) |

virtual

Tell this ModularWidget to open a given file. (Overloaded from ModularWidget)

See also
  canHandle

Reimplemented from BALL::VIEW::ModularWidget.

## openFile_()

System * BALL::VIEW::MolecularFileDialog::openFile_ | ( | String | type | ) |

protected

## openHINFile()

System * BALL::VIEW::MolecularFileDialog::openHINFile | ( |  | ) |

## openMOL2File()

System * BALL::VIEW::MolecularFileDialog::openMOL2File | ( |  | ) |

## openMolecularFile() [1/2]

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.

## openMolecularFile() [2/2]

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.

## openMOLFile()

System * BALL::VIEW::MolecularFileDialog::openMOLFile | ( |  | ) |

## openPDBFile()

System * BALL::VIEW::MolecularFileDialog::openPDBFile | ( |  | ) |

## openSDFile()

System * BALL::VIEW::MolecularFileDialog::openSDFile | ( |  | ) |

## openXYZFile()

System * BALL::VIEW::MolecularFileDialog::openXYZFile | ( |  | ) |

## readACFile()

System * BALL::VIEW::MolecularFileDialog::readACFile | ( | String | filename,
|  | String | system_name )

Read an AC file

## readFiles

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.

See also
  CompositeMessage
  ConnectionObject

## readHINFile()

System * BALL::VIEW::MolecularFileDialog::readHINFile | ( | String | filename,
|  | String | system_name )

Read a HIN file

## readMOL2File()

System * BALL::VIEW::MolecularFileDialog::readMOL2File | ( | String | filename,
|  | String | system_name )

Read a MOL2 file

## readMOLFile()

System * BALL::VIEW::MolecularFileDialog::readMOLFile | ( | String | filename,
|  | String | system_name )

Read a MOL file

## readPDBFile()

System * BALL::VIEW::MolecularFileDialog::readPDBFile | ( | String | filename,
|  | String | system_name )

Read a PDB file

## readSDFile()

System * BALL::VIEW::MolecularFileDialog::readSDFile | ( | String | filename,
|  | String | system_name )

Read a SD file

## readXYZFile()

System * BALL::VIEW::MolecularFileDialog::readXYZFile | ( | String | filename,
|  | String | system_name )

Read a XYZ file

## setReadPDBModels()

void BALL::VIEW::MolecularFileDialog::setReadPDBModels | ( | bool | read | ) |

inline

Definition at line 184 of file molecularFileDialog.h.

## writeACFile()

bool BALL::VIEW::MolecularFileDialog::writeACFile | ( | String | filename,
|  | const System & | system )

Write an AC file

## writeFile

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.

## writeHINFile()

bool BALL::VIEW::MolecularFileDialog::writeHINFile | ( | String | filename,
|  | const System & | system )

Write a HIN file

## writeMOL2File()

bool BALL::VIEW::MolecularFileDialog::writeMOL2File | ( | String | filename,
|  | const System & | system )

Write a MOL2 file

## writeMOLFile()

bool BALL::VIEW::MolecularFileDialog::writeMOLFile | ( | String | filename,
|  | const System & | system )

Write a MOL file

## writePDBFile()

bool BALL::VIEW::MolecularFileDialog::writePDBFile | ( | String | filename,
|  | const System & | system )

Write a PDB file

## writeSDFile()

bool BALL::VIEW::MolecularFileDialog::writeSDFile | ( | String | filename,
|  | const System & | system )

Write a SD file

## writeXYZFile()

bool BALL::VIEW::MolecularFileDialog::writeXYZFile | ( | String | filename,
|  | const System & | system )

Write a XYZ file

## Member Data Documentation

## file_format_

String BALL::VIEW::MolecularFileDialog::file_format_

protected

Definition at line 226 of file molecularFileDialog.h.

## open_id_

QAction * BALL::VIEW::MolecularFileDialog::open_id_

protected

Definition at line 225 of file molecularFileDialog.h.

## read_all_pdb_models_

bool BALL::VIEW::MolecularFileDialog::read_all_pdb_models_

protected

Definition at line 227 of file molecularFileDialog.h.

## save_id_

QAction* BALL::VIEW::MolecularFileDialog::save_id_

protected

Definition at line 225 of file molecularFileDialog.h.