func:1.添加删除添加功能。
2.添加编辑属性界面 3.删除添加同步到界面未完成。
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
#include "public_def.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
std::vector<std::string> splitString(const std::string& input, const std::string& delimiter) {
|
||||
std::vector<std::string> splitString(const std::string& input, const std::string& delimiter)
|
||||
{
|
||||
std::vector<std::string> tokens;
|
||||
size_t pos = 0;
|
||||
std::string backup = input;
|
||||
std::string token;
|
||||
|
||||
size_t pos = 0;
|
||||
std::string backup = input;
|
||||
std::string token;
|
||||
|
||||
while ((pos = backup.find(delimiter)) != std::string::npos) {
|
||||
token = backup.substr(0, pos);
|
||||
tokens.push_back(token);
|
||||
@@ -22,3 +23,18 @@ void CUtil::msg(QWidget* parent, const QString& content)
|
||||
{
|
||||
QMessageBox::information(parent, u8"提示", content);
|
||||
}
|
||||
|
||||
bool CUtil::affirm(QWidget* parent, const QString& titile, const QString& content)
|
||||
{
|
||||
QMessageBox questionBox(parent);
|
||||
questionBox.setText(content);
|
||||
questionBox.setWindowTitle(titile);
|
||||
questionBox.setIcon(QMessageBox::Question);
|
||||
questionBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||
int result = questionBox.exec();
|
||||
if (result != QMessageBox::Yes) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user