feat: Add the needed boilerplate code needed to run the program
This moves ui/echidna.ui and src/resources.qrs to src/echidna.ui and src/resources.qrs respectively. I couldn't find any way to have these files on a separate ui folder, as CMake's AUTOUIC feature will only look for .ui files in the importing code's directory. I have compiled and ran this and the UI feels great. I mean I have the Dracula theme configured on my machine, not sure what will it looked like without it. Next up we will work on our Monaco replacement. Will discuss on whether making it a Qt Designer plugin or not.pull/4/head
parent
9db81886ef
commit
bf51d4dd9f
|
@ -0,0 +1,32 @@
|
|||
CMake_Minimum_Required(VERSION 3.1.0)
|
||||
|
||||
Project(echidna VERSION 0.0 LANGUAGES CXX)
|
||||
|
||||
Set(CMAKE_CXX_STANDARD 11)
|
||||
Set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
Set(CMAKE_AUTOMOC ON)
|
||||
Set(CMAKE_AUTORCC ON)
|
||||
Set(CMAKE_AUTOUIC ON)
|
||||
|
||||
|
||||
|
||||
Find_Package(Qt5 COMPONENTS Widgets REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
file(GLOB SOURCES src/*.cpp)
|
||||
file(GLOB HEADERS src/*.h)
|
||||
|
||||
Add_Executable(echidna
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
src/echidna.ui
|
||||
src/resources.qrc
|
||||
)
|
||||
|
||||
|
||||
|
||||
Target_Link_Libraries(echidna Qt5::Widgets)
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<class>EchidnaEditor</class>
|
||||
<widget class="QMainWindow" name="EchidnaEditor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -11,9 +11,9 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
<string>Echidna Editor</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QWidget" name="statusBar" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
|
@ -0,0 +1,31 @@
|
|||
#include "editor.h"
|
||||
#include <ui_echidna.h>
|
||||
|
||||
EchidnaEditor::EchidnaEditor(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::EchidnaEditor)
|
||||
{
|
||||
|
||||
ui->setupUi(this);
|
||||
this->setCentralWidget(ui->centralWidget);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
EchidnaEditor::~EchidnaEditor(){
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* undefined reference to `vtable for EchidnaEditor'
|
||||
*
|
||||
* /
|
||||
|
||||
|
||||
/*
|
||||
|
||||
undefined reference to `vtable for EchidnaEditor'
|
||||
|
||||
*/
|
|
@ -0,0 +1,24 @@
|
|||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class EchidnaEditor;
|
||||
}
|
||||
|
||||
|
||||
class EchidnaEditor : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EchidnaEditor(QWidget *parent = nullptr);
|
||||
~EchidnaEditor();
|
||||
|
||||
private slots:
|
||||
void addFolderIntoWorkspace(){
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
Ui::EchidnaEditor *ui;
|
||||
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
#include <QApplication>
|
||||
#include "editor.h"
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
QApplication EchidnaEditorApp(argc, argv);
|
||||
|
||||
EchidnaEditor Editor;
|
||||
|
||||
Editor.show();
|
||||
|
||||
EchidnaEditorApp.exec();
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue