Doxygen
dia.h 文件参考
+ 此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

枚举

enum  DiaOutputFormat { DIA_BITMAP, DIA_EPS }
 

函数

void writeDiaGraphFromFile (const QCString &inFile, const QCString &outDir, const QCString &outFile, DiaOutputFormat format, const QCString &srcFile, int srcLine)
 

枚举类型说明

◆ DiaOutputFormat

枚举值
DIA_BITMAP 
DIA_EPS 

在文件 dia.h23 行定义.

23 { DIA_BITMAP , DIA_EPS };

函数说明

◆ writeDiaGraphFromFile()

void writeDiaGraphFromFile ( const QCString inFile,
const QCString outDir,
const QCString outFile,
DiaOutputFormat  format,
const QCString srcFile,
int  srcLine 
)

在文件 dia.cpp26 行定义.

29 {
30  QCString absOutFile = outDir;
31  absOutFile+=Portable::pathSeparator();
32  absOutFile+=outFile;
33 
34  // chdir to the output dir, so dot can find the font file.
35  std::string oldDir = Dir::currentDirPath();
36  // go to the html output directory (i.e. path)
37  Dir::setCurrent(outDir.str());
38  //printf("Going to dir %s\n",Dir::currentDirPath().c_str());
39  QCString diaExe = Config_getString(DIA_PATH)+"dia"+Portable::commandExtension();
40  QCString diaArgs;
41  QCString extension;
42  diaArgs+="-n ";
43  if (format==DIA_BITMAP)
44  {
45  diaArgs+="-t png-libart";
46  extension=".png";
47  }
48  else if (format==DIA_EPS)
49  {
50  diaArgs+="-t eps";
51  extension=".eps";
52  }
53 
54  diaArgs+=" -e \"";
55  diaArgs+=outFile;
56  diaArgs+=extension+"\"";
57 
58  diaArgs+=" \"";
59  diaArgs+=inFile;
60  diaArgs+="\"";
61 
62  int exitCode;
63  //printf("*** running: %s %s outDir:%s %s\n",qPrint(diaExe),qPrint(diaArgs),outDir,outFile);
65  if ((exitCode=Portable::system(diaExe,diaArgs,FALSE))!=0)
66  {
67  err_full(srcFile,srcLine,"Problems running %s. Check your installation or look typos in you dia file %s\n",
68  qPrint(diaExe),qPrint(inFile));
70  goto error;
71  }
73  if ( (format==DIA_EPS) && (Config_getBool(USE_PDFLATEX)) )
74  {
75  QCString epstopdfArgs(maxCmdLine);
76  epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
77  qPrint(outFile),qPrint(outFile));
79  if (Portable::system("epstopdf",epstopdfArgs)!=0)
80  {
81  err("Problems running epstopdf. Check your TeX installation!\n");
82  }
84  }
85 
86 error:
87  Dir::setCurrent(oldDir);
88 }

引用了 Portable::commandExtension(), Config_getBool, Config_getString, Dir::currentDirPath(), DIA_BITMAP, DIA_EPS, err(), err_full(), FALSE, maxCmdLine, Portable::pathSeparator(), qPrint(), Dir::setCurrent(), QCString::sprintf(), QCString::str(), Portable::system(), Portable::sysTimerStart() , 以及 Portable::sysTimerStop().

被这些函数引用 DocbookDocVisitor::startDiaFile(), LatexDocVisitor::startDiaFile(), HtmlDocVisitor::writeDiaFile(), DocbookDocVisitor::writeDiaFile(), RTFDocVisitor::writeDiaFile() , 以及 LatexDocVisitor::writeDiaFile().

Dir::currentDirPath
static std::string currentDirPath()
Definition: dir.cpp:282
maxCmdLine
static const int maxCmdLine
Definition: dia.cpp:24
Portable::pathSeparator
QCString pathSeparator()
Definition: portable.cpp:347
DIA_EPS
@ DIA_EPS
Definition: dia.h:23
DIA_BITMAP
@ DIA_BITMAP
Definition: dia.h:23
QCString::str
std::string str() const
Definition: qcstring.h:442
err
void err(const char *fmt,...)
Definition: message.cpp:203
Portable::sysTimerStart
void sysTimerStart()
Definition: portable.cpp:470
Portable::system
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition: portable.cpp:42
Dir::setCurrent
static bool setCurrent(const std::string &path)
Definition: dir.cpp:290
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
Config_getString
#define Config_getString(name)
Definition: config.h:32
err_full
void err_full(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:212
Portable::sysTimerStop
void sysTimerStop()
Definition: portable.cpp:475
Portable::commandExtension
const char * commandExtension()
Definition: portable.cpp:434
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108