qskinny/inputcontext/QskPinyinCompositionModel.h

40 lines
1.1 KiB
C
Raw Normal View History

2018-02-06 13:55:35 +00:00
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
2017-07-21 16:21:34 +00:00
#ifndef QSK_PINYIN_COMPOSITION_MODEL_H
#define QSK_PINYIN_COMPOSITION_MODEL_H
#include "QskInputCompositionModel.h"
class QskPinyinCompositionModel : public QskInputCompositionModel
{
Q_OBJECT
public:
QskPinyinCompositionModel();
virtual ~QskPinyinCompositionModel() override;
virtual bool supportsSuggestions() const override final;
2017-07-21 16:21:34 +00:00
int candidateCount() const override;
QString candidate( int ) const override;
2017-07-21 16:21:34 +00:00
QVector< Qt::Key > groups() const override;
protected:
// Used for text composition
bool hasIntermediate() const override;
QString polishPreedit( const QString& preedit ) override;
bool isComposable( const QStringRef& preedit ) const override;
2017-07-21 16:21:34 +00:00
private:
void handleGroupIndexChanged();
class PrivateData;
std::unique_ptr< PrivateData > m_data;
};
#endif // QSK_PINYIN_COMPOSITION_MODEL_H