Kate
#include <kateglobal.h>
Inherits Editor, CommandInterface, ContainerInterface, and TemplateScriptRegistrar.
Signals | |
| void | clipboardHistoryChanged () |
Static Public Member Functions | |
| static void | decRef () |
| static void | incRef () |
| static QString | katePartVersion () |
| static KateGlobal * | self () |
Properties | |
| KSharedConfig::Ptr | sessionConfig |
| QWidget | snippetWidget |
Detailed Description
KateGlobal One instance of this class is hold alive during a kate part session, as long as any factory, document or view stay around, here is the place to put things which are needed and shared by all this objects ;)
Definition at line 71 of file kateglobal.h.
Constructor & Destructor Documentation
| KateGlobal::~KateGlobal | ( | ) |
Destructor.
Definition at line 206 of file kateglobal.cpp.
Member Function Documentation
|
inline |
General Information about this editor.
return the about data
- Returns
- about data of this editor part
Definition at line 153 of file kateglobal.h.
|
inline |
Clipboard history, filled with text we ever copied to clipboard via copyToClipboard.
Definition at line 430 of file kateglobal.h.
|
signal |
Emitted if the history of clipboard changes via copyToClipboard.
|
inline |
| QStringList KateGlobal::commandList | ( | ) | const |
Get a list of available commandline strings.
- Returns
- commandline strings
Definition at line 513 of file kateglobal.cpp.
| QList< KTextEditor::Command * > KateGlobal::commands | ( | ) | const |
Get a list of all registered commands.
- Returns
- list of all commands
Definition at line 510 of file kateglobal.cpp.
|
inline |
| void KateGlobal::configDialog | ( | QWidget * | parent | ) |
Shows a config dialog for the part, changes will be applied to the editor, but not saved anywhere automagically, call writeConfig to save them.
Definition at line 306 of file kateglobal.cpp.
| bool KateGlobal::configDialogSupported | ( | ) | const |
Does this editor support a config dialog.
- Returns
- does this editor have a config dialog?
Definition at line 301 of file kateglobal.cpp.
| KTextEditor::ConfigPage * KateGlobal::configPage | ( | int | number, |
| QWidget * | parent | ||
| ) |
returns config page with the given number, config pages from 0 to configPages()-1 are available if configPages() > 0
Definition at line 361 of file kateglobal.cpp.
| QString KateGlobal::configPageFullName | ( | int | number | ) | const |
Definition at line 413 of file kateglobal.cpp.
| KIcon KateGlobal::configPageIcon | ( | int | number | ) | const |
Definition at line 439 of file kateglobal.cpp.
| QString KateGlobal::configPageName | ( | int | number | ) | const |
Definition at line 387 of file kateglobal.cpp.
| int KateGlobal::configPages | ( | ) | const |
Number of available config pages If the editor returns a number < 1, it doesn't support this and the embedding app should use the configDialog () instead.
- Returns
- number of config pages
Definition at line 356 of file kateglobal.cpp.
| QObject * KateGlobal::container | ( | ) |
Get the currently associated Container object.
- Returns
- container object
Definition at line 519 of file kateglobal.cpp.
| void KateGlobal::copyToClipboard | ( | const QString & | text | ) |
Copy text to clipboard an remember it in the history.
- Parameters
-
text text to copy to clipboard, does nothing if empty!
empty => nop
move to clipboard
remember in history cut after 10 entries
notify about change
Definition at line 550 of file kateglobal.cpp.
| KTextEditor::Document * KateGlobal::createDocument | ( | QObject * | parent | ) |
Create a new document object.
- Parameters
-
parent parent object
- Returns
- created KTextEditor::Document
Definition at line 239 of file kateglobal.cpp.
|
inlinestatic |
decrement reference counter
Definition at line 223 of file kateglobal.h.
| void KateGlobal::deregisterDocument | ( | KateDocument * | doc | ) |
unregister document at the factory
- Parameters
-
doc document to register
Definition at line 481 of file kateglobal.cpp.
| void KateGlobal::deregisterView | ( | KateView * | view | ) |
unregister view at the factory
- Parameters
-
view view to unregister
Definition at line 494 of file kateglobal.cpp.
|
inline |
|
inline |
fallback document config
- Returns
- default config for all documents
Definition at line 304 of file kateglobal.h.
| const QList< KTextEditor::Document * > & KateGlobal::documents | ( | ) |
Returns a list of all documents of this editor.
- Returns
- list of all existing documents
Definition at line 248 of file kateglobal.cpp.
|
inline |
|
inlinestatic |
increment reference counter
Definition at line 218 of file kateglobal.h.
|
inline |
return a list of all registered docs
- Returns
- all known documents
Definition at line 267 of file kateglobal.h.
|
static |
Returns the current version of Kate Part: KDE X.Y.Z contains Kate Part X-1.Y.
- Returns
- version of type x.y, e.g. 3.2
Definition at line 60 of file kateglobal.cpp.
|
inline |
global instance of the language-aware keyword completion model
- Returns
- global instance of the keyword completion model
Definition at line 357 of file kateglobal.h.
|
inline |
global mode manager used to manage the modes centrally
- Returns
- mode manager
Definition at line 292 of file kateglobal.h.
|
inline |
| KTextEditor::Command * KateGlobal::queryCommand | ( | const QString & | cmd | ) | const |
query for command
- Parameters
-
cmd name of command to query for
- Returns
- found command or 0
Definition at line 507 of file kateglobal.cpp.
| void KateGlobal::readConfig | ( | KConfig * | config = 0 | ) |
Configuration management.
Read editor configuration from given config object
- Parameters
-
config config object
Definition at line 261 of file kateglobal.cpp.
| bool KateGlobal::registerCommand | ( | KTextEditor::Command * | cmd | ) |
register given command this works global, for all documents
- Parameters
-
cmd command to register
- Returns
- success
Definition at line 501 of file kateglobal.cpp.
| void KateGlobal::registerDocument | ( | KateDocument * | doc | ) |
register document at the factory this allows us to loop over all docs for example on config changes
- Parameters
-
doc document to register
Definition at line 474 of file kateglobal.cpp.
| KTextEditor::TemplateScript * KateGlobal::registerTemplateScript | ( | QObject * | owner, |
| const QString & | script | ||
| ) |
TemplateScriptRegistrar interface.
Definition at line 531 of file kateglobal.cpp.
| void KateGlobal::registerView | ( | KateView * | view | ) |
register view at the factory this allows us to loop over all views for example on config changes
- Parameters
-
view view to register
Definition at line 488 of file kateglobal.cpp.
|
inline |
fallback renderer config
- Returns
- default config for all renderers
Definition at line 316 of file kateglobal.h.
|
inline |
|
inline |
Global script collection.
Definition at line 321 of file kateglobal.h.
|
static |
Kate Part Internal stuff ;)
singleton accessor
- Returns
- instance of the factory
Definition at line 465 of file kateglobal.cpp.
|
inline |
Get session config, defaults to KGlobal::config()
- Returns
- session config
Definition at line 103 of file kateglobal.h.
| void KateGlobal::setContainer | ( | QObject * | container | ) |
Set the associated container object.
Definition at line 522 of file kateglobal.cpp.
|
inline |
Set session config.
- Parameters
-
sessionConfig new session config
Definition at line 112 of file kateglobal.h.
| KateSnippetGlobal * KateGlobal::snippetGlobal | ( | ) |
global instance of the snippet handling lazy constructed on first use to allow it to use the session config set after editor is constructed
- Returns
- global instance of the snippet handling
Definition at line 253 of file kateglobal.cpp.
| QWidget* KateGlobal::snippetWidget | ( | ) |
Create a new snippet widget, to allow to manage and insert snippets.
- Returns
- new snippet widget
|
inline |
| bool KateGlobal::unregisterCommand | ( | KTextEditor::Command * | cmd | ) |
unregister given command this works global, for all documents
- Parameters
-
cmd command to unregister
- Returns
- success
Definition at line 504 of file kateglobal.cpp.
| void KateGlobal::unregisterTemplateScript | ( | KTextEditor::TemplateScript * | templateScript | ) |
Definition at line 536 of file kateglobal.cpp.
|
inline |
fallback view config
- Returns
- default config for all views
Definition at line 310 of file kateglobal.h.
return a list of all registered views
- Returns
- all known views
Definition at line 273 of file kateglobal.h.
|
inline |
|
inline |
global instance of the simple word completion mode
- Returns
- global instance of the simple word completion mode
Definition at line 351 of file kateglobal.h.
| void KateGlobal::writeConfig | ( | KConfig * | config = 0 | ) |
Write editor configuration to given config object.
- Parameters
-
config config object
Definition at line 277 of file kateglobal.cpp.
Property Documentation
|
readwrite |
property to tell the editor to use a given session config for session related configuration instead of KGlobal::config().
MUST be set directly after first creation of the editor as otherwise some parts might not pick this up.
Definition at line 97 of file kateglobal.h.
|
read |
property to create a new snippet widget.
caller must handle the delete then, is a variant with a widget inside
Definition at line 83 of file kateglobal.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference