68 lines
1.5 KiB
C
68 lines
1.5 KiB
C
|
#ifndef GTL_GUI_CONFIG_WIDGET_PLAYER_H
|
||
|
#define GTL_GUI_CONFIG_WIDGET_PLAYER_H
|
||
|
|
||
|
#include <QWidget>
|
||
|
#include <QItemSelectionModel>
|
||
|
#include <QTimer>
|
||
|
|
||
|
#include "core/gtl_device.h"
|
||
|
#include "gui/config/gtl_gui_config_widget_player_files.h"
|
||
|
#include "gui/player/gtl_gui_player_chart.h"
|
||
|
|
||
|
namespace Ui {
|
||
|
class config_widget_player;
|
||
|
}
|
||
|
|
||
|
namespace gtl
|
||
|
{
|
||
|
namespace gui
|
||
|
{
|
||
|
namespace config
|
||
|
{
|
||
|
class widget_player : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit widget_player(QWidget *parent = nullptr);
|
||
|
~widget_player();
|
||
|
|
||
|
void set_player(gtl::device* node);
|
||
|
|
||
|
private:
|
||
|
Ui::config_widget_player *ui;
|
||
|
|
||
|
widget_player_files _files;
|
||
|
QItemSelectionModel _selection;
|
||
|
|
||
|
gtl::device* _player;
|
||
|
player::chart *_chart;
|
||
|
|
||
|
QTimer _timer;
|
||
|
|
||
|
bool _to_save;
|
||
|
|
||
|
private:
|
||
|
void save_player_state();
|
||
|
QString get_player_uuid() const;
|
||
|
|
||
|
|
||
|
private slots:
|
||
|
void selection_changed(const QModelIndex ¤t, const QModelIndex &previous);
|
||
|
void play(bool value);
|
||
|
void set_cyclic(bool value);
|
||
|
void save_as();
|
||
|
|
||
|
void player_stopped();
|
||
|
|
||
|
void update_state();
|
||
|
|
||
|
void select_path();
|
||
|
void set_path(QString path);
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif // GTL_GUI_CONFIG_WIDGET_PLAYER_H
|