blob: 245df6eaf1307034ad89c066a432769380d3c7f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef HUNSPELLDIALOG_H
#define HUNSPELLDIALOG_H
#include <QDialog>
#include <QList>
#include <QStringList>
#include <QWidget>
#include <hunspell/hunspell.hxx>
#include "pluginapi.h"
#include "hunspellpluginstructs.h"
#include "scribusdoc.h"
#include "text/storytext.h"
#include "ui_hunspelldialogbase.h"
class PLUGIN_API HunspellDialog : public QDialog, private Ui::HunspellDialogBase
{
Q_OBJECT
public:
HunspellDialog(QWidget* parent, ScribusDoc *doc, StoryText* iText);
~HunspellDialog() {};
void set(QMap<QString, QString>* dictionaryMap, Hunspell **hspellers, QList<WordsFound>* wfList);
bool docChanged() {return m_docChanged;}
void updateSuggestions(QStringList& newSuggestions);
public slots:
void goToNextWord(int i=-1);
void ignoreAllWords();
void changeWord();
void changeAllWords();
void replaceWord(int i);
void languageComboChanged(int index);
void setLanguageCombo(const QString &newLangAbbrev);
private:
ScribusDoc* m_doc;
StoryText* m_Itext;
QMap<QString, QString>* m_dictionaryMap;
Hunspell **m_hspellers;
QList<WordsFound>* m_wfList;
WordsFound currWF;
int wfListIndex;
bool m_docChanged;
bool m_returnToDefaultLang;
int m_primaryLangIndex;
};
#endif // HUNSPELLDIALOG_H
|