17#include "preferencesdialog.h"
19#include "ui_preferencesdialog.h"
21PreferencesDialog::PreferencesDialog(
QWidget* parent) :
27 for (
int i = 0; i < 0 + 1 * ui->contentsWidget->count(); i++) {
31 ui->contentsWidget->visualItemRect(item).height()});
35PreferencesDialog::~PreferencesDialog()
42 Q_ASSERT(m !=
nullptr);
45 ui->general->setManager(mPrefManager);
46 ui->general->updateValues();
48 ui->filesPage->setManager(mPrefManager);
49 ui->filesPage->updateValues();
51 ui->timeline->setManager(mPrefManager);
52 ui->timeline->updateValues();
54 ui->tools->setManager(mPrefManager);
55 ui->tools->updateValues();
57 ui->shortcuts->setManager(mPrefManager);
59 connect(ui->general, &GeneralPage::windowOpacityChange,
this, &PreferencesDialog::windowOpacityChange);
60 connect(ui->timeline, &TimelinePage::soundScrubChanged,
this, &PreferencesDialog::soundScrubChanged);
61 connect(ui->timeline, &TimelinePage::soundScrubMsecChanged,
this, &PreferencesDialog::soundScrubMsecChanged);
62 connect(ui->filesPage, &FilesPage::clearRecentList,
this, &PreferencesDialog::clearRecentList);
66 connect(ui->contentsWidget, onCurrentItemChanged,
this, &PreferencesDialog::changePage);
79 ui->pagesWidget->setCurrentIndex(ui->contentsWidget->row(current));
82void PreferencesDialog::updateRecentListBtn(
bool isEmpty)
86 emit updateRecentFileListBtn();
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)