#ifndef MOC_VIDEOCONTROLBAR_H
#define MOC_VIDEOCONTROLBAR_H
 
#include <QWidget>
#include <QtWidgets>
#include "disp_qt.h"

QT_BEGIN_NAMESPACE
class MainWindow;
class DispQtMainwinSeekslider;
QT_END_NAMESPACE

class DispQtVideoControlbar : public QDialog
{
Q_OBJECT
public:
	DispQtVideoControlbar(MainWindow *main_window = 0, QWidget *parent = 0);
	bool videoctrlbar_check_show(int x, int y);
	void videoctrlbar_set_currfileinfos(struct dispqt_currfileinfo_s *cur);

Q_SIGNALS:
	void signal_videoctrlbar_config_style_apply(bool lucent_enable);
	void signal_videoctrlbar_set_show(bool);
	void signal_videoctrlbar_set_timepos(int);
	void signal_videoctrlbar_option_timemode_change(unsigned int);

public Q_SLOTS:
	void videoctrlbar_config_style_apply(bool);
	void videoctrlbar_set_show(bool);
	void videoctrlbar_set_timepos(int);
	void videoctrlbar_option_timemode_change(unsigned int);

protected:
	bool event(QEvent *);
	void keyPressEvent(QKeyEvent *event);
	void wheelEvent(QWheelEvent *event);
	void mousePressEvent(QMouseEvent *event);
	void mouseReleaseEvent(QMouseEvent *event);

private:
	void videoctrlbar_set_size_and_pos(void);
	MainWindow *main_window;
	DispQtMainwinSeekslider *seek_slider;
	bool is_show_enabled;
	QToolBar *optionToolBar, *playToolBar;
	QLabel *number;
	int time_len_ms;
};

#endif // MOC_VIDEOCONTROLBAR_H
