24#include "KDevCoreIface.h"
43 return aType == this->
type();
50class EditorContext::Private
53 Private(
const KURL &
url,
int line,
int col,
const TQString &linestr,
54 const TQString &wordstr )
56 m_linestr(linestr), m_wordstr(wordstr)
62 TQString m_linestr, m_wordstr;
66 const TQString &linestr,
const TQString &wordstr )
67 :
Context(), d( new Private(url, line, col, linestr, wordstr) )
111class FileContext::Private
114 Private(
const KURL::List &someURLs ) : m_urls(someURLs)
116 if (m_urls.count() == 0)
118 m_fileName =
"INVALID-FILENAME";
119 m_isDirectory =
false;
123 m_fileName = m_urls[0].path();
124 m_isDirectory = URLUtil::isDirectory( m_urls[0] );
127 Private(
const TQString &fileName,
bool isDirectory )
128 : m_fileName(fileName), m_isDirectory(isDirectory)
140 :
Context(), d( new Private(someURLs) )
164class DocumentationContext::Private
167 Private(
const TQString &
url,
const TQString &
selection )
173 TQString m_selection;
177 :
Context(), d( new Private(url, selection) )
192 d =
new Private( *aContext.d );
214 return d->m_selection;
221class CodeModelItemContext::Private
230 :
Context(), d( new Private(item) )
254class ProjectModelItemContext::Private
257 Private(
const ProjectModelItem*
item ) : m_item(
item ) {}
259 const ProjectModelItem* m_item;
263 :
Context(), d( new Private(item) )
289 : TQObject( parent, name )
291 new KDevCoreIface(
this);
298#include "kdevcore.moc"
const CodeModelItem * item() const
virtual int type() const
Implement this in the context so we can provide rtti.
virtual ~CodeModelItemContext()
Destructor.
Item in code model (symbol store).
Base class for every context.
virtual bool hasType(int type) const
virtual ~Context()
Destructor.
virtual int type() const =0
Implement this in the context so we can provide rtti.
@ EditorContext
Editor context menu.
@ FileContext
File context menu.
@ DocumentationContext
Documentation browser context menu.
@ ProjectModelItemContext
Project tree context menu.
@ CodeModelItemContext
Class tree context menu.
A context for the popup menu in the documentation browser widget.
TQString selection() const
virtual ~DocumentationContext()
Destructor.
virtual int type() const
Implement this in the context so we can provide rtti.
TQString currentWord() const
virtual ~EditorContext()
Destructor.
virtual int type() const
Implement this in the context so we can provide rtti.
TQString currentLine() const
const KURL::List & urls() const
virtual ~FileContext()
Destructor.
virtual int type() const
Implement this in the context so we can provide rtti.
KDevCore(TQObject *parent=0, const char *name=0)
Constructor.
virtual ~KDevCore()
Destructor.
virtual ~ProjectModelItemContext()
Destructor.
const ProjectModelItem * item() const
virtual int type() const
Implement this in the context so we can provide rtti.
The interface to the application core and context menu classes.