#ifndef PUBLIC_DEF_HEADER
#define PUBLIC_DEF_HEADER

#include <string>
#include <vector>
#include <QWidget>

struct OprBase {
    std::string node_path{};
    std::string the_node{};
    std::string purpose{};
    std::string xml_path{};
    long        allow_max_width{500};
    long        blank_width{50};
};

class CUtil
{
public:
    CUtil() = default;
    ~CUtil() = default;

public:
    static void    msg(QWidget* parent, const QString& content);
    static bool    affirm(QWidget* parent, const QString& titile, const QString& content);
    static QString select_file(QWidget* parent, const QString& info, const QString& filter);
    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);
};

#endif