- Ui::UnicodeDialog_UI m_view;
-
- enum Direction { Forward, Backward };
-
- /** Selected input method */
- InputMethod inputMethod;
-
- /** \brief Validates text and removes all invalid characters (non-hex e.g.) */
- QString validateText(QString text);
- /** \brief Removes all leading zeros */
- QString trimmedUnicodeNumber(QString text);
- /** \brief Checks whether the given string is a control character */
- bool controlCharacter(QString text);
- /** \brief Checks whether the given uint is a control character */
- bool controlCharacter(uint value);
-
- /** \brief Returns the next available unicode. */
- QString nextUnicode(QString text, Direction direction);
-
- /** \brief Paints previous and next characters around current char */
- void updateOverviewChars(uint unicode);
-
- int lastCursorPos;
- QString lastUnicodeNumber;
+ Ui::UnicodeWidget_UI m_view;
+
+ enum Direction { Forward, Backward };
+
+ /** Selected input method */
+ UnicodeDialog::InputMethod inputMethod;
+
+ /** \brief Validates text and removes all invalid characters (non-hex e.g.) */
+ QString validateText(const QString &text);
+ /** \brief Removes all leading zeros */
+ QString trimmedUnicodeNumber(QString text);
+ /** \brief Checks whether the given string is a control character */
+ bool controlCharacter(const QString& text);
+ /** \brief Checks whether the given uint is a control character */
+ bool controlCharacter(uint value);
+
+ /** \brief Returns the next available unicode. */
+ QString nextUnicode(const QString &text, Direction direction);
+
+ /** \brief Paints previous and next characters around current char */
+ void updateOverviewChars(uint unicode);
+ void clearOverviewChars();
+
+ int m_lastCursorPos;
+ QString m_lastUnicodeNumber;
+
+ /** \brief Reads the last used unicode number from the config file. */
+ void readChoices();
+ /** \brief Writes the last used unicode number into the config file. */
+ void writeChoices();