2024-05-15 10:59:43 +08:00
|
|
|
#ifndef PUBLIC_DEF_HEADER
|
|
|
|
#define PUBLIC_DEF_HEADER
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2024-05-15 17:34:07 +08:00
|
|
|
#include <QWidget>
|
2024-05-15 10:59:43 +08:00
|
|
|
|
|
|
|
struct OprBase {
|
|
|
|
std::string node_path{};
|
|
|
|
std::string the_node{};
|
|
|
|
std::string purpose{};
|
|
|
|
std::string xml_path{};
|
2024-05-24 10:03:58 +08:00
|
|
|
long allow_max_width{500};
|
|
|
|
long blank_width{50};
|
2024-05-15 10:59:43 +08:00
|
|
|
};
|
|
|
|
|
2024-05-15 17:34:07 +08:00
|
|
|
class CUtil
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CUtil() = default;
|
|
|
|
~CUtil() = default;
|
2024-05-24 09:18:06 +08:00
|
|
|
|
2024-05-15 17:34:07 +08:00
|
|
|
public:
|
2024-05-24 09:18:06 +08:00
|
|
|
static void msg(QWidget* parent, const QString& content);
|
|
|
|
static bool affirm(QWidget* parent, const QString& titile, const QString& content);
|
2024-05-17 22:46:33 +08:00
|
|
|
static QString select_file(QWidget* parent, const QString& info, const QString& filter);
|
2024-05-24 09:18:06 +08:00
|
|
|
static void sort_by_repeat(std::vector<std::string>& vec);
|
|
|
|
|
|
|
|
public:
|
|
|
|
static std::string utf8_to_gbk(const std::string& utf8_str);
|
|
|
|
static std::vector<std::string> splitString(const std::string& input, const std::string& delimiter);
|
2024-05-15 17:34:07 +08:00
|
|
|
};
|
|
|
|
|
2024-05-17 22:46:33 +08:00
|
|
|
#endif
|