45 lines
908 B
C++
45 lines
908 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QSlider>
|
|
#include <QPushButton>
|
|
#include <QLabel>
|
|
#include <QCheckBox>
|
|
#include "glwidget.h"
|
|
#include "videodecoder.h"
|
|
|
|
class MainWindow : public QMainWindow {
|
|
Q_OBJECT
|
|
public:
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow() override;
|
|
void openVideoFileDirect(const QString &fileName);
|
|
|
|
private slots:
|
|
void openVideoFile();
|
|
void togglePlayPause();
|
|
void toggleMute();
|
|
void setVideoPosition(int position);
|
|
void onPositionChanged(qint64 positionMs);
|
|
void onPlaybackFinished();
|
|
|
|
|
|
|
|
private:
|
|
void setupUI();
|
|
|
|
GLWidget *m_glWidget;
|
|
VideoDecoder *m_videoDecoder;
|
|
bool m_updatingSeek;
|
|
|
|
// Elementos de la interfaz multimedia
|
|
QPushButton *m_playBtn;
|
|
QPushButton *m_muteBtn;
|
|
QSlider *m_seekBar;
|
|
QLabel *m_timeLabel;
|
|
|
|
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|