diff options
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 28 | 
1 files changed, 28 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..0126575 --- /dev/null +++ b/main.cpp @@ -0,0 +1,28 @@ +#include <QtGui> + +#include "player.h" +#include "gui/mainwindow.h" + +int main(int argc, char** argv) { +	QApplication qapp(argc, argv); +	 +	qapp.setStyleSheet("file:///default.qss"); +	 +	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(); +}  | 
