You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
812 B
38 lines
812 B
#ifndef NODEPATH_H
|
|
#define NODEPATH_H
|
|
|
|
#include <QString>
|
|
#include <QList>
|
|
|
|
#define PATH_SEPARATOR "/"
|
|
#define FOLDER_MIME "application/x-foldernode"
|
|
#define TAG_MIME "application/x-tagnode"
|
|
#define NOTE_MIME "application/x-notenode"
|
|
|
|
// NodePath 类用于处理节点路径
|
|
class NodePath
|
|
{
|
|
public:
|
|
// 构造函数,初始化节点路径
|
|
NodePath(const QString &path);
|
|
|
|
// 将路径分割为字符串列表
|
|
QStringList separate() const;
|
|
|
|
// 获取当前路径
|
|
QString path() const;
|
|
|
|
// 获取父路径
|
|
NodePath parentPath() const;
|
|
|
|
// 获取所有笔记文件夹的路径
|
|
static QString getAllNoteFolderPath();
|
|
|
|
// 获取回收站文件夹的路径
|
|
static QString getTrashFolderPath();
|
|
|
|
private:
|
|
QString m_path; // 存储节点路径
|
|
};
|
|
|
|
#endif // NODEPATH_H
|