<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>
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 \
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 \
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 =
Config::Config()
{
_settings = new QSettings(QString(applicationDir())+"/settings.ini", QSettings::IniFormat);
+ if (_settings->value("ui/iconstheme").toString() == "") {
+ _settings->setValue("ui/iconstheme", "white");
+ }
}
Config::~Config() {
#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;
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()));
}
}
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() {
switch (_state) {
case STATE_ARTIST:
__fill_model(_model, _lib->getAlbumsForArtist(data));
+ ui->listView->scrollToTop();
_current_artist = data;
_state = STATE_ALBUM;
ui->backButton->show();
_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));
_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();
}
_current_tracks = _current_playlist.tracks();
__fill_model_tracks(_model, _current_tracks);
+ ui->listView->scrollToTop();
_state = STATE_PLAYLIST_TRACK;
ui->backButton->show();
ui->useButton->show();
Playlist current = _lib->getCurrentPlaylist();
current.addTrack(track);
_lib->saveCurrentPlaylist(current);
+ _current_playlist_changed = true;
}
void LibraryForm::_add_playlist(QString name) {
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;
}
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();
}
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"));
+}
explicit LibraryForm(Library *lib, QWidget *parent = 0);
~LibraryForm();
signals:
- void player();
+ void player(bool);
void busy(QString);
void done();
public slots:
void prevItem();
void cancelSearch();
void refresh();
+ void updateIcons();
private slots:
void _player();
void _view_button();
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
#include <QMessageBox>
#include <QInputDialog>
#include <QFile>
+#include <QDesktopWidget>
#include "player/player.h"
#include "timerdialog.h"
#include "equalizerdialog.h"
#include "saveplaylistdialog.h"
+#include "settingsdialog.h"
using namespace SomePlayer::DataObjects;
using namespace SomePlayer::Storage;
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);
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()));
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();
}
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();
Playlist playlist = _library->getCurrentPlaylist();
playlist.clear();
_library->saveCurrentPlaylist(playlist);
- _player_form->reload();
+ _player_form->reload(true);
}
void MainWindow::showBusyWidget(QString caption) {
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();
}
}
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);
+ }
+}
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();
void _timeout();
void _equalizer();
void _equalizer_value_changed(int, int);
+ void _orientation_changed();
private:
PlayerForm *_player_form;
LibraryForm *_library_form;
Library *_library;
QTimer *_timer;
EqualizerDialog *_equalizer_dialog;
+
+ QString _icons_theme;
};
#endif // MAINWINDOW_H
Phonon::MediaObject* mediaObject() {return _player;}
bool equalizerEnabled() {return _equalizer_enabled;}
bool equalizerAvailable() {return _equalizer != NULL;}
+ PlayerState state() {return _state;}
signals:
void stateChanged (PlayerState);
#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();
_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);
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);
int id = idx.first().row();
_current_playlist.removeTrackAt(id);
_lib->saveCurrentPlaylist(_current_playlist);
- reload();
+ reload(true);
}
void PlayerForm::_enqueue_track() {
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) {
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"));
}
}
if (dialog.exec() == QDialog::Accepted) {
track.setMetadata(dialog.meta());
_lib->updateTrackMetadata(track);
- reload();
+ reload(true);
}
}
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);
+}
void hideSearchPanel();
public slots:
- void reload();
+ void reload(bool);
void search(QString &);
void nextItem();
void prevItem();
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();
TagResolver *_tag_resolver;
void _display_track(Track);
int _search_current_id;
+
+ QString _icons_theme;
};
#endif // PLAYERFORM_H
--- /dev/null
+/*
+ * 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");
+}
--- /dev/null
+/*
+ * 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
#include "config.h"
#define _DYNAMIC_PLAYLIST_MAX_COUNT_ 50
-#define _SOMEPLAYER_VERSION_ "1.3.1"
+#define _SOMEPLAYER_VERSION_ "1.3.2"
#define NDEBUG
#endif
</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>
<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>
</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>
--- /dev/null
+<?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>