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