better waveforms
This commit is contained in:
+5
-3
@@ -80,13 +80,12 @@ void Timeline::seek(long p) {
|
||||
repaint_timeline();
|
||||
}
|
||||
|
||||
bool Timeline::toggle_play() {
|
||||
void Timeline::toggle_play() {
|
||||
if (playing) {
|
||||
pause();
|
||||
} else {
|
||||
play();
|
||||
}
|
||||
return playing;
|
||||
}
|
||||
}
|
||||
|
||||
void Timeline::play() {
|
||||
@@ -94,10 +93,12 @@ void Timeline::play() {
|
||||
start_msecs = QDateTime::currentMSecsSinceEpoch();
|
||||
playback_updater.start();
|
||||
playing = true;
|
||||
panel_viewer->set_playpause_icon(false);
|
||||
}
|
||||
|
||||
void Timeline::pause() {
|
||||
playing = false;
|
||||
panel_viewer->set_playpause_icon(true);
|
||||
}
|
||||
|
||||
void Timeline::go_to_end() {
|
||||
@@ -167,6 +168,7 @@ void Timeline::redraw_all_clips() {
|
||||
|
||||
ui->video_area->redraw_clips();
|
||||
ui->audio_area->redraw_clips();
|
||||
ui->headers->update();
|
||||
}
|
||||
|
||||
void Timeline::select_all() {
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public:
|
||||
void previous_frame();
|
||||
void next_frame();
|
||||
void seek(long p);
|
||||
bool toggle_play();
|
||||
void toggle_play();
|
||||
void play();
|
||||
void pause();
|
||||
void go_to_end();
|
||||
|
||||
+9
-6
@@ -71,10 +71,13 @@ void Viewer::on_pushButton_4_clicked()
|
||||
|
||||
void Viewer::on_pushButton_3_clicked()
|
||||
{
|
||||
if (panel_timeline->toggle_play()) {
|
||||
// playing
|
||||
ui->pushButton_3->setIcon(QIcon(":/icons/pause.png"));
|
||||
} else {
|
||||
ui->pushButton_3->setIcon(QIcon(":/icons/play.png"));
|
||||
}
|
||||
panel_timeline->toggle_play();
|
||||
}
|
||||
|
||||
void Viewer::set_playpause_icon(bool play) {
|
||||
if (play) {
|
||||
ui->pushButton_3->setIcon(QIcon(":/icons/play.png"));
|
||||
} else {
|
||||
ui->pushButton_3->setIcon(QIcon(":/icons/pause.png"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
~Viewer();
|
||||
void update_sequence();
|
||||
void compose();
|
||||
void set_playpause_icon(bool play);
|
||||
|
||||
ViewerWidget* viewer_widget;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user