- Spacebar works now in the seekbar

- Show utf-8 times character instead of x in the album cover exporter.
This commit is contained in:
Andreas 2013-05-13 17:40:00 +02:00
parent f805c003eb
commit 94d3de4b81
3 changed files with 18 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>391</width>
<width>608</width>
<height>412</height>
</rect>
</property>
@ -143,7 +143,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>x</string>
<string notr="true">×</string>
</property>
</widget>
</item>

View File

@ -2324,3 +2324,18 @@ void MainWindow::ShowConsole() {
Console* console = new Console(app_, this);
console->show();
}
void MainWindow::keyPressEvent(QKeyEvent* event) {
if(event->key() == Qt::Key_Space) {
app_->player()->PlayPause();
event->accept();
} else if(event->key() == Qt::Key_Left) {
ui_->track_slider->Seek(-1);
event->accept();
} else if(event->key() == Qt::Key_Right) {
ui_->track_slider->Seek(1);
event->accept();
} else {
QMainWindow::keyPressEvent(event);
}
}

View File

@ -121,6 +121,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
void CommandlineOptionsReceived(const CommandlineOptions& options);
protected:
void keyPressEvent(QKeyEvent* event);
void resizeEvent(QResizeEvent* event);
void closeEvent(QCloseEvent* event);