vmainwindow.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef VMAINWINDOW_H
  2. #define VMAINWINDOW_H
  3. #include <QMainWindow>
  4. class QLabel;
  5. class QComboBox;
  6. class VDirectoryTree;
  7. class QSplitter;
  8. class QListWidget;
  9. class QTabWidget;
  10. class QToolBar;
  11. class VNote;
  12. class VFileList;
  13. class VTabWidget;
  14. class QAction;
  15. class VMainWindow : public QMainWindow
  16. {
  17. Q_OBJECT
  18. public:
  19. VMainWindow(QWidget *parent = 0);
  20. ~VMainWindow();
  21. private slots:
  22. // Change current notebook index and update the directory tree
  23. void setCurNotebookIndex(int index);
  24. signals:
  25. void curNotebookIndexChanged(const QString &path);
  26. private:
  27. void setupUI();
  28. // Update notebookComboBox according to vnote
  29. void updateNotebookComboBox();
  30. void initActions();
  31. void initToolBar();
  32. QLabel *notebookLabel;
  33. QLabel *directoryLabel;
  34. QComboBox *notebookComboBox;
  35. VDirectoryTree *directoryTree;
  36. VFileList *fileList;
  37. VTabWidget *tabs;
  38. QSplitter *mainSplitter;
  39. VNote *vnote;
  40. QToolBar *fileToolBar;
  41. // Actions
  42. QAction *editNoteAct;
  43. QAction *saveNoteAct;
  44. QAction *readNoteAct;
  45. };
  46. #endif // VMAINWINDOW_H