• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

  • kate
  • interfaces
interfaces.cpp
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #include "document.h"
20 #include "document.moc"
21 
22 #include "view.h"
23 #include "view.moc"
24 
25 #include "katecmd.h"
26 
27 namespace Kate
28 {
29 
30 bool Document::s_openErrorDialogsActivated = true;
31 bool Document::s_fileChangedDialogsActivated = false;
32 TQString Document::s_defaultEncoding;
33 
34 Document::Document (TQObject* parent, const char* name)
35  : KTextEditor::Document (parent, name)
36 {
37 }
38 
39 Document::Document () : KTextEditor::Document (0L, "Kate::Document")
40 {
41 }
42 
43 Document::~Document ()
44 {
45 }
46 
47 void Document::setOpenErrorDialogsActivated (bool on)
48 {
49  s_openErrorDialogsActivated = on;
50 }
51 
52 void Document::setFileChangedDialogsActivated (bool on)
53 {
54  s_fileChangedDialogsActivated = on;
55 }
56 
57 const TQString &Document::defaultEncoding ()
58 {
59  return s_defaultEncoding;
60 }
61 
62 bool Document::registerCommand (Command *cmd)
63 {
64  return KateCmd::self()->registerCommand (cmd);
65 }
66 
67 bool Document::unregisterCommand (Command *cmd)
68 {
69  return KateCmd::self()->unregisterCommand (cmd);
70 }
71 
72 Command *Document::queryCommand (const TQString &cmd)
73 {
74  return KateCmd::self()->queryCommand (cmd);
75 }
76 
77 View::View ( KTextEditor::Document *doc, TQWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name)
78 {
79 }
80 
81 View::~View ()
82 {
83 }
84 
85 void ConfigPage::slotChanged()
86 {
87  emit changed();
88 }
89 
90 DocumentExt::DocumentExt ()
91 {
92 }
93 
94 DocumentExt::~DocumentExt ()
95 {
96 }
97 
98 Document *document (KTextEditor::Document *doc)
99 {
100  if (!doc)
101  return 0;
102 
103  return ::tqt_cast<Kate::Document*>(doc);
104 }
105 
106 DocumentExt *documentExt (KTextEditor::Document *doc)
107 {
108  if (!doc)
109  return 0;
110 
111  return dynamic_cast<Kate::DocumentExt*>(doc);
112 }
113 
114 Document *createDocument ( TQObject *parent, const char *name )
115 {
116  return (Document* ) KTextEditor::createDocument ("libkatepart", parent, name);
117 }
118 
119 View *view (KTextEditor::View *view)
120 {
121  if (!view)
122  return 0;
123 
124  return ::tqt_cast<Kate::View*>(view);
125 }
126 
127 }
Kate::Command
Kate Commands.
Definition: document.h:97
Kate::DocumentExt
Extensions to the Document Interface.
Definition: document.h:350
Kate::Document
This interface provides access to the Kate Document class.
Definition: document.h:190
Kate::View
The Kate::View text editor interface.
Definition: view.h:45
Kate::View::~View
virtual ~View()
Destructor, you need a destructor if Scott Meyers says so.
Definition: interfaces.cpp:81
Kate
Kate namespace All classes in this namespace must stay BC during one major release series (e....
Definition: document.h:51
Kate::createDocument
KATEPARTINTERFACES_EXPORT Document * createDocument(TQObject *parent=0, const char *name=0)
Creates a new Kate::Document object.
Definition: interfaces.cpp:114
Kate::documentExt
KATEPARTINTERFACES_EXPORT DocumentExt * documentExt(KTextEditor::Document *doc)
Check if given document is a Kate::DocumentExt.
Definition: interfaces.cpp:106
Kate::document
KATEPARTINTERFACES_EXPORT Document * document(KTextEditor::Document *doc)
Check if given document is a Kate::Document.
Definition: interfaces.cpp:98
TDEStdAccel::name
TQString name(StdAccel id)

kate

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

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.9.1
This website is maintained by Timothy Pearson.