|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# printpreview.h Example File
demos/textedit/printpreview.h

    /****************************************************************************
    **
    ** Copyright (C) 2004-2006 Trolltech ASA. All rights reserved.
    **
    ** This file is part of the demonstration applications of the Qt Toolkit.
    **
    ** Licensees holding valid Qt Preview licenses may use this file in
    ** accordance with the Qt Preview License Agreement provided with the
    ** Software.
    **
    ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
    ** information about Qt Commercial License Agreements.
    **
    ** Contact info@trolltech.com if any conditions of this licensing are
    ** not clear to you.
    **
    ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    **
    ****************************************************************************/

    #ifndef PRINTPREVIEW_H
    #define PRINTPREVIEW_H

    #include <QMainWindow>
    #include <QPrinter>

    class PreviewView;
    class QTextDocument;

    class PrintPreview : public QMainWindow
    {
        Q_OBJECT
    public:
        PrintPreview(const QTextDocument *document, QWidget *parent);
        virtual ~PrintPreview();

    private slots:
        void print();
        void pageSetup();

    private:
        void setup();

        QTextDocument *doc;
        PreviewView *view;
        QPrinter printer;
    };

    #endif // PRINTPREVIEW_H