annotate src/gui/window.cpp @ 46:d0adc4aedfc8

*: update... this commit: 1. consolidates dark theme stuff to dark_theme.cpp 2. creates a new widgets folder to store all of our custom widgets 3. creates the list settings page in the information dialog, although much of it is nonfunctional: it doesn't save, and the status doesn't even get filled in... we'll fix this later!
author Paper <mrpapersonic@gmail.com>
date Sat, 23 Sep 2023 01:02:15 -0400
parents 619cbd6e69f9
children e613772f41d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
1 #include "gui/window.h"
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
2 #include "core/config.h"
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
3 #include "core/session.h"
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 44
diff changeset
4 #include "gui/dark_theme.h"
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
5 #include "gui/dialog/settings.h"
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
6 #include "gui/pages/anime_list.h"
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
7 #include "gui/pages/now_playing.h"
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
8 #include "gui/pages/statistics.h"
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 44
diff changeset
9 #include "gui/widgets/sidebar.h"
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
10 #include "services/services.h"
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
11 #include <QApplication>
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
12 #include <QFile>
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
13 #include <QMainWindow>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
14 #include <QMenuBar>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
15 #include <QPlainTextEdit>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
16 #include <QStackedWidget>
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
17 #include <QTextStream>
5
51ae25154b70 Fix OS X support code
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
18 #if MACOSX
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
19 # include "sys/osx/dark_theme.h"
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 44
diff changeset
20 #elif defined(WIN32)
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
21 # include "sys/win32/dark_theme.h"
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
22 #endif
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
23
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
24 enum class Pages {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
25 NOW_PLAYING,
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
26
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
27 ANIME_LIST,
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
28 HISTORY,
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
29 STATISTICS,
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
30
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
31 SEARCH,
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
32 SEASONS,
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
33 TORRENTS
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
34 };
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
35
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
36 MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) {
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
37 main_widget = new QWidget(parent);
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
38
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
39 SideBar* sidebar = new SideBar(main_widget);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
40 sidebar->AddItem("Now Playing", SideBar::CreateIcon(":/icons/16x16/film.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
41 sidebar->AddSeparator();
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
42 sidebar->AddItem("Anime List", SideBar::CreateIcon(":/icons/16x16/document-list.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
43 sidebar->AddItem("History", SideBar::CreateIcon(":/icons/16x16/clock-history-frame.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
44 sidebar->AddItem("Statistics", SideBar::CreateIcon(":/icons/16x16/chart.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
45 sidebar->AddSeparator();
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
46 sidebar->AddItem("Search", SideBar::CreateIcon(":/icons/16x16/magnifier.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
47 sidebar->AddItem("Seasons", SideBar::CreateIcon(":/icons/16x16/calendar.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
48 sidebar->AddItem("Torrents", SideBar::CreateIcon(":/icons/16x16/feed.png"));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
49 sidebar->setFixedWidth(128);
36
2743011a6042 *: mass update
Paper <mrpapersonic@gmail.com>
parents: 15
diff changeset
50 sidebar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
51
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
52 QStackedWidget* stack = new QStackedWidget(main_widget);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
53 stack->addWidget(new NowPlayingWidget(main_widget));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
54 stack->addWidget(new AnimeListWidget(main_widget));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
55 stack->addWidget(new StatisticsWidget(main_widget));
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
56
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
57 connect(sidebar, &SideBar::CurrentItemChanged, stack, [stack](int index) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
58 switch (index) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
59 case 0:
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
60 case 1: stack->setCurrentIndex(index); break;
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
61 case 3: stack->setCurrentIndex(2); break;
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
62 default: break;
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
63 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
64 });
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
65 sidebar->setCurrentRow(2);
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
66
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
67 /* Menu Bar */
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
68 QAction* action;
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
69 QMenuBar* menubar = new QMenuBar(parent);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
70 QMenu* menu = menubar->addMenu("&File");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
71 QMenu* submenu = menu->addMenu("&Library folders");
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
72 action = submenu->addAction("&Add new folder...");
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
73 action = menu->addAction("&Scan available episodes");
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
74
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
75 menu->addSeparator();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
76
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
77 action = menu->addAction("Play &next episode");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
78 action = menu->addAction("Play &random episode");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
79 menu->addSeparator();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
80 action = menu->addAction("E&xit", qApp, &QApplication::quit);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
81
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
82 menu = menubar->addMenu("&Services");
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
83 action = menu->addAction("Synchronize &list", [this, stack] {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
84 Services::Synchronize();
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
85 ((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->Refresh();
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
86 });
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
87
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
88 menu->addSeparator();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
89
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
90 submenu = menu->addMenu("&AniList");
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
91 action = submenu->addAction("Go to my &profile");
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
92 action = submenu->addAction("Go to my &stats");
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
93
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
94 submenu = menu->addMenu("&Kitsu");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
95 action = submenu->addAction("Go to my &feed");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
96 action = submenu->addAction("Go to my &library");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
97 action = submenu->addAction("Go to my &profile");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
98
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
99 submenu = menu->addMenu("&MyAnimeList");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
100 action = submenu->addAction("Go to my p&anel");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
101 action = submenu->addAction("Go to my &profile");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
102 action = submenu->addAction("Go to my &history");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
103
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
104 menu = menubar->addMenu("&Tools");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
105 submenu = menu->addMenu("&Export anime list");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
106 action = submenu->addAction("Export as &Markdown...");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
107 action = submenu->addAction("Export as MyAnimeList &XML...");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
108
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
109 menu->addSeparator();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
110
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
111 action = menu->addAction("Enable anime &recognition");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
112 action->setCheckable(true);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
113 action = menu->addAction("Enable auto &sharing");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
114 action->setCheckable(true);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
115 action = menu->addAction("Enable &auto synchronization");
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
116 action->setCheckable(true);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
117
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
118 menu->addSeparator();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
119
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
120 action = menu->addAction("&Settings", [this] {
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
121 SettingsDialog dialog(this);
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
122 dialog.exec();
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
123 });
44
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
124 action->setMenuRole(QAction::PreferencesRole);
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
125
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
126 menu = menubar->addMenu("&View");
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
127
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
128 std::map<QAction*, int> page_to_index_map = {};
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
129
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
130 QActionGroup* pages_group = new QActionGroup(this);
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
131 pages_group->setExclusive(true);
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
132
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
133 action = pages_group->addAction(menu->addAction("&Now Playing"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
134 page_to_index_map[action] = 0;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
135 action = pages_group->addAction(menu->addAction("&Anime List"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
136 page_to_index_map[action] = 1;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
137 action->setChecked(true);
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
138 action = pages_group->addAction(menu->addAction("&History"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
139 page_to_index_map[action] = 2;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
140 action = pages_group->addAction(menu->addAction("&Statistics"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
141 page_to_index_map[action] = 3;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
142 action = pages_group->addAction(menu->addAction("S&earch"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
143 page_to_index_map[action] = 4;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
144 action = pages_group->addAction(menu->addAction("Se&asons"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
145 page_to_index_map[action] = 5;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
146 action = pages_group->addAction(menu->addAction("&Torrents"));
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
147 page_to_index_map[action] = 6;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
148
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
149 connect(pages_group, &QActionGroup::triggered, this, [page_to_index_map, stack](QAction* action) {
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
150 int index = page_to_index_map.at(action);
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
151 switch (index) {
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
152 case 0:
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
153 case 1: stack->setCurrentIndex(index); break;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
154 case 3: stack->setCurrentIndex(2);
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
155 default: break;
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
156 }
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
157 });
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
158
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
159 menu = menubar->addMenu("&Help");
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 44
diff changeset
160 action = menu->addAction("About &Qt", qApp, [this] { qApp->aboutQt(); });
44
619cbd6e69f9 filesystem: fix CreateDirectories function
Paper <mrpapersonic@gmail.com>
parents: 37
diff changeset
161 action->setMenuRole(QAction::AboutQtRole);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
162
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
163 setMenuBar(menubar);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
164
6
1d82f6e04d7d Update: add first parts to the settings dialog
Paper <mrpapersonic@gmail.com>
parents: 5
diff changeset
165 QHBoxLayout* layout = new QHBoxLayout(main_widget);
37
9ae9365dd4ea window.cpp: fix sidebar on Linux
Paper <mrpapersonic@gmail.com>
parents: 36
diff changeset
166 layout->addWidget(sidebar);
7
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
167 layout->addWidget(stack);
Paper <mrpapersonic@gmail.com>
parents: 6
diff changeset
168 setCentralWidget(main_widget);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
169
46
d0adc4aedfc8 *: update...
Paper <mrpapersonic@gmail.com>
parents: 44
diff changeset
170 DarkTheme::SetTheme(session.config.theme);
2
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
171 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
172
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
173 void MainWindow::SetActivePage(QWidget* page) {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
174 this->setCentralWidget(page);
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
175 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
176
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
177 void MainWindow::closeEvent(QCloseEvent* event) {
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
178 session.config.Save();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
179 event->accept();
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
180 }
Paper <mrpapersonic@gmail.com>
parents: 1
diff changeset
181
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 8
diff changeset
182 #include "gui/moc_window.cpp"