File indexing completed on 2024-05-05 04:05:12

0001 /* This file is part of KsirK.
0002    Copyright (C) 2008 Gael de Chalendar <kleag@free.fr>
0003 
0004    KsirK is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU General Public
0006    License as published by the Free Software Foundation, either version 2
0007    of the License, or (at your option) any later version.
0008 
0009    This program is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    General Public License for more details.
0013 
0014    You should have received a copy of the GNU General Public License
0015    along with this program; if not, write to the Free Software
0016    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
0017    02110-1301, USA
0018 */
0019 
0020 #ifndef KSIRKSKINEDITORSCENE_H
0021 #define KSIRKSKINEDITORSCENE_H
0022 
0023 #include <QGraphicsScene>
0024 
0025 class QGraphicsSceneMouseEvent;
0026 
0027 namespace KsirkSkinEditor
0028 {
0029 
0030 /**
0031   * This is the main window.
0032   *
0033   * @author Gael de Chalendar (aka Kleag)
0034   * @version $Id: $
0035   */
0036 class Scene : public QGraphicsScene
0037 {
0038   Q_OBJECT
0039 
0040 public:
0041   /**
0042     * 
0043     */
0044   explicit Scene(QObject* parent=nullptr);
0045   Scene (qreal x, qreal y, qreal width, qreal height, QObject* parent=nullptr);
0046   /**
0047     *
0048     */
0049   ~Scene() override;
0050     
0051 protected:
0052   void mouseMoveEvent ( QGraphicsSceneMouseEvent * mouseEvent ) override;
0053   void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ) override;
0054   void mouseReleaseEvent ( QGraphicsSceneMouseEvent * mouseEvent ) override;
0055   void dropEvent ( QGraphicsSceneDragDropEvent * event ) override;
0056   
0057 Q_SIGNALS:
0058   void position(const QPointF&);
0059   void pressPosition(const QPointF&);
0060   void releasePosition(const QPointF&);
0061   
0062 public Q_SLOTS:
0063 
0064 private Q_SLOTS:
0065 
0066 private:
0067 };
0068 
0069 } // closing namespace KsirkSkinEditor
0070 
0071 #endif 
0072