Doxygen
formula.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  */
17 
18 #ifndef FORMULA_H
19 #define FORMULA_H
20 
21 #include <memory>
22 #include <string>
23 
24 #include "qcstring.h"
25 
26 /*! Manager class to handle formulas */
28 {
29  public:
30  struct DisplaySize
31  {
32  DisplaySize(int w,int h) : width(w), height(h) {}
33  int width;
34  int height;
35  };
36  enum class Format { Bitmap, Vector };
37  enum class HighDPI { On, Off };
38  static FormulaManager &instance();
39  void readFormulas(const QCString &dir,bool doCompare=false);
40  void clear();
41  int addFormula(const std::string &formulaText);
42  void generateImages(const QCString &outputDir,Format format,HighDPI hd = HighDPI::Off) const;
43  std::string findFormula(int formulaId) const;
44  bool hasFormulas() const;
45  DisplaySize displaySize(int formulaId) const;
46  private:
48  struct Private;
49  std::unique_ptr<Private> p;
50 };
51 
52 #endif
FormulaManager::HighDPI
HighDPI
Definition: formula.h:52
FormulaManager::readFormulas
void readFormulas(const QCString &dir, bool doCompare=false)
Definition: formula.cpp:71
FormulaManager::FormulaManager
FormulaManager()
Definition: formula.cpp:61
FormulaManager::p
std::unique_ptr< Private > p
Definition: formula.h:63
FormulaManager::Format
Format
Definition: formula.h:51
FormulaManager::Format::Vector
@ Vector
FormulaManager::instance
static FormulaManager & instance()
Definition: formula.cpp:65
qcstring.h
FormulaManager::clear
void clear()
Definition: formula.cpp:461
FormulaManager::DisplaySize::DisplaySize
DisplaySize(int w, int h)
Definition: formula.h:62
FormulaManager::HighDPI::On
@ On
FormulaManager::DisplaySize::height
int height
Definition: formula.h:64
FormulaManager::displaySize
DisplaySize displaySize(int formulaId) const
Definition: formula.cpp:495
FormulaManager::Format::Bitmap
@ Bitmap
FormulaManager::DisplaySize
Definition: formula.h:45
FormulaManager::Private
Definition: formula.cpp:41
FormulaManager
Definition: formula.h:27
FormulaManager::DisplaySize::width
int width
Definition: formula.h:63
FormulaManager::hasFormulas
bool hasFormulas() const
Definition: formula.cpp:490
FormulaManager::addFormula
int addFormula(const std::string &formulaText)
Definition: formula.cpp:467
FormulaManager::findFormula
std::string findFormula(int formulaId) const
Definition: formula.cpp:481
FormulaManager::generateImages
void generateImages(const QCString &outputDir, Format format, HighDPI hd=HighDPI::Off) const
Definition: formula.cpp:130
FormulaManager::HighDPI::Off
@ Off
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108