#include #include "database.h" #include "player.h" #include "gui/mainwindow.h" int main(int argc, char** argv) { QApplication qapp(argc, argv); qapp.setApplicationName("Ongaku"); qapp.setStyleSheet("file:///default.qss"); Database* database = new Database(); Track::p t = Track::get(1); qDebug() << t->album()->artist()->name() << " - " << t->name() << " (" << t->album()->name() << ")"; Player* player = new Player(); MainWindow* mainwindow = new MainWindow(); mainwindow->show(); player->connect(mainwindow, SIGNAL(prev()), SLOT(prev())); player->connect(mainwindow, SIGNAL(pause()), SLOT(pause())); player->connect(mainwindow, SIGNAL(play()), SLOT(play())); player->connect(mainwindow, SIGNAL(next()), SLOT(next())); player->connect(mainwindow, SIGNAL(seek(int)), SLOT(seek(int))); mainwindow->connect(player, SIGNAL(changed_track(const QUrl&)), SLOT(update_track(const QUrl&))); mainwindow->connect(player, SIGNAL(changed_state(bool)), SLOT(update_state(bool))); mainwindow->connect(player, SIGNAL(changed_pos(int)), SLOT(update_pos(int))); mainwindow->connect(player, SIGNAL(changed_length(int)), SLOT(update_length(int))); qapp.exec(); }