Big commit:
authorNikolay Tischenko <niktischenko@gmail.com>
Fri, 17 Sep 2010 18:17:59 +0000 (01:17 +0700)
committerNikolay Tischenko <niktischenko@gmail.com>
Fri, 17 Sep 2010 18:17:59 +0000 (01:17 +0700)
- added icons
- added search line
- minor bugfixing

36 files changed:
resources/add.png [new file with mode: 0644]
resources/artists.png [new file with mode: 0644]
resources/back.png [new file with mode: 0644]
resources/delete.png [new file with mode: 0644]
resources/dynamic.png [new file with mode: 0644]
resources/fav.png [new file with mode: 0644]
resources/forward.png [new file with mode: 0644]
resources/library.png [new file with mode: 0644]
resources/next.png [new file with mode: 0644]
resources/pause.png [new file with mode: 0644]
resources/play.png [new file with mode: 0644]
resources/playback.png [new file with mode: 0644]
resources/player.png [new file with mode: 0644]
resources/playlist.png [new file with mode: 0644]
resources/playlists.png [new file with mode: 0644]
resources/prev.png [new file with mode: 0644]
resources/random_active.png [new file with mode: 0644]
resources/random_inactive.png [new file with mode: 0644]
resources/repeat_active.png [new file with mode: 0644]
resources/repeat_inactive.png [new file with mode: 0644]
resources/resources.qrc [new file with mode: 0644]
resources/search.png [new file with mode: 0644]
resources/stop.png [new file with mode: 0644]
resources/use.png [new file with mode: 0644]
someplayer.pro
someplayer.pro.user
src/libraryform.cpp
src/mainwindow.cpp
src/mainwindow.h
src/player/player.cpp
src/playerform.cpp
src/playerform.h
src/trackrenderer.cpp
src/ui/libraryform.ui
src/ui/mainwindow.ui
src/ui/playerform.ui

diff --git a/resources/add.png b/resources/add.png
new file mode 100644 (file)
index 0000000..3f3717a
Binary files /dev/null and b/resources/add.png differ
diff --git a/resources/artists.png b/resources/artists.png
new file mode 100644 (file)
index 0000000..004d7f1
Binary files /dev/null and b/resources/artists.png differ
diff --git a/resources/back.png b/resources/back.png
new file mode 100644 (file)
index 0000000..6f0837f
Binary files /dev/null and b/resources/back.png differ
diff --git a/resources/delete.png b/resources/delete.png
new file mode 100644 (file)
index 0000000..3da8b2f
Binary files /dev/null and b/resources/delete.png differ
diff --git a/resources/dynamic.png b/resources/dynamic.png
new file mode 100644 (file)
index 0000000..dfadb94
Binary files /dev/null and b/resources/dynamic.png differ
diff --git a/resources/fav.png b/resources/fav.png
new file mode 100644 (file)
index 0000000..b0a5fe3
Binary files /dev/null and b/resources/fav.png differ
diff --git a/resources/forward.png b/resources/forward.png
new file mode 100644 (file)
index 0000000..5e47e1f
Binary files /dev/null and b/resources/forward.png differ
diff --git a/resources/library.png b/resources/library.png
new file mode 100644 (file)
index 0000000..02fcaeb
Binary files /dev/null and b/resources/library.png differ
diff --git a/resources/next.png b/resources/next.png
new file mode 100644 (file)
index 0000000..02466b4
Binary files /dev/null and b/resources/next.png differ
diff --git a/resources/pause.png b/resources/pause.png
new file mode 100644 (file)
index 0000000..de9805b
Binary files /dev/null and b/resources/pause.png differ
diff --git a/resources/play.png b/resources/play.png
new file mode 100644 (file)
index 0000000..3f031b0
Binary files /dev/null and b/resources/play.png differ
diff --git a/resources/playback.png b/resources/playback.png
new file mode 100644 (file)
index 0000000..b8fdd79
Binary files /dev/null and b/resources/playback.png differ
diff --git a/resources/player.png b/resources/player.png
new file mode 100644 (file)
index 0000000..31dcd75
Binary files /dev/null and b/resources/player.png differ
diff --git a/resources/playlist.png b/resources/playlist.png
new file mode 100644 (file)
index 0000000..6edad1d
Binary files /dev/null and b/resources/playlist.png differ
diff --git a/resources/playlists.png b/resources/playlists.png
new file mode 100644 (file)
index 0000000..5e03318
Binary files /dev/null and b/resources/playlists.png differ
diff --git a/resources/prev.png b/resources/prev.png
new file mode 100644 (file)
index 0000000..d556200
Binary files /dev/null and b/resources/prev.png differ
diff --git a/resources/random_active.png b/resources/random_active.png
new file mode 100644 (file)
index 0000000..5a8c319
Binary files /dev/null and b/resources/random_active.png differ
diff --git a/resources/random_inactive.png b/resources/random_inactive.png
new file mode 100644 (file)
index 0000000..7b4ba32
Binary files /dev/null and b/resources/random_inactive.png differ
diff --git a/resources/repeat_active.png b/resources/repeat_active.png
new file mode 100644 (file)
index 0000000..6a20a83
Binary files /dev/null and b/resources/repeat_active.png differ
diff --git a/resources/repeat_inactive.png b/resources/repeat_inactive.png
new file mode 100644 (file)
index 0000000..004a4eb
Binary files /dev/null and b/resources/repeat_inactive.png differ
diff --git a/resources/resources.qrc b/resources/resources.qrc
new file mode 100644 (file)
index 0000000..24f51a2
--- /dev/null
@@ -0,0 +1,27 @@
+<RCC>
+    <qresource prefix="/icons">
+        <file>artists.png</file>
+        <file>back.png</file>
+        <file>library.png</file>
+        <file>next.png</file>
+        <file>pause.png</file>
+        <file>play.png</file>
+        <file>playback.png</file>
+        <file>player.png</file>
+        <file>playlist.png</file>
+        <file>prev.png</file>
+        <file>search.png</file>
+        <file>stop.png</file>
+        <file>random_active.png</file>
+        <file>random_inactive.png</file>
+        <file>repeat_active.png</file>
+        <file>repeat_inactive.png</file>
+        <file>playlists.png</file>
+        <file>add.png</file>
+        <file>delete.png</file>
+        <file>use.png</file>
+        <file>dynamic.png</file>
+        <file>fav.png</file>
+        <file>forward.png</file>
+    </qresource>
+</RCC>
diff --git a/resources/search.png b/resources/search.png
new file mode 100644 (file)
index 0000000..690d212
Binary files /dev/null and b/resources/search.png differ
diff --git a/resources/stop.png b/resources/stop.png
new file mode 100644 (file)
index 0000000..70005ea
Binary files /dev/null and b/resources/stop.png differ
diff --git a/resources/use.png b/resources/use.png
new file mode 100644 (file)
index 0000000..bbbfce2
Binary files /dev/null and b/resources/use.png differ
index e66292f..7ef8f1c 100644 (file)
@@ -57,3 +57,18 @@ symbian {
     TARGET.EPOCSTACKSIZE = 0x14000
     TARGET.EPOCHEAPSIZE = 0x020000 0x800000
 }
+
+RESOURCES += \
+    resources/resources.qrc
+
+OTHER_FILES += \
+    icons/stop.png \
+    icons/sound.png \
+    icons/search.png \
+    icons/prev.png \
+    icons/playlist.png \
+    icons/play.png \
+    icons/pause.png \
+    icons/next.png \
+    icons/fav.png \
+    icons/back.png
index fdaaadf..2fac81a 100644 (file)
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap"/>
     <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
     <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
-     <value key="192.168.77.2" type="QDateTime">2010-09-12T03:30:33</value>
+     <value key="192.168.77.2" type="QDateTime">2010-09-18T01:12:07</value>
     </valuemap>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
index f2e335b..8ce4c1d 100644 (file)
@@ -74,17 +74,18 @@ void LibraryForm::_view_button() {
        __fill_model(_model, artitst);
        ui->listView->setModel(_model);
        _state = STATE_ARTIST;
-       ui->backButton->setEnabled(false);
+       ui->backButton->hide();
        ui->listLabel->setText("Artists");
-       ui->addButton->setEnabled(true);
+       ui->addButton->show();
        ui->deleteButton->hide();
        ui->useButton->hide();
 }
 
 void LibraryForm::_dynamic_button() {
        ui->useButton->hide();
-       ui->backButton->setEnabled(false);
-       ui->addButton->setEnabled(true);
+       ui->backButton->hide();
+       ui->addButton->show();
+       ui->deleteButton->hide();
        _model->clear();
        _model->setRowCount(4);
        _model->setItem(0, new QStandardItem("Favorites"));
@@ -102,7 +103,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                __fill_model(_model, _lib->getAlbumsForArtist(data));
                _current_artist = data;
                _state = STATE_ALBUM;
-               ui->backButton->setEnabled(true);
+               ui->backButton->show();
                ui->listLabel->setText(QString("Albums by \"%1\"").arg(_current_artist));
                break;
        case STATE_ALBUM:
@@ -110,7 +111,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                _current_tracks = _lib->getTracksForAlbum(data, _current_artist);
                __fill_model_tracks(_model, _current_tracks);
                _state = STATE_TRACK;
-               ui->backButton->setEnabled(true);
+               ui->backButton->show();
                ui->listLabel->setText(QString("Tracks from \"%1\" by \"%2\"").arg(_current_album).arg(_current_artist));
                break;
        case STATE_PLAYLIST:
@@ -119,7 +120,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                        _current_tracks = _current_playlist.tracks();
                        __fill_model_tracks(_model, _current_tracks);
                        _state = STATE_PLAYLIST_TRACK;
-                       ui->backButton->setEnabled(true);
+                       ui->backButton->show();
                        ui->deleteButton->show();
                        ui->useButton->show();
                        ui->listLabel->setText(QString("Tracks in playlist \"%1\"").arg(data));
@@ -145,8 +146,9 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                        _current_tracks = _current_playlist.tracks();
                        __fill_model_tracks(_model, _current_tracks);
                        _state = STATE_PLAYLIST_TRACK;
-                       ui->backButton->setEnabled(true);
+                       ui->backButton->show();
                        ui->useButton->show();
+                       ui->addButton->show();
                        ui->listLabel->setText(_current_playlist.name());
                }
        default:
@@ -243,10 +245,10 @@ void LibraryForm::_playlists_button() {
        __fill_model(_model, playlists);
        ui->listView->setModel(_model);
        _state = STATE_PLAYLIST;
-       ui->backButton->setEnabled(false);
+       ui->backButton->hide();
        ui->listLabel->setText("Playlists");
-       ui->addButton->setEnabled(false);
-       ui->deleteButton->hide();
+       ui->addButton->hide();
+       ui->deleteButton->show();
        ui->useButton->hide();
 }
 
@@ -265,6 +267,19 @@ void LibraryForm::_delete_button() {
                        _current_tracks.removeAt(to_delete.at(i));
                }
                __fill_model_tracks(_model, _current_tracks);
+       } else if (_state == STATE_PLAYLIST) {
+               QModelIndexList selected = ui->listView->selectionModel()->selectedIndexes();
+               QQueue<int> to_delete;
+               foreach (QModelIndex id, selected) {
+                       _delete_track(_current_tracks.at(id.row()));
+                       to_delete.append(id.row());
+               }
+               qSort(to_delete);
+               int count = to_delete.count();
+               for (int i = count-1; i >= 0; i--) {
+                       _lib->removePlaylist(_model->item(to_delete.at(i))->data().toString());
+                       _model->removeRow(to_delete.at(i));
+               }
        }
 }
 
index 3617517..61d7a59 100644 (file)
@@ -17,11 +17,8 @@ MainWindow::MainWindow(QWidget *parent) :
 {
        _library = new Library(_DATABASE_PATH_, _PLAYLISTS_PATH_);
        ui->setupUi(this);
-       connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openMedia()));
        connect(ui->actionAbout_Qt, SIGNAL(triggered()), this, SLOT(aboutQt()));
        connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()));
-       connect(ui->actionPlayer, SIGNAL(triggered()), this, SLOT(player()));
-       connect(ui->actionLibrary, SIGNAL(triggered()), this, SLOT(library()));
        setAnimated(true);
        _player_form = new PlayerForm(_library, ui->stackedWidget);
        _library_form = new LibraryForm(_library, ui->stackedWidget);
@@ -29,11 +26,9 @@ MainWindow::MainWindow(QWidget *parent) :
        ui->stackedWidget->insertWidget(0, _player_form);
        ui->stackedWidget->insertWidget(1, _library_form);
        ui->stackedWidget->insertWidget(2, _busy_widget);
-       _library_menu = new QMenu("Lirary");
-       QAction *add_directory = _library_menu->addAction("Add directory");
-       QAction *save_playlist = _library_menu->addAction("Save playlist");
-       QAction *clear_playlist = _library_menu->addAction("Clear current playlist");
-       _player_menu = new QMenu("Player");
+       QAction *add_directory = ui->menuLibrary->addAction("Add directory");
+       QAction *save_playlist = ui->menuLibrary->addAction("Save playlist");
+       QAction *clear_playlist = ui->menuLibrary->addAction("Clear current playlist");
        connect(_player_form, SIGNAL(library()), this, SLOT(library()));
        connect(_library_form, SIGNAL(player()), this, SLOT(player()));
        connect(add_directory, SIGNAL(triggered()), this, SLOT(_add_directory()));
@@ -42,6 +37,13 @@ MainWindow::MainWindow(QWidget *parent) :
        connect(_library, SIGNAL(done()), this, SLOT(library()));
        connect(_library_form, SIGNAL(done()), this, SLOT(library()));
        connect(_library_form, SIGNAL(busy(QString)), this, SLOT(showBusyWidget(QString)));
+       connect(ui->searchButton, SIGNAL(clicked()), this, SLOT(_toggle_search_line()));
+       connect(_player_form, SIGNAL(showSearchPanel()), this, SLOT(showSearchPanel()));
+       connect(_player_form, SIGNAL(hideSearchPanel()), this, SLOT(hideSearchPanel()));
+       connect(ui->searchLine, SIGNAL(textChanged(QString)), this, SLOT(_search(QString)));
+       connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(_nextItem()));
+       connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(_prevItem()));
+       hideSearchPanel();
        library();
 }
 
@@ -52,12 +54,6 @@ MainWindow::~MainWindow()
        delete ui;
 }
 
-void MainWindow::openMedia()
-{
-//     SomePlayer::DataObjects::Library *l = new SomePlayer::DataObjects::Library("/tmp", "/tmp");
-//     l->addDirectory("/mnt/music/Three Days Grace");
-}
-
 void MainWindow::aboutQt() {
        QMessageBox::aboutQt(this, "About Qt");
 }
@@ -77,8 +73,8 @@ void MainWindow::player() {
 void MainWindow::library() {
        ui->menuBar->setEnabled(true);
        ui->stackedWidget->setCurrentIndex(1);
+       showSearchPanel();
        setWindowTitle("SomePlayer Library");
-       ui->menuBar->addMenu(_library_menu);
 }
 
 void MainWindow::_add_directory() {
@@ -108,3 +104,54 @@ void MainWindow::showBusyWidget(QString caption) {
        ui->menuBar->setEnabled(false);
        ui->stackedWidget->setCurrentIndex(2);
 }
+
+void MainWindow::_toggle_search_line() {
+       if (ui->searchLine->isVisible()) {
+               ui->searchLine->setText("");
+               ui->searchLine->hide();
+               ui->nextButton->hide();
+               ui->prevButton->hide();
+               _cancelSearch();
+       } else {
+               ui->searchLine->show();
+               ui->nextButton->show();
+               ui->prevButton->show();
+       }
+}
+
+void MainWindow::showSearchPanel() {
+       ui->searchButton->show();
+}
+
+void MainWindow::hideSearchPanel() {
+       ui->searchLine->setText("");
+       ui->searchLine->hide();
+       ui->nextButton->hide();
+       ui->prevButton->hide();
+       ui->searchButton->hide();
+       _cancelSearch();
+}
+
+void MainWindow::_search(QString pattern) {
+       if (ui->stackedWidget->currentIndex() == 0) { // player
+               _player_form->search(pattern);
+       }
+}
+
+void MainWindow::_nextItem() {
+       if (ui->stackedWidget->currentIndex() == 0) { // player
+               _player_form->nextItem();
+       }
+}
+
+void MainWindow::_prevItem() {
+       if (ui->stackedWidget->currentIndex() == 0) { // player
+               _player_form->prevItem();
+       }
+}
+
+void MainWindow::_cancelSearch() {
+       if (ui->stackedWidget->currentIndex() == 0) { // player
+               _player_form->cancelSearch();
+       }
+}
index a229394..e9b4608 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <QMainWindow>
 #include <QMessageBox>
-#include <QMenu>
 #include "playerform.h"
 #include "libraryform.h"
 #include "busywidget.h"
@@ -27,22 +26,26 @@ private:
        Ui::MainWindow *ui;
 
 public slots:
-       void openMedia();
        void aboutQt();
        void about();
        void player();
        void library();
        void showBusyWidget(QString);
+       void showSearchPanel();
+       void hideSearchPanel();
 private slots:
        void _add_directory();
        void _save_playlist();
        void _clear_current_playlist();
+       void _toggle_search_line();
+       void _search(QString);
+       void _nextItem();
+       void _prevItem();
+       void _cancelSearch();
 private:
        PlayerForm *_player_form;
        LibraryForm *_library_form;
        BusyWidget *_busy_widget;
-       QMenu *_library_menu;
-       QMenu *_player_menu;
        Library *_library;
 };
 
index 7eecd0e..577a4dc 100644 (file)
@@ -17,6 +17,7 @@ Player::Player(QObject *parent) :
        qsrand(seed);
        _random = false;
        _repeat = false;
+       _current = -1;
 }
 
 void Player::setTrackId(int id) {
@@ -137,9 +138,14 @@ void Player::seek(int s) {
 }
 
 void Player::play() {
-       _player->play();
        _state = PLAYER_PLAYING;
        emit stateChanged(_state);
+       if (_current == -1) {
+               _current = 0;
+               _track = _playlist.tracks().at(0);
+               _set_source();
+       }
+       _player->play();
 }
 
 void Player::enqueue(int id) {
index d0bb5dc..6bb2379 100644 (file)
@@ -1,10 +1,12 @@
 #include "playerform.h"
 #include "ui_playerform.h"
 #include "library.h"
+#include "player/player.h"
 #include <QDebug>
 #include <QTime>
 #include <QSlider>
 #include "trackrenderer.h"
+#include <QResource>
 
 using namespace SomePlayer::DataObjects;
 using namespace SomePlayer::Playback;
@@ -27,6 +29,7 @@ PlayerForm::PlayerForm(Library* lib, QWidget *parent) :
 {
        _lib = lib;
        _player = new Player(this);
+       _time = new QTime();
     ui->setupUi(this);
        connect(ui->libraryButton, SIGNAL(clicked()), this, SLOT(_library()));
        connect(ui->viewButton, SIGNAL(clicked()), this, SLOT(_toggle_view()));
@@ -37,11 +40,20 @@ PlayerForm::PlayerForm(Library* lib, QWidget *parent) :
        connect(ui->prevButton, SIGNAL(clicked()), _player, SLOT(prev()));
        connect(_player, SIGNAL(trackChanged(Track)), this, SLOT(_track_changed(Track)));
        connect(_player, SIGNAL(tick(int,int)), this, SLOT(_tick(int,int)));
-       connect(ui->randomButton, SIGNAL(clicked()), _player, SLOT(toggleRandom()));
-       connect(ui->repeatButton, SIGNAL(clicked()), _player, SLOT(toggleRepeat()));
-       ui->randomButton->setChecked(_player->random());
-       ui->repeatButton->setChecked(_player->repeat());
+       connect(ui->randomButton, SIGNAL(clicked()), this, SLOT(_toggle_random()));
+       connect(ui->repeatButton, SIGNAL(clicked()), this, SLOT(_toggle_repeat()));
+       if (_player->random()) {
+               ui->randomButton->setIcon(QIcon(":/icons/random_active.png"));
+       } else {
+               ui->randomButton->setIcon(QIcon(":/icons/random_inactive.png"));
+       }
+       if (_player->repeat()) {
+               ui->repeatButton->setIcon(QIcon(":/icons/repeat_active.png"));
+       } else {
+               ui->repeatButton->setIcon(QIcon(":/icons/repeat_inactive.png"));
+       }
        _seek_slider = new QSlider(Qt::Horizontal);
+       _seek_slider->setEnabled(false);
        ui->progressLayout->insertWidget(1, _seek_slider);
        _seek_slider->setTracking(false);
        connect(_seek_slider, SIGNAL(sliderReleased()), this, SLOT(_slider_released()));
@@ -49,12 +61,13 @@ PlayerForm::PlayerForm(Library* lib, QWidget *parent) :
        _model = new QStandardItemModel(0, 2, this);
        ui->playlistView->setModel(_model);
        _context_menu = new QMenu(ui->playlistView);
-       QAction *delete_action = _context_menu->addAction("Delete");
+       QAction *delete_action = _context_menu->addAction(QIcon(":/icons/delete.png"), "Delete");
        connect(delete_action, SIGNAL(triggered()), this, SLOT(_delete_track()));
-       QAction *enqueue_action = _context_menu->addAction("Enqueue");
+       QAction *enqueue_action = _context_menu->addAction(QIcon(":/icons/add.png"), "Enqueue");
        connect(enqueue_action, SIGNAL(triggered()), this, SLOT(_enqueue_track()));
-       QAction *add_to_favorites = _context_menu->addAction("Add to favorites");
+       QAction *add_to_favorites = _context_menu->addAction(QIcon(":/icons/fav.png"), "Add to favorites");
        connect(add_to_favorites, SIGNAL(triggered()), this, SLOT(_add_to_favorites()));
+       connect(_player, SIGNAL(stateChanged(PlayerState)), this, SLOT(_state_changed(PlayerState)));
 
        _track_renderer = new TrackRenderer(this);
        ui->playlistView->setItemDelegateForColumn(0, _track_renderer);
@@ -71,6 +84,9 @@ void PlayerForm::_library() {
 }
 
 void PlayerForm::reload() {
+       if (ui->stackedWidget->currentIndex() == 1) {
+               emit hideSearchPanel();
+       }
        _current_playlist = _lib->getCurrentPlaylist();
        _player->setPlaylist(_current_playlist);
        __fill_list(_model, _current_playlist);
@@ -79,6 +95,13 @@ void PlayerForm::reload() {
 void PlayerForm::_toggle_view() {
        int index = ui->stackedWidget->currentIndex();
        index = (!index % 2);
+       if (index) {
+               ui->viewButton->setIcon(QIcon(":/icons/playlist.png"));
+               emit hideSearchPanel();
+       } else {
+               ui->viewButton->setIcon(QIcon(":/icons/playback.png"));
+               emit showSearchPanel();
+       }
        ui->stackedWidget->setCurrentIndex(index);
 }
 
@@ -108,7 +131,7 @@ void PlayerForm::_display_track(Track track) {
                                                        arg(_current_playlist.tracks().indexOf(track)+1).
                                                        arg(_current_playlist.tracks().count()));
        ui->titleLabel->setText(QString("<h3>%1</h3>").arg(track.metadata().title()));
-       ui->artistAlbumLabel->setText(QString("<h3>%1</h3><br/>%2").
+       ui->artistAlbumLabel->setText(QString("<b>%1</b><br/>%2").
                                                                  arg(track.metadata().artist()).
                                                                  arg(track.metadata().album()));
        _seek_slider->setMinimum(0);
@@ -117,10 +140,10 @@ void PlayerForm::_display_track(Track track) {
 }
 
 void PlayerForm::_tick(int done, int all) {
-       QTime time(0, all/60, all%60);
-       ui->allTimeLabel->setText(time.toString("mm:ss"));
-       time.setHMS(0, done/60, done%60);
-       ui->doneTimeLabel->setText(time.toString("mm:ss"));
+       _time->setHMS(0, all/60, all%60);
+       ui->allTimeLabel->setText(_time->toString("mm:ss"));
+       _time->setHMS(0, done/60, done%60);
+       ui->doneTimeLabel->setText(_time->toString("mm:ss"));
        _seek_slider->setValue(done);
 }
 
@@ -151,3 +174,49 @@ void PlayerForm::_add_to_favorites() {
        int id = idx.first().row();
        _lib->addToFavorites(_current_playlist.tracks().at(id));
 }
+
+void PlayerForm::_state_changed(PlayerState state) {
+       if (state == PLAYER_PLAYING) {
+               ui->playpauseButton->setIcon(QIcon(":/icons/pause.png"));
+               _seek_slider->setEnabled(true);
+       } else {
+               if (state == PLAYER_STOPPED) {
+                       _seek_slider->setValue(0);
+                       ui->doneTimeLabel->setText("00:00");
+                       _seek_slider->setEnabled(false);
+               }
+               ui->playpauseButton->setIcon(QIcon(":/icons/play.png"));
+       }
+}
+
+void PlayerForm::_toggle_random() {
+       _player->toggleRandom();
+       if (_player->random()) {
+               ui->randomButton->setIcon(QIcon(":/icons/random_active.png"));
+       } else {
+               ui->randomButton->setIcon(QIcon(":/icons/random_inactive.png"));
+       }
+}
+
+void PlayerForm::_toggle_repeat() {
+       _player->toggleRepeat();
+       if (_player->repeat()) {
+               ui->repeatButton->setIcon(QIcon(":/icons/repeat_active.png"));
+       } else {
+               ui->repeatButton->setIcon(QIcon(":/icons/repeat_inactive.png"));
+       }
+}
+
+void PlayerForm::search(QString &pattern) {
+       _search_pattern = pattern;
+}
+
+void PlayerForm::nextItem() {
+}
+
+void PlayerForm::prevItem() {
+}
+
+void PlayerForm::cancelSearch() {
+       _search_pattern = "";
+}
index 335d3fa..9d74ad7 100644 (file)
@@ -8,6 +8,7 @@
 #include "player/player.h"
 #include <QSlider>
 #include <QMenu>
+#include <QTime>
 #include "trackrenderer.h"
 
 namespace Ui {
@@ -18,6 +19,7 @@ using SomePlayer::DataObjects::Library;
 using SomePlayer::DataObjects::Playlist;
 using SomePlayer::DataObjects::Track;
 using SomePlayer::Playback::Player;
+using SomePlayer::Playback::PlayerState;
 
 class PlayerForm : public QWidget
 {
@@ -28,9 +30,15 @@ public:
     ~PlayerForm();
 signals:
        void library();
+       void showSearchPanel();
+       void hideSearchPanel();
 
 public slots:
        void reload();
+       void search(QString &);
+       void nextItem();
+       void prevItem();
+       void cancelSearch();
 
 private slots:
        void _library();
@@ -43,15 +51,20 @@ private slots:
        void _delete_track();
        void _enqueue_track();
        void _add_to_favorites();
+       void _state_changed(PlayerState);
+       void _toggle_repeat();
+       void _toggle_random();
 
 private:
     Ui::PlayerForm *ui;
        Library *_lib;
        Playlist _current_playlist;
+       QTime *_time;
        QStandardItemModel *_model;
        Player *_player;
        QSlider *_seek_slider;
        QMenu *_context_menu;
+       QString _search_pattern;
 
        TrackRenderer *_track_renderer;
        void _display_track(Track);
index 2d88cb1..339f2e3 100644 (file)
@@ -47,7 +47,7 @@ void TrackRenderer::paint(QPainter *painter, const QStyleOptionViewItem &option,
        painter->setPen(pen);
 }
 
-QSize TrackRenderer::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
+QSize TrackRenderer::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &/*index*/) const {
        return QSize(option.rect.width(), option.rect.height()/3);
 }
 
index 276cbc2..10e9499 100644 (file)
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
       <widget class="QPushButton" name="viewButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>70</width>
+         <height>70</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>70</width>
+         <height>70</height>
+        </size>
+       </property>
        <property name="text">
-        <string>View</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/artists.png</normaloff>:/icons/artists.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
      </item>
      <item>
       <widget class="QPushButton" name="dynamicButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>70</width>
+         <height>70</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>70</width>
+         <height>70</height>
+        </size>
+       </property>
        <property name="text">
-        <string>Dynamic</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/dynamic.png</normaloff>:/icons/dynamic.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
      </item>
      <item>
       <widget class="QPushButton" name="playlistsButton">
+       <property name="minimumSize">
+        <size>
+         <width>70</width>
+         <height>70</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>70</width>
+         <height>70</height>
+        </size>
+       </property>
        <property name="text">
-        <string>Playlists</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/playlists.png</normaloff>:/icons/playlists.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
       <layout class="QVBoxLayout" name="verticalLayout">
        <item>
         <widget class="QPushButton" name="backButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
+          </size>
+         </property>
          <property name="text">
-          <string>Back</string>
+          <string/>
+         </property>
+         <property name="icon">
+          <iconset resource="../../resources/resources.qrc">
+           <normaloff>:/icons/back.png</normaloff>:/icons/back.png</iconset>
          </property>
          <property name="flat">
           <bool>true</bool>
         </widget>
        </item>
        <item>
-        <spacer name="verticalSpacer_2">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
+        <widget class="QPushButton" name="addButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
          </property>
-         <property name="sizeHint" stdset="0">
+         <property name="minimumSize">
           <size>
-           <width>20</width>
-           <height>40</height>
+           <width>70</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
           </size>
          </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QPushButton" name="addButton">
          <property name="text">
-          <string>Add</string>
+          <string/>
+         </property>
+         <property name="icon">
+          <iconset resource="../../resources/resources.qrc">
+           <normaloff>:/icons/add.png</normaloff>:/icons/add.png</iconset>
          </property>
          <property name="flat">
           <bool>true</bool>
         </widget>
        </item>
        <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
+        <widget class="QPushButton" name="deleteButton">
+         <property name="minimumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
+          </size>
          </property>
-         <property name="sizeHint" stdset="0">
+         <property name="maximumSize">
           <size>
-           <width>20</width>
-           <height>40</height>
+           <width>70</width>
+           <height>70</height>
           </size>
          </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QPushButton" name="deleteButton">
          <property name="text">
-          <string>Delete</string>
+          <string/>
+         </property>
+         <property name="icon">
+          <iconset resource="../../resources/resources.qrc">
+           <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
          </property>
          <property name="flat">
           <bool>true</bool>
         </widget>
        </item>
        <item>
-        <spacer name="verticalSpacer_4">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
+        <widget class="QPushButton" name="useButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
          </property>
-         <property name="sizeHint" stdset="0">
+         <property name="minimumSize">
           <size>
-           <width>20</width>
-           <height>40</height>
+           <width>70</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
           </size>
          </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QPushButton" name="useButton">
          <property name="text">
-          <string>Use</string>
+          <string/>
+         </property>
+         <property name="icon">
+          <iconset resource="../../resources/resources.qrc">
+           <normaloff>:/icons/use.png</normaloff>:/icons/use.png</iconset>
          </property>
          <property name="flat">
           <bool>true</bool>
        </item>
        <item>
         <widget class="QPushButton" name="playerButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>70</width>
+           <height>70</height>
+          </size>
+         </property>
          <property name="text">
-          <string>Player</string>
+          <string/>
+         </property>
+         <property name="icon">
+          <iconset resource="../../resources/resources.qrc">
+           <normaloff>:/icons/player.png</normaloff>:/icons/player.png</iconset>
          </property>
          <property name="flat">
           <bool>true</bool>
    </item>
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="../../resources/resources.qrc"/>
+ </resources>
  <connections/>
 </ui>
index 0a50b25..b6c3180 100644 (file)
    <string>someplayer</string>
   </property>
   <widget class="QWidget" name="centralWidget">
-   <layout class="QGridLayout" name="gridLayout_2">
-    <item row="0" column="0">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <item>
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Expanding</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>0</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="searchLayout">
+        <property name="spacing">
+         <number>0</number>
+        </property>
+        <item>
+         <widget class="QPushButton" name="prevButton">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>60</width>
+            <height>60</height>
+           </size>
+          </property>
+          <property name="maximumSize">
+           <size>
+            <width>60</width>
+            <height>60</height>
+           </size>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/back.png</normaloff>:/icons/back.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="searchLine">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>500</width>
+            <height>60</height>
+           </size>
+          </property>
+          <property name="maximumSize">
+           <size>
+            <width>16777215</width>
+            <height>60</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QPushButton" name="nextButton">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>60</width>
+            <height>60</height>
+           </size>
+          </property>
+          <property name="maximumSize">
+           <size>
+            <width>60</width>
+            <height>60</height>
+           </size>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/forward.png</normaloff>:/icons/forward.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer_2">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QPushButton" name="searchButton">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>60</width>
+          <height>60</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>60</width>
+          <height>60</height>
+         </size>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="icon">
+         <iconset resource="../../resources/resources.qrc">
+          <normaloff>:/icons/search.png</normaloff>:/icons/search.png</iconset>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
      <widget class="QStackedWidget" name="stackedWidget">
       <widget class="QWidget" name="page"/>
       <widget class="QWidget" name="page_2"/>
      <height>23</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menuView">
-    <property name="title">
-     <string>View</string>
-    </property>
-    <addaction name="actionLibrary"/>
-    <addaction name="actionPlayer"/>
-   </widget>
    <widget class="QMenu" name="menuHelp">
     <property name="title">
      <string>Help</string>
     <addaction name="actionAbout"/>
     <addaction name="actionAbout_Qt"/>
    </widget>
-   <addaction name="menuView"/>
+   <widget class="QMenu" name="menuLibrary">
+    <property name="title">
+     <string>Library</string>
+    </property>
+   </widget>
    <addaction name="menuHelp"/>
+   <addaction name="menuLibrary"/>
   </widget>
-  <action name="actionOpen">
-   <property name="text">
-    <string>Open media</string>
-   </property>
-  </action>
-  <action name="actionPlayer">
-   <property name="text">
-    <string>Player</string>
-   </property>
-  </action>
-  <action name="actionLibrary">
-   <property name="text">
-    <string>Library</string>
-   </property>
-  </action>
   <action name="actionAbout">
    <property name="text">
     <string>About</string>
   </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
- <resources/>
+ <resources>
+  <include location="../../resources/resources.qrc"/>
+ </resources>
  <connections/>
 </ui>
index f26d3bc..f85698d 100644 (file)
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
+    <widget class="QStackedWidget" name="stackedWidget">
+     <property name="currentIndex">
+      <number>1</number>
+     </property>
+     <widget class="QWidget" name="page">
+      <layout class="QVBoxLayout" name="verticalLayout_4">
+       <property name="spacing">
+        <number>0</number>
+       </property>
+       <property name="margin">
+        <number>0</number>
+       </property>
+       <item>
+        <widget class="QListView" name="playlistView">
+         <property name="contextMenuPolicy">
+          <enum>Qt::CustomContextMenu</enum>
+         </property>
+         <property name="editTriggers">
+          <set>QAbstractItemView::NoEditTriggers</set>
+         </property>
+         <property name="textElideMode">
+          <enum>Qt::ElideLeft</enum>
+         </property>
+         <property name="uniformItemSizes">
+          <bool>true</bool>
+         </property>
+         <property name="wordWrap">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="page_2">
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <widget class="QWidget" name="widget" native="true">
+         <layout class="QVBoxLayout" name="verticalLayout_2">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_5">
+            <item>
+             <spacer name="horizontalSpacer_2">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
+             <widget class="QLabel" name="countLabel">
+              <property name="text">
+               <string>0/0</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <widget class="QLabel" name="titleLabel">
+            <property name="text">
+             <string>&lt;h3&gt;Title&lt;/h3&gt;</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="progressLayout">
+            <item>
+             <widget class="QLabel" name="doneTimeLabel">
+              <property name="text">
+               <string>00:00</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="allTimeLabel">
+              <property name="text">
+               <string>00:00</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <widget class="QLabel" name="artistAlbumLabel">
+            <property name="text">
+             <string>&lt;b&gt;Artist&lt;/b&gt;&lt;br/&gt;album</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignCenter</set>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
      <property name="spacing">
       <number>0</number>
      </property>
      <item>
       <widget class="QPushButton" name="libraryButton">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
        <property name="minimumSize">
         <size>
-         <width>0</width>
+         <width>70</width>
          <height>70</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>16777215</width>
+         <width>70</width>
          <height>70</height>
         </size>
        </property>
        <property name="text">
-        <string>Library</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/library.png</normaloff>:/icons/library.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>^</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/playlist.png</normaloff>:/icons/playlist.png</iconset>
        </property>
        <property name="checkable">
-        <bool>true</bool>
+        <bool>false</bool>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>S</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/random_inactive.png</normaloff>:/icons/random_inactive.png</iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>48</width>
+         <height>48</height>
+        </size>
        </property>
        <property name="checkable">
-        <bool>true</bool>
+        <bool>false</bool>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>R</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/repeat_inactive.png</normaloff>:/icons/repeat_inactive.png</iconset>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>48</width>
+         <height>58</height>
+        </size>
        </property>
        <property name="checkable">
-        <bool>true</bool>
+        <bool>false</bool>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>&lt;|</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/prev.png</normaloff>:/icons/prev.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>&gt;||</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/play.png</normaloff>:/icons/play.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>[]</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/stop.png</normaloff>:/icons/stop.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
         </size>
        </property>
        <property name="text">
-        <string>|&gt;</string>
+        <string/>
+       </property>
+       <property name="icon">
+        <iconset resource="../../resources/resources.qrc">
+         <normaloff>:/icons/next.png</normaloff>:/icons/next.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
      </item>
     </layout>
    </item>
-   <item>
-    <widget class="QStackedWidget" name="stackedWidget">
-     <property name="currentIndex">
-      <number>1</number>
-     </property>
-     <widget class="QWidget" name="page">
-      <layout class="QVBoxLayout" name="verticalLayout_4">
-       <property name="spacing">
-        <number>0</number>
-       </property>
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <widget class="QListView" name="playlistView">
-         <property name="contextMenuPolicy">
-          <enum>Qt::CustomContextMenu</enum>
-         </property>
-         <property name="editTriggers">
-          <set>QAbstractItemView::NoEditTriggers</set>
-         </property>
-         <property name="textElideMode">
-          <enum>Qt::ElideLeft</enum>
-         </property>
-         <property name="uniformItemSizes">
-          <bool>true</bool>
-         </property>
-         <property name="wordWrap">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="page_2">
-      <layout class="QGridLayout" name="gridLayout">
-       <item row="0" column="0">
-        <widget class="QWidget" name="widget" native="true">
-         <layout class="QVBoxLayout" name="verticalLayout_2">
-          <item>
-           <layout class="QHBoxLayout" name="horizontalLayout_5">
-            <item>
-             <spacer name="horizontalSpacer_2">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-            <item>
-             <widget class="QLabel" name="countLabel">
-              <property name="text">
-               <string>0/0</string>
-              </property>
-              <property name="alignment">
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <widget class="QLabel" name="titleLabel">
-            <property name="text">
-             <string>&lt;h3&gt;Title&lt;/h3&gt;</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <layout class="QHBoxLayout" name="progressLayout">
-            <item>
-             <widget class="QLabel" name="doneTimeLabel">
-              <property name="text">
-               <string>00:00</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QLabel" name="allTimeLabel">
-              <property name="text">
-               <string>00:00</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <widget class="QLabel" name="artistAlbumLabel">
-            <property name="text">
-             <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;Artist&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:large;&quot;&gt;album&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignCenter</set>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-      <zorder></zorder>
-      <zorder>widget</zorder>
-     </widget>
-    </widget>
-   </item>
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="../../resources/resources.qrc"/>
+ </resources>
  <connections/>
 </ui>