KDReportsPreviewDialog.h

00001 /****************************************************************************
00002 ** Copyright (C) 2007-2011 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Reports library.
00005 **
00006 ** Licensees holding valid commercial KD Reports licenses may use this file in
00007 ** accordance with the KD Reports Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef KDREPORTSPREVIEWDIALOG_H
00024 #define KDREPORTSPREVIEWDIALOG_H
00025 
00026 #include "KDReportsGlobal.h"
00027 #include <QtGui/QDialog>
00028 #include <QtGui/QPrinter>
00029 
00030 namespace KDReports {
00031 class Report;
00032 
00037 class KDREPORTS_EXPORT PreviewDialog : public QDialog
00038 {
00039     Q_OBJECT
00040 
00041 public:
00045     explicit PreviewDialog( KDReports::Report* report, QWidget *parent = 0 );
00046 
00047     ~PreviewDialog();
00048 
00052     bool isSelected( int pageNumber ) const;
00053 
00061     void setPageSizeChangeAllowed( bool b );
00062 
00068     void setShowTableSettingsDialog( bool b );
00069 
00074     void setWidthForEndlessPrinter( qreal widthMM );
00075 
00076     // maybe setZoomFactor() to set the initial value?
00077 
00085     virtual bool showTableSettingsDialog( KDReports::Report* report );
00086 
00087 Q_SIGNALS:
00089     void pageSizeChanged( QPrinter::PageSize pageSize );
00091     void orientationChanged( QPrinter::Orientation orientation );
00092 
00093 private Q_SLOTS:
00095     void accept();
00097     void reject();
00098 
00099 private:
00100     Q_PRIVATE_SLOT( d, void _kd_slotTableBreakingDialog() )
00101     class Private;
00102     friend class Private;
00103     Private* const d;
00104 };
00105 
00106 }
00107 
00108 #endif
 All Classes Namespaces Functions Enumerations Enumerator

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/