MEPP2 Project
MdiArea.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation; either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
13 // DOC -> https://doc.qt.io/archives/qt-4.8/dnd.html
14 
15 #include <QMdiArea>
16 
17 #include <QDragEnterEvent>
18 
19 namespace FEVV {
20 
21 class SimpleWindow;
22 
23 enum { bNone, bLeft, bRight };
24 
29 class MdiArea : public QMdiArea
30 {
31  //Q_OBJECT
32 
33  public:
39  MdiArea(QWidget *parent);
46  void setMainWindow(SimpleWindow* mw) { m_mw = mw; }
47 
48  protected:
55  void dragEnterEvent(QDragEnterEvent *event);
62  void dropEvent(QDropEvent *event);
63 
64  private:
66  int bType;
67 };
68 
69 } // namespace FEVV
70 
71 #ifndef Q_MOC_RUN
73 #endif // Q_MOC_RUN
FEVV::MdiArea::bType
int bType
mouse bouton type (bNone, bLeft, bRight)
Definition: MdiArea.h:66
FEVV::bRight
@ bRight
Definition: MdiArea.h:23
MdiArea.inl
FEVV::MdiArea::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
Accept a drop mesh file in this zone.
Definition: MdiArea.inl:25
FEVV::bLeft
@ bLeft
Definition: MdiArea.h:23
FEVV::SimpleWindow
SimpleWindow is a specialization of QMainWindow. This class the Main Window.
Definition: SimpleWindow.h:80
FEVV::MdiArea
MdiArea class.
Definition: MdiArea.h:30
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::bNone
@ bNone
Definition: MdiArea.h:23
FEVV::MdiArea::dropEvent
void dropEvent(QDropEvent *event)
Load drop mesh file.
Definition: MdiArea.inl:59
FEVV::MdiArea::MdiArea
MdiArea(QWidget *parent)
Constructor.
Definition: MdiArea.inl:19
FEVV::MdiArea::m_mw
SimpleWindow * m_mw
mainwindow
Definition: MdiArea.h:65
FEVV::MdiArea::setMainWindow
void setMainWindow(SimpleWindow *mw)
Set mainwindow pointer to mdiarea.
Definition: MdiArea.h:46