feat: multitab and basic file saving

This commit is contained in:
2025-10-12 15:42:17 +08:00
parent db20417ce7
commit 7626508462
9 changed files with 970 additions and 40 deletions

View File

@ -6,6 +6,9 @@
class QLabel;
class SciEdit;
class TabWidget;
class DocumentManager;
class MainWindow : public KXmlGuiWindow
{
Q_OBJECT
@ -14,13 +17,29 @@ public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void newFile();
void openFile();
void saveFile();
void saveAsFile();
void closeFile();
void onCurrentTabChanged();
void onCurrentEditorChanged(SciEdit *editor);
void onDocumentModified(int docIndex, bool modified);
private:
void setupActions();
void showSettings();
void applyLexer(const QString & lexer);
void updateWindowTitle();
void updateStatusBar();
void updateActions();
SciEdit * m_editor;
QLabel * m_cursorPosStatusLabel;
DocumentManager *m_documentManager;
TabWidget *m_tabWidget;
QLabel *m_cursorPosStatusLabel;
QLabel *m_encodingStatusLabel;
QLabel *m_languageStatusLabel;
};
// plainly for KConfigDialog