Icons themes, Portrait mode, bugfixes
authorNikolay Tischenko <niktischenko@gmail.com>
Sat, 2 Oct 2010 17:36:38 +0000 (00:36 +0700)
committerNikolay Tischenko <niktischenko@gmail.com>
Sat, 2 Oct 2010 17:36:38 +0000 (00:36 +0700)
74 files changed:
resources/black/add.png [new file with mode: 0644]
resources/black/artists.png [new file with mode: 0644]
resources/black/back.png [new file with mode: 0644]
resources/black/delete.png [new file with mode: 0644]
resources/black/deselect_all.png [new file with mode: 0644]
resources/black/dynamic.png [new file with mode: 0644]
resources/black/fav.png [new file with mode: 0644]
resources/black/forward.png [new file with mode: 0644]
resources/black/fullscreen.png [new file with mode: 0644]
resources/black/library.png [new file with mode: 0644]
resources/black/next.png [new file with mode: 0644]
resources/black/pause.png [new file with mode: 0644]
resources/black/play.png [new file with mode: 0644]
resources/black/playback.png [new file with mode: 0644]
resources/black/player.png [new file with mode: 0644]
resources/black/playlist.png [new file with mode: 0644]
resources/black/playlists.png [new file with mode: 0644]
resources/black/prev.png [new file with mode: 0644]
resources/black/random_active.png [new file with mode: 0644]
resources/black/random_inactive.png [new file with mode: 0644]
resources/black/repeat_active.png [new file with mode: 0644]
resources/black/repeat_inactive.png [new file with mode: 0644]
resources/black/search.png [new file with mode: 0644]
resources/black/select_all.png [new file with mode: 0644]
resources/black/stop.png [new file with mode: 0644]
resources/black/use.png [new file with mode: 0644]
resources/black/volume.png [new file with mode: 0644]
resources/black/window.png [new file with mode: 0644]
resources/resources.qrc
resources/someplayer.desktop [changed mode: 0644->0755]
resources/white/add.png [new file with mode: 0644]
resources/white/artists.png [new file with mode: 0644]
resources/white/back.png [new file with mode: 0644]
resources/white/delete.png [new file with mode: 0644]
resources/white/deselect_all.png [new file with mode: 0644]
resources/white/dynamic.png [new file with mode: 0644]
resources/white/fav.png [new file with mode: 0644]
resources/white/forward.png [new file with mode: 0644]
resources/white/fullscreen.png [new file with mode: 0644]
resources/white/library.png [new file with mode: 0644]
resources/white/next.png [new file with mode: 0644]
resources/white/pause.png [new file with mode: 0644]
resources/white/play.png [new file with mode: 0644]
resources/white/playback.png [new file with mode: 0644]
resources/white/player.png [new file with mode: 0644]
resources/white/playlist.png [new file with mode: 0644]
resources/white/playlists.png [new file with mode: 0644]
resources/white/prev.png [new file with mode: 0644]
resources/white/random_active.png [new file with mode: 0644]
resources/white/random_inactive.png [new file with mode: 0644]
resources/white/repeat_active.png [new file with mode: 0644]
resources/white/repeat_inactive.png [new file with mode: 0644]
resources/white/search.png [new file with mode: 0644]
resources/white/select_all.png [new file with mode: 0644]
resources/white/stop.png [new file with mode: 0644]
resources/white/use.png [new file with mode: 0644]
resources/white/volume.png [new file with mode: 0644]
resources/white/window.png [new file with mode: 0644]
someplayer.pro
src/config.cpp
src/libraryform.cpp
src/libraryform.h
src/mainwindow.cpp
src/mainwindow.h
src/player/player.h
src/playerform.cpp
src/playerform.h
src/settingsdialog.cpp [new file with mode: 0644]
src/settingsdialog.h [new file with mode: 0644]
src/someplayer.h
src/ui/libraryform.ui
src/ui/mainwindow.ui
src/ui/playerform.ui
src/ui/settingsdialog.ui [new file with mode: 0644]

diff --git a/resources/black/add.png b/resources/black/add.png
new file mode 100644 (file)
index 0000000..a098819
Binary files /dev/null and b/resources/black/add.png differ
diff --git a/resources/black/artists.png b/resources/black/artists.png
new file mode 100644 (file)
index 0000000..61c03cf
Binary files /dev/null and b/resources/black/artists.png differ
diff --git a/resources/black/back.png b/resources/black/back.png
new file mode 100644 (file)
index 0000000..43d1f1f
Binary files /dev/null and b/resources/black/back.png differ
diff --git a/resources/black/delete.png b/resources/black/delete.png
new file mode 100644 (file)
index 0000000..74daaa2
Binary files /dev/null and b/resources/black/delete.png differ
diff --git a/resources/black/deselect_all.png b/resources/black/deselect_all.png
new file mode 100644 (file)
index 0000000..7c68419
Binary files /dev/null and b/resources/black/deselect_all.png differ
diff --git a/resources/black/dynamic.png b/resources/black/dynamic.png
new file mode 100644 (file)
index 0000000..badb712
Binary files /dev/null and b/resources/black/dynamic.png differ
diff --git a/resources/black/fav.png b/resources/black/fav.png
new file mode 100644 (file)
index 0000000..cd5d5b8
Binary files /dev/null and b/resources/black/fav.png differ
diff --git a/resources/black/forward.png b/resources/black/forward.png
new file mode 100644 (file)
index 0000000..fccf7d9
Binary files /dev/null and b/resources/black/forward.png differ
diff --git a/resources/black/fullscreen.png b/resources/black/fullscreen.png
new file mode 100644 (file)
index 0000000..cd51d5b
Binary files /dev/null and b/resources/black/fullscreen.png differ
diff --git a/resources/black/library.png b/resources/black/library.png
new file mode 100644 (file)
index 0000000..c84ea85
Binary files /dev/null and b/resources/black/library.png differ
diff --git a/resources/black/next.png b/resources/black/next.png
new file mode 100644 (file)
index 0000000..10275d3
Binary files /dev/null and b/resources/black/next.png differ
diff --git a/resources/black/pause.png b/resources/black/pause.png
new file mode 100644 (file)
index 0000000..7a27e3d
Binary files /dev/null and b/resources/black/pause.png differ
diff --git a/resources/black/play.png b/resources/black/play.png
new file mode 100644 (file)
index 0000000..4d9cbf5
Binary files /dev/null and b/resources/black/play.png differ
diff --git a/resources/black/playback.png b/resources/black/playback.png
new file mode 100644 (file)
index 0000000..d5ebe27
Binary files /dev/null and b/resources/black/playback.png differ
diff --git a/resources/black/player.png b/resources/black/player.png
new file mode 100644 (file)
index 0000000..2c14632
Binary files /dev/null and b/resources/black/player.png differ
diff --git a/resources/black/playlist.png b/resources/black/playlist.png
new file mode 100644 (file)
index 0000000..39f80b6
Binary files /dev/null and b/resources/black/playlist.png differ
diff --git a/resources/black/playlists.png b/resources/black/playlists.png
new file mode 100644 (file)
index 0000000..3347025
Binary files /dev/null and b/resources/black/playlists.png differ
diff --git a/resources/black/prev.png b/resources/black/prev.png
new file mode 100644 (file)
index 0000000..b1d4e3c
Binary files /dev/null and b/resources/black/prev.png differ
diff --git a/resources/black/random_active.png b/resources/black/random_active.png
new file mode 100644 (file)
index 0000000..aae80aa
Binary files /dev/null and b/resources/black/random_active.png differ
diff --git a/resources/black/random_inactive.png b/resources/black/random_inactive.png
new file mode 100644 (file)
index 0000000..ea8f9ed
Binary files /dev/null and b/resources/black/random_inactive.png differ
diff --git a/resources/black/repeat_active.png b/resources/black/repeat_active.png
new file mode 100644 (file)
index 0000000..f574f11
Binary files /dev/null and b/resources/black/repeat_active.png differ
diff --git a/resources/black/repeat_inactive.png b/resources/black/repeat_inactive.png
new file mode 100644 (file)
index 0000000..66e78e4
Binary files /dev/null and b/resources/black/repeat_inactive.png differ
diff --git a/resources/black/search.png b/resources/black/search.png
new file mode 100644 (file)
index 0000000..413387d
Binary files /dev/null and b/resources/black/search.png differ
diff --git a/resources/black/select_all.png b/resources/black/select_all.png
new file mode 100644 (file)
index 0000000..ef60283
Binary files /dev/null and b/resources/black/select_all.png differ
diff --git a/resources/black/stop.png b/resources/black/stop.png
new file mode 100644 (file)
index 0000000..3d90ff5
Binary files /dev/null and b/resources/black/stop.png differ
diff --git a/resources/black/use.png b/resources/black/use.png
new file mode 100644 (file)
index 0000000..8a1f5ce
Binary files /dev/null and b/resources/black/use.png differ
diff --git a/resources/black/volume.png b/resources/black/volume.png
new file mode 100644 (file)
index 0000000..77915cf
Binary files /dev/null and b/resources/black/volume.png differ
diff --git a/resources/black/window.png b/resources/black/window.png
new file mode 100644 (file)
index 0000000..4540929
Binary files /dev/null and b/resources/black/window.png differ
index 65725d9..2e0d132 100644 (file)
@@ -1,32 +1,60 @@
 <RCC>
     <qresource prefix="/icons">
-        <file>artists.png</file>
-        <file>back.png</file>
-        <file>library.png</file>
-        <file>next.png</file>
-        <file>pause.png</file>
-        <file>play.png</file>
-        <file>playback.png</file>
-        <file>player.png</file>
-        <file>playlist.png</file>
-        <file>prev.png</file>
-        <file>search.png</file>
-        <file>stop.png</file>
-        <file>random_active.png</file>
-        <file>random_inactive.png</file>
-        <file>repeat_active.png</file>
-        <file>repeat_inactive.png</file>
-        <file>playlists.png</file>
-        <file>add.png</file>
-        <file>delete.png</file>
-        <file>use.png</file>
-        <file>dynamic.png</file>
-        <file>fav.png</file>
-        <file>forward.png</file>
-        <file>window.png</file>
-        <file>fullscreen.png</file>
-        <file>volume.png</file>
-        <file>select_all.png</file>
-        <file>deselect_all.png</file>
+        <file>white/add.png</file>
+        <file>white/artists.png</file>
+        <file>white/back.png</file>
+        <file>white/delete.png</file>
+        <file>white/deselect_all.png</file>
+        <file>white/dynamic.png</file>
+        <file>white/fav.png</file>
+        <file>white/forward.png</file>
+        <file>white/fullscreen.png</file>
+        <file>white/library.png</file>
+        <file>white/next.png</file>
+        <file>white/pause.png</file>
+        <file>white/play.png</file>
+        <file>white/playback.png</file>
+        <file>white/player.png</file>
+        <file>white/playlist.png</file>
+        <file>white/playlists.png</file>
+        <file>white/prev.png</file>
+        <file>white/random_active.png</file>
+        <file>white/random_inactive.png</file>
+        <file>white/repeat_active.png</file>
+        <file>white/repeat_inactive.png</file>
+        <file>white/search.png</file>
+        <file>white/select_all.png</file>
+        <file>white/stop.png</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>
     </qresource>
 </RCC>
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/resources/white/add.png b/resources/white/add.png
new file mode 100644 (file)
index 0000000..3f3717a
Binary files /dev/null and b/resources/white/add.png differ
diff --git a/resources/white/artists.png b/resources/white/artists.png
new file mode 100644 (file)
index 0000000..004d7f1
Binary files /dev/null and b/resources/white/artists.png differ
diff --git a/resources/white/back.png b/resources/white/back.png
new file mode 100644 (file)
index 0000000..6f0837f
Binary files /dev/null and b/resources/white/back.png differ
diff --git a/resources/white/delete.png b/resources/white/delete.png
new file mode 100644 (file)
index 0000000..3da8b2f
Binary files /dev/null and b/resources/white/delete.png differ
diff --git a/resources/white/deselect_all.png b/resources/white/deselect_all.png
new file mode 100644 (file)
index 0000000..cd56d69
Binary files /dev/null and b/resources/white/deselect_all.png differ
diff --git a/resources/white/dynamic.png b/resources/white/dynamic.png
new file mode 100644 (file)
index 0000000..dfadb94
Binary files /dev/null and b/resources/white/dynamic.png differ
diff --git a/resources/white/fav.png b/resources/white/fav.png
new file mode 100644 (file)
index 0000000..b0a5fe3
Binary files /dev/null and b/resources/white/fav.png differ
diff --git a/resources/white/forward.png b/resources/white/forward.png
new file mode 100644 (file)
index 0000000..5e47e1f
Binary files /dev/null and b/resources/white/forward.png differ
diff --git a/resources/white/fullscreen.png b/resources/white/fullscreen.png
new file mode 100644 (file)
index 0000000..5b60f68
Binary files /dev/null and b/resources/white/fullscreen.png differ
diff --git a/resources/white/library.png b/resources/white/library.png
new file mode 100644 (file)
index 0000000..02fcaeb
Binary files /dev/null and b/resources/white/library.png differ
diff --git a/resources/white/next.png b/resources/white/next.png
new file mode 100644 (file)
index 0000000..02466b4
Binary files /dev/null and b/resources/white/next.png differ
diff --git a/resources/white/pause.png b/resources/white/pause.png
new file mode 100644 (file)
index 0000000..de9805b
Binary files /dev/null and b/resources/white/pause.png differ
diff --git a/resources/white/play.png b/resources/white/play.png
new file mode 100644 (file)
index 0000000..3f031b0
Binary files /dev/null and b/resources/white/play.png differ
diff --git a/resources/white/playback.png b/resources/white/playback.png
new file mode 100644 (file)
index 0000000..b8fdd79
Binary files /dev/null and b/resources/white/playback.png differ
diff --git a/resources/white/player.png b/resources/white/player.png
new file mode 100644 (file)
index 0000000..31dcd75
Binary files /dev/null and b/resources/white/player.png differ
diff --git a/resources/white/playlist.png b/resources/white/playlist.png
new file mode 100644 (file)
index 0000000..6edad1d
Binary files /dev/null and b/resources/white/playlist.png differ
diff --git a/resources/white/playlists.png b/resources/white/playlists.png
new file mode 100644 (file)
index 0000000..5e03318
Binary files /dev/null and b/resources/white/playlists.png differ
diff --git a/resources/white/prev.png b/resources/white/prev.png
new file mode 100644 (file)
index 0000000..d556200
Binary files /dev/null and b/resources/white/prev.png differ
diff --git a/resources/white/random_active.png b/resources/white/random_active.png
new file mode 100644 (file)
index 0000000..aae80aa
Binary files /dev/null and b/resources/white/random_active.png differ
diff --git a/resources/white/random_inactive.png b/resources/white/random_inactive.png
new file mode 100644 (file)
index 0000000..746bcaf
Binary files /dev/null and b/resources/white/random_inactive.png differ
diff --git a/resources/white/repeat_active.png b/resources/white/repeat_active.png
new file mode 100644 (file)
index 0000000..f574f11
Binary files /dev/null and b/resources/white/repeat_active.png differ
diff --git a/resources/white/repeat_inactive.png b/resources/white/repeat_inactive.png
new file mode 100644 (file)
index 0000000..004a4eb
Binary files /dev/null and b/resources/white/repeat_inactive.png differ
diff --git a/resources/white/search.png b/resources/white/search.png
new file mode 100644 (file)
index 0000000..690d212
Binary files /dev/null and b/resources/white/search.png differ
diff --git a/resources/white/select_all.png b/resources/white/select_all.png
new file mode 100644 (file)
index 0000000..3d498d2
Binary files /dev/null and b/resources/white/select_all.png differ
diff --git a/resources/white/stop.png b/resources/white/stop.png
new file mode 100644 (file)
index 0000000..70005ea
Binary files /dev/null and b/resources/white/stop.png differ
diff --git a/resources/white/use.png b/resources/white/use.png
new file mode 100644 (file)
index 0000000..bbbfce2
Binary files /dev/null and b/resources/white/use.png differ
diff --git a/resources/white/volume.png b/resources/white/volume.png
new file mode 100644 (file)
index 0000000..6e833f8
Binary files /dev/null and b/resources/white/volume.png differ
diff --git a/resources/white/window.png b/resources/white/window.png
new file mode 100644 (file)
index 0000000..d55f245
Binary files /dev/null and b/resources/white/window.png differ
index cc7fa1b..45c526d 100644 (file)
@@ -119,7 +119,8 @@ SOURCES += src/main.cpp\
     src/edittagsdialog.cpp \
     src/timerdialog.cpp \
     src/equalizerdialog.cpp \
-    src/saveplaylistdialog.cpp
+    src/saveplaylistdialog.cpp \
+    src/settingsdialog.cpp
 
 HEADERS  += src/mainwindow.h \
                src/player/player.h \
@@ -216,7 +217,8 @@ HEADERS  += src/mainwindow.h \
     src/edittagsdialog.h \
     src/timerdialog.h \
     src/equalizerdialog.h \
-    src/saveplaylistdialog.h
+    src/saveplaylistdialog.h \
+    src/settingsdialog.h
 
 FORMS    += src/ui/mainwindow.ui \
     src/ui/playerform.ui \
@@ -226,7 +228,8 @@ FORMS    += src/ui/mainwindow.ui \
     src/ui/edittagsdialog.ui \
     src/ui/timerdialog.ui \
     src/ui/equalizerdialog.ui \
-    src/ui/saveplaylistdialog.ui
+    src/ui/saveplaylistdialog.ui \
+    src/ui/settingsdialog.ui
 
 CONFIG += mobility
 MOBILITY = 
index 286cca1..03e3da7 100644 (file)
@@ -26,6 +26,9 @@ 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 bd1ff2f..2e30399 100644 (file)
 #include <QTime>
 #include <QQueue>
 #include <QMessageBox>
+#include "config.h"
 
 using namespace SomePlayer::DataObjects;
+using namespace SomePlayer::Storage;
 
 inline QString __format_track_string(TrackMetadata meta) {
        int minutes = meta.length() / 60;
@@ -52,9 +54,14 @@ inline void __fill_model(QStandardItemModel *model, QList<QString> data) {
 inline void __fill_model_tracks (QStandardItemModel *model, QList<Track> tracks) {
        int count = tracks.count();
        model->setRowCount(count);
+       Config config;
+       bool show_lenght = (config.getValue("ui/showtracklenght").toString() != "no");
        for (int i = 0; i < count; i++) {
                TrackMetadata meta = tracks.at(i).metadata();
-               model->setItem(i, 0, new QStandardItem(__format_track_string(meta)));
+               if (show_lenght)
+                       model->setItem(i, 0, new QStandardItem(__format_track_string(meta)));
+               else
+                       model->setItem(i, 0, new QStandardItem(meta.title()));
        }
 }
 
@@ -77,16 +84,21 @@ LibraryForm::LibraryForm(Library *lib, QWidget *parent) :
        connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(_delete_button()));
        connect(ui->useButton, SIGNAL(clicked()), this, SLOT(_use_button()));
        _view_button();
+       Config config;
+       _icons_theme = config.getValue("ui/iconstheme").toString();
+       _current_playlist_changed = true;
 }
 
 LibraryForm::~LibraryForm()
 {
-       _lib->saveCurrentPlaylist(_lib->getCurrentPlaylist());
-    delete ui;
+       _lib->saveCurrentPlaylist(_lib->getCurrentPlaylist()); // wtf?
+       _current_playlist_changed = true;
+       delete ui;
 }
 
 void LibraryForm::_player() {
-       emit player();
+       emit player(_current_playlist_changed);
+       _current_playlist_changed = false;
 }
 
 void LibraryForm::_view_button() {
@@ -121,6 +133,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
        switch (_state) {
        case STATE_ARTIST:
                __fill_model(_model, _lib->getAlbumsForArtist(data));
+               ui->listView->scrollToTop();
                _current_artist = data;
                _state = STATE_ALBUM;
                ui->backButton->show();
@@ -130,6 +143,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                _current_album = data;
                _current_tracks = _lib->getTracksForAlbum(data, _current_artist);
                __fill_model_tracks(_model, _current_tracks);
+               ui->listView->scrollToTop();
                _state = STATE_TRACK;
                ui->backButton->show();
                ui->listLabel->setText(QString("Tracks from \"%1\" by \"%2\"").arg(_current_album).arg(_current_artist));
@@ -139,6 +153,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                        _current_playlist = _lib->getPlaylist(data);
                        _current_tracks = _current_playlist.tracks();
                        __fill_model_tracks(_model, _current_tracks);
+                       ui->listView->scrollToTop();
                        _state = STATE_PLAYLIST_TRACK;
                        ui->backButton->show();
                        ui->deleteButton->show();
@@ -165,6 +180,7 @@ void LibraryForm::_process_list_click(QModelIndex index) {
                        }
                        _current_tracks = _current_playlist.tracks();
                        __fill_model_tracks(_model, _current_tracks);
+                       ui->listView->scrollToTop();
                        _state = STATE_PLAYLIST_TRACK;
                        ui->backButton->show();
                        ui->useButton->show();
@@ -233,6 +249,7 @@ void LibraryForm::_add_track(Track track) {
        Playlist current = _lib->getCurrentPlaylist();
        current.addTrack(track);
        _lib->saveCurrentPlaylist(current);
+       _current_playlist_changed = true;
 }
 
 void LibraryForm::_add_playlist(QString name) {
@@ -247,14 +264,17 @@ void LibraryForm::_back_button() {
        switch (_state) {
        case STATE_ALBUM:
                _view_button();
+               ui->listView->scrollToTop();
                break;
        case STATE_TRACK:
                __fill_model(_model, _lib->getAlbumsForArtist(_current_artist));
+               ui->listView->scrollToTop();
                _state = STATE_ALBUM;
                ui->listLabel->setText(QString("Albums by \"%1\"").arg(_current_artist));
                break;
        case STATE_PLAYLIST_TRACK:
                _playlists_button();
+               ui->listView->scrollToTop();
        default:
                return;
        }
@@ -310,10 +330,12 @@ void LibraryForm::_delete_track(Track track) {
        Playlist current = _lib->getCurrentPlaylist();
        current.removeTrack(track);
        _lib->saveCurrentPlaylist(current);
+       _current_playlist_changed = true;
 }
 
 void LibraryForm::_use_button() {
        _lib->saveCurrentPlaylist(_current_playlist);
+       _current_playlist_changed = true;
        _current_playlist = _lib->getCurrentPlaylist();
 }
 
@@ -389,10 +411,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/select_all.png"));
+               ui->selectAllButton->setIcon(QIcon(":/icons/"+_icons_theme+"/select_all.png"));
        } else {
                ui->listView->selectAll();
-               ui->selectAllButton->setIcon(QIcon(":/icons/deselect_all.png"));
+               ui->selectAllButton->setIcon(QIcon(":/icons/"+_icons_theme+"/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"));
+}
index 60a276f..6753c9f 100644 (file)
@@ -46,7 +46,7 @@ public:
        explicit LibraryForm(Library *lib, QWidget *parent = 0);
     ~LibraryForm();
 signals:
-       void player();
+       void player(bool);
        void busy(QString);
        void done();
 public slots:
@@ -55,6 +55,7 @@ public slots:
        void prevItem();
        void cancelSearch();
        void refresh();
+       void updateIcons();
 private slots:
        void _player();
        void _view_button();
@@ -78,12 +79,14 @@ private:
        QList<Track> _current_tracks;
        QString _search_pattern;
        int _search_current_id;
+       bool _current_playlist_changed;
 
        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 688e1ae..549f238 100644 (file)
@@ -23,6 +23,7 @@
 #include <QMessageBox>
 #include <QInputDialog>
 #include <QFile>
+#include <QDesktopWidget>
 
 #include "player/player.h"
 
@@ -30,6 +31,7 @@
 #include "timerdialog.h"
 #include "equalizerdialog.h"
 #include "saveplaylistdialog.h"
+#include "settingsdialog.h"
 
 using namespace SomePlayer::DataObjects;
 using namespace SomePlayer::Storage;
@@ -39,10 +41,11 @@ 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_Qt, SIGNAL(triggered()), this, SLOT(aboutQt()));
        connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()));
+       connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(settings()));
        setAnimated(true);
        _player_form = new PlayerForm(_library, ui->stackedWidget);
        _library_form = new LibraryForm(_library, ui->stackedWidget);
@@ -57,9 +60,9 @@ MainWindow::MainWindow(QWidget *parent) :
        QAction *clear_playlist = ui->menuLibrary->addAction("Clear current playlist");
        QAction *add_files = ui->menuLibrary->addAction("Add file to current playlist");
        QAction *set_timer = ui->menuBar->addAction("Set timer");
-       QAction *equalizer = ui->menuBar->addAction("Euqalizer");
+       QAction *equalizer = ui->menuBar->addAction("Equalizer");
        connect(_player_form, SIGNAL(library()), this, SLOT(library()));
-       connect(_library_form, SIGNAL(player()), this, SLOT(player()));
+       connect(_library_form, SIGNAL(player(bool)), this, SLOT(player(bool)));
        connect(add_directory, SIGNAL(triggered()), this, SLOT(_add_directory()));
        connect(save_playlist, SIGNAL(triggered()), this, SLOT(_save_playlist()));
        connect(clear_playlist, SIGNAL(triggered()), this, SLOT(_clear_current_playlist()));
@@ -83,6 +86,10 @@ MainWindow::MainWindow(QWidget *parent) :
        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();
        library();
 }
@@ -94,23 +101,22 @@ MainWindow::~MainWindow()
        delete ui;
 }
 
-void MainWindow::aboutQt() {
-       QMessageBox::aboutQt(this, "About Qt");
-}
-
 void MainWindow::about() {
        QMessageBox::about(this, QString("About SomePlayer v")+_SOMEPLAYER_VERSION_, "Alternate music player for Maemo 5 "
                                           "written in C++ with Qt4\n\n"
                                           "Author: Nikolay Tischenko aka \"somebody\" <niktischenko@gmail.com>");
 }
 
-void MainWindow::player() {
+void MainWindow::player(bool reread) {
+       Config config;
+       setAttribute(Qt::WA_Maemo5AutoOrientation, config.getValue("ui/portraitmode").toString() != "disabled");
        ui->stackedWidget->setCurrentIndex(0);
-       _player_form->reload();
+       _player_form->reload(reread);
        setWindowTitle("SomePlayer");
 }
 
 void MainWindow::library() {
+       setAttribute(Qt::WA_Maemo5AutoOrientation, false);
        ui->menuBar->setEnabled(true);
        ui->stackedWidget->setCurrentIndex(1);
        showSearchPanel();
@@ -162,7 +168,7 @@ void MainWindow::_clear_current_playlist() {
        Playlist playlist = _library->getCurrentPlaylist();
        playlist.clear();
        _library->saveCurrentPlaylist(playlist);
-       _player_form->reload();
+       _player_form->reload(true);
 }
 
 void MainWindow::showBusyWidget(QString caption) {
@@ -234,10 +240,10 @@ void MainWindow::_cancelSearch() {
 
 void MainWindow::_toggle_full_screen() {
        if (isFullScreen()) {
-               ui->fscreenButton->setIcon(QIcon(":/icons/fullscreen.png"));
+               ui->fscreenButton->setIcon(QIcon(":/icons/"+_icons_theme+"/fullscreen.png"));
                showNormal();
        } else {
-               ui->fscreenButton->setIcon(QIcon(":/icons/window.png"));
+               ui->fscreenButton->setIcon(QIcon(":/icons/"+_icons_theme+"/window.png"));
                showFullScreen();
        }
 }
@@ -293,3 +299,37 @@ void MainWindow::_equalizer() {
 void MainWindow::_equalizer_value_changed(int band, int val) {
        _player_form->setEqualizerValue(band, (val / 10.0));
 }
+
+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");
+       }
+}
+
+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);
+       } else {
+               _player_form->portraitMode();
+               ui->toolsWidget->setVisible(false);
+       }
+}
index 0239c59..3a59d25 100644 (file)
@@ -46,14 +46,19 @@ public:
 private:
        Ui::MainWindow *ui;
 
+signals:
+       void landscapeMode();
+       void portraitMode();
+
 public slots:
-       void aboutQt();
        void about();
-       void player();
+       void player(bool);
        void library();
+       void settings();
        void showBusyWidget(QString);
        void showSearchPanel();
        void hideSearchPanel();
+       void updateIcons();
 private slots:
        void _add_directory();
        void _save_playlist();
@@ -69,6 +74,7 @@ private slots:
        void _timeout();
        void _equalizer();
        void _equalizer_value_changed(int, int);
+       void _orientation_changed();
 private:
        PlayerForm *_player_form;
        LibraryForm *_library_form;
@@ -76,6 +82,8 @@ private:
        Library *_library;
        QTimer *_timer;
        EqualizerDialog *_equalizer_dialog;
+
+       QString _icons_theme;
 };
 
 #endif // MAINWINDOW_H
index be12b08..ee520da 100644 (file)
@@ -68,6 +68,7 @@ namespace SomePlayer {
                        Phonon::MediaObject* mediaObject() {return _player;}
                        bool equalizerEnabled() {return _equalizer_enabled;}
                        bool equalizerAvailable() {return _equalizer != NULL;}
+                       PlayerState state() {return _state;}
 
                signals:
                        void stateChanged (PlayerState);
index 856edb7..b55e461 100644 (file)
 #include <QResource>
 #include "playlistdialog.h"
 #include "edittagsdialog.h"
+#include "config.h"
 
 using namespace SomePlayer::DataObjects;
 using namespace SomePlayer::Playback;
+using namespace SomePlayer::Storage;
 
 inline void __fill_list(QStandardItemModel *_model, Playlist playlist) {
        _model->clear();
@@ -50,16 +52,18 @@ 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/random_active.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_active.png"));
        } else {
-               ui->randomButton->setIcon(QIcon(":/icons/random_inactive.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_inactive.png"));
        }
        if (_player->repeat()) {
-               ui->repeatButton->setIcon(QIcon(":/icons/repeat_active.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_active.png"));
        } else {
-               ui->repeatButton->setIcon(QIcon(":/icons/repeat_inactive.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_inactive.png"));
        }
        ui->volumeSlider->setMinimum(0);
        ui->volumeSlider->setMaximum(100);
@@ -117,23 +121,25 @@ void PlayerForm::_library() {
        emit library();
 }
 
-void PlayerForm::reload() {
+void PlayerForm::reload(bool reread) {
        if (ui->stackedWidget->currentIndex() == 1) {
                emit hideSearchPanel();
        }
-       _current_playlist = _lib->getCurrentPlaylist();
-       _player->setPlaylist(_current_playlist);
-       __fill_list(_model, _current_playlist);
+       if (reread) {
+               _current_playlist = _lib->getCurrentPlaylist();
+               _player->setPlaylist(_current_playlist);
+               __fill_list(_model, _current_playlist);
+       }
 }
 
 void PlayerForm::_toggle_view() {
        int index = ui->stackedWidget->currentIndex();
        index = (!index % 2);
        if (index) {
-               ui->viewButton->setIcon(QIcon(":/icons/playlist.png"));
+               ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playlist.png"));
                emit hideSearchPanel();
        } else {
-               ui->viewButton->setIcon(QIcon(":/icons/playback.png"));
+               ui->viewButton->setIcon(QIcon(":/icons/"+_icons_theme+"/playback.png"));
                emit showSearchPanel();
        }
        ui->stackedWidget->setCurrentIndex(index);
@@ -194,7 +200,7 @@ void PlayerForm::_delete_track() {
        int id = idx.first().row();
        _current_playlist.removeTrackAt(id);
        _lib->saveCurrentPlaylist(_current_playlist);
-       reload();
+       reload(true);
 }
 
 void PlayerForm::_enqueue_track() {
@@ -211,7 +217,7 @@ void PlayerForm::_add_to_favorites() {
 
 void PlayerForm::_state_changed(PlayerState state) {
        if (state == PLAYER_PLAYING) {
-               ui->playpauseButton->setIcon(QIcon(":/icons/pause.png"));
+               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/pause.png"));
                _seek_slider->setEnabled(true);
        } else {
                if (state == PLAYER_STOPPED) {
@@ -219,25 +225,25 @@ void PlayerForm::_state_changed(PlayerState state) {
                        ui->doneTimeLabel->setText("00:00");
                        _seek_slider->setEnabled(false);
                }
-               ui->playpauseButton->setIcon(QIcon(":/icons/play.png"));
+               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/play.png"));
        }
 }
 
 void PlayerForm::_toggle_random() {
        _player->toggleRandom();
        if (_player->random()) {
-               ui->randomButton->setIcon(QIcon(":/icons/random_active.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_active.png"));
        } else {
-               ui->randomButton->setIcon(QIcon(":/icons/random_inactive.png"));
+               ui->randomButton->setIcon(QIcon(":/icons/"+_icons_theme+"/random_inactive.png"));
        }
 }
 
 void PlayerForm::_toggle_repeat() {
        _player->toggleRepeat();
        if (_player->repeat()) {
-               ui->repeatButton->setIcon(QIcon(":/icons/repeat_active.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_active.png"));
        } else {
-               ui->repeatButton->setIcon(QIcon(":/icons/repeat_inactive.png"));
+               ui->repeatButton->setIcon(QIcon(":/icons/"+_icons_theme+"/repeat_inactive.png"));
        }
 }
 
@@ -324,7 +330,7 @@ void PlayerForm::_edit_tags() {
        if (dialog.exec() == QDialog::Accepted) {
                track.setMetadata(dialog.meta());
                _lib->updateTrackMetadata(track);
-               reload();
+               reload(true);
        }
 }
 
@@ -345,3 +351,43 @@ void PlayerForm::_volume_changed() {
        int value = ui->volumeSlider->value();
        _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"));
+       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"));
+       if (_player->state() == PLAYER_PLAYING)
+               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/pause.png"));
+       else
+               ui->playpauseButton->setIcon(QIcon(":/icons/"+_icons_theme+"/play.png"));
+       ui->stopButton->setIcon(QIcon(":/icons/"+_icons_theme+"/stop.png"));
+       ui->nextButton->setIcon(QIcon(":/icons/"+_icons_theme+"/next.png"));
+       ui->volumeButton->setIcon(QIcon(":/icons/"+_icons_theme+"/volume.png"));
+}
+
+void PlayerForm::landscapeMode() {
+       ui->libraryButton->setVisible(true);
+       ui->repeatButton->setVisible(true);
+       ui->randomButton->setVisible(true);
+       ui->volumeButton->setVisible(true);
+}
+
+void PlayerForm::portraitMode() {
+       ui->libraryButton->setVisible(false);
+       ui->repeatButton->setVisible(false);
+       ui->randomButton->setVisible(false);
+       ui->volumeButton->setVisible(false);
+}
index b1093a4..7d5e3db 100644 (file)
@@ -58,7 +58,7 @@ signals:
        void hideSearchPanel();
 
 public slots:
-       void reload();
+       void reload(bool);
        void search(QString &);
        void nextItem();
        void prevItem();
@@ -69,6 +69,9 @@ 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();
 
 private slots:
        void _library();
@@ -105,6 +108,8 @@ private:
        TagResolver *_tag_resolver;
        void _display_track(Track);
        int _search_current_id;
+
+       QString _icons_theme;
 };
 
 #endif // PLAYERFORM_H
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
new file mode 100644 (file)
index 0000000..63bf2e5
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * 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 "settingsdialog.h"
+#include "ui_settingsdialog.h"
+
+using namespace SomePlayer::Storage;
+
+SettingsDialog::SettingsDialog(QWidget *parent) :
+               QDialog(parent),
+               ui(new Ui::SettingsDialog)
+{
+       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
+       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);
+       }
+       if (albumSorting == "date") {
+               ui->albumsSortDButton->setChecked(true);
+       }
+       if (showTrackLenght == "no") {
+               ui->showTrackLenghtNButton->setChecked(true);
+       }
+       if (portraitEnabled == "disabled") {
+               ui->portraitDisableButton->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)));
+
+       // disabled to 1.4.0
+       ui->albumSortingGroupBox->setVisible(false);
+}
+
+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;
+       config.setValue("ui/albumsorting", "date");
+}
+
+void SettingsDialog::_set_album_sorting_alphabet(bool checked) {
+       if (!checked) return;
+       Config config;
+       config.setValue("ui/albumsorting", "alphabet");
+}
+
+void SettingsDialog::_set_track_lenght_show_no(bool checked) {
+       if (!checked) return;
+       Config config;
+       config.setValue("ui/showtracklenght", "no");
+}
+
+void SettingsDialog::_set_track_lenght_show_yes(bool checked) {
+       if (!checked) return;
+       Config config;
+       config.setValue("ui/showtracklenght", "yes");
+}
+
+void SettingsDialog::_set_portrait_disabled(bool checked) {
+       if (!checked) return;
+       Config config;
+       config.setValue("ui/portraitmode", "disabled");
+}
+
+void SettingsDialog::_set_portrait_enabled(bool checked) {
+       if (!checked) return;
+       Config config;
+       config.setValue("ui/portraitmode", "enabled");
+}
diff --git a/src/settingsdialog.h b/src/settingsdialog.h
new file mode 100644 (file)
index 0000000..272baed
--- /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 SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include <QDialog>
+#include "config.h"
+
+namespace Ui {
+       class SettingsDialog;
+}
+
+class SettingsDialog : public QDialog
+{
+       Q_OBJECT
+
+public:
+       explicit SettingsDialog(QWidget *parent = 0);
+       ~SettingsDialog();
+
+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);
+};
+
+#endif // SETTINGSDIALOG_H
index adcc666..8cb4600 100644 (file)
@@ -47,7 +47,7 @@ namespace SomePlayer {
 #include "config.h"
 
 #define _DYNAMIC_PLAYLIST_MAX_COUNT_ 50
-#define _SOMEPLAYER_VERSION_ "1.3.1"
+#define _SOMEPLAYER_VERSION_ "1.3.2"
 #define NDEBUG
 
 #endif
index 0e91255..e68c441 100644 (file)
@@ -84,7 +84,7 @@
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/back.png</normaloff>:/icons/back.png</iconset>
+         <normaloff>:/icons/white/back.png</normaloff>:/icons/white/back.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/select_all.png</normaloff>:/icons/select_all.png</iconset>
+         <normaloff>:/icons/white/select_all.png</normaloff>:/icons/white/select_all.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/add.png</normaloff>:/icons/add.png</iconset>
+         <normaloff>:/icons/white/add.png</normaloff>:/icons/white/add.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/delete.png</normaloff>:/icons/delete.png</iconset>
+         <normaloff>:/icons/white/delete.png</normaloff>:/icons/white/delete.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/use.png</normaloff>:/icons/use.png</iconset>
+         <normaloff>:/icons/white/use.png</normaloff>:/icons/white/use.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/player.png</normaloff>:/icons/player.png</iconset>
+         <normaloff>:/icons/white/player.png</normaloff>:/icons/white/player.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/artists.png</normaloff>:/icons/artists.png</iconset>
+         <normaloff>:/icons/white/artists.png</normaloff>:/icons/white/artists.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/dynamic.png</normaloff>:/icons/dynamic.png</iconset>
+         <normaloff>:/icons/white/dynamic.png</normaloff>:/icons/white/dynamic.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/playlists.png</normaloff>:/icons/playlists.png</iconset>
+         <normaloff>:/icons/white/playlists.png</normaloff>:/icons/white/playlists.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
index 4361c8d..8379eef 100644 (file)
   <widget class="QWidget" name="centralWidget">
    <layout class="QVBoxLayout" name="verticalLayout">
     <item>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <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/fullscreen.png</normaloff>:/icons/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/back.png</normaloff>:/icons/back.png</iconset>
-          </property>
-          <property name="flat">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLineEdit" name="searchLine">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>500</width>
-            <height>60</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>16777215</width>
-            <height>60</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="nextButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>60</width>
-            <height>60</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>60</width>
-            <height>60</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-          <property name="icon">
-           <iconset resource="../../resources/resources.qrc">
-            <normaloff>:/icons/forward.png</normaloff>:/icons/forward.png</iconset>
-          </property>
-          <property name="flat">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer_2">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>40</width>
-          <height>20</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QPushButton" name="searchButton">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>60</width>
-          <height>60</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>60</width>
-          <height>60</height>
-         </size>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-        <property name="icon">
-         <iconset resource="../../resources/resources.qrc">
-          <normaloff>:/icons/search.png</normaloff>:/icons/search.png</iconset>
-        </property>
-        <property name="flat">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
+     <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>
     <item>
      <widget class="QStackedWidget" name="stackedWidget">
    </property>
    <widget class="QMenu" name="menuHelp">
     <property name="title">
-     <string>Help</string>
+     <string>Main</string>
     </property>
     <addaction name="actionAbout"/>
-    <addaction name="actionAbout_Qt"/>
+    <addaction name="actionSettings"/>
    </widget>
    <widget class="QMenu" name="menuLibrary">
     <property name="title">
     <string>About</string>
    </property>
   </action>
-  <action name="actionAbout_Qt">
+  <action name="actionSettings">
    <property name="text">
-    <string>About Qt</string>
+    <string>Settings</string>
    </property>
   </action>
  </widget>
index 97219a9..de3abf4 100644 (file)
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/library.png</normaloff>:/icons/library.png</iconset>
+         <normaloff>:/icons/white/library.png</normaloff>:/icons/white/library.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/playlist.png</normaloff>:/icons/playlist.png</iconset>
+         <normaloff>:/icons/white/playlist.png</normaloff>:/icons/white/playlist.png</iconset>
        </property>
        <property name="checkable">
         <bool>false</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/random_inactive.png</normaloff>:/icons/random_inactive.png</iconset>
+         <normaloff>:/icons/white/random_inactive.png</normaloff>:/icons/white/random_inactive.png</iconset>
        </property>
        <property name="iconSize">
         <size>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/repeat_inactive.png</normaloff>:/icons/repeat_inactive.png</iconset>
+         <normaloff>:/icons/white/repeat_inactive.png</normaloff>:/icons/white/repeat_inactive.png</iconset>
        </property>
        <property name="iconSize">
         <size>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/prev.png</normaloff>:/icons/prev.png</iconset>
+         <normaloff>:/icons/white/prev.png</normaloff>:/icons/white/prev.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/play.png</normaloff>:/icons/play.png</iconset>
+         <normaloff>:/icons/white/play.png</normaloff>:/icons/white/play.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/stop.png</normaloff>:/icons/stop.png</iconset>
+         <normaloff>:/icons/white/stop.png</normaloff>:/icons/white/stop.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/next.png</normaloff>:/icons/next.png</iconset>
+         <normaloff>:/icons/white/next.png</normaloff>:/icons/white/next.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
        </property>
        <property name="icon">
         <iconset resource="../../resources/resources.qrc">
-         <normaloff>:/icons/volume.png</normaloff>:/icons/volume.png</iconset>
+         <normaloff>:/icons/white/volume.png</normaloff>:/icons/white/volume.png</iconset>
        </property>
        <property name="flat">
         <bool>true</bool>
diff --git a/src/ui/settingsdialog.ui b/src/ui/settingsdialog.ui
new file mode 100644 (file)
index 0000000..5208f75
--- /dev/null
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>480</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Settings</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_2">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QScrollArea" name="scrollArea">
+       <property name="widgetResizable">
+        <bool>true</bool>
+       </property>
+       <widget class="QWidget" name="scrollAreaWidgetContents">
+        <property name="geometry">
+         <rect>
+          <x>0</x>
+          <y>-88</y>
+          <width>760</width>
+          <height>296</height>
+         </rect>
+        </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>
+           </property>
+           <property name="title">
+            <string/>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_3">
+            <item>
+             <widget class="QLabel" name="label_2">
+              <property name="text">
+               <string>Sort album:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="horizontalLayout_3">
+              <item>
+               <widget class="QRadioButton" name="albumsSortAButton">
+                <property name="text">
+                 <string>Alphabetical</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QRadioButton" name="albumsSortDButton">
+                <property name="text">
+                 <string>By date</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item>
+          <widget class="QGroupBox" name="groupBox_3">
+           <property name="title">
+            <string/>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_5">
+            <item>
+             <widget class="QLabel" name="label_4">
+              <property name="text">
+               <string>Enable portrait mode:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="horizontalLayout_5">
+              <item>
+               <widget class="QRadioButton" name="portraitEnableButton">
+                <property name="text">
+                 <string>Enable</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QRadioButton" name="portraitDisableButton">
+                <property name="text">
+                 <string>Disable</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item>
+          <widget class="QGroupBox" name="groupBox_2">
+           <property name="title">
+            <string/>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_4">
+            <item>
+             <widget class="QLabel" name="label_3">
+              <property name="text">
+               <string>Show track lenght in library view:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="horizontalLayout_4">
+              <item>
+               <widget class="QRadioButton" name="showTrackLenghtYButton">
+                <property name="text">
+                 <string>Yes</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QRadioButton" name="showTrackLenghtNButton">
+                <property name="text">
+                 <string>No</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </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="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>SettingsDialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>SettingsDialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>