QTfrontend/ui/widget/SmartLineEdit.h
author sheepluva
Wed, 19 Oct 2011 02:10:27 +0200
changeset 6150 1d98752c1fba
parent 6149 0b92341adb6a
child 6151 9fd5b70acb1a
permissions -rw-r--r--
frontend chat input history, use arrow keys UP/DOWN
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     1
/*
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     3
 * Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     4
 * Copyright (c) 2007-2011 Andrey Korotaev <unC0Rr@gmail.com>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     5
 *
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     7
 * it under the terms of the GNU General Public License as published by
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     8
 * the Free Software Foundation; version 2 of the License
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
     9
 *
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    13
 * GNU General Public License for more details.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    14
 *
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    18
 */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    19
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    20
#ifndef HEDGEWARS_SMARTLINEDIT
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    21
#define HEDGEWARS_SMARTLINEDIT
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    22
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    23
#include <QLineEdit>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    24
#include <QStringList>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    25
#include <QString>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    26
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    27
#include <QEvent>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    28
#include <QKeyEvent>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    29
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    30
#include <QMutex>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    31
#include <QRegExp>
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    32
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    33
class QLineEdit;
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    34
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    35
/**
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    36
 * A modification of QLineEdit that features:
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    37
 * + Auto-completion for word under cursor when the TAB key is pressed.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    38
 * + ESC key clears text.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    39
 * + History of previous contents, re-selectable using the arrow keys.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    40
 *
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    41
 * Note:
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    42
 *   * A Keyword can either be a command (if first word) or
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    43
 *     a nickname (completed regardless of position in text).
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    44
 *   * Public methods for accessing keywords and history are thread-safe.
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    45
 * @author sheepluva
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    46
 * @since 0.9.17
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    47
 */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    48
class SmartLineEdit : public QLineEdit
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    49
{
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    50
 Q_OBJECT
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    51
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    52
public:
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    53
    /**
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    54
    * Class constructor.
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    55
    * @param parent parent QWidget.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    56
    * @param maxHistorySize maximum amount of history entries kept.
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    57
    */
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    58
    SmartLineEdit(QWidget * parent = 0, int maxHistorySize = 64);
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    59
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    60
    /**
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    61
     * Adds commands to the auto-completion feature.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    62
     * @param commands list of commands to be added.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    63
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    64
    void addCommands(const QStringList & commands);
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    65
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    66
    /**
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    67
     * Adds a single nickname to the auto-completion feature.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    68
     * @param nickname name to be added.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    69
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    70
    void addNickname(const QString & nickname);
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    71
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    72
    /**
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    73
     * Appends current text to history.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    74
     */
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    75
    void rememberCurrentText();
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    76
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    77
    /**
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    78
     * Removes commands from the auto-completion feature.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    79
     * @param commands list of commands to be removed.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    80
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    81
    void removeCommands(const QStringList & commands);
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    82
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    83
    /**
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    84
     * Removes a single nickname from the auto-completion feature.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    85
     * @param nickname name to be removed.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    86
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    87
    void removeNickname(const QString & nickname);
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    88
6149
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
    89
    /**
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
    90
     * Forget all keywords and input history.
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
    91
     */
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
    92
    void forgetEverything();
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
    93
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
    94
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    95
public slots:
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    96
    /**
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    97
     * Clears the contents.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    98
     */
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
    99
    void clear();
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   100
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   101
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   102
protected:
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   103
    /**
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   104
     * Overrides method of parent class.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   105
     * Forward pressed TAB to parent class' method (for focus handling etc)
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   106
     * only if line is empty.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   107
     * @param event the key event.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   108
     * @return returns true if the event was recognized.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   109
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   110
    virtual bool event(QEvent * event);
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   111
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   112
    /**
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   113
     * Overrides method of parent class.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   114
     * Autocompletes if TAB is reported as pressed key in the key event,
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   115
     * otherwise keys except for ESC and Up/Down (with no modifiers)
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   116
     * are forwarded to parent method.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   117
     * ESC leads to the contents being cleared.
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   118
     * Arrow keys are used for navigating the history.
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   119
     * @param event the key event.
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   120
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   121
    virtual void keyPressEvent(QKeyEvent * event);
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   122
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   123
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   124
private:
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   125
    QRegExp m_whitespace; // regexp that matches a whitespace
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   126
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   127
    int m_maxHistorySize; // the maximum allowed size for the history
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   128
    int m_curHistEntryIdx; // the index of the currently used entry or -1
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   129
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   130
    QStringList * m_cmds;  // list of recognized commands
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   131
    QStringList * m_nicks; // list of recognized nicknames
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   132
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   133
    QStringList * m_history; // history of previous inputs
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   134
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   135
    // these variables contain information about the last replacement
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   136
    // they get reset whenever cursor is moved or text is changed
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   137
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   138
    QString m_beforeMatch; // the string that was just matched
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   139
    bool m_hasJustMatched; // whether this widget just did an auto-completion
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   140
    QString m_prefix; // prefix of the text replacement this widget just did
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   141
    QString m_postfix; // postfix of the text replacement this widget just did
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   142
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   143
    QMutex m_keywordMutex; // make keyword QStringList action thread-safe
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   144
    QMutex m_historyMutex; // make history QStringList action thread-safe
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   145
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   146
    /**
6149
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
   147
     * Autocompletes the contents based on the known commands and/or names.
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   148
     */
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   149
    void autoComplete();
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   150
6150
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   151
    /**
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   152
     * Navigates content history in the desired direction.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   153
     * Note: no wrap-around on purpose (so that holding down/up will get the
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   154
     * the user to the respective end rather than into an endless cycle :P)
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   155
     * @param isGoingUp true: next older entry, false: next more recent entry.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   156
     */
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   157
    void navigateHistory(bool isGoingUp);
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   158
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   159
    /**
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   160
     * Appends current text to history, without Mutex.
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   161
     */
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   162
    void rememberCurrentTextUnsynced();
1d98752c1fba frontend chat input history, use arrow keys UP/DOWN
sheepluva
parents: 6149
diff changeset
   163
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   164
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   165
private slots:
6149
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
   166
    /**
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
   167
     * Resets the information about the last match and text replacement.
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
   168
     */
0b92341adb6a + don't suggest ignored nicknames
sheepluva
parents: 6147
diff changeset
   169
    void resetAutoCompletionStatus();
6147
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   170
};
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   171
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   172
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   173
b4d7d8d62feb feature-pimpin'-up the chat input line in frontend:
sheepluva
parents:
diff changeset
   174
#endif // HEDGEWARS_SMARTLINEDIT