SciDAVis  1.D4
PartMdiView.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : PartMdiView.h
3  Project : SciDAVis
4  Description : MDI sub window to be wrapped around views of
5  AbstractPart.
6  --------------------------------------------------------------------
7  Copyright : (C) 2007-2009 Tilman Benkert (thzs*gmx.net)
8  Copyright : (C) 2007-2009 Knut Franke (knut.franke*gmx.de)
9  (replace * with @ in the email addresses)
10 
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  * This program is distributed in the hope that it will be useful, *
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
23  * GNU General Public License for more details. *
24  * *
25  * You should have received a copy of the GNU General Public License *
26  * along with this program; if not, write to the Free Software *
27  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
28  * Boston, MA 02110-1301 USA *
29  * *
30  ***************************************************************************/
31 #ifndef ASPECT_VIEW_H
32 #define ASPECT_VIEW_H
33 
34 #include <QMdiSubWindow>
35 #include "lib/macros.h"
36 
37 class AbstractAspect;
38 class AbstractPart;
39 
41 
49 class PartMdiView : public QMdiSubWindow
50 {
51  Q_OBJECT
52 
53  public:
55  PartMdiView(AbstractPart * part, QWidget * embedded_view);
56  virtual ~PartMdiView();
57 
59  AbstractPart *part() const { return d_part; }
60 
62  {
66  };
67 
68  SubWindowStatus status() const { return d_status; }
69 
70  signals:
72 
73  private slots:
76  void handleAspectAboutToBeRemoved(const AbstractAspect *aspect);
77 
78  protected:
80  virtual void closeEvent(QCloseEvent *event);
81  virtual void hideEvent(QHideEvent *event);
82  virtual void showEvent(QShowEvent *event);
84 
89  virtual void contextMenuEvent(QContextMenuEvent *event);
90 
91  private:
95 
102  bool d_closing;
104 };
105 
106 #endif // ifndef ASPECT_VIEW_H