123456789101112131415161718192021222324252627282930313233343536373839 |
- #include "gui\settingswidget.h"
- #include "ui_settingswidget.h"
- #include "legacyapp.h"
- #include <QDebug>
- SettingsWidget::SettingsWidget(LegacyApp *_app, QWidget *parent) :
- QWidget(parent),
- ui(new Ui::SettingsWidget),
- app(_app)
- {
- ui->setupUi(this);
- }
- SettingsWidget::~SettingsWidget()
- {
- delete ui;
- }
- void SettingsWidget::UpdateFolderPath()
- {
- // QString path =
- }
- void SettingsWidget::on_download_restrict_slider_valueChanged(int value)
- {
- if (value >= 1024) {
- double new_value = double(value) / 1024;
- ui->download_speed_label_common->setText(QString::number(new_value, 'g', 2) + " Мб/с");
- } else {
- ui->download_speed_label_common->setText(QString::number(value) + " Кб/с");
- }
- }
- void SettingsWidget::on_interface_scale_combobox_common_currentIndexChanged(const QString &arg1)
- {
- int value = arg1.left(arg1.length() - 1).toInt();
- app->window.changeFontSizeRecursive(value, &app->window);
- app->window.resize(900 * value / 100, 650 * value / 100);
- }
|