#pragma once #include "nmSubWxs_global.h" #include #include class QCheckBox; class QVariant; class QListWidget; class QTextEdit; class nmWxSelectWellItemWidget: public QWidget { Q_OBJECT public: nmWxSelectWellItemWidget(); nmWxSelectWellItemWidget(QWidget* parent, QString name, QVariant value); void setSelected(bool selected); bool getSelected(); void toggleSelected(); private: void initUI(); protected: void mousePressEvent(QMouseEvent *event) override; signals: void sigItemClicked(); private slots: void onStateChanged(int); private: QCheckBox* m_pCBox; QString m_sName; QVariant m_iValue; }; class NM_SUB_WXS_EXPORT nmWxSelectWellsWidget : public QWidget { Q_OBJECT public: nmWxSelectWellsWidget(QWidget* aParent = NULL); public: void addItems(QStringList items, QList values); void addItem(QString name, QVariant value); QStringList getItems(); private: QListWidget* m_pListWidget; QTextEdit* m_pLineEdit; QStringList m_items; QList m_values; private slots: void onUpdateSelections(); };