qskinny/inputcontext/QskInputCompositionModel.h

45 lines
1019 B
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_INPUT_COMPOSITION_MODEL_H
#define QSK_INPUT_COMPOSITION_MODEL_H
#include <QObject>
class QskInputCompositionModel : public QObject
{
Q_OBJECT
public:
2018-04-20 06:52:26 +00:00
enum Attribute
{
Words = 1 << 0
};
Q_ENUM( Attribute )
Q_DECLARE_FLAGS( Attributes, Attribute )
2017-07-21 16:21:34 +00:00
virtual ~QskInputCompositionModel();
virtual void requestCandidates( const QString& preedit ) = 0;
virtual void resetCandidates() = 0;
2018-04-20 06:52:26 +00:00
virtual int candidateCount() const = 0;
virtual QString candidate( int ) const = 0;
2018-04-20 06:52:26 +00:00
Attributes attributes() const;
2017-07-21 16:21:34 +00:00
Q_SIGNALS:
void candidatesChanged();
protected:
QskInputCompositionModel( Attributes, QObject* );
2017-07-21 16:21:34 +00:00
private:
2018-04-20 06:52:26 +00:00
const Attributes m_attributes;
};
2018-04-11 09:02:29 +00:00
#endif