• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
imageexporter.h
Go to the documentation of this file.
1 /***************************************************************************
2  imageexporter.h - K Desktop Planetarium
3  -------------------
4  begin : Sun 13 Jan 2013 00:44:47 CST
5  copyright : (c) 2013 by Akarsh Simha
6  email : akarsh.simha@kdemail.net
7 ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 
19 #ifndef IMAGEEXPORTER_H
20 #define IMAGEEXPORTER_H
21 
22 #include "../printing/legend.h"
23 
24 #include <QObject>
25 
26 class KStars;
27 class QSize;
28 
35 class ImageExporter : public QObject {
36 
37  Q_OBJECT;
38 
39 public:
40 
44  ImageExporter( QObject *parent );
45 
49  ~ImageExporter();
50 
54  inline QString getLastErrorMessage() const { return m_lastErrorMessage; }
55 
56 public Q_SLOTS:
63  bool exportImage(QString url);
64 
73  void setLegendProperties( Legend::LEGEND_TYPE type, Legend::LEGEND_ORIENTATION orientation, Legend::LEGEND_POSITION position, int alpha = 160, bool include = true );
74 
79  inline void includeLegend( bool include ) { m_includeLegend = include; }
80 
85  void setLegendAlpha( int alpha );
86 
92  void setRasterOutputSize( const QSize *size );
93 
97  inline Legend* getLegend() { return m_Legend; }
98 
99 private:
100  void exportSvg(const QString &fileName);
101  bool exportRasterGraphics(const QString &fileName);
102  void addLegend(SkyQPainter *painter);
103  void addLegend(QPaintDevice *pd);
104 
105  KStars *m_KStars;
106  bool m_includeLegend;
107  Legend *m_Legend;
108  QSize *m_Size;
109  QString m_lastErrorMessage;
110 };
111 
112 #endif
ImageExporter::setLegendAlpha
void setLegendAlpha(int alpha)
Set legend transparency.
Definition: imageexporter.cpp:275
ImageExporter::exportImage
bool exportImage(QString url)
Exports an image with the defined settings.
Definition: imageexporter.cpp:182
ImageExporter::setLegendProperties
void setLegendProperties(Legend::LEGEND_TYPE type, Legend::LEGEND_ORIENTATION orientation, Legend::LEGEND_POSITION position, int alpha=160, bool include=true)
Set the legend properties.
Definition: imageexporter.cpp:246
ImageExporter::ImageExporter
ImageExporter(QObject *parent)
Constructor.
Definition: imageexporter.cpp:32
ImageExporter
Backends for exporting a sky image, either raster or vector, with a legend.
Definition: imageexporter.h:35
QObject
KStars
This is the main window for KStars.
Definition: kstars.h:94
SkyQPainter
The QPainter-based painting backend.
Definition: skyqpainter.h:32
Legend::LEGEND_POSITION
LEGEND_POSITION
Legend position enumeration.
Definition: legend.h:73
ImageExporter::getLegend
Legend * getLegend()
Definition: imageexporter.h:97
Legend::LEGEND_TYPE
LEGEND_TYPE
Legend type enumeration.
Definition: legend.h:52
ImageExporter::includeLegend
void includeLegend(bool include)
Include legend?
Definition: imageexporter.h:79
Legend::LEGEND_ORIENTATION
LEGEND_ORIENTATION
Legend orientation enumeration.
Definition: legend.h:64
Legend
Legend class is used for painting legends on class inheriting QPaintDevice.
Definition: legend.h:45
ImageExporter::getLastErrorMessage
QString getLastErrorMessage() const
Definition: imageexporter.h:54
ImageExporter::~ImageExporter
~ImageExporter()
Destructor.
Definition: imageexporter.cpp:262
ImageExporter::setRasterOutputSize
void setRasterOutputSize(const QSize *size)
Set the size of output raster images.
Definition: imageexporter.cpp:267
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal