Candidate_v1.7.0
        stable
      
      
      
| Line |   | 
|---|
| 1 | /*
 | 
|---|
| 2 |  * QtMoleculeItemFactory.hpp
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  *  Created on: Jan 18, 2015
 | 
|---|
| 5 |  *      Author: heber
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef QTMOLECULEITEMFACTORY_HPP_
 | 
|---|
| 9 | #define QTMOLECULEITEMFACTORY_HPP_
 | 
|---|
| 10 | 
 | 
|---|
| 11 | // include config.h
 | 
|---|
| 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
| 13 | #include <config.h>
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | #include <QList>
 | 
|---|
| 17 | 
 | 
|---|
| 18 | #include <string>
 | 
|---|
| 19 | 
 | 
|---|
| 20 | #include "UIElements/Views/Qt4/MoleculeList/QtMoleculeItem.hpp"
 | 
|---|
| 21 | 
 | 
|---|
| 22 | #include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp"
 | 
|---|
| 23 | 
 | 
|---|
| 24 | /** This class is a factory for a list of QtMoleculeItem's.
 | 
|---|
| 25 |  *
 | 
|---|
| 26 |  * QtMoleculeList contains these per row, either a group item which combines
 | 
|---|
| 27 |  * molecules of the same formula, or a molecule item which represents a single
 | 
|---|
| 28 |  * molecule.
 | 
|---|
| 29 |  */
 | 
|---|
| 30 | struct QtMoleculeItemFactory
 | 
|---|
| 31 | {
 | 
|---|
| 32 | 
 | 
|---|
| 33 |   static const int COLUMNCOUNT;
 | 
|---|
| 34 |   static const char *COLUMNNAMES[];
 | 
|---|
| 35 | 
 | 
|---|
| 36 |   /** Creates all QtMoleculeItem's that make up the row for a single molecule.
 | 
|---|
| 37 |    *
 | 
|---|
| 38 |    * \param _ObservedMolecule observed representation of the molecule
 | 
|---|
| 39 |    * \return list of prepared items to be appended to a group item
 | 
|---|
| 40 |    */
 | 
|---|
| 41 |   static QList<QStandardItem *> createMoleculeItems(
 | 
|---|
| 42 |       QtObservedMolecule::ptr &_ObservedMolecule);
 | 
|---|
| 43 | 
 | 
|---|
| 44 |   /** Creates all QtMoleculeItem's that make up a row of a group item.
 | 
|---|
| 45 |    *
 | 
|---|
| 46 |    * \param _formula chemical formula which describes all molecules in this group
 | 
|---|
| 47 |    * \return list of prepared items to be appended to the invisibleRootItem()
 | 
|---|
| 48 |    */
 | 
|---|
| 49 |   static QList<QStandardItem *> createGroupItems(const std::string &_formula);
 | 
|---|
| 50 | };
 | 
|---|
| 51 | 
 | 
|---|
| 52 | 
 | 
|---|
| 53 | #endif /* QTMOLECULEITEMFACTORY_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.