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

okular

  • kde-4.x
  • kdegraphics
  • okular
  • generators
  • dvi
dviexport.h
Go to the documentation of this file.
1 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; c-brace-offset: 0; -*-
19 #ifndef DVIEXPORT_H
20 #define DVIEXPORT_H
21 
22 #include <QExplicitlySharedDataPointer>
23 
24 #include <QObject>
25 #include <QPrinter>
26 
27 
28 class dviRenderer;
29 class KProcess;
30 class QStringList;
31 
32 
33 class DVIExport: public QObject, public QSharedData
34 {
35  Q_OBJECT
36 public:
37  virtual ~DVIExport();
38 
45  bool started() const { return started_; }
46 
47 Q_SIGNALS:
48  void error( const QString &message, int duration );
49 
50 protected:
55  DVIExport(dviRenderer& parent);
56 
60  void start(const QString& command,
61  const QStringList& args,
62  const QString& working_directory,
63  const QString& error_message);
64 
69  virtual void abort_process_impl();
70 
75  virtual void finished_impl(int exit_code);
76 
77 private Q_SLOTS:
79  void abort_process() { abort_process_impl(); }
80  void finished(int exit_code) { finished_impl(exit_code); }
81 
85  void output_receiver();
86 
87 private:
88  QString error_message_;
89  bool started_;
90  KProcess* process_;
91  dviRenderer* parent_;
92 };
93 
94 
95 class DVIExportToPDF : public DVIExport
96 {
97  Q_OBJECT
98 
99 public:
104  DVIExportToPDF(dviRenderer& parent, const QString& output_name);
105 };
106 
107 
108 class DVIExportToPS : public DVIExport
109 {
110  Q_OBJECT
111 
112 public:
124  DVIExportToPS(dviRenderer& parent,
125  const QString& output_name,
126  const QStringList& options,
127  QPrinter* printer,
128  bool useFontHinting,
129  QPrinter::Orientation orientation = QPrinter::Portrait);
130 
131 private:
132  void abort_process_impl() override;
133  void finished_impl(int exit_code) override;
134 
135  QPrinter* printer_;
136  QString output_name_;
137  QString tmpfile_name_;
138  QPrinter::Orientation orientation_;
139 };
140 
141 #endif
QPrinter
DVIExport
Definition: dviexport.h:33
QSharedData
DVIExport::error
void error(const QString &message, int duration)
DVIExport::~DVIExport
virtual ~DVIExport()
Definition: dviexport.cpp:52
QObject
DVIExport::started
bool started() const
started() Flags whether or not the external process was spawned successfully.
Definition: dviexport.h:45
QString
QStringList
DVIExportToPS::DVIExportToPS
DVIExportToPS(dviRenderer &parent, const QString &output_name, const QStringList &options, QPrinter *printer, bool useFontHinting, QPrinter::Orientation orientation=QPrinter::Portrait)
Definition: dviexport.cpp:154
DVIExportToPDF::DVIExportToPDF
DVIExportToPDF(dviRenderer &parent, const QString &output_name)
Definition: dviexport.cpp:116
DVIExport::finished_impl
virtual void finished_impl(int exit_code)
The real implementation of the finished() slot that is called when the external process finishes...
Definition: dviexport.cpp:98
DVIExportToPS
Definition: dviexport.h:108
DVIExport::abort_process_impl
virtual void abort_process_impl()
The real implementation of the abort_process() slot that is called when the fontProcessDialog is clos...
Definition: dviexport.cpp:89
DVIExportToPDF
Definition: dviexport.h:95
QObject::parent
QObject * parent() const
DVIExport::start
void start(const QString &command, const QStringList &args, const QString &working_directory, const QString &error_message)
Spawns the external process having connected slots to the child process's stdin and stdout streams...
Definition: dviexport.cpp:58
dviRenderer
Definition: dviRenderer.h:90
DVIExport::DVIExport
DVIExport(dviRenderer &parent)
Definition: dviexport.cpp:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 13 2019 02:01:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

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

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkipiplugins
  •     src
  •     src
  •     src
  •     src
  •     src
  • okular

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