Skip to content

Commit

Permalink
re-organize source. fixes #149
Browse files Browse the repository at this point in the history
  • Loading branch information
coder3101 committed Feb 3, 2020
1 parent 6774d79 commit 6f21e99
Show file tree
Hide file tree
Showing 38 changed files with 92 additions and 63 deletions.
61 changes: 33 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,45 @@ configure_file(version.hpp.in ${CMAKE_BINARY_DIR}/generated/version.hpp)
add_executable(CPEditor
${GUI_TYPE}

include/Core/Compiler.hpp
include/Core/Runner.hpp
include/Core/Formatter.hpp
include/Core/SettingsManager.hpp
include/Core/MessageLogger.hpp
src/Core/Compiler.cpp
src/Core/Runner.cpp
src/Core/Formatter.cpp
src/Core/SettingsManager.cpp
src/Core/MessageLogger.cpp

include/Telemetry/UpdateNotifier.hpp
src/Telemetry/UpdateNotifier.cpp

include/Widgets/TestCases.hpp
src/Widgets/TestCases.cpp

include/Extensions/CompanionServer.hpp
include/Extensions/CFTools.hpp
include/Extensions/EditorTheme.hpp
include/Extensions/ExtendedEditorFeatures.hpp
src/Extensions/CompanionServer.cpp
src/Extensions/CFTools.cpp
src/Extensions/EditorTheme.cpp
src/Extensions/ExtendedEditorFeatures.cpp



include/mainwindow.hpp
include/MessageLogger.hpp
include/SettingsManager.hpp
include/Compiler.hpp
include/UpdateNotifier.hpp
include/Runner.hpp
include/Formatter.hpp
include/TestCases.hpp
include/CompanionServer.hpp
include/cftools.hpp
include/EditorTheme.hpp
include/preferencewindow.hpp
include/appwindow.hpp
third_party/diff_match_patch/diff_match_patch.h
include/ExtendedEditorFeatures.hpp



src/mainwindow.cc
src/MessageLogger.cpp
src/SettingsManager.cpp
src/main.cc
src/Compiler.cpp
src/UpdateNotifier.cpp
src/Runner.cpp
src/Formatter.cpp
src/TestCases.cpp
src/CompanionServer.cpp
src/cftools.cpp
src/editortheme.cpp
src/mainwindow.cpp
src/preferencewindow.cpp
src/appwindow.cpp

third_party/diff_match_patch/diff_match_patch.h
third_party/diff_match_patch/diff_match_patch.cpp
src/ExtendedEditorFeatures.cpp

src/main.cpp

ui/mainwindow.ui
ui/preferencewindow.ui
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion include/Formatter.hpp → include/Core/Formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#ifndef FORMATTER_HPP
#define FORMATTER_HPP
#include <MessageLogger.hpp>
#include "Core/MessageLogger.hpp"
#include <QCodeEditor>
#include <QPair>
#include <QString>
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions include/Core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Core

This folder contains all the headers which are core part of editor. It usually included functionalities without which the editor will be useless. Here you will find `Compiler`, `Runners`, `Settings`. It includes all basics functionalities as well.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/cftools.hpp → include/Extensions/CFTools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef CFTOOLS_HPP
#define CFTOOLS_HPP

#include <MessageLogger.hpp>
#include "Core/MessageLogger.hpp"
#include <QProcess>
#include <QRegularExpression>
#include <QSystemTrayIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#ifndef COMPANIONSERVER_HPP
#define COMPANIONSERVER_HPP
#include "MessageLogger.hpp"
#include "Core/MessageLogger.hpp"
#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions include/Extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Extensions

This folder contains all extended features of the editor. Like CF-tool integration, Themes and other components that enhance the use of the editor.
3 changes: 3 additions & 0 deletions include/Telemetry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Telemetry

This folder contains code that directly sends or gets data from internet. The code here requires that internet connectivity to run properly. **All the code in this folder must be under the namespace telemetry**
File renamed without changes.
3 changes: 3 additions & 0 deletions include/Widgets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Widgets

This folder contains the custom widgets that editor uses. It usually involves code that extends one of Qt widgets.
2 changes: 1 addition & 1 deletion include/TestCases.hpp → include/Widgets/TestCases.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef TESTCASES_HPP
#define TESTCASES_HPP

#include "MessageLogger.hpp"
#include "Core/MessageLogger.hpp"
#include <QFileInfo>
#include <QHBoxLayout>
#include <QLabel>
Expand Down
6 changes: 3 additions & 3 deletions include/appwindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

#include <QMainWindow>

#include "SettingsManager.hpp"
#include "UpdateNotifier.hpp"
#include "Core/SettingsManager.hpp"
#include "Telemetry/UpdateNotifier.hpp"
#include "mainwindow.hpp"
#include "ExtendedEditorFeatures.hpp"
#include "Extensions/ExtendedEditorFeatures.hpp"
#include "preferencewindow.hpp"

namespace Ui
Expand Down
16 changes: 8 additions & 8 deletions include/mainwindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP

#include <CompanionServer.hpp>
#include <Compiler.hpp>
#include <Formatter.hpp>
#include "Extensions/CompanionServer.hpp"
#include "Core/Compiler.hpp"
#include "Core/Formatter.hpp"
#include <QCodeEditor>
#include <QFile>
#include <QFileSystemWatcher>
Expand All @@ -30,11 +30,11 @@
#include <QShortcut>
#include <QSplitter>
#include <QTemporaryDir>
#include <Runner.hpp>
#include <SettingsManager.hpp>
#include <TestCases.hpp>
#include <UpdateNotifier.hpp>
#include <cftools.hpp>
#include "Core/Runner.hpp"
#include "Core/SettingsManager.hpp"
#include "Widgets/TestCases.hpp"
#include "Telemetry/UpdateNotifier.hpp"
#include "Extensions/CFTools.hpp"
#include <generated/version.hpp>

QT_BEGIN_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion include/preferencewindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef PREFERENCEWINDOW_HPP
#define PREFERENCEWINDOW_HPP

#include "SettingsManager.hpp"
#include "Core/SettingsManager.hpp"
#include <QCodeEditor>
#include <QListWidget>
#include <QMainWindow>
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler.cpp → src/Core/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <Compiler.hpp>
#include "Core/Compiler.hpp"
#include <QFileInfo>

namespace Core
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter.cpp → src/Core/Formatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <Formatter.hpp>
#include "Core/Formatter.hpp"
#include <QJsonDocument>
#include <QProcess>
#include <QTemporaryDir>
Expand Down
2 changes: 1 addition & 1 deletion src/MessageLogger.cpp → src/Core/MessageLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <MessageLogger.hpp>
#include "Core/MessageLogger.hpp"
#include <QDateTime>

void MessageLogger::setContainer(QTextBrowser *value)
Expand Down
3 changes: 3 additions & 0 deletions src/Core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Core

This folder contains all the headers which are core part of editor. It usually included functionalities without which the editor will be useless. Here you will find `Compiler`, `Runners`, `Settings`. It includes all basics functionalities as well.
2 changes: 1 addition & 1 deletion src/Runner.cpp → src/Core/Runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

#include <QFileInfo>
#include <Runner.hpp>
#include "Core/Runner.hpp"

namespace Core
{
Expand Down
4 changes: 2 additions & 2 deletions src/SettingsManager.cpp → src/Core/SettingsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*
*/

#include <MessageLogger.hpp>
#include "Core/MessageLogger.hpp"
#include <QApplication>
#include <QStandardPaths>
#include <SettingsManager.hpp>
#include "Core/SettingsManager.hpp"

namespace Settings
{
Expand Down
2 changes: 1 addition & 1 deletion src/cftools.cpp → src/Extensions/CFTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include "cftools.hpp"
#include "Extensions/CFTools.hpp"
#include <QFileInfo>
#include <QUrl>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*
*/

#include <CompanionServer.hpp>
#include <MessageLogger.hpp>
#include "Extensions/CompanionServer.hpp"
#include "Core/MessageLogger.hpp"
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
Expand Down
2 changes: 1 addition & 1 deletion src/editortheme.cpp → src/Extensions/EditorTheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include "EditorTheme.hpp"
#include "Extensions/EditorTheme.hpp"

#include <QFile>
#include <QIODevice>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ExtendedEditorFeatures.hpp>
#include "Extensions/ExtendedEditorFeatures.hpp"
#include <QDebug>
#include <QString>

Expand Down
3 changes: 3 additions & 0 deletions src/Extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Extensions

This folder contains all extended features of the editor. Like CF-tool integration, Themes and other components that enhance the use of the editor.
3 changes: 3 additions & 0 deletions src/Telemetry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Telemetry

This folder contains code that directly sends or gets data from internet. The code here requires that internet connectivity to run properly. **All the code in this folder must be under the namespace telemetry**
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QMessageBox>
#include <UpdateNotifier.hpp>
#include "Telemetry/UpdateNotifier.hpp"

namespace Telemetry
{
Expand Down
3 changes: 3 additions & 0 deletions src/Widgets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Widgets

This folder contains the custom widgets that editor uses. It usually involves code that extends one of Qt widgets.
2 changes: 1 addition & 1 deletion src/TestCases.cpp → src/Widgets/TestCases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include "TestCases.hpp"
#include "Widgets/TestCases.hpp"
#include "diff_match_patch.h"
#include <QFileDialog>
#include <QMainWindow>
Expand Down
2 changes: 1 addition & 1 deletion src/appwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "appwindow.hpp"
#include "../ui/ui_appwindow.h"
#include <EditorTheme.hpp>
#include "Extensions/EditorTheme.hpp"
#include <QClipboard>
#include <QDesktopServices>
#include <QFileDialog>
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/mainwindow.cc → src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

#include "mainwindow.hpp"

#include <Compiler.hpp>
#include <EditorTheme.hpp>
#include <MessageLogger.hpp>
#include "Core/Compiler.hpp"
#include "Extensions/EditorTheme.hpp"
#include "Core/MessageLogger.hpp"
#include <QCXXHighlighter>
#include <QFileDialog>
#include <QFont>
Expand All @@ -37,7 +37,7 @@
#include <QTextStream>
#include <QThread>
#include <QTimer>
#include <Runner.hpp>
#include "Core/Runner.hpp"

#include "../ui/ui_mainwindow.h"

Expand Down
2 changes: 1 addition & 1 deletion src/preferencewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "include/preferencewindow.hpp"
#include "../ui/ui_preferencewindow.h"

#include <EditorTheme.hpp>
#include "Extensions/EditorTheme.hpp"
#include <QAction>
#include <QCXXHighlighter>
#include <QDesktopWidget>
Expand Down

0 comments on commit 6f21e99

Please sign in to comment.