-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ChemCalc 1.00 initial version.
- Loading branch information
0 parents
commit 21e23ec
Showing
30 changed files
with
5,719 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(ChemCalc VERSION 0.1 LANGUAGES CXX) | ||
|
||
set(CMAKE_AUTOUIC ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Widgets PrintSupport Sql Gui Network Xml KF6Config) | ||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets PrintSupport Sql Gui Network Xml) | ||
|
||
set(PROJECT_SOURCES | ||
main.cpp | ||
mainwindow.cpp | ||
mainwindow.h | ||
mainwindow.ui | ||
) | ||
|
||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) | ||
qt_add_executable(ChemCalc | ||
MANUAL_FINALIZATION | ||
${PROJECT_SOURCES} | ||
mprintdialog.h mprintdialog.cpp mprintdialog.ui | ||
edit_dialog.h edit_dialog.cpp edit_dialog.ui | ||
resources.qrc | ||
select_dialog.h select_dialog.cpp select_dialog.ui | ||
about_dialog.h about_dialog.cpp about_dialog.ui | ||
COPYING.txt | ||
) | ||
# Define target properties for Android with Qt 6 as: | ||
# set_property(TARGET ChemCalc APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR | ||
# ${CMAKE_CURRENT_SOURCE_DIR}/android) | ||
# For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation | ||
else() | ||
if(ANDROID) | ||
add_library(ChemCalc SHARED | ||
${PROJECT_SOURCES} | ||
) | ||
# Define properties for Android with Qt 5 after find_package() calls as: | ||
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") | ||
else() | ||
add_executable(ChemCalc | ||
${PROJECT_SOURCES} | ||
) | ||
endif() | ||
endif() | ||
|
||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::Widgets) | ||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::PrintSupport) | ||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::Core) | ||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::Sql) | ||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::Gui) | ||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::Network) | ||
target_link_libraries(ChemCalc PRIVATE Qt${QT_VERSION_MAJOR}::Xml) | ||
|
||
# target_link_libraries(ChemCalc KF6::ConfigCore KF6::ConfigGui) // Doesn't work. | ||
|
||
|
||
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. | ||
# If you are developing for iOS or macOS you should consider setting an | ||
# explicit, fixed bundle identifier manually though. | ||
if(${QT_VERSION} VERSION_LESS 6.1.0) | ||
set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.ChemCalc) | ||
endif() | ||
set_target_properties(ChemCalc PROPERTIES | ||
${BUNDLE_ID_OPTION} | ||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} | ||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} | ||
MACOSX_BUNDLE TRUE | ||
WIN32_EXECUTABLE TRUE | ||
) | ||
|
||
include(GNUInstallDirs) | ||
install(TARGETS ChemCalc | ||
BUNDLE DESTINATION . | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) | ||
|
||
if(QT_VERSION_MAJOR EQUAL 6) | ||
qt_finalize_executable(ChemCalc) | ||
endif() |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## ChemCalc.conf | ||
## | ||
## This is the Chemical Calculator configuration file. | ||
## It is not used at this time but is reserved for future use. | ||
## | ||
## Lines starting with a pound sign (#) are ignored comments. | ||
## If you change this and break it simply delete this file and | ||
## restart Chemical Calulator to reinstall the default file. | ||
|
||
##---------------------------- | ||
## These two comboboxes contain the same items (suffixes).: | ||
## comboBox_StartingSolutionSuffix (= QStrings of maps A2 and A3) | ||
## comboBox_DesiredSolutionSuffix (= QStrings of maps A2 and A3) | ||
|
||
suffix_molar_map_A2 = {{"M",1}, {"mM",1e3}, {"uM",1e6}, {"nM",1e9}, {"pM",1e12}, {"fM",1e15}}; | ||
|
||
suffix_weight_per_liter_map_A3 = {{"%",100},{"g/L",1e3},{"mg/L",1e6},{"ug/L",1e9},{"ng/L",1e12},{"pg/L",1e15},{"fg/L",1e18}}; | ||
##----------------------------- | ||
|
||
volume_suffix_map_B2 = {{"ml",1e3}, {"L",1}, {"ul",1e6}}; | ||
##----------------------------- | ||
|
||
## comboBox_TotalAmountSuffix (= next 2) | ||
total_amount_suffix_map_moles_C2 = {{"moles",1}, {"millimoles",1e3}, {"micromoles",1e6}}; | ||
|
||
total_amount_suffix_map_weight_C3 = {{"g",1}, {"mg",1e3}, {"ug",1e6}}; | ||
##----------------------------- | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><sqlb_project><db path="/home/chris/Cpp-Projects/ChemCalc/ChemCalc_data.db" readonly="0" foreign_keys="1" case_sensitive_like="0" temp_store="0" wal_autocheckpoint="1000" synchronous="2"/><attached/><window><main_tabs open="structure browser pragmas query" current="1"/></window><tab_structure><column_width id="0" width="300"/><column_width id="1" width="0"/><column_width id="2" width="100"/><column_width id="3" width="287"/><column_width id="4" width="0"/><expanded_item id="0" parent="1"/><expanded_item id="1" parent="1"/><expanded_item id="2" parent="1"/><expanded_item id="3" parent="1"/></tab_structure><tab_browse><current_table name="4,4:mainUSER"/><default_encoding codec=""/><browse_table_settings><table schema="main" name="USER" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_"><sort/><column_widths><column index="1" value="126"/><column index="2" value="55"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table></browse_table_settings></tab_browse><tab_sql><sql name="SQL 1"></sql><current_tab id="0"/></tab_sql></sqlb_project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
**Chemical Calculator Help** | ||
|
||
Quick Start | ||
|
||
The easiest way to learn how to use Chemical Calculator is to jump right in with some examples. HINT: Move this window to one side of Chemical Calculator so that you can read this and enter data at the same time. | ||
|
||
Fill in the information needed in box 1 and continue to box 4 and press the 'Calculate' button. | ||
|
||
Example 1) Calculate how much Sodium Chloride (1 Molar stock solution / MW = 58.443) is needed to make 250 ml of a 1 mM desired solution. | ||
|
||
> In box **1-Starting Reagent**, type in "Sodium Chloride" in the first text box and '58.443' in the 'Molecular Weight' box. | ||
> | ||
> In box **2-Starting Reagent Concentration** click on the *Solution* radio button and type in '1.0' and select 'M' (Molar). | ||
> | ||
> In Box **3-Desired Solution** click on the 'Solution Conc' radio button and type in '1.0' and select 'mM' (for milliMolar). Then enter '250 ml' for the 'Final Volume Wanted' boxes. | ||
> | ||
> In Box **4-Results**, click on 'Calculate' to get your answer. | ||
> | ||
> If your answer looks correct you should click on the **'Add To Print List'** button to save or print. | ||
 | ||
|
||
Continue with any other reagents you want to add and click **'Add To Print List'** after each one is calculated. Then click on the **'Show, Print, or Save Print List'** button to view all of your results. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.