mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
56 lines
1.0 KiB
C++
56 lines
1.0 KiB
C++
#ifndef VMAINWINDOW_H
|
|
#define VMAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
|
|
class QLabel;
|
|
class QComboBox;
|
|
class VDirectoryTree;
|
|
class QSplitter;
|
|
class QListWidget;
|
|
class QTabWidget;
|
|
class QToolBar;
|
|
class VNote;
|
|
class VFileList;
|
|
class VTabWidget;
|
|
class QAction;
|
|
|
|
class VMainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
VMainWindow(QWidget *parent = 0);
|
|
~VMainWindow();
|
|
|
|
private slots:
|
|
// Change current notebook index and update the directory tree
|
|
void setCurNotebookIndex(int index);
|
|
|
|
signals:
|
|
void curNotebookIndexChanged(const QString &path);
|
|
|
|
private:
|
|
void setupUI();
|
|
// Update notebookComboBox according to vnote
|
|
void updateNotebookComboBox();
|
|
void initActions();
|
|
void initToolBar();
|
|
|
|
QLabel *notebookLabel;
|
|
QComboBox *notebookComboBox;
|
|
VDirectoryTree *directoryTree;
|
|
VFileList *fileList;
|
|
VTabWidget *tabs;
|
|
QSplitter *mainSplitter;
|
|
VNote *vnote;
|
|
QToolBar *fileToolBar;
|
|
|
|
// Actions
|
|
QAction *editNoteAct;
|
|
QAction *saveNoteAct;
|
|
QAction *readNoteAct;
|
|
};
|
|
|
|
#endif // VMAINWINDOW_H
|