Mercurial > minori
annotate src/main.cc @ 319:d928ec7b6a0d
services/kitsu: implement GetAnimeList()
it finally works!
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 12 Jun 2024 17:52:26 -0400 |
parents | b1f4d1867ab1 |
children | 78929794e7d8 |
rev | line source |
---|---|
258 | 1 #include "core/anime_db.h" |
10 | 2 #include "core/session.h" |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
229
diff
changeset
|
3 #include "core/strings.h" |
258 | 4 #include "gui/window.h" |
250 | 5 #include "services/anilist.h" |
6 | |
10 | 7 #include <QApplication> |
258 | 8 #include <QLocale> |
46 | 9 #include <QStyleFactory> |
108 | 10 #include <QTranslator> |
10 | 11 |
317
b1f4d1867ab1
services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents:
315
diff
changeset
|
12 #include <cstdlib> |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
229
diff
changeset
|
13 |
10 | 14 int main(int argc, char** argv) { |
15 QApplication app(argc, argv); | |
250 | 16 app.setApplicationName("minori"); |
17 app.setApplicationDisplayName("Minori"); | |
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
229
diff
changeset
|
18 app.setAttribute(Qt::AA_DontShowIconsInMenus, true); |
10 | 19 |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
20 qRegisterMetaType<std::vector<std::string>>(); /* window.cc */ |
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
21 qRegisterMetaType<std::vector<int>>(); /* search.cc */ |
315
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
22 qRegisterMetaType<std::string>(); |
273
f31305b9f60a
*: various code safety changes
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
23 |
10 | 24 session.config.Load(); |
177
122fad646f81
anime/db: upgrade to c++17 style, make things easier to read
Paper <mrpapersonic@gmail.com>
parents:
175
diff
changeset
|
25 Anime::db.LoadDatabaseFromDisk(); |
10 | 26 |
27 MainWindow window; | |
28 | |
29 window.resize(941, 750); | |
11 | 30 window.setWindowTitle("Minori"); |
10 | 31 window.show(); |
32 | |
315
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
33 /* do this before starting the app... */ |
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
34 session.SetMainWindow(&window); |
34347fd2a2de
session: allow printing status messages
Paper <paper@paper.us.eu.org>
parents:
273
diff
changeset
|
35 |
10 | 36 return app.exec(); |
46 | 37 } |