mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
upload code
This commit is contained in:
32
ui/edit/edit_vmess.cpp
Normal file
32
ui/edit/edit_vmess.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "edit_vmess.h"
|
||||
#include "ui_edit_vmess.h"
|
||||
|
||||
#include "fmt/VMessBean.hpp"
|
||||
|
||||
EditVMess::EditVMess(QWidget *parent) :
|
||||
QWidget(parent), ui(new Ui::EditVMess) {
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
EditVMess::~EditVMess() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void EditVMess::onStart(QSharedPointer<NekoRay::ProxyEntity> _ent) {
|
||||
this->ent = _ent;
|
||||
auto bean = this->ent->VMessBean();
|
||||
|
||||
ui->uuid->setText(bean->uuid);
|
||||
ui->aid->setText(Int2String(bean->aid));
|
||||
ui->security->setCurrentText(bean->security);
|
||||
}
|
||||
|
||||
bool EditVMess::onEnd() {
|
||||
auto bean = this->ent->VMessBean();
|
||||
|
||||
bean->uuid = ui->uuid->text();
|
||||
bean->aid = ui->aid->text().toInt();
|
||||
bean->security = ui->security->currentText();
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user