2 * SomePlayer - An alternate music player for Maemo 5
3 * Copyright (C) 2010 Nikolay (somebody) Tischenko <niktischenko@gmail.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #include "someplayer.h"
26 #include <QStandardItemModel>
27 #include "player/player.h"
31 #include "trackrenderer.h"
32 #include "tagresolver.h"
38 using SomePlayer::DataObjects::Library;
39 using SomePlayer::DataObjects::Playlist;
40 using SomePlayer::DataObjects::Track;
41 using SomePlayer::Playback::Player;
42 using SomePlayer::Playback::PlayerState;
43 using SomePlayer::DataObjects::TagResolver;
45 class PlayerForm : public QWidget
50 explicit PlayerForm(Library *lib, QWidget *parent = 0);
52 bool isEqualizerEnabled() { return _player->equalizerEnabled(); }
53 bool isEqualizerAvailable() { return _player->equalizerAvailable(); }
57 void showSearchPanel();
58 void hideSearchPanel();
62 void search(QString &);
66 void addFiles(QList<QString> files);
68 void setEqualizerValue(int band, double value) { _player->setEqualizerValue(band, value); }
69 void equalizerValue(int band, double *value) { _player->equalizerValue(band, value); }
70 void enableEqualizer() { _player->enableEqualizer(); }
71 void disableEqualizer() { _player->disableEqualizer(); }
76 void _process_click(QModelIndex);
77 void _track_changed(Track);
79 void _slider_released();
80 void _custom_context_venu_requested ( const QPoint & pos );
82 void _enqueue_track();
83 void _add_to_favorites();
84 void _add_to_playlists();
86 void _state_changed(PlayerState);
87 void _toggle_repeat();
88 void _toggle_random();
89 void _toggle_volume();
90 void _track_decoded(Track);
91 void _volume_changed();
96 Playlist _current_playlist;
98 QStandardItemModel *_model;
100 QSlider *_seek_slider;
101 QMenu *_context_menu;
102 QString _search_pattern;
104 TrackRenderer *_track_renderer;
105 TagResolver *_tag_resolver;
106 void _display_track(Track);
107 int _search_current_id;
110 #endif // PLAYERFORM_H