annotate src/include/window.h @ 1:1ae666fdf9e2

*: initial commit
author Paper <mrpapersonic@gmail.com>
date Tue, 08 Aug 2023 19:49:15 -0400
parents
children 23d0d9319a00
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #ifndef __window_h
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 # define __window_h
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 /* FIXME: include these in specific .cpp files */
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 # include <QApplication>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 # include <QMainWindow>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
6 # include <QToolBar>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 # include <QMenuBar>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 # include <QWidget>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 # include <QTreeView>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 # include <QMessageBox>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 # include <QDesktopServices>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 # include <QUrl>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 # include <QInputDialog>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 # include <QDate>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15 # include <QHeaderView>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16 # include <QShortcut>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 # include <QFile>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
18 # include <QTextStream>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19 # include <QCloseEvent>
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20 # include "config.h"
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21 //# include "statistics.h"
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 //# include "now_playing.h"
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24 class MainWindow : public QMainWindow {
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25 public:
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
26 MainWindow(QWidget* parent = nullptr);
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
27 void SetActivePage(QWidget* page);
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28 void SetStyleSheet(enum Themes theme);
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29 void ThemeChanged();
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30 void closeEvent(QCloseEvent* event);
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32 private:
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
33 QWidget* anime_list_page;
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
34 };
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 struct Session {
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37 Config config;
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
38 };
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
39
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
40 extern Session session;
1ae666fdf9e2 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 #endif // __window_h