]> Shamusworld >> Repos - guemap/blob - src/mainwin.h
f2b05df0f07ada3bb92bb05bf4b0a58ef255d2ea
[guemap] / src / mainwin.h
1 //
2 // GUEmap
3 // Copyright 1997-2007 by Christopher J. Madsen
4 // (C) 2019 James Hammons
5 //
6 // GUEmap is licensed under either version 2 of the GPL, or (at your option)
7 // any later version.  See LICENSE file for details.
8 //
9 // MainFrm.h: interface of the MainFrame class
10 //
11
12 #ifndef __MAINWIN_H__
13 #define __MAINWIN_H__
14
15 #include <QtWidgets>
16
17 class AboutWindow;
18 class MapView;
19 class RoomWidget;
20
21 //wants to be an MDI window... (And now is!!!)
22 class MainWin: public QMainWindow
23 {
24         // All Qt apps require this macro
25         Q_OBJECT
26
27         public:
28                 MainWin();
29
30         protected:
31                 void closeEvent(QCloseEvent * event);
32
33         protected slots:
34                 void FileNew(void);
35                 void FileOpen(void);
36                 void FileSaveBase(MapView *, QString);
37                 void FileSave(void);
38                 void FileSaveAs(void);
39                 void FileClose(void);
40                 void EditUndo(void);
41                 void MenuFixUndo(void);
42                 void EditDelete(void);
43                 void EditSelectAll(void);
44                 void HelpAbout(void);
45
46         private:
47                 void CreateActions(void);
48                 void CreateMenus(void);
49                 void CreateToolbars(void);
50                 void ReadSettings(void);
51                 void WriteSettings(void);
52
53         public:
54 //              CDialogBar wndNavBar;
55                 QMdiArea mdiArea;
56                 QSettings settings;
57                 AboutWindow * aboutWin;
58                 RoomWidget * rw;
59
60         private:
61                 QAction * fileNewAct;
62                 QAction * fileOpenAct;
63                 QAction * fileSaveAct;
64                 QAction * fileSaveAsAct;
65                 QAction * fileCloseAct;
66                 QAction * exitAct;
67                 QAction * undoAct;
68                 QAction * deleteAct;
69                 QAction * selectAllAct;
70                 QAction * aboutAct;
71 //              QAction * Act;
72 #if 0
73         public:
74 //              void setStatusBar(LPCTSTR text) {m_wndStatusBar.SetWindowText(text);};
75
76         // Overrides
77         // ClassWizard generated virtual function overrides
78         //{{AFX_VIRTUAL(CMainFrame)
79 //              virtual BOOL PreCreateWindow(CREATESTRUCT & cs);
80         //}}AFX_VIRTUAL
81
82         // Implementation
83 //      public:
84 //              ~MainFrame();
85
86 //              void DockControlBarLeftOf(CControlBar * Bar,CControlBar * LeftOf);
87
88         protected:  // control bar embedded members
89 //              CStatusBar  m_wndStatusBar;
90 //              CToolBar    m_wndToolBar;
91
92         // Generated message map functions
93         protected:
94 //              int OnCreate(LPCREATESTRUCT lpCreateStruct);
95 //              void OnActivateApp(BOOL bActive, HTASK hTask);
96 //              void OnDestroy();
97
98 //      DECLARE_MESSAGE_MAP();
99 #endif
100 };
101
102 #endif  // __MAINWIN_H__
103