1 Star 0 Fork 0

zhyulo/FileTreeViewer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
searchdialog.cpp 761 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include "searchdialog.h"
#include "ui_searchdialog.h"
SearchDialog::SearchDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SearchDialog)
{
ui->setupUi(this);
connect(ui->pbCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(ui->pbFind, SIGNAL(clicked()), this, SLOT(accept()));
}
SearchDialog::~SearchDialog()
{
delete ui;
}
QByteArray SearchDialog::getSearchBytes()
{
const QString &text = ui->cbFindString->currentText();
int type = ui->cbFindType->currentIndex();
QByteArray bytes;
switch (type) {
case 0: // hex
bytes = QByteArray::fromHex(text.toLatin1());
break;
case 1: // text
bytes = text.toUtf8();
break;
}
return bytes;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zhyulo/FileTreeViewer.git
git@gitee.com:zhyulo/FileTreeViewer.git
zhyulo
FileTreeViewer
FileTreeViewer
master

搜索帮助