Crossfire Server, Trunk
AssetTextEdit.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef ASSET_TEXT_EDIT_H
14 #define ASSET_TEXT_EDIT_H
15 
16 #include <QTextEdit>
17 
19 
25 class AssetTextEdit : public QTextEdit {
26  Q_OBJECT
27 
28 public:
33  AssetTextEdit(QWidget *parent);
34 
35 protected:
36  virtual void keyPressEvent(QKeyEvent *e) override;
37 
38 private:
45  QString textUnderCursor() const;
46 
47 private slots:
52  void insertCompletion(const QString &completion);
53 };
54 
55 #endif /* ASSET_TEXT_EDIT_H */
AssetTextEdit
Definition: AssetTextEdit.h:25
AssetTextEdit::keyPressEvent
virtual void keyPressEvent(QKeyEvent *e) override
Definition: AssetTextEdit.cpp:26
AssetFieldCompleter
Definition: AssetFieldCompleter.h:25
AssetTextEdit::AssetTextEdit
AssetTextEdit(QWidget *parent)
Definition: AssetTextEdit.cpp:17
AssetTextEdit::myCompleter
AssetFieldCompleter * myCompleter
Definition: AssetTextEdit.h:39
AssetTextEdit::insertCompletion
void insertCompletion(const QString &completion)
Definition: AssetTextEdit.cpp:54
AssetTextEdit::textUnderCursor
QString textUnderCursor() const
Definition: AssetTextEdit.cpp:63