You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iBase/iProperty/ZxPtyAttributeFile.h

61 lines
1.2 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include <QString>
#include <QHash>
#include "iProperty_global.h"
class ZxXpfDoc;
class ZxXpfNode;
class QDomElement;
class ZxPtyFileManager;
// 属性配置文件
class I_PROPERTY_EXPORT ZxPtyAttributeFile
{
ZxPtyAttributeFile(ZxPtyFileManager* pManager);
~ZxPtyAttributeFile();
public:
// 常规参数
ZxXpfDoc* getXpfDoc() const;
const QString& getName() const;
const QString& getPath() const;
// 检索
ZxXpfNode* getItemConfig(const QString& key, bool bConsiderParent = true);
// 排序
int getItemOrder(const QString& key) const;
// 临时TODO不一定准确
// 为了配置方便对于英文版暂时用了Name来做Label所以需要判断当前是否 非英文版
bool isLangCn();
private:
// 正式应用(新版)
bool load_new(const QString& sPath, const QString& sName);
bool parsePtyNodes(QDomElement& e, QString sPrev);
bool save();
private:
ZxPtyFileManager* m_pManager;
ZxPtyAttributeFile* m_pBase;
ZxXpfDoc* m_pDoc;
QString m_sPath;
QString m_sName;
mutable QHash<QString, int> m_hashOrders;
mutable int m_nNextItemOrder;
friend class ZxPtyPano;
friend class ZxPtyFileManager;
};