4bce7336e1e2a4a814d709ff875c26e789ff409c
[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 "library.h"
29
30 namespace Ui {
31         class MainWindow;
32 }
33
34 using SomePlayer::DataObjects::Library;
35
36 class MainWindow : public QMainWindow
37 {
38         Q_OBJECT
39
40 public:
41         explicit MainWindow(QWidget *parent = 0);
42         ~MainWindow();
43
44 private:
45         Ui::MainWindow *ui;
46
47 public slots:
48         void aboutQt();
49         void about();
50         void player();
51         void library();
52         void showBusyWidget(QString);
53         void showSearchPanel();
54         void hideSearchPanel();
55 private slots:
56         void _add_directory();
57         void _save_playlist();
58         void _clear_current_playlist();
59         void _toggle_search_line();
60         void _search(QString);
61         void _nextItem();
62         void _prevItem();
63         void _cancelSearch();
64         void _toggle_full_screen();
65 private:
66         PlayerForm *_player_form;
67         LibraryForm *_library_form;
68         BusyWidget *_busy_widget;
69         Library *_library;
70 };
71
72 #endif // MAINWINDOW_H