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

# panel.h Example File
graphicsview/padnavigator/panel.h

     /****************************************************************************
     **
     ** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved.
     **
     ** This file is part of the $MODULE$ of the Qt Toolkit.
     **
     ** $TROLLTECH_DUAL_LICENSE$
     **
     ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
     ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     **
     ****************************************************************************/

     #include <QtGui/qgraphicsview.h>

     class QTimeLine;
     class Ui_BackSide;

     class RoundRectItem;

     class Panel : public QGraphicsView
     {
         Q_OBJECT
     public:
         Panel(int width, int height);
         ~Panel();

     protected:
         void keyPressEvent(QKeyEvent *event);
         void resizeEvent(QResizeEvent *event);

     private Q_SLOTS:
         void updateSelectionStep(qreal val);
         void updateFlipStep(qreal val);
         void flip();

     private:
         QPointF posForLocation(int x, int y) const;

         QGraphicsScene *scene;
         RoundRectItem *selectionItem;
         RoundRectItem *baseItem;
         RoundRectItem *backItem;
         QGraphicsWidget *splash;
         QTimeLine *selectionTimeLine;
         QTimeLine *flipTimeLine;
         int selectedX, selectedY;

         QGraphicsItem ***grid;

         QPointF startPos;
         QPointF endPos;
         qreal xrot, yrot;
         qreal xrot2, yrot2;

         int width;
         int height;
         bool flipped;
         bool flipLeft;

         Ui_BackSide *ui;
     };