From 4767e264636412996a04b4114ca31269c429db22 Mon Sep 17 00:00:00 2001 From: Mjolnir Date: Tue, 18 Aug 2015 14:12:12 +0200 Subject: [PATCH] initial library + test --- .gitignore | 6 ++++++ Library/ErrorMessage.cpp | 5 +++++ Library/ErrorMessage.h | 10 ++++++++++ Library/LivingDesktopLibrary.pro | 22 ++++++++++++++++++++++ Library/XYPlotter.cpp | 5 +++++ Library/XYPlotter.h | 10 ++++++++++ Library/livingdesktoplibrary.cpp | 6 ++++++ Library/livingdesktoplibrary.h | 13 +++++++++++++ Library/livingdesktoplibrary_global.h | 12 ++++++++++++ Test/Test.pro | 20 ++++++++++++++++++++ Test/main.cpp | 11 +++++++++++ Test/mainwindow.cpp | 14 ++++++++++++++ Test/mainwindow.h | 22 ++++++++++++++++++++++ Test/mainwindow.ui | 24 ++++++++++++++++++++++++ 14 files changed, 180 insertions(+) create mode 100644 .gitignore create mode 100644 Library/ErrorMessage.cpp create mode 100644 Library/ErrorMessage.h create mode 100644 Library/LivingDesktopLibrary.pro create mode 100644 Library/XYPlotter.cpp create mode 100644 Library/XYPlotter.h create mode 100644 Library/livingdesktoplibrary.cpp create mode 100644 Library/livingdesktoplibrary.h create mode 100644 Library/livingdesktoplibrary_global.h create mode 100644 Test/Test.pro create mode 100644 Test/main.cpp create mode 100644 Test/mainwindow.cpp create mode 100644 Test/mainwindow.h create mode 100644 Test/mainwindow.ui diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1f0330 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.user +*~ +.DS_Store +*.pdf +*.exe +build-* diff --git a/Library/ErrorMessage.cpp b/Library/ErrorMessage.cpp new file mode 100644 index 0000000..0d3cc4d --- /dev/null +++ b/Library/ErrorMessage.cpp @@ -0,0 +1,5 @@ +#include "error.h" + +Error::Error() +{ +} diff --git a/Library/ErrorMessage.h b/Library/ErrorMessage.h new file mode 100644 index 0000000..da7bff5 --- /dev/null +++ b/Library/ErrorMessage.h @@ -0,0 +1,10 @@ +#ifndef ERROR_H +#define ERROR_H + +class Error +{ + public: + Error(); +}; + +#endif // ERROR_H diff --git a/Library/LivingDesktopLibrary.pro b/Library/LivingDesktopLibrary.pro new file mode 100644 index 0000000..8b421c9 --- /dev/null +++ b/Library/LivingDesktopLibrary.pro @@ -0,0 +1,22 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2015-08-18T10:25:46 +# +#------------------------------------------------- + +QT -= core gui + +TARGET = LivingDesktopLibrary +TEMPLATE = lib + +DEFINES += LIVINGDESKTOPLIBRARY_LIBRARY + +SOURCES += livingdesktoplibrary.cpp + +HEADERS += livingdesktoplibrary.h\ + livingdesktoplibrary_global.h + +unix { + target.path = /usr/lib + INSTALLS += target +} diff --git a/Library/XYPlotter.cpp b/Library/XYPlotter.cpp new file mode 100644 index 0000000..40b59a6 --- /dev/null +++ b/Library/XYPlotter.cpp @@ -0,0 +1,5 @@ +#include "xyplotter.h" + +XYPlotter::XYPlotter() +{ +} diff --git a/Library/XYPlotter.h b/Library/XYPlotter.h new file mode 100644 index 0000000..d552ab0 --- /dev/null +++ b/Library/XYPlotter.h @@ -0,0 +1,10 @@ +#ifndef XYPLOTTER_H +#define XYPLOTTER_H + +class XYPlotter +{ + public: + XYPlotter(); +}; + +#endif // XYPLOTTER_H diff --git a/Library/livingdesktoplibrary.cpp b/Library/livingdesktoplibrary.cpp new file mode 100644 index 0000000..ceadd29 --- /dev/null +++ b/Library/livingdesktoplibrary.cpp @@ -0,0 +1,6 @@ +#include "livingdesktoplibrary.h" + + +LivingDesktopLibrary::LivingDesktopLibrary() +{ +} diff --git a/Library/livingdesktoplibrary.h b/Library/livingdesktoplibrary.h new file mode 100644 index 0000000..4eab60e --- /dev/null +++ b/Library/livingdesktoplibrary.h @@ -0,0 +1,13 @@ +#ifndef LIVINGDESKTOPLIBRARY_H +#define LIVINGDESKTOPLIBRARY_H + +#include "livingdesktoplibrary_global.h" + +class LIVINGDESKTOPLIBRARYSHARED_EXPORT LivingDesktopLibrary +{ + + public: + LivingDesktopLibrary(); +}; + +#endif // LIVINGDESKTOPLIBRARY_H diff --git a/Library/livingdesktoplibrary_global.h b/Library/livingdesktoplibrary_global.h new file mode 100644 index 0000000..5f1dff7 --- /dev/null +++ b/Library/livingdesktoplibrary_global.h @@ -0,0 +1,12 @@ +#ifndef LIVINGDESKTOPLIBRARY_GLOBAL_H +#define LIVINGDESKTOPLIBRARY_GLOBAL_H + +#include + +#if defined(LIVINGDESKTOPLIBRARY_LIBRARY) +# define LIVINGDESKTOPLIBRARYSHARED_EXPORT Q_DECL_EXPORT +#else +# define LIVINGDESKTOPLIBRARYSHARED_EXPORT Q_DECL_IMPORT +#endif + +#endif // LIVINGDESKTOPLIBRARY_GLOBAL_H diff --git a/Test/Test.pro b/Test/Test.pro new file mode 100644 index 0000000..3d7da79 --- /dev/null +++ b/Test/Test.pro @@ -0,0 +1,20 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2015-08-18T11:19:47 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = Test +TEMPLATE = app + + +SOURCES += main.cpp\ + mainwindow.cpp + +HEADERS += mainwindow.h + +FORMS += mainwindow.ui diff --git a/Test/main.cpp b/Test/main.cpp new file mode 100644 index 0000000..b48f94e --- /dev/null +++ b/Test/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/Test/mainwindow.cpp b/Test/mainwindow.cpp new file mode 100644 index 0000000..49d64fc --- /dev/null +++ b/Test/mainwindow.cpp @@ -0,0 +1,14 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/Test/mainwindow.h b/Test/mainwindow.h new file mode 100644 index 0000000..fdfc884 --- /dev/null +++ b/Test/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { + class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + + public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + + private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/Test/mainwindow.ui b/Test/mainwindow.ui new file mode 100644 index 0000000..6050363 --- /dev/null +++ b/Test/mainwindow.ui @@ -0,0 +1,24 @@ + + MainWindow + + + + 0 + 0 + 400 + 300 + + + + MainWindow + + + + + + + + + + + -- 2.30.2