<file>window.png</file>
<file>fullscreen.png</file>
<file>volume.png</file>
+ <file>select_all.png</file>
+ <file>deselect_all.png</file>
</qresource>
</RCC>
src/taglib/wavpack/wavpackproperties.cpp \
src/taglib/wavpack/wavpackfile.cpp \
src/edittagsdialog.cpp \
- src/timerdialog.cpp
+ src/timerdialog.cpp \
+ src/equalizerdialog.cpp
HEADERS += src/mainwindow.h \
src/player/player.h \
src/taglib/wavpack/wavpackproperties.h \
src/taglib/wavpack/wavpackfile.h \
src/edittagsdialog.h \
- src/timerdialog.h
+ src/timerdialog.h \
+ src/equalizerdialog.h
FORMS += src/ui/mainwindow.ui \
src/ui/playerform.ui \
src/ui/busywidget.ui \
src/ui/playlistdialog.ui \
src/ui/edittagsdialog.ui \
- src/ui/timerdialog.ui
+ src/ui/timerdialog.ui \
+ src/ui/equalizerdialog.ui
CONFIG += mobility
MOBILITY =
#include "busywidget.h"
#include "ui_busywidget.h"
-#include <QDebug>
BusyWidget::BusyWidget(QWidget *parent) :
QWidget(parent),
+/*
+ * 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 "config.h"
#include <QString>
#include <QDir>
+/*
+ * 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 CONFIG_H
#define CONFIG_H
#include "dbstorage.h"
#include <QSqlQuery>
#include <QSqlResult>
-#include <QDebug>
using namespace SomePlayer::Storage;
using namespace SomePlayer::DataObjects;
int artist_id = _check_add_artist(artist);
int album_id = _check_add_album(album, artist_id);
if (artist_id == -1 || album_id == -1) {
- qDebug () << "one";
//big bang
return;
}
query->bindValue(":source", source);
query->exec();
if (query->next()) {
- qDebug () << "two";
// already in datebase, skip
return;
}
if (query->exec()) {
// ok
} else {
- qDebug () << "three";
// big bang
}
} else {
- qDebug () << "four";
// big bang
}
} else {
- qDebug () << "five";
// big bang
}
}
Track DbStorage::updateTrack(Track track) {
QSqlQuery *query = _remove_track_query;
query->bindValue(":id", track.id());
- if (!query->exec()) {
- qDebug() << "Problem here";
- }
addTrack(track);
query = _get_track_by_source_query;
query->bindValue(":source", track.source());
query->exec();
if (query->next()) {
- qDebug() << "enter";
int id = query->value(0).toInt();
- qDebug() << id;
QString title = query->value(1).toString();
- qDebug() << title;
QString artist = query->value(2).toString();
- qDebug() << artist;
QString album = query->value(3).toString();
- qDebug() << album;
QString source = query->value(4).toString();
- qDebug() << source;
int count = query->value(5).toInt();
int length = query->value(6).toInt();
TrackMetadata meta(title, artist, album, length);
--- /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 "equalizerdialog.h"
+#include "ui_equalizerdialog.h"
+
+EqualizerDialog::EqualizerDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::EqualizerDialog)
+{
+ ui->setupUi(this);
+ ui->band0Slider->setMinimum(-240);
+ ui->band0Slider->setValue(0);
+ ui->band1Slider->setMinimum(-240);
+ ui->band1Slider->setValue(0);
+ ui->band2Slider->setMinimum(-240);
+ ui->band2Slider->setValue(0);
+ ui->band3Slider->setMinimum(-240);
+ ui->band3Slider->setValue(0);
+ ui->band4Slider->setMinimum(-240);
+ ui->band4Slider->setValue(0);
+ ui->band5Slider->setMinimum(-240);
+ ui->band5Slider->setValue(0);
+ ui->band6Slider->setMinimum(-240);
+ ui->band6Slider->setValue(0);
+ ui->band7Slider->setMinimum(-240);
+ ui->band7Slider->setValue(0);
+ ui->band8Slider->setMinimum(-240);
+ ui->band8Slider->setValue(0);
+ ui->band9Slider->setMinimum(-240);
+ ui->band9Slider->setValue(0);
+
+ ui->band0Slider->setMaximum(120);
+ ui->band1Slider->setMaximum(120);
+ ui->band2Slider->setMaximum(120);
+ ui->band3Slider->setMaximum(120);
+ ui->band4Slider->setMaximum(120);
+ ui->band5Slider->setMaximum(120);
+ ui->band6Slider->setMaximum(120);
+ ui->band7Slider->setMaximum(120);
+ ui->band8Slider->setMaximum(120);
+ ui->band9Slider->setMaximum(120);
+
+ connect(ui->band0Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value0_changed(int)));
+ connect(ui->band1Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value1_changed(int)));
+ connect(ui->band2Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value2_changed(int)));
+ connect(ui->band3Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value3_changed(int)));
+ connect(ui->band4Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value4_changed(int)));
+ connect(ui->band5Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value5_changed(int)));
+ connect(ui->band6Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value6_changed(int)));
+ connect(ui->band7Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value7_changed(int)));
+ connect(ui->band8Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value8_changed(int)));
+ connect(ui->band9Slider, SIGNAL(sliderMoved(int)), this, SLOT(_value9_changed(int)));
+
+ connect(ui->enableToggleButton, SIGNAL(clicked()), this, SLOT(_state_changed()));
+
+}
+
+EqualizerDialog::~EqualizerDialog()
+{
+ delete ui;
+}
+
+void EqualizerDialog::setValue(int band, int val) {
+ switch (band) {
+ case 0:
+ ui->band0Slider->setValue(val); break;
+ case 1:
+ ui->band1Slider->setValue(val); break;
+ case 2:
+ ui->band2Slider->setValue(val); break;
+ case 3:
+ ui->band3Slider->setValue(val); break;
+ case 4:
+ ui->band4Slider->setValue(val); break;
+ case 5:
+ ui->band5Slider->setValue(val); break;
+ case 6:
+ ui->band6Slider->setValue(val); break;
+ case 7:
+ ui->band7Slider->setValue(val); break;
+ case 8:
+ ui->band8Slider->setValue(val); break;
+ case 9:
+ ui->band9Slider->setValue(val); break;
+ }
+
+}
+
+void EqualizerDialog::_state_changed() {
+ if (ui->enableToggleButton->isChecked()) {
+ setEqualizerEnabled(true);
+ emit equalizerEnabled();
+ } else {
+ setEqualizerEnabled(false);
+ emit equalizerDisabled();
+ }
+}
+
+void EqualizerDialog::setEqualizerEnabled(bool enabled) {
+ ui->band0Slider->setEnabled(enabled);
+ ui->band1Slider->setEnabled(enabled);
+ ui->band2Slider->setEnabled(enabled);
+ ui->band3Slider->setEnabled(enabled);
+ ui->band4Slider->setEnabled(enabled);
+ ui->band5Slider->setEnabled(enabled);
+ ui->band6Slider->setEnabled(enabled);
+ ui->band7Slider->setEnabled(enabled);
+ ui->band8Slider->setEnabled(enabled);
+ ui->band9Slider->setEnabled(enabled);
+ ui->enableToggleButton->setChecked(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 EQUALIZERDIALOG_H
+#define EQUALIZERDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class EqualizerDialog;
+}
+
+class EqualizerDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ explicit EqualizerDialog(QWidget *parent = 0);
+ ~EqualizerDialog();
+signals:
+ void valueChanged(int, int);
+ void equalizerDisabled();
+ void equalizerEnabled();
+
+public slots:
+ void setValue(int, int);
+ void setEqualizerEnabled(bool);
+
+private slots:
+ void _value0_changed(int v) { emit valueChanged(0, v);}
+ void _value1_changed(int v) { emit valueChanged(1, v);}
+ void _value2_changed(int v) { emit valueChanged(2, v);}
+ void _value3_changed(int v) { emit valueChanged(3, v);}
+ void _value4_changed(int v) { emit valueChanged(4, v);}
+ void _value5_changed(int v) { emit valueChanged(5, v);}
+ void _value6_changed(int v) { emit valueChanged(6, v);}
+ void _value7_changed(int v) { emit valueChanged(7, v);}
+ void _value8_changed(int v) { emit valueChanged(8, v);}
+ void _value9_changed(int v) { emit valueChanged(9, v);}
+
+ void _state_changed();
+private:
+ Ui::EqualizerDialog *ui;
+};
+
+#endif // EQUALIZERDIALOG_H
#include <QFileInfo>
#include <QTextStream>
#include <QRegExp>
-#include <QDebug>
using namespace SomePlayer::Storage;
using namespace SomePlayer::DataObjects;
*/
#include "library.h"
-#include <QDebug>
using namespace SomePlayer::DataObjects;
using namespace SomePlayer::Storage;
#include <QModelIndexList>
#include "track.h"
#include "playlist.h"
-#include <QDebug>
#include <QTime>
#include <QQueue>
+#include <QMessageBox>
using namespace SomePlayer::DataObjects;
connect(ui->dynamicButton, SIGNAL(clicked()), this, SLOT(_dynamic_button()));
connect(ui->listView, SIGNAL(clicked(QModelIndex)), this, SLOT(_process_list_click(QModelIndex)));
connect(ui->addButton, SIGNAL(clicked()), this, SLOT(_add_button()));
+ connect(ui->selectAllButton, SIGNAL(clicked()), this, SLOT(_toggle_select_all_button()));
connect(ui->backButton, SIGNAL(clicked()), this, SLOT(_back_button()));
connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(_delete_button()));
connect(ui->useButton, SIGNAL(clicked()), this, SLOT(_use_button()));
int count = to_delete.count();
for (int i = count-1; i >= 0; i--) {
_current_playlist.removeTrackAt(to_delete.at(i));
- qDebug() << "Removing from" << _current_playlist.name() << to_delete.at(i);
}
_current_tracks = _current_playlist.tracks();
_lib->savePlaylist(_current_playlist);
for (int i = count-1; i >= 0; i--) {
QString name = _model->item(to_delete.at(i))->text();
if (name != _CURRENT_PLAYLIST_SUBST_) {
- qDebug() << "deleting " << name;
_lib->removePlaylist(name);
_model->removeRow(to_delete.at(i));
}
break;
}
}
+
+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"));
+ } else {
+ ui->listView->selectAll();
+ ui->selectAllButton->setIcon(QIcon(":/icons/deselect_all.png"));
+ }
+}
+
void _view_button();
void _dynamic_button();
void _playlists_button();
+ void _toggle_select_all_button();
void _add_button();
void _delete_button();
void _back_button();
#include "library.h"
#include "timerdialog.h"
+#include "equalizerdialog.h"
using namespace SomePlayer::DataObjects;
using namespace SomePlayer::Storage;
_library_form = new LibraryForm(_library, ui->stackedWidget);
_busy_widget = new BusyWidget(ui->stackedWidget);
_timer = new QTimer(this);
+ _equalizer_dialog = new EqualizerDialog(this);
ui->stackedWidget->insertWidget(0, _player_form);
ui->stackedWidget->insertWidget(1, _library_form);
ui->stackedWidget->insertWidget(2, _busy_widget);
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");
connect(_player_form, SIGNAL(library()), this, SLOT(library()));
connect(_library_form, SIGNAL(player()), this, SLOT(player()));
connect(add_directory, SIGNAL(triggered()), this, SLOT(_add_directory()));
connect(clear_playlist, SIGNAL(triggered()), this, SLOT(_clear_current_playlist()));
connect(add_files, SIGNAL(triggered()), this, SLOT(_add_files()));
connect(set_timer, SIGNAL(triggered()), this, SLOT(_set_timer()));
+ connect(equalizer, SIGNAL(triggered()), this, SLOT(_equalizer()));
connect(_library, SIGNAL(done()), this, SLOT(library()));
connect(_library, SIGNAL(done()), _library_form, SLOT(refresh()));
connect(_library, SIGNAL(addingTracks(int)), _busy_widget, SLOT(setMax(int)));
connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(_prevItem()));
connect(ui->fscreenButton, SIGNAL(clicked()), this, SLOT(_toggle_full_screen()));
connect(_timer, SIGNAL(timeout()), this, SLOT(_timeout()));
+ connect(_equalizer_dialog, SIGNAL(valueChanged(int,int)), this, SLOT(_equalizer_value_changed(int, int)));
+ connect(_equalizer_dialog, SIGNAL(equalizerEnabled()), _player_form, SLOT(enableEqualizer()));
+ connect(_equalizer_dialog, SIGNAL(equalizerDisabled()), _player_form, SLOT(disableEqualizer()));
hideSearchPanel();
library();
}
_player_form->stop();
_timer->stop();
}
+
+void MainWindow::_equalizer() {
+ if (_player_form->isEqualizerAvailable()) {
+ double val = 0;
+ for (int i = 0; i < 10; i++) {
+ _player_form->equalizerValue(i, &val);
+ _equalizer_dialog->setValue(i, (int)(val * 10 + 0.5));
+ }
+ _equalizer_dialog->setEqualizerEnabled(_player_form->isEqualizerEnabled());
+ _equalizer_dialog->exec();
+ } else {
+ QMessageBox::information(this, "Error", "No equalizer support. Please install gstreamer0.10-plugins-good-extra");
+ }
+}
+
+void MainWindow::_equalizer_value_changed(int band, int val) {
+ _player_form->setEqualizerValue(band, (val / 10.0));
+}
#include "playerform.h"
#include "libraryform.h"
#include "busywidget.h"
+#include "equalizerdialog.h"
#include "library.h"
#include <QTimer>
void _toggle_full_screen();
void _set_timer();
void _timeout();
+ void _equalizer();
+ void _equalizer_value_changed(int, int);
private:
PlayerForm *_player_form;
LibraryForm *_library_form;
BusyWidget *_busy_widget;
Library *_library;
QTimer *_timer;
+ EqualizerDialog *_equalizer_dialog;
};
#endif // MAINWINDOW_H
#include "player.h"
#include <phonon/MediaSource>
+#include <phonon/Effect>
+#include <phonon/BackendCapabilities>
+#include <phonon/EffectParameter>
+#include "../config.h"
+#include <QTime>
using namespace SomePlayer::Playback;
using namespace SomePlayer::DataObjects;
_player = new Phonon::MediaObject(this);
_output = new Phonon::AudioOutput(Phonon::MusicCategory, this);
_player->setTickInterval(1000);
+ _equalizer == NULL;
+ _equalizer_enabled == false;
+ QList<Phonon::EffectDescription> effects = Phonon::BackendCapabilities::availableAudioEffects();
+ foreach (Phonon::EffectDescription desc, effects) {
+ if (desc.name() == "equalizer-10bands") {
+ _equalizer = new Phonon::Effect(desc, this);
+ Config config;
+ if (config.getValue("equalizer/equalizer").toString() == "enabled") {
+ for (int i = 0; i < 10; i++) {
+ QVariant var = config.getValue(QString("equalizer/band%1").arg(i));
+ setEqualizerValue(i, var.toDouble());
+ }
+ _equalizer_enabled = true;
+ } else if (config.getValue("equalizer/equalizer") == "") {
+ for (int i = 0; i < 10; i++) {
+ config.setValue(QString("equalizer/band%1").arg(i), 0);
+ }
+ }
+ }
+ }
connect(_player, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(_stateChanged(Phonon::State,Phonon::State)));
connect(_player, SIGNAL(tick(qint64)), this, SLOT(_tick(qint64)));
- Phonon::createPath(_player, _output);
- int seed = reinterpret_cast<int> (_player);
+ _path = Phonon::createPath(_player, _output);
+ int seed = QTime::currentTime().msec();
qsrand(seed);
_random = _config.getValue("playback/random").toBool();
_repeat = _config.getValue("playback/repeat").toBool();
break;
case Phonon::ErrorState:
_state = PLAYER_ERROR;
- qDebug() << _player->errorString();
break;
}
}
void Player::setVolume(int v) {
_output->setVolume(v*0.01);
}
+
+void Player::equalizerValue(int band, double *val) {
+ if (band < 0 || band > 9) {
+ *val = -24;
+ return;
+ }
+ if (_equalizer_enabled) {
+ QList<Phonon::EffectParameter> plist = _equalizer->parameters();
+ QVariant var = _equalizer->parameterValue(plist[band]);
+ *val = var.toDouble();
+ }
+}
+
+void Player::enableEqualizer() {
+ _equalizer_enabled = true;
+ _path.insertEffect(_equalizer);
+ Config config;
+ config.setValue("equalizer/equalizer", "enabled");
+}
+
+void Player::disableEqualizer() {
+ _equalizer_enabled = false;
+ _path.removeEffect(_equalizer);
+ Config config;
+ config.setValue("equalizer/equalizer", "disabled");
+}
+
+void Player::setEqualizerValue(int band, double value) {
+ if (band < 0 || band > 9 || value < -24 || value > 12) {
+ return;
+ }
+ QList<Phonon::EffectParameter> plist = _equalizer->parameters();
+ _equalizer->setParameterValue(plist[band], QVariant::fromValue(value));
+ Config config;
+ config.setValue(QString("equalizer/band%1").arg(band), value);
+}
+/*
+ * 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 PLAYER_H
#define PLAYER_H
#include <phonon/MediaObject>
#include <phonon/AudioOutput>
#include <phonon/VolumeSlider>
+#include <phonon/Effect>
+#include <phonon/Path>
#include <QStack>
#include <QQueue>
bool repeat() {return _repeat;}
int volume() {return (int)(_output->volume()*100 + 0.5);}
Phonon::MediaObject* mediaObject() {return _player;}
+ bool equalizerEnabled() {return _equalizer_enabled;}
+ bool equalizerAvailable() {return _equalizer != NULL;}
signals:
void stateChanged (PlayerState);
void toggleRepeat();
void seek(int);
void setVolume(int);
+ void enableEqualizer();
+ void disableEqualizer();
+ void setEqualizerValue(int band, double value);
+ void equalizerValue(int band, double *);
private slots:
void _stateChanged(Phonon::State, Phonon::State);
void _tick(qint64);
Track _track; // current track (workaround)
bool _random;
bool _repeat;
+ bool _equalizer_enabled;
QStack<int> _history;
QQueue<int> _queue;
QStack<int> _prev_history;
Playlist _playlist;
Phonon::MediaObject *_player;
Phonon::AudioOutput *_output;
+ Phonon::Path _path;
+ Phonon::Effect *_equalizer;
PlayerState _state;
Config _config;
#include "ui_playerform.h"
#include "library.h"
#include "player/player.h"
-#include <QDebug>
#include <QTime>
#include <QSlider>
#include "trackrenderer.h"
public:
explicit PlayerForm(Library *lib, QWidget *parent = 0);
- ~PlayerForm();
+ ~PlayerForm();
+ bool isEqualizerEnabled() { return _player->equalizerEnabled(); }
+ bool isEqualizerAvailable() { return _player->equalizerAvailable(); }
+
signals:
void library();
void showSearchPanel();
void cancelSearch();
void addFiles(QList<QString> files);
void stop();
+ void setEqualizerValue(int band, double value) { _player->setEqualizerValue(band, value); }
+ void equalizerValue(int band, double *value) { _player->equalizerValue(band, value); }
+ void enableEqualizer() { _player->enableEqualizer(); }
+ void disableEqualizer() { _player->disableEqualizer(); }
private slots:
void _library();
*/
#include "playlist.h"
-#include <QDebug>
using namespace SomePlayer::DataObjects;
#include "config.h"
#define _DYNAMIC_PLAYLIST_MAX_COUNT_ 50
-#define _SOMEPLAYER_VERSION_ "1.2.1"
+#define _SOMEPLAYER_VERSION_ "1.2.2"
#define NDEBUG
#endif
*/
#include "tagresolver.h"
-#include <QDebug>
#include <QFile>
#include <tag.h>
#include <fileref.h>
+/*
+ * 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 "timerdialog.h"
#include "ui_timerdialog.h"
-#include <QDebug>
TimerDialog::TimerDialog(QWidget *parent) :
QDialog(parent),
+/*
+ * 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 TIMERDIALOG_H
#define TIMERDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>EqualizerDialog</class>
+ <widget class="QDialog" name="EqualizerDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Equalizer</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QSlider" name="band0Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band1Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band2Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band3Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band4Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band5Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band6Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band7Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band8Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="band9Slider">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QPushButton" name="enableToggleButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Enable</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="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>EqualizerDialog</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>EqualizerDialog</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>
</widget>
</item>
<item>
+ <widget class="QPushButton" name="selectAllButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../resources/resources.qrc">
+ <normaloff>:/icons/select_all.png</normaloff>:/icons/select_all.png</iconset>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QPushButton" name="addButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="invertedControls">
+ <bool>false</bool>
+ </property>
</widget>
</item>
</layout>