diff options
64 files changed, 70 insertions, 2583 deletions
diff --git a/file_picker.gd b/logic/file_picker.gd index 9715d0d..9715d0d 100644 --- a/file_picker.gd +++ b/logic/file_picker.gd diff --git a/menu/menu.gd b/logic/menu.gd index d6e1501..d6e1501 100644 --- a/menu/menu.gd +++ b/logic/menu.gd @@ -1,19 +1,19 @@ [gd_scene load_steps=15 format=2] [ext_resource path="res://main.gd" type="Script" id=1] -[ext_resource path="res://date_picker/date_picker.tscn" type="PackedScene" id=2] +[ext_resource path="res://ui/date_picker/date_picker.tscn" type="PackedScene" id=2] [ext_resource path="res://themes/dark.tres" type="Theme" id=3] -[ext_resource path="res://menu/menu.gd" type="Script" id=4] +[ext_resource path="res://logic/menu.gd" type="Script" id=4] [ext_resource path="res://logic/database.gd" type="Script" id=5] [ext_resource path="res://fonts/font_icons.tres" type="DynamicFont" id=6] -[ext_resource path="res://option_set/option_set.tscn" type="PackedScene" id=7] -[ext_resource path="res://option_set/option_set_list.gd" type="Script" id=8] +[ext_resource path="res://ui/option_set/option_set.tscn" type="PackedScene" id=7] +[ext_resource path="res://ui/option_set/option_set_list.gd" type="Script" id=8] [ext_resource path="res://logic/stage.gd" type="Script" id=9] -[ext_resource path="res://logic/popup.gd" type="Script" id=10] -[ext_resource path="res://touch_item_list/touch_item_list.tscn" type="PackedScene" id=11] -[ext_resource path="res://touch_vertical_container/touch_vertical_container.tscn" type="PackedScene" id=12] -[ext_resource path="res://dialog/dialog.gd" type="Script" id=14] -[ext_resource path="res://file_picker.gd" type="Script" id=15] +[ext_resource path="res://ui/modal_popup/modal_popup.tscn" type="PackedScene" id=10] +[ext_resource path="res://ui/touch_item_list/touch_item_list.tscn" type="PackedScene" id=11] +[ext_resource path="res://ui/touch_vertical_container/touch_vertical_container.tscn" type="PackedScene" id=12] +[ext_resource path="res://ui/dialog/dialog.gd" type="Script" id=14] +[ext_resource path="res://logic/file_picker.gd" type="Script" id=15] [node name="main" type="Control"] anchor_right = 1.0 @@ -258,41 +258,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="popup" type="ColorRect" parent="."] -visible = false -anchor_right = 1.0 -anchor_bottom = 1.0 -color = Color( 0, 0, 0, 0.870588 ) -script = ExtResource( 10 ) - -[node name="background" type="Panel" parent="popup"] -anchor_left = 0.05 -anchor_top = 0.1 -anchor_right = 0.95 -anchor_bottom = 0.975 - -[node name="title" type="Label" parent="popup"] -anchor_left = 0.124 -anchor_top = 0.025 -anchor_right = 0.95 -anchor_bottom = 0.1 -margin_left = 0.0799866 -margin_right = -80.0 -margin_bottom = -20.0 -align = 1 -valign = 1 -autowrap = true - -[node name="dismiss" type="Button" parent="popup"] -anchor_left = 0.05 -anchor_top = 0.025 -anchor_right = 0.124 -anchor_bottom = 0.1 -margin_right = 0.0799866 -margin_bottom = -20.0 -custom_fonts/font = ExtResource( 6 ) -text = "" -flat = true +[node name="popup" parent="." instance=ExtResource( 10 )] [node name="option_set_list" type="Control" parent="."] visible = false diff --git a/menu/font_b612.txt b/menu/font_b612.txt deleted file mode 100644 index 2826948..0000000 --- a/menu/font_b612.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2012 The B612 Project Authors (https://github.com/polarsys/b612)
-
-This Font Software is licensed under the SIL Open Font License, Version 1.1.
-This license is copied below, and is also available with a FAQ at:
-http://scripts.sil.org/OFL
-
-
------------------------------------------------------------
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
------------------------------------------------------------
-
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
-
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
-
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
-
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
-
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/menu/godot.txt b/menu/godot.txt deleted file mode 100644 index bee83fb..0000000 --- a/menu/godot.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. -Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/old_native_project/AndroidManifest.xml b/old_native_project/AndroidManifest.xml deleted file mode 100755 index fd4ec79..0000000 --- a/old_native_project/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="net.redroid.medlog"
- android:versionCode="1"
- android:versionName="1.8" >
-
- <uses-sdk
- android:minSdkVersion="14"
- android:targetSdkVersion="16" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> - <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
- <application
- android:allowBackup="true"
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name" - android:theme="@android:style/Theme.Holo.Light.NoActionBar"> - <!-- android:theme="@android:style/Theme.Holo.NoActionBar"> -->
- <!-- android:theme="@style/AppTheme" > --> -
- <activity
- android:name="com.example.surgerylog.MainActivity"
- android:label="@string/app_name" android:screenOrientation="portrait">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-
-</manifest>
diff --git a/old_native_project/gen/net/redroid/medlog/BuildConfig.java b/old_native_project/gen/net/redroid/medlog/BuildConfig.java deleted file mode 100755 index c27f499..0000000 --- a/old_native_project/gen/net/redroid/medlog/BuildConfig.java +++ /dev/null @@ -1,6 +0,0 @@ -/** Automatically generated file. DO NOT MODIFY */ -package net.redroid.medlog; - -public final class BuildConfig { - public final static boolean DEBUG = true; -}
\ No newline at end of file diff --git a/old_native_project/gen/net/redroid/medlog/R.java b/old_native_project/gen/net/redroid/medlog/R.java deleted file mode 100755 index 59722b1..0000000 --- a/old_native_project/gen/net/redroid/medlog/R.java +++ /dev/null @@ -1,145 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found. It
- * should not be modified by hand.
- */
-
-package net.redroid.medlog;
-
-public final class R {
- public static final class attr {
- }
- public static final class dimen {
- /** Default screen margins, per the Android Design guidelines.
-
- Customize dimensions originally defined in res/values/dimens.xml (such as
- screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-
- */
- public static final int activity_horizontal_margin=0x7f040000;
- public static final int activity_vertical_margin=0x7f040001;
- }
- public static final class drawable {
- public static final int ic_launcher=0x7f020000;
- }
- public static final class id {
- public static final int FileOperationsView=0x7f080002;
- public static final int NewEntryView=0x7f080006;
- public static final int OverrideNewEntry=0x7f080022;
- public static final int RelativeLayout1=0x7f08001f;
- public static final int action_settings=0x7f08002b;
- public static final int anesthesiaOverride=0x7f08000d;
- public static final int anesthesiaSpinner=0x7f08000c;
- public static final int dataBaseListView=0x7f080021;
- public static final int datePicker=0x7f080008;
- public static final int exportDataBase=0x7f080004;
- public static final int fillOverrideButton=0x7f08001d;
- public static final int firstAiderOverride=0x7f08000f;
- public static final int firstAiderSpinner=0x7f08000e;
- public static final int importButton=0x7f080003;
- public static final int interventionOverride=0x7f080019;
- public static final int interventionSpinner=0x7f080018;
- public static final int medSubSubTypeOverride=0x7f080015;
- public static final int medSubSubTypeSpinner=0x7f080014;
- public static final int medSubTypeOverride=0x7f080013;
- public static final int medSubTypeSpinner=0x7f080012;
- public static final int medTypeOverride=0x7f080011;
- public static final int medTypeSpinner=0x7f080010;
- public static final int nProcess=0x7f080007;
- public static final int nSurgery=0x7f080009;
- public static final int notesText=0x7f08001b;
- public static final int overrideAnesthesia=0x7f08002a;
- public static final int overrideCheckBox=0x7f08001c;
- public static final int overrideFirstAider=0x7f080028;
- public static final int overrideIntervention=0x7f080027;
- public static final int overridePatholoty=0x7f080026;
- public static final int overridePlace=0x7f080029;
- public static final int overrideSubSubType=0x7f080025;
- public static final int overrideSubType=0x7f080024;
- public static final int overrideType=0x7f080023;
- public static final int pager=0x7f080000;
- public static final int pager_title_strip=0x7f080001;
- public static final int pathologyOverride=0x7f080017;
- public static final int pathologySpinner=0x7f080016;
- public static final int placeOverride=0x7f08000b;
- public static final int placeSpinner=0x7f08000a;
- public static final int refreshBtn=0x7f080020;
- public static final int saveButton=0x7f08001e;
- public static final int section_label=0x7f080005;
- public static final int urgencyCheckBox=0x7f08001a;
- }
- public static final class layout {
- public static final int activity_main=0x7f030000;
- public static final int fragment_file_operations=0x7f030001;
- public static final int fragment_main_dummy=0x7f030002;
- public static final int fragment_new_entry=0x7f030003;
- public static final int fragment_view_data=0x7f030004;
- public static final int multiline_spinner_dropdown_item=0x7f030005;
- public static final int override_new_entry=0x7f030006;
- }
- public static final class menu {
- public static final int main=0x7f070000;
- }
- public static final class string {
- public static final int action_settings=0x7f050001;
- public static final int anesthesia_str=0x7f05001c;
- public static final int app_name=0x7f050000;
- public static final int delete_str=0x7f05000c;
- public static final int errorMissingProcessNumber_str=0x7f050010;
- public static final int exportDataBase_str=0x7f050009;
- public static final int exportMessageError_str=0x7f05000f;
- public static final int exportMessage_str=0x7f05000e;
- public static final int filloverride_str=0x7f050015;
- public static final int firstaider_str=0x7f05001b;
- public static final int importConfigs_str=0x7f050008;
- public static final int intervention_str=0x7f05001a;
- public static final int nProcess_str=0x7f050005;
- public static final int nSurgery_str=0x7f050006;
- public static final int no_str=0x7f050013;
- public static final int notes_str=0x7f05001e;
- public static final int ok_str=0x7f05000b;
- public static final int override_str=0x7f050014;
- public static final int pathology_str=0x7f050019;
- public static final int place_str=0x7f05001d;
- public static final int refresh_str=0x7f05000d;
- public static final int save_str=0x7f05000a;
- public static final int subsubtype_str=0x7f050018;
- public static final int subtype_str=0x7f050017;
- public static final int successSavingEntry_str=0x7f050011;
- public static final int title_section1=0x7f050002;
- public static final int title_section2=0x7f050003;
- public static final int title_section3=0x7f050004;
- public static final int type_str=0x7f050016;
- public static final int urgency_str=0x7f050007;
- public static final int yes_str=0x7f050012;
- }
- public static final class style {
- /**
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-
-
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
-
-
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
-
- API 11 theme customizations can go here.
-
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
-
- API 14 theme customizations can go here.
- */
- public static final int AppBaseTheme=0x7f060000;
- /** Application theme.
- All customizations that are NOT specific to a particular API-level can go here.
- */
- public static final int AppTheme=0x7f060001;
- }
-}
diff --git a/old_native_project/ic_launcher-web.png b/old_native_project/ic_launcher-web.png Binary files differdeleted file mode 100755 index e4d20ec..0000000 --- a/old_native_project/ic_launcher-web.png +++ /dev/null diff --git a/old_native_project/ic_launcher-web.png.import b/old_native_project/ic_launcher-web.png.import deleted file mode 100644 index f462da2..0000000 --- a/old_native_project/ic_launcher-web.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher-web.png-244ffa8897e9eebe71336a23a9033c01.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/ic_launcher-web.png" -dest_files=[ "res://.import/ic_launcher-web.png-244ffa8897e9eebe71336a23a9033c01.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/libs/android-support-v4.jar b/old_native_project/libs/android-support-v4.jar Binary files differdeleted file mode 100755 index 96644ed..0000000 --- a/old_native_project/libs/android-support-v4.jar +++ /dev/null diff --git a/old_native_project/libs/javacsv.jar b/old_native_project/libs/javacsv.jar Binary files differdeleted file mode 100755 index ceb59eb..0000000 --- a/old_native_project/libs/javacsv.jar +++ /dev/null diff --git a/old_native_project/lint.xml b/old_native_project/lint.xml deleted file mode 100755 index ee0eead..0000000 --- a/old_native_project/lint.xml +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<lint> -</lint>
\ No newline at end of file diff --git a/old_native_project/proguard-project.txt b/old_native_project/proguard-project.txt deleted file mode 100755 index f2fe155..0000000 --- a/old_native_project/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/old_native_project/project.properties b/old_native_project/project.properties deleted file mode 100755 index 4ab1256..0000000 --- a/old_native_project/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 diff --git a/old_native_project/res/drawable-hdpi/ic_launcher.png b/old_native_project/res/drawable-hdpi/ic_launcher.png Binary files differdeleted file mode 100755 index 9ef6cfb..0000000 --- a/old_native_project/res/drawable-hdpi/ic_launcher.png +++ /dev/null diff --git a/old_native_project/res/drawable-hdpi/ic_launcher.png.import b/old_native_project/res/drawable-hdpi/ic_launcher.png.import deleted file mode 100644 index fb44ccd..0000000 --- a/old_native_project/res/drawable-hdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-7b75c07f16537d4d1276f02b2da8f046.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-hdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-7b75c07f16537d4d1276f02b2da8f046.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/drawable-mdpi/ic_launcher.png b/old_native_project/res/drawable-mdpi/ic_launcher.png Binary files differdeleted file mode 100755 index 330d0a4..0000000 --- a/old_native_project/res/drawable-mdpi/ic_launcher.png +++ /dev/null diff --git a/old_native_project/res/drawable-mdpi/ic_launcher.png.import b/old_native_project/res/drawable-mdpi/ic_launcher.png.import deleted file mode 100644 index 3e22a92..0000000 --- a/old_native_project/res/drawable-mdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-60911ba4a7bacee1ef18c90549959e99.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-mdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-60911ba4a7bacee1ef18c90549959e99.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/drawable-xhdpi/ic_launcher.png b/old_native_project/res/drawable-xhdpi/ic_launcher.png Binary files differdeleted file mode 100755 index e6341a6..0000000 --- a/old_native_project/res/drawable-xhdpi/ic_launcher.png +++ /dev/null diff --git a/old_native_project/res/drawable-xhdpi/ic_launcher.png.import b/old_native_project/res/drawable-xhdpi/ic_launcher.png.import deleted file mode 100644 index 03ba604..0000000 --- a/old_native_project/res/drawable-xhdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-392be394da50ded53954d6a34405ccd0.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-xhdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-392be394da50ded53954d6a34405ccd0.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/drawable-xxhdpi/ic_launcher.png b/old_native_project/res/drawable-xxhdpi/ic_launcher.png Binary files differdeleted file mode 100755 index 590a40f..0000000 --- a/old_native_project/res/drawable-xxhdpi/ic_launcher.png +++ /dev/null diff --git a/old_native_project/res/drawable-xxhdpi/ic_launcher.png.import b/old_native_project/res/drawable-xxhdpi/ic_launcher.png.import deleted file mode 100644 index 562f414..0000000 --- a/old_native_project/res/drawable-xxhdpi/ic_launcher.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/ic_launcher.png-d4038f1f519c934c855a1e1587c8d21b.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://old_native_project/res/drawable-xxhdpi/ic_launcher.png" -dest_files=[ "res://.import/ic_launcher.png-d4038f1f519c934c855a1e1587c8d21b.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/old_native_project/res/layout/activity_main.xml b/old_native_project/res/layout/activity_main.xml deleted file mode 100755 index 6cfef6f..0000000 --- a/old_native_project/res/layout/activity_main.xml +++ /dev/null @@ -1,23 +0,0 @@ -<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/pager"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".MainActivity" >
-
- <!--
- This title strip will display the currently visible page title, as well as the page - titles for adjacent pages.
- -->
-
- <android.support.v4.view.PagerTitleStrip
- android:id="@+id/pager_title_strip"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top"
- android:background="#33b5e5"
- android:paddingBottom="4dp"
- android:paddingTop="4dp"
- android:textColor="#fff" />
-
-</android.support.v4.view.ViewPager>
diff --git a/old_native_project/res/layout/fragment_file_operations.xml b/old_native_project/res/layout/fragment_file_operations.xml deleted file mode 100755 index 2703afb..0000000 --- a/old_native_project/res/layout/fragment_file_operations.xml +++ /dev/null @@ -1,31 +0,0 @@ -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/FileOperationsView"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:paddingTop="@dimen/activity_vertical_margin"
- tools:context=".MainActivity$FileOperationsContext" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/importButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/importConfigs_str" />
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="25dp" />
-
- <Button
- android:id="@+id/exportDataBase"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/exportDataBase_str" />
- </LinearLayout>
-
-</ScrollView>
\ No newline at end of file diff --git a/old_native_project/res/layout/fragment_main_dummy.xml b/old_native_project/res/layout/fragment_main_dummy.xml deleted file mode 100755 index 57dc8ce..0000000 --- a/old_native_project/res/layout/fragment_main_dummy.xml +++ /dev/null @@ -1,16 +0,0 @@ -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingBottom="@dimen/activity_vertical_margin"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_vertical_margin"
- tools:context=".MainActivity$DummySectionFragment" >
-
- <TextView
- android:id="@+id/section_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
-</RelativeLayout>
diff --git a/old_native_project/res/layout/fragment_new_entry.xml b/old_native_project/res/layout/fragment_new_entry.xml deleted file mode 100755 index 350fd2a..0000000 --- a/old_native_project/res/layout/fragment_new_entry.xml +++ /dev/null @@ -1,216 +0,0 @@ -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/NewEntryView"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:paddingTop="@dimen/activity_vertical_margin"
- tools:context=".MainActivity$NewEntryContext" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <EditText
- android:id="@+id/nProcess"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/nProcess_str"
- android:inputType="number" >
-
- <requestFocus />
- </EditText>
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="5dp" />
-
- <DatePicker
- android:id="@+id/datePicker"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:calendarViewShown="false" />
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="5dp" />
-
- <EditText
- android:id="@+id/nSurgery"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/nSurgery_str"
- android:inputType="number" />
-
- <Spinner
- android:id="@+id/placeSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/place_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/placeOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/place_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/anesthesiaSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/anesthesia_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/anesthesiaOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/anesthesia_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/firstAiderSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/firstaider_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/firstAiderOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/firstaider_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/medTypeSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/type_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/medTypeOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/type_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/medSubTypeSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/subtype_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/medSubTypeOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/subtype_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/medSubSubTypeSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/subsubtype_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/medSubSubTypeOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/subsubtype_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/pathologySpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/pathology_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/pathologyOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/pathology_str"
- android:inputType="textMultiLine" />
-
- <Spinner
- android:id="@+id/interventionSpinner"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:prompt="@string/intervention_str"
- android:spinnerMode="dialog" />
-
- <EditText
- android:id="@+id/interventionOverride"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/intervention_str"
- android:inputType="textMultiLine" />
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="5dp" />
-
- <CheckBox
- android:id="@+id/urgencyCheckBox"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/urgency_str" />
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="5dp" />
-
- <EditText
- android:id="@+id/notesText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/notes_str"
- android:inputType="textMultiLine" />
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="25dp" />
-
- <CheckBox
- android:id="@+id/overrideCheckBox"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/override_str" />
-
- <Button
- android:id="@+id/fillOverrideButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/filloverride_str" />
-
- <Space
- android:layout_width="match_parent"
- android:layout_height="25dp" />
-
- <Button
- android:id="@+id/saveButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/save_str" />
- </LinearLayout>
-
-</ScrollView>
\ No newline at end of file diff --git a/old_native_project/res/layout/fragment_view_data.xml b/old_native_project/res/layout/fragment_view_data.xml deleted file mode 100755 index db246f1..0000000 --- a/old_native_project/res/layout/fragment_view_data.xml +++ /dev/null @@ -1,24 +0,0 @@ -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/RelativeLayout1"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:gravity="bottom"
- android:orientation="vertical">
-
- <Button
- android:id="@+id/refreshBtn"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:text="@string/refresh_str" />
-
- <ListView
- android:id="@+id/dataBaseListView"
- android:layout_width="match_parent"
- android:layout_height="fill_parent"
- android:layout_above="@+id/refreshBtn" >
-
- </ListView>
-
-</RelativeLayout>
\ No newline at end of file diff --git a/old_native_project/res/layout/multiline_spinner_dropdown_item.xml b/old_native_project/res/layout/multiline_spinner_dropdown_item.xml deleted file mode 100755 index ff05fc2..0000000 --- a/old_native_project/res/layout/multiline_spinner_dropdown_item.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml -** -** Copyright 2008, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> -<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@android:id/text1" - style="?android:attr/spinnerDropDownItemStyle" - android:singleLine="false" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="45dp" - android:ellipsize="marquee" - android:textAlignment="inherit"/> diff --git a/old_native_project/res/layout/override_new_entry.xml b/old_native_project/res/layout/override_new_entry.xml deleted file mode 100755 index 320feb6..0000000 --- a/old_native_project/res/layout/override_new_entry.xml +++ /dev/null @@ -1,95 +0,0 @@ -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/OverrideNewEntry"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <EditText
- android:id="@+id/overrideType"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/type_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overrideSubType"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/subtype_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overrideSubSubType"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/subsubtype_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overridePatholoty"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/pathology_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overrideIntervention"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/intervention_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overrideFirstAider"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/firstaider_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overridePlace"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/place_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
- <EditText
- android:id="@+id/overrideAnesthesia"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10"
- android:hint="@string/anesthesia_str"
- android:inputType="text" >
-
- <requestFocus />
- </EditText>
-
-</LinearLayout>
\ No newline at end of file diff --git a/old_native_project/res/menu/main.xml b/old_native_project/res/menu/main.xml deleted file mode 100755 index d122a4b..0000000 --- a/old_native_project/res/menu/main.xml +++ /dev/null @@ -1,9 +0,0 @@ -<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/action_settings"
- android:orderInCategory="100"
- android:showAsAction="never"
- android:title="@string/action_settings"/>
-
-</menu>
diff --git a/old_native_project/res/values-sw600dp/dimens.xml b/old_native_project/res/values-sw600dp/dimens.xml deleted file mode 100755 index c876987..0000000 --- a/old_native_project/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,8 +0,0 @@ -<resources>
-
- <!--
- Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw600dp devices (e.g. 7" tablets) here.
- -->
-
-</resources>
diff --git a/old_native_project/res/values-sw720dp-land/dimens.xml b/old_native_project/res/values-sw720dp-land/dimens.xml deleted file mode 100755 index 0df3067..0000000 --- a/old_native_project/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,9 +0,0 @@ -<resources>
-
- <!--
- Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
- -->
- <dimen name="activity_horizontal_margin">128dp</dimen>
-
-</resources>
diff --git a/old_native_project/res/values-v11/styles.xml b/old_native_project/res/values-v11/styles.xml deleted file mode 100755 index e3ef53d..0000000 --- a/old_native_project/res/values-v11/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ -<resources>
-
- <!--
- Base application theme for API 11+. This theme completely replaces - AppBaseTheme from res/values/styles.xml on API 11+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
- <!-- API 11 theme customizations can go here. -->
- </style>
-
-</resources>
diff --git a/old_native_project/res/values-v14/styles.xml b/old_native_project/res/values-v14/styles.xml deleted file mode 100755 index 94dd245..0000000 --- a/old_native_project/res/values-v14/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ -<resources>
-
- <!--
- Base application theme for API 14+. This theme completely replaces - AppBaseTheme from BOTH res/values/styles.xml and - res/values-v11/styles.xml on API 14+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
- <!-- API 14 theme customizations can go here. -->
- </style>
-
-</resources>
diff --git a/old_native_project/res/values/dimens.xml b/old_native_project/res/values/dimens.xml deleted file mode 100755 index 2e0e2ae..0000000 --- a/old_native_project/res/values/dimens.xml +++ /dev/null @@ -1,7 +0,0 @@ -<resources>
-
- <!-- Default screen margins, per the Android Design guidelines. -->
- <dimen name="activity_horizontal_margin">16dp</dimen>
- <dimen name="activity_vertical_margin">16dp</dimen>
-
-</resources>
diff --git a/old_native_project/res/values/strings.xml b/old_native_project/res/values/strings.xml deleted file mode 100755 index f17b4ad..0000000 --- a/old_native_project/res/values/strings.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - - <string name="app_name">MedLog</string> - <string name="action_settings">Settings</string> - <string name="title_section1">Nova Entrada</string> - <string name="title_section2">Histórico</string> - <string name="title_section3">Configurações</string> - <string name="nProcess_str">Nº Processo</string> - <string name="nSurgery_str">Nº Cirurgia</string> - <string name="urgency_str">Urgência</string> - <string name="importConfigs_str">Importar Configurações</string> - <string name="exportDataBase_str">Exportar Dados</string> - <string name="save_str">Guardar</string> - <string name="ok_str">Ok</string> - <string name="delete_str">APAGAR</string> - <string name="refresh_str">Actualizar</string> - <string name="exportMessage_str">Dados exportados para: </string> - <string name="exportMessageError_str">Falha ao exportar dados!</string> - <string name="errorMissingProcessNumber_str">Falta inserir o número do processo!</string> - <string name="successSavingEntry_str">Nova entrada guardada com sucesso!</string> - - <string name="yes_str">sim</string> - <string name="no_str">não</string> - <string name="override_str">Costumizar</string> - <string name="filloverride_str">Usar valores anteriores</string> - - <string name="type_str">Tipo</string> - <string name="subtype_str">Subtipo</string> - <string name="subsubtype_str">Sub-Subtipo</string> - <string name="pathology_str">Patologia</string> - <string name="intervention_str">Intervenção</string> - <string name="firstaider_str">1º Ajudante</string> - <string name="anesthesia_str">Anestesia</string> - <string name="place_str">Local</string> - <string name="notes_str">Notas</string> - -</resources> diff --git a/old_native_project/res/values/styles.xml b/old_native_project/res/values/styles.xml deleted file mode 100755 index 4ea9326..0000000 --- a/old_native_project/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ -<resources>
-
- <!--
- Base application theme, dependent on API level. This theme is replaced - by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Light">
- <!--
- Theme customizations available in newer API levels can go in - res/values-vXX/styles.xml, while customizations related to - backward-compatibility can go here.
- -->
- </style>
-
- <!-- Application theme. -->
- <style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
- </style>
-
-</resources>
diff --git a/old_native_project/src/com/example/surgerylog/FileOperationsFragment.java b/old_native_project/src/com/example/surgerylog/FileOperationsFragment.java deleted file mode 100755 index 512f02b..0000000 --- a/old_native_project/src/com/example/surgerylog/FileOperationsFragment.java +++ /dev/null @@ -1,185 +0,0 @@ -package com.example.surgerylog;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Calendar;
-import java.util.List;
-import net.redroid.medlog.R;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.Button;
-
-import com.csvreader.CsvReader;
-import com.csvreader.CsvWriter;
-
-public class FileOperationsFragment extends Fragment {
- /**
- * The fragment argument representing the section number for this fragment.
- */
- public static final String ARG_SECTION_NUMBER = "section_number";
-
- MainActivity _activity;
-
- public FileOperationsFragment() {
- }
-
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
-
- // This makes sure that the container activity has implemented
- // the callback interface. If not, it throws an exception
- try {
- _activity = (MainActivity) activity;
- } catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
- + " must implement OnHeadlineSelectedListener");
- }
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // get root view
- View rootView = inflater.inflate(R.layout.fragment_file_operations,
- container, false);
-
- return rootView;
- }
-
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- // set import MedLog config button
- Button importFile = (Button) getView().findViewById(R.id.importButton);
- importFile.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- try {
- // create csv values
- CsvReader reader = new CsvReader(
- _activity.TemplateDescriptionFile);
-
- // read headers
- if (reader.readHeaders() == false) {
- // could not read headers
- //Log.e("Error", "Headers could not be read.");
- }
-
- // copy back headers
- String headers[] = reader.getHeaders();
-
- // check number of headers
- if (headers.length != _activity.ProcessDescriptionFileNumColumns) {
- // number of headers is incorrect
- //Log.e("Error", "CSV has incorrect number of headers.");
- } else {
- // everything seems nice.... lets rebuild the tree
- _activity.Root = new MedLogRoot();
- }
-
- // read records
- while (reader.readRecord() == true) {
- // get record info into
- MedLogInfo surgeryInfo = new MedLogInfo(reader
- .get(headers[0]), // med type
- reader.get(headers[1]), // med subtype
- reader.get(headers[2]), // med sub-subtype
- reader.get(headers[3]), // pathology
- reader.get(headers[4]) // intervention
- );
-
- surgeryInfo.FirstAider = reader.get(headers[5]); // first
- // aider
- surgeryInfo.Anesthesia = reader.get(headers[6]); // anesthesia
- surgeryInfo.Place = reader.get(headers[7]); // place
-
- // add info to grow tree
- _activity.Root.GrowTreeWithInfo(surgeryInfo);
- }
-
- // close csv reading file
- reader.close();
- } catch (FileNotFoundException e) {
- //Log.e("Error", "Config file not found.");
- } catch (IOException e) {
- //Log.e("Error", "Config file IO error.");
- }
-
- _activity.SaveMedLogConfig();
- }
- });
-
- // set export data base button
- Button exportDbBtn = (Button) getView().findViewById(
- R.id.exportDataBase);
- exportDbBtn.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
-
- //Log.e("Trace Export", "Exporting data");
-
- CsvWriter writer = null;
- boolean success = false;
- try {
-
- //Log.e("Trace Export", "Trying to open file");
-
- writer = new CsvWriter(_activity.ExportFile);
-
- //Log.e("Trace Export", "Writing headers");
-
- // Write descriptive headers.
- String[] headers = { "process number", "surgery number",
- "date", "type", "subtype", "subsubtype",
- "pathology", "intervention", "first aider",
- "anesthesia", "place", "urgency", "notes" };
- writer.writeRecord(headers);
-
- //Log.e("Trace Export", "Writing records...");
-
- // write all the records to CSV
- String[] record = new String[headers.length];
- for (MedLogInfo log : _activity.DataBase) {
- record[0] = log.ProcessNumber.toString();
- record[1] = log.SurgeryNumber.toString();
- record[2] = log.GetFormatedDate();
- record[3] = log.Type;
- record[4] = log.SubType;
- record[5] = log.SubSubType;
- record[6] = log.Pathology;
- record[7] = log.Intervention;
- record[8] = log.FirstAider;
- record[9] = log.Anesthesia;
- record[10] = log.Place;
- record[11] = _activity.getString(log.Urgency == true ? R.string.yes_str : R.string.no_str);
- record[12] = log.Notes;
- writer.writeRecord(record);
- }
-
- String message = _activity.getString(R.string.exportMessage_str)
- + "'"
- + _activity.ExportFile + "'";
- _activity.ShowMessage(message);
-
- //Log.e("Trace Export", "Done");
-
- success = true;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } finally {
- writer.close();
- if (success == false) {
- _activity.ShowMessage(R.string.exportMessageError_str);
- }
- }
- }
- });
-
- super.onActivityCreated(savedInstanceState);
- }
-}
diff --git a/old_native_project/src/com/example/surgerylog/ISpinnerRefresh.java b/old_native_project/src/com/example/surgerylog/ISpinnerRefresh.java deleted file mode 100755 index a8baf36..0000000 --- a/old_native_project/src/com/example/surgerylog/ISpinnerRefresh.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.surgerylog;
-
-import java.util.List;
-
-public interface ISpinnerRefresh {
-
- void SetSpinnerData(int spinnerId, List<String> spinnerData);
-
-}
diff --git a/old_native_project/src/com/example/surgerylog/MainActivity.java b/old_native_project/src/com/example/surgerylog/MainActivity.java deleted file mode 100755 index 47910cc..0000000 --- a/old_native_project/src/com/example/surgerylog/MainActivity.java +++ /dev/null @@ -1,330 +0,0 @@ -package com.example.surgerylog;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.StreamCorruptedException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Locale;
-import java.util.Map;
-import net.redroid.medlog.R;
-
-import com.csvreader.CsvReader;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.Environment;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentPagerAdapter;
-import android.support.v4.app.FragmentStatePagerAdapter;
-import android.support.v4.app.NavUtils;
-import android.support.v4.view.ViewPager;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemSelectedListener;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.Spinner;
-import android.widget.SpinnerAdapter;
-import android.widget.TextView;
-import android.widget.Toast;
-
-public class MainActivity extends FragmentActivity
-{
- /**
- * The {@link android.support.v4.view.PagerAdapter} that will provide
- * fragments for each of the sections. We use a
- * {@link android.support.v4.app.FragmentPagerAdapter} derivative, which
- * will keep every loaded fragment in memory. If this becomes too memory
- * intensive, it may be best to switch to a
- * {@link android.support.v4.app.FragmentStatePagerAdapter}.
- */
- SectionsPagerAdapter mSectionsPagerAdapter;
-
- /**
- * The {@link ViewPager} that will host the section contents.
- */
- ViewPager mViewPager;
-
- // MedTree root
- public MedLogRoot Root;
- public List<MedLogInfo> DataBase;
- public MedLogInfo CurrentInfo = new MedLogInfo();
-
- // MedTree description file
- public int ProcessDescriptionFileNumColumns = 8;
- public String AppFolder = Environment.getExternalStorageDirectory() + "//MedLog";
- public String TemplateDescriptionFile = Environment.getExternalStorageDirectory() + "//MedLog//template.csv";
- public String ExportFile = Environment.getExternalStorageDirectory() + "//MedLog//export.csv";
- public String MedLogConfigFile = Environment.getExternalStorageDirectory() + "//MedLog//config.bin";
- public String MedLogDataBaseFile = Environment.getExternalStorageDirectory() + "//MedLog//database.bin";
- private int MessageTime = 1;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
-
- //Log.e("Trace", "MainActiviyy START");
-
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
-
- // Create root
- Root = new MedLogRoot();
-
- // Create the adapter that will return a fragment for each of the three
- // primary sections of the app.
- mSectionsPagerAdapter = new SectionsPagerAdapter(
- getSupportFragmentManager());
-
- // Set up the ViewPager with the sections adapter.
- mViewPager = (ViewPager) findViewById(R.id.pager);
- mViewPager.setAdapter(mSectionsPagerAdapter);
-
- CheckAppFolder();
- LoadMedLogConfig();
- LoadMedLogDB();
-
- //Log.e("Trace", "MainActiviyy OUT");
- }
-
-// @Override
-// public boolean onCreateOptionsMenu(Menu menu) {
-// // Inflate the menu; this adds items to the action bar if it is present.
-// getMenuInflater().inflate(R.menu.main, menu);
-// return true;
-// }
-
- private void CheckAppFolder()
- {
- File appFolder = new File(AppFolder);
- if(appFolder.exists() == false)
- {
- appFolder.mkdir();
- }
- }
-
- public void LoadMedLogConfig()
- {
- try {
- //Log.e("Trace Cfg", "input file");
- FileInputStream fis = new FileInputStream(MedLogConfigFile);
- //FileInputStream fis = getApplicationContext().openFileInput(MedLogConfigFile);
- //FileInputStream fis = getApplicationContext().openFileInput("MedLogConfig.bin");
- //Log.e("Trace Cfg", "input stream");
- ObjectInputStream is = new ObjectInputStream(fis);
- //Log.e("Trace Cfg", "read object");
- Root = (MedLogRoot) is.readObject();
- //Log.e("Trace Cfg", "close file");
- is.close();
- //Log.e("Trace Cfg", "done loading");
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();
- //Log.e("TrTrace Cfgace", "File not found during load.");
- } catch (StreamCorruptedException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();
- //Log.e("Trace Cfg", "Stream corrupted during load.");
- } catch (IOException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();
- //Log.e("Trace Cfg", "IO Exception during load.");
- } catch (ClassNotFoundException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();
- //Log.e("Trace Cfg", "Class not found during load.");
- }
- }
-
- public void SaveMedLogConfig()
- {
- try {
- //Log.e("Trace Cfg", "get context");
- Context c = getApplicationContext();
- //Log.e("Trace Cfg", "open output file");
- //FileOutputStream fos = getApplicationContext().openFileOutput(MedLogConfigFile, Context.MODE_PRIVATE);
- FileOutputStream fos = new FileOutputStream(MedLogConfigFile);
- //Log.e("Trace Cfg", "new output stream");
- ObjectOutputStream os = new ObjectOutputStream(fos);
- //Log.e("Trace Cfg", "write");
- os.writeObject(Root);
- //Log.e("Trace Cfg", "close");
- os.close();
- //Log.e("Trace Cfg", "done");
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- //Log.e("Trace Cfg", "File not found during save.");
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- //Log.e("Trace Cfg", "IO Exception during save.");
- }
- }
-
- public void LoadMedLogDB()
- {
- try {
- //Log.e("Trace DB", "input file");
- FileInputStream fis = new FileInputStream(MedLogDataBaseFile);
- //Log.e("Trace DB", "input stream");
- ObjectInputStream is = new ObjectInputStream(fis);
- //Log.e("Trace DB", "read object");
- DataBase = (List<MedLogInfo>) is.readObject();
- //Log.e("Trace DB", "close file");
- is.close();
- //Log.e("Trace DB", "done loading");
- } catch (FileNotFoundException e) {
- //Log.e("Trace DB", "File not found during load.");
- } catch (StreamCorruptedException e) {
- //Log.e("Trace DB", "Stream corrupted during load.");
- } catch (IOException e) {
- //Log.e("Trace DB", "IO Exception during data base load.");
- } catch (ClassNotFoundException e) {
- //Log.e("Trace DB", "Class 'List<MedLogInfo>' not found during load.");
- }
- finally
- {
- if(DataBase == null)
- {
- // create empty data base
- DataBase = new ArrayList<MedLogInfo>();
- }
- }
- }
-
- public void SaveMedLogDB()
- {
- try {
- //Log.e("Trace DB", "get context");
- Context c = getApplicationContext();
- //Log.e("Trace DB", "open output file");
- FileOutputStream fos = new FileOutputStream(MedLogDataBaseFile);
- //Log.e("Trace DB", "new output stream");
- ObjectOutputStream os = new ObjectOutputStream(fos);
- //Log.e("Trace DB", "write");
- os.writeObject(DataBase);
- //Log.e("Trace DB", "close");
- os.close();
- //Log.e("Trace DB", "done");
- } catch (FileNotFoundException e) {
- //Log.e("Trace DB", "File not found during save.");
- } catch (IOException e) {
- //Log.e("Trace DB", "IO Exception during save.");
- }
- }
-
- public void AddNewEntry()
- {
- DataBase.add(CurrentInfo);
- SaveMedLogDB();
- Root.GrowTreeWithInfo(CurrentInfo);
- SaveMedLogConfig();
- CurrentInfo = new MedLogInfo();
- }
-
- public void ShowMessage(int messageId)
- {
- for (int i=0; i < MessageTime; i++)
- {
- Toast.makeText(this, messageId, Toast.LENGTH_LONG).show();
- }
- }
-
- public void ShowMessage(String message)
- {
- for (int i=0; i < MessageTime; i++)
- {
- Toast.makeText(this, message, Toast.LENGTH_LONG).show();
- }
- }
-
- /**
- * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
- * one of the sections/tabs/pages.
- */
- public class SectionsPagerAdapter extends FragmentStatePagerAdapter //FragmentPagerAdapter
- {
-
- public SectionsPagerAdapter(FragmentManager fm) {
- super(fm);
- }
-
- @Override
- public Fragment getItem(int position)
- {
- //Log.e("Trace", "new frag IN");
-
- // getItem is called to instantiate the fragment for the given page.
- // Return a DummySectionFragment (defined as a static inner class
- // below) with the page number as its lone argument.
- Fragment fragment;
- if(position == 0)
- {
- fragment = new NewEntryFragment();
- }
- else if(position == 1)
- {
- fragment = new ViewDataFragment();
- }
- else
- {
- fragment = new FileOperationsFragment();
- }
-
- Bundle args = new Bundle();
- args.putInt(NewEntryFragment.ARG_SECTION_NUMBER, position + 1);
- fragment.setArguments(args);
-
- // retain instances
- //Log.e("Trace", "new frag");
-
- return fragment;
- }
-
- @Override
- public int getCount() {
- // Show 3 total pages.
- return 3;
- }
-
- @Override
- public CharSequence getPageTitle(int position)
- {
- Locale l = Locale.getDefault();
- switch (position) {
- case 0:
- return getString(R.string.title_section1).toUpperCase(l);
- case 1:
- return getString(R.string.title_section2).toUpperCase(l);
- case 2:
- return getString(R.string.title_section3).toUpperCase(l);
- }
- return null;
- }
- }
-
-
-}
diff --git a/old_native_project/src/com/example/surgerylog/MedLogInfo.java b/old_native_project/src/com/example/surgerylog/MedLogInfo.java deleted file mode 100755 index c59bd29..0000000 --- a/old_native_project/src/com/example/surgerylog/MedLogInfo.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.example.surgerylog;
-
-import java.io.Serializable;
-import java.util.Calendar;
-
-public class MedLogInfo implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 1109021350324730228L;
-
- private static final int MONTH_STARTS_IN_0 = 1;
-
- public Long ProcessNumber;
- public Long SurgeryNumber;
-
- public String GetFormatedDate()
- {
- return Date.get(Calendar.DAY_OF_MONTH) + "/"
- + (Date.get(Calendar.MONTH) + MONTH_STARTS_IN_0) + "/"
- + Date.get(Calendar.YEAR);
- }
- public Calendar Date = Calendar.getInstance();
-
- public String Type;
- public String SubType;
- public String SubSubType;
- public String Pathology;
- public String Intervention;
-
- public String FirstAider;
- public String Anesthesia;
- public String Place;
- public Boolean Urgency;
- public String Notes;
-
- public MedLogInfo()
- {
- super();
- }
-
- public MedLogInfo(String infoType, String infoSubType, String infoSubSubType, String infoPathology, String infoIntervention) {
- super();
- this.Type = infoType.trim();
- this.SubType = infoSubType.trim();
- this.SubSubType = infoSubSubType.trim();
- this.Pathology = infoPathology.trim();
- this.Intervention = infoIntervention.trim();
- }
-}
diff --git a/old_native_project/src/com/example/surgerylog/MedLogRoot.java b/old_native_project/src/com/example/surgerylog/MedLogRoot.java deleted file mode 100755 index 073701b..0000000 --- a/old_native_project/src/com/example/surgerylog/MedLogRoot.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.example.surgerylog;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.List;
-
-public class MedLogRoot implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 7337501254153966693L;
- private Dictionary<String, MedLogType> _typeDictionary = new Hashtable<String, MedLogType>();
- private List<String> _typeList = new ArrayList<String>();
-
- private List<String> _firsAiderList = new ArrayList<String>();
- private List<String> _anesthesiaList = new ArrayList<String>();
- private List<String> _placeList = new ArrayList<String>();
-
- public MedLogRoot() {
- }
-
- public void GrowTreeWithInfo(MedLogInfo info) {
- // try to add new first aider
- if (HasFirstAider(info.FirstAider) == false) {
- AddFirstAider(info.FirstAider);
- }
-
- // try to add new anesthesia
- if (HasAnesthesia(info.Anesthesia) == false) {
- AddAnesthesia(info.Anesthesia);
- }
-
- // try to add new place
- if (HasPlace(info.Place) == false) {
- AddPlace(info.Place);
- }
-
- // try to add new Type
- if (HasType(info.Type) == false) {
- AddType(info.Type);
- }
-
- // Only add branches if has root...
- if (HasType(info.Type) == true) {
-
- // get Type
- MedLogType type = _typeDictionary.get(info.Type);
-
- // add Type related information
- if (type.HasSubType(info.SubType) == false) {
- type.AddSubType(info.SubType);
- }
-
- // Only add branches if has root...
- if (type.HasSubType(info.SubType) == true) {
-
- // get SubType
- MedLogSubType subType = type.GetMedLogSubType(info.SubType);
-
- // add SubTyppe related information
- if (subType.HasSubSubType(info.SubSubType) == false) {
- subType.AddSubSubType(info.SubSubType);
- }
- if (subType.HasPathology(info.Pathology) == false) {
- subType.AddPathology(info.Pathology);
- }
- if (subType.HasIntervention(info.Intervention) == false) {
- subType.AddIntervention(info.Intervention);
- }
- }
- }
- }
-
- private Boolean IsValid(String verify) {
- return verify.trim().isEmpty() == false;
- }
-
- public Boolean HasFirstAider(String firstAider) {
- return _firsAiderList.contains(firstAider.trim());
- }
-
- public void AddFirstAider(String firstAider) {
- if (IsValid(firstAider))
- _firsAiderList.add(firstAider.trim());
- }
-
- public Boolean HasAnesthesia(String anesthesia) {
- return _anesthesiaList.contains(anesthesia.trim());
- }
-
- public void AddAnesthesia(String anesthesia) {
- if (IsValid(anesthesia))
- _anesthesiaList.add(anesthesia.trim());
- }
-
- public Boolean HasPlace(String place) {
- return _placeList.contains(place.trim());
- }
-
- public void AddPlace(String place) {
- if (IsValid(place))
- _placeList.add(place.trim());
- }
-
- public Boolean HasType(String type) {
- return _typeList.contains(type.trim());
- }
-
- public void AddType(String type) {
- if (IsValid(type)) {
- String typeTrim = type.trim();
-
- _typeList.add(typeTrim);
-
- MedLogType surgeryType = new MedLogType();
- _typeDictionary.put(typeTrim, surgeryType);
- }
- }
-
- public MedLogType GetMedLogType(String type) {
- return _typeDictionary.get(type.trim());
- }
-
- public List<String> GetTypeList() {
- return _typeList;
- }
-
- public List<String> GetFirstAiderList() {
- return _firsAiderList;
- }
-
- public List<String> GetAnesthesiaList() {
- return _anesthesiaList;
- }
-
- public List<String> GetPlaceList() {
- return _placeList;
- }
-}
diff --git a/old_native_project/src/com/example/surgerylog/MedLogSubType.java b/old_native_project/src/com/example/surgerylog/MedLogSubType.java deleted file mode 100755 index 7bac538..0000000 --- a/old_native_project/src/com/example/surgerylog/MedLogSubType.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.example.surgerylog;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class MedLogSubType implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 964773707334886468L;
- public List<String> _subSubTypeList = new ArrayList<String>();
- public List<String> _pathologyList = new ArrayList<String>();
- public List<String> _interventionList = new ArrayList<String>();
-
- public MedLogSubType()
- {
- }
-
- private Boolean IsValid(String verify) {
- return verify.trim().isEmpty() == false;
- }
-
- public Boolean HasSubSubType(String subSubType)
- {
- return _subSubTypeList.contains(subSubType.trim());
- }
-
- public Boolean HasPathology(String pathology)
- {
- return _pathologyList.contains(pathology.trim());
- }
-
- public Boolean HasIntervention(String intervention)
- {
- return _interventionList.contains(intervention.trim());
- }
-
- public void AddSubSubType(String subSubType)
- {
- if(IsValid(subSubType))
- _subSubTypeList.add(subSubType.trim());
- }
-
- public void AddPathology(String pathology)
- {
- if(IsValid(pathology))
- _pathologyList.add(pathology.trim());
- }
-
- public void AddIntervention(String intervention)
- {
- if(IsValid(intervention))
- _interventionList.add(intervention.trim());
- }
-
- public List<String> GetSubSubTypeList()
- {
- return _subSubTypeList;
- }
-
- public List<String> GetPathologyList()
- {
- return _pathologyList;
- }
-
- public List<String> GetInterventionList()
- {
- return _interventionList;
- }
-
- public int GetNumberOfSubSubTypes()
- {
- return _subSubTypeList.size();
- }
-
- public int GetNumberOfPathologies()
- {
- return _pathologyList.size();
- }
-
- public int GetNumberOfInterventions()
- {
- return _interventionList.size();
- }
-}
diff --git a/old_native_project/src/com/example/surgerylog/MedLogType.java b/old_native_project/src/com/example/surgerylog/MedLogType.java deleted file mode 100755 index d4bc485..0000000 --- a/old_native_project/src/com/example/surgerylog/MedLogType.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.example.surgerylog;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.List;
-
-
-public class MedLogType implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 7877803213238007254L;
- private Dictionary<String, MedLogSubType> _subTypeDictionary = new Hashtable<String, MedLogSubType>();
- private List<String> _subTypeList = new ArrayList<String>();
-
- public MedLogType()
- {
- }
-
- private Boolean IsValid(String verify) {
- return verify.trim().isEmpty() == false;
- }
-
- public Boolean HasSubType(String subType)
- {
- return _subTypeList.contains(subType.trim());
- }
-
- public MedLogSubType GetMedLogSubType(String subType)
- {
- return _subTypeDictionary.get(subType.trim());
- }
-
- public void AddSubType(String subType)
- {
- if (IsValid(subType)) {
- String subTypeTrim = subType.trim();
-
- _subTypeList.add(subTypeTrim);
-
- MedLogSubType surgerySubType = new MedLogSubType();
- _subTypeDictionary.put(subTypeTrim, surgerySubType);
- }
- }
-
- public List<String> GetSubTypeList()
- {
- return _subTypeList;
- }
-}
diff --git a/old_native_project/src/com/example/surgerylog/NewEntryFragment.java b/old_native_project/src/com/example/surgerylog/NewEntryFragment.java deleted file mode 100755 index 522d76b..0000000 --- a/old_native_project/src/com/example/surgerylog/NewEntryFragment.java +++ /dev/null @@ -1,437 +0,0 @@ -package com.example.surgerylog;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.SortedSet;
-import net.redroid.medlog.R;
-
-import android.R.color;
-import android.app.Activity;
-import android.content.ClipData;
-import android.content.ClipboardManager;
-import android.content.Context;
-import android.graphics.Color;
-import android.os.Bundle;
-import android.sax.TextElementListener;
-import android.support.v4.app.Fragment;
-import android.text.method.DateTimeKeyListener;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewDebug.FlagToString;
-import android.webkit.WebView.FindListener;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.CheckBox;
-import android.widget.DatePicker;
-import android.widget.EditText;
-import android.widget.Spinner;
-import android.widget.AdapterView.OnItemSelectedListener;
-
-public class NewEntryFragment extends Fragment {
- /**
- * The fragment argument representing the section number for this fragment.
- */
- public static final String ARG_SECTION_NUMBER = "section_number";
-
- private MainActivity _activity;
-
- public NewEntryFragment() {
- }
-
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
-
- // This makes sure that the container activity has implemented
- // the callback interface. If not, it throws an exception
- try {
- _activity = (MainActivity) activity;
- } catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
- + " must implement OnHeadlineSelectedListener");
- }
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // get root view
- View rootView = inflater.inflate(R.layout.fragment_new_entry,
- container, false);
-
- return rootView;
- }
-
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- super.onActivityCreated(savedInstanceState);
-
- // get view
- View view = getView();
-
- // set TYPE spinner listener
- Spinner typeSpinner = (Spinner) view.findViewById(R.id.medTypeSpinner);
- typeSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {
- // An item was selected. You can retrieve the selected item using
- // parent.getItemAtPosition(pos)
- @Override
- public void onItemSelected(AdapterView<?> parent, View view,
- int pos, long id) {
- // get TYPE
- MedLogType medType = _activity.Root.GetMedLogType(parent
- .getSelectedItem().toString());
-
- // set TYPE child spinner
- SetSpinnerData(R.id.medSubTypeSpinner, medType.GetSubTypeList());
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- // TODO Auto-generated method stub
- }
- });
-
- // set SUBTYPE spinner listener
- Spinner subTypeSpinner = (Spinner) view
- .findViewById(R.id.medSubTypeSpinner);
- subTypeSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {
- // An item was selected. You can retrieve the selected item using
- // parent.getItemAtPosition(pos)
- @Override
- public void onItemSelected(AdapterView<?> parent, View view,
- int pos, long id) {
- // get selected TYPE
- Spinner typeSpinner = (Spinner) getView().findViewById(
- R.id.medTypeSpinner);
- String selectedType = typeSpinner.getSelectedItem().toString();
- MedLogType medType = _activity.Root.GetMedLogType(selectedType);
-
- // get selected SUBTYPE item
- MedLogSubType medSubtype = medType.GetMedLogSubType(parent
- .getSelectedItem().toString());
-
- // set SUBTYPE children spinners
- SetSpinnerData(R.id.medSubSubTypeSpinner,
- medSubtype.GetSubSubTypeList());
- SetSpinnerData(R.id.pathologySpinner,
- medSubtype.GetPathologyList());
- SetSpinnerData(R.id.interventionSpinner,
- medSubtype.GetInterventionList());
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- // TODO Auto-generated method stub
- }
- });
-
- // set save entry button
- Button saveBtn = (Button) getView().findViewById(R.id.saveButton);
- saveBtn.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
-
- // if process number is missing... do not accept
- if (((EditText) getView().findViewById(R.id.nProcess)).getText()
- .toString().trim().isEmpty() == true) {
- _activity.ShowMessage(R.string.errorMissingProcessNumber_str);
- return;
- }
-
- // gather med log info
- GatherMedLogInfo();
-
- // apply overriden fields
- if (OverrideIsActivate()) {
- ApplyOverride();
- }
-
- // Log.e("Trace NewEntry", "All info collected");
-
- _activity.AddNewEntry();
-
- _activity.ShowMessage(R.string.successSavingEntry_str);
-
- // reset all entries to the initial state
- ResetAllEntries();
-
- // Log.e("Trace NewEntry", "Entry saved");
- }
- });
-
- // set override check box
- CheckBox overrideCheck = (CheckBox) getView().findViewById(
- R.id.overrideCheckBox);
- overrideCheck.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View arg0) {
- if (OverrideIsActivate()) {
- ShowOverrideFields();
- } else {
- HideOverrideFields();
- }
- }
- });
-
- // set fill override text button
- Button fillOverrideBtn = (Button) getView().findViewById(
- R.id.fillOverrideButton);
- fillOverrideBtn.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View arg0) {
- FillOverrideFromSpinners();
- }
- });
-
- // hide override fields
- HideOverrideFields();
- }
-
- @Override
- public void onResume() {
- super.onResume();
-
- // update type spinner based on current activity root
- SetSpinnerData(R.id.medTypeSpinner, _activity.Root.GetTypeList());
-
- // update first aider spinner
- SetSpinnerData(R.id.firstAiderSpinner,
- _activity.Root.GetFirstAiderList());
-
- // update anesthesia spinner
- SetSpinnerData(R.id.anesthesiaSpinner,
- _activity.Root.GetAnesthesiaList());
-
- // update place spinner
- SetSpinnerData(R.id.placeSpinner, _activity.Root.GetPlaceList());
- }
-
- private void SetSpinnerData(int spinnerId, List<String> spinnerValues) {
- // create array adapter
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(getView()
- .getContext(),
- // android.R.layout.simple_spinner_dropdown_item,
- R.layout.multiline_spinner_dropdown_item, spinnerValues);
-
- // sort spinner values
- adapter.sort(new Comparator<String>() {
- public int compare(String object1, String object2) {
- return object1.compareTo(object2);
- }
- });
-
- // get spinner
- Spinner spinner = (Spinner) getView().findViewById(spinnerId);
-
- // set adapter
- spinner.setAdapter(adapter);
- }
-
- private Spinner GetSpinner(int spinnerId) {
- return (Spinner) getView().findViewById(spinnerId);
- }
-
- private EditText GetEditText(int editTextId) {
- return (EditText) getView().findViewById(editTextId);
- }
-
- private CheckBox GetCheckBox(int checkBoxId){
- return (CheckBox) getView().findViewById(checkBoxId);
- }
-
- private String GetTextFromEditText(int editTextId) {
- return ((EditText) getView().findViewById(editTextId)).getText().toString();
- }
-
- private Boolean OverrideIsActivate() {
- return ((CheckBox) getView().findViewById(R.id.overrideCheckBox))
- .isChecked();
- }
-
- private String GetTextFromSpinner(int spinnerId) {
- Object item = ((Spinner) getView().findViewById(spinnerId)).getSelectedItem();
- if (item != null)
- return item.toString();
- else
- return "";
- }
-
- private void GatherMedLogInfo() {
- // Log.e("Trace NewEntry", "Save requested...");
-
- // collect med log info
- _activity.CurrentInfo.ProcessNumber = Long
- .parseLong(((EditText) getView().findViewById(R.id.nProcess))
- .getText().toString());
-
- // check if surgery number is empty
- if (((EditText) getView().findViewById(R.id.nSurgery)).getText()
- .toString().trim().isEmpty() == true) {
- _activity.CurrentInfo.SurgeryNumber = (long) 0;
- } else {
- _activity.CurrentInfo.SurgeryNumber = Long
- .parseLong(((EditText) getView()
- .findViewById(R.id.nSurgery)).getText().toString());
- }
-
- // Log.e("Trace NewEntry", "Collected numbers");
-
- DatePicker date = ((DatePicker) getView().findViewById(R.id.datePicker));
- _activity.CurrentInfo.Date.set(date.getYear(), date.getMonth(),
- date.getDayOfMonth());
-
- // Log.e("Trace NewEntry", "Collected date");
-
- // get spinners (avoid empty ones)
- _activity.CurrentInfo.Type = GetTextFromSpinner(R.id.medTypeSpinner);
- _activity.CurrentInfo.SubType = GetTextFromSpinner(R.id.medSubTypeSpinner);
-
- _activity.CurrentInfo.SubSubType = GetTextFromSpinner(R.id.medSubSubTypeSpinner);
- _activity.CurrentInfo.Pathology = GetTextFromSpinner(R.id.pathologySpinner);
- _activity.CurrentInfo.Intervention = GetTextFromSpinner(R.id.interventionSpinner);
- _activity.CurrentInfo.FirstAider = GetTextFromSpinner(R.id.firstAiderSpinner);
- _activity.CurrentInfo.Anesthesia = GetTextFromSpinner(R.id.anesthesiaSpinner);
- _activity.CurrentInfo.Place = GetTextFromSpinner(R.id.placeSpinner);
- _activity.CurrentInfo.Urgency = ((CheckBox) getView().findViewById(
- R.id.urgencyCheckBox)).isChecked();
-
- _activity.CurrentInfo.Notes = GetTextFromEditText(R.id.notesText);
- }
-
- private void ResetAllEntries()
- {
- GetEditText(R.id.nProcess).setText("");
- GetEditText(R.id.nSurgery).setText("");
- GetEditText(R.id.placeOverride).setText("");
- GetEditText(R.id.firstAiderOverride).setText("");
- GetEditText(R.id.anesthesiaOverride).setText("");
- GetEditText(R.id.medTypeOverride).setText("");
- GetEditText(R.id.medSubTypeOverride).setText("");
- GetEditText(R.id.medSubSubTypeOverride).setText("");
- GetEditText(R.id.pathologyOverride).setText("");
- GetEditText(R.id.interventionOverride).setText("");
- GetCheckBox(R.id.urgencyCheckBox).setChecked(false);
- GetCheckBox(R.id.overrideCheckBox).setChecked(false);
- GetEditText(R.id.notesText).setText("");
-
- // set default spinners
- GetSpinner(R.id.medTypeSpinner).setSelection(0);
- GetSpinner(R.id.firstAiderSpinner).setSelection(0);
- GetSpinner(R.id.anesthesiaSpinner).setSelection(0);
- GetSpinner(R.id.placeSpinner).setSelection(0);
-
- // hide override
- HideOverrideFields();
- }
-
- private void ApplyOverride() {
- String value;
-
- value = GetTextFromEditText(R.id.medTypeOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.Type = value;
- }
-
- value = GetTextFromEditText(R.id.medSubTypeOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.SubType = value;
- }
-
- value = GetTextFromEditText(R.id.medSubSubTypeOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.SubSubType = value;
- }
-
- value = GetTextFromEditText(R.id.pathologyOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.Pathology = value;
- }
-
- value = GetTextFromEditText(R.id.interventionOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.Intervention = value;
- }
-
- value = GetTextFromEditText(R.id.firstAiderOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.FirstAider = value;
- }
-
- value = GetTextFromEditText(R.id.anesthesiaOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.Anesthesia = value;
- }
-
- value = GetTextFromEditText(R.id.placeOverride);
- if(value.isEmpty() == false)
- {
- _activity.CurrentInfo.Place = value;
- }
- }
-
- private void HideOverrideFields() {
- GetEditText(R.id.firstAiderOverride).setVisibility(View.GONE);
- GetEditText(R.id.anesthesiaOverride).setVisibility(View.GONE);
- GetEditText(R.id.placeOverride).setVisibility(View.GONE);
- GetEditText(R.id.medTypeOverride).setVisibility(View.GONE);
- GetEditText(R.id.medSubTypeOverride).setVisibility(View.GONE);
- GetEditText(R.id.medSubSubTypeOverride).setVisibility(View.GONE);
- GetEditText(R.id.pathologyOverride).setVisibility(View.GONE);
- GetEditText(R.id.interventionOverride).setVisibility(View.GONE);
-
- ((Button) getView().findViewById(R.id.fillOverrideButton)).setVisibility(View.GONE);
- }
-
- private void ShowOverrideFields()
- {
- SetOverrideProperties(R.id.firstAiderOverride);
- SetOverrideProperties(R.id.anesthesiaOverride);
- SetOverrideProperties(R.id.placeOverride);
- SetOverrideProperties(R.id.medTypeOverride);
- SetOverrideProperties(R.id.medSubTypeOverride);
- SetOverrideProperties(R.id.medSubSubTypeOverride);
- SetOverrideProperties(R.id.pathologyOverride);
- SetOverrideProperties(R.id.interventionOverride);
-
- ((Button) getView().findViewById(R.id.fillOverrideButton)).setVisibility(View.VISIBLE);
- }
-
- private void SetOverrideProperties(int exitTextId)
- {
- int overrideColor = Color.argb(128, 51, 181, 229);
- EditText override;
- override = GetEditText(exitTextId);
- override.setVisibility(View.VISIBLE);
- override.setBackgroundColor(overrideColor);
- }
-
- private void FillOverrideFromSpinners()
- {
- GetEditText(R.id.firstAiderOverride).setText(GetTextFromSpinner(R.id.firstAiderSpinner));
- GetEditText(R.id.anesthesiaOverride).setText(GetTextFromSpinner(R.id.anesthesiaSpinner));
- GetEditText(R.id.placeOverride).setText(GetTextFromSpinner(R.id.placeSpinner));
- GetEditText(R.id.medTypeOverride).setText(GetTextFromSpinner(R.id.medTypeSpinner));
- GetEditText(R.id.medSubTypeOverride).setText(GetTextFromSpinner(R.id.medSubTypeSpinner));
- GetEditText(R.id.medSubSubTypeOverride).setText(GetTextFromSpinner(R.id.medSubSubTypeSpinner));
- GetEditText(R.id.pathologyOverride).setText(GetTextFromSpinner(R.id.pathologySpinner));
- GetEditText(R.id.interventionOverride).setText(GetTextFromSpinner(R.id.interventionSpinner));
- }
-
-}
diff --git a/old_native_project/src/com/example/surgerylog/ViewDataFragment.java b/old_native_project/src/com/example/surgerylog/ViewDataFragment.java deleted file mode 100755 index 6adbbaa..0000000 --- a/old_native_project/src/com/example/surgerylog/ViewDataFragment.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.example.surgerylog;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.List;
-import net.redroid.medlog.R;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.ListView;
-import android.widget.AdapterView.OnItemClickListener;
-
-public class ViewDataFragment extends Fragment {
- /**
- * The fragment argument representing the section number for this fragment.
- */
- public static final String ARG_SECTION_NUMBER = "section_number";
-
- private MainActivity _activity;
-
- List<String> _viewDataList = new ArrayList<String>();
-
- int _lastSelected;
-
- public ViewDataFragment() {
- }
-
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
-
- // This makes sure that the container activity has implemented
- // the callback interface. If not, it throws an exception
- try {
- _activity = (MainActivity) activity;
- } catch (ClassCastException e) {
- throw new ClassCastException(activity.toString()
- + " must implement OnHeadlineSelectedListener");
- }
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- // get root view
- View rootView = inflater.inflate(R.layout.fragment_view_data,
- container, false);
-
- return rootView;
- }
-
- @Override
- public void onActivityCreated(Bundle savedInstanceState) {
- // TODO Auto-generated method stub
- super.onActivityCreated(savedInstanceState);
-
- // get list view
- ListView listView = ((ListView) getView().findViewById(
- R.id.dataBaseListView));
-
- // set list view on click event
- listView.setOnItemClickListener(new OnItemClickListener() {
-
- @Override
- public void onItemClick(AdapterView<?> parent, View view,
- int position, long id) {
-
- // hold last selected
- _lastSelected = position;
-
- // prepare the alert box
- AlertDialog.Builder _alertbox = new AlertDialog.Builder(
- _activity);
- MedLogInfo info = _activity.DataBase.get(position);
- String infoStr = "#Pro: " + info.ProcessNumber.toString()
- + "\n" + "#Cir: " + info.SurgeryNumber.toString()
- + "\n" + "Data: " + info.GetFormatedDate()
- + "\n" + "Ajud: " + info.FirstAider
- + "\n" + "Anst: " + info.Anesthesia
- + "\n" + "Locl: " + info.Place
- + "\n" + "Tipo: " + info.Type
- + "\n" + "Subt: " + info.SubType
- + "\n" + "Pato: " + info.Pathology
- + "\n" + "Intr: " + info.Intervention
- + "\n" + "Urgn: " + _activity.getString(info.Urgency == true ? R.string.yes_str : R.string.no_str)
- + "\n" + "Nota: " + info.Notes
- ;
- _alertbox.setMessage(infoStr);
- _alertbox.setNeutralButton(R.string.ok_str,
- new DialogInterface.OnClickListener() {
- // click listener on the alert box
- public void onClick(DialogInterface arg0, int arg1) {
- // nothing to do here
- }
- });
- _alertbox.setNegativeButton(R.string.delete_str,
- new DialogInterface.OnClickListener() {
- // click listener on the alert box
- public void onClick(DialogInterface arg0, int arg1) {
- // TODO delete the database entry
- _activity.DataBase.remove(_lastSelected);
- _activity.SaveMedLogDB();
- UpdateListView();
- }
- });
- _alertbox.show();
- }
- });
-
- // REFRESH BUTTON
- Button refreshBtn = (Button) getView().findViewById(R.id.refreshBtn);
- refreshBtn.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- UpdateListView();
- }
- });
-
- }
-
- @Override
- public void onResume() {
- super.onResume();
-
- UpdateListView();
- }
-
- public void UpdateListView() {
- // get list data
- if (_activity.DataBase != null) {
-
- // remove old entries
- _viewDataList.clear();
-
- // add new entries
- for (MedLogInfo log : _activity.DataBase) {
- _viewDataList.add(log.ProcessNumber.toString());
- }
- }
-
- // create array adapter
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(getView()
- .getContext(), android.R.layout.simple_list_item_1,
- _viewDataList);
-
- // // sort list values
- // adapter.sort(new Comparator<String>() {
- // public int compare(String object1, String object2) {
- // return object1.compareTo(object2);
- // }
- // });
-
- // get list view
- ListView listView = ((ListView) getView().findViewById(
- R.id.dataBaseListView));
-
- // set adapter
- listView.setAdapter(adapter);
- }
-
-}
diff --git a/project.godot b/project.godot index 36429fc..ebb4f56 100644 --- a/project.godot +++ b/project.godot @@ -22,32 +22,32 @@ _global_script_classes=[ { "base": "Control", "class": "DatePicker", "language": "GDScript", -"path": "res://date_picker/date_picker.gd" +"path": "res://ui/date_picker/date_picker.gd" }, { "base": "Control", "class": "Dialog", "language": "GDScript", -"path": "res://dialog/dialog.gd" +"path": "res://ui/dialog/dialog.gd" }, { "base": "Control", "class": "ModalPopup", "language": "GDScript", -"path": "res://logic/popup.gd" +"path": "res://ui/modal_popup/modal_popup.gd" }, { "base": "Control", "class": "OptionSet", "language": "GDScript", -"path": "res://option_set/option_set.gd" +"path": "res://ui/option_set/option_set.gd" }, { "base": "Control", "class": "OptionSetList", "language": "GDScript", -"path": "res://option_set/option_set_list.gd" +"path": "res://ui/option_set/option_set_list.gd" }, { "base": "Control", "class": "PointerInputSensor", "language": "GDScript", -"path": "res://pointer_input_sensor.gd" +"path": "res://ui/pointer_input_sensor.gd" }, { "base": "TouchVerticalContainer", "class": "Stage", @@ -57,17 +57,17 @@ _global_script_classes=[ { "base": "ItemList", "class": "TouchItemList", "language": "GDScript", -"path": "res://touch_item_list/touch_item_list.gd" +"path": "res://ui/touch_item_list/touch_item_list.gd" }, { "base": "ScrollContainer", "class": "TouchVerticalContainer", "language": "GDScript", -"path": "res://touch_vertical_container/touch_vertical_container.gd" +"path": "res://ui/touch_vertical_container/touch_vertical_container.gd" }, { "base": "Control", "class": "ValuePicker", "language": "GDScript", -"path": "res://date_picker/value_picker.gd" +"path": "res://ui/date_picker/value_picker.gd" } ] _global_script_class_icons={ "Database": "", @@ -66,12 +66,12 @@ Surgery Log - on auto-fill pop-up, should close it; - on database screen, should deselect selected item, otherwise should quit the app; - [x] db entry should be printed as "%9s | %4s | %yyyy-%MM"; +- [x] Cleanup code: + - [x] Search by tags @DAM and TODO; + - [x] Rename dialog and popup classes; + - [x] Reorganize code files; - [ ] Create light theme; - [ ] Create theme entry in menu and save on settings file; -- [ ] Cleanup code: - - [ ] Search by tags @DAM and TODO; - - [ ] Rename dialog and popup classes; - - [ ] Reorganize code files; - [ ] main/screen_controller is responsible for whos currently on focus, fade animations, input access (enable/disable), and back_key_notification handling. For input use: node.set_process_input(!pause) diff --git a/date_picker/date_picker.gd b/ui/date_picker/date_picker.gd index e2a793f..e2a793f 100644 --- a/date_picker/date_picker.gd +++ b/ui/date_picker/date_picker.gd diff --git a/date_picker/date_picker.tscn b/ui/date_picker/date_picker.tscn index 8b082f2..e3d88c4 100644 --- a/date_picker/date_picker.tscn +++ b/ui/date_picker/date_picker.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://date_picker/value_picker.gd" type="Script" id=1] -[ext_resource path="res://date_picker/date_picker.gd" type="Script" id=2] +[ext_resource path="res://ui/date_picker/value_picker.gd" type="Script" id=1] +[ext_resource path="res://ui/date_picker/date_picker.gd" type="Script" id=2] [node name="date_picker" type="Control"] anchor_right = 1.0 diff --git a/date_picker/value_picker.gd b/ui/date_picker/value_picker.gd index b70f1aa..b70f1aa 100644 --- a/date_picker/value_picker.gd +++ b/ui/date_picker/value_picker.gd diff --git a/dialog/dialog.gd b/ui/dialog/dialog.gd index 89fee5c..89fee5c 100644 --- a/dialog/dialog.gd +++ b/ui/dialog/dialog.gd diff --git a/logic/popup.gd b/ui/modal_popup/modal_popup.gd index 95fc2c3..95fc2c3 100644 --- a/logic/popup.gd +++ b/ui/modal_popup/modal_popup.gd diff --git a/ui/modal_popup/modal_popup.tscn b/ui/modal_popup/modal_popup.tscn new file mode 100644 index 0000000..3814bef --- /dev/null +++ b/ui/modal_popup/modal_popup.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://ui/modal_popup/modal_popup.gd" type="Script" id=1] +[ext_resource path="res://fonts/font_icons.tres" type="DynamicFont" id=2] + +[node name="popup" type="ColorRect"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +color = Color( 0, 0, 0, 0.870588 ) +script = ExtResource( 1 ) + +[node name="background" type="Panel" parent="."] +anchor_left = 0.05 +anchor_top = 0.1 +anchor_right = 0.95 +anchor_bottom = 0.975 + +[node name="title" type="Label" parent="."] +anchor_left = 0.124 +anchor_top = 0.025 +anchor_right = 0.95 +anchor_bottom = 0.1 +margin_left = 0.0799866 +margin_right = -80.0 +margin_bottom = -20.0 +align = 1 +valign = 1 +autowrap = true + +[node name="dismiss" type="Button" parent="."] +anchor_left = 0.05 +anchor_top = 0.025 +anchor_right = 0.124 +anchor_bottom = 0.1 +margin_right = 0.0799866 +margin_bottom = -20.0 +custom_fonts/font = ExtResource( 2 ) +text = "" +flat = true diff --git a/option_set/option_set.gd b/ui/option_set/option_set.gd index 25ca0ff..25ca0ff 100644 --- a/option_set/option_set.gd +++ b/ui/option_set/option_set.gd diff --git a/option_set/option_set.tscn b/ui/option_set/option_set.tscn index 26a042d..b971429 100644 --- a/option_set/option_set.tscn +++ b/ui/option_set/option_set.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://option_set/option_set.gd" type="Script" id=1] +[ext_resource path="res://ui/option_set/option_set.gd" type="Script" id=1] [ext_resource path="res://fonts/font_icons.tres" type="DynamicFont" id=2] [node name="option_set" type="Control"] diff --git a/option_set/option_set_list.gd b/ui/option_set/option_set_list.gd index fda2c04..fda2c04 100644 --- a/option_set/option_set_list.gd +++ b/ui/option_set/option_set_list.gd diff --git a/option_set/option_set_list.tscn b/ui/option_set/option_set_list.tscn index d336961..82473a5 100644 --- a/option_set/option_set_list.tscn +++ b/ui/option_set/option_set_list.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://option_set/option_set_list.gd" type="Script" id=1] +[ext_resource path="res://ui/option_set/option_set_list.gd" type="Script" id=1] [node name="option_set_list" type="Control"] anchor_right = 1.0 diff --git a/pointer_input_sensor.gd b/ui/pointer_input_sensor.gd index f99fc17..f99fc17 100644 --- a/pointer_input_sensor.gd +++ b/ui/pointer_input_sensor.gd diff --git a/touch_item_list/touch_item_list.gd b/ui/touch_item_list/touch_item_list.gd index 6794138..6794138 100644 --- a/touch_item_list/touch_item_list.gd +++ b/ui/touch_item_list/touch_item_list.gd diff --git a/touch_item_list/touch_item_list.tscn b/ui/touch_item_list/touch_item_list.tscn index 31fed01..38f9a7e 100644 --- a/touch_item_list/touch_item_list.tscn +++ b/ui/touch_item_list/touch_item_list.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://pointer_input_sensor.gd" type="Script" id=1] -[ext_resource path="res://touch_item_list/touch_item_list.gd" type="Script" id=2] +[ext_resource path="res://ui/pointer_input_sensor.gd" type="Script" id=1] +[ext_resource path="res://ui/touch_item_list/touch_item_list.gd" type="Script" id=2] [node name="item_list" type="ItemList"] anchor_right = 1.0 diff --git a/touch_vertical_container/touch_vertical_container.gd b/ui/touch_vertical_container/touch_vertical_container.gd index 8f87338..8f87338 100644 --- a/touch_vertical_container/touch_vertical_container.gd +++ b/ui/touch_vertical_container/touch_vertical_container.gd diff --git a/touch_vertical_container/touch_vertical_container.tscn b/ui/touch_vertical_container/touch_vertical_container.tscn index bdf9734..e741e8a 100644 --- a/touch_vertical_container/touch_vertical_container.tscn +++ b/ui/touch_vertical_container/touch_vertical_container.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://touch_vertical_container/touch_vertical_container.gd" type="Script" id=1] +[ext_resource path="res://ui/touch_vertical_container/touch_vertical_container.gd" type="Script" id=1] [node name="touch_vertical_container" type="ScrollContainer"] anchor_right = 1.0 |
