mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 22:39:53 +08:00
42 lines
730 B
C++
42 lines
730 B
C++
#ifndef EXTERNALNODE_H
|
|
#define EXTERNALNODE_H
|
|
|
|
#include <QString>
|
|
|
|
namespace vnotex
|
|
{
|
|
class Node;
|
|
|
|
// External node not managed by VNote.
|
|
class ExternalNode
|
|
{
|
|
public:
|
|
enum class Type
|
|
{
|
|
File,
|
|
Folder
|
|
};
|
|
|
|
ExternalNode(Node *p_parent, const QString &p_name, Type p_type);
|
|
|
|
Node *getNode() const;
|
|
|
|
const QString &getName() const;
|
|
|
|
bool isFolder() const;
|
|
|
|
QString fetchAbsolutePath() const;
|
|
|
|
private:
|
|
// Parent node.
|
|
// We support only one level further the external folder.
|
|
Node *m_parentNode = nullptr;
|
|
|
|
QString m_name;
|
|
|
|
Type m_type = Type::File;
|
|
};
|
|
}
|
|
|
|
#endif // EXTERNALNODE_H
|