KDevelop API Documentation

EditorContext Class Reference

A context for the popup menu in the editor. More...

#include <kdevcore.h>

Inheritance diagram for EditorContext:

Context List of all members.

Public Member Functions

 EditorContext (const KURL &url, int line, int col, const QString &linestr, const QString &wordstr)
 Builds a context for an editor part.

virtual ~EditorContext ()
 Destructor.

virtual int type () const
 Implements this in the context so we can provide rtti.

const KURLurl () const
 Returns the url for the file which this context was invoked for.

int line () const
 Returns the line number for the cursor position.

int col () const
 Returns the column number for the cursor position.

QString currentLine () const
 Returns a QString with the content of the line which this context was invoked for.

QString currentWord () const
 Returns a QString containing the word near to the cursor when this context object was created.


Private Member Functions

 EditorContext (const EditorContext &)
EditorContextoperator= (const EditorContext &)

Private Attributes

Privated

Detailed Description

A context for the popup menu in the editor.

Definition at line 100 of file kdevcore.h.


Constructor & Destructor Documentation

EditorContext::EditorContext const KURL url,
int  line,
int  col,
const QString linestr,
const QString wordstr
 

Builds a context for an editor part.

Parameters:
url 
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 

Definition at line 78 of file kdevcore.cpp.

References d, and EditorContext().

Referenced by EditorContext().

EditorContext::~EditorContext  )  [virtual]
 

Destructor.

Definition at line 86 of file kdevcore.cpp.

References d, endl(), and kdDebug().

EditorContext::EditorContext const EditorContext  )  [private]
 


Member Function Documentation

int EditorContext::col  )  const
 

Returns the column number for the cursor position.

Definition at line 116 of file kdevcore.cpp.

References d, and EditorContext::Private::m_col.

QString EditorContext::currentLine  )  const
 

Returns a QString with the content of the line which this context was invoked for.

Definition at line 123 of file kdevcore.cpp.

References d, and EditorContext::Private::m_linestr.

Referenced by CppSupportPart::contextMenu().

QString EditorContext::currentWord  )  const
 

Returns a QString containing the word near to the cursor when this context object was created.

Definition at line 130 of file kdevcore.cpp.

References d, and EditorContext::Private::m_wordstr.

Referenced by GrepViewPart::contextMenu(), DocTreeViewPart::contextMenu(), CTagsPart::contextMenu(), and GDBDebugger::DebuggerPart::contextMenu().

int EditorContext::line  )  const
 

Returns the line number for the cursor position.

Definition at line 109 of file kdevcore.cpp.

References d, and EditorContext::Private::m_line.

EditorContext& EditorContext::operator= const EditorContext  )  [private]
 

int EditorContext::type  )  const [virtual]
 

Implements this in the context so we can provide rtti.

Implements Context.

Definition at line 95 of file kdevcore.cpp.

const KURL & EditorContext::url  )  const
 

Returns the url for the file which this context was invoked for.

Definition at line 102 of file kdevcore.cpp.

References d, and EditorContext::Private::m_url.

Referenced by subversionPart::contextMenu(), CvsServicePart::contextMenu(), DiffPart::contextMenu(), and GDBDebugger::DebuggerPart::contextMenu().


Member Data Documentation

Private* EditorContext::d [private]
 

Definition at line 149 of file kdevcore.h.

Referenced by col(), currentLine(), currentWord(), EditorContext(), line(), url(), and ~EditorContext().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:02:02 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003