You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/nmNum/nmSubWxs/nmWxSelectWellsWidget.h

55 lines
1.1 KiB
C

#pragma once
#include "nmSubWxs_global.h"
#include <QComboBox>
#include <QList>
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<QVariant> values);
void addItem(QString name, QVariant value);
QStringList getItems();
private:
QListWidget* m_pListWidget;
QTextEdit* m_pLineEdit;
QStringList m_items;
QList<QVariant> m_values;
private slots:
void onUpdateSelections();
};