Scribus
Open source desktop publishing at your fingertips
hunspelldialog.h
1 #ifndef HUNSPELLDIALOG_H
2 #define HUNSPELLDIALOG_H
3 
4 #include <QDialog>
5 #include <QList>
6 #include <QStringList>
7 #include <QWidget>
8 
9 #include "pluginapi.h"
10 #include "hunspelldict.h"
11 #include "hunspellpluginstructs.h"
12 #include "scribusdoc.h"
13 #include "text/storytext.h"
14 
15 #include "ui_hunspelldialogbase.h"
16 
17 class PLUGIN_API HunspellDialog : public QDialog, private Ui::HunspellDialogBase
18 {
19  Q_OBJECT
20 
21  public:
22  HunspellDialog(QWidget* parent, ScribusDoc *doc, StoryText* iText);
23  ~HunspellDialog() {};
24  void set(QMap<QString, QString>* dictionaryMap, QMap<QString, HunspellDict*> *hspellerMap, QList<WordsFound>* wfList);
25  bool docChanged() {return m_docChanged;}
26  void updateSuggestions(QStringList& newSuggestions);
27 
28  public slots:
29  void goToNextWord(int i=-1);
30  void ignoreAllWords();
31  void changeWord();
32  void changeAllWords();
33  void replaceWord(int i);
34  void languageComboChanged(const QString &);
35  void setLanguageCombo(const QString &newLangAbbrev);
36 
37  private:
38  ScribusDoc* m_doc;
39  StoryText* m_iText;
40  QMap<QString, QString>* m_dictionaryMap;
41  QMap<QString, HunspellDict*> *m_hspellerMap;
42  QList<WordsFound>* m_wfList;
43  WordsFound currWF;
44  int wfListIndex;
45  bool m_docChanged;
46  bool m_returnToDefaultLang;
47  int m_primaryLangIndex;
48 };
49 
50 #endif // HUNSPELLDIALOG_H
Definition: storytext.h:71
Definition: hunspellpluginstructs.h:7
Definition: hunspelldialog.h:17
the Document Class
Definition: scribusdoc.h:90