Debian Codegraph @

avogadro/qtplugins/apbs/opendxreader.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_QTPLUGINS_APBS_OPENDXREADER_H
7 #define AVOGADRO_QTPLUGINS_APBS_OPENDXREADER_H
8
9 #include <QtCore/QString>
10
11 namespace Avogadro {
12
13 namespace Core {
14 class Cube;
15 }
16
17 namespace QtPlugins {
18
19 /**
20 * @brief Provide a reader for OpenDX files.
21 */
22 class OpenDxReader
23 {
24 public:
25 /**
26 * Constructor for OpenDxReader.
27 */
28 OpenDxReader() = default;
29
30 /**
31 * Destructor for OpenDxReader.
32 */
33 ~OpenDxReader() = default;
34
35 /**
36 * Reads the file with the given @fileName. Returns false if an error
37 * occurs.
38 */
39 bool readFile(const QString& fileName);
40
41 /**
42 * @return String describing the last error that occurred.
43 */
44 QString errorString() const;
45
46 /**
47 * Returns the potential energy cube read from the file. Returns 0 if no file
48 * has been successfully read.
49 */
50 Core::Cube* cube() const;
51
52 private:
53 Core::Cube* m_cube = nullptr;
54 QString m_errorString;
55 };
56 } // namespace QtPlugins
57 } // namespace Avogadro
58
59 #endif // AVOGADRO_QTPLUGINS_APBS_OPENDXREADER_H