comparison src/gui/dialog/settings.cpp @ 64:fe719c109dbc

*: update 1. add media tracking ability, and it displays info on the `now playing` page 2. the `now playing` page now actually shows something 3. renamed every page class to be more accurate to what it is 4. ...
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 23:15:43 -0400
parents 4c6dd5999b39
children 2417121d894e
comparison
equal deleted inserted replaced
63:3d2decf093bb 64:fe719c109dbc
54 void SettingsPage::SaveInfo() { 54 void SettingsPage::SaveInfo() {
55 // no-op... child classes will implement this 55 // no-op... child classes will implement this
56 } 56 }
57 57
58 void SettingsDialog::OnOK() { 58 void SettingsDialog::OnOK() {
59 QStackedWidget* stacked = (QStackedWidget*)layout->itemAt(1)->widget(); 59 QStackedWidget* stacked = reinterpret_cast<QStackedWidget*>(layout->itemAt(1)->widget());
60 for (int i = 0; i < stacked->count(); i++) { 60 for (int i = 0; i < stacked->count(); i++) {
61 ((SettingsPage*)stacked->widget(i))->SaveInfo(); 61 reinterpret_cast<SettingsPage*>(stacked->widget(i))->SaveInfo();
62 } 62 }
63 QDialog::accept(); 63 QDialog::accept();
64 } 64 }
65 65
66 SettingsDialog::SettingsDialog(QWidget* parent) : QDialog(parent) { 66 SettingsDialog::SettingsDialog(QWidget* parent) : QDialog(parent) {