qskinny/src/inputpanel/QskInputCompositionModel.h

45 lines
1019 B
C
Raw Normal View History

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();
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-04-20 08:52:26 +02:00
Attributes attributes() const;
2017-07-21 18:21:34 +02:00
Q_SIGNALS:
void candidatesChanged();
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
#endif