24 #include "KDevCoreIface.h" 43 return aType == this->
type();
50 class EditorContext::Private
53 Private(
const KURL &url,
int line,
int col,
const TQString &linestr,
54 const TQString &wordstr )
55 : m_url(url), m_line(line), m_col(col),
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) )
111 class 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) )
164 class DocumentationContext::Private
167 Private(
const TQString &url,
const TQString &selection )
168 : m_url(url), m_selection(selection)
173 TQString m_selection;
177 :
Context(), d( new Private(url, selection) )
192 d =
new Private( *aContext.d );
214 return d->m_selection;
221 class CodeModelItemContext::Private
230 :
Context(), d( new Private(item) )
254 class 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 ProjectModelItem * item() const
virtual int type() const =0
Implement this in the context so we can provide rtti.
virtual int type() const
Implement this in the context so we can provide rtti.
virtual ~EditorContext()
Destructor.
DocumentationContext(const TQString &url, const TQString &selection)
Builds a DocumentationContext.
virtual int type() const
Implement this in the context so we can provide rtti.
Base class for every context.
A context for the popup menu in the documentation browser widget.
virtual ~CodeModelItemContext()
Destructor.
virtual int type() const
Implement this in the context so we can provide rtti.
Documentation browser context menu.
virtual int type() const
Implement this in the context so we can provide rtti.
virtual ~KDevCore()
Destructor.
virtual ~Context()
Destructor.
The interface to the application core and context menu classes.
ProjectModelItemContext(const ProjectModelItem *item)
Builds the context.
TQString currentWord() const
EditorContext(const KURL &url, int line, int col, const TQString &linestr, const TQString &wordstr)
Builds a context for an editor part.
virtual ~FileContext()
Destructor.
virtual bool hasType(int type) const
CodeModelItemContext(const CodeModelItem *item)
Builds the context.
const CodeModelItem * item() const
TQString currentLine() const
KDevCore(TQObject *parent=0, const char *name=0)
Constructor.
const KURL::List & urls() const
Item in code model (symbol store).
virtual ~ProjectModelItemContext()
Destructor.
Project tree context menu.
FileContext(const KURL::List &someURLs)
Builds the file context using a KURL::List.
virtual int type() const
Implement this in the context so we can provide rtti.
virtual ~DocumentationContext()
Destructor.
TQString selection() const