-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.h
88 lines (72 loc) · 1.76 KB
/
MainWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// ======================================================================
// Computer Graphics Homework Solutions
// Copyright (C) 2017 by George Wolberg
//
// MainWindow.h - Header file for MainWindow class
//
// Written by: George Wolberg, 2017
// ======================================================================
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
// ----------------------------------------------------------------------
// standard include files
//
#include <QtWidgets>
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdarg>
#include <cassert>
#include <vector>
#include <map>
#include <algorithm>
#include "HW.h"
enum {DUMMY, HW0A, HW0B, HW0C, HW1A, HW1B, HW2A, HW2B, HW3A, HW3B, HW4A, HW4B};
typedef std::map<QString, HW*> hw_type;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
// constructor
MainWindow (QWidget *parent = 0);
public slots:
void createWidgets ();
void changeHW (QAction*);
void reset ();
void quit ();
protected:
QFrame* createGroupView ();
void createActions ();
void createMenus ();
QHBoxLayout* createExitButtons ();
private:
// homework objects
QStringList m_hwName;
hw_type m_hw;
// widgets
QStackedWidget *m_stackWidgetPanels;
QStackedWidget *m_stackWidgetViews;
// menus
QMenu *m_menuHW0;
QMenu *m_menuHW1;
QMenu *m_menuHW2;
QMenu *m_menuHW3;
QMenu *m_menuHW4;
// actions
QAction *m_actionHW0a;
QAction *m_actionHW0b;
QAction *m_actionHW0c;
QAction *m_actionHW1a;
QAction *m_actionHW1b;
QAction *m_actionHW2a;
QAction *m_actionHW2b;
QAction *m_actionHW3a;
QAction *m_actionHW3b;
QAction *m_actionHW4a;
QAction *m_actionHW4b;
};
extern MainWindow *MainWindowP;
#endif // MAINWINDOW_H