Chemical Data Processing Library C++ API - Version 1.2.0
QtObjectFactory.hpp
Go to the documentation of this file.
1 /*
2  * QtObjectFactory.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_VIS_QTOBJECTFACTORY_HPP
30 #define CDPL_VIS_QTOBJECTFACTORY_HPP
31 
32 #include "CDPL/Vis/APIPrefix.hpp"
33 
34 
35 class QFont;
36 class QBrush;
37 class QPen;
38 class QColor;
39 class QPainterPath;
40 
41 
42 namespace CDPL
43 {
44 
45  namespace Vis
46  {
47 
48  class Font;
49  class Color;
50  class Pen;
51  class Brush;
52  class Path2D;
53 
61  {
62 
63  public:
69  static QFont createQFont(const Font& font);
70 
76  static QColor createQColor(const Color& color);
77 
83  static QPen createQPen(const Pen& pen);
84 
90  static QBrush createQBrush(const Brush& brush);
91 
98  static QPainterPath& createQPainterPath(const Path2D& path, QPainterPath& qt_path);
99 
100  private:
101  QtObjectFactory() {}
102  };
103  } // namespace Vis
104 } // namespace CDPL
105 
106 #endif // CDPL_VIS_QTOBJECTFACTORY_HPP
Definition of the preprocessor macro CDPL_VIS_API.
#define CDPL_VIS_QT_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Specifies the fill pattern and fill color of shapes.
Definition: Brush.hpp:50
Specifies a color in terms of its red, green and blue components and an alpha-channel for transparenc...
Definition: Color.hpp:52
Specifies a font for drawing text.
Definition: Font.hpp:54
Provides a container for painting operations, enabling arbitrary graphical shapes to be constructed a...
Definition: Path2D.hpp:78
Specifies how to draw lines and outlines of shapes.
Definition: Pen.hpp:53
Provides methods for the creation of QFont, QColor, QPen and QBrush objects from Font,...
Definition: QtObjectFactory.hpp:61
static QColor createQColor(const Color &color)
Creates a QColor object that corresponds to the specified color.
static QFont createQFont(const Font &font)
Creates a QFont object that corresponds to the specified font.
static QPainterPath & createQPainterPath(const Path2D &path, QPainterPath &qt_path)
Creates a QPainterPath object that corresponds to the specified path.
static QBrush createQBrush(const Brush &brush)
Creates a QBrush object that corresponds to the specified brush.
static QPen createQPen(const Pen &pen)
Creates a QPen object that corresponds to the specified pen.
The namespace of the Chemical Data Processing Library.