mirror of https://github.com/cutefishos/texteditor
feat: support drop files
parent
85f041893e
commit
7c89a8078f
@ -0,0 +1,12 @@
|
|||||||
|
#include "texteditor.h"
|
||||||
|
|
||||||
|
FileHelper::FileHelper(QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileHelper::addPath(const QString &path)
|
||||||
|
{
|
||||||
|
emit newPath(path);
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef TEXTEDITOR_H
|
||||||
|
#define TEXTEDITOR_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class FileHelper : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit FileHelper(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
Q_INVOKABLE void addPath(const QString &path);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void newPath(const QString &path);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TEXTEDITOR_H
|
||||||
Loading…
Reference in New Issue