| 13 | |
| 14 | static Q_LOGGING_CATEGORY(log, "Parameter.Plugin.UI") |
| 15 | CParameterPluginUI::CParameterPluginUI(QWidget *parent) : |
| 16 | CParameterUI(parent), |
| 17 | ui(new Ui::CParameterPluginUI), |
| 18 | m_pPara(nullptr) |
| 19 | { |
| 20 | ui->setupUi(this); |
| 21 | |
| 22 | setWindowTitle(tr("Plugin")); |
| 23 | if(RabbitCommon::CTools::HasAdministratorPrivilege()) { |
| 24 | ui->cbPromptAdminPrivilege->setText(""); |
| 25 | ui->cbPromptAdminPrivilege->hide(); |
| 26 | } else { |
| 27 | ui->cbPromptAdminPrivilege->setText( |
| 28 | tr("Prompt administrator privilege")); |
| 29 | ui->cbPromptAdminPrivilege->show(); |
| 30 | } |
| 31 | |
| 32 | ui->pbEncryptKey->setToolTip(tr("Enable view password")); |
| 33 | |
| 34 | QString szPasswordUrl; |
| 35 | szPasswordUrl = "<a href=https://github.com/KangLin/RabbitRemoteControl/wiki/UserManual#password-security>" + tr("Password Security") + "</a>"; |
| 36 | ui->gbPassword->setWhatsThis(szPasswordUrl); |
| 37 | ui->gbPassword->installEventFilter(this); |
| 38 | ui->pbEncryptKey->setWhatsThis(szPasswordUrl); |
| 39 | ui->pbEncryptKey->installEventFilter(this); |
| 40 | ui->cbSystemCredential->setWhatsThis(szPasswordUrl); |
| 41 | ui->cbSystemCredential->installEventFilter(this); |
| 42 | ui->leEncryptKey->setWhatsThis(szPasswordUrl); |
| 43 | ui->leEncryptKey->installEventFilter(this); |
| 44 | ui->gpEncryptKey->setWhatsThis(szPasswordUrl); |
| 45 | ui->gpEncryptKey->installEventFilter(this); |
| 46 | } |
| 47 | |
| 48 | CParameterPluginUI::~CParameterPluginUI() |
| 49 | { |