diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69a263d..9748a04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,9 +32,9 @@ if (LIB)
set(CMAKE_INSTALL_PREFIX /usr)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
foreach(F ${PIP_FOLDERS})
diff --git a/cd_utils/CMakeLists.txt b/cd_utils/CMakeLists.txt
index aa2329e..2420969 100644
--- a/cd_utils/CMakeLists.txt
+++ b/cd_utils/CMakeLists.txt
@@ -47,9 +47,9 @@ else()
install(FILES ${HDRS_UTILS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
endif()
diff --git a/kx_utils/CMakeLists.txt b/kx_utils/CMakeLists.txt
index 04e106f..21873e0 100644
--- a/kx_utils/CMakeLists.txt
+++ b/kx_utils/CMakeLists.txt
@@ -56,10 +56,10 @@ if (LIB)
install(FILES ${HDRS_UTILS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
if (NOT DEFINED ENV{QNX_HOST})
if (KX_PULT)
diff --git a/piqt/CMakeLists.txt b/piqt/CMakeLists.txt
index 5730173..52a89a7 100644
--- a/piqt/CMakeLists.txt
+++ b/piqt/CMakeLists.txt
@@ -38,9 +38,9 @@ else()
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
endif()
diff --git a/piqt_utils/CMakeLists.txt b/piqt_utils/CMakeLists.txt
index b9b988b..315a0e1 100644
--- a/piqt_utils/CMakeLists.txt
+++ b/piqt_utils/CMakeLists.txt
@@ -57,9 +57,9 @@ else()
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
endif()
diff --git a/piqt_utils/piconnedit/CMakeLists.txt b/piqt_utils/piconnedit/CMakeLists.txt
index 459935c..eb474bb 100644
--- a/piqt_utils/piconnedit/CMakeLists.txt
+++ b/piqt_utils/piconnedit/CMakeLists.txt
@@ -13,9 +13,9 @@ if(LIB)
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
diff --git a/piqt_utils/pidumper/CMakeLists.txt b/piqt_utils/pidumper/CMakeLists.txt
index ac7108e..1bcb386 100644
--- a/piqt_utils/pidumper/CMakeLists.txt
+++ b/piqt_utils/pidumper/CMakeLists.txt
@@ -13,9 +13,9 @@ if(LIB)
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
diff --git a/piqt_utils/piintrospector/CMakeLists.txt b/piqt_utils/piintrospector/CMakeLists.txt
index 86c6b43..0f48713 100644
--- a/piqt_utils/piintrospector/CMakeLists.txt
+++ b/piqt_utils/piintrospector/CMakeLists.txt
@@ -13,9 +13,9 @@ if(LIB)
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
diff --git a/qad/CMakeLists.txt b/qad/CMakeLists.txt
index fbe2038..68f01b0 100644
--- a/qad/CMakeLists.txt
+++ b/qad/CMakeLists.txt
@@ -12,6 +12,7 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
endif ()
endif()
+
find_package(OpenGL REQUIRED)
if (MINGW)
find_package(MinGW REQUIRED)
@@ -28,9 +29,9 @@ if (NOT LIBPROJECT)
set(CMAKE_INSTALL_PREFIX /usr)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
endif()
set(CMAKES "FindQAD.cmake" "QtProject.cmake")
diff --git a/qad/QtProject.cmake b/qad/QtProject.cmake
index cf6311c..96f992d 100644
--- a/qad/QtProject.cmake
+++ b/qad/QtProject.cmake
@@ -1,5 +1,7 @@
macro(qt_project NAME _H_OUT _CPP_OUT)
project(${NAME})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall")
find_package(Qt4 REQUIRED)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES})
file(GLOB ${_H_OUT} "./*.h")
diff --git a/qad/application/plugin/CMakeLists.txt b/qad/application/plugin/CMakeLists.txt
index 09f97dd..d04cba1 100644
--- a/qad/application/plugin/CMakeLists.txt
+++ b/qad/application/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(application "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(application ${LIBS})
diff --git a/qad/blockview/blockeditor/CMakeLists.txt b/qad/blockview/blockeditor/CMakeLists.txt
index 95b1282..f2d4801 100644
--- a/qad/blockview/blockeditor/CMakeLists.txt
+++ b/qad/blockview/blockeditor/CMakeLists.txt
@@ -13,9 +13,9 @@ if(LIB)
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
diff --git a/qad/blockview/plugin/CMakeLists.txt b/qad/blockview/plugin/CMakeLists.txt
index 15ccc7a..7770866 100644
--- a/qad/blockview/plugin/CMakeLists.txt
+++ b/qad/blockview/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(blockview "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(blockview "${LIBS}")
diff --git a/qad/graphic/CMakeLists.txt b/qad/graphic/CMakeLists.txt
index 2fcdf87..2d28961 100644
--- a/qad/graphic/CMakeLists.txt
+++ b/qad/graphic/CMakeLists.txt
@@ -1,2 +1,3 @@
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${OPENGL_LIBRARIES} qad_widgets qad_utils)
qad_project(graphic "${LIBS}")
+add_subdirectory(qpicalculator)
\ No newline at end of file
diff --git a/qad/graphic/plugin/CMakeLists.txt b/qad/graphic/plugin/CMakeLists.txt
index 61032be..4007a22 100644
--- a/qad/graphic/plugin/CMakeLists.txt
+++ b/qad/graphic/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(graphic "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(graphic "${LIBS}")
diff --git a/qad/graphic/qpicalculator/CMakeLists.txt b/qad/graphic/qpicalculator/CMakeLists.txt
new file mode 100644
index 0000000..f31f5eb
--- /dev/null
+++ b/qad/graphic/qpicalculator/CMakeLists.txt
@@ -0,0 +1,21 @@
+qt_project(qpicalc QPICALC_H QPICALC_H)
+add_executable(${PROJECT_NAME} WIN32 ${QPICALC_H} ${QPICALC_H})
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qad_widgets qad_utils qad_graphic)
+target_link_libraries(${PROJECT_NAME} ${LIBS})
+message(STATUS "Building ${PROJECT_NAME}")
+if(LIB)
+ if(WIN32)
+ install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
+ else()
+ if(APPLE)
+ install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
+ else()
+ install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
+ endif()
+ endif()
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
+else()
+ install(TARGETS ${PROJECT_NAME} DESTINATION bin)
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
+endif()
+
diff --git a/qad/graphic/qpicalculator/CMakeLists.txt.user b/qad/graphic/qpicalculator/CMakeLists.txt.user
new file mode 100644
index 0000000..6d91a76
--- /dev/null
+++ b/qad/graphic/qpicalculator/CMakeLists.txt.user
@@ -0,0 +1,188 @@
+
+
+
+
+
+ EnvironmentId
+ {948faa78-0b50-402e-a285-1bca3b08de64}
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ false
+
+ Cpp
+
+ CppGlobal
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ UTF-8
+ false
+ 4
+ false
+ 80
+ true
+ true
+ 1
+ true
+ false
+ 0
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ false
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ DesktopBuild
+ DesktopBuild
+ {3c749452-9483-442d-b011-933a1b5dac10}
+ 0
+ 0
+ 0
+
+ false
+ D:/work/qpicalculator-build
+
+
+
+
+ false
+ true
+ Сборка
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Сборка
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ clean
+
+ true
+ true
+ Сборка
+
+ CMakeProjectManager.MakeStep
+
+ 1
+ Очистка
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ all
+
+ CMakeProjectManager.CMakeBuildConfiguration
+
+ 1
+
+
+ 0
+ Установка
+
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+ Локальная установка
+
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 3
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+ qpicalculator
+
+ false
+
+ 2
+
+ qpicalculator
+
+ CMakeProjectManager.CMakeRunConfiguration.qpicalculator
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 16
+
+
+ Version
+ 16
+
+
diff --git a/qad/graphic/qpicalculator/icons/Apps-accessories-calculator-icon.png b/qad/graphic/qpicalculator/icons/Apps-accessories-calculator-icon.png
new file mode 100644
index 0000000..37a3035
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/Apps-accessories-calculator-icon.png differ
diff --git a/qad/graphic/qpicalculator/icons/application-exit.png b/qad/graphic/qpicalculator/icons/application-exit.png
new file mode 100644
index 0000000..4839c61
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/application-exit.png differ
diff --git a/qad/graphic/qpicalculator/icons/arrow-left.png b/qad/graphic/qpicalculator/icons/arrow-left.png
new file mode 100644
index 0000000..0a74ecf
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/arrow-left.png differ
diff --git a/qad/graphic/qpicalculator/icons/arrow-right.png b/qad/graphic/qpicalculator/icons/arrow-right.png
new file mode 100644
index 0000000..0a8a69e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/arrow-right.png differ
diff --git a/qad/graphic/qpicalculator/icons/axes.png b/qad/graphic/qpicalculator/icons/axes.png
new file mode 100644
index 0000000..11a059d
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/axes.png differ
diff --git a/qad/graphic/qpicalculator/icons/axes_1.png b/qad/graphic/qpicalculator/icons/axes_1.png
new file mode 100644
index 0000000..cb54382
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/axes_1.png differ
diff --git a/qad/graphic/qpicalculator/icons/character-set.png b/qad/graphic/qpicalculator/icons/character-set.png
new file mode 100644
index 0000000..9be1a10
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/character-set.png differ
diff --git a/qad/graphic/qpicalculator/icons/configure.png b/qad/graphic/qpicalculator/icons/configure.png
new file mode 100644
index 0000000..5ce478b
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/configure.png differ
diff --git a/qad/graphic/qpicalculator/icons/dialog-close.png b/qad/graphic/qpicalculator/icons/dialog-close.png
new file mode 100644
index 0000000..2c2f99e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/dialog-close.png differ
diff --git a/qad/graphic/qpicalculator/icons/document-close.png b/qad/graphic/qpicalculator/icons/document-close.png
new file mode 100644
index 0000000..d3937b9
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/document-close.png differ
diff --git a/qad/graphic/qpicalculator/icons/document-edit.png b/qad/graphic/qpicalculator/icons/document-edit.png
new file mode 100644
index 0000000..84e345d
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/document-edit.png differ
diff --git a/qad/graphic/qpicalculator/icons/document-open.png b/qad/graphic/qpicalculator/icons/document-open.png
new file mode 100644
index 0000000..b225e9a
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/document-open.png differ
diff --git a/qad/graphic/qpicalculator/icons/document-revert.png b/qad/graphic/qpicalculator/icons/document-revert.png
new file mode 100644
index 0000000..b224e05
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/document-revert.png differ
diff --git a/qad/graphic/qpicalculator/icons/document-save-as.png b/qad/graphic/qpicalculator/icons/document-save-as.png
new file mode 100644
index 0000000..821ca12
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/document-save-as.png differ
diff --git a/qad/graphic/qpicalculator/icons/document-save.png b/qad/graphic/qpicalculator/icons/document-save.png
new file mode 100644
index 0000000..8072aea
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/document-save.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-clear-locationbar-rtl.png b/qad/graphic/qpicalculator/icons/edit-clear-locationbar-rtl.png
new file mode 100644
index 0000000..6c4b83b
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-clear-locationbar-rtl.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-clear.png b/qad/graphic/qpicalculator/icons/edit-clear.png
new file mode 100644
index 0000000..19a1665
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-clear.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-copy.png b/qad/graphic/qpicalculator/icons/edit-copy.png
new file mode 100644
index 0000000..5cdeb5f
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-copy.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-cut.png b/qad/graphic/qpicalculator/icons/edit-cut.png
new file mode 100644
index 0000000..f4a55e3
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-cut.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-delete.png b/qad/graphic/qpicalculator/icons/edit-delete.png
new file mode 100644
index 0000000..87cd0b0
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-delete.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-find.png b/qad/graphic/qpicalculator/icons/edit-find.png
new file mode 100644
index 0000000..9a462c0
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-find.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-guides.png b/qad/graphic/qpicalculator/icons/edit-guides.png
new file mode 100644
index 0000000..d264839
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-guides.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-paste.png b/qad/graphic/qpicalculator/icons/edit-paste.png
new file mode 100644
index 0000000..a4e0a02
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-paste.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-redo.png b/qad/graphic/qpicalculator/icons/edit-redo.png
new file mode 100644
index 0000000..9bfee2d
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-redo.png differ
diff --git a/qad/graphic/qpicalculator/icons/edit-undo.png b/qad/graphic/qpicalculator/icons/edit-undo.png
new file mode 100644
index 0000000..83e41dc
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/edit-undo.png differ
diff --git a/qad/graphic/qpicalculator/icons/empty_brick.png b/qad/graphic/qpicalculator/icons/empty_brick.png
new file mode 100644
index 0000000..b09680b
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/empty_brick.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-fill-color.png b/qad/graphic/qpicalculator/icons/format-fill-color.png
new file mode 100644
index 0000000..6601f53
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-fill-color.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-text-bold.png b/qad/graphic/qpicalculator/icons/format-text-bold.png
new file mode 100644
index 0000000..3abb164
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-text-bold.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-text-color.png b/qad/graphic/qpicalculator/icons/format-text-color.png
new file mode 100644
index 0000000..9e86afc
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-text-color.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-text-italic.png b/qad/graphic/qpicalculator/icons/format-text-italic.png
new file mode 100644
index 0000000..93ec082
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-text-italic.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-text-overline.png b/qad/graphic/qpicalculator/icons/format-text-overline.png
new file mode 100644
index 0000000..e49a11c
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-text-overline.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-text-strikethrough.png b/qad/graphic/qpicalculator/icons/format-text-strikethrough.png
new file mode 100644
index 0000000..f248ce0
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-text-strikethrough.png differ
diff --git a/qad/graphic/qpicalculator/icons/format-text-underline.png b/qad/graphic/qpicalculator/icons/format-text-underline.png
new file mode 100644
index 0000000..7e47fb8
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/format-text-underline.png differ
diff --git a/qad/graphic/qpicalculator/icons/go-home.png b/qad/graphic/qpicalculator/icons/go-home.png
new file mode 100644
index 0000000..aab6a88
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/go-home.png differ
diff --git a/qad/graphic/qpicalculator/icons/go-next.png b/qad/graphic/qpicalculator/icons/go-next.png
new file mode 100644
index 0000000..aa7cbb9
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/go-next.png differ
diff --git a/qad/graphic/qpicalculator/icons/go-previous.png b/qad/graphic/qpicalculator/icons/go-previous.png
new file mode 100644
index 0000000..8230340
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/go-previous.png differ
diff --git a/qad/graphic/qpicalculator/icons/graphic_add.png b/qad/graphic/qpicalculator/icons/graphic_add.png
new file mode 100644
index 0000000..a002a95
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/graphic_add.png differ
diff --git a/qad/graphic/qpicalculator/icons/graphics.png b/qad/graphic/qpicalculator/icons/graphics.png
new file mode 100644
index 0000000..8cd2359
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/graphics.png differ
diff --git a/qad/graphic/qpicalculator/icons/help-contents.png b/qad/graphic/qpicalculator/icons/help-contents.png
new file mode 100644
index 0000000..b3fbea8
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/help-contents.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_brick_add.png b/qad/graphic/qpicalculator/icons/history_brick_add.png
new file mode 100644
index 0000000..808b43d
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_brick_add.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_brick_del.png b/qad/graphic/qpicalculator/icons/history_brick_del.png
new file mode 100644
index 0000000..da48458
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_brick_del.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_brick_move.png b/qad/graphic/qpicalculator/icons/history_brick_move.png
new file mode 100644
index 0000000..7d42f91
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_brick_move.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_conn_add.png b/qad/graphic/qpicalculator/icons/history_conn_add.png
new file mode 100644
index 0000000..1f2839f
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_conn_add.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_conn_del.png b/qad/graphic/qpicalculator/icons/history_conn_del.png
new file mode 100644
index 0000000..48284dc
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_conn_del.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_conn_edit.png b/qad/graphic/qpicalculator/icons/history_conn_edit.png
new file mode 100644
index 0000000..74ecd00
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_conn_edit.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_conn_retrace.png b/qad/graphic/qpicalculator/icons/history_conn_retrace.png
new file mode 100644
index 0000000..427f1ce
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_conn_retrace.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_convert.png b/qad/graphic/qpicalculator/icons/history_convert.png
new file mode 100644
index 0000000..b84e2b7
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_convert.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_freq.png b/qad/graphic/qpicalculator/icons/history_freq.png
new file mode 100644
index 0000000..2b68fac
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_freq.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_point.xcf b/qad/graphic/qpicalculator/icons/history_point.xcf
new file mode 100644
index 0000000..6c08963
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_point.xcf differ
diff --git a/qad/graphic/qpicalculator/icons/history_point_add.png b/qad/graphic/qpicalculator/icons/history_point_add.png
new file mode 100644
index 0000000..89f738b
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_point_add.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_point_del.png b/qad/graphic/qpicalculator/icons/history_point_del.png
new file mode 100644
index 0000000..970d0d7
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_point_del.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_point_move.png b/qad/graphic/qpicalculator/icons/history_point_move.png
new file mode 100644
index 0000000..9a1f895
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_point_move.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_seg_add.png b/qad/graphic/qpicalculator/icons/history_seg_add.png
new file mode 100644
index 0000000..2862e21
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_seg_add.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_seg_del.png b/qad/graphic/qpicalculator/icons/history_seg_del.png
new file mode 100644
index 0000000..3b8ebaa
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_seg_del.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_seg_move.png b/qad/graphic/qpicalculator/icons/history_seg_move.png
new file mode 100644
index 0000000..594711e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_seg_move.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_text_add.png b/qad/graphic/qpicalculator/icons/history_text_add.png
new file mode 100644
index 0000000..be78f1e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_text_add.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_text_del.png b/qad/graphic/qpicalculator/icons/history_text_del.png
new file mode 100644
index 0000000..7f6eb67
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_text_del.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_text_edit.png b/qad/graphic/qpicalculator/icons/history_text_edit.png
new file mode 100644
index 0000000..b2c973e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_text_edit.png differ
diff --git a/qad/graphic/qpicalculator/icons/history_text_move.png b/qad/graphic/qpicalculator/icons/history_text_move.png
new file mode 100644
index 0000000..141876a
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/history_text_move.png differ
diff --git a/qad/graphic/qpicalculator/icons/initial.png b/qad/graphic/qpicalculator/icons/initial.png
new file mode 100644
index 0000000..b889071
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/initial.png differ
diff --git a/qad/graphic/qpicalculator/icons/insert-image.png b/qad/graphic/qpicalculator/icons/insert-image.png
new file mode 100644
index 0000000..9a1b321
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/insert-image.png differ
diff --git a/qad/graphic/qpicalculator/icons/insert-text.png b/qad/graphic/qpicalculator/icons/insert-text.png
new file mode 100644
index 0000000..65d645d
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/insert-text.png differ
diff --git a/qad/graphic/qpicalculator/icons/layer-visible-off.png b/qad/graphic/qpicalculator/icons/layer-visible-off.png
new file mode 100644
index 0000000..24277f6
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/layer-visible-off.png differ
diff --git a/qad/graphic/qpicalculator/icons/layer-visible-on.png b/qad/graphic/qpicalculator/icons/layer-visible-on.png
new file mode 100644
index 0000000..ea53bd1
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/layer-visible-on.png differ
diff --git a/qad/graphic/qpicalculator/icons/list-add.png b/qad/graphic/qpicalculator/icons/list-add.png
new file mode 100644
index 0000000..1e03be9
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/list-add.png differ
diff --git a/qad/graphic/qpicalculator/icons/mbricks.svg b/qad/graphic/qpicalculator/icons/mbricks.svg
new file mode 100644
index 0000000..38ed473
--- /dev/null
+++ b/qad/graphic/qpicalculator/icons/mbricks.svg
@@ -0,0 +1,351 @@
+
+
+
+
diff --git a/qad/graphic/qpicalculator/icons/mbricks_128.png b/qad/graphic/qpicalculator/icons/mbricks_128.png
new file mode 100644
index 0000000..7eb729b
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/mbricks_128.png differ
diff --git a/qad/graphic/qpicalculator/icons/mbricks_22.png b/qad/graphic/qpicalculator/icons/mbricks_22.png
new file mode 100644
index 0000000..cc19f2f
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/mbricks_22.png differ
diff --git a/qad/graphic/qpicalculator/icons/mbricks_256.png b/qad/graphic/qpicalculator/icons/mbricks_256.png
new file mode 100644
index 0000000..22c4f53
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/mbricks_256.png differ
diff --git a/qad/graphic/qpicalculator/icons/mbricks_64.png b/qad/graphic/qpicalculator/icons/mbricks_64.png
new file mode 100644
index 0000000..11fbb75
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/mbricks_64.png differ
diff --git a/qad/graphic/qpicalculator/icons/media-playback-pause.png b/qad/graphic/qpicalculator/icons/media-playback-pause.png
new file mode 100644
index 0000000..a9b3113
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/media-playback-pause.png differ
diff --git a/qad/graphic/qpicalculator/icons/media-playback-start.png b/qad/graphic/qpicalculator/icons/media-playback-start.png
new file mode 100644
index 0000000..80ff3a1
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/media-playback-start.png differ
diff --git a/qad/graphic/qpicalculator/icons/media-playback-stop.png b/qad/graphic/qpicalculator/icons/media-playback-stop.png
new file mode 100644
index 0000000..180280e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/media-playback-stop.png differ
diff --git a/qad/graphic/qpicalculator/icons/media-skip-forward.png b/qad/graphic/qpicalculator/icons/media-skip-forward.png
new file mode 100644
index 0000000..0d22924
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/media-skip-forward.png differ
diff --git a/qad/graphic/qpicalculator/icons/object-flip-horizontal.png b/qad/graphic/qpicalculator/icons/object-flip-horizontal.png
new file mode 100644
index 0000000..6b428d0
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/object-flip-horizontal.png differ
diff --git a/qad/graphic/qpicalculator/icons/player-time.png b/qad/graphic/qpicalculator/icons/player-time.png
new file mode 100644
index 0000000..77ba33c
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/player-time.png differ
diff --git a/qad/graphic/qpicalculator/icons/preferences-desktop-display.png b/qad/graphic/qpicalculator/icons/preferences-desktop-display.png
new file mode 100644
index 0000000..bd64701
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/preferences-desktop-display.png differ
diff --git a/qad/graphic/qpicalculator/icons/preferences-desktop-keyboard.png b/qad/graphic/qpicalculator/icons/preferences-desktop-keyboard.png
new file mode 100644
index 0000000..d13683f
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/preferences-desktop-keyboard.png differ
diff --git a/qad/graphic/qpicalculator/icons/run-build.png b/qad/graphic/qpicalculator/icons/run-build.png
new file mode 100644
index 0000000..d5fa88f
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/run-build.png differ
diff --git a/qad/graphic/qpicalculator/icons/tree.png b/qad/graphic/qpicalculator/icons/tree.png
new file mode 100644
index 0000000..592446a
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/tree.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-center.png b/qad/graphic/qpicalculator/icons/view-center.png
new file mode 100644
index 0000000..8de1c9b
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-center.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-fullscreen.png b/qad/graphic/qpicalculator/icons/view-fullscreen.png
new file mode 100644
index 0000000..d41fc7e
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-fullscreen.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-grid.png b/qad/graphic/qpicalculator/icons/view-grid.png
new file mode 100644
index 0000000..0f1d70c
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-grid.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-mode-compact.png b/qad/graphic/qpicalculator/icons/view-mode-compact.png
new file mode 100644
index 0000000..d02228c
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-mode-compact.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-mode-expanded.png b/qad/graphic/qpicalculator/icons/view-mode-expanded.png
new file mode 100644
index 0000000..59a82d2
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-mode-expanded.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-mode-icon.png b/qad/graphic/qpicalculator/icons/view-mode-icon.png
new file mode 100644
index 0000000..78f9f85
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-mode-icon.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-refresh.png b/qad/graphic/qpicalculator/icons/view-refresh.png
new file mode 100644
index 0000000..86b6f82
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-refresh.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-restore.png b/qad/graphic/qpicalculator/icons/view-restore.png
new file mode 100644
index 0000000..7726c35
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-restore.png differ
diff --git a/qad/graphic/qpicalculator/icons/view-tooltips.png b/qad/graphic/qpicalculator/icons/view-tooltips.png
new file mode 100644
index 0000000..ca5652c
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/view-tooltips.png differ
diff --git a/qad/graphic/qpicalculator/icons/window-new.png b/qad/graphic/qpicalculator/icons/window-new.png
new file mode 100644
index 0000000..4268189
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/window-new.png differ
diff --git a/qad/graphic/qpicalculator/icons/zoom-fit-best.png b/qad/graphic/qpicalculator/icons/zoom-fit-best.png
new file mode 100644
index 0000000..07cfc98
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/zoom-fit-best.png differ
diff --git a/qad/graphic/qpicalculator/icons/zoom-in.png b/qad/graphic/qpicalculator/icons/zoom-in.png
new file mode 100644
index 0000000..6b7a682
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/zoom-in.png differ
diff --git a/qad/graphic/qpicalculator/icons/zoom-original.png b/qad/graphic/qpicalculator/icons/zoom-original.png
new file mode 100644
index 0000000..c894400
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/zoom-original.png differ
diff --git a/qad/graphic/qpicalculator/icons/zoom-out.png b/qad/graphic/qpicalculator/icons/zoom-out.png
new file mode 100644
index 0000000..0ee8c6f
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/zoom-out.png differ
diff --git a/qad/graphic/qpicalculator/icons/zoom-range.png b/qad/graphic/qpicalculator/icons/zoom-range.png
new file mode 100644
index 0000000..c052512
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/zoom-range.png differ
diff --git a/qad/graphic/qpicalculator/icons/zoom-rect.png b/qad/graphic/qpicalculator/icons/zoom-rect.png
new file mode 100644
index 0000000..da44fd5
Binary files /dev/null and b/qad/graphic/qpicalculator/icons/zoom-rect.png differ
diff --git a/qad/graphic/qpicalculator/main.cpp b/qad/graphic/qpicalculator/main.cpp
new file mode 100644
index 0000000..6e7efd9
--- /dev/null
+++ b/qad/graphic/qpicalculator/main.cpp
@@ -0,0 +1,10 @@
+#include
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+ return a.exec();
+}
diff --git a/qad/graphic/qpicalculator/mainwindow.cpp b/qad/graphic/qpicalculator/mainwindow.cpp
new file mode 100644
index 0000000..e60d01c
--- /dev/null
+++ b/qad/graphic/qpicalculator/mainwindow.cpp
@@ -0,0 +1,249 @@
+#include "mainwindow.h"
+
+
+MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow() {
+ setupUi(this);
+ active_ = false;
+ lineInput->setFocus();
+ treeGraphics->header()->setResizeMode(0, QHeaderView::ResizeToContents);
+ treeGraphics->header()->setResizeMode(1, QHeaderView::ResizeToContents);
+ npal = epal = lineInput->palette();
+ epal.setColor(lineInput->backgroundRole(), QColor(Qt::red).lighter(150));
+ connect(&session, SIGNAL(loading(QPIConfig & )), this, SLOT(loading(QPIConfig & )));
+ connect(&session, SIGNAL(saving(QPIConfig & )), this, SLOT(saving(QPIConfig & )));
+ session.setFile("session.conf");
+ session.addEntry(this);
+ session.addEntry(lineInput);
+ session.addEntry(tabWidget);
+ session.load();
+ on_lineInput_returnPressed();
+}
+
+
+MainWindow::~MainWindow() {session.save();
+}
+
+
+void MainWindow::changeEvent(QEvent * e) {
+ QMainWindow::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+
+void MainWindow::updateGraphics() {
+ graphic->setGraphicsCount(treeGraphics->topLevelItemCount());
+ for (int i = 0; i < treeGraphics->topLevelItemCount(); ++i)
+ graphic->setGraphicColor(treeGraphics->topLevelItem(i)->data(0, Qt::DecorationRole).value(), i);
+ redrawGraphics();
+}
+
+
+void MainWindow::redrawGraphics() {
+ QRectF sr = graphic->visualRect();
+ double dx = (sr.right() - sr.left()) / graphic->width(), sx = sr.left(), fx = sr.right(), cx;
+ QPolygonF pol;
+ evaluator.setVariable("x");
+ int vi = evaluator.variableIndex("x");
+ graphic->setAutoUpdate(false);
+ for (int i = 0; i < treeGraphics->topLevelItemCount(); ++i) {
+ QTreeWidgetItem * ti = treeGraphics->topLevelItem(i);
+ graphic->setGraphicName(ti->text(1), i);
+ pol.clear();
+ if (ti->checkState(0) == Qt::Checked) {
+ if (evaluator.check(ti->text(1))) {
+ cx = sx;
+ while (cx < fx) {
+ evaluator.setVariable(vi, complexd(cx, 0.));
+ pol << QPointF(cx, evaluator.evaluate().real());
+ cx += dx;
+ }
+ }
+ }
+ graphic->setGraphicVisible(ti->checkState(0) == Qt::Checked, i);
+ graphic->setGraphicData(pol, i);
+ }
+ graphic->setAutoUpdate(true);
+ graphic->update(true);
+}
+
+
+void MainWindow::loading(QPIConfig & conf) {
+ active_ = false;
+ QStringList vars = conf.getValue("variables", QStringList());
+ int vc = vars.size() / 2;
+ for (int i = 0; i < vc; ++i) {
+ QTreeWidgetItem * ti = new QTreeWidgetItem(treeVariables);
+ ti->setText(0, vars[i * 2]);
+ ti->setText(1, vars[i * 2 + 1]);
+ ti->setFlags(ti->flags() | Qt::ItemIsEditable);
+ treeVariables->addTopLevelItem(ti);
+ }
+ buttonVarClear->setEnabled(treeVariables->topLevelItemCount() > 0);
+ QByteArray ba = QString2QByteArray(conf.getValue("graphics")); QDataStream s(ba);
+ QVector g;
+ if (!ba.isEmpty()) s >> g;
+ graphic->setAllGraphics(g);
+ for (int i = 0; i < graphic->graphicsCount(); ++i) {
+ graphic->setCurrentGraphic(i);
+ QTreeWidgetItem * ti = new QTreeWidgetItem(treeGraphics);
+ ti->setFlags(ti->flags() | Qt::ItemIsEditable);
+ ti->setCheckState(0, graphic->graphicVisible() ? Qt::Checked : Qt::Unchecked);
+ ti->setData(0, Qt::DecorationRole, graphic->graphicColor());
+ ti->setText(1, graphic->graphicName());
+ treeGraphics->addTopLevelItem(ti);
+ }
+ buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
+ graphic->setVisualRect(conf.getValue("graphicRect", QRectF(-1., -1., 2., 2.)));
+ on_tabWidget_currentChanged(0);
+ redrawGraphics();
+ active_ = true;
+}
+
+
+void MainWindow::saving(QPIConfig & conf) {
+ QStringList vars;
+ int vc = treeVariables->topLevelItemCount();
+ for (int i = 0; i < vc; ++i) {
+ QTreeWidgetItem * ti = treeVariables->topLevelItem(i);
+ vars << ti->text(0) << ti->text(1);
+ }
+ conf.setValue("variables", vars);
+
+ QVector g;
+ vc = treeGraphics->topLevelItemCount();
+ for (int i = 0; i < vc; ++i) {
+ QTreeWidgetItem * ti = treeGraphics->topLevelItem(i);
+ vars << QString::number(ti->backgroundColor(1).rgb()) << ti->text(2);
+ }
+ QByteArray ba; QDataStream s(&ba, QIODevice::WriteOnly);
+ s << graphic->allGraphics();
+ conf.setValue("graphics", QByteArray2QString(ba));
+ conf.setValue("graphicRect", graphic->visualRect());
+}
+
+
+void MainWindow::on_lineInput_textChanged(QString text) {
+ if (evaluator.check(text)) lineInput->setPalette(npal);
+ else lineInput->setPalette(epal);
+ labelParsed->setText(evaluator.expression());
+ labelError->setText(evaluator.error());
+}
+
+
+void MainWindow::on_lineInput_returnPressed() {
+ bool ret = evaluator.check(lineInput->text());
+ if (ret) lineInput->setPalette(npal);
+ else lineInput->setPalette(epal);
+ labelParsed->setText(evaluator.expression());
+ labelError->setText(evaluator.error());
+ if (!ret) return;
+ complexd val = evaluator.evaluate();
+ if (val.imag() == 0) labelResult->setText(QString::number(val.real()));
+ else {
+ if (val.real() == 0) labelResult->setText(QString::number(val.imag()) + "i");
+ else {
+ if (val.imag() > 0) labelResult->setText(QString::number(val.real())
+ + " + " + QString::number(val.imag()) + "i");
+ else labelResult->setText(QString::number(val.real())
+ + " - " + QString::number(fabs(val.imag())) + "i");
+ }
+ }
+ if (lineInput->text().trimmed().isEmpty()) return;
+ QTreeWidgetItem * ti = 0, * pti = 0;
+ if (treeHistory->topLevelItemCount() > 0)
+ pti = treeHistory->topLevelItem(treeHistory->topLevelItemCount() - 1);
+ if (pti != 0)
+ if (pti->text(0) == lineInput->text())
+ return;
+ ti = new QTreeWidgetItem(treeHistory);
+ ti->setText(0, lineInput->text());
+ ti->setText(1, labelResult->text());
+ treeHistory->addTopLevelItem(ti);
+ if (treeHistory->verticalScrollBar()->value() == treeHistory->verticalScrollBar()->maximum())
+ treeHistory->scrollToBottom();
+}
+
+
+void MainWindow::on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column) {
+ Qt::ItemFlags f = item->flags();
+ if (column != 1) f &= ~Qt::ItemIsEditable;
+ else f |= Qt::ItemIsEditable;
+ item->setFlags(f);
+ if (column != 0) return;
+ QColor col = QColorDialog::getColor(item->data(0, Qt::DecorationRole).value(), this, "Select color for graphic", QColorDialog::ShowAlphaChannel);
+ if (!col.isValid()) return;
+ item->setData(0, Qt::DecorationRole, col);
+ updateGraphics();
+}
+
+
+void MainWindow::on_buttonVarAdd_clicked() {
+ QTreeWidgetItem * ti = new QTreeWidgetItem(treeVariables);
+ ti->setSelected(true);
+ ti->setFlags(ti->flags() | Qt::ItemIsEditable);
+ treeVariables->addTopLevelItem(ti);
+ treeVariables->setFocus();
+ treeVariables->editItem(ti);
+ buttonVarClear->setEnabled(treeVariables->topLevelItemCount() > 0);
+}
+
+
+void MainWindow::on_buttonVarDel_clicked() {
+ QList si = treeVariables->selectedItems();
+ foreach (QTreeWidgetItem * i, si)
+ delete i;
+ buttonVarClear->setEnabled(treeVariables->topLevelItemCount() > 0);
+}
+
+
+void MainWindow::on_buttonGraphicAdd_clicked() {
+ graphic->setGraphicsCount(graphic->graphicsCount() + 1);
+ graphic->setCurrentGraphic(graphic->graphicsCount() - 1);
+ QTreeWidgetItem * ti = new QTreeWidgetItem(treeGraphics);
+ ti->setSelected(true);
+ ti->setFlags(ti->flags() | Qt::ItemIsEditable);
+ ti->setCheckState(0, Qt::Checked);
+ ti->setData(0, Qt::DecorationRole, graphic->graphicColor());
+ treeGraphics->addTopLevelItem(ti);
+ treeGraphics->setFocus();
+ treeGraphics->editItem(ti, 1);
+ buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
+ updateGraphics();
+}
+
+
+void MainWindow::on_buttonGraphicDel_clicked() {
+ QList si = treeGraphics->selectedItems();
+ foreach (QTreeWidgetItem * i, si)
+ delete i;
+ buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
+ updateGraphics();
+}
+
+
+void MainWindow::on_buttonGraphicClear_clicked() {
+ treeGraphics->clear();
+ buttonGraphicClear->setEnabled(false);
+ updateGraphics();
+}
+
+
+void MainWindow::on_tabWidget_currentChanged(int index) {
+ QPIEvaluator 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);
+ evaluator.setVariable(vn, eval.evaluate());
+ }
+ if (index == 0) on_lineInput_returnPressed();
+ if (index == 2) redrawGraphics();
+}
diff --git a/qad/graphic/qpicalculator/mainwindow.h b/qad/graphic/qpicalculator/mainwindow.h
new file mode 100644
index 0000000..601c2c9
--- /dev/null
+++ b/qad/graphic/qpicalculator/mainwindow.h
@@ -0,0 +1,55 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "ui_mainwindow.h"
+#include "qpievaluator.h"
+#include "session_manager.h"
+
+
+class MainWindow: public QMainWindow, private Ui::MainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(QWidget * parent = 0);
+ ~MainWindow();
+
+protected:
+ void changeEvent(QEvent * e);
+
+private:
+ void updateGraphics();
+ void redrawGraphics();
+
+ QPIEvaluator evaluator;
+ QPalette npal, epal;
+ SessionManager session;
+ bool active_;
+
+private slots:
+ void loading(QPIConfig & conf);
+ void saving(QPIConfig & conf);
+ void on_lineInput_textChanged(QString s);
+ void on_lineInput_returnPressed();
+ void on_treeHistory_itemDoubleClicked(QTreeWidgetItem * item, int column) {lineInput->setText(item->text(0));}
+ void on_treeVariables_itemSelectionChanged() {buttonVarDel->setDisabled(treeVariables->selectedItems().isEmpty());}
+ void on_treeGraphics_itemSelectionChanged() {buttonGraphicDel->setDisabled(treeGraphics->selectedItems().isEmpty());}
+ void on_treeGraphics_itemChanged(QTreeWidgetItem * , int col) { if (active_) redrawGraphics();}
+ void on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column);
+ void on_buttonVarAdd_clicked();
+ void on_buttonVarDel_clicked();
+ void on_buttonVarClear_clicked() {treeVariables->clear(); buttonVarClear->setEnabled(false);}
+ void on_buttonGraphicAdd_clicked();
+ void on_buttonGraphicDel_clicked();
+ void on_buttonGraphicClear_clicked();
+ void on_tabWidget_currentChanged(int index);
+ void on_graphic_visualRectChanged() {redrawGraphics();}
+
+};
+
+#endif // MAINWINDOW_H
diff --git a/qad/graphic/qpicalculator/mainwindow.ui b/qad/graphic/qpicalculator/mainwindow.ui
new file mode 100644
index 0000000..5126993
--- /dev/null
+++ b/qad/graphic/qpicalculator/mainwindow.ui
@@ -0,0 +1,442 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 780
+ 492
+
+
+
+ QPICalculator
+
+
+
+ :/icons/Apps-accessories-calculator-icon.png:/icons/Apps-accessories-calculator-icon.png
+
+
+
+ -
+
+
+ 0
+
+
+
+ Calculator
+
+
+
+ 2
+
+
+ 2
+
+
-
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::NoEditTriggers
+
+
+ true
+
+
+ QAbstractItemView::ScrollPerPixel
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ 300
+
+
+
+ Expression
+
+
+
+
+ Result
+
+
+
+
+ -
+
+
+ -
+
+
+ Correct
+
+
+
+ -
+
+
+ 0
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
+
+
+
+ -
+
+
+
+ 14
+ 75
+ true
+
+
+
+ 0
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
+
+
+
+
+
+
+
+ Variables
+
+
+
+ 2
+
+
+ 2
+
+ -
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::ScrollPerPixel
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ 200
+
+
+
+ Name
+
+
+
+
+ Value
+
+
+
+
+ -
+
+
+ 2
+
+
-
+
+
+
+ :/icons/list-add.png:/icons/list-add.png
+
+
+
+ 16
+ 16
+
+
+
+
+ -
+
+
+ false
+
+
+
+ :/icons/edit-delete.png:/icons/edit-delete.png
+
+
+
+ 16
+ 16
+
+
+
+ Del
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Preferred
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
+ false
+
+
+
+ :/icons/edit-clear.png:/icons/edit-clear.png
+
+
+
+ 16
+ 16
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+ Graphics
+
+
+
+ 2
+
+
+ 2
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::ScrollPerPixel
+
+
+ QAbstractItemView::ScrollPerPixel
+
+
+ false
+
+
+ false
+
+
+ true
+
+
+ false
+
+
+ 50
+
+
+
+ On
+
+
+
+
+ Function
+
+
+
+
+ -
+
+
+ 2
+
+
-
+
+
+
+ :/icons/list-add.png:/icons/list-add.png
+
+
+
+ 16
+ 16
+
+
+
+
+ -
+
+
+ false
+
+
+
+ :/icons/edit-delete.png:/icons/edit-delete.png
+
+
+
+ 16
+ 16
+
+
+
+ Del
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Preferred
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
+ false
+
+
+
+ :/icons/edit-clear.png:/icons/edit-clear.png
+
+
+
+ 16
+ 16
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ -
+
+
+ Graphic::BorderInputs|Graphic::Configure|Graphic::CursorAxis|Graphic::Grid|Graphic::Save
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Graphic
+ QFrame
+
+
+
+ CLineEdit
+ QLineEdit
+
+
+
+
+
+
+
+
diff --git a/qad/graphic/qpicalculator/qpicalculator.qrc b/qad/graphic/qpicalculator/qpicalculator.qrc
new file mode 100644
index 0000000..823218d
--- /dev/null
+++ b/qad/graphic/qpicalculator/qpicalculator.qrc
@@ -0,0 +1,9 @@
+
+
+ icons/edit-clear.png
+ icons/edit-delete.png
+ icons/list-add.png
+ icons/application-exit.png
+ icons/Apps-accessories-calculator-icon.png
+
+
diff --git a/qad/sql_table/plugin/CMakeLists.txt b/qad/sql_table/plugin/CMakeLists.txt
index 65de9df..2dcf545 100644
--- a/qad/sql_table/plugin/CMakeLists.txt
+++ b/qad/sql_table/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(sql_table "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(sql_table "${LIBS}")
diff --git a/qad/touch_widgets/plugin/CMakeLists.txt b/qad/touch_widgets/plugin/CMakeLists.txt
index 879009e..97e865b 100644
--- a/qad/touch_widgets/plugin/CMakeLists.txt
+++ b/qad/touch_widgets/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(touch_widgets "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(touch_widgets "${LIBS}")
diff --git a/qad/utils/plugin/CMakeLists.txt b/qad/utils/plugin/CMakeLists.txt
index 058341f..032b314 100644
--- a/qad/utils/plugin/CMakeLists.txt
+++ b/qad/utils/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(utils "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(utils "${LIBS}")
diff --git a/qad/widgets/plugin/CMakeLists.txt b/qad/widgets/plugin/CMakeLists.txt
index b4d9aec..2029ac1 100644
--- a/qad/widgets/plugin/CMakeLists.txt
+++ b/qad/widgets/plugin/CMakeLists.txt
@@ -1 +1,2 @@
-qad_plugin(widgets "")
+set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
+qad_plugin(widgets "${LIBS}")
diff --git a/qcd_utils/CMakeLists.txt b/qcd_utils/CMakeLists.txt
index e2c777b..e7fd99a 100644
--- a/qcd_utils/CMakeLists.txt
+++ b/qcd_utils/CMakeLists.txt
@@ -37,10 +37,10 @@ else()
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
endif()
diff --git a/qcd_utils/pult/CMakeLists.txt b/qcd_utils/pult/CMakeLists.txt
index 0b81552..66e98d3 100644
--- a/qcd_utils/pult/CMakeLists.txt
+++ b/qcd_utils/pult/CMakeLists.txt
@@ -13,9 +13,9 @@ if(LIB)
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
endif()
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
diff --git a/qglview/CMakeLists.txt b/qglview/CMakeLists.txt
index ccbd700..ab10cbd 100644
--- a/qglview/CMakeLists.txt
+++ b/qglview/CMakeLists.txt
@@ -42,10 +42,10 @@ else()
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
- message(STATUS "Install to system \"${CMAKE_INSTALL_PREFIX}\"")
+ message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
- message(STATUS "Install to local \"bin\"")
+ message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()
endif()