00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDREPORTSPREVIEWWIDGET_H
00024 #define KDREPORTSPREVIEWWIDGET_H
00025
00026 #include "KDReportsGlobal.h"
00027 #include <QtGui/QWidget>
00028 #include <QtGui/QPrinter>
00029
00030 namespace KDReports {
00031 class Report;
00032
00039 class KDREPORTS_EXPORT PreviewWidget : public QWidget
00040 {
00041 Q_OBJECT
00042
00043 public:
00047 explicit PreviewWidget( QWidget *parent = 0 );
00048
00049 ~PreviewWidget();
00050
00054 void setReport( KDReports::Report* report );
00055
00059 bool isSelected( int pageNumber ) const;
00060
00068 void setPageSizeChangeAllowed( bool b );
00069
00075 void setShowTableSettingsDialog( bool b );
00076
00081 void setWidthForEndlessPrinter( qreal widthMM );
00082
00083
00084
00088 KDReports::Report* report() const;
00089
00094 bool printWithDialog();
00095
00099 void setShowPageListWidget( bool show );
00100
00104 void repaint();
00105
00109 QSize sizeHint() const;
00110
00111 Q_SIGNALS:
00113 void pageSizeChanged( QPrinter::PageSize pageSize );
00115 void orientationChanged( QPrinter::Orientation orientation );
00117 void tableSettingsClicked();
00118
00119 protected:
00121 void resizeEvent(QResizeEvent *);
00123 bool eventFilter(QObject*, QEvent*);
00124
00125 private:
00126 Q_PRIVATE_SLOT( d, void _kd_slotCurrentPageChanged() )
00127 Q_PRIVATE_SLOT( d, void _kd_slotFirstPage() )
00128 Q_PRIVATE_SLOT( d, void _kd_slotPrevPage() )
00129 Q_PRIVATE_SLOT( d, void _kd_slotNextPage() )
00130 Q_PRIVATE_SLOT( d, void _kd_slotLastPage() )
00131 Q_PRIVATE_SLOT( d, void _kd_slotPaperSizeActivated( int ) )
00132 Q_PRIVATE_SLOT( d, void _kd_slotPaperOrientationActivated( int ) )
00133 Q_PRIVATE_SLOT( d, void _kd_slotZoomIn() )
00134 Q_PRIVATE_SLOT( d, void _kd_slotZoomOut() )
00135 Q_PRIVATE_SLOT( d, void _kd_slotZoomChanged() )
00136 Q_PRIVATE_SLOT( d, void _kd_previewNextItems() )
00137
00138 class Private;
00139 friend class Private;
00140 Private* const d;
00141 };
00142
00143 }
00144
00145 #endif