2018-02-06 14:55:35 +01: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 18:21:34 +02:00
|
|
|
#ifndef QSK_INPUT_COMPOSITION_MODEL_H
|
|
|
|
#define QSK_INPUT_COMPOSITION_MODEL_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class QskInputCompositionModel : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-04-20 08:52:26 +02:00
|
|
|
enum Attribute
|
|
|
|
{
|
|
|
|
Words = 1 << 0
|
|
|
|
};
|
|
|
|
|
|
|
|
Q_ENUM( Attribute )
|
|
|
|
Q_DECLARE_FLAGS( Attributes, Attribute )
|
|
|
|
|
2017-07-21 18:21:34 +02:00
|
|
|
virtual ~QskInputCompositionModel();
|
|
|
|
|
2018-04-23 14:06:40 +02:00
|
|
|
virtual void requestCandidates( const QString& preedit ) = 0;
|
|
|
|
virtual void resetCandidates() = 0;
|
2018-04-20 08:52:26 +02:00
|
|
|
|
|
|
|
virtual int candidateCount() const = 0;
|
|
|
|
virtual QString candidate( int ) const = 0;
|
2018-03-30 01:15:05 -07:00
|
|
|
|
2018-04-20 08:52:26 +02:00
|
|
|
Attributes attributes() const;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void candidatesChanged();
|
|
|
|
|
2018-04-23 14:06:40 +02:00
|
|
|
protected:
|
|
|
|
QskInputCompositionModel( Attributes, QObject* );
|
|
|
|
|
2017-07-21 18:21:34 +02:00
|
|
|
private:
|
2018-04-20 08:52:26 +02:00
|
|
|
const Attributes m_attributes;
|
|
|
|
};
|
2018-04-11 11:02:29 +02:00
|
|
|
|
2018-03-30 18:31:13 +02:00
|
|
|
#endif
|