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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
|
|
|
|
|
#include "iPlugin_global.h"
|
|
|
|
|
|
|
|
|
|
// 自定义Combobox 失去焦点是能够自动隐藏
|
|
|
|
|
class I_PLUGIN_EXPORT ZxTableHeaderViewCbx :public QComboBox
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
explicit ZxTableHeaderViewCbx(bool bMultiSelMode, QWidget *parent = 0);
|
|
|
|
|
~ZxTableHeaderViewCbx();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// hidePopup 重写隐藏下拉列表
|
|
|
|
|
void hidePopup();
|
|
|
|
|
|
|
|
|
|
// 所在列索引
|
|
|
|
|
void setColumnIndex(int nIndex);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 重写失去焦点事件
|
|
|
|
|
void focusOutEvent(QFocusEvent *e);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
// 选择改变(多选)
|
|
|
|
|
void sigSelChanged(const int, const QStringList);
|
|
|
|
|
|
|
|
|
|
// 选择改变(单选)
|
|
|
|
|
void sigSelChanged(const int, const QString);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 列索引
|
|
|
|
|
int m_nCurIndex;
|
|
|
|
|
|
|
|
|
|
// 是否多选模式
|
|
|
|
|
bool m_bMultiSelMode;
|
|
|
|
|
|
|
|
|
|
// 每次都发送两遍消息,奇怪
|
|
|
|
|
int m_nLastSendIndex;
|
|
|
|
|
QString m_sLastSendText;
|
|
|
|
|
};
|