diff options
author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2012-12-08 16:36:41 -0800 |
---|---|---|
committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2012-12-08 16:36:41 -0800 |
commit | 4c67aad4c46be80466017b082eae8d9ffad2768d (patch) | |
tree | a970451c336fa2078d4511ffa9660826f1517ac4 /vrplayer/mainwindow.h | |
parent | 309f2225b1f6c56d954c4eaf512474a7d1303a95 (diff) | |
download | xrdp-proprietary-4c67aad4c46be80466017b082eae8d9ffad2768d.tar.gz xrdp-proprietary-4c67aad4c46be80466017b082eae8d9ffad2768d.zip |
o development checkin
o added vrplayer
Diffstat (limited to 'vrplayer/mainwindow.h')
-rw-r--r-- | vrplayer/mainwindow.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/vrplayer/mainwindow.h b/vrplayer/mainwindow.h new file mode 100644 index 00000000..ed392ea2 --- /dev/null +++ b/vrplayer/mainwindow.h @@ -0,0 +1,82 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> +#include <QFileDialog> +#include <QDebug> +#include <QMessageBox> +#include <QCloseEvent> +#include <QMoveEvent> +#include <QPoint> +#include <QRect> +#include <QLabel> +#include <QHBoxLayout> +#include <QVBoxLayout> +#include <QPushButton> +#include <QSlider> + +#include "decoder.h" +#include "decoderthread.h" + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private slots: + void on_actionOpen_Media_File_triggered(); + void on_actionExit_triggered(); + void on_actionPlay_Media_triggered(); + void on_decoderError(QString title, QString msg); + void on_btnPlayClicked(bool flag); + void on_mediaDurationInSeconds(int duration); + void on_elapsedTime(int secs); + void on_sliderActionTriggered(int value); + void on_sliderValueChanged(int value); + +signals: + void on_geometryChanged(int x, int y, int widht, int height); + void on_mediaSeek(int value); + +protected: + void resizeEvent(QResizeEvent *e); + void closeEvent(QCloseEvent *e); + void moveEvent(QMoveEvent *e); + void mouseMoveEvent(QMouseEvent *e); + +private: + Ui::MainWindow *ui; + + QString filename; + Decoder *decoder; + DecoderThread *decoderThread; + + /* for UI */ + QLabel *lblCurrentPos; + QLabel *lblDuration; + QLabel *lblVideo; + QHBoxLayout *hboxLayoutTop; + QHBoxLayout *hboxLayoutMiddle; + QHBoxLayout *hboxLayoutBottom; + QVBoxLayout *vboxLayout; + QPushButton *btnPlay; + QPushButton *btnStop; + QPushButton *btnRewind; + QSlider *slider; + QWidget *window; + bool acceptSliderMove; + + /* private methods */ + void setupUI(); + void openMediaFile(); + void getVdoGeometry(QRect *rect); +}; + +#endif // MAINWINDOW_H |