]> git.sesse.net Git - kdenlive/blobdiff - src/unicodedialog.h
const'ref.
[kdenlive] / src / unicodedialog.h
index eba5e40220c696afc7761dd47c5cf6adc54875bf..b34f3c01a9240c5656df70e58ee66763809345a5 100644 (file)
@@ -24,10 +24,17 @@ public:
     ~UnicodeDialog();
 
     /** \brief Returns infos about a unicode number. Extendable/improvable ;) */
-    QString unicodeInfo(QString unicode);
+    QString unicodeInfo(const QString &unicode);
 
     void showLastUnicode();
 
+protected:
+    virtual void wheelEvent(QWheelEvent * event);
+
+public slots:
+    /** \brief Override QDialog::exec() to assure the focus being on the unicode input field */
+    int exec();
+
 private:
     Ui::UnicodeDialog_UI m_view;
 
@@ -37,16 +44,16 @@ private:
     InputMethod inputMethod;
 
     /** \brief Validates text and removes all invalid characters (non-hex e.g.) */
-    QString validateText(QString text);
+    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(QString text);
+    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(QString text, Direction direction);
+    QString nextUnicode(const QString &text, Direction direction);
 
     /** \brief Paints previous and next characters around current char */
     void updateOverviewChars(uint unicode);
@@ -65,7 +72,7 @@ signals:
     void charSelected(const QString&);
 
 private slots:
-    void slotTextChanged(QString text);
+    void slotTextChanged(const QString &text);
     void slotReturnPressed();
     void slotNextUnicode();
     void slotPrevUnicode();