initial about added
This commit is contained in:
parent
432aed665a
commit
1d3125fbdc
5 changed files with 25 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
project(KIMA2)
|
||||
project(KIMA2 VERSION 0.1.0)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
|
@ -13,6 +13,8 @@ else()
|
|||
add_compile_options(-Wall -Wextra -pedantic -Woverloaded-virtual -Wredundant-decls -Wshadow)
|
||||
endif()
|
||||
|
||||
configure_file(config.h.in ${PROJECT_BINARY_DIR}/config.h)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
|
|
6
config.h.in
Normal file
6
config.h.in
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#cmakedefine PROJECT_VERSION "@PROJECT_VERSION@"
|
||||
|
||||
#endif
|
|
@ -27,4 +27,5 @@ set(GUI_SOURCES
|
|||
)
|
||||
|
||||
add_executable(kima2 ${GUI_SOURCES})
|
||||
target_include_directories(kima2 PRIVATE ${PROJECT_BINARY_DIR})
|
||||
target_link_libraries(kima2 core Qt5::Widgets stdc++fs)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "mainwindow.h"
|
||||
|
||||
#include "basketmodel.h"
|
||||
#include "config.h"
|
||||
#include "pricedialog.h"
|
||||
#include "reportdialog.h"
|
||||
#include "salemodel.h"
|
||||
|
@ -52,6 +53,7 @@ MainWindow::MainWindow()
|
|||
connect(static_cast<BasketModel*>(ui_.basketView->model()), &BasketModel::basketDataChanged,
|
||||
static_cast<SaleModel*>(ui_.salesView->model()), &SaleModel::onBasketDataChanged);
|
||||
connect(ui_.aboutQtAction, &QAction::triggered, this, &MainWindow::onAboutQt);
|
||||
connect(ui_.aboutAction, &QAction::triggered, this, &MainWindow::onAbout);
|
||||
connect(ui_.reportAction, &QAction::triggered, this, [=]() { ReportDialog(this).exec(); });
|
||||
connect(ui_.configAction, &QAction::triggered, this, [=]() {
|
||||
SettingsDialog(this).exec();
|
||||
|
@ -219,3 +221,14 @@ void MainWindow::onCancelAllArticlesButtonClicked([[maybe_unused]] bool checked)
|
|||
}
|
||||
|
||||
void MainWindow::onAboutQt() { QMessageBox::aboutQt(this); }
|
||||
|
||||
void MainWindow::onAbout()
|
||||
{
|
||||
QMessageBox::about(
|
||||
this, "Über",
|
||||
QString("<p><b>KIMA2</b> Version ") + PROJECT_VERSION +
|
||||
"</p>"
|
||||
"<p>KIMA2 ist ein kleines Kassenprogramm für Kindersachenmärkte.<p />"
|
||||
"<p>Copyright © Martin Brodbeck <<a href=mailto:martin@brodbeck-online.de"
|
||||
">info@rustysoft.de</a>></p>");
|
||||
}
|
|
@ -26,6 +26,7 @@ class MainWindow : public QMainWindow
|
|||
void onCancelSaleButtonClicked(bool checked);
|
||||
void onCancelAllArticlesButtonClicked(bool checked);
|
||||
void onAboutQt();
|
||||
void onAbout();
|
||||
|
||||
private:
|
||||
void onActionEditSellerTriggered();
|
||||
|
|
Loading…
Reference in a new issue