~michael-sheldon/ubuntu-keyboard/fix-1332624

« back to all changes in this revision

Viewing changes to plugins/westernsupport/predictivetextworker.h

  • Committer: CI bot
  • Author(s): Michael Sheldon
  • Date: 2014-05-27 15:37:31 UTC
  • mfrom: (165.1.9 suggestion-override)
  • Revision ID: ps-jenkins@lists.canonical.com-20140527153731-xnf1htflimoqalsp
Add user input to the word ribbon as the first entry, allowing for autocomplete suggestions to be overridden. Use the selection of that entry as the cue to add words to the user spell check dictionary and filter presage's predictions based on what words are in the spell check dictionary. Fixes: 1318808

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#ifndef PREDICTIVETEXTWORKER_H
29
29
#define PREDICTIVETEXTWORKER_H
30
30
 
 
31
#include "spellchecker.h"
31
32
#include "candidatescallback.h"
32
33
#include <presage.h>
33
34
 
47
48
public slots:
48
49
    void parsePredictionText(const QString& surroundingLeft, const QString& preedit);
49
50
    void setPredictionLanguage(QString language);
 
51
    void updateSpellCheckWord(QString word);
50
52
 
51
53
signals:
52
54
    void newSuggestions(QStringList suggestions);
55
57
    std::string m_candidatesContext;
56
58
    CandidatesCallback m_presageCandidates;
57
59
    Presage m_presage;
 
60
    SpellChecker m_spellChecker;
58
61
};
59
62
 
60
63
#endif // PREDICTIVETEXTWORKER_H