Added D-Bus support
[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 signals:
50         void landscapeMode();
51         void portraitMode();
52
53 public slots:
54         void about();
55         void player(bool);
56         void library();
57         void settings();
58         void showBusyWidget(QString);
59         void showSearchPanel();
60         void hideSearchPanel();
61         void updateIcons();
62 private slots:
63         void _add_directory();
64         void _save_playlist();
65         void _clear_current_playlist();
66         void _add_files();
67         void _toggle_search_line();
68         void _search(QString);
69         void _nextItem();
70         void _prevItem();
71         void _cancelSearch();
72         void _toggle_full_screen();
73         void _set_timer();
74         void _timeout();
75         void _equalizer();
76         void _equalizer_value_changed(int, int);
77         void _orientation_changed();
78 private:
79         PlayerForm *_player_form;
80         LibraryForm *_library_form;
81         BusyWidget *_busy_widget;
82         Library *_library;
83         QTimer *_timer;
84         EqualizerDialog *_equalizer_dialog;
85
86         QString _icons_theme;
87 };
88
89 #endif // MAINWINDOW_H