/* * QtPotentialList.hpp * * Created on: Aug 17, 2025 * Author: heber */ #ifndef QTPOTENTIALLIST_H_ #define QTPOTENTIALLIST_H_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "CodePatterns/Observer/Observer.hpp" #include class QTreeWidget; class QtPotentialList: public QWidget, public Observer { Q_OBJECT public: QtPotentialList(QWidget * _parent=0); virtual ~QtPotentialList(); protected: virtual void update(Observable *publisher); virtual void subjectKilled(Observable *publisher); virtual void paintEvent(QPaintEvent * event); static const int COLUMNCOUNT; enum {NUMBER, NAME,CHARGES,PARAMETERS,COLUMNTYPES_MAX} COLUMNTYPES; static const char *COLUMNNAMES[]; private slots: void refill(); signals: void changed(); void needsRefill(); private: //!> flag to indicate that we got an update bool dirty; //!> flag to indicate whether we are subscribed to PotentialRegistry bool potentialregistry_enabled; mutable boost::recursive_mutex refill_mutex; private: QTreeWidget *treewidget; }; #endif /* QTPOTENTIALLIST_H_ */