Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+143
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* Printing helper functions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-12-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtPrintSupport/QPrinter>
|
||||
|
||||
#ifndef LTSPRINTING_EXPORT
|
||||
# ifdef BUILD_STATIC_LIBRARIES
|
||||
# define LTSPRINTING_EXPORT
|
||||
# else
|
||||
# if defined(MAKE_LTSPRINTING_LIB)
|
||||
# define LTSPRINTING_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define LTSPRINTING_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
class QWidget;
|
||||
class QAbstractItemView;
|
||||
class QImage;
|
||||
namespace LtsSession
|
||||
{
|
||||
class LtsSession;
|
||||
}
|
||||
namespace KDReports
|
||||
{
|
||||
class Report;
|
||||
}
|
||||
namespace LtsPrinting
|
||||
{
|
||||
/**
|
||||
* print view as table or tree, depending on view type.
|
||||
* @param session Address of session to access exercise data
|
||||
* @param dialogParent Address of dialog parent window
|
||||
* @param view Address of the view to be printed
|
||||
* @param headingHtml HTML content html content that is inserted as a header in front of the widget content. It is not the header bar, but a header of the content
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printView(LtsSession::LtsSession *session,
|
||||
QWidget *dialogParent,
|
||||
const QAbstractItemView *view,
|
||||
const QString &headingHtml = QString());
|
||||
LTSPRINTING_EXPORT void printView(LtsSession::LtsSession *session,
|
||||
QWidget *dialogParent,
|
||||
QAbstractItemView *view,
|
||||
const QString &headingHtml = QString());
|
||||
LTSPRINTING_EXPORT void printStoryboard(LtsSession::LtsSession *session,
|
||||
QWidget *dialogParent,
|
||||
QAbstractItemView *view,
|
||||
const QString &headingHtml = QString());
|
||||
/**
|
||||
* Print Image.
|
||||
* @param session Address of session to access exercise data
|
||||
* @param dialogParent Address of dialog parent window
|
||||
* @param image Image of the map to be printed
|
||||
* @param imageTitle Title of image
|
||||
* @param imageDescription Image description
|
||||
* @param pageSize Page size
|
||||
* @param pageOrientation Page orientation
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printImage(LtsSession::LtsSession *session,
|
||||
QWidget *dialogParent,
|
||||
const QImage &image,
|
||||
const QString &imageTitle,
|
||||
const QString &description,
|
||||
const QPrinter::PageSize &pageSize = QPrinter::A3,
|
||||
const QPrinter::Orientation &pageOrientation = QPrinter::Landscape);
|
||||
|
||||
/**
|
||||
* Print list of images.
|
||||
* @param session Address of session to access exercise data
|
||||
* @param dialogParent Address of dialog parent window
|
||||
* @param docName Document name
|
||||
* @param images List of images to be printed
|
||||
* @param imageTitles List of images titles
|
||||
* @param descriptions List of images descriptions
|
||||
* @param pageSize Page size
|
||||
* @param pageOrientation Page orientation
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printImages(LtsSession::LtsSession *session,
|
||||
QWidget *dialogParent,
|
||||
const QString &docName,
|
||||
QVector < QImage> &images,
|
||||
QVector < QString> &imageTitles,
|
||||
QVector < QString> &descriptions,
|
||||
const QPrinter::PageSize &pageSize = QPrinter::A3,
|
||||
const QPrinter::Orientation &pageOrientation = QPrinter::Landscape);
|
||||
|
||||
/**
|
||||
* Print list of pdf pages as images.
|
||||
* @param dialogParent Address of dialog parent window
|
||||
* @param docName Document name
|
||||
* @param printPath Where to save output file
|
||||
* @param images List of images to be printed
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printPDFImages(QWidget *dialogParent,
|
||||
const QString &docName,
|
||||
const QString &printPath,
|
||||
QVector<QImage> &images);
|
||||
|
||||
/**
|
||||
* print Report.
|
||||
* @param session Address of session to access exercise data
|
||||
* @param dialogParent Address of dialog parent window
|
||||
* @param report Report to be printed
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printReport( LtsSession::LtsSession *session, QWidget *dialogParent, KDReports::Report& report );
|
||||
|
||||
/**
|
||||
* print Widget.
|
||||
* @param session Address of session to access exercise data
|
||||
* @param dialogParent Address of dialog parent window
|
||||
* @param widget Widget to be printed
|
||||
* @param title Image title
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printWidget(LtsSession::LtsSession *session, QWidget *dialogParent, QWidget *widget, const QString &title);
|
||||
|
||||
/**
|
||||
* print printMessage.
|
||||
* @param session Address of session to access exercise data
|
||||
* @param subject subject of message
|
||||
* @param from sender
|
||||
* @param to receiver
|
||||
* @param msgText text of the message
|
||||
* @param time time of the message
|
||||
*/
|
||||
LTSPRINTING_EXPORT void printMessage(LtsSession::LtsSession *session,
|
||||
QWidget *dialogParent,
|
||||
const QString &subject, const QString &subjectContent,
|
||||
const QString &from, const QString &fromContent,
|
||||
const QString &to, const QString &toContent,
|
||||
const QString &msgTextContent,
|
||||
const QString &time, const QString &timeContent);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user