diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b14041c --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +/eda/build-eda_qt-Desktop_Qt_5_12_1_MinGW_64_bit-Debug \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9292964 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +# eda_qt + +### -介绍 +eda软件开发 + +## - 开发需求 +### ------------001------------ +点击“新建模块”按钮后,弹出一对话框,如: +![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/232300_bb1cd7c7_8607408.png "QQ截图20210123232228.png") + +用户可输入:模块名称、input端口数量、output端口数量、inout端口数量 +点击ok后,将出现一“矩形图”,代表着该模块 +![这是我们软件里用的矩形](https://images.gitee.com/uploads/images/2021/0123/232810_4125e7a6_8607408.png "矩形.png") +上图是我们要开发的软件里用的矩形图 +这是我们仿照的软件里的截图,模块名为123,input、output、inout都为1 +![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/232955_c341839e_8607408.png "QQ截图20210123232905.png") +点击某一端口时,应做到可以修改端口的属性,包括:![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/233219_b40e4d51_8607408.png "QQ截图20210123233154.png") +|端口名:要在矩形图上体现 +|输入输出类型:可以在input、output、inout中选![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/233346_328b5e77_8607408.png "QQ截图20210123233330.png") +|数据类型:可以在wire、reg中选![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/233408_06262ce9_8607408.png "QQ截图20210123233336.png") +|数据长度:可设置正整数值 +|颜色:此功能目前可先不做。。 +### ------------002------------ +双击模块矩形,可进入用户代码编辑界面 +此时用户只需要输入算法代码 如:assign c = a & b; +其他代码由软件自动生成。 +![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/234049_deade8af_8607408.png "QQ截图20210123234037.png") +其中第一段的格式为module xxx[*](端口名); 如用户在最开始的对话框中填写模块名为123,且整个模块中所有的端口为a、b、c三个时 +软件将会生成module 123[*](a,b,c); + **第二段** 代码为:input/output/inout 端口名;例如用户设置a为input,b为output,c为inout。则代码为 +input a; output b; inout c; + **第三段** 代码为:端口数据类型 端口名;例如用户定义a端口为wire型,b、c端口为reg型,则: +wire a; reg b; reg c; +第四段代码为之前用户输入的算法代码 +最后是固定句式:endmodule 相当于这个模块结束了 +另外要注意:当端口的数据长度定义为i(正整数)时,相应的在上述 **第二段、第三段** 代码中要有所改变,在端口名前加[i-1:0] +例如:![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/234717_374091e7_8607408.png "QQ截图20210123234621.png")用户定义了p0为3位 +![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/234922_d18c6d0d_8607408.png "QQ截图20210123234626.png") ![输入图片说明](https://images.gitee.com/uploads/images/2021/0123/234930_6490091b_8607408.png "QQ截图20210123234630.png") +则p0前面加[2:0] +### ------------003------------ +应有“保存模块”和“生成代码”两个按钮。其中: +保存模块:做到将此次用户新建的模块里的所有内容打包保存 下次用户双击时可以直接在软件里打开 +生成代码:将软件生成的代码 让用户选择位置保存。保存为 **verilog目录** 目录下应有 **此模块及其内部子模块** 所有的verilog代码文件 **扩展名为.v** + + + + + + + + + diff --git a/pics/QQ截图20210123232228.png b/pics/QQ截图20210123232228.png new file mode 100644 index 0000000..13d9c58 Binary files /dev/null and b/pics/QQ截图20210123232228.png differ diff --git a/pics/QQ截图20210123232905.png b/pics/QQ截图20210123232905.png new file mode 100644 index 0000000..b9407be Binary files /dev/null and b/pics/QQ截图20210123232905.png differ diff --git a/pics/QQ截图20210123233154.png b/pics/QQ截图20210123233154.png new file mode 100644 index 0000000..ad8a9eb Binary files /dev/null and b/pics/QQ截图20210123233154.png differ diff --git a/pics/QQ截图20210123233330.png b/pics/QQ截图20210123233330.png new file mode 100644 index 0000000..5a84cab Binary files /dev/null and b/pics/QQ截图20210123233330.png differ diff --git a/pics/QQ截图20210123233336.png b/pics/QQ截图20210123233336.png new file mode 100644 index 0000000..c4385fa Binary files /dev/null and b/pics/QQ截图20210123233336.png differ diff --git a/pics/QQ截图20210123234037.png b/pics/QQ截图20210123234037.png new file mode 100644 index 0000000..a57fe0e Binary files /dev/null and b/pics/QQ截图20210123234037.png differ diff --git a/pics/QQ截图20210123234621.png b/pics/QQ截图20210123234621.png new file mode 100644 index 0000000..7e9974b Binary files /dev/null and b/pics/QQ截图20210123234621.png differ diff --git a/pics/QQ截图20210123234626.png b/pics/QQ截图20210123234626.png new file mode 100644 index 0000000..4ce31a2 Binary files /dev/null and b/pics/QQ截图20210123234626.png differ diff --git a/pics/QQ截图20210123234630.png b/pics/QQ截图20210123234630.png new file mode 100644 index 0000000..13c1a85 Binary files /dev/null and b/pics/QQ截图20210123234630.png differ diff --git a/pics/icon/矩形.png b/pics/icon/矩形.png new file mode 100644 index 0000000..828bf6a Binary files /dev/null and b/pics/icon/矩形.png differ diff --git a/pics/icon/箭头(input或output).png b/pics/icon/箭头(input或output).png new file mode 100644 index 0000000..03c1c5c Binary files /dev/null and b/pics/icon/箭头(input或output).png differ diff --git a/pics/icon/长方形(inout).png b/pics/icon/长方形(inout).png new file mode 100644 index 0000000..575fc55 Binary files /dev/null and b/pics/icon/长方形(inout).png differ diff --git a/pics/矩形.png b/pics/矩形.png new file mode 100644 index 0000000..828bf6a Binary files /dev/null and b/pics/矩形.png differ diff --git a/src/.keep b/src/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/eda_qt 1-24 2_06/eda_qt.pro b/src/eda_qt 1-24 2_06/eda_qt.pro new file mode 100644 index 0000000..44b31ed --- /dev/null +++ b/src/eda_qt 1-24 2_06/eda_qt.pro @@ -0,0 +1,34 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + mainwindow.cpp \ + new_file.cpp + +HEADERS += \ + mainwindow.h \ + new_file.h + +FORMS += \ + mainwindow.ui \ + new_file.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/src/eda_qt 1-24 2_06/eda_qt.pro.user b/src/eda_qt 1-24 2_06/eda_qt.pro.user new file mode 100644 index 0000000..5a3c130 --- /dev/null +++ b/src/eda_qt 1-24 2_06/eda_qt.pro.user @@ -0,0 +1,328 @@ + + + + + + EnvironmentId + {d7319875-1e1d-4456-a97d-d87e35d07a5e} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.12.1 MinGW 64-bit + Desktop Qt 5.12.1 MinGW 64-bit + qt.qt5.5121.win64_mingw73_kit + 0 + 0 + 0 + + F:/eda_dev/eda_qt/src/build-eda_qt-Desktop_Qt_5_12_1_MinGW_64_bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + F:/eda_dev/eda_qt/src/build-eda_qt-Desktop_Qt_5_12_1_MinGW_64_bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + F:/eda_dev/eda_qt/src/build-eda_qt-Desktop_Qt_5_12_1_MinGW_64_bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + 部署 + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + eda_qt + + Qt4ProjectManager.Qt4RunConfiguration:F:/eda_dev/eda_qt/src/eda_qt 1-24 2_06/eda_qt.pro + eda_qt.pro + + 3768 + false + true + true + false + false + true + + F:/eda_dev/eda_qt/src/build-eda_qt-Desktop_Qt_5_12_1_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 20 + + + Version + 20 + + diff --git a/src/eda_qt 1-24 2_06/eda_qt.pro.user.f13ef12.22 b/src/eda_qt 1-24 2_06/eda_qt.pro.user.f13ef12.22 new file mode 100644 index 0000000..2e506bf --- /dev/null +++ b/src/eda_qt 1-24 2_06/eda_qt.pro.user.f13ef12.22 @@ -0,0 +1,848 @@ + + + + + + EnvironmentId + {f13ef12e-62a1-4aaf-ac39-302b77838bbe} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + Builtin.Questionable + + true + Builtin.DefaultTidyAndClazy + 2 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + true + 0 + C:\Users\dawn\Documents\Project\build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + C:\Users\dawn\Documents\Project\build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Release + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 2 + + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/dawn/Documents/Project/eda_qt/eda_qt.pro + C:/Users/dawn/Documents/Project/eda_qt/eda_qt.pro + + false + + false + true + true + false + false + true + + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Release + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 2 + + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.2 + + Desktop Qt 5.9.9 MinGW 32bit + Desktop Qt 5.9.9 MinGW 32bit + qt.qt5.599.win32_mingw53_kit + 0 + 0 + 0 + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Debug + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Release + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 2 + 2 + + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Profile + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 2 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 3 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/src/eda_qt 1-24 2_06/main.cpp b/src/eda_qt 1-24 2_06/main.cpp new file mode 100644 index 0000000..fd3e533 --- /dev/null +++ b/src/eda_qt 1-24 2_06/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/src/eda_qt 1-24 2_06/mainwindow.cpp b/src/eda_qt 1-24 2_06/mainwindow.cpp new file mode 100644 index 0000000..cc2f93c --- /dev/null +++ b/src/eda_qt 1-24 2_06/mainwindow.cpp @@ -0,0 +1,24 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +#include "new_file.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::MainWindow) +{ + ui->setupUi(this); + this->showMaximized(); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + + +void MainWindow::on_actionNew_triggered() +{ + new_file *s = new new_file(this); + s->show(); +} diff --git a/src/eda_qt 1-24 2_06/mainwindow.h b/src/eda_qt 1-24 2_06/mainwindow.h new file mode 100644 index 0000000..509979f --- /dev/null +++ b/src/eda_qt 1-24 2_06/mainwindow.h @@ -0,0 +1,28 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private slots: + void on_actionNew_triggered(); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H diff --git a/src/eda_qt 1-24 2_06/mainwindow.ui b/src/eda_qt 1-24 2_06/mainwindow.ui new file mode 100644 index 0000000..3a30ab5 --- /dev/null +++ b/src/eda_qt 1-24 2_06/mainwindow.ui @@ -0,0 +1,266 @@ + + + MainWindow + + + + 0 + 0 + 1056 + 672 + + + + MainWindow + + + + + 0 + 0 + + + + Qt::DefaultContextMenu + + + Qt::LeftToRight + + + + + + 2 + + + QLayout::SetMaximumSize + + + + + QLayout::SetMinimumSize + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + PushButton + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + 1 + + + + + 0 + 0 + 83 + 312 + + + + Page 1 + + + + + + 0 + 0 + 83 + 312 + + + + Page 2 + + + + + + + + 0 + + + + Tab 1 + + + + + Tab 2 + + + + + + + + + 0 + 0 + + + + 1 + + + + + 0 + 0 + 83 + 312 + + + + Page 1 + + + + + + 0 + 0 + 83 + 312 + + + + Page 2 + + + + + + + + + + QLayout::SetDefaultConstraint + + + + + + 0 + 0 + + + + + + + + + + + + + + 0 + 0 + 1056 + 25 + + + + + File + + + + + + Edit + + + + + + + + + New + + + + + + diff --git a/src/eda_qt 1-24 2_06/module.cpp b/src/eda_qt 1-24 2_06/module.cpp new file mode 100644 index 0000000..5ea69e2 --- /dev/null +++ b/src/eda_qt 1-24 2_06/module.cpp @@ -0,0 +1,40 @@ +#include "module.h" +#include + +Module::Module() +{ + +} + +Module::Module(std::string name,int inputPorts,int outputPorts,int inOutPorts) +{ + this->name = name; + int portsNum = 0; + for(int i = 0;iports.push_back(Port("p"+std::to_string(portsNum),INPUT,0,1)); + } + for(int i = 0;iports.push_back(Port("p"+std::to_string(portsNum),OUTPUT,0,1)); + } + for(int i = 0;iports.push_back(Port("p"+std::to_string(portsNum),INOUT,0,1)); + } +} + +void Module::setCode(std::string code) +{ + this->code = code; +} + +std::string Module::getCode() +{ + return this->code; +} + +std::string Module::generateCode() +{ + +} diff --git a/src/eda_qt 1-24 2_06/module.h b/src/eda_qt 1-24 2_06/module.h new file mode 100644 index 0000000..804962c --- /dev/null +++ b/src/eda_qt 1-24 2_06/module.h @@ -0,0 +1,23 @@ +#ifndef MODULE_H +#define MODULE_H +#include +#include +#include "port.h" +class Module +{ +private: + std::string name; + int inputPorts; + int ouputPorts; + int inOutPorts; + std::string code; + std::vector ports; +public: + Module(); + Module(std::string,int,int,int); + void setCode(std::string); + std::string getCode(); + std::string generateCode(); +}; + +#endif // MODULE_H diff --git a/src/eda_qt 1-24 2_06/new_file.cpp b/src/eda_qt 1-24 2_06/new_file.cpp new file mode 100644 index 0000000..5b9d09d --- /dev/null +++ b/src/eda_qt 1-24 2_06/new_file.cpp @@ -0,0 +1,20 @@ +#include "new_file.h" +#include "ui_new_file.h" + +new_file::new_file(QWidget *parent) : + QDialog(parent), + ui(new Ui::new_file) +{ + ui->setupUi(this); + this->setModal(true); +} + +new_file::~new_file() +{ + delete ui; +} + +void new_file::on_pushButton_clicked() +{ + this->exec(); +} diff --git a/src/eda_qt 1-24 2_06/new_file.h b/src/eda_qt 1-24 2_06/new_file.h new file mode 100644 index 0000000..d11e8d7 --- /dev/null +++ b/src/eda_qt 1-24 2_06/new_file.h @@ -0,0 +1,25 @@ +#ifndef NEW_FILE_H +#define NEW_FILE_H + +#include + +namespace Ui { +class new_file; +} + +class new_file : public QDialog +{ + Q_OBJECT + +public: + explicit new_file(QWidget *parent = nullptr); + ~new_file(); + +private slots: + void on_pushButton_clicked(); + +private: + Ui::new_file *ui; +}; + +#endif // NEW_FILE_H diff --git a/src/eda_qt 1-24 2_06/new_file.ui b/src/eda_qt 1-24 2_06/new_file.ui new file mode 100644 index 0000000..1a661d9 --- /dev/null +++ b/src/eda_qt 1-24 2_06/new_file.ui @@ -0,0 +1,129 @@ + + + new_file + + + + 0 + 0 + 373 + 406 + + + + Dialog + + + + + 20 + -10 + 341 + 371 + + + + + QLayout::SetDefaultConstraint + + + + + + + Module Name: + + + + + + + + + + + + + + Input Ports: + + + + + + + + + + + + + + Output Ports: + + + + + + + + + + + + + + Input Ports: + + + + + + + + + + + + + + 20 + 350 + 341 + 41 + + + + + + + Ok + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Cancel + + + + + + + + + diff --git a/src/eda_qt 1-24 2_06/port.cpp b/src/eda_qt 1-24 2_06/port.cpp new file mode 100644 index 0000000..077830f --- /dev/null +++ b/src/eda_qt 1-24 2_06/port.cpp @@ -0,0 +1,51 @@ +#include "port.h" + +Port::Port() +{ + +} + +Port::Port(std::string name,PortType portType,bool dataType,int dataSize) +{ + this->name = name; + this->portType = portType; + this->dataSize =dataSize; + this->dataType = dataType; +} + +void Port::setName(std::string name) +{ + this->name = name; +} + +std::string Port::getName() +{ + return this->name; +} + +void Port::setPortType(PortType portType) +{ + this->portType = portType; +} +PortType Port::getPortType() +{ + return this->portType; +} + +void Port::setDataType(bool dataType) +{ + this->dataType = dataType; +} +bool Port::getDataType() +{ + return this->dataType; +} + +void Port::setDataSize(int dataSize) +{ + this->dataSize = dataSize; +} +int Port::getDataSize() +{ + return this->dataSize; +} diff --git a/src/eda_qt 1-24 2_06/port.h b/src/eda_qt 1-24 2_06/port.h new file mode 100644 index 0000000..813d0ec --- /dev/null +++ b/src/eda_qt 1-24 2_06/port.h @@ -0,0 +1,28 @@ +#ifndef PORT_H +#define PORT_H +#include + +enum PortType{INPUT,OUTPUT,INOUT}; + +class Port +{ +private: + std::string name; //端口名 + PortType portType; //输入或输出 0为in 1为out + bool dataType; //数据类型 0为wire 1为reg + int dataSize; //数据长度 +public: + Port(); + Port(std::string,PortType,bool,int); + void setName(std::string); + std::string getName(); + void setPortType(PortType); + PortType getPortType(); + void setDataType(bool); + bool getDataType(); + void setDataSize(int); + int getDataSize(); + +}; + +#endif // PORT_H diff --git a/src/eda_qt/eda_qt.pro b/src/eda_qt/eda_qt.pro new file mode 100644 index 0000000..3685820 --- /dev/null +++ b/src/eda_qt/eda_qt.pro @@ -0,0 +1,71 @@ +<<<<<<< HEAD +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + mainwindow.cpp \ + new_file.cpp + +HEADERS += \ + mainwindow.h \ + new_file.h + +FORMS += \ + mainwindow.ui \ + new_file.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target +======= +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + mainwindow.cpp \ + new_file.cpp + +HEADERS += \ + mainwindow.h \ + new_file.h + +FORMS += \ + mainwindow.ui \ + new_file.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target +>>>>>>> bd1e03bf8f08e9d7e5b165ba9b21a76e52608e50 diff --git a/src/eda_qt/eda_qt.pro.user b/src/eda_qt/eda_qt.pro.user new file mode 100644 index 0000000..6309f1c --- /dev/null +++ b/src/eda_qt/eda_qt.pro.user @@ -0,0 +1,848 @@ + + + + + + EnvironmentId + {f13ef12e-62a1-4aaf-ac39-302b77838bbe} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + Builtin.Questionable + + true + Builtin.DefaultTidyAndClazy + 2 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + true + 0 + C:\Users\dawn\Documents\Project\build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + C:\Users\dawn\Documents\Project\build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Release + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 2 + + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:C:/Users/dawn/Documents/Project/eda_qt/eda_qt.pro + C:/Users/dawn/Documents/Project/eda_qt/eda_qt.pro + + false + + false + true + true + false + false + true + + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Release + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 2 + + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.2 + + Desktop Qt 5.9.9 MinGW 32bit + Desktop Qt 5.9.9 MinGW 32bit + qt.qt5.599.win32_mingw53_kit + 0 + 0 + 0 + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Debug + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Debug + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + + true + 2 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Release + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Release + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 2 + 2 + + + true + 0 + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Profile + C:/Users/dawn/Documents/Project/build-eda_qt-Desktop_Qt_5_9_9_MinGW_32bit-Profile + + + true + QtProjectManager.QMakeBuildStep + + false + + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 2 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 3 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/src/eda_qt/main.cpp b/src/eda_qt/main.cpp new file mode 100644 index 0000000..d63351e --- /dev/null +++ b/src/eda_qt/main.cpp @@ -0,0 +1,25 @@ +<<<<<<< HEAD +#include "mainwindow.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} +======= +#include "mainwindow.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} +>>>>>>> bd1e03bf8f08e9d7e5b165ba9b21a76e52608e50 diff --git a/src/eda_qt/mainwindow.cpp b/src/eda_qt/mainwindow.cpp new file mode 100644 index 0000000..f0f18e8 --- /dev/null +++ b/src/eda_qt/mainwindow.cpp @@ -0,0 +1,51 @@ +<<<<<<< HEAD +#include "mainwindow.h" +#include "ui_mainwindow.h" + +#include "new_file.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::MainWindow) +{ + ui->setupUi(this); + this->showMaximized(); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + + +void MainWindow::on_actionNew_triggered() +{ + new_file *s = new new_file(this); + s->show(); +} +======= +#include "mainwindow.h" +#include "ui_mainwindow.h" + +#include "new_file.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::MainWindow) +{ + ui->setupUi(this); + this->showMaximized(); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + + +void MainWindow::on_actionNew_triggered() +{ + new_file *s = new new_file(this); + s->show(); +} +>>>>>>> bd1e03bf8f08e9d7e5b165ba9b21a76e52608e50 diff --git a/src/eda_qt/mainwindow.h b/src/eda_qt/mainwindow.h new file mode 100644 index 0000000..dbb37fd --- /dev/null +++ b/src/eda_qt/mainwindow.h @@ -0,0 +1,59 @@ +<<<<<<< HEAD +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private slots: + void on_actionNew_triggered(); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H +======= +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private slots: + void on_actionNew_triggered(); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H +>>>>>>> bd1e03bf8f08e9d7e5b165ba9b21a76e52608e50 diff --git a/src/eda_qt/mainwindow.ui b/src/eda_qt/mainwindow.ui new file mode 100644 index 0000000..d8e3831 --- /dev/null +++ b/src/eda_qt/mainwindow.ui @@ -0,0 +1,68 @@ + + + MainWindow + + + + 0 + 0 + 1056 + 672 + + + + MainWindow + + + + + + 10 + 10 + 1021 + 601 + + + + + + + + + + + + + + + + 0 + 0 + 1056 + 25 + + + + + File + + + + + + Edit + + + + + + + + + New + + + + + + diff --git a/src/eda_qt/new_file.cpp b/src/eda_qt/new_file.cpp new file mode 100644 index 0000000..8d98f58 --- /dev/null +++ b/src/eda_qt/new_file.cpp @@ -0,0 +1,43 @@ +<<<<<<< HEAD +#include "new_file.h" +#include "ui_new_file.h" + +new_file::new_file(QWidget *parent) : + QDialog(parent), + ui(new Ui::new_file) +{ + ui->setupUi(this); + this->setModal(true); +} + +new_file::~new_file() +{ + delete ui; +} + +void new_file::on_pushButton_clicked() +{ + this->exec(); +} +======= +#include "new_file.h" +#include "ui_new_file.h" + +new_file::new_file(QWidget *parent) : + QDialog(parent), + ui(new Ui::new_file) +{ + ui->setupUi(this); + this->setModal(true); +} + +new_file::~new_file() +{ + delete ui; +} + +void new_file::on_pushButton_clicked() +{ + this->exec(); +} +>>>>>>> bd1e03bf8f08e9d7e5b165ba9b21a76e52608e50 diff --git a/src/eda_qt/new_file.h b/src/eda_qt/new_file.h new file mode 100644 index 0000000..48c5e3f --- /dev/null +++ b/src/eda_qt/new_file.h @@ -0,0 +1,53 @@ +<<<<<<< HEAD +#ifndef NEW_FILE_H +#define NEW_FILE_H + +#include + +namespace Ui { +class new_file; +} + +class new_file : public QDialog +{ + Q_OBJECT + +public: + explicit new_file(QWidget *parent = nullptr); + ~new_file(); + +private slots: + void on_pushButton_clicked(); + +private: + Ui::new_file *ui; +}; + +#endif // NEW_FILE_H +======= +#ifndef NEW_FILE_H +#define NEW_FILE_H + +#include + +namespace Ui { +class new_file; +} + +class new_file : public QDialog +{ + Q_OBJECT + +public: + explicit new_file(QWidget *parent = nullptr); + ~new_file(); + +private slots: + void on_pushButton_clicked(); + +private: + Ui::new_file *ui; +}; + +#endif // NEW_FILE_H +>>>>>>> bd1e03bf8f08e9d7e5b165ba9b21a76e52608e50 diff --git a/src/eda_qt/new_file.ui b/src/eda_qt/new_file.ui new file mode 100644 index 0000000..015f0da --- /dev/null +++ b/src/eda_qt/new_file.ui @@ -0,0 +1,129 @@ + + + new_file + + + + 0 + 0 + 373 + 459 + + + + Dialog + + + + + 20 + 20 + 341 + 371 + + + + + QLayout::SetDefaultConstraint + + + + + + + Module Name: + + + + + + + + + + + + + + Input Ports: + + + + + + + + + + + + + + Output Ports: + + + + + + + + + + + + + + Input Ports: + + + + + + + + + + + + + + 20 + 400 + 341 + 41 + + + + + + + Ok + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Cancel + + + + + + + + +