Fixed crash when no gstreamer0.10-plugins-good-extra package installed
[someplayer] / src / mainwindow.h
1 /*
2  * SomePlayer - An alternate music player for Maemo 5
3  * Copyright (C) 2010 Nikolay (somebody) Tischenko <niktischenko@gmail.com>
4  *
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.
9  *
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.
14  *
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.
18  */
19
20 #ifndef MAINWINDOW_H
21 #define MAINWINDOW_H
22
23 #include <QMainWindow>
24 #include <QMessageBox>
25 #include "playerform.h"
26 #include "libraryform.h"
27 #include "busywidget.h"
28 #include "equalizerdialog.h"
29 #include "library.h"
30 #include <QTimer>
31
32 namespace Ui {
33         class MainWindow;
34 }
35
36 using SomePlayer::DataObjects::Library;
37
38 class MainWindow : public QMainWindow
39 {
40         Q_OBJECT
41
42 public:
43         explicit MainWindow(QWidget *parent = 0);
44         ~MainWindow();
45
46 private:
47         Ui::MainWindow *ui;
48
49 public slots:
50         void aboutQt();
51         void about();
52         void player();
53         void library();
54         void showBusyWidget(QString);
55         void showSearchPanel();
56         void hideSearchPanel();
57 private slots:
58         void _add_directory();
59         void _save_playlist();
60         void _clear_current_playlist();
61         void _add_files();
62         void _toggle_search_line();
63         void _search(QString);
64         void _nextItem();
65         void _prevItem();
66         void _cancelSearch();
67         void _toggle_full_screen();
68         void _set_timer();
69         void _timeout();
70         void _equalizer();
71         void _equalizer_value_changed(int, int);
72 private:
73         PlayerForm *_player_form;
74         LibraryForm *_library_form;
75         BusyWidget *_busy_widget;
76         Library *_library;
77         QTimer *_timer;
78         EqualizerDialog *_equalizer_dialog;
79 };
80
81 #endif // MAINWINDOW_H