Mercurial > octave-nkf
comparison gui/src/MainWindow.h @ 14676:35512b788af2 gui
Editor can now handle multiple files in tabs.
* FileEditorInterface (new class): Interface class fpr the file editor.
* FileEditorTab (new class): File editor unit for editing a single file.
* MainWindow: Adjusted includes and method calls.
* FileEditor: Replaced code that allowed editing a file with code that manages tabs and delegates button clicks.
* src.pro: Added new files.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Wed, 23 May 2012 20:25:07 +0200 |
parents | 252a86f8fe62 |
children | d6d250812c01 |
comparison
equal
deleted
inserted
replaced
14674:252a86f8fe62 | 14676:35512b788af2 |
---|---|
28 #include <QQueue> | 28 #include <QQueue> |
29 #include <QMdiSubWindow> | 29 #include <QMdiSubWindow> |
30 #include <QCloseEvent> | 30 #include <QCloseEvent> |
31 #include <QToolButton> | 31 #include <QToolButton> |
32 | 32 |
33 // QScintilla includes | 33 // Editor includes |
34 #include <Qsci/qsciapis.h> | 34 #include "FileEditorInterface.h" |
35 #include "lexeroctavegui.h" | |
36 | 35 |
37 // QTerminal includes | 36 // QTerminal includes |
38 #include "QTerminal.h" | 37 #include "QTerminal.h" |
39 | 38 |
40 // Own includes | 39 // Own includes |
75 | 74 |
76 signals: | 75 signals: |
77 void settingsChanged (); | 76 void settingsChanged (); |
78 | 77 |
79 public slots: | 78 public slots: |
80 void openExistingFile (QString fileName); | |
81 void reportStatusMessage (QString statusMessage); | 79 void reportStatusMessage (QString statusMessage); |
82 void handleSaveWorkspaceRequest (); | 80 void handleSaveWorkspaceRequest (); |
83 void handleLoadWorkspaceRequest (); | 81 void handleLoadWorkspaceRequest (); |
84 void handleClearWorkspaceRequest (); | 82 void handleClearWorkspaceRequest (); |
85 void handleCommandDoubleClicked (QString command); | 83 void handleCommandDoubleClicked (QString command); |
86 void newFile (); | 84 void newFile (); |
87 void newEditorWindow (QString fileName); | 85 void openFile (); |
88 void openBugTrackerPage (); | 86 void openBugTrackerPage (); |
89 void openAgoraPage (); | 87 void openAgoraPage (); |
90 void openOctaveForgePage (); | 88 void openOctaveForgePage (); |
91 void processSettingsDialogRequest (); | 89 void processSettingsDialogRequest (); |
92 void showAboutOctave (); | 90 void showAboutOctave (); |
100 private: | 98 private: |
101 void construct (); | 99 void construct (); |
102 void establishOctaveLink (); | 100 void establishOctaveLink (); |
103 | 101 |
104 QTerminal *m_terminalView; | 102 QTerminal *m_terminalView; |
103 FileEditorInterface *m_fileEditor; | |
105 | 104 |
106 // Dock widgets. | 105 // Dock widgets. |
107 WorkspaceView *m_workspaceView; | 106 WorkspaceView *m_workspaceView; |
108 HistoryDockWidget *m_historyDockWidget; | 107 HistoryDockWidget *m_historyDockWidget; |
109 FilesDockWidget *m_filesDockWidget; | 108 FilesDockWidget *m_filesDockWidget; |
110 | |
111 // Editor's lexer | |
112 LexerOctaveGui *m_lexer; | |
113 QsciAPIs *m_lexerAPI; | |
114 | 109 |
115 // Toolbars. | 110 // Toolbars. |
116 QStatusBar *m_statusBar; | 111 QStatusBar *m_statusBar; |
117 | 112 |
118 QLineEdit *m_currentDirectoryLineEdit; | 113 QLineEdit *m_currentDirectoryLineEdit; |