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.
51 lines
1.0 KiB
C
51 lines
1.0 KiB
C
3 weeks ago
|
#pragma once
|
||
|
|
||
|
#include "nmSubWxs_global.h"
|
||
|
#include <QComboBox>
|
||
|
#include <QList>
|
||
|
|
||
|
class QCheckBox;
|
||
|
class QVariant;
|
||
|
class QListWidget;
|
||
|
|
||
|
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:
|
||
|
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);
|
||
|
private:
|
||
|
QListWidget* m_pListWidget;
|
||
|
QLineEdit* m_pLineEdit;
|
||
|
QStringList m_items;
|
||
|
QList<QVariant> m_values;
|
||
|
|
||
|
private slots:
|
||
|
void onUpdateSelections();
|
||
|
};
|