Sync QDVI and KDVI header files as much as possible.

#include <config.h> in all .cpp files.

svn path=/trunk/KDE/kdegraphics/kviewshell/plugins/dvi/; revision=470366
This commit is contained in:
Angus Leeming 2005-10-13 22:41:50 +00:00
parent 8533a28e9b
commit d175df8ace
37 changed files with 115 additions and 97 deletions

View file

@ -1,3 +1,4 @@
#include <config.h>
#include "glyph.h"
#include "TeXFont.h"

View file

@ -9,8 +9,8 @@
#ifndef _TEXFONT_H
#define _TEXFONT_H
#include "TeXFontDefinition.h"
#include "glyph.h"
#include "TeXFontDefinition.h"
class TeXFont {

View file

@ -15,12 +15,10 @@
#ifndef _FONT_H
#define _FONT_H
#include "config.h"
#include <Q3IntDict>
#include <QString>
#include <stdio.h>
#include <cstdio>
class dviRenderer;
class TeXFont;

View file

@ -10,6 +10,8 @@
// Add header files alphabetically
#include <config.h>
#include <kdebug.h>
#include <klocale.h>
#include <qimage.h>

View file

@ -9,9 +9,6 @@
// This file is compiled only if the FreeType library is present on
// the system
#include "config.h"
#ifdef HAVE_FREETYPE
#ifndef _TEXFONT_PFB_H
#define _TEXFONT_PFB_H
@ -42,4 +39,3 @@ class TeXFont_PFB : public TeXFont {
};
#endif
#endif // HAVE_FREETYPE

View file

@ -49,6 +49,8 @@
* and Luis Miguel Silveira, MIT RLE.
*/
#include <config.h>
#include <kdebug.h>
#include <klocale.h>
#include <math.h>

View file

@ -7,6 +7,8 @@
// Add header files alphabetically
#include <config.h>
#include <kdebug.h>
#include <klocale.h>
#include <qdatastream.h>

View file

@ -5,6 +5,7 @@
// (C) 2003 Stefan Kebekus
// Distributed under the GPL
#include <config.h>
#include <kdebug.h>

View file

@ -49,6 +49,7 @@
* and Luis Miguel Silveira, MIT RLE.
*/
#include <config.h>
#include <kdebug.h>
#include <klocale.h>

View file

@ -16,8 +16,8 @@
#include <Q3IntDict>
#include <Q3MemArray>
#include <QIODevice>
#include <QMap>
#include <QString>
#include <qmap.h>
class fontPool;
class pageSize;

View file

@ -18,6 +18,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <config.h>
#include <kdebug.h>
#include "dviPageCache.h"

View file

@ -8,6 +8,8 @@
// Distributed under the GPL
//
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View file

@ -51,6 +51,8 @@
//#define DEBUG_RENDER 0
#include <config.h>
#include "dviRenderer.h"
#include "dvi.h"
#include "dviFile.h"
@ -78,7 +80,6 @@
extern QPainter *foreGroundPainter;
/** Routine to print characters. */
void dviRenderer::set_char(unsigned int cmd, unsigned int ch)

View file

@ -25,6 +25,8 @@
// of kdvi.
#include <config.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <kdebug.h>

View file

@ -5,6 +5,8 @@
// (C) 2003--2004 Stefan Kebekus
// Distributed under the GPL
#include <config.h>
#include "dviRenderer.h"
#include "dvi.h"
#include "dviFile.h"

View file

@ -8,6 +8,8 @@
// Distributed under the GPL
//
#include <config.h>
#include <kdebug.h>
#include <klocale.h>

View file

@ -6,6 +6,8 @@
// Copyright: See COPYING file that comes with this distribution
//
#include <config.h>
#include <qdir.h>
#include <kdebug.h>

View file

@ -6,10 +6,6 @@
// (C) 2003 Stefan Kebekus
// Distributed under the GPL
#include "config.h"
#ifdef HAVE_FREETYPE
#ifndef _FONTENCODING_H
#define _FONTENCODING_H
@ -88,4 +84,3 @@ class fontEncoding {
};
#endif
#endif // HAVE_FREETYPE

View file

@ -6,9 +6,6 @@
// (C) 2003 Stefan Kebekus
// Distributed under the GPL
#include "config.h"
#ifdef HAVE_FREETYPE
#ifndef _FONTENCODINGPOOL_H
#define _FONTENCODINGPOOL_H
@ -30,4 +27,3 @@ class fontEncodingPool {
};
#endif
#endif // HAVE_FREETYPE

View file

@ -9,9 +9,6 @@
#ifndef _FONTMAP_H
#define _FONTMAP_H
#include "config.h"
#ifdef HAVE_FREETYPE
#include <QMap>
#include <QString>
@ -118,5 +115,4 @@ class fontMap {
QMap<QString, fontMapEntry> fontMapEntries;
};
#endif // ifdef HAVE_FREETYPE
#endif // ifndef _FONTMAP_H

View file

@ -4,6 +4,8 @@
// (C) 2001-2004 Stefan Kebekus
// Distributed under the GPL
#include <config.h>
#include <kdebug.h>
#include <kinstance.h>
#include <klocale.h>

View file

@ -7,8 +7,6 @@
#ifndef _FONTPOOL_H
#define _FONTPOOL_H
#include "config.h"
#include "fontEncodingPool.h"
#include "fontMap.h"
#include "fontprogress.h"
@ -23,7 +21,6 @@
#endif
class KProcess;
class KShellProcess;
/**
@ -136,72 +133,72 @@ signals:
void setStatusBarText( const QString& );
public slots:
// Locates font files on the disk using the kpsewhich program. If
// 'locateTFMonly' is true, the method does not look for PFB- or
// PK-fonts. Instead, only TFM-files are searched. This option can be
// used as a 'last resort': if a found cannot be found, one can at
// least use the TFM file to draw filled rectangles for the
// characters. If not null, the bool pointed at by virtualFontsFound
// is set to true if one of the fonts found is a virtual font. If no
// virtual font is found, the variable remains untouched.
void locateFonts();
// Locates font files on the disk using the kpsewhich program. If
// 'locateTFMonly' is true, the method does not look for PFB- or
// PK-fonts. Instead, only TFM-files are searched. This option can be
// used as a 'last resort': if a found cannot be found, one can at
// least use the TFM file to draw filled rectangles for the
// characters. If not null, the bool pointed at by virtualFontsFound
// is set to true if one of the fonts found is a virtual font. If no
// virtual font is found, the variable remains untouched.
void locateFonts();
private:
// This method goes through the list of fonts, and marks each of them
// as 'located'. Used, e.g. after a fatal error in the font lookup
// process to ensure that the problematic kpsewhich is not used again
void markFontsAsLocated();
// This method goes through the list of fonts, and marks each of them
// as 'located'. Used, e.g. after a fatal error in the font lookup
// process to ensure that the problematic kpsewhich is not used again
void markFontsAsLocated();
// Checks if all the fonts file names have been located, and returns
// true if that is so.
bool areFontsLocated();
// Checks if all the fonts file names have been located, and returns
// true if that is so.
bool areFontsLocated();
// This flag is used by PFB fonts to determine if the FREETYPE engine
// should use hinted fonts or not
bool useFontHints;
// This flag is used by PFB fonts to determine if the FREETYPE engine
// should use hinted fonts or not
bool useFontHints;
// Resolution of the output device.
double displayResolution_in_dpi;
// Resolution of the output device.
double displayResolution_in_dpi;
// Number of centimeters per DVI unit
double CMperDVIunit;
// Number of centimeters per DVI unit
double CMperDVIunit;
/** Members used for font location */
/** Members used for font location */
// Locates font files on the disk using the kpsewhich program. If
// 'locateTFMonly' is true, the method does not look for PFB- or
// PK-fonts. Instead, only TFM-files are searched. This option can be
// used as a 'last resort': if a found cannot be found, one can at
// least use the TFM file to draw filled rectangles for the
// characters. If not null, the bool pointed at by virtualFontsFound
// is set to true if one of the fonts found is a virtual font. If no
// virtual font is found, the variable remains untouched.
void locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFound=0);
// Locates font files on the disk using the kpsewhich program. If
// 'locateTFMonly' is true, the method does not look for PFB- or
// PK-fonts. Instead, only TFM-files are searched. This option can be
// used as a 'last resort': if a found cannot be found, one can at
// least use the TFM file to draw filled rectangles for the
// characters. If not null, the bool pointed at by virtualFontsFound
// is set to true if one of the fonts found is a virtual font. If no
// virtual font is found, the variable remains untouched.
void locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFound=0);
// This QString is used internally by the mf_output_receiver()
// method. This string is set to QString::null in locateFonts(bool,
// bool, bool *). Values are set and read by the
// mf_output_receiver(...) method
QString MetafontOutput;
// This QString is used internally by the mf_output_receiver()
// method. This string is set to QString::null in locateFonts(bool,
// bool, bool *). Values are set and read by the
// mf_output_receiver(...) method
QString MetafontOutput;
// This QString is used to collect the output of kpsewhich and
// MetaFont. The string is set to QString::null in the
// locateFonts()-method, and content is gathered by the
// mf_output_receiver(). This string is used by locateFonts() and
// locateFonts(bool, bool, bool *) to display error messages.
QString kpsewhichOutput;
// This QString is used to collect the output of kpsewhich and
// MetaFont. The string is set to QString::null in the
// locateFonts()-method, and content is gathered by the
// mf_output_receiver(). This string is used by locateFonts() and
// locateFonts(bool, bool, bool *) to display error messages.
QString kpsewhichOutput;
// This string is set to the DVI file's path. It is used to set the
// current working directory for the kpsewhich command, so that
// kpsewhich will find fonts that are stored in the DVI file's
// directory. Used by the locateFonts() and the locateFonts(bool,
// bool, bool *) method. Values are set by the
// setExtraSearchPath(...) method
QString extraSearchPath;
// This string is set to the DVI file's path. It is used to set the
// current working directory for the kpsewhich command, so that
// kpsewhich will find fonts that are stored in the DVI file's
// directory. Used by the locateFonts() and the locateFonts(bool,
// bool, bool *) method. Values are set by the
// setExtraSearchPath(...) method
QString extraSearchPath;
// FontProgress; the progress dialog used when generating fonts.
fontProgressDialog progress;
// FontProgress; the progress dialog used when generating fonts.
fontProgressDialog progress;
private slots:
/** Members used for font location */

View file

@ -3,6 +3,8 @@
// (C) 2001--2004 Stefan Kebekus
// Distributed under the GPL
#include <config.h>
#include "fontprogress.h"
#include <kdebug.h>

View file

@ -41,10 +41,11 @@ public:
here is analyzed and presented to the user. */
void increaseNumSteps(const QString& explanation);
/** Used to initialize the progress bar. If the argument proc is
non-zero, the associated process will be killed when the "abort"
button is pressed. The FontProgress uses a QGuarderPtr
internally, so it is save to delete the KProcIO anytime. */
/** Used to initialize the progress bar. If the argument @c proc is
non-zero, the associated process will be killed when the "abort"
button is pressed. The pointer is stored internally inside a
QPointer, so it is safe to delete the real KProcIO instance
at any time. */
void setTotalSteps(int, KProcIO *proc=0);
QLabel* TextLabel2;

View file

@ -6,6 +6,8 @@
* written by Stefan Kebekus, originally based on code by Paul Vojta
* and a large number of co-authors */
#include <config.h>
#include <kdebug.h>
#include "glyph.h"

View file

@ -3,6 +3,8 @@
// (C) 2001-2003 Stefan Kebekus
// Distributed under the GPL
#include <config.h>
#include <kdebug.h>
#include <kio/global.h>
#include <klocale.h>

View file

@ -2,8 +2,8 @@
#ifndef KDVIMULTIPAGE_H
#define KDVIMULTIPAGE_H
#include "kmultipage.h"
#include "dviRenderer.h"
#include "kmultipage.h"
#include <QStringList>
@ -94,5 +94,4 @@ private:
KAction *exportPSAction;
};
#endif

View file

@ -24,6 +24,7 @@
// Please report bugs or improvements, etc. via the "Report bug"-Menu
// of kdvi.
#include <config.h>
#include <kaction.h>
#include <kdebug.h>

View file

@ -7,6 +7,8 @@
// Add header files alphabetically
#include <config.h>
#include <kdebug.h>
#include <kcombobox.h>

View file

@ -6,6 +6,7 @@
// (C) 2004 Stefan Kebekus
// Distributed under the GPL
#include <config.h>
#include <kdebug.h>
#include <klocale.h>

2
psgs.h
View file

@ -10,10 +10,10 @@
#ifndef _PSGS_H_
#define _PSGS_H_
#include <Q3IntDict>
#include <QColor>
#include <QObject>
#include <QString>
#include <Q3IntDict>
class PageNumber;
class QPainter;

View file

@ -18,6 +18,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <config.h>
#include "renderedDviPagePixmap.h"
#include "hyperlink.h"

View file

@ -6,6 +6,7 @@
// Copyright 2000--2004, Stefan Kebekus (kebekus@kde.org).
#include <config.h>
#include <kdebug.h>
#include <klocale.h>

View file

@ -49,6 +49,8 @@
* and Luis Miguel Silveira, MIT RLE.
*/
#include <config.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <klocale.h>

1
vf.cpp
View file

@ -23,6 +23,7 @@
* SUCH DAMAGE.
*/
#include <config.h>
#include <kdebug.h>
#include <klocale.h>

2
xdvi.h
View file

@ -2,7 +2,7 @@
#ifndef _xdvi_h
#define _xdvi_h
#include <stdio.h>
#include <cstdio>
/*
* Written by Eric C. Cooper, CMU