EditorContext Class Reference
#include <kdevcore.h>
Inheritance diagram for EditorContext:

Public Member Functions | |
EditorContext (const KURL &url, int line, int col, const TQString &linestr, const TQString &wordstr) | |
virtual | ~EditorContext () |
virtual int | type () const |
const KURL & | url () const |
int | line () const |
int | col () const |
TQString | currentLine () const |
TQString | currentWord () const |
![]() | |
virtual bool | hasType (int type) const |
Additional Inherited Members | |
![]() | |
enum | Type { EditorContext, DocumentationContext, FileContext, ProjectModelItemContext, CodeModelItemContext } |
![]() | |
Context () | |
virtual | ~Context () |
Detailed Description
A context for the popup menu in the editor.
Definition at line 131 of file kdevcore.h.
Constructor & Destructor Documentation
◆ EditorContext()
EditorContext::EditorContext | ( | const KURL & | url, |
int | line, | ||
int | col, | ||
const TQString & | linestr, | ||
const TQString & | wordstr | ||
) |
Builds a context for an editor part.
- Parameters
-
url The url of a file in the editor. line The line number where the cursor is. col The column number where the cursor is. linestr The content of the line where the cursor is. wordstr The current word under the cursor.
Definition at line 65 of file kdevcore.cpp.
◆ ~EditorContext()
|
virtual |
Destructor.
Definition at line 71 of file kdevcore.cpp.
Member Function Documentation
◆ col()
int EditorContext::col | ( | ) | const |
- Returns
- The column number for the cursor position.
Definition at line 92 of file kdevcore.cpp.
◆ currentLine()
TQString EditorContext::currentLine | ( | ) | const |
- Returns
- A TQString with the content of the line which this context was invoked for.
Definition at line 97 of file kdevcore.cpp.
◆ currentWord()
TQString EditorContext::currentWord | ( | ) | const |
- Returns
- A TQString containing the word near to the cursor when this context object was created.
Definition at line 102 of file kdevcore.cpp.
◆ line()
int EditorContext::line | ( | ) | const |
- Returns
- The line number for the cursor position.
Definition at line 87 of file kdevcore.cpp.
◆ type()
|
virtual |
Implement this in the context so we can provide rtti.
Implements Context.
Definition at line 77 of file kdevcore.cpp.
◆ url()
const KURL & EditorContext::url | ( | ) | const |
- Returns
- The url for the file which this context was invoked for.
Definition at line 82 of file kdevcore.cpp.
The documentation for this class was generated from the following files: