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
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
#ifndef QSK_TEXT_PREDICTOR_H
|
|
|
|
#define QSK_TEXT_PREDICTOR_H
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
#include <QskGlobal.h>
|
2018-07-19 12:10:48 +00:00
|
|
|
#include <qobject.h>
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
// abstract base class for input methods for retrieving predictive text
|
|
|
|
|
|
|
|
class QSK_EXPORT QskTextPredictor : public QObject
|
2017-07-21 16:21:34 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public:
|
2018-07-31 15:32:25 +00:00
|
|
|
~QskTextPredictor() override;
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2022-02-04 15:10:44 +00:00
|
|
|
public Q_SLOTS:
|
2018-04-26 12:42:33 +00:00
|
|
|
virtual void request( const QString& text ) = 0;
|
|
|
|
virtual void reset() = 0;
|
2018-04-20 06:52:26 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
Q_SIGNALS:
|
2022-02-04 15:10:44 +00:00
|
|
|
void predictionChanged( const QString& text, const QStringList& candidates );
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
protected:
|
2022-02-04 15:10:44 +00:00
|
|
|
QskTextPredictor( QObject* );
|
2018-04-20 06:52:26 +00:00
|
|
|
};
|
2018-04-11 09:02:29 +00:00
|
|
|
|
2018-03-30 16:31:13 +00:00
|
|
|
#endif
|