Crossfire Server, Trunk
AssetTextEdit Class Reference

#include <AssetTextEdit.h>

+ Inheritance diagram for AssetTextEdit:
+ Collaboration diagram for AssetTextEdit:

Public Member Functions

 AssetTextEdit (QWidget *parent)

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *e) override

Private Slots

void insertCompletion (const QString &completion)

Private Member Functions

QString textUnderCursor () const

Private Attributes


Detailed Description

Multiline edit with auto-completion for asset fields. This class relies on AssetFieldCompleter for completion. The code is heavily borrowed from

Definition at line 25 of file AssetTextEdit.h.

Constructor & Destructor Documentation

◆ AssetTextEdit()

AssetTextEdit::AssetTextEdit ( QWidget *  parent)


parentparent widget.

Definition at line 17 of file AssetTextEdit.cpp.

References insertCompletion(), and myCompleter.

+ Here is the call graph for this function:

Member Function Documentation

◆ insertCompletion

void AssetTextEdit::insertCompletion ( const QString &  completion)

Insert the completed text at the cursor's position, replacing part of the contents if needed.

completiontext to insert.

Definition at line 54 of file AssetTextEdit.cpp.

References myCompleter.

Referenced by AssetTextEdit().

+ Here is the caller graph for this function:

◆ keyPressEvent()

void AssetTextEdit::keyPressEvent ( QKeyEvent *  e)

Definition at line 26 of file AssetTextEdit.cpp.

References myCompleter, and textUnderCursor().

+ Here is the call graph for this function:

◆ textUnderCursor()

QString AssetTextEdit::textUnderCursor ( ) const

Get the complete text under the cursor, including all letters and dots before, all letters after.


Definition at line 63 of file AssetTextEdit.cpp.

References c, and say::item.

Referenced by keyPressEvent().

+ Here is the caller graph for this function:

Field Documentation

◆ myCompleter

AssetFieldCompleter* AssetTextEdit::myCompleter

Completer used to suggest words.

Definition at line 39 of file AssetTextEdit.h.

Referenced by AssetTextEdit(), insertCompletion(), and keyPressEvent().

The documentation for this class was generated from the following files: