
- Added ProjectManager class to handle project operations including opening, closing, building, and running projects. - Introduced SyntaxHighlighter class for syntax highlighting in C and C++ files. - Developed TerminalWidget for command execution and output display. - Created TextEditor with line numbering and auto-indentation features. - Established main application entry point in main.cpp. - Designed UI layout for MainWindow using Qt Designer.
66 lines
1.3 KiB
C++
66 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <QtWidgets/QMainWindow>
|
|
#include <QtWidgets/QMenuBar>
|
|
#include <QtWidgets/QToolBar>
|
|
#include <QtWidgets/QStatusBar>
|
|
#include <QtWidgets/QSplitter>
|
|
#include <QtWidgets/QTabWidget>
|
|
#include <QtWidgets/QVBoxLayout>
|
|
#include <QtWidgets/QHBoxLayout>
|
|
#include <QtWidgets/QFileDialog>
|
|
#include <QtWidgets/QMessageBox>
|
|
#include <QtCore/QSettings>
|
|
|
|
class TextEditor;
|
|
class FileTreeWidget;
|
|
class TerminalWidget;
|
|
class ProjectManager;
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
private slots:
|
|
void newFile();
|
|
void openFile();
|
|
void saveFile();
|
|
void saveAsFile();
|
|
void openProject();
|
|
void buildProject();
|
|
void runProject();
|
|
void debugProject();
|
|
void showAbout();
|
|
void toggleTheme();
|
|
|
|
private:
|
|
void setupUI();
|
|
void setupMenus();
|
|
void setupToolbar();
|
|
void setupStatusBar();
|
|
void connectSignals();
|
|
void loadSettings();
|
|
void saveSettings();
|
|
|
|
// UI Components
|
|
QSplitter *m_centralSplitter;
|
|
QSplitter *m_leftSplitter;
|
|
QTabWidget *m_editorTabs;
|
|
FileTreeWidget *m_fileTree;
|
|
TerminalWidget *m_terminal;
|
|
|
|
// Managers
|
|
ProjectManager *m_projectManager;
|
|
|
|
// Settings
|
|
QSettings *m_settings;
|
|
bool m_darkTheme;
|
|
|
|
// Current file
|
|
QString m_currentFilePath;
|
|
};
|