--- /dev/null
+<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>
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
<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>
__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"));
__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:
_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:
_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));
_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:
__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();
}
_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));
+ }
}
}
{
_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);
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()));
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();
}
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");
}
void MainWindow::library() {
ui->menuBar->setEnabled(true);
ui->stackedWidget->setCurrentIndex(1);
+ showSearchPanel();
setWindowTitle("SomePlayer Library");
- ui->menuBar->addMenu(_library_menu);
}
void MainWindow::_add_directory() {
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();
+ }
+}
#include <QMainWindow>
#include <QMessageBox>
-#include <QMenu>
#include "playerform.h"
#include "libraryform.h"
#include "busywidget.h"
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;
};
qsrand(seed);
_random = false;
_repeat = false;
+ _current = -1;
}
void Player::setTrackId(int id) {
}
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) {
#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;
{
_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()));
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()));
_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);
}
void PlayerForm::reload() {
+ if (ui->stackedWidget->currentIndex() == 1) {
+ emit hideSearchPanel();
+ }
_current_playlist = _lib->getCurrentPlaylist();
_player->setPlaylist(_current_playlist);
__fill_list(_model, _current_playlist);
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);
}
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);
}
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);
}
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 = "";
+}
#include "player/player.h"
#include <QSlider>
#include <QMenu>
+#include <QTime>
#include "trackrenderer.h"
namespace Ui {
using SomePlayer::DataObjects::Playlist;
using SomePlayer::DataObjects::Track;
using SomePlayer::Playback::Player;
+using SomePlayer::Playback::PlayerState;
class PlayerForm : public QWidget
{
~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();
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);
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);
}
<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>
<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>
</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><h3>Title</h3></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><b>Artist</b><br/>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><|</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>>||</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>|></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><h3>Title</h3></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><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Droid Sans'; font-size:9pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:large; font-weight:600;">Artist</span></p>
-<p style=" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:large;">album</span></p></body></html></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>