Changes in / [333:ea6889086fc9:327:5f6c2da60381]
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgtags
r333 r326 7 7 b47c44506c830cd63d62d77300daa714fdf80fee hg_start 8 8 e62158696bc29ddd771699760c58742568b25688 pf-0.9.1 9 b2ed9015dfb7c96fd5566f0ff62c0afcfba63299 Makefile 10 5de30e5cfcc2d03adc6c6350ffd94a114af4e807 Makefilea 11 5de30e5cfcc2d03adc6c6350ffd94a114af4e807 Makefilea 12 0000000000000000000000000000000000000000 Makefilea 13 0000000000000000000000000000000000000000 Makefilea 14 0000000000000000000000000000000000000000 Makefilea 15 b2ed9015dfb7c96fd5566f0ff62c0afcfba63299 Makefile 16 0000000000000000000000000000000000000000 Makefile 17 0000000000000000000000000000000000000000 Makefile 18 0000000000000000000000000000000000000000 Makefile 9 19 c038d471343d129210a47183df19fd5482254d96 pf-0.9.3 10 20 6a5437ba9e4db5924d84f3e162e1b6ca8a17666c qx-1.5.1 11 38122f4e5fa6733e2c6cad853e6a1aeedb908ef6 qx-2.0.1 21 5045634f136c9761cd5d84ed0ec82bc926c4613c qx-1_0_2 22 0000000000000000000000000000000000000000 qx-1_0_2 23 b9efbf5ce6d35d35b93f0da6ff4bce144d42ba0a qx-1_1_1 24 0000000000000000000000000000000000000000 qx-1_1_1 25 89f0b2d9b6e22306e8f4563c51218659429a9b57 qx-1_3_1 26 0000000000000000000000000000000000000000 qx-1_3_1 27 822641d9288c0f8b623411e0419f1bc33b868a09 qx-1_2 28 0000000000000000000000000000000000000000 qx-1_2 -
config.json
r315 r309 32 32 { 33 33 "APPLICATION" : "pf", 34 "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/ 2.0.1",34 "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/1.6.1", 35 35 "QXTHEME" : "pf.theme.Modern", 36 36 "API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*"], 37 "OPTIMIZE" : ["basecalls", "privates" , "whitespace", "comments"],37 "OPTIMIZE" : ["basecalls", "privates"], 38 38 "LOCALES" : [ "en" ], 39 39 "CACHE" : "${TMPDIR}/cache", -
source/class/pf/Application.js
r333 r327 2475 2475 createSaveLoadDialog : function() 2476 2476 { 2477 var w, layout,rc1, e, btn;2477 var w, rc1, e, btn; 2478 2478 // "Save as..." dialog 2479 2479 w = new pf.ui.DialogWindow(); … … 2490 2490 var btn_rename = new qx.ui.toolbar.Button("Rename", 2491 2491 "pf/image/rename.png"); 2492 var btn_export = new qx.ui.toolbar.Button("Export",2493 "pf/image/export.png");2494 var btn_import = new qx.ui.toolbar.Button("Import",2495 "pf/image/import.png");2496 2492 btn_delete.setEnabled(false); 2497 2493 btn_rename.setEnabled(false); 2498 btn_export.setEnabled(false);2499 2494 tbpart.add(btn_delete); 2500 2495 tbpart.add(btn_rename); 2501 tbpart.add(new qx.ui.toolbar.Separator());2502 tbpart.add(btn_export);2503 tbpart.add(btn_import);2504 2496 tb.add(tbpart); 2505 2497 w.add(tb); … … 2533 2525 var sm = lv.getSelectionModel(); 2534 2526 sm.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION); 2535 2536 // Export/import window2537 var eiw = new pf.ui.DialogWindow();2538 eiw.set({2539 width: 350,2540 height: 4002541 });2542 eiw.setResizable(true);2543 eiw.setLayout(new qx.ui.layout.VBox(0));2544 eiw.setContentPadding(0);2545 2546 var note = new qx.ui.basic.Label("Label", {height: 20});2547 eiw.add(note);2548 2549 var text_area = new qx.ui.form.TextArea();2550 text_area.setWrap(true);2551 eiw.add(text_area, {flex: 1});2552 2553 2554 layout = new qx.ui.layout.HBox(10, "right");2555 rc1 = new qx.ui.container.Composite(layout);2556 rc1.setMargin(10, 10, 10, 10);2557 eiw.add(rc1);2558 2559 btn = new qx.ui.form.Button("Cancel", "pf/image/cancel.png");2560 btn.addListener("execute", function(ev) {2561 eiw.close();2562 }, this);2563 rc1.add(btn);2564 2565 btn = new qx.ui.form.Button("OK", "pf/image/ok.png");2566 btn.addListener("execute", function(ev) {2567 var type = eiw.getUserData("type");2568 if (type == "import") {2569 var configstr = text_area.getValue();2570 2571 var config;2572 try {2573 config = qx.lang.Json.parse(configstr);2574 } catch (err) {2575 this.error(err);2576 }2577 2578 if (config) {2579 var name = config.name;2580 2581 var d = new Date();2582 var time = d.getTime();2583 2584 var configPtr = new Object;2585 configPtr.name = name;2586 configPtr.hash = time;2587 configPtr.time = time;2588 2589 this.prefs.configPtrs.push(configPtr);2590 2591 var cookie_name = "pf_config_" + configPtr.hash;2592 qx.bom.Cookie.set(cookie_name, configstr, 3650);2593 2594 this.savePreferences();2595 this.updateSaveLoadList();2596 2597 eiw.close();2598 } else {2599 this.msgWindow.error("Cannot parse the configuration!");2600 }2601 } else {2602 eiw.close();2603 }2604 }, this);2605 rc1.add(btn);2606 2607 this.doc.add(eiw);2608 2527 2609 2528 btn_delete.addListener("execute", function(ev) { … … 2632 2551 var name = rowData[0]; 2633 2552 2553 2634 2554 this.promptDialog.prompt("Rename \"" + name + "\" to", 2635 2555 name, function(newname) { … … 2647 2567 }, this); 2648 2568 2649 btn_export.addListener("execute", function(ev) {2650 if (!sm.isSelectionEmpty()) {2651 var index = sm.getLeadSelectionIndex();2652 var rowData = tm.getRowData(index);2653 var name = rowData[0];2654 2655 var configPtr = this.getConfig(name);2656 if (!configPtr) {2657 return false;2658 }2659 2660 var cookie_name = "pf_config_" + configPtr.hash;2661 2662 var configstr = qx.bom.Cookie.get(cookie_name);2663 if (!configstr) {2664 return false;2665 }2666 2667 var config = qx.lang.Json.parse(configstr);2668 config.name = name;2669 2670 text_area.setValue(2671 qx.lang.Json.stringify(config, undefined, 4));2672 2673 eiw.setCaption("Export configuration")2674 eiw.setIcon("pf/image/export.png");2675 eiw.setUserData("type", "export");2676 2677 text_area.setReadOnly(true);2678 2679 var nstr =2680 "Copy the contents below to a text editor and save";2681 note.setValue(nstr);2682 2683 eiw.open();2684 }2685 }, this);2686 2687 btn_import.addListener("execute", function(ev) {2688 eiw.setCaption("Import configuration")2689 eiw.setIcon("pf/image/import.png");2690 eiw.setUserData("type", "import");2691 2692 text_area.setReadOnly(false);2693 text_area.setValue("");2694 2695 var nstr =2696 "Copy a previously saved config to the space below";2697 note.setValue(nstr);2698 2699 eiw.open();2700 }, this);2701 2702 2569 e = new qx.ui.form.TextField(); 2703 2570 e.setMarginTop(1); … … 2710 2577 btn_delete.setEnabled(false); 2711 2578 btn_rename.setEnabled(false); 2712 btn_export.setEnabled(false);2713 2579 } else { 2714 2580 var index = sm.getLeadSelectionIndex(); … … 2717 2583 btn_rename.setEnabled(true); 2718 2584 btn_delete.setEnabled(true); 2719 btn_export.setEnabled(true);2720 2585 } 2721 2586 }); 2722 2587 2723 layout = new qx.ui.layout.HBox(10, "right");2588 var layout = new qx.ui.layout.HBox(10, "right"); 2724 2589 rc1 = new qx.ui.container.Composite(layout); 2725 2590 rc1.setMargin(10, 10, 10, 10); … … 2883 2748 var btn3 = new qx.ui.form.RadioButton("Simple"); 2884 2749 btn3.setModel("simple"); 2885 var btn4 = new qx.ui.form.RadioButton("Indigo");2886 btn4.setModel("indigo");2887 2750 2888 2751 fr.add(btn1); 2889 2752 fr.add(btn2); 2890 2753 fr.add(btn3); 2891 fr.add(btn4); 2892 2893 var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3, btn4); 2754 2755 var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3); 2894 2756 var sels; 2895 2757 switch (this.prefs.themeName) { … … 2899 2761 case "simple": 2900 2762 sels = new Array(btn3); 2901 break;2902 case "indigo":2903 sels = new Array(btn4);2904 2763 break; 2905 2764 default: … … 2928 2787 theme = qx.theme.Simple; 2929 2788 break; 2930 case "indigo":2931 theme = qx.theme.Indigo;2932 break;2933 2789 default: 2934 2790 theme = pf.theme.Modern; … … 2992 2848 this.bl_top = new qx.ui.container.Composite(layout); 2993 2849 2994 this.doc.add(this.bl_top, {width : "100%", height: "100%"});2850 this.doc.add(this.bl_top, {width :'100%', height: "100%"}); 2995 2851 2996 2852 // The menubar -
source/class/pf/Plasma.js
r317 r305 259 259 }, 260 260 261 getFermiVelocity: function()262 {263 return Math.sqrt(2*this.getFermiEnergy());264 },265 266 getFermiLength: function()267 {268 var n_e = this.e.getN();269 var E_F = this.getFermiEnergy();270 return Math.sqrt(E_F/(6*Math.PI*n_e));271 },272 273 261 getAlfvenVelocity: function() 274 262 { … … 343 331 this.i.getMassDensity() + 344 332 this.r.getMassDensity(); 345 },346 347 // griem:1997a, Eq (7.75)348 getLteNe: function()349 {350 var Z_core = this.r.getZcore();351 var E12 = 3.0/8.0*Z_core*Z_core;352 return 5/Math.sqrt(Math.PI)*pf.base.Bohr.alpha3*353 Math.pow(E12, 3)*Math.sqrt(2*this.e.getT());354 },355 356 dE2dWl: function(dE)357 {358 var E = this.r.getTransitionEnergy();359 return (2*Math.PI)*pf.base.Bohr.c*dE/(E*E);360 333 }, 361 334 -
source/entities.js
r318 r308 136 136 }, 137 137 { 138 id : "natural_linewidth_wl",139 name : "Natural linewidth (wl)",140 dimension : "length",141 nspecies : 0,142 section : "spectroscopy",143 formula : "this.plasma.dE2dWl(this.plasma.r.getNaturalWidth())"144 },145 {146 138 id : "Fine_structure", 147 139 name : "Fine structure", … … 153 145 }, 154 146 { 155 id : "Fine_structure_wl",156 name : "Fine structure (wl)",157 dimension : "length",158 nspecies : 0,159 section : "spectroscopy",160 formula : "this.plasma.dE2dWl(this.plasma.r.getFineStructure())",161 wikiLink : "Fine_structure"162 },163 {164 147 id : "doppler_fwhm", 165 148 name : "Doppler FWHM", … … 171 154 }, 172 155 { 173 id : "doppler_fwhm_wl",174 name : "Doppler FWHM (wl)",175 dimension : "length",176 nspecies : 0,177 section : "spectroscopy",178 formula : "this.plasma.dE2dWl(2*this.plasma.r.getDopplerHwhm())",179 wikiLink : "Doppler_broadening"180 },181 {182 156 id : "zeeman_splitting", 183 157 name : "Zeeman splitting", … … 188 162 }, 189 163 { 190 id : "zeeman_splitting_wl",191 name : "Zeeman splitting (wl)",192 dimension : "length",193 nspecies : 0,194 section : "spectroscopy",195 formula : "this.plasma.dE2dWl(2*this.plasma.getZeemanSplitting())"196 },197 {198 164 id : "total_stark_fwhm", 199 165 name : "Total Stark FWHM", … … 204 170 }, 205 171 { 206 id : "total_stark_fwhm_wl",207 name : "Total Stark FWHM (wl)",208 dimension : "length",209 nspecies : 0,210 section : "spectroscopy",211 formula : "this.plasma.dE2dWl(2*this.plasma.getStarkHwhm())"212 },213 {214 172 id : "stark_fwhm", 215 173 name : "Stark FWHM", … … 265 223 formula : "this.plasma.getFermiEnergy()", 266 224 wikiLink : "Fermi_energy" 267 },268 {269 id : "fermi_velocity",270 name : "Fermi velocity",271 dimension : "velocity",272 nspecies : 0,273 section : "fundamental",274 formula : "this.plasma.getFermiVelocity()",275 wikiLink : "Fermi_velocity"276 },277 {278 id : "fermi_length",279 name : "Fermi screening length",280 dimension : "length",281 nspecies : 0,282 section : "fundamental",283 formula : "this.plasma.getFermiLength()",284 wikiLink : "Electric-field_screening"285 225 }, 286 226 { … … 356 296 section : "spectroscopy", 357 297 formula : "this.plasma.r.getEinsteinA()", 358 wikiLink : "Einstein_coefficients"359 },360 361 {362 id : "LTE_parameter",363 name : "LTE parameter",364 dimension : "none",365 nspecies : 0,366 section : "spectroscopy",367 formula : "this.plasma.e.getN()/this.plasma.getLteNe()",368 298 wikiLink : "Einstein_coefficients" 369 299 },
Note: See TracChangeset
for help on using the changeset viewer.