• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • utils
kateglobal.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2001-2010 Christoph Cullmann <cullmann@kde.org>
4  * Copyright (C) 2009 Erlend Hamberg <ehamberg@gmail.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #include "kateglobal.h"
23 #include "kateglobal.moc"
24 
25 #include "katedocument.h"
26 #include "kateview.h"
27 #include "katerenderer.h"
28 #include "katecmds.h"
29 #include "katemodemanager.h"
30 #include "kateschema.h"
31 #include "kateschemaconfig.h"
32 #include "kateconfig.h"
33 #include "katescriptmanager.h"
34 #include "katecmd.h"
35 #include "katebuffer.h"
36 #include "katepartpluginmanager.h"
37 #include "kateviglobal.h"
38 #include "katewordcompletion.h"
39 #include "katekeywordcompletion.h"
40 #include "spellcheck/spellcheck.h"
41 #include "snippet/katesnippetglobal.h"
42 
43 #include <klocale.h>
44 #include <kservicetypetrader.h>
45 #include <kdirwatch.h>
46 #include <kdebug.h>
47 #include <kdeversion.h>
48 #include <kpagedialog.h>
49 #include <kpagewidgetmodel.h>
50 #include <kiconloader.h>
51 
52 #include <QtCore/QPointer>
53 #include <QtGui/QBoxLayout>
54 #include <QApplication>
55 
56 KateGlobal *KateGlobal::s_self = 0;
57 
58 int KateGlobal::s_ref = 0;
59 
60 QString KateGlobal::katePartVersion()
61 {
62  return QString("3.7");
63 }
64 
65 KateGlobal::KateGlobal ()
66  : KTextEditor::Editor (0)
67  , m_aboutData ("katepart", 0, ki18n("Kate Part"), katePartVersion().toLatin1(),
68  ki18n( "Embeddable editor component" ), KAboutData::License_LGPL_V2,
69  ki18n( "(c) 2000-2013 The Kate Authors" ), KLocalizedString(), "http://www.kate-editor.org")
70  , m_componentData (&m_aboutData)
71  , m_snippetGlobal (0) // lazy constructed
72  , m_sessionConfig (KGlobal::config())
73 {
74  // set s_self
75  s_self = this;
76 
77  // load the kate part translation catalog
78  KGlobal::locale()->insertCatalog("katepart4");
79 
80  //
81  // fill about data
82  //
83  m_aboutData.setProgramIconName("preferences-plugin");
84  m_aboutData.addAuthor (ki18n("Christoph Cullmann"), ki18n("Maintainer"), "cullmann@kde.org", "http://www.cullmann.io");
85  m_aboutData.addAuthor (ki18n("Dominik Haumann"), ki18n("Core Developer"), "dhaumann@kde.org");
86  m_aboutData.addAuthor (ki18n("Milian Wolff"), ki18n("Core Developer"), "mail@milianw.de", "http://milianw.de");
87  m_aboutData.addAuthor (ki18n("Joseph Wenninger"), ki18n("Core Developer"), "jowenn@kde.org","http://stud3.tuwien.ac.at/~e9925371");
88  m_aboutData.addAuthor (ki18n("Erlend Hamberg"), ki18n("Vi Input Mode"), "ehamberg@gmail.com", "http://hamberg.no/erlend");
89  m_aboutData.addAuthor (ki18n("Bernhard Beschow"), ki18n("Developer"), "bbeschow@cs.tu-berlin.de", "https://user.cs.tu-berlin.de/~bbeschow");
90  m_aboutData.addAuthor (ki18n("Anders Lund"), ki18n("Core Developer"), "anders@alweb.dk", "http://www.alweb.dk");
91  m_aboutData.addAuthor (ki18n("Michel Ludwig"), ki18n("On-the-fly spell checking"), "michel.ludwig@kdemail.net");
92  m_aboutData.addAuthor (ki18n("Pascal Létourneau"), ki18n("Large scale bug fixing"), "pascal.letourneau@gmail.com");
93  m_aboutData.addAuthor (ki18n("Hamish Rodda"), ki18n("Core Developer"), "rodda@kde.org");
94  m_aboutData.addAuthor (ki18n("Waldo Bastian"), ki18n( "The cool buffersystem" ), "bastian@kde.org" );
95  m_aboutData.addAuthor (ki18n("Charles Samuels"), ki18n("The Editing Commands"), "charles@kde.org");
96  m_aboutData.addAuthor (ki18n("Matt Newell"), ki18n("Testing, ..."), "newellm@proaxis.com");
97  m_aboutData.addAuthor (ki18n("Michael Bartl"), ki18n("Former Core Developer"), "michael.bartl1@chello.at");
98  m_aboutData.addAuthor (ki18n("Michael McCallum"), ki18n("Core Developer"), "gholam@xtra.co.nz");
99  m_aboutData.addAuthor (ki18n("Michael Koch"), ki18n("KWrite port to KParts"), "koch@kde.org");
100  m_aboutData.addAuthor (ki18n("Christian Gebauer"), KLocalizedString(), "gebauer@kde.org" );
101  m_aboutData.addAuthor (ki18n("Simon Hausmann"), KLocalizedString(), "hausmann@kde.org" );
102  m_aboutData.addAuthor (ki18n("Glen Parker"), ki18n("KWrite Undo History, Kspell integration"), "glenebob@nwlink.com");
103  m_aboutData.addAuthor (ki18n("Scott Manson"), ki18n("KWrite XML Syntax highlighting support"), "sdmanson@alltel.net");
104  m_aboutData.addAuthor (ki18n("John Firebaugh"), ki18n("Patches and more"), "jfirebaugh@kde.org");
105  m_aboutData.addAuthor (ki18n("Andreas Kling"), ki18n("Developer"), "kling@impul.se");
106  m_aboutData.addAuthor (ki18n("Mirko Stocker"), ki18n("Various bugfixes"), "me@misto.ch", "http://misto.ch/");
107  m_aboutData.addAuthor (ki18n("Matthew Woehlke"), ki18n("Selection, KColorScheme integration"), "mw_triad@users.sourceforge.net");
108  m_aboutData.addAuthor (ki18n("Sebastian Pipping"), ki18n("Search bar back- and front-end"), "webmaster@hartwork.org", "http://www.hartwork.org/");
109  m_aboutData.addAuthor (ki18n("Jochen Wilhelmy"), ki18n( "Original KWrite Author" ), "digisnap@cs.tu-berlin.de" );
110  m_aboutData.addAuthor (ki18n("Gerald Senarclens de Grancy"), ki18n("QA and Scripting"), "oss@senarclens.eu", "http://find-santa.eu/");
111 
112  m_aboutData.addCredit (ki18n("Matteo Merli"), ki18n("Highlighting for RPM Spec-Files, Perl, Diff and more"), "merlim@libero.it");
113  m_aboutData.addCredit (ki18n("Rocky Scaletta"), ki18n("Highlighting for VHDL"), "rocky@purdue.edu");
114  m_aboutData.addCredit (ki18n("Yury Lebedev"), ki18n("Highlighting for SQL"),"");
115  m_aboutData.addCredit (ki18n("Chris Ross"), ki18n("Highlighting for Ferite"),"");
116  m_aboutData.addCredit (ki18n("Nick Roux"), ki18n("Highlighting for ILERPG"),"");
117  m_aboutData.addCredit (ki18n("Carsten Niehaus"), ki18n("Highlighting for LaTeX"),"");
118  m_aboutData.addCredit (ki18n("Per Wigren"), ki18n("Highlighting for Makefiles, Python"),"");
119  m_aboutData.addCredit (ki18n("Jan Fritz"), ki18n("Highlighting for Python"),"");
120  m_aboutData.addCredit (ki18n("Daniel Naber"));
121  m_aboutData.addCredit (ki18n("Roland Pabel"), ki18n("Highlighting for Scheme"),"");
122  m_aboutData.addCredit (ki18n("Cristi Dumitrescu"), ki18n("PHP Keyword/Datatype list"),"");
123  m_aboutData.addCredit (ki18n("Carsten Pfeiffer"), ki18n("Very nice help"), "");
124  m_aboutData.addCredit (ki18n("Bruno Massa"), ki18n("Highlighting for Lua"), "brmassa@gmail.com");
125 
126  m_aboutData.addCredit (ki18n("All people who have contributed and I have forgotten to mention"));
127 
128  m_aboutData.setTranslator(ki18nc("NAME OF TRANSLATORS","Your names"), ki18nc("EMAIL OF TRANSLATORS","Your emails"));
129 
130  //
131  // dir watch
132  //
133  m_dirWatch = new KDirWatch ();
134 
135  //
136  // command manager
137  //
138  m_cmdManager = new KateCmd ();
139 
140  //
141  // hl manager
142  //
143  m_hlManager = new KateHlManager ();
144 
145  //
146  // mode man
147  //
148  m_modeManager = new KateModeManager ();
149 
150  //
151  // schema man
152  //
153  m_schemaManager = new KateSchemaManager ();
154 
155  //
156  // vi input mode global
157  //
158  m_viInputModeGlobal = new KateViGlobal ();
159 
160  //
161  // spell check manager
162  //
163  m_spellCheckManager = new KateSpellCheckManager ();
164 
165  // config objects
166  m_globalConfig = new KateGlobalConfig ();
167  m_documentConfig = new KateDocumentConfig ();
168  m_viewConfig = new KateViewConfig ();
169  m_rendererConfig = new KateRendererConfig ();
170 
171  // create script manager (search scripts)
172  m_scriptManager = KateScriptManager::self();
173 
174  //
175  // plugin manager
176  //
177  m_pluginManager = new KatePartPluginManager ();
178 
179  //
180  // init the cmds
181  //
182  m_cmds.push_back( KateCommands::CoreCommands::self() );
183  m_cmds.push_back( KateCommands::ViCommands::self() );
184  m_cmds.push_back( KateCommands::AppCommands::self() );
185  m_cmds.push_back( KateCommands::SedReplace::self() );
186  m_cmds.push_back( KateCommands::Character::self() );
187  m_cmds.push_back( KateCommands::Date::self() );
188 
189  for ( QList<KTextEditor::Command *>::iterator it = m_cmds.begin(); it != m_cmds.end(); ++it )
190  m_cmdManager->registerCommand (*it);
191 
192  // global word completion model
193  m_wordCompletionModel = new KateWordCompletionModel (this);
194  // global keyword completion model
195  m_keywordCompletionModel = new KateKeywordCompletionModel (this);
196 
197  //
198  // finally setup connections
199  //
200  connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(updateColorPalette()));
201 
202  //required for setting sessionConfig property
203  qRegisterMetaType<KSharedConfig::Ptr>("KSharedConfig::Ptr");
204 }
205 
206 KateGlobal::~KateGlobal()
207 {
208  delete m_snippetGlobal;
209  delete m_pluginManager;
210 
211  delete m_globalConfig;
212  delete m_documentConfig;
213  delete m_viewConfig;
214  delete m_rendererConfig;
215 
216  delete m_modeManager;
217  delete m_schemaManager;
218 
219  delete m_viInputModeGlobal;
220 
221  delete m_dirWatch;
222 
223  // you too
224  qDeleteAll (m_cmds);
225 
226  // cu managers
227  delete m_scriptManager;
228  delete m_hlManager;
229  delete m_cmdManager;
230 
231  delete m_spellCheckManager;
232 
233  // cu model
234  delete m_wordCompletionModel;
235 
236  s_self = 0;
237 }
238 
239 KTextEditor::Document *KateGlobal::createDocument ( QObject *parent )
240 {
241  KateDocument *doc = new KateDocument (false, false, false, 0, parent);
242 
243  emit documentCreated (this, doc);
244 
245  return doc;
246 }
247 
248 const QList<KTextEditor::Document*> &KateGlobal::documents ()
249 {
250  return m_docs;
251 }
252 
253 KateSnippetGlobal *KateGlobal::snippetGlobal()
254 {
255  if (!m_snippetGlobal)
256  m_snippetGlobal = new KateSnippetGlobal (this);
257  return m_snippetGlobal;
258 }
259 
260 //BEGIN KTextEditor::Editor config stuff
261 void KateGlobal::readConfig(KConfig *config)
262 {
263  if( !config )
264  config = KGlobal::config().data();
265 
266  KateGlobalConfig::global()->readConfig (KConfigGroup(config, "Kate Part Defaults"));
267 
268  KateDocumentConfig::global()->readConfig (KConfigGroup(config, "Kate Document Defaults"));
269 
270  KateViewConfig::global()->readConfig (KConfigGroup(config, "Kate View Defaults"));
271 
272  KateRendererConfig::global()->readConfig (KConfigGroup(config, "Kate Renderer Defaults"));
273 
274  m_viInputModeGlobal->readConfig( KConfigGroup( config, "Kate Vi Input Mode Settings" ) );
275 }
276 
277 void KateGlobal::writeConfig(KConfig *config)
278 {
279  if( !config )
280  config = KGlobal::config().data();
281 
282  KConfigGroup cgGlobal(config, "Kate Part Defaults");
283  KateGlobalConfig::global()->writeConfig (cgGlobal);
284 
285  KConfigGroup cg(config, "Kate Document Defaults");
286  KateDocumentConfig::global()->writeConfig (cg);
287 
288  KConfigGroup cgDefault(config, "Kate View Defaults");
289  KateViewConfig::global()->writeConfig (cgDefault);
290 
291  KConfigGroup cgRenderer(config, "Kate Renderer Defaults");
292  KateRendererConfig::global()->writeConfig (cgRenderer);
293 
294  KConfigGroup cgViInputMode(config, "Kate Vi Input Mode Settings");
295  m_viInputModeGlobal->writeConfig (cgViInputMode);
296 
297  config->sync();
298 }
299 //END KTextEditor::Editor config stuff
300 
301 bool KateGlobal::configDialogSupported () const
302 {
303  return true;
304 }
305 
306 void KateGlobal::configDialog(QWidget *parent)
307 {
308  QPointer<KPageDialog> kd = new KPageDialog(parent);
309  kd->setCaption( i18n("Configure") );
310  kd->setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply | KDialog::Help );
311  kd->setFaceType( KPageDialog::List );
312  kd->setHelp( QString(), KGlobal::mainComponent().componentName() );
313 
314  QList<KTextEditor::ConfigPage*> editorPages;
315 
316  for (int i = 0; i < configPages (); ++i)
317  {
318  const QString name = configPageName (i);
319 
320  QFrame *page = new QFrame();
321 
322  KPageWidgetItem *item = kd->addPage( page, name );
323  item->setHeader( configPageFullName (i) );
324  item->setIcon( configPageIcon(i) );
325 
326  QVBoxLayout *topLayout = new QVBoxLayout( page );
327  topLayout->setMargin( 0 );
328 
329  KTextEditor::ConfigPage *cp = configPage(i, page);
330  connect(kd, SIGNAL(applyClicked ( )), cp, SLOT(apply()));
331  topLayout->addWidget( cp);
332  editorPages.append (cp);
333  }
334 
335  if (kd->exec() && kd)
336  {
337  KateGlobalConfig::global()->configStart ();
338  KateDocumentConfig::global()->configStart ();
339  KateViewConfig::global()->configStart ();
340  KateRendererConfig::global()->configStart ();
341 
342  for (int i=0; i < editorPages.count(); ++i)
343  {
344  editorPages.at(i)->apply();
345  }
346 
347  KateGlobalConfig::global()->configEnd ();
348  KateDocumentConfig::global()->configEnd ();
349  KateViewConfig::global()->configEnd ();
350  KateRendererConfig::global()->configEnd ();
351  }
352 
353  delete kd;
354 }
355 
356 int KateGlobal::configPages () const
357 {
358  return 5;
359 }
360 
361 KTextEditor::ConfigPage *KateGlobal::configPage (int number, QWidget *parent)
362 {
363  switch( number )
364  {
365  case 0:
366  return new KateViewDefaultsConfig (parent);
367 
368  case 1:
369  return new KateSchemaConfigPage (parent);
370 
371  case 2:
372  return new KateEditConfigTab (parent);
373 
374  case 3:
375  return new KateSaveConfigTab (parent);
376 
377  case 4:
378  return new KatePartPluginConfigPage (parent);
379 
380  default:
381  return 0;
382  }
383 
384  return 0;
385 }
386 
387 QString KateGlobal::configPageName (int number) const
388 {
389  switch( number )
390  {
391  case 0:
392  return i18n ("Appearance");
393 
394  case 1:
395  return i18n ("Fonts & Colors");
396 
397  case 2:
398  return i18n ("Editing");
399 
400  case 3:
401  return i18n("Open/Save");
402 
403  case 4:
404  return i18n ("Extensions");
405 
406  default:
407  return QString ("");
408  }
409 
410  return QString ("");
411 }
412 
413 QString KateGlobal::configPageFullName (int number) const
414 {
415  switch( number )
416  {
417  case 0:
418  return i18n("Appearance");
419 
420  case 1:
421  return i18n ("Font & Color Schemas");
422 
423  case 2:
424  return i18n ("Editing Options");
425 
426  case 3:
427  return i18n("File Opening & Saving");
428 
429  case 4:
430  return i18n ("Extensions Manager");
431 
432  default:
433  return QString ("");
434  }
435 
436  return QString ("");
437 }
438 
439 KIcon KateGlobal::configPageIcon (int number) const
440 {
441  switch( number )
442  {
443  case 0:
444  return KIcon("preferences-desktop-theme");
445 
446  case 1:
447  return KIcon("preferences-desktop-color");
448 
449  case 2:
450  return KIcon("accessories-text-editor");
451 
452  case 3:
453  return KIcon("document-save");
454 
455  case 4:
456  return KIcon("preferences-plugin");
457 
458  default:
459  return KIcon("document-properties");
460  }
461 
462  return KIcon("document-properties");
463 }
464 
465 KateGlobal *KateGlobal::self ()
466 {
467  if (!s_self) {
468  new KateGlobal ();
469  }
470 
471  return s_self;
472 }
473 
474 void KateGlobal::registerDocument ( KateDocument *doc )
475 {
476  KateGlobal::incRef ();
477  m_documents.append( doc );
478  m_docs.append (doc);
479 }
480 
481 void KateGlobal::deregisterDocument ( KateDocument *doc )
482 {
483  m_docs.removeAll (doc);
484  m_documents.removeAll( doc );
485  KateGlobal::decRef ();
486 }
487 
488 void KateGlobal::registerView ( KateView *view )
489 {
490  KateGlobal::incRef ();
491  m_views.append( view );
492 }
493 
494 void KateGlobal::deregisterView ( KateView *view )
495 {
496  m_views.removeAll( view );
497  KateGlobal::decRef ();
498 }
499 
500 //BEGIN command interface
501 bool KateGlobal::registerCommand (KTextEditor::Command *cmd)
502 {return m_cmdManager->registerCommand(cmd);}
503 
504 bool KateGlobal::unregisterCommand (KTextEditor::Command *cmd)
505 {return m_cmdManager->unregisterCommand(cmd);}
506 
507 KTextEditor::Command *KateGlobal::queryCommand (const QString &cmd) const
508 {return m_cmdManager->queryCommand(cmd);}
509 
510 QList<KTextEditor::Command*> KateGlobal::commands() const
511 {return m_cmdManager->commands();}
512 
513 QStringList KateGlobal::commandList() const
514 {return m_cmdManager->commandList();}
515 //END command interface
516 
517 
518 //BEGIN container interface
519 QObject * KateGlobal::container()
520 {return m_container.data();}
521 
522 void KateGlobal::setContainer( QObject * container )
523 {m_container=container;}
524 //END container interface
525 
526 QWidget *KateGlobal::snippetWidget ()
527 {
528  return snippetGlobal()->snippetWidget ();
529 }
530 
531 KTextEditor::TemplateScript* KateGlobal::registerTemplateScript (QObject* owner, const QString& script)
532 {
533  return scriptManager()->registerTemplateScript(owner, script);
534 }
535 
536 void KateGlobal::unregisterTemplateScript(KTextEditor::TemplateScript* templateScript)
537 {
538  scriptManager()->unregisterTemplateScript(templateScript);
539 }
540 
541 void KateGlobal::updateColorPalette()
542 {
543  // reload the global schema (triggers reload for every view as well)
544  m_rendererConfig->reloadSchema();
545 
546  // force full update of all view caches and colors
547  m_rendererConfig->updateConfig();
548 }
549 
550 void KateGlobal::copyToClipboard (const QString &text)
551 {
555  if (text.isEmpty())
556  return;
557 
561  QApplication::clipboard()->setText (text, QClipboard::Clipboard);
562 
567  m_clipboardHistory.prepend (text);
568  if (m_clipboardHistory.size () > 10)
569  m_clipboardHistory.removeLast ();
570 
574  emit clipboardHistoryChanged ();
575 }
576 
577 // kate: space-indent on; indent-width 2; replace-tabs on;
KateGlobal::writeConfig
void writeConfig(KConfig *config=0)
Write editor configuration to given config object.
Definition: kateglobal.cpp:277
QWidget
KateGlobal::registerDocument
void registerDocument(KateDocument *doc)
register document at the factory this allows us to loop over all docs for example on config changes ...
Definition: kateglobal.cpp:474
kateview.h
KateScriptManager::self
static KateScriptManager * self()
Definition: katescriptmanager.h:92
KateCommands::SedReplace::self
static SedReplace * self()
Definition: katecmds.h:259
Kate::Script::i18n
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
QPointer::data
T * data() const
KateGlobal::queryCommand
KTextEditor::Command * queryCommand(const QString &cmd) const
query for command
Definition: kateglobal.cpp:507
KateCmd::unregisterCommand
bool unregisterCommand(KTextEditor::Command *cmd)
Definition: katecmd.cpp:59
katerenderer.h
KateGlobal::container
QObject * container()
Get the currently associated Container object.
Definition: kateglobal.cpp:519
KateHlManager
Definition: katesyntaxmanager.h:48
KateGlobal::clipboardHistoryChanged
void clipboardHistoryChanged()
Emitted if the history of clipboard changes via copyToClipboard.
QList::push_back
void push_back(const T &value)
KateGlobal::unregisterTemplateScript
void unregisterTemplateScript(KTextEditor::TemplateScript *templateScript)
Definition: kateglobal.cpp:536
KateGlobal::deregisterView
void deregisterView(KateView *view)
unregister view at the factory
Definition: kateglobal.cpp:494
KateGlobal::configDialog
void configDialog(QWidget *parent)
Shows a config dialog for the part, changes will be applied to the editor, but not saved anywhere aut...
Definition: kateglobal.cpp:306
KateEditConfigTab
Definition: katedialogs.h:283
KateGlobal::decRef
static void decRef()
decrement reference counter
Definition: kateglobal.h:223
KateGlobal::configPage
KTextEditor::ConfigPage * configPage(int number, QWidget *parent)
returns config page with the given number, config pages from 0 to configPages()-1 are available if co...
Definition: kateglobal.cpp:361
katekeywordcompletion.h
KateConfig::configEnd
void configEnd()
end a config change transaction, update the concerned documents/views/renderers
Definition: kateconfig.cpp:64
QList::at
const T & at(int i) const
QPointer
KateGlobalConfig::writeConfig
void writeConfig(KConfigGroup &config)
Write config to object.
Definition: kateconfig.cpp:115
katedocument.h
KateGlobal::commands
QList< KTextEditor::Command * > commands() const
Get a list of all registered commands.
Definition: kateglobal.cpp:510
KateGlobal::copyToClipboard
void copyToClipboard(const QString &text)
Copy text to clipboard an remember it in the history.
Definition: kateglobal.cpp:550
KateDocumentConfig::readConfig
void readConfig(const KConfigGroup &config)
Read config from object.
Definition: kateconfig.cpp:325
KateViewDefaultsConfig
Definition: katedialogs.h:306
KateGlobal::self
static KateGlobal * self()
Kate Part Internal stuff ;)
Definition: kateglobal.cpp:465
KateModeManager
Definition: katemodemanager.h:66
KateCommands::CoreCommands::self
static CoreCommands * self()
Definition: katecmds.h:99
KateGlobal::setContainer
void setContainer(QObject *container)
Set the associated container object.
Definition: kateglobal.cpp:522
spellcheck.h
KateGlobal::configDialogSupported
bool configDialogSupported() const
Does this editor support a config dialog.
Definition: kateglobal.cpp:301
QList::size
int size() const
katebuffer.h
KateConfig::configStart
void configStart()
start some config changes this method is needed to init some kind of transaction for config changes...
Definition: kateconfig.cpp:54
KateGlobal::incRef
static void incRef()
increment reference counter
Definition: kateglobal.h:218
KateGlobalConfig
Definition: kateconfig.h:93
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QList::count
int count(const T &value) const
KateGlobal::registerView
void registerView(KateView *view)
register view at the factory this allows us to loop over all views for example on config changes ...
Definition: kateglobal.cpp:488
QList::append
void append(const T &value)
KateGlobal::documents
const QList< KTextEditor::Document * > & documents()
Returns a list of all documents of this editor.
Definition: kateglobal.cpp:248
KateCommands::ViCommands::self
static ViCommands * self()
Definition: katecmds.h:160
katesnippetglobal.h
katemodemanager.h
kateschema.h
KateSnippetGlobal::snippetWidget
QWidget * snippetWidget()
Create a new snippet widget, to allow to manage and insert snippets.
Definition: katesnippetglobal.cpp:90
QApplication::clipboard
QClipboard * clipboard()
katepartpluginmanager.h
KateGlobal::katePartVersion
static QString katePartVersion()
Returns the current version of Kate Part: KDE X.Y.Z contains Kate Part X-1.Y.
Definition: kateglobal.cpp:60
QObject
KateGlobal::snippetGlobal
KateSnippetGlobal * snippetGlobal()
global instance of the snippet handling lazy constructed on first use to allow it to use the session ...
Definition: kateglobal.cpp:253
KateCommands::Character::self
static Character * self()
Definition: katecmds.h:343
kateglobal.h
KateGlobal::deregisterDocument
void deregisterDocument(KateDocument *doc)
unregister document at the factory
Definition: kateglobal.cpp:481
QString::isEmpty
bool isEmpty() const
QList::removeAll
int removeAll(const T &value)
KateGlobal::KateDocumentConfig
friend class KateDocumentConfig
Definition: kateglobal.h:118
kateschemaconfig.h
KateGlobal::configPageName
QString configPageName(int number) const
Definition: kateglobal.cpp:387
KateGlobal::registerTemplateScript
KTextEditor::TemplateScript * registerTemplateScript(QObject *owner, const QString &script)
TemplateScriptRegistrar interface.
Definition: kateglobal.cpp:531
KateCommands::AppCommands::self
static AppCommands * self()
Definition: katecmds.h:201
QVBoxLayout
KateSpellCheckManager
Definition: spellcheck.h:36
KateRendererConfig::global
static KateRendererConfig * global()
Definition: kateconfig.h:640
katecmd.h
QString
QList
KateRendererConfig::reloadSchema
void reloadSchema()
Reload the schema from the schema manager.
Definition: kateconfig.cpp:2195
KateGlobal::unregisterCommand
bool unregisterCommand(KTextEditor::Command *cmd)
unregister given command this works global, for all documents
Definition: kateglobal.cpp:504
QLayout::setMargin
void setMargin(int margin)
KateGlobalConfig::global
static KateGlobalConfig * global()
Definition: kateconfig.h:109
katewordcompletion.h
KateRendererConfig::writeConfig
void writeConfig(KConfigGroup &config)
Write config to object.
Definition: kateconfig.cpp:2147
QStringList
KateGlobalConfig::readConfig
void readConfig(const KConfigGroup &config)
Read config from object.
Definition: kateconfig.cpp:105
KateSchemaConfigPage
Definition: kateschemaconfig.h:178
KateViGlobal::readConfig
void readConfig(const KConfigGroup &config)
Definition: kateviglobal.cpp:74
KateView
Definition: kateview.h:77
KateSchemaManager
Definition: kateschema.h:47
QList::end
iterator end()
KateDocument
Definition: katedocument.h:74
KateViewConfig::writeConfig
void writeConfig(KConfigGroup &config)
Write config to object.
Definition: kateconfig.cpp:1327
KateSnippetGlobal
This is the main class of KDevelop's snippet plugin.
Definition: katesnippetglobal.h:39
KateScriptManager::unregisterTemplateScript
void unregisterTemplateScript(KTextEditor::TemplateScript *templateScript)
unregister a given script
Definition: katescriptmanager.cpp:389
QFrame
KateViGlobal
Definition: kateviglobal.h:46
KateGlobal::readConfig
void readConfig(KConfig *config=0)
Configuration management.
Definition: kateglobal.cpp:261
KateGlobal::commandList
QStringList commandList() const
Get a list of available commandline strings.
Definition: kateglobal.cpp:513
KateCmd::commands
QList< KTextEditor::Command * > commands() const
Definition: katecmd.cpp:102
KateCmd::queryCommand
KTextEditor::Command * queryCommand(const QString &cmd) const
Definition: katecmd.cpp:78
KateRendererConfig
Definition: kateconfig.h:618
KateScriptManager::registerTemplateScript
KTextEditor::TemplateScript * registerTemplateScript(QObject *owner, const QString &script)
managing of scripts for the template handler.
Definition: katescriptmanager.cpp:378
KateGlobal::~KateGlobal
~KateGlobal()
Destructor.
Definition: kateglobal.cpp:206
KateCmd::commandList
QStringList commandList() const
Definition: katecmd.cpp:107
KateRendererConfig::updateConfig
void updateConfig()
do the real update
Definition: kateconfig.cpp:2160
KatePartPluginManager
Definition: katepartpluginmanager.h:56
KateViewConfig::readConfig
void readConfig(const KConfigGroup &config)
Read config from object.
Definition: kateconfig.cpp:1259
QList::removeLast
void removeLast()
KateViGlobal::writeConfig
void writeConfig(KConfigGroup &config) const
Definition: kateviglobal.cpp:43
KateWordCompletionModel
Definition: katewordcompletion.h:39
KateGlobal
KateGlobal One instance of this class is hold alive during a kate part session, as long as any factor...
Definition: kateglobal.h:71
KateCmd::registerCommand
bool registerCommand(KTextEditor::Command *cmd)
Definition: katecmd.cpp:38
KateCmd
Definition: katecmd.h:33
KateGlobal::snippetWidget
QWidget * snippetWidget()
Create a new snippet widget, to allow to manage and insert snippets.
KateSaveConfigTab
Definition: katedialogs.h:325
KateDocumentConfig::writeConfig
void writeConfig(KConfigGroup &config)
Write config to object.
Definition: kateconfig.cpp:379
KateGlobal::configPageIcon
KIcon configPageIcon(int number) const
Definition: kateglobal.cpp:439
KateCommands::Date::self
static Date * self()
Definition: katecmds.h:380
QList::prepend
void prepend(const T &value)
KateKeywordCompletionModel
Highlighting-file based keyword completion for the editor.
Definition: katekeywordcompletion.h:34
QClipboard::setText
void setText(const QString &text, Mode mode)
KateGlobal::configPages
int configPages() const
Number of available config pages If the editor returns a number < 1, it doesn't support this and the ...
Definition: kateglobal.cpp:356
KateViewConfig
Definition: kateconfig.h:381
KateDocumentConfig::global
static KateDocumentConfig * global()
Definition: kateconfig.h:165
KatePartPluginConfigPage
Definition: katedialogs.h:354
katescriptmanager.h
KateGlobal::registerCommand
bool registerCommand(KTextEditor::Command *cmd)
register given command this works global, for all documents
Definition: kateglobal.cpp:501
KateGlobal::configPageFullName
QString configPageFullName(int number) const
Definition: kateglobal.cpp:413
kateviglobal.h
kateconfig.h
katecmds.h
QList::begin
iterator begin()
KateGlobal::createDocument
KTextEditor::Document * createDocument(QObject *parent)
Create a new document object.
Definition: kateglobal.cpp:239
KateRendererConfig::readConfig
void readConfig(const KConfigGroup &config)
Read config from object.
Definition: kateconfig.cpp:2129
KateGlobal::scriptManager
KateScriptManager * scriptManager()
Global script collection.
Definition: kateglobal.h:321
KateViewConfig::global
static KateViewConfig * global()
Definition: kateconfig.h:402
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal