Added GUI to delete multiple recordings
[icord-viewer:icord-viewer.git] / src / icordviewer.h
1 /*****************************************************************************
2  *  iCord Viewer - Download recordings from Humax iCord PVRs                 *
3  *  Copyright © 2010, Martin Engelmann <murphi.oss@googlemail.com>           *
4  *                                                                           *
5  *  This program is free software: you can redistribute it and/or modify     *
6  *  it under the terms of the GNU General Public License as published by     *
7  *  the Free Software Foundation, either version 3 of the License, or        *
8  *  (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, see <http://www.gnu.org/licenses/>.    *
17  *****************************************************************************/
18
19 #ifndef ICORDVIEWER_H
20 #define ICORDVIEWER_H
21
22 #include <QtGui/QMainWindow>
23 #include "recordinglist.h"
24
25 class FilterWidget;
26 class ConnectionSettingsWidget;
27 class DownloadProgressDialog;
28 class QFile;
29 class QUrlInfo;
30 class Ftp;
31 class RecordingListView;
32
33 class ICordViewer : public QMainWindow
34 {
35 Q_OBJECT
36 public:
37     ICordViewer();
38     virtual ~ICordViewer();
39
40
41 private slots:
42     void slotAbout();
43     void slotConnectClicked();
44     void slotDeleteSelectedRecording();
45     void slotDeleteRecordings();
46     void slotDownloadRecording();
47     void slotUpdateDownloadProgress(const QString & filename, qint64 done, qint64 total);
48     void slotDownloadDone(const QString & filename);
49
50     void slotRecordingListInfo(const QUrlInfo & urlInfo);
51     void slotPreviewListInfo(const QString & previewsDir, const QUrlInfo & urlInfo);
52
53     void slotFtpDone(bool result);
54     void clearRecordings();
55
56     void slotFilterChanged();
57
58 private:
59     void setupWidgets();
60     void setupMenusAndToolbars();
61
62 private:
63     ConnectionSettingsWidget * settings;
64     FilterWidget * filter;
65     RecordingListView * lvRecordings;
66
67     Ftp * ftp;
68     RecordingList recordings;
69
70     DownloadProgressDialog * downloadProgress;
71     QFile * downloadFile;
72 };
73
74 #endif // ICORDVIEWER_H