Chemical Data Processing Library C++ API - Version 1.0.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 
40 
41 namespace CDPL
42 {
43 
44  namespace Vis
45  {
46 
47  class Font;
48  class Color;
49  class Pen;
50  class Brush;
51 
59  {
60 
61  public:
67  static QFont createQFont(const Font& font);
68 
74  static QColor createQColor(const Color& color);
75 
81  static QPen createQPen(const Pen& pen);
82 
88  static QBrush createQBrush(const Brush& brush);
89 
90  private:
91  QtObjectFactory() {}
92  };
93  } // namespace Vis
94 } // namespace CDPL
95 
96 #endif // CDPL_VIS_QTOBJECTFACTORY_HPP
CDPL::Vis::QtObjectFactory::createQBrush
static QBrush createQBrush(const Brush &brush)
Creates a QBrush object that corresponds to the specified brush.
CDPL::Vis::Pen
Specifies how to draw lines and outlines of shapes.
Definition: Pen.hpp:53
CDPL::Vis::QtObjectFactory::createQPen
static QPen createQPen(const Pen &pen)
Creates a QPen object that corresponds to the specified pen.
CDPL::Vis::Font
Specifies a font for drawing text.
Definition: Font.hpp:54
CDPL::Vis::QtObjectFactory::createQFont
static QFont createQFont(const Font &font)
Creates a QFont object that corresponds to the specified font.
CDPL::Vis::QtObjectFactory::createQColor
static QColor createQColor(const Color &color)
Creates a QColor object that corresponds to the specified color.
CDPL::Vis::QtObjectFactory
Provides methods for the creation of QFont, QColor, QPen and QBrush objects from Font,...
Definition: QtObjectFactory.hpp:59
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Vis::Brush
Specifies the fill pattern and fill color of shapes.
Definition: Brush.hpp:50
CDPL_VIS_QT_API
#define CDPL_VIS_QT_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_VIS_API.
CDPL::Vis::Color
Specifies a color in terms of its red, green and blue components and an alpha-channel for transparenc...
Definition: Color.hpp:52