KD Reports 1.4
|
00001 /**************************************************************************** 00002 ** Copyright (C) 2007-2012 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 class PreviewWidget; 00033 00038 class KDREPORTS_EXPORT PreviewDialog : public QDialog 00039 { 00040 Q_OBJECT 00041 00042 public: 00046 explicit PreviewDialog( KDReports::Report* report, QWidget *parent = 0 ); 00047 00048 ~PreviewDialog(); 00049 00053 bool isSelected( int pageNumber ) const; 00054 00062 void setPageSizeChangeAllowed( bool b ); 00063 00069 void setShowTableSettingsDialog( bool b ); 00070 00075 void setWidthForEndlessPrinter( qreal widthMM ); 00076 00077 // maybe setZoomFactor() to set the initial value? 00078 00086 virtual bool showTableSettingsDialog( KDReports::Report* report ); 00087 00093 KDReports::PreviewWidget* previewWidget(); 00094 00095 Q_SIGNALS: 00097 void pageSizeChanged( QPrinter::PageSize pageSize ); 00099 void orientationChanged( QPrinter::Orientation orientation ); 00100 00101 private Q_SLOTS: 00103 void accept(); 00105 void reject(); 00106 00107 private: 00108 Q_PRIVATE_SLOT( d, void _kd_slotTableBreakingDialog() ) 00109 class Private; 00110 friend class Private; 00111 Private* const d; 00112 }; 00113 00114 } 00115 00116 #endif