19 #ifndef __SONG_CODE_EDITOR_HH__
20 #define __SONG_CODE_EDITOR_HH__
23 #include "code-editor.hh"
25 #include <QTextCursor>
180 void highlightEnvironments();
181 void insertCompletion(
const QString &completion);
185 void commentSelection();
186 void uncommentSelection();
188 #ifdef ENABLE_SPELLCHECK
194 Hunspell* checker()
const;
202 void setDictionary(
const QString &dictionary);
205 QString currentWord();
211 QStringList getWordPropositions(
const QString &word);
212 #endif //ENABLE_SPELLCHECK
215 void indentLine(
const QTextCursor &cursor);
216 void trimLine(
const QTextCursor &cursor);
217 QString textUnderCursor()
const;
219 QTextEdit::ExtraSelection environmentSelection(
const SongEnvironment & env,
220 const QTextCursor & cursor);
223 QCompleter* m_completer;
225 bool m_environmentsHighlighted;
228 QColor m_chorusColor;
229 QColor m_bridgeColor;
230 QColor m_scriptureColor;
232 bool m_isSpellCheckAvailable;
233 bool m_isSpellCheckActive;
235 #ifdef ENABLE_SPELLCHECK
236 QList<QAction *> m_misspelledWordsActs;
238 QStringList m_addedWords;
239 uint m_maxSuggestedWords;
240 #endif //ENABLE_SPELLCHECK
245 #endif // __SONG_CODE_EDITOR_HH__