Windows works

This commit is contained in:
2020-09-06 21:46:06 +03:00
parent 32707fbd4d
commit b1536eb16a
12 changed files with 81 additions and 63 deletions

View File

@@ -1,14 +1,19 @@
project(qpicalc)
if(APPLE)
set(APP_ICON "")
elseif(WIN32)
set(APP_ICON "icons/qpicalculator.ico")
else()
set(APP_ICON "icons/qpicalculator.png")
endif()
set(APP_INFO "Small calculator ang grapher")
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic;qad_piqt;pip")
if (Qt5_FOUND)
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
find_package(PIP)
if (PIP_FOUND)
project(qpicalc)
if(APPLE)
set(APP_ICON "")
elseif(WIN32)
set(APP_ICON "icons/qpicalculator.ico")
else()
set(APP_ICON "icons/qpicalculator.png")
endif()
set(APP_INFO "Small calculator ang grapher")
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_graphic;qad_piqt")
if (Qt5_FOUND)
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
endif()
endif()

View File

@@ -258,13 +258,13 @@ void MainWindow::on_buttonGraphicClear_clicked() {
void MainWindow::on_tabWidget_currentChanged(int index) {
QPIEvaluator eval;
PIEvaluator eval;
evaluator.clearCustomVariables();
for (int i = 0; i < treeVariables->topLevelItemCount(); ++i) {
QString vn, vv;
vn = treeVariables->topLevelItem(i)->text(0);
vv = treeVariables->topLevelItem(i)->text(1);
eval.check(vv);
eval.check(Q2PIString(vv));
evaluator.setVariable(Q2PIString(vn), eval.evaluate());
}
if (index == 0) on_lineInput_returnPressed();