mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00

Thanks to [marked JavaScript library](https://github.com/chjj/marked) by Christopher Jeffrey. The [style sheet](http://kevinburke.bitbucket.org/markdowncss/markdown.css) was created by Kevin Burke. Signed-off-by: Le Tan <tamlokveer@gmail.com>
34 lines
809 B
C++
34 lines
809 B
C++
#ifndef VTABWIDGET_H
|
|
#define VTABWIDGET_H
|
|
|
|
#include <QTabWidget>
|
|
#include <QJsonObject>
|
|
#include <QString>
|
|
|
|
class VTabWidget : public QTabWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit VTabWidget(QWidget *parent = 0);
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
void openFile(QJsonObject fileJson);
|
|
void editFile();
|
|
void saveFile();
|
|
void readFile();
|
|
|
|
private slots:
|
|
void handleTabCloseRequest(int index);
|
|
|
|
private:
|
|
void openWelcomePage();
|
|
int insertTabWithData(int index, QWidget *page, const QString &label, const QJsonObject &tabData);
|
|
int appendTabWithData(QWidget *page, const QString &label, const QJsonObject &tabData);
|
|
int findTabByFile(const QString &path, const QString &name);
|
|
int openFileInTab(const QString &path, const QString &name, bool modifiable);
|
|
};
|
|
|
|
#endif // VTABWIDGET_H
|