mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00

1. Add VOrphanFile for external local file; 2. Add doc file for shortcuts; 3. Ctrl+E ? to open the shortcuts doc;
34 lines
882 B
C++
34 lines
882 B
C++
#ifndef VORPHANFILE_H
|
|
#define VORPHANFILE_H
|
|
|
|
#include "vfile.h"
|
|
|
|
// VOrphanFile is file not belong to any notebooks or directories.
|
|
// Given the path of the file, VNote could load its content as read-only.
|
|
class VOrphanFile : public VFile
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
VOrphanFile(const QString &p_path, QObject *p_parent);
|
|
bool open();
|
|
QString retrivePath() const;
|
|
QString retriveRelativePath() const;
|
|
QString retriveBasePath() const;
|
|
VDirectory *getDirectory();
|
|
const VDirectory *getDirectory() const;
|
|
QString getNotebookName() const;
|
|
VNotebook *getNotebook();
|
|
|
|
private:
|
|
bool save();
|
|
void convert(DocType p_curType, DocType p_targetType);
|
|
void setName(const QString &p_name);
|
|
QString retriveImagePath() const;
|
|
void setContent(const QString &p_content);
|
|
|
|
QString m_path;
|
|
friend class VDirectory;
|
|
};
|
|
|
|
#endif // VORPHANFILE_H
|