1 // checksum 0x9a77 version 0x20001
3 This file was generated by the Mobile Qt Application wizard of Qt Creator.
4 MainWindow is a convenience class containing mobile device specific code
5 such as screen orientation handling.
6 It is recommended not to modify this file, since newer versions of Qt Creator
7 may offer an updated version of it.
13 #include <QMainWindow>
15 #include <QStateMachine>
17 #include <QAbstractButton>
18 #include <QNetworkAccessManager>
24 class DisconnectedState : public QState
27 DisconnectedState(QAbstractButton* button, QTcpSocket* socket, QState* parent = 0);
30 void onEntry(QEvent *event);
31 void onExit(QEvent *event);
35 class ConnectingState : public QState
39 ConnectingState(QAbstractButton* button, QTcpSocket* socket, QState* parent = 0);
46 void onSocketError(QAbstractSocket::SocketError err);
49 void onEntry(QEvent *event);
50 void onExit(QEvent *event);
54 class ConnectedState : public QState
58 ConnectedState(QAbstractButton* button, QTcpSocket* socket, QState* parent = 0);
61 void onSocketError(QAbstractSocket::SocketError err);
68 void onEntry(QEvent *event);
69 void onExit(QEvent *event);
73 class DisconnectingState : public QState
77 DisconnectingState(QAbstractButton* button, QTcpSocket* socket, QState* parent = 0);
83 void onSocketError(QAbstractSocket::SocketError err);
86 void onEntry(QEvent *event);
87 void onExit(QEvent *event);
91 class MainWindow : public QMainWindow
95 enum ScreenOrientation {
96 ScreenOrientationLockPortrait,
97 ScreenOrientationLockLandscape,
101 explicit MainWindow(QWidget *parent = 0);
102 virtual ~MainWindow();
104 void setOrientation(ScreenOrientation orientation);
108 // auto-connected slots
109 void on_actionSetup_triggered();
110 void on_videoPlayerStateBtn_clicked();
111 void on_videoPlayerPlayPauseBtn_clicked();
112 void on_videoPlayerStopBtn_clicked();
113 void on_videoPlayerSkipPreviousBtn_clicked();
114 void on_videoPlayerSkipNextBtn_clicked();
115 void on_videoPlayerBigSkipBackwardBtn_clicked();
116 void on_videoPlayerBigSkipForwardBtn_clicked();
117 void on_videoPlayerSmallSkipBackwardBtn_clicked();
118 void on_videoPlayerSmallSkipForwardBtn_clicked();
119 void on_videoPlayerGetTimeBtn_clicked();
120 void on_xbmcGetVolumeBtn_clicked();
121 void on_xbmcToggleMuteBtn_clicked();
122 void on_xbmcPlayBtn_clicked();
123 void on_xbmcQuitBtn_clicked();
124 void on_playerGetActivePlayers_clicked();
125 void on_actionLeftBtn_clicked();
127 void onNetworAccesskManagerReplyFinished(QNetworkReply* reply);
129 void on_actionRightBtn_clicked();
130 void on_actionUpBtn_clicked();
131 void on_actionDownBtn_clicked();
132 void on_actionEnterBtn_clicked();
133 void on_actionPlayBtn_clicked();
134 void on_actionSelectItemBtn_clicked();
135 void on_actionParentDirBtn_clicked();
138 void pendingNetworkOperation(bool pending);
141 void createTransitions();
142 void createConnections();
144 QTcpSocket m_serverSocket;
145 QNetworkAccessManager *m_manager;
146 Ui::MainWindow *m_ui;
148 QStateMachine m_stateMachine;
150 DisconnectedState* m_disconnectedState;
151 ConnectingState* m_connectingState;
152 ConnectedState* m_connectedState;
153 DisconnectingState* m_disconnectingState;
156 #endif // MAINWINDOW_H