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
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
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.
18 #ifndef PLAYERMAINWINDOW_H
19 #define PLAYERMAINWINDOW_H
21 #include <QMainWindow>
25 #include "playlistmainwindow.h"
26 #include "browsemainwindow.h"
27 #include "favouritesmainwindow.h"
28 #include "vlcstatus.h"
29 #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
30 #include <mce/dbus-names.h>
31 #include <mce/mode-names.h>
32 #include <QDBusConnection>
33 #include <QDBusMessage>
34 #include <QDBusInterface>
38 class PlayerMainWindow;
41 class PlayerMainWindow : public QMainWindow {
44 explicit PlayerMainWindow(QWidget *parent = 0);
48 void displayStateChanged(const QDBusMessage &message);
53 void showFavourites();
64 void slide(int value);
65 void updateUiWithCurrentStatus();
66 void setCoverArt(const QByteArray data);
67 void setCoverArtFromPixmap(QPixmap image);
68 void getCoverArt(int id);
69 void finished(QNetworkReply * reply);
70 void error(QNetworkReply::NetworkError code);
72 void updateFromSettings();
73 void orientationChanged();
77 void playlistIdUpdated(int id, bool hasart, QString extension);
81 void parseXmlStatus();
84 void changeEvent(QEvent *e);
85 void closeEvent(QCloseEvent *);
89 Ui::PlayerMainWindow *ui;
90 PlayListMainWindow * mPlayListMainWindow;
91 BrowseMainWindow * mBrowserMainWindow;
92 FavouritesMainWindow * mFavouritesMainWindow;
93 QNetworkAccessManager * mNetManager;
98 VlcStatus mCurrentStatus;
102 bool mIsFirstStatusCall;
103 static QDBusConnection dBusConnection;
104 static QDBusInterface* dBusInterface;
107 #endif // PLAYERMAINWINDOW_H