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
|
|
|
#include "QskTextPredictor.h"
|
2017-07-21 16:21:34 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
QskTextPredictor::QskTextPredictor( Attributes attributes, QObject* parent )
|
|
|
|
: QObject( parent )
|
|
|
|
, m_attributes( attributes )
|
2017-07-21 16:21:34 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
QskTextPredictor::~QskTextPredictor()
|
2017-07-21 16:21:34 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
QskTextPredictor::Attributes QskTextPredictor::attributes() const
|
2017-07-21 16:21:34 +00:00
|
|
|
{
|
2018-04-23 12:06:40 +00:00
|
|
|
return m_attributes;
|
2017-07-21 16:21:34 +00:00
|
|
|
}
|
|
|
|
|
2018-06-04 08:00:52 +00:00
|
|
|
QStringList QskTextPredictor::candidates() const
|
|
|
|
{
|
|
|
|
const auto count = candidateCount();
|
|
|
|
|
|
|
|
QStringList candidates;
|
|
|
|
candidates.reserve( count );
|
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
for ( int i = 0; i < count; i++ )
|
2018-06-04 08:00:52 +00:00
|
|
|
candidates += candidate( i );
|
|
|
|
|
|
|
|
return candidates;
|
|
|
|
}
|
|
|
|
|
2018-04-26 12:42:33 +00:00
|
|
|
#include "moc_QskTextPredictor.cpp"
|