logplus/Workflow/WFCrystal/Crystal/include/SmartCompleter.h
2026-01-16 17:18:41 +08:00

41 lines
972 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @file SmartCompleter.h
* @brief 定制Completer类实现包含匹配
* @date 2015-04-30
*/
#ifndef PAI_FRAME_CRYSTAL_SMARTCOMPLETER_H
#define PAI_FRAME_CRYSTAL_SMARTCOMPLETER_H
#include "Turtle.h"
#include <QCompleter>
#include <QStringListModel>
namespace pai
{
/**
* @class SmartCompleter
* @brief PAI系统定制Completer类实现包含匹配
*/
class PAI_CRYSTAL_EXPORT SmartCompleter: public QCompleter
{
public:
/**
* @brief 构造函数
* @param[in] pModel 基础的匹配字符串集
* @param[in] pParent 父对象
*/
SmartCompleter(QStringListModel *pModel, QObject * pParent);
/**
* @brief 根据文本更新模型m_model
* @param[in] word 文本
*/
void Update(const QString& word);
private:
QStringListModel m_model; ///< completer当前的字符串模型
QStringListModel* m_pBaseModel; ///< 基础字符串模型
};
}
#endif ///< PAI_FRAME_CRYSTAL_SMARTCOMPLETER_H