Version 1.3.5 1.3.5
authorNikolay Tischenko <niktischenko@gmail.com>
Sat, 9 Oct 2010 13:47:55 +0000 (20:47 +0700)
committerNikolay Tischenko <niktischenko@gmail.com>
Sat, 9 Oct 2010 13:47:55 +0000 (20:47 +0700)
* Fixed bug with unpausing when equalizer settings changed
* Improved UI
* Removed icons theme support

58 files changed:
resources/black/add.png [deleted file]
resources/black/artists.png [deleted file]
resources/black/back.png [deleted file]
resources/black/delete.png [deleted file]
resources/black/deselect_all.png [deleted file]
resources/black/dynamic.png [deleted file]
resources/black/fav.png [deleted file]
resources/black/forward.png [deleted file]
resources/black/fullscreen.png [deleted file]
resources/black/library.png [deleted file]
resources/black/next.png [deleted file]
resources/black/pause.png [deleted file]
resources/black/play.png [deleted file]
resources/black/playback.png [deleted file]
resources/black/player.png [deleted file]
resources/black/playlist.png [deleted file]
resources/black/playlists.png [deleted file]
resources/black/prev.png [deleted file]
resources/black/random_active.png [deleted file]
resources/black/random_inactive.png [deleted file]
resources/black/repeat_active.png [deleted file]
resources/black/repeat_inactive.png [deleted file]
resources/black/search.png [deleted file]
resources/black/select_all.png [deleted file]
resources/black/stop.png [deleted file]
resources/black/use.png [deleted file]
resources/black/volume.png [deleted file]
resources/black/window.png [deleted file]
resources/resources.qrc
resources/white/more.png [new file with mode: 0644]
resources/white/unmore.png [new file with mode: 0644]
someplayer.pro
src/config.cpp
src/equalizerdialog.cpp
src/equalizerdialog.h
src/libraryform.cpp
src/libraryform.h
src/main.cpp
src/mainwindow.cpp
src/mainwindow.h
src/player/player.cpp
src/playerform.cpp
src/playerform.h
src/settingsdialog.cpp
src/settingsdialog.h
src/someplayer.h
src/toolswidget.cpp [new file with mode: 0644]
src/toolswidget.h [new file with mode: 0644]
src/trackrenderer.cpp
src/ui/busywidget.ui
src/ui/edittagsdialog.ui
src/ui/equalizerdialog.ui
src/ui/libraryform.ui
src/ui/mainwindow.ui
src/ui/playerform.ui
src/ui/saveplaylistdialog.ui
src/ui/settingsdialog.ui
src/ui/toolswidget.ui [new file with mode: 0644]

diff --git a/resources/black/add.png b/resources/black/add.png
deleted file mode 100644 (file)
index a098819..0000000
Binary files a/resources/black/add.png and /dev/null differ
diff --git a/resources/black/artists.png b/resources/black/artists.png
deleted file mode 100644 (file)
index 61c03cf..0000000
Binary files a/resources/black/artists.png and /dev/null differ
diff --git a/resources/black/back.png b/resources/black/back.png
deleted file mode 100644 (file)
index 43d1f1f..0000000
Binary files a/resources/black/back.png and /dev/null differ
diff --git a/resources/black/delete.png b/resources/black/delete.png
deleted file mode 100644 (file)
index 74daaa2..0000000
Binary files a/resources/black/delete.png and /dev/null differ
diff --git a/resources/black/deselect_all.png b/resources/black/deselect_all.png
deleted file mode 100644 (file)
index 7c68419..0000000
Binary files a/resources/black/deselect_all.png and /dev/null differ
diff --git a/resources/black/dynamic.png b/resources/black/dynamic.png
deleted file mode 100644 (file)
index badb712..0000000
Binary files a/resources/black/dynamic.png and /dev/null differ
diff --git a/resources/black/fav.png b/resources/black/fav.png
deleted file mode 100644 (file)
index cd5d5b8..0000000
Binary files a/resources/black/fav.png and /dev/null differ
diff --git a/resources/black/forward.png b/resources/black/forward.png
deleted file mode 100644 (file)
index fccf7d9..0000000
Binary files a/resources/black/forward.png and /dev/null differ
diff --git a/resources/black/fullscreen.png b/resources/black/fullscreen.png
deleted file mode 100644 (file)
index cd51d5b..0000000
Binary files a/resources/black/fullscreen.png and /dev/null differ
diff --git a/resources/black/library.png b/resources/black/library.png
deleted file mode 100644 (file)
index c84ea85..0000000
Binary files a/resources/black/library.png and /dev/null differ
diff --git a/resources/black/next.png b/resources/black/next.png
deleted file mode 100644 (file)
index 10275d3..0000000
Binary files a/resources/black/next.png and /dev/null differ
diff --git a/resources/black/pause.png b/resources/black/pause.png
deleted file mode 100644 (file)
index 7a27e3d..0000000
Binary files a/resources/black/pause.png and /dev/null differ
diff --git a/resources/black/play.png b/resources/black/play.png
deleted file mode 100644 (file)
index 4d9cbf5..0000000
Binary files a/resources/black/play.png and /dev/null differ
diff --git a/resources/black/playback.png b/resources/black/playback.png
deleted file mode 100644 (file)
index d5ebe27..0000000
Binary files a/resources/black/playback.png and /dev/null differ
diff --git a/resources/black/player.png b/resources/black/player.png
deleted file mode 100644 (file)
index 2c14632..0000000
Binary files a/resources/black/player.png and /dev/null differ
diff --git a/resources/black/playlist.png b/resources/black/playlist.png
deleted file mode 100644 (file)
index 39f80b6..0000000
Binary files a/resources/black/playlist.png and /dev/null differ
diff --git a/resources/black/playlists.png b/resources/black/playlists.png
deleted file mode 100644 (file)
index 3347025..0000000
Binary files a/resources/black/playlists.png and /dev/null differ
diff --git a/resources/black/prev.png b/resources/black/prev.png
deleted file mode 100644 (file)
index b1d4e3c..0000000
Binary files a/resources/black/prev.png and /dev/null differ
diff --git a/resources/black/random_active.png b/resources/black/random_active.png
deleted file mode 100644 (file)
index aae80aa..0000000
Binary files a/resources/black/random_active.png and /dev/null differ
diff --git a/resources/black/random_inactive.png b/resources/black/random_inactive.png
deleted file mode 100644 (file)
index ea8f9ed..0000000
Binary files a/resources/black/random_inactive.png and /dev/null differ
diff --git a/resources/black/repeat_active.png b/resources/black/repeat_active.png
deleted file mode 100644 (file)
index f574f11..0000000
Binary files a/resources/black/repeat_active.png and /dev/null differ
diff --git a/resources/black/repeat_inactive.png b/resources/black/repeat_inactive.png
deleted file mode 100644 (file)
index 66e78e4..0000000
Binary files a/resources/black/repeat_inactive.png and /dev/null differ
diff --git a/resources/black/search.png b/resources/black/search.png
deleted file mode 100644 (file)
index 413387d..0000000
Binary files a/resources/black/search.png and /dev/null differ
diff --git a/resources/black/select_all.png b/resources/black/select_all.png
deleted file mode 100644 (file)
index ef60283..0000000
Binary files a/resources/black/select_all.png and /dev/null differ
diff --git a/resources/black/stop.png b/resources/black/stop.png
deleted file mode 100644 (file)
index 3d90ff5..0000000
Binary files a/resources/black/stop.png and /dev/null differ
diff --git a/resources/black/use.png b/resources/black/use.png
deleted file mode 100644 (file)
index 8a1f5ce..0000000
Binary files a/resources/black/use.png and /dev/null differ
diff --git a/resources/black/volume.png b/resources/black/volume.png
deleted file mode 100644 (file)
index 77915cf..0000000
Binary files a/resources/black/volume.png and /dev/null differ
diff --git a/resources/black/window.png b/resources/black/window.png
deleted file mode 100644 (file)
index 4540929..0000000
Binary files a/resources/black/window.png and /dev/null differ
index 2e0d132..ef6f4a5 100644 (file)
         <file>white/use.png</file>
         <file>white/volume.png</file>
         <file>white/window.png</file>
-        <file>black/add.png</file>
-        <file>black/artists.png</file>
-        <file>black/back.png</file>
-        <file>black/delete.png</file>
-        <file>black/deselect_all.png</file>
-        <file>black/dynamic.png</file>
-        <file>black/fav.png</file>
-        <file>black/forward.png</file>
-        <file>black/library.png</file>
-        <file>black/next.png</file>
-        <file>black/pause.png</file>
-        <file>black/play.png</file>
-        <file>black/playback.png</file>
-        <file>black/player.png</file>
-        <file>black/playlist.png</file>
-        <file>black/playlists.png</file>
-        <file>black/prev.png</file>
-        <file>black/random_active.png</file>
-        <file>black/random_inactive.png</file>
-        <file>black/repeat_active.png</file>
-        <file>black/repeat_inactive.png</file>
-        <file>black/search.png</file>
-        <file>black/select_all.png</file>
-        <file>black/stop.png</file>
-        <file>black/use.png</file>
-        <file>black/volume.png</file>
-        <file>black/window.png</file>
-        <file>black/fullscreen.png</file>
+        <file>white/more.png</file>
+        <file>white/unmore.png</file>
     </qresource>
 </RCC>
diff --git a/resources/white/more.png b/resources/white/more.png
new file mode 100644 (file)
index 0000000..0d2b17a
Binary files /dev/null and b/resources/white/more.png differ
diff --git a/resources/white/unmore.png b/resources/white/unmore.png
new file mode 100644 (file)
index 0000000..6b5ca1d
Binary files /dev/null and b/resources/white/unmore.png differ
index 2aae545..edadcf2 100644 (file)
@@ -121,7 +121,8 @@ SOURCES += src/main.cpp\
     src/equalizerdialog.cpp \
     src/saveplaylistdialog.cpp \
     src/settingsdialog.cpp \
-    src/dbusadaptor.cpp
+    src/dbusadaptor.cpp \
+    src/toolswidget.cpp
 
 HEADERS  += src/mainwindow.h \
                src/player/player.h \
@@ -221,7 +222,8 @@ HEADERS  += src/mainwindow.h \
     src/saveplaylistdialog.h \
     src/settingsdialog.h \
     src/abstractitemrenderer.h \
-    src/dbusadaptor.h
+    src/dbusadaptor.h \
+    src/toolswidget.h
 
 FORMS    += src/ui/mainwindow.ui \
     src/ui/playerform.ui \
@@ -232,7 +234,8 @@ FORMS    += src/ui/mainwindow.ui \
     src/ui/timerdialog.ui \
     src/ui/equalizerdialog.ui \
     src/ui/saveplaylistdialog.ui \
-    src/ui/settingsdialog.ui
+    src/ui/settingsdialog.ui \
+    src/ui/toolswidget.ui
 
 CONFIG += mobility
 MOBILITY = 
index 03e3da7..286cca1 100644 (file)
@@ -26,9 +26,6 @@ using namespace SomePlayer::Storage;
 Config::Config()
 {
        _settings = new QSettings(QString(applicationDir())+"/settings.ini", QSettings::IniFormat);
-       if (_settings->value("ui/iconstheme").toString() == "") {
-               _settings->setValue("ui/iconstheme", "white");
-       }
 }
 
 Config::~Config() {
index f583d4e..1e4cc5f 100644 (file)
@@ -204,3 +204,15 @@ void EqualizerDialog::_load_preset(QString name) {
        ui->band9Slider->setValue(config.getValue("equalizer_preset_"+name+"/band9").toInt());
        _value9_changed(ui->band9Slider->value());
 }
+
+void EqualizerDialog::landscapeMode() {
+       ui->thorizontalLayout->insertWidget(0, ui->enableToggleButton);
+       ui->thorizontalLayout->addWidget(ui->saveButton);
+       ui->bhorizontalLayout->removeItem(ui->chorizontalSpacer);
+}
+
+void EqualizerDialog::portraitMode() {
+       ui->bhorizontalLayout->insertWidget(0, ui->enableToggleButton);
+       ui->bhorizontalLayout->addItem(ui->chorizontalSpacer);
+       ui->bhorizontalLayout->addWidget(ui->saveButton);
+}
index 658e60e..e5df486 100644 (file)
@@ -41,6 +41,8 @@ public slots:
        void setValue(int, int);
        void setEqualizerEnabled(bool);
        void reloadPresets();
+       void landscapeMode();
+       void portraitMode();
 
 private slots:
        void _value0_changed(int v) { emit valueChanged(0, v);}
index bb190f1..e7e3384 100644 (file)
 #include "track.h"
 #include "playlist.h"
 #include <QTime>
+#include <QTimer>
 #include <QQueue>
 #include <QMessageBox>
 #include "config.h"
+#include <QSpacerItem>
 
 using namespace SomePlayer::DataObjects;
 using namespace SomePlayer::Storage;
@@ -72,22 +74,27 @@ LibraryForm::LibraryForm(Library *lib, QWidget *parent) :
        _lib = lib;
        _model = new QStandardItemModel(this);
        _state = STATE_NONE;
+       _tools_widget = new ToolsWidget(this);
        ui->setupUi(this);
+       ui->toolsLayout->addWidget(_tools_widget);
+       _tools_widget->hide();
        connect(ui->playerButton, SIGNAL(clicked()), this, SLOT(_player()));
        connect(ui->viewButton, SIGNAL(clicked()), this, SLOT(_view_button()));
        connect(ui->playlistsButton, SIGNAL(clicked()), this, SLOT(_playlists_button()));
        connect(ui->dynamicButton, SIGNAL(clicked()), this, SLOT(_dynamic_button()));
-       connect(ui->listView, SIGNAL(clicked(QModelIndex)), this, SLOT(_process_list_click(QModelIndex)));
+       connect(ui->listView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(_process_list_click(QModelIndex)));
        connect(ui->addButton, SIGNAL(clicked()), this, SLOT(_add_button()));
        connect(ui->selectAllButton, SIGNAL(clicked()), this, SLOT(_toggle_select_all_button()));
        connect(ui->backButton, SIGNAL(clicked()), this, SLOT(_back_button()));
        connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(_delete_button()));
        connect(ui->useButton, SIGNAL(clicked()), this, SLOT(_use_button()));
+       connect(_tools_widget, SIGNAL(search(QString)), this, SLOT(search(QString)));
+       connect(_tools_widget, SIGNAL(nextSearch()), this, SLOT(nextItem()));
+       connect(_tools_widget, SIGNAL(prevSearch()), this, SLOT(prevItem()));
+       connect(_tools_widget, SIGNAL(toggleFullscreen(bool)), this, SIGNAL(fullscreen(bool)));
+       connect(ui->moreButton, SIGNAL(clicked()), this, SLOT(_more_button()));
        _view_button();
-       Config config;
-       _icons_theme = config.getValue("ui/iconstheme").toString();
        _current_playlist_changed = true;
-       setAttribute(Qt::WA_Maemo5StackedWindow);
 }
 
 LibraryForm::~LibraryForm()
@@ -107,18 +114,24 @@ void LibraryForm::_view_button() {
        __fill_model(_model, artitst);
        ui->listView->setModel(_model);
        _state = STATE_ARTIST;
-       ui->backButton->hide();
+       ui->backButton->setEnabled(false);
        ui->listLabel->setText("Artists");
-       ui->addButton->show();
-       ui->deleteButton->hide();
-       ui->useButton->hide();
+       ui->addButton->setEnabled(true);
+       ui->addButton->setIcon(QIcon(":/icons/white/add.png"));
+       ui->deleteButton->setEnabled(false);
+       ui->deleteButton->setIcon(QIcon());
+       ui->useButton->setEnabled(false);
+       ui->useButton->setIcon(QIcon());
 }
 
 void LibraryForm::_dynamic_button() {
-       ui->useButton->hide();
-       ui->backButton->hide();
-       ui->addButton->show();
-       ui->deleteButton->hide();
+       ui->useButton->setEnabled(false);
+       ui->useButton->setIcon(QIcon());
+       ui->backButton->setEnabled(false);
+       ui->addButton->setEnabled(true);
+       ui->addButton->setIcon(QIcon(":/icons/white/add.png"));
+       ui->deleteButton->setEnabled(false);
+       ui->deleteButton->setIcon(QIcon());
        _model->clear();
        _model->setRowCount(4);
        _model->setItem(0, new QStandardItem("Favorites"));
@@ -138,7 +151,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                ui->listView->scrollToTop();
                _current_artist = data;
                _state = STATE_ALBUM;
-               ui->backButton->show();
+               ui->backButton->setEnabled(true);
                ui->listLabel->setText(QString("Albums by \"%1\"").arg(_current_artist));
                break;
        case STATE_ALBUM:
@@ -147,7 +160,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                __fill_model_tracks(_model, _current_tracks);
                ui->listView->scrollToTop();
                _state = STATE_TRACK;
-               ui->backButton->show();
+               ui->backButton->setEnabled(true);
                ui->listLabel->setText(QString("Tracks from \"%1\" by \"%2\"").arg(_current_album).arg(_current_artist));
                break;
        case STATE_PLAYLIST:
@@ -157,9 +170,11 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                        __fill_model_tracks(_model, _current_tracks);
                        ui->listView->scrollToTop();
                        _state = STATE_PLAYLIST_TRACK;
-                       ui->backButton->show();
-                       ui->deleteButton->show();
-                       ui->useButton->show();
+                       ui->backButton->setEnabled(true);
+                       ui->deleteButton->setEnabled(true);
+                       ui->deleteButton->setIcon(QIcon(":/icons/white/delete.png"));
+                       ui->useButton->setEnabled(true);
+                       ui->useButton->setIcon(QIcon(":/icons/white/use.png"));
                        ui->listLabel->setText(QString("Tracks in playlist \"%1\"").arg(data));
                }
                break;
@@ -184,14 +199,17 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                        __fill_model_tracks(_model, _current_tracks);
                        ui->listView->scrollToTop();
                        _state = STATE_PLAYLIST_TRACK;
-                       ui->backButton->show();
-                       ui->useButton->show();
-                       ui->addButton->show();
+                       ui->backButton->setEnabled(true);
+                       ui->useButton->setEnabled(true);
+                       ui->useButton->setIcon(QIcon(":/icons/white/use.png"));
+                       ui->addButton->setEnabled(true);
+                       ui->addButton->setIcon(QIcon(":/icons/white/add.png"));
                        ui->listLabel->setText(_current_playlist.name());
                }
        default:
                return;
        }
+       QTimer::singleShot(100, ui->listView, SLOT(clearSelection())); // workaround
 }
 
 void LibraryForm::_add_button() {
@@ -287,11 +305,14 @@ void LibraryForm::_playlists_button() {
        __fill_model(_model, playlists);
        ui->listView->setModel(_model);
        _state = STATE_PLAYLIST;
-       ui->backButton->hide();
+       ui->backButton->setEnabled(false);
        ui->listLabel->setText("Playlists");
-       ui->addButton->hide();
-       ui->deleteButton->show();
-       ui->useButton->hide();
+       ui->addButton->setEnabled(false);
+       ui->addButton->setIcon(QIcon());
+       ui->deleteButton->setEnabled(true);
+       ui->deleteButton->setIcon(QIcon(":/icons/white/delete.png"));
+       ui->useButton->setEnabled(false);
+       ui->useButton->setIcon(QIcon());
 }
 
 void LibraryForm::_delete_button() {
@@ -309,6 +330,7 @@ void LibraryForm::_delete_button() {
                }
                _current_tracks = _current_playlist.tracks();
                _lib->savePlaylist(_current_playlist);
+               _current_playlist_changed = true;
                __fill_model_tracks(_model, _current_tracks);
        } else if (_state == STATE_PLAYLIST) {
                QModelIndexList selected = ui->listView->selectionModel()->selectedIndexes();
@@ -341,7 +363,7 @@ void LibraryForm::_use_button() {
        _current_playlist = _lib->getCurrentPlaylist();
 }
 
-void LibraryForm::search(QString &pattern) {
+void LibraryForm::search(QString pattern) {
        _search_pattern = pattern;
        _search_current_id = -1;
        nextItem();
@@ -413,26 +435,26 @@ void LibraryForm::refresh() {
 void LibraryForm::_toggle_select_all_button() {
        if (ui->listView->selectionModel()->selectedIndexes().count() == ui->listView->model()->rowCount()) {
                ui->listView->selectionModel()->clearSelection();
-               ui->selectAllButton->setIcon(QIcon(":/icons/"+_icons_theme+"/select_all.png"));
+               ui->selectAllButton->setIcon(QIcon(":/icons/white/select_all.png"));
        } else {
                ui->listView->selectAll();
-               ui->selectAllButton->setIcon(QIcon(":/icons/"+_icons_theme+"/deselect_all.png"));
+               ui->selectAllButton->setIcon(QIcon(":/icons/white/deselect_all.png"));
        }
 }
 
-void LibraryForm::updateIcons() {
-       Config config;
-       _icons_theme = config.getValue("ui/iconstheme").toString();
-       ui->backButton->setIcon(QIcon(":/icons/"+_icons_theme+"/back.png"));
-       if (ui->listView->selectionModel()->selectedIndexes().count() == ui->listView->model()->rowCount())
-               ui->selectAllButton->setIcon(QIcon(":/icons/"+_icons_theme+"/deselect_all.png"));
-       else
-               ui->selectAllButton->setIcon(QIcon(":/icons/"+_icons_theme+"/select_all.png"));
-       ui->addButton->setIcon(QIcon(":/icons/"+_icons_theme+"/add.png"));
-       ui->deleteButton->setIcon(QIcon(":/icons/"+_icons_theme+"/delete.png"));
-       ui->useButton->setIcon(QIcon(":/icons/"+_icons_theme+"/use.png"));
-       ui->playerButton->setIcon(QIcon(":/icons/"+_icons_theme+"/player.png"));
-       ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/artists.png"));
-       ui->dynamicButton->setIcon(QIcon(":/icons/"+_icons_theme+"/dynamic.png"));
-       ui->playlistsButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playlists.png"));
+void LibraryForm::landscapeMode() {
+}
+
+void LibraryForm::portraitMode() {
+}
+
+void LibraryForm::_more_button() {
+       if (_tools_widget->isVisible()) {
+               ui->moreButton->setIcon(QIcon(":/icons/white/more.png"));
+               _tools_widget->hide();
+               cancelSearch();
+       } else {
+               ui->moreButton->setIcon(QIcon(":/icons/white/unmore.png"));
+               _tools_widget->show();
+       }
 }
index 6753c9f..4f8e25b 100644 (file)
@@ -27,6 +27,7 @@
 #include <QStandardItem>
 #include <QModelIndex>
 #include "playlist.h"
+#include "toolswidget.h"
 
 namespace Ui {
     class LibraryForm;
@@ -49,13 +50,15 @@ signals:
        void player(bool);
        void busy(QString);
        void done();
+       void fullscreen(bool);
 public slots:
-       void search(QString &);
+       void search(QString);
        void nextItem();
        void prevItem();
        void cancelSearch();
        void refresh();
-       void updateIcons();
+       void landscapeMode();
+       void portraitMode();
 private slots:
        void _player();
        void _view_button();
@@ -67,9 +70,10 @@ private slots:
        void _back_button();
        void _use_button();
        void _process_list_click(QModelIndex);
+       void _more_button();
 
 private:
-    Ui::LibraryForm *ui;
+       Ui::LibraryForm *ui;
        Library *_lib;
        QStandardItemModel *_model;
        LibraryFormListState _state;
@@ -80,13 +84,13 @@ private:
        QString _search_pattern;
        int _search_current_id;
        bool _current_playlist_changed;
+       ToolsWidget *_tools_widget;
 
        void _add_artist(QString artist);
        void _add_album(QString artist, QString album);
        void _add_track(Track track);
        void _add_playlist(QString name);
        void _delete_track(Track track);
-       QString _icons_theme;
 };
 
 #endif // LIBRARYFORM_H
index 84fb50f..2d46863 100644 (file)
@@ -25,7 +25,8 @@ int main(int argc, char *argv[])
        QApplication a(argc, argv);
        a.setApplicationName("ru.somebody.someplayer");
        MainWindow w;
-
+       w.setAttribute(Qt::WA_Maemo5StackedWindow);
+       w.setWindowFlags(w.windowFlags() | Qt::Window);
 
 #if defined(Q_WS_S60)
        w.showMaximized();
index f704c25..f962a56 100644 (file)
@@ -41,7 +41,6 @@ MainWindow::MainWindow(QWidget *parent) :
        ui(new Ui::MainWindow)
 {
        Config config;
-       _icons_theme = config.getValue("ui/iconstheme").toString();
        _library = new Library(config.applicationDir(), config.applicationDir());
        ui->setupUi(this);
        connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()));
@@ -75,24 +74,32 @@ MainWindow::MainWindow(QWidget *parent) :
        connect(_library, SIGNAL(trackAdded()), _busy_widget, SLOT(tick()));
        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()));
-       connect(ui->fscreenButton, SIGNAL(clicked()), this, SLOT(_toggle_full_screen()));
        connect(_timer, SIGNAL(timeout()), this, SLOT(_timeout()));
        connect(_equalizer_dialog, SIGNAL(valueChanged(int,int)), this, SLOT(_equalizer_value_changed(int, int)));
        connect(_equalizer_dialog, SIGNAL(equalizerEnabled()), _player_form, SLOT(enableEqualizer()));
        connect(_equalizer_dialog, SIGNAL(equalizerDisabled()), _player_form, SLOT(disableEqualizer()));
        connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(_orientation_changed()));
-       updateIcons();
-       _library_form->updateIcons();
-       _player_form->updateIcons();
-       hideSearchPanel();
+       connect(_player_form, SIGNAL(fullscreen(bool)), this, SLOT(_fullscreen(bool)));
+       connect(_library_form, SIGNAL(fullscreen(bool)), this, SLOT(_fullscreen(bool)));
        _player_form->reload(true);
        library();
+       QString mode = config.getValue("ui/orientation").toString();
+       if (mode == "landscape") {
+               setAttribute(Qt::WA_Maemo5LandscapeOrientation);
+               _player_form->landscapeMode();
+               _library_form->landscapeMode();
+               _equalizer_dialog->landscapeMode();
+       } else if (mode == "portrait") {
+               setAttribute(Qt::WA_Maemo5PortraitOrientation);
+               _player_form->portraitMode();
+               _library_form->portraitMode();
+               _equalizer_dialog->portraitMode();
+       } else if (mode == "auto") { // initialization in landscape
+               _player_form->landscapeMode();
+               _library_form->landscapeMode();
+               _equalizer_dialog->landscapeMode();
+               setAttribute(Qt::WA_Maemo5AutoOrientation);
+       }
 }
 
 MainWindow::~MainWindow()
@@ -109,19 +116,17 @@ void MainWindow::about() {
 }
 
 void MainWindow::player(bool reread) {
-       Config config;
-       setAttribute(Qt::WA_Maemo5AutoOrientation, config.getValue("ui/portraitmode").toString() != "disabled");
        ui->stackedWidget->setCurrentIndex(0);
        _player_form->reload(reread);
        setWindowTitle("SomePlayer");
+       _orientation_changed(); // workaround
 }
 
 void MainWindow::library() {
-       setAttribute(Qt::WA_Maemo5AutoOrientation, false);
        ui->menuBar->setEnabled(true);
        ui->stackedWidget->setCurrentIndex(1);
-       showSearchPanel();
        setWindowTitle("SomePlayer Library");
+       _orientation_changed(); // workaround
 }
 
 void MainWindow::_add_directory() {
@@ -175,80 +180,9 @@ void MainWindow::_clear_current_playlist() {
 void MainWindow::showBusyWidget(QString caption) {
        _busy_widget->setText(caption);
        ui->menuBar->setEnabled(false);
-       hideSearchPanel();
        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();
-               ui->searchLine->setFocus(Qt::MouseFocusReason);
-       }
-}
-
-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);
-       } else if (ui->stackedWidget->currentIndex() == 1) { // library
-               _library_form->search(pattern);
-       }
-}
-
-void MainWindow::_nextItem() {
-       if (ui->stackedWidget->currentIndex() == 0) { // player
-               _player_form->nextItem();
-       } else if (ui->stackedWidget->currentIndex() == 1) { // library
-               _library_form->nextItem();
-       }
-}
-
-void MainWindow::_prevItem() {
-       if (ui->stackedWidget->currentIndex() == 0) { // player
-               _player_form->prevItem();
-       } else if (ui->stackedWidget->currentIndex() == 1) { // library
-               _library_form->prevItem();
-       }
-}
-
-void MainWindow::_cancelSearch() {
-       if (ui->stackedWidget->currentIndex() == 0) { // player
-               _player_form->cancelSearch();
-       } else if (ui->stackedWidget->currentIndex() == 1) { // library
-               _library_form->cancelSearch();
-       }
-}
-
-void MainWindow::_toggle_full_screen() {
-       if (isFullScreen()) {
-               ui->fscreenButton->setIcon(QIcon(":/icons/"+_icons_theme+"/fullscreen.png"));
-               showNormal();
-       } else {
-               ui->fscreenButton->setIcon(QIcon(":/icons/"+_icons_theme+"/window.png"));
-               showFullScreen();
-       }
-}
-
 void MainWindow::_add_files() {
        QStringList files = QFileDialog::getOpenFileNames(this, "Add file");
        if (!files.isEmpty()) _player_form->addFiles(files);
@@ -304,33 +238,32 @@ void MainWindow::_equalizer_value_changed(int band, int val) {
 void MainWindow::settings() {
        SettingsDialog dialog;
        dialog.exec();
-       updateIcons();
        Config config;
-       _player_form->updateIcons();
-       _library_form->updateIcons();
        _library_form->refresh();
-       if (ui->stackedWidget->currentIndex() == 0) { // player view
-               setAttribute(Qt::WA_Maemo5AutoOrientation, config.getValue("ui/portraitmode").toString() != "disabled");
+       QString mode = config.getValue("ui/orientation").toString();
+       if (mode == "landscape") {
+               setAttribute(Qt::WA_Maemo5LandscapeOrientation);
+       } else if (mode == "portrait") {
+               setAttribute(Qt::WA_Maemo5PortraitOrientation);
+       } else if (mode == "auto") {
+               setAttribute(Qt::WA_Maemo5AutoOrientation);
        }
 }
 
-void MainWindow::updateIcons() {
-       Config config;
-       _icons_theme = config.getValue("ui/iconstheme").toString();
-       ui->fscreenButton->setIcon(QIcon(":/icons/"+_icons_theme+"/fullscreen.png"));
-       ui->prevButton->setIcon(QIcon(":/icons/"+_icons_theme+"/back.png"));
-       ui->nextButton->setIcon(QIcon(":/icons/"+_icons_theme+"/forward.png"));
-       ui->searchButton->setIcon(QIcon(":/icons/"+_icons_theme+"/search.png"));
-
-}
-
 void MainWindow::_orientation_changed() {
        QRect screenGeometry = QApplication::desktop()->screenGeometry();
        if (screenGeometry.width() > screenGeometry.height()) {
                _player_form->landscapeMode();
-               ui->toolsWidget->setVisible(true);
+               _library_form->landscapeMode();
+               _equalizer_dialog->landscapeMode();
        } else {
                _player_form->portraitMode();
-               ui->toolsWidget->setVisible(false);
+               _library_form->portraitMode();
+               _equalizer_dialog->portraitMode();
        }
 }
+
+void MainWindow::_fullscreen(bool f) {
+       if (f) showFullScreen();
+       else showNormal();
+}
index 3a59d25..7fc05dd 100644 (file)
@@ -56,25 +56,17 @@ public slots:
        void library();
        void settings();
        void showBusyWidget(QString);
-       void showSearchPanel();
-       void hideSearchPanel();
-       void updateIcons();
 private slots:
        void _add_directory();
        void _save_playlist();
        void _clear_current_playlist();
        void _add_files();
-       void _toggle_search_line();
-       void _search(QString);
-       void _nextItem();
-       void _prevItem();
-       void _cancelSearch();
-       void _toggle_full_screen();
        void _set_timer();
        void _timeout();
        void _equalizer();
        void _equalizer_value_changed(int, int);
        void _orientation_changed();
+       void _fullscreen(bool);
 private:
        PlayerForm *_player_form;
        LibraryForm *_library_form;
@@ -82,8 +74,6 @@ private:
        Library *_library;
        QTimer *_timer;
        EqualizerDialog *_equalizer_dialog;
-
-       QString _icons_theme;
 };
 
 #endif // MAINWINDOW_H
index 80fc64e..e34b2cd 100644 (file)
@@ -278,6 +278,8 @@ void Player::enableEqualizer() {
                return;
        _equalizer_enabled = true;
        _path.insertEffect(_equalizer);
+       if (_state == PLAYER_PAUSED)
+               pause();
        Config config;
        config.setValue("equalizer/equalizer", "enabled");
 }
index 3bf359c..3c5f3dd 100644 (file)
@@ -27,6 +27,7 @@
 #include <QResource>
 #include "playlistdialog.h"
 #include "edittagsdialog.h"
+#include <QSpacerItem>
 #include "config.h"
 
 using namespace SomePlayer::DataObjects;
@@ -38,9 +39,11 @@ inline void __fill_list(QStandardItemModel *_model, Playlist playlist) {
        QList<Track> tracks = playlist.tracks();
        int count = tracks.count();
        _model->setRowCount(count);
+       QTime time;
        for (int i = 0; i < count; i++) {
                TrackMetadata meta = tracks.at(i).metadata();
-               QString t = meta.title()+"#_#"+meta.artist()+"#_#"+meta.album();
+               time.setHMS(0, meta.length()/60, meta.length() % 60);
+               QString t = meta.title()+"#_#"+meta.artist()+"#_#"+meta.album()+"#_#"+time.toString("mm:ss");
                _model->setItem(i, 0, new QStandardItem(t));
        }
 }
@@ -52,26 +55,25 @@ PlayerForm::PlayerForm(Library* lib, QWidget *parent) :
        _lib = lib;
        _player = new Player(this);
        _time = new QTime();
-       Config config;
-       _icons_theme = config.getValue("ui/iconstheme").toString();
        ui->setupUi(this);
        if (_player->random()) {
-               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_active.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/white/random_active.png"));
        } else {
-               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_inactive.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/white/random_inactive.png"));
        }
        if (_player->repeat()) {
-               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_active.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/white/repeat_active.png"));
        } else {
-               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_inactive.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/white/repeat_inactive.png"));
        }
        ui->volumeSlider->setMinimum(0);
        ui->volumeSlider->setMaximum(100);
        ui->volumeSlider->hide();
-       _seek_slider = new QSlider(Qt::Horizontal);
-       _seek_slider->setEnabled(false);
-       ui->progressLayout->insertWidget(1, _seek_slider);
-       _seek_slider->setTracking(false);
+       ui->seekSlider->setEnabled(false);
+       ui->progressLayout->removeItem(ui->seekSpacer);
+       _tools_widget = new ToolsWidget(this);
+       ui->toolsLayout->insertWidget(0, _tools_widget);
+       _tools_widget->hide();
        _model = new QStandardItemModel(0, 2, this);
        ui->playlistView->setModel(_model);
        _context_menu = new QMenu(ui->playlistView);
@@ -82,30 +84,26 @@ PlayerForm::PlayerForm(Library* lib, QWidget *parent) :
        QAction *edit_tags = _context_menu->addAction("Edit tags");
 
        _track_renderer = new TrackRenderer(this);
+       _track_renderer->setActiveRow(-1);
+       _track_renderer->setSearchRow(-1);
        ui->playlistView->setItemDelegateForColumn(0, _track_renderer);
 
        _tag_resolver = new TagResolver(this);
 
        connect(ui->libraryButton, SIGNAL(clicked()), this, SLOT(_library()));
        connect(ui->viewButton, SIGNAL(clicked()), this, SLOT(_toggle_view()));
-       connect(ui->aViewButton, SIGNAL(clicked()), this, SLOT(_toggle_view()));
        connect(ui->playlistView, SIGNAL(clicked(QModelIndex)), this, SLOT(_process_click(QModelIndex)));
        connect(ui->playpauseButton, SIGNAL(clicked()), _player, SLOT(toggle()));
-       connect(ui->aPlayPauseButton, SIGNAL(clicked()), _player, SLOT(toggle()));
-       connect(ui->stopButton, SIGNAL(clicked()), _player, SLOT(stop()));
-       connect(ui->aStopButton, SIGNAL(clicked()), _player, SLOT(stop()));
        connect(ui->nextButton, SIGNAL(clicked()), _player, SLOT(next()));
-       connect(ui->aNextButton, SIGNAL(clicked()), _player, SLOT(next()));
+       connect(ui->stopButton, SIGNAL(clicked()), _player, SLOT(stop()));
        connect(ui->prevButton, SIGNAL(clicked()), _player, SLOT(prev()));
-       connect(ui->aPrevButton, 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()), this, SLOT(_toggle_random()));
        connect(ui->repeatButton, SIGNAL(clicked()), this, SLOT(_toggle_repeat()));
-       connect(_seek_slider, SIGNAL(sliderMoved(int)), _player, SLOT(seek(int)));
-       //connect(_seek_slider, SIGNAL(sliderReleased()), this, SLOT(_slider_released()));
+       connect(ui->seekSlider, SIGNAL(sliderMoved(int)), _player, SLOT(seek(int)));
        connect(ui->volumeSlider, SIGNAL(sliderMoved(int)), _player, SLOT(setVolume(int)));
-       connect(ui->playlistView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(_custom_context_venu_requested(QPoint)));
+       connect(ui->playlistView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(_custom_context_menu_requested(QPoint)));
        connect(delete_action, SIGNAL(triggered()), this, SLOT(_delete_track()));
        connect(enqueue_action, SIGNAL(triggered()), this, SLOT(_enqueue_track()));
        connect(add_to_favorites, SIGNAL(triggered()), this, SLOT(_add_to_favorites()));
@@ -115,8 +113,11 @@ PlayerForm::PlayerForm(Library* lib, QWidget *parent) :
        connect(_player, SIGNAL(trackDone(Track)), _lib, SLOT(updateTrackCount(Track)));
        connect(_tag_resolver, SIGNAL(decoded(Track)), this, SLOT(_track_decoded(Track)));
        connect(ui->volumeButton, SIGNAL(clicked()), this, SLOT(_toggle_volume()));
-       ui->topWidget->setVisible(false);
-       setAttribute(Qt::WA_Maemo5StackedWindow);
+       connect(ui->moreButton, SIGNAL(clicked()), this, SLOT(_tools_widget_toggle()));
+       connect(_tools_widget, SIGNAL(search(QString)), this, SLOT(search(QString)));
+       connect(_tools_widget, SIGNAL(nextSearch()), this, SLOT(nextItem()));
+       connect(_tools_widget, SIGNAL(prevSearch()), this, SLOT(prevItem()));
+       connect(_tools_widget, SIGNAL(toggleFullscreen(bool)), this, SIGNAL(fullscreen(bool)));
 
        // dbus
        _dbusadaptor = new DBusAdaptop(_player);
@@ -135,9 +136,6 @@ void PlayerForm::_library() {
 }
 
 void PlayerForm::reload(bool reread) {
-       if (ui->stackedWidget->currentIndex() == 1) {
-               emit hideSearchPanel();
-       }
        if (reread) {
                _current_playlist = _lib->getCurrentPlaylist();
                _player->setPlaylist(_current_playlist);
@@ -149,13 +147,11 @@ void PlayerForm::_toggle_view() {
        int index = ui->stackedWidget->currentIndex();
        index = (!index % 2);
        if (index) {
-               ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playlist.png"));
-               ui->aViewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playlist.png"));
-               emit hideSearchPanel();
+               ui->viewButton->setIcon(QIcon(":/icons/white/playlist.png"));
+               ui->moreButton->setEnabled(false);
        } else {
-               ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playback.png"));
-               ui->aViewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playback.png"));
-               emit showSearchPanel();
+               ui->viewButton->setIcon(QIcon(":/icons/white/playback.png"));
+               ui->moreButton->setEnabled(true);
        }
        ui->stackedWidget->setCurrentIndex(index);
 }
@@ -189,8 +185,8 @@ void PlayerForm::_display_track(Track track) {
        ui->artistAlbumLabel->setText(QString("<b>%1</b><br/>%2").
                                                                  arg(track.metadata().artist()).
                                                                  arg(track.metadata().album()));
-       _seek_slider->setMinimum(0);
-       _seek_slider->setMaximum(track.metadata().length());
+       ui->seekSlider->setMinimum(0);
+       ui->seekSlider->setMaximum(track.metadata().length());
        _tick(0, track.metadata().length());
 }
 
@@ -199,14 +195,14 @@ void PlayerForm::_tick(int done, int all) {
        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);
+       ui->seekSlider->setValue(done);
 }
 
 void PlayerForm::_slider_released() {
-       _player->seek(_seek_slider->value());
+       _player->seek(ui->seekSlider->value());
 }
 
-void PlayerForm::_custom_context_venu_requested(const QPoint &pos) {
+void PlayerForm::_custom_context_menu_requested(const QPoint &pos) {
        _context_menu->exec(pos);
 }
 
@@ -238,39 +234,37 @@ void PlayerForm::_add_to_favorites() {
 
 void PlayerForm::_state_changed(PlayerState state) {
        if (state == PLAYER_PLAYING) {
-               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/pause.png"));
-               ui->aPlayPauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/pause.png"));
-               _seek_slider->setEnabled(true);
+               ui->playpauseButton->setIcon(QIcon(":/icons/white/pause.png"));
+               ui->seekSlider->setEnabled(true);
        } else {
                if (state == PLAYER_STOPPED) {
-                       _seek_slider->setValue(0);
+                       ui->seekSlider->setValue(0);
                        ui->doneTimeLabel->setText("00:00");
-                       _seek_slider->setEnabled(false);
+                       ui->seekSlider->setEnabled(false);
                }
-               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/play.png"));
-               ui->aPlayPauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/play.png"));
+               ui->playpauseButton->setIcon(QIcon(":/icons/white/play.png"));
        }
 }
 
 void PlayerForm::_toggle_random() {
        _player->toggleRandom();
        if (_player->random()) {
-               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_active.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/white/random_active.png"));
        } else {
-               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_inactive.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/white/random_inactive.png"));
        }
 }
 
 void PlayerForm::_toggle_repeat() {
        _player->toggleRepeat();
        if (_player->repeat()) {
-               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_active.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/white/repeat_active.png"));
        } else {
-               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_inactive.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/white/repeat_inactive.png"));
        }
 }
 
-void PlayerForm::search(QString &pattern) {
+void PlayerForm::search(QString pattern) {
        _search_pattern = pattern;
        _search_current_id = -1;
        nextItem();
@@ -375,47 +369,25 @@ void PlayerForm::_volume_changed() {
        _player->setVolume(value);
 }
 
-void PlayerForm::updateIcons() {
-       Config config;
-       _icons_theme = config.getValue("ui/iconstheme").toString();
-       ui->libraryButton->setIcon(QIcon(":/icons/"+_icons_theme+"/library.png"));
-       if (ui->stackedWidget->currentIndex()) {
-               ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playlist.png"));
-               ui->aViewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playlist.png"));
-       } else {
-               ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playback.png"));
-       }
-       if (_player->random())
-               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_active.png"));
-       else
-               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_inactive.png"));
-       if (_player->repeat())
-               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_active.png"));
-       else
-               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_inactive.png"));
-       ui->prevButton->setIcon(QIcon(":/icons/"+_icons_theme+"/prev.png"));
-       ui->aPrevButton->setIcon(QIcon(":/icons/"+_icons_theme+"/prev.png"));
-       if (_player->state() == PLAYER_PLAYING) {
-               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/pause.png"));
-               ui->aPlayPauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/pause.png"));
-       } else {
-               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/play.png"));
-               ui->aPlayPauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/play.png"));
-       }
-       ui->stopButton->setIcon(QIcon(":/icons/"+_icons_theme+"/stop.png"));
-       ui->aStopButton->setIcon(QIcon(":/icons/"+_icons_theme+"/stop.png"));
-       ui->nextButton->setIcon(QIcon(":/icons/"+_icons_theme+"/next.png"));
-       ui->aNextButton->setIcon(QIcon(":/icons/"+_icons_theme+"/next.png"));
-       ui->volumeButton->setIcon(QIcon(":/icons/"+_icons_theme+"/volume.png"));
-}
-
 void PlayerForm::landscapeMode() {
-       ui->bottomWidget->setVisible(true);
-       ui->topWidget->setVisible(false);
+       ui->progressLayout->removeItem(ui->seekSpacer);
+       ui->progressLayout->insertWidget(1, ui->seekSlider);
+       ui->progressWidget->setVisible(false);
 }
 
 void PlayerForm::portraitMode() {
-       ui->bottomWidget->setVisible(false);
-       ui->volumeSlider->setVisible(false);
-       ui->topWidget->setVisible(true);
+       ui->progressLayout->insertSpacerItem(1, ui->seekSpacer);
+       ui->progressWidget->layout()->addWidget(ui->seekSlider);
+       ui->progressWidget->setVisible(true);
+}
+
+void PlayerForm::_tools_widget_toggle() {
+       if (_tools_widget->isVisible()) {
+               ui->moreButton->setIcon(QIcon(":/icons/white/more.png"));
+               _tools_widget->hide();
+               cancelSearch();
+       } else {
+               ui->moreButton->setIcon(QIcon(":/icons/white/unmore.png"));
+               _tools_widget->show();
+       }
 }
index 59a3299..648acf7 100644 (file)
@@ -31,6 +31,7 @@
 #include "trackrenderer.h"
 #include "tagresolver.h"
 #include "dbusadaptor.h"
+#include "toolswidget.h"
 
 namespace Ui {
     class PlayerForm;
@@ -55,12 +56,11 @@ public:
 
 signals:
        void library();
-       void showSearchPanel();
-       void hideSearchPanel();
+       void fullscreen(bool);
 
 public slots:
        void reload(bool);
-       void search(QString &);
+       void search(QString);
        void nextItem();
        void prevItem();
        void cancelSearch();
@@ -70,7 +70,6 @@ public slots:
        void equalizerValue(int band, double *value) { _player->equalizerValue(band, value); }
        void enableEqualizer() { _player->enableEqualizer(); }
        void disableEqualizer() { _player->disableEqualizer(); }
-       void updateIcons();
        void portraitMode();
        void landscapeMode();
 
@@ -81,7 +80,7 @@ private slots:
        void _track_changed(Track);
        void _tick(int, int);
        void _slider_released();
-       void _custom_context_venu_requested ( const QPoint & pos );
+       void _custom_context_menu_requested ( const QPoint & pos );
        void _delete_track();
        void _enqueue_track();
        void _add_to_favorites();
@@ -93,6 +92,7 @@ private slots:
        void _toggle_volume();
        void _track_decoded(Track);
        void _volume_changed();
+       void _tools_widget_toggle();
 
 private:
     Ui::PlayerForm *ui;
@@ -104,13 +104,13 @@ private:
        QSlider *_seek_slider;
        QMenu *_context_menu;
        QString _search_pattern;
+       ToolsWidget *_tools_widget;
 
        TrackRenderer *_track_renderer;
        TagResolver *_tag_resolver;
        void _display_track(Track);
        int _search_current_id;
 
-       QString _icons_theme;
        DBusAdaptop *_dbusadaptor;
 };
 
index 63bf2e5..d01ff1c 100644 (file)
@@ -29,34 +29,30 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
 {
        ui->setupUi(this);
        Config config;
-       QString iconsTheme = config.getValue("ui/iconstheme").toString();
        QString albumSorting = config.getValue("ui/albumsorting").toString();
        QString showTrackLenght = config.getValue("ui/showtracklenght").toString();
-       QString portraitEnabled = config.getValue("ui/portraitmode").toString();
-       ui->iconsWButton->setChecked(true);             // "white" by default
+       QString orientation = config.getValue("ui/orientation").toString();
        ui->albumsSortAButton->setChecked(true);        // defaule sorting
        ui->showTrackLenghtYButton->setChecked(true);   // show by default
-       ui->portraitEnableButton->setChecked(true);     // enabled by default
-       if (iconsTheme == "black") {
-               ui->iconsBButton->setChecked(true);
-       }
+       ui->orientationLButton->setChecked(true);
        if (albumSorting == "date") {
                ui->albumsSortDButton->setChecked(true);
        }
        if (showTrackLenght == "no") {
                ui->showTrackLenghtNButton->setChecked(true);
        }
-       if (portraitEnabled == "disabled") {
-               ui->portraitDisableButton->setChecked(true);
+       if (orientation == "portrait") {
+               ui->orientationPButton->setChecked(true);
+       } else if (orientation == "auty") {
+               ui->orientationAButton->setChecked(true);
        }
-       connect (ui->iconsBButton, SIGNAL(toggled(bool)), this, SLOT(_set_icons_black(bool)));
-       connect (ui->iconsWButton, SIGNAL(toggled(bool)), this, SLOT(_set_icons_white(bool)));
        connect (ui->albumsSortAButton, SIGNAL(toggled(bool)), this, SLOT(_set_album_sorting_alphabet(bool)));
        connect (ui->albumsSortDButton, SIGNAL(toggled(bool)), this, SLOT(_set_album_sorting_date(bool)));
        connect (ui->showTrackLenghtNButton, SIGNAL(toggled(bool)), this, SLOT(_set_track_lenght_show_no(bool)));
        connect (ui->showTrackLenghtYButton, SIGNAL(toggled(bool)), this, SLOT(_set_track_lenght_show_yes(bool)));
-       connect (ui->portraitDisableButton, SIGNAL(toggled(bool)), this, SLOT(_set_portrait_disabled(bool)));
-       connect (ui->portraitEnableButton, SIGNAL(toggled(bool)), this, SLOT(_set_portrait_enabled(bool)));
+       connect (ui->orientationAButton, SIGNAL(toggled(bool)), this, SLOT(_set_orientation_auto(bool)));
+       connect (ui->orientationLButton, SIGNAL(toggled(bool)), this, SLOT(_set_orientation_landscape(bool)));
+       connect (ui->orientationPButton, SIGNAL(toggled(bool)), this, SLOT(_set_orientation_portrait(bool)));
 
        // disabled to 1.4.0
        ui->albumSortingGroupBox->setVisible(false);
@@ -67,18 +63,6 @@ SettingsDialog::~SettingsDialog()
        delete ui;
 }
 
-void SettingsDialog::_set_icons_black(bool checked) {
-       if (!checked) return;
-       Config config;
-       config.setValue("ui/iconstheme", "black");
-}
-
-void SettingsDialog::_set_icons_white(bool checked) {
-       if (!checked) return;
-       Config config;
-       config.setValue("ui/iconstheme", "white");
-}
-
 void SettingsDialog::_set_album_sorting_date(bool checked) {
        if (!checked) return;
        Config config;
@@ -103,14 +87,21 @@ void SettingsDialog::_set_track_lenght_show_yes(bool checked) {
        config.setValue("ui/showtracklenght", "yes");
 }
 
-void SettingsDialog::_set_portrait_disabled(bool checked) {
+void SettingsDialog::_set_orientation_auto(bool checked) {
        if (!checked) return;
        Config config;
-       config.setValue("ui/portraitmode", "disabled");
+       config.setValue("ui/orientation", "auto");
 }
 
-void SettingsDialog::_set_portrait_enabled(bool checked) {
+void SettingsDialog::_set_orientation_landscape(bool checked) {
        if (!checked) return;
        Config config;
-       config.setValue("ui/portraitmode", "enabled");
+       config.setValue("ui/orientation", "landscape");
 }
+
+void SettingsDialog::_set_orientation_portrait(bool checked) {
+       if (!checked) return;
+       Config config;
+       config.setValue("ui/orientation", "portrait");
+}
+
index 272baed..fe0ed3c 100644 (file)
@@ -39,14 +39,13 @@ private:
        Ui::SettingsDialog *ui;
 
 private slots:
-       void _set_icons_white(bool);
-       void _set_icons_black(bool);
        void _set_album_sorting_alphabet(bool);
        void _set_album_sorting_date(bool);
        void _set_track_lenght_show_yes(bool);
        void _set_track_lenght_show_no(bool);
-       void _set_portrait_enabled(bool);
-       void _set_portrait_disabled(bool);
+       void _set_orientation_auto(bool);
+       void _set_orientation_portrait(bool);
+       void _set_orientation_landscape(bool);
 };
 
 #endif // SETTINGSDIALOG_H
index 159797a..4b621d2 100644 (file)
@@ -47,7 +47,7 @@ namespace SomePlayer {
 #include "config.h"
 
 #define _DYNAMIC_PLAYLIST_MAX_COUNT_ 50
-#define _SOMEPLAYER_VERSION_ "1.3.3"
+#define _SOMEPLAYER_VERSION_ "1.3.5"
 #define NDEBUG
 
 #define _SERVICE_NAME_ "ru.somebody.someplayer"
diff --git a/src/toolswidget.cpp b/src/toolswidget.cpp
new file mode 100644 (file)
index 0000000..62e9cea
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * SomePlayer - An alternate music player for Maemo 5
+ * Copyright (C) 2010 Nikolay (somebody) Tischenko <niktischenko@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include "toolswidget.h"
+#include "ui_toolswidget.h"
+
+ToolsWidget::ToolsWidget(QWidget *parent) :
+               QWidget(parent),
+               ui(new Ui::ToolsWidget)
+{
+       ui->setupUi(this);
+       _fullscreen = false;
+       connect (ui->fscreenButton, SIGNAL(clicked()), this, SLOT(_fullscreen_button()));
+       connect (ui->nextButton, SIGNAL(clicked()), this, SIGNAL(nextSearch()));
+       connect (ui->prevButton, SIGNAL(clicked()), this, SIGNAL(prevSearch()));
+       connect (ui->searchLine, SIGNAL(textEdited(QString)), this, SIGNAL(search(QString)));
+}
+
+ToolsWidget::~ToolsWidget()
+{
+       delete ui;
+}
+
+void ToolsWidget::_fullscreen_button() {
+       _fullscreen = !_fullscreen;
+       emit toggleFullscreen(_fullscreen);
+       ui->fscreenButton->setIcon(QIcon(_fullscreen ? ":/icons/white/window.png" : ":/icons/white/fullscreen.png"));
+}
+
+void ToolsWidget::reset() {
+       ui->searchLine->setText("");
+}
diff --git a/src/toolswidget.h b/src/toolswidget.h
new file mode 100644 (file)
index 0000000..e89ac81
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * SomePlayer - An alternate music player for Maemo 5
+ * Copyright (C) 2010 Nikolay (somebody) Tischenko <niktischenko@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef TOOLSWIDGET_H
+#define TOOLSWIDGET_H
+
+#include <QWidget>
+
+namespace Ui {
+       class ToolsWidget;
+}
+
+class ToolsWidget : public QWidget
+{
+       Q_OBJECT
+
+public:
+       explicit ToolsWidget(QWidget *parent = 0);
+       ~ToolsWidget();
+       void reset();
+
+signals:
+       void toggleFullscreen(bool);
+       void search(QString);
+       void nextSearch();
+       void prevSearch();
+
+private:
+       Ui::ToolsWidget *ui;
+       bool _fullscreen;
+
+private slots:
+       void _fullscreen_button();
+};
+
+#endif // TOOLSWIDGET_H
index 739646b..9a136f0 100644 (file)
@@ -44,25 +44,26 @@ void TrackRenderer::paint(QPainter *painter, const QStyleOptionViewItem &option,
        QPen spen (QColor::fromRgb(100, 150, 220));
        QPen sspen (QColor::fromRgb(100, 220, 150));
 
-       f.setBold(true);
-       painter->setFont(f);
        f.setBold(false);
        painter->setPen(npen);
        painter->drawLine(x1, y1, x2, y1);
        if (index.row() == _search_row) {
+               f.setBold(true);
                painter->setPen(sspen);
        } else if (index.row() == _active_row) {
+               f.setBold(true);
                painter->setPen(spen);
        } else {
                painter->setPen(pen);
        }
-       painter->drawText(x1, y1 + 2*(y2-y1)/5, meta[0]);
+       painter->setFont(f);
+       painter->drawText(x1+10, y1 + 1*(y2-y1)/2, meta[0]);
        fp.setBold(false);
        fp.setPointSize(f.pointSize()*3/4);
        painter->setFont(fp);
        painter->setPen(apen);
-       painter->drawText((x2+x1)/2, y1 + 4*(y2-y1)/6, meta[1]);
-       painter->drawText((x2+x1)/2, y1 + 11*(y2-y1)/12, meta[2]);
+       painter->drawText(x1+10, y1 + 3*(y2-y1)/5, (x2-x1)-100, 2*fp.pointSize(), Qt::AlignAbsolute, QString("%1 (%2)").arg(meta[2]).arg(meta[1]));
+       painter->drawText(x2-60, y1 + 3*(y2-y1)/5, 55, 2*fp.pointSize(), Qt::AlignAbsolute, QString("%1").arg(meta[3]));
        painter->setPen(npen);
        painter->drawLine(x1, y2, x2, y2);
        painter->setFont(f);
index c7ffbd2..c599fd9 100644 (file)
@@ -13,7 +13,7 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout">
+    <layout class="QGridLayout" name="gridLayout">
    <item row="1" column="0">
     <widget class="QLabel" name="label">
      <property name="sizePolicy">
index f45b77f..920b424 100644 (file)
@@ -13,7 +13,7 @@
   <property name="windowTitle">
    <string>Edit tags</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout_2">
+    <layout class="QGridLayout" name="gridLayout_2">
    <item row="0" column="0">
     <layout class="QGridLayout" name="gridLayout">
      <item row="0" column="0">
@@ -50,7 +50,7 @@
    </item>
    <item row="1" column="0">
     <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
+          <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
      <property name="standardButtons">
index ac470f6..f520704 100644 (file)
     </layout>
    </item>
    <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_3">
-     <item>
-      <widget class="QPushButton" name="enableToggleButton">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize">
-        <size>
-         <width>150</width>
-         <height>70</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Enable</string>
-       </property>
-       <property name="checkable">
-        <bool>true</bool>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </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="QComboBox" name="presetComboBox">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize">
-        <size>
-         <width>300</width>
-         <height>70</height>
-        </size>
-       </property>
-       <property name="editable">
-        <bool>true</bool>
-       </property>
-       <property name="frame">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
+    <layout class="QVBoxLayout" name="verticalLayout_4">
+     <property name="spacing">
+      <number>0</number>
+     </property>
      <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
+      <layout class="QHBoxLayout" name="thorizontalLayout">
+       <item>
+        <spacer name="lhorizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>5</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QComboBox" name="presetComboBox">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>300</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="editable">
+          <bool>true</bool>
+         </property>
+         <property name="frame">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="rhorizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>5</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
      <item>
-      <widget class="QPushButton" name="saveButton">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize">
-        <size>
-         <width>150</width>
-         <height>70</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Save</string>
-       </property>
-       <property name="flat">
-        <bool>false</bool>
-       </property>
-      </widget>
+      <layout class="QHBoxLayout" name="bhorizontalLayout">
+       <item>
+        <widget class="QPushButton" name="enableToggleButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>120</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>120</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="text">
+          <string>Enable</string>
+         </property>
+         <property name="checkable">
+          <bool>true</bool>
+         </property>
+         <property name="flat">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="chorizontalSpacer">
+         <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="saveButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>120</width>
+           <height>70</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>120</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="text">
+          <string>Save</string>
+         </property>
+         <property name="flat">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </item>
     </layout>
    </item>
+   <item>
+    <widget class="QWidget" name="widget" native="true">
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <property name="margin">
+       <number>0</number>
+      </property>
+     </layout>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources/>
index e68c441..6c2a84d 100644 (file)
@@ -50,7 +50,7 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
+  <layout class="QHBoxLayout" name="horizontalLayout_3">
    <property name="spacing">
     <number>0</number>
    </property>
     <number>0</number>
    </property>
    <item>
-    <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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/back.png</normaloff>:/icons/white/back.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="selectAllButton">
-       <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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/select_all.png</normaloff>:/icons/white/select_all.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="addButton">
-       <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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/add.png</normaloff>:/icons/white/add.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="deleteButton">
-       <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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/delete.png</normaloff>:/icons/white/delete.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <property name="spacing">
+      <number>0</number>
+     </property>
      <item>
-      <widget class="QPushButton" name="useButton">
-       <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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/use.png</normaloff>:/icons/white/use.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
+      <widget class="QWidget" name="topWidget" native="true">
+       <property name="styleSheet">
+        <string notr="true">background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0.00549451 rgba(38, 38, 38, 255), stop:0.994505 rgba(92, 92, 92, 255))</string>
+       </property>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <property name="spacing">
+         <number>0</number>
+        </property>
+        <property name="margin">
+         <number>0</number>
+        </property>
+        <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/back.png</normaloff>:/icons/white/back.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <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>40</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="addButton">
+          <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/add.png</normaloff>:/icons/white/add.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </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="deleteButton">
+          <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/delete.png</normaloff>:/icons/white/delete.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_3">
+          <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="useButton">
+          <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/use.png</normaloff>:/icons/white/use.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="thorizontalSpacer_0">
+          <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="selectAllButton">
+          <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/select_all.png</normaloff>:/icons/white/select_all.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_5">
+          <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="moreButton">
+          <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/more.png</normaloff>:/icons/white/more.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
       </widget>
      </item>
      <item>
-      <spacer name="verticalSpacer_3">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
+      <layout class="QVBoxLayout" name="toolsLayout"/>
      </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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/player.png</normaloff>:/icons/white/player.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_3">
-     <property name="spacing">
-      <number>0</number>
-     </property>
-     <item>
       <widget class="QLabel" name="listLabel">
        <property name="enabled">
         <bool>false</bool>
        </property>
+       <property name="styleSheet">
+        <string notr="true">background: black;
+color: white;</string>
+       </property>
        <property name="text">
         <string/>
        </property>
      </item>
      <item>
       <widget class="QListView" name="listView">
+       <property name="styleSheet">
+        <string notr="true">QListView {
+background: black;
+color: white;
+}
+QListView::item:selected {
+background: qlineargradient(spread:reflect, x1:1, y1:0.5, x2:1, y2:0, stop:0 rgba(38, 38, 38, 255), stop:1 rgba(92, 92, 92, 255));
+color: white;
+}</string>
+       </property>
+       <property name="horizontalScrollBarPolicy">
+        <enum>Qt::ScrollBarAlwaysOff</enum>
+       </property>
        <property name="editTriggers">
         <set>QAbstractItemView::NoEditTriggers</set>
        </property>
-       <property name="selectionMode">
-        <enum>QAbstractItemView::MultiSelection</enum>
-       </property>
-       <property name="isWrapping" stdset="0">
+       <property name="showDropIndicator" stdset="0">
         <bool>false</bool>
        </property>
-       <property name="spacing">
-        <number>1</number>
-       </property>
-       <property name="selectionRectVisible">
-        <bool>false</bool>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/artists.png</normaloff>:/icons/white/artists.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="verticalSpacer">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
-     </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 name="selectionMode">
+        <enum>QAbstractItemView::MultiSelection</enum>
        </property>
-       <property name="text">
-        <string/>
+       <property name="selectionBehavior">
+        <enum>QAbstractItemView::SelectRows</enum>
        </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/dynamic.png</normaloff>:/icons/white/dynamic.png</iconset>
+       <property name="modelColumn">
+        <number>0</number>
        </property>
-       <property name="flat">
+       <property name="uniformItemSizes">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <spacer name="verticalSpacer_2">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
-     </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/>
-       </property>
-       <property name="icon">
-        <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/white/playlists.png</normaloff>:/icons/white/playlists.png</iconset>
-       </property>
-       <property name="flat">
-        <bool>true</bool>
-       </property>
+      <widget class="QWidget" name="bottomWidget" native="true">
+       <property name="styleSheet">
+        <string notr="true">background: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0.00549451 rgba(38, 38, 38, 255), stop:0.994505 rgba(92, 92, 92, 255))</string>
+       </property>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <property name="spacing">
+         <number>0</number>
+        </property>
+        <property name="margin">
+         <number>0</number>
+        </property>
+        <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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/player.png</normaloff>:/icons/white/player.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="bhorizontalSpacer_0">
+          <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="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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/artists.png</normaloff>:/icons/white/artists.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="bhorizontalSpacer_1">
+          <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="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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/dynamic.png</normaloff>:/icons/white/dynamic.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <spacer name="horizontalSpacer_4">
+          <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="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/>
+          </property>
+          <property name="icon">
+           <iconset resource="../../resources/resources.qrc">
+            <normaloff>:/icons/white/playlists.png</normaloff>:/icons/white/playlists.png</iconset>
+          </property>
+          <property name="flat">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
       </widget>
      </item>
     </layout>
index 8379eef..7bd4bc0 100644 (file)
    <string>someplayer</string>
   </property>
   <widget class="QWidget" name="centralWidget">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QWidget" name="toolsWidget" native="true">
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <property name="spacing">
-        <number>0</number>
-       </property>
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <layout class="QHBoxLayout" name="toolsLayout">
-         <property name="spacing">
-          <number>0</number>
-         </property>
-         <item>
-          <widget class="QPushButton" name="fscreenButton">
-           <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/white/fullscreen.png</normaloff>:/icons/white/fullscreen.png</iconset>
-           </property>
-           <property name="flat">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_3">
-           <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>
-          <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/white/back.png</normaloff>:/icons/white/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/white/forward.png</normaloff>:/icons/white/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/white/search.png</normaloff>:/icons/white/search.png</iconset>
-           </property>
-           <property name="flat">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </item>
+   <layout class="QVBoxLayout" name="verticalLayout" stretch="0">
+    <property name="spacing">
+     <number>0</number>
+    </property>
+    <property name="margin">
+     <number>0</number>
+    </property>
     <item>
      <widget class="QStackedWidget" name="stackedWidget">
       <widget class="QWidget" name="page"/>
      <height>23</height>
     </rect>
    </property>
+   <property name="styleSheet">
+    <string notr="true"/>
+   </property>
    <widget class="QMenu" name="menuHelp">
     <property name="title">
      <string>Main</string>
   </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
- <resources>
-  <include location="../../resources/resources.qrc"/>
- </resources>
+ <resources/>
  <connections/>
 </ui>
index cd1d9a2..3154c12 100644 (file)
@@ -22,6 +22,9 @@
    </property>
    <item>
     <widget class="QWidget" name="topWidget" native="true">
+     <property name="styleSheet">
+      <string notr="true">background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0.00549451 rgba(38, 38, 38, 255), stop:0.994505 rgba(92, 92, 92, 255))</string>
+     </property>
      <layout class="QHBoxLayout" name="horizontalLayout_4">
       <property name="spacing">
        <number>0</number>
@@ -30,7 +33,7 @@
        <number>0</number>
       </property>
       <item>
-       <widget class="QPushButton" name="aViewButton">
+       <widget class="QPushButton" name="prevButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
@@ -54,7 +57,7 @@
         </property>
         <property name="icon">
          <iconset resource="../../resources/resources.qrc">
-          <normaloff>:/icons/white/playlist.png</normaloff>:/icons/white/playlist.png</iconset>
+          <normaloff>:/icons/white/prev.png</normaloff>:/icons/white/prev.png</iconset>
         </property>
         <property name="flat">
          <bool>true</bool>
@@ -62,7 +65,7 @@
        </widget>
       </item>
       <item>
-       <spacer name="horizontalSpacer_6">
+       <spacer name="horizontalSpacer_7">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
@@ -75,7 +78,7 @@
        </spacer>
       </item>
       <item>
-       <widget class="QPushButton" name="aPrevButton">
+       <widget class="QPushButton" name="playpauseButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
         </property>
         <property name="icon">
          <iconset resource="../../resources/resources.qrc">
-          <normaloff>:/icons/white/prev.png</normaloff>:/icons/white/prev.png</iconset>
+          <normaloff>:/icons/white/play.png</normaloff>:/icons/white/play.png</iconset>
         </property>
         <property name="flat">
          <bool>true</bool>
        </widget>
       </item>
       <item>
-       <widget class="QPushButton" name="aPlayPauseButton">
+       <spacer name="horizontalSpacer_8">
+        <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="stopButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
         </property>
         <property name="icon">
          <iconset resource="../../resources/resources.qrc">
-          <normaloff>:/icons/white/play.png</normaloff>:/icons/white/play.png</iconset>
+          <normaloff>:/icons/white/stop.png</normaloff>:/icons/white/stop.png</iconset>
         </property>
         <property name="flat">
          <bool>true</bool>
        </widget>
       </item>
       <item>
-       <widget class="QPushButton" name="aStopButton">
+       <spacer name="horizontalSpacer_9">
+        <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="nextButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
         </property>
         <property name="icon">
          <iconset resource="../../resources/resources.qrc">
-          <normaloff>:/icons/white/stop.png</normaloff>:/icons/white/stop.png</iconset>
+          <normaloff>:/icons/white/next.png</normaloff>:/icons/white/next.png</iconset>
         </property>
         <property name="flat">
          <bool>true</bool>
        </widget>
       </item>
       <item>
-       <widget class="QPushButton" name="aNextButton">
+       <spacer name="horizontalSpacer_6">
+        <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="moreButton">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
         </property>
         <property name="icon">
          <iconset resource="../../resources/resources.qrc">
-          <normaloff>:/icons/white/next.png</normaloff>:/icons/white/next.png</iconset>
+          <normaloff>:/icons/white/more.png</normaloff>:/icons/white/more.png</iconset>
         </property>
         <property name="flat">
          <bool>true</bool>
      <item>
       <widget class="QStackedWidget" name="stackedWidget">
        <property name="currentIndex">
-        <number>1</number>
+        <number>0</number>
        </property>
        <widget class="QWidget" name="page">
         <layout class="QVBoxLayout" name="verticalLayout_4">
           <number>0</number>
          </property>
          <item>
+          <layout class="QVBoxLayout" name="toolsLayout">
+           <property name="spacing">
+            <number>0</number>
+           </property>
+          </layout>
+         </item>
+         <item>
           <widget class="QListView" name="playlistView">
            <property name="contextMenuPolicy">
             <enum>Qt::CustomContextMenu</enum>
            </property>
+           <property name="styleSheet">
+            <string notr="true">QListView {background: black;}</string>
+           </property>
            <property name="editTriggers">
             <set>QAbstractItemView::NoEditTriggers</set>
            </property>
        </widget>
        <widget class="QWidget" name="page_2">
         <layout class="QGridLayout" name="gridLayout">
+         <property name="margin">
+          <number>0</number>
+         </property>
+         <property name="spacing">
+          <number>0</number>
+         </property>
          <item row="0" column="0">
           <widget class="QWidget" name="widget" native="true">
            <layout class="QVBoxLayout" name="verticalLayout_2">
              </layout>
             </item>
             <item>
+             <spacer name="verticalSpacer">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>40</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
              <widget class="QLabel" name="titleLabel">
               <property name="text">
                <string>&lt;h3&gt;Title&lt;/h3&gt;</string>
              </widget>
             </item>
             <item>
+             <spacer name="verticalSpacer_2">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>40</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
              <layout class="QHBoxLayout" name="progressLayout">
               <item>
                <widget class="QLabel" name="doneTimeLabel">
                </widget>
               </item>
               <item>
+               <widget class="QSlider" name="seekSlider">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="seekSpacer">
+                <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="allTimeLabel">
                 <property name="text">
                  <string>00:00</string>
              </layout>
             </item>
             <item>
+             <widget class="QWidget" name="progressWidget" native="true">
+              <layout class="QVBoxLayout" name="verticalLayout_3">
+               <property name="spacing">
+                <number>0</number>
+               </property>
+               <property name="margin">
+                <number>0</number>
+               </property>
+              </layout>
+             </widget>
+            </item>
+            <item>
+             <spacer name="verticalSpacer_3">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>40</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
              <widget class="QLabel" name="artistAlbumLabel">
               <property name="text">
                <string>&lt;b&gt;Artist&lt;/b&gt;&lt;br/&gt;album</string>
               </property>
              </widget>
             </item>
+            <item>
+             <spacer name="verticalSpacer_4">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>40</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
            </layout>
           </widget>
          </item>
      </item>
      <item>
       <layout class="QHBoxLayout" name="volumeLayout">
+       <property name="spacing">
+        <number>0</number>
+       </property>
        <item>
         <widget class="QSlider" name="volumeSlider">
          <property name="orientation">
          <height>0</height>
         </size>
        </property>
+       <property name="styleSheet">
+        <string notr="true">background:qlineargradient(spread:pad, x1:1, y1:1, x2:1, y2:0, stop:0.00549451 rgba(38, 38, 38, 255), stop:0.994505 rgba(92, 92, 92, 255))</string>
+       </property>
        <layout class="QHBoxLayout" name="horizontalLayout_2">
         <property name="spacing">
          <number>0</number>
          </widget>
         </item>
         <item>
-         <widget class="QPushButton" name="repeatButton">
-          <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/>
-          </property>
-          <property name="icon">
-           <iconset resource="../../resources/resources.qrc">
-            <normaloff>:/icons/white/repeat_inactive.png</normaloff>:/icons/white/repeat_inactive.png</iconset>
-          </property>
-          <property name="iconSize">
-           <size>
-            <width>48</width>
-            <height>58</height>
-           </size>
-          </property>
-          <property name="checkable">
-           <bool>false</bool>
-          </property>
-          <property name="flat">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="horizontalSpacer_4">
+         <spacer name="horizontalSpacer_5">
           <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
          </spacer>
         </item>
         <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>70</width>
-            <height>70</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>70</width>
-            <height>70</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-          <property name="icon">
-           <iconset resource="../../resources/resources.qrc">
-            <normaloff>:/icons/white/prev.png</normaloff>:/icons/white/prev.png</iconset>
-          </property>
-          <property name="flat">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="playpauseButton">
-          <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/>
-          </property>
-          <property name="icon">
-           <iconset resource="../../resources/resources.qrc">
-            <normaloff>:/icons/white/play.png</normaloff>:/icons/white/play.png</iconset>
-          </property>
-          <property name="flat">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="stopButton">
+         <widget class="QPushButton" name="repeatButton">
           <property name="sizePolicy">
            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
             <horstretch>0</horstretch>
           </property>
           <property name="icon">
            <iconset resource="../../resources/resources.qrc">
-            <normaloff>:/icons/white/stop.png</normaloff>:/icons/white/stop.png</iconset>
-          </property>
-          <property name="flat">
-           <bool>true</bool>
-          </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>70</width>
-            <height>70</height>
-           </size>
+            <normaloff>:/icons/white/repeat_inactive.png</normaloff>:/icons/white/repeat_inactive.png</iconset>
           </property>
-          <property name="maximumSize">
+          <property name="iconSize">
            <size>
-            <width>70</width>
-            <height>70</height>
+            <width>48</width>
+            <height>58</height>
            </size>
           </property>
-          <property name="text">
-           <string/>
-          </property>
-          <property name="icon">
-           <iconset resource="../../resources/resources.qrc">
-            <normaloff>:/icons/white/next.png</normaloff>:/icons/white/next.png</iconset>
+          <property name="checkable">
+           <bool>false</bool>
           </property>
           <property name="flat">
            <bool>true</bool>
          </widget>
         </item>
         <item>
-         <spacer name="horizontalSpacer_5">
+         <spacer name="horizontalSpacer_4">
           <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
index cc12090..023b715 100644 (file)
@@ -28,7 +28,8 @@
     </widget>
    </item>
    <item>
-    <widget class="QListWidget" name="listWidget"/>
+    <widget class="QListWidget" name="listWidget">
+    </widget>
    </item>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
index 8368d57..e58089d 100644 (file)
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_6">
          <item>
-          <widget class="QGroupBox" name="groupBox">
-           <property name="title">
-            <string/>
-           </property>
-           <layout class="QVBoxLayout" name="verticalLayout_2">
-            <item>
-             <widget class="QLabel" name="label">
-              <property name="text">
-               <string>Icons theme:</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <layout class="QHBoxLayout" name="horizontalLayout">
-              <item>
-               <widget class="QRadioButton" name="iconsBButton">
-                <property name="text">
-                 <string>Black</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QRadioButton" name="iconsWButton">
-                <property name="text">
-                 <string>White</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-           </layout>
-          </widget>
-         </item>
-         <item>
           <widget class="QGroupBox" name="albumSortingGroupBox">
            <property name="enabled">
             <bool>true</bool>
             <item>
              <widget class="QLabel" name="label_4">
               <property name="text">
-               <string>Enable portrait mode:</string>
+               <string>Orientation:</string>
               </property>
              </widget>
             </item>
             <item>
              <layout class="QHBoxLayout" name="horizontalLayout_5">
               <item>
-               <widget class="QRadioButton" name="portraitEnableButton">
+               <widget class="QRadioButton" name="orientationLButton">
+                <property name="text">
+                 <string>Landscape</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QRadioButton" name="orientationPButton">
                 <property name="text">
-                 <string>Enable</string>
+                 <string>Portrait</string>
                 </property>
                </widget>
               </item>
               <item>
-               <widget class="QRadioButton" name="portraitDisableButton">
+               <widget class="QRadioButton" name="orientationAButton">
                 <property name="text">
-                 <string>Disable</string>
+                 <string>Auto</string>
                 </property>
                </widget>
               </item>
diff --git a/src/ui/toolswidget.ui b/src/ui/toolswidget.ui
new file mode 100644 (file)
index 0000000..fc1bd3f
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ToolsWidget</class>
+ <widget class="QWidget" name="ToolsWidget">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>65</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QPushButton" name="fscreenButton">
+     <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/white/fullscreen.png</normaloff>:/icons/white/fullscreen.png</iconset>
+     </property>
+     <property name="flat">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer name="horizontalSpacer_3">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>26</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <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/white/back.png</normaloff>:/icons/white/back.png</iconset>
+     </property>
+     <property name="flat">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="searchLine">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>1</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>60</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>60</height>
+      </size>
+     </property>
+     <property name="autoFillBackground">
+      <bool>false</bool>
+     </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/white/forward.png</normaloff>:/icons/white/forward.png</iconset>
+     </property>
+     <property name="flat">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../../resources/resources.qrc"/>
+ </resources>
+ <connections/>
+</ui>