QTfrontend/ui/widget/SmartLineEdit.h
changeset 6187 59ff93c0ae2d
parent 6170 2b1748161278
child 6188 e48280142001
--- a/QTfrontend/ui/widget/SmartLineEdit.h	Sat Oct 22 19:37:39 2011 +0200
+++ b/QTfrontend/ui/widget/SmartLineEdit.h	Sat Oct 22 20:41:23 2011 +0200
@@ -25,9 +25,13 @@
 #ifndef HEDGEWARS_SMARTLINEEDIT_H
 #define HEDGEWARS_SMARTLINEEDIT_H
 
+#include <QMap>
+#include <QString>
 #include <QStringList>
 
 #include <QEvent>
+#include <QKeyEvent>
+
 #include <QRegExp>
 
 #include "HistoryLineEdit.h"
@@ -59,6 +63,11 @@
     SmartLineEdit(QWidget * parent = 0, int maxHistorySize = 64);
 
     /**
+    * @brief Class destructor.
+    */
+    ~SmartLineEdit();
+
+    /**
      * @brief Adds commands to the auto-completion feature.
      * @param commands list of commands to be added.
      */
@@ -116,6 +125,8 @@
 
     QStringList * m_cmds;  ///< list of recognized commands
     QStringList * m_nicks; ///< list of recognized nicknames
+    /// list of recognized commands, sorted case-insensitive
+    QMap<QString, QString> * m_sorted_nicks;
 
     // these variables contain information about the last replacement
     // they get reset whenever cursor is moved or text is changed