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

# view.h Example File
demos/chip/view.h

    /****************************************************************************
    **
    ** Copyright (C) 2005-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 VIEW_H
    #define VIEW_H

    #include <QFrame>

    class QGraphicsView;
    class QLabel;
    class QSlider;
    class QToolButton;

    class View : public QFrame
    {
        Q_OBJECT
    public:
        View(const QString &name, QWidget *parent = 0);

        QGraphicsView *view() const;

    private slots:
        void resetView();
        void setResetButtonEnabled();
        void setupMatrix();
        void toggleOpenGL();
        void toggleAntialiasing();
        void print();

        void zoomIn();
        void zoomOut();
        void rotateLeft();
        void rotateRight();

    private:
        QGraphicsView *graphicsView;
        QLabel *label;
        QToolButton *openGlButton;
        QToolButton *antialiasButton;
        QToolButton *printButton;
        QToolButton *resetButton;
        QSlider *zoomSlider;
        QSlider *rotateSlider;
    };

    #endif