df6c266e3ba3d11333501b27100d265013dbb72d
[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 "managelibraryform.h"
30 #include "library.h"
31 #include <QTimer>
32
33 namespace Ui {
34         class MainWindow;
35 }
36
37 using SomePlayer::DataObjects::Library;
38
39 class MainWindow : public QMainWindow
40 {
41         Q_OBJECT
42
43 public:
44         explicit MainWindow(QWidget *parent = 0);
45         ~MainWindow();
46
47 private:
48         Ui::MainWindow *ui;
49
50 signals:
51         void landscapeMode();
52         void portraitMode();
53
54 public slots:
55         void about();
56         void player();
57         void library();
58         void settings();
59         void showBusyWidget(QString);
60 private slots:
61         void _manage_library();
62 //      void _add_directory();
63         void _save_playlist();
64         void _clear_current_playlist();
65         void _add_files();
66         void _set_timer();
67         void _timeout();
68         void _equalizer();
69         void _equalizer_value_changed(int, int);
70         void _orientation_changed();
71         void _fullscreen(bool);
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         ManageLibraryForm *_manage_library_form;
80 };
81
82 #endif // MAINWINDOW_H