Debian Codegraph @

avogadro/qtplugins/vibrations/vibrationmodel.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_VIBRATIONMODEL_H
7 #define AVOGADRO_QTPLUGINS_VIBRATIONMODEL_H
8
9 #include <QtCore/QAbstractItemModel>
10
11 namespace Avogadro {
12 namespace QtGui {
13 class Molecule;
14 }
15 namespace QtPlugins {
16
17 class VibrationModel : public QAbstractItemModel
18 {
19 public:
20 explicit VibrationModel(QObject* p = nullptr);
21
22 QModelIndex parent(const QModelIndex& child) const override;
23 int rowCount(const QModelIndex& parent) const override;
24 int columnCount(const QModelIndex& parent) const override;
25
26 Qt::ItemFlags flags(const QModelIndex& index) const override;
27
28 QVariant headerData(int section, Qt::Orientation orientation,
29 int role) const override;
30
31 bool setData(const QModelIndex& index, const QVariant& value,
32 int role) override;
33 QVariant data(const QModelIndex& index, int role) const override;
34
35 QModelIndex index(int row, int column,
36 const QModelIndex& parent = QModelIndex()) const override;
37
38 void clear();
39
40 void setMolecule(QtGui::Molecule* mol);
41
42 signals:
43
44 public slots:
45
46 private:
47 QtGui::Molecule* m_molecule;
48 bool m_hasRaman;
49 };
50 } // namespace QtPlugins
51 } // namespace Avogadro
52
53 #endif // AVOGADRO_QTPLUGINS_VIBRATIONMODEL_H