-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.cpp
45 lines (38 loc) · 1.12 KB
/
settings.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "settings.h"
Settings::Settings(QWidget *parent) : QWidget(parent),
ui(new Ui::Settings)
{
settings=new SettingsController();
ui->setupUi(this);
switch(settings->getplan())
{
case 1: ui->smartphoneRB->setChecked(true); break;
case 2: ui->tabletRB->setChecked(true); break;
default: ui->autoRB->setChecked(true); break;
}
}
void Settings::on_aboutB_clicked()
{
QMessageBox::about(this, "О программе", "Неофициальное приложение Yota\nВерсия "+QString(VERSION_STRING)+"\nВерсия Qt "+QT_VERSION_STR);
}
void Settings::on_clearSettingsB_clicked()
{
settings->clearCookies();
QMessageBox::information(this, "Выполнено", "Авторизация сброшена успешно");
}
void Settings::on_bugtrackerB_clicked()
{
QDesktopServices::openUrl(QUrl("https://github.com/TTLMaster/Yota-Desktop-App/issues"));
}
void Settings::on_autoRB_pressed()
{
settings->setplan(0);
}
void Settings::on_smartphoneRB_pressed()
{
settings->setplan(1);
}
void Settings::on_tabletRB_pressed()
{
settings->setplan(2);
}