1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8                           scribuswin.h  -  description
9                              -------------------
10     begin                : Mit Nov 6 2002
11     copyright            : (C) 2002 by Franz Schmid
12     email                : Franz.Schmid@altmuehlnet.de
13  ***************************************************************************/
14 
15 /***************************************************************************
16  *                                                                         *
17  *   This program is free software; you can redistribute it and/or modify  *
18  *   it under the terms of the GNU General Public License as published by  *
19  *   the Free Software Foundation; either version 2 of the License, or     *
20  *   (at your option) any later version.                                   *
21  *                                                                         *
22  ***************************************************************************/
23 
24 #ifndef SCRIBUSWIN_H
25 #define SCRIBUSWIN_H
26 
27 #include <QCloseEvent>
28 #include <QMainWindow>
29 #include <QMdiSubWindow>
30 
31 class ScribusDoc;
32 class ScribusMainWindow;
33 class ScribusView;
34 
35 #include "scribusapi.h"
36 /**
37   *@author Franz Schmid
38   */
39 
40 class SCRIBUS_API ScribusWin : public QMainWindow
41 {
42 	Q_OBJECT
43 
44 public:
45 	ScribusWin(QWidget* parent, ScribusDoc* doc);
~ScribusWin()46 	~ScribusWin() {};
47 
48 	void setView(ScribusView* newView);
49 	void setMainWindow(ScribusMainWindow *);
view()50 	ScribusView* view() const { return m_View;}
doc()51 	ScribusDoc* doc() const { return m_Doc;}
getSubWin()52 	QMdiSubWindow* getSubWin() { return m_subWindow; }
setSubWin(QMdiSubWindow * win)53 	void setSubWin(QMdiSubWindow *win) { m_subWindow = win; }
54 
55 protected:
56 	QMdiSubWindow *m_subWindow {nullptr};
57 	ScribusDoc *m_Doc {nullptr};
58 	ScribusMainWindow *m_ScMW {nullptr};
59 	ScribusView *m_View {nullptr};
60 	int m_winIndex {0};
61 
62 	void closeEvent(QCloseEvent *ce) override;
63 };
64 
65 #endif
66