Molecular editor: Enable loading molecules in other formats than cml

Authored by christianschaerf on Dec 3 2019, 6:08 AM.

Description

Molecular editor: Enable loading molecules in other formats than cml

Summary:
This patch implements loading Molecules in the XYZ and PDB formats by instantiating the appropriate subclass of Avogadro::Io::FileFormat
based on the file ending.

Additionally, some error handling code was added so Kalzium does not crash when loading a molecule fails.

Note that this patch requires C++14 since make_unique is used. Should it, for some reason, not be possible to include C++14-only code into Kalzium,
this can be worked around by constructing a std::unique_ptr with raw new.

Reviewers: Kalzium, yurchor

Reviewed By: yurchor

Subscribers: aacid, yurchor, kde-edu

Tags: KDE Edu, Kalzium

Differential Revision: https://phabricator.kde.org/D25648

Details