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

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • filters
exporter.h
Go to the documentation of this file.
1 // Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program 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
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 #ifndef KIG_FILTERS_EXPORTER_H
19 #define KIG_FILTERS_EXPORTER_H
20 
21 #include <kaction.h>
22 
23 #include <vector>
24 
25 class QString;
26 class KigPart;
27 class KigWidget;
28 class KActionCollection;
29 
30 class KigExporter;
31 
32 class KigExportManager
33 {
34  std::vector<KigExporter*> mexporters;
35  KigExportManager();
36  ~KigExportManager();
37 public:
38  static KigExportManager* instance();
39  void addMenuAction( const KigPart* doc, KigWidget* w,
40  KActionCollection* coll );
41 };
42 
43 class ExporterAction
44  : public KAction
45 {
46  Q_OBJECT
47 
48  KigExporter* mexp;
49  const KigPart* mdoc;
50  KigWidget* mw;
51 public:
52  ExporterAction( const KigPart* doc, KigWidget* w,
53  KActionCollection* parent, KigExporter* exp );
54 private slots:
55  void slotActivated();
56 };
57 
63 class KigExporter
64 {
65 public:
66  virtual ~KigExporter();
67 
71  virtual QString exportToStatement() const = 0;
75  virtual QString menuEntryName() const = 0;
79  virtual QString menuIcon() const = 0;
80 
86  virtual void run( const KigPart& doc, KigWidget& w ) = 0;
87 };
88 
92 class ImageExporter
93  : public KigExporter
94 {
95 public:
96  ~ImageExporter();
97  QString exportToStatement() const;
98  QString menuEntryName() const;
99  QString menuIcon() const;
100  void run( const KigPart& doc, KigWidget& w );
101 };
102 
103 #endif
KigExporter::run
virtual void run(const KigPart &doc, KigWidget &w)=0
Do what you need to do.
ImageExporter::menuIcon
QString menuIcon() const
Returns a string with the name of the icon.
Definition: exporter.cc:80
KigExporter
Base class for a Kig exporter.
Definition: exporter.h:63
KigExporter::~KigExporter
virtual ~KigExporter()
Definition: exporter.cc:62
ExporterAction::ExporterAction
ExporterAction(const KigPart *doc, KigWidget *w, KActionCollection *parent, KigExporter *exp)
Definition: exporter.cc:44
KigExportManager::instance
static KigExportManager * instance()
Definition: exporter.cc:166
ImageExporter
This exporter takes care of the "Export to Image" stuff.
Definition: exporter.h:92
KigExporter::exportToStatement
virtual QString exportToStatement() const =0
Returns a statement like i18n( "Export to image" )
ExporterAction
Definition: exporter.h:43
KigExporter::menuIcon
virtual QString menuIcon() const =0
Returns a string with the name of the icon.
KigExportManager::addMenuAction
void addMenuAction(const KigPart *doc, KigWidget *w, KActionCollection *coll)
Definition: exporter.cc:155
KigWidget
This class is the real widget showing the document.
Definition: kig_view.h:50
ImageExporter::menuEntryName
QString menuEntryName() const
Returns a string like i18n( "Image..." )
Definition: exporter.cc:75
KigExportManager
Definition: exporter.h:32
ImageExporter::exportToStatement
QString exportToStatement() const
Returns a statement like i18n( "Export to image" )
Definition: exporter.cc:70
KAction
KigExporter::menuEntryName
virtual QString menuEntryName() const =0
Returns a string like i18n( "Image..." )
KigPart
This is a "Part".
Definition: kig_part.h:68
ImageExporter::~ImageExporter
~ImageExporter()
Definition: exporter.cc:66
ImageExporter::run
void run(const KigPart &doc, KigWidget &w)
Do what you need to do.
Definition: exporter.cc:85
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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