Subversion Repositories Scribus

Rev

Rev 3083 | Rev 3158 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2530 craig 1
#ifndef _UTIL_H
2
#define _UTIL_H
3
 
4
#include <qstring.h>
5
#include <qpixmap.h>
6
#include <qimage.h>
7
#include <qstringlist.h>
8
#include <qwidget.h>
9
#include <qmap.h>
10
#include <qpointarray.h>
11
#include <qvaluelist.h>
12
#include <qpoint.h>
13
#include <qdom.h>
14
 
2969 craig 15
#include "scribusapi.h"
3133 fschmid 16
#include "pdflib.h"
2530 craig 17
 
18
class ScribusDoc;
19
class QDomElement;
20
class ScribusView;
21
struct CopyPasteBuffer;
22
class PageItem;
23
class FPointArray;
24
struct Layer;
25
class Foi;
26
 
2969 craig 27
QColor SCRIBUS_API SetColor(ScribusDoc *currentDoc, QString color, int shad);
28
void SCRIBUS_API GetItemProps(bool newVersion, QDomElement *obj, struct CopyPasteBuffer *OB);
29
QStringList SCRIBUS_API sortQStringList(QStringList aList);
30
void SCRIBUS_API ReOrderText(ScribusDoc *currentDoc, ScribusView *view);
31
void SCRIBUS_API WordAndPara(PageItem *currItem, int *w, int *p, int *c, int *wN, int *pN, int *cN);
32
bool SCRIBUS_API overwrite(QWidget *parent, QString filename);
33
FPoint SCRIBUS_API getMaxClipF(FPointArray* Clip);
34
FPoint SCRIBUS_API getMinClipF(FPointArray* Clip);
35
QString SCRIBUS_API Path2Relative(QString Path);
36
QPixmap SCRIBUS_API LoadPDF(QString fn, int Page, int Size, int *w, int *h);
37
QByteArray SCRIBUS_API ComputeMD5Sum(QByteArray *in);
38
char SCRIBUS_API *toHex( uchar u );
39
QString SCRIBUS_API String2Hex(QString *in, bool lang = true);
40
QString SCRIBUS_API CompressStr(QString *in);
41
void SCRIBUS_API Level2Layer(ScribusDoc *currentDoc, struct Layer *ll, int Level);
2937 cbradney 42
//int Layer2Level(ScribusDoc *currentDoc, int LayerNr);
2969 craig 43
void SCRIBUS_API BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4);
44
double SCRIBUS_API xy2Deg(double x, double y);
45
QPointArray SCRIBUS_API FlattenPath(FPointArray ina, QValueList<uint> &Segs);
46
QPointArray SCRIBUS_API RegularPolygon(double w, double h, uint c, bool star, double factor, double rota);
47
FPointArray SCRIBUS_API RegularPolygonF(double w, double h, uint c, bool star, double factor, double rota);
48
QPixmap SCRIBUS_API *getSmallPixmap(QColor rgb);
49
QPixmap SCRIBUS_API *getWidePixmap(QColor rgb);
3046 fschmid 50
void SCRIBUS_API paintAlert(QPixmap &toPaint, QPixmap &target, int x = 0, int y = 0);
2969 craig 51
QPixmap SCRIBUS_API loadIcon(QString nam);
52
uint SCRIBUS_API getDouble(QString in, bool raw);
53
bool SCRIBUS_API loadText(QString nam, QString *Buffer);
54
double SCRIBUS_API QStodouble(QString in);
55
int SCRIBUS_API QStoInt(QString in);
56
QString SCRIBUS_API GetAttr(QDomElement *el, QString at, QString def="0");
57
QImage SCRIBUS_API ProofImage(QImage *Im);
58
int SCRIBUS_API System(const QStringList & args);
59
int SCRIBUS_API callGS(const QStringList& args_in, const QString device="");
60
int SCRIBUS_API callGS(const QString& args_in, const QString device="");
3083 fschmid 61
int SCRIBUS_API convertPS2PS(QString in, QString out, const QString& opts, int level);
2840 craig 62
// Return gs version. If gs couldn't be found or there was a problem parsing output, return false
63
// (in which case minor and major have undefined values).
2969 craig 64
QString SCRIBUS_API getGSVersion();
65
bool SCRIBUS_API getNumericGSVersion(int & major, int & minor);
66
QString SCRIBUS_API getGSDefaultExeName(void);
67
int SCRIBUS_API copyFile(QString source, QString target);
68
int SCRIBUS_API moveFile(QString source, QString target);
69
QString SCRIBUS_API checkFileExtension(const QString &, const QString &);
2885 fschmid 70
// On Windows, return short path name, else return longPath;
2969 craig 71
QString SCRIBUS_API getShortPathName(QString longPath);
2907 subik 72
// Create a common name for page exports (SVG, bitmap, EPS)
2969 craig 73
QString SCRIBUS_API getFileNameByPage(uint pageNo, QString extension);
2530 craig 74
 
75
#endif