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

kate

  • kate
  • part
katedocumenthelpers.cpp
1/* This file is part of the KDE libraries
2 Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3 Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
4 Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de>
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 version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "katedocumenthelpers.h"
22#include "katedocumenthelpers.moc"
23
24#include "katedocument.h"
25#include "kateview.h"
26
27#include <tdepopupmenu.h>
28#include <tdelocale.h>
29
30KateBrowserExtension::KateBrowserExtension( KateDocument* doc )
31: KParts::BrowserExtension( doc, "katepartbrowserextension" ),
32 m_doc (doc)
33{
34 connect( doc, TQ_SIGNAL( selectionChanged() ),
35 this, TQ_SLOT( slotSelectionChanged() ) );
36 emit enableAction( "print", true );
37}
38
39void KateBrowserExtension::copy()
40{
41 if (m_doc->activeView())
42 m_doc->activeView()->copy();
43}
44
45void KateBrowserExtension::print()
46{
47 m_doc->printDialog();
48}
49
50void KateBrowserExtension::slotSelectionChanged()
51{
52 if (m_doc->activeView())
53 emit enableAction( "copy", m_doc->activeView()->hasSelection() );
54}
KParts::BrowserExtension::enableAction
void enableAction(const char *name, bool enabled)
KateBrowserExtension::KateBrowserExtension
KateBrowserExtension(KateDocument *doc)
Constructor.
Definition: katedocumenthelpers.cpp:30
KateBrowserExtension::copy
void copy()
copy text to clipboard
Definition: katedocumenthelpers.cpp:39
KateBrowserExtension::slotSelectionChanged
void slotSelectionChanged()
selection has changed
Definition: katedocumenthelpers.cpp:50
KateBrowserExtension::print
void print()
print the current file
Definition: katedocumenthelpers.cpp:45
tdelocale.h

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.4
This website is maintained by Timothy Pearson.