Refactored FavouritesMainWindow, reparented to PlayerMainWindow - fixes Bug [#6293]
[vlc-remote] / src / playermainwindow.h
1 /*   VLC-REMOTE for MAEMO 5
2 *   Copyright (C) 2010 Schutz Sacha <istdasklar@gmail.com>, Dru Moore <usr@dru-id.co.uk>, Yann Nave <yannux@onbebop.net>
3 *   This program is free software; you can redistribute it and/or modify
4 *   it under the terms of the GNU General Public License version 2,
5 *   or (at your option) any later version, as published by the Free
6 *   Software Foundation
7 *
8 *   This program is distributed in the hope that it will be useful,
9 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
10 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 *   GNU General Public License for more details
12 *
13 *   You should have received a copy of the GNU General Public
14 *   License along with this program; if not, write to the
15 *   Free Software Foundation, Inc.,
16 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 */
18 #ifndef PLAYERMAINWINDOW_H
19 #define PLAYERMAINWINDOW_H
20
21 #include <QMainWindow>
22 #include <QtNetwork>
23 #include <QtXml>
24 #include <QTimer>
25 #include "playlistmainwindow.h"
26 #include "browsemainwindow.h"
27 #include "favouritesmainwindow.h"
28 #include "vlcstatus.h"
29
30 namespace Ui {
31     class PlayerMainWindow;
32 }
33
34 class PlayerMainWindow : public QMainWindow {
35     Q_OBJECT
36 public:
37     explicit PlayerMainWindow(QWidget *parent = 0);
38     ~PlayerMainWindow();
39
40 public slots:
41     void askStatus();
42     void showConfig();
43     void showAbout();
44     void showFavourites();
45     void play();
46     void playpause();
47     void stop();
48     void pause();
49     void previous();
50     void next();
51     void fullscreen();
52     void volUp();
53     void volDown();
54     void volMute();
55     void slide(int value);
56     void updateUiWithCurrentStatus();
57     void setCoverArt(const QByteArray data);
58     void setCoverArtFromPixmap(QPixmap image);
59     void getCoverArt(int id);
60     void finished(QNetworkReply * reply);
61     void error(QNetworkReply::NetworkError code);
62     void readReady();
63     void orientationChanged();
64     void setPortrait();
65     void setLandscape();
66     void setAutoRotate();
67     void playlistIdUpdated(int id, bool hasart, QString extension);
68
69
70 protected slots:
71     void parseXmlStatus();
72 protected:
73     void changeEvent(QEvent *e);
74
75
76 private:
77     Ui::PlayerMainWindow *ui;
78     PlayListMainWindow * mPlayListMainWindow;
79     BrowseMainWindow * mBrowserMainWindow;
80     FavouritesMainWindow * mFavouritesMainWindow;
81     QNetworkAccessManager * mNetManager;
82     QString mIp;
83     QTimer * mTimer;
84     int mVolume;
85     int mMuted;
86     VlcStatus mCurrentStatus;
87     QByteArray mResponse;
88     bool mIsLandscape;
89     bool mHasImage;
90
91 };
92
93 #endif // PLAYERMAINWINDOW_H