From 232f80348d8349fc5a36a8c86c9822d1c7f86a74 Mon Sep 17 00:00:00 2001 From: Peter M. Groen Date: Thu, 26 May 2022 01:42:19 +0200 Subject: [PATCH] Initial setup --- .gitignore | 4 ++++ CMakeLists.txt | 8 +++++++- CalcPi.h | 10 ++++++++++ CalcPiForm.ui | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ main.cpp | 8 ++++++++ 5 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 CalcPiForm.ui diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d0deb4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/build/ +/CMakeLists.txt.user +/submodules/ +/.gitmodules diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f34935..edf58b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,11 +18,17 @@ include(compiler) set(SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CalcPi.cpp +) + +include(qtuic) +create_ui(SRC_LIST UIC_LIST + ${CMAKE_CURRENT_SOURCE_DIR}/CalcPiForm.ui ) include(qtmoc) create_mocs( SRC_LIST MOC_LIST - + ${CMAKE_CURRENT_SOURCE_DIR}/CalcPi.h ) add_executable( ${PROJECT_NAME} diff --git a/CalcPi.h b/CalcPi.h index e69de29..71131b8 100644 --- a/CalcPi.h +++ b/CalcPi.h @@ -0,0 +1,10 @@ +#include + +class CalcPi : public QWidget +{ + Q_OBJECT + +public: + CalcPi( QWidget *parent = nullptr ); + virtual ~CalcPi() {} +}; diff --git a/CalcPiForm.ui b/CalcPiForm.ui new file mode 100644 index 0000000..c0ff04b --- /dev/null +++ b/CalcPiForm.ui @@ -0,0 +1,99 @@ + + + Form + + + + 0 + 0 + 786 + 481 + + + + Form + + + + + + + + Run + + + Qt::AlignBottom|Qt::AlignHCenter + + + + + + + + + 55 + + + QLCDNumber::Flat + + + + + + + + + Value of Pi + + + Qt::AlignBottom|Qt::AlignHCenter + + + + + + + + + true + + + 55 + + + QLCDNumber::Flat + + + 0.000000000000000 + + + 0 + + + + + + + + + 24 + + + %p + + + + + + + + + Run + + + + + + + + diff --git a/main.cpp b/main.cpp index e69de29..dcc8648 100644 --- a/main.cpp +++ b/main.cpp @@ -0,0 +1,8 @@ +#include + +int main( int argc, char* argv[] ) +{ + QApplication oApp( argc, argv ); + + return oApp.exec(); +} -- libgit2 0.21.4