Subversion Repositories tpanel

Rev

Rev 335 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 335 Rev 396
Line 260... Line 260...
260
    ui->tabCtrl->setPalette(qt_fusionPalette());
260
    ui->tabCtrl->setPalette(qt_fusionPalette());
261
    ui->tabLog->setPalette(qt_fusionPalette());
261
    ui->tabLog->setPalette(qt_fusionPalette());
262
    ui->tabSIP->setPalette(qt_fusionPalette());
262
    ui->tabSIP->setPalette(qt_fusionPalette());
263
    ui->tabView->setPalette(qt_fusionPalette());
263
    ui->tabView->setPalette(qt_fusionPalette());
264
#endif
264
#endif
-
 
265
 
-
 
266
    // Passwords
-
 
267
    ui->lineEdit_Password1->setText(TConfig::getPassword1().c_str());
-
 
268
    ui->lineEdit_Password2->setText(TConfig::getPassword2().c_str());
-
 
269
    ui->lineEdit_Password3->setText(TConfig::getPassword3().c_str());
-
 
270
    ui->lineEdit_Password4->setText(TConfig::getPassword4().c_str());
-
 
271
 
265
    mInitRun = false;
272
    mInitRun = false;
266
    mSetChanged = false;
273
    mSetChanged = false;
267
}
274
}
268
 
275
 
269
TQtSettings::~TQtSettings()
276
TQtSettings::~TQtSettings()
Line 516... Line 523...
516
                            QObject *on = *tabIter;
523
                            QObject *on = *tabIter;
517
                            QString n = on->objectName();
524
                            QString n = on->objectName();
518
 
525
 
519
                            if (n.startsWith("kiconbutton") || n.startsWith("toolButton"))
526
                            if (n.startsWith("kiconbutton") || n.startsWith("toolButton"))
520
                                scaleObject(dynamic_cast<QToolButton *>(on));
527
                                scaleObject(dynamic_cast<QToolButton *>(on));
-
 
528
                            else if (n.startsWith("pushButton"))
-
 
529
                                scaleObject(dynamic_cast<QPushButton *>(on));
521
                            else if (n.startsWith("checkBox"))
530
                            else if (n.startsWith("checkBox"))
522
                            {
531
                            {
523
                                QCheckBox *cb = dynamic_cast<QCheckBox *>(on);
532
                                QCheckBox *cb = dynamic_cast<QCheckBox *>(on);
524
                                scaleObject(cb);
533
                                scaleObject(cb);
525
#ifdef __ANDROID__
534
#ifdef __ANDROID__
Line 1376... Line 1385...
1376
    if (TConfig::getSystemGain() == value)
1385
    if (TConfig::getSystemGain() == value)
1377
        return;
1386
        return;
1378
 
1387
 
1379
    TConfig::saveSystemGain(value);
1388
    TConfig::saveSystemGain(value);
1380
}
1389
}
-
 
1390
 
-
 
1391
void TQtSettings::on_lineEdit_Password1_textChanged(const QString& arg)
-
 
1392
{
-
 
1393
    DECL_TRACER("TQtSettings::on_lineEdit_Password1_textChanged(const QString& arg)");
-
 
1394
 
-
 
1395
    if (arg.compare(TConfig::getPassword1().c_str()) == 0)
-
 
1396
        return;
-
 
1397
 
-
 
1398
    mSetChanged = true;
-
 
1399
    TConfig::savePassword1(arg.toStdString());
-
 
1400
}
-
 
1401
 
-
 
1402
void TQtSettings::on_lineEdit_Password2_textChanged(const QString& arg)
-
 
1403
{
-
 
1404
    DECL_TRACER("TQtSettings::on_lineEdit_Password2_textChanged(const QString& arg)");
-
 
1405
 
-
 
1406
    if (arg.compare(TConfig::getPassword2().c_str()) == 0)
-
 
1407
        return;
-
 
1408
 
-
 
1409
    mSetChanged = true;
-
 
1410
    TConfig::savePassword2(arg.toStdString());
-
 
1411
}
-
 
1412
 
-
 
1413
void TQtSettings::on_lineEdit_Password3_textChanged(const QString& arg)
-
 
1414
{
-
 
1415
    DECL_TRACER("TQtSettings::on_lineEdit_Password3_textChanged(const QString& arg)");
-
 
1416
 
-
 
1417
    if (arg.compare(TConfig::getPassword3().c_str()) == 0)
-
 
1418
        return;
-
 
1419
 
-
 
1420
    mSetChanged = true;
-
 
1421
    TConfig::savePassword3(arg.toStdString());
-
 
1422
}
-
 
1423
 
-
 
1424
void TQtSettings::on_lineEdit_Password4_textChanged(const QString& arg)
-
 
1425
{
-
 
1426
    DECL_TRACER("TQtSettings::on_lineEdit_Password4_textChanged(const QString& arg)");
-
 
1427
 
-
 
1428
    if (arg.compare(TConfig::getPassword4().c_str()) == 0)
-
 
1429
        return;
-
 
1430
 
-
 
1431
    mSetChanged = true;
-
 
1432
    TConfig::savePassword4(arg.toStdString());
-
 
1433
}
-
 
1434
 
-
 
1435
void TQtSettings::on_pushButton_ViewPW1_clicked()
-
 
1436
{
-
 
1437
    DECL_TRACER("TQtSettings::on_pushButton_ViewPW1_clicked()");
-
 
1438
 
-
 
1439
    if (ui->lineEdit_Password1->echoMode() == QLineEdit::Password)
-
 
1440
        ui->lineEdit_Password1->setEchoMode(QLineEdit::Normal);
-
 
1441
    else
-
 
1442
        ui->lineEdit_Password1->setEchoMode(QLineEdit::Password);
-
 
1443
}
-
 
1444
 
-
 
1445
void TQtSettings::on_pushButton_ViewPW2_clicked()
-
 
1446
{
-
 
1447
    DECL_TRACER("TQtSettings::on_pushButton_ViewPW2_clicked()");
-
 
1448
 
-
 
1449
    if (ui->lineEdit_Password2->echoMode() == QLineEdit::Password)
-
 
1450
        ui->lineEdit_Password2->setEchoMode(QLineEdit::Normal);
-
 
1451
    else
-
 
1452
        ui->lineEdit_Password2->setEchoMode(QLineEdit::Password);
-
 
1453
}
-
 
1454
 
-
 
1455
void TQtSettings::on_pushButton_ViewPW3_clicked()
-
 
1456
{
-
 
1457
    DECL_TRACER("TQtSettings::on_pushButton_ViewPW3_clicked()");
-
 
1458
 
-
 
1459
    if (ui->lineEdit_Password3->echoMode() == QLineEdit::Password)
-
 
1460
        ui->lineEdit_Password3->setEchoMode(QLineEdit::Normal);
-
 
1461
    else
-
 
1462
        ui->lineEdit_Password3->setEchoMode(QLineEdit::Password);
-
 
1463
}
-
 
1464
 
-
 
1465
void TQtSettings::on_pushButton_ViewPW4_clicked()
-
 
1466
{
-
 
1467
    DECL_TRACER("TQtSettings::on_pushButton_ViewPW4_clicked()");
-
 
1468
 
-
 
1469
    if (ui->lineEdit_Password4->echoMode() == QLineEdit::Password)
-
 
1470
        ui->lineEdit_Password4->setEchoMode(QLineEdit::Normal);
-
 
1471
    else
-
 
1472
        ui->lineEdit_Password4->setEchoMode(QLineEdit::Password);
-
 
1473
}