/** * @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 #include 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