GroundDataImport.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. include("scripts/EAction.js");
  2. function GroundDataImport(guiAction) {
  3. EAction.call(this, guiAction);
  4. }
  5. GroundDataImport.prototype = new EAction();
  6. GroundDataImport.includeBasePath = includeBasePath;
  7. GroundDataImport.prototype.beginEvent = function() {
  8. EAction.prototype.beginEvent.call(this);
  9. if (!isNull(this.getGuiAction()) && this.getGuiAction().objectName==="GroundDataImportToolsPanelAction") {
  10. EAction.showCadToolBarPanel("GroundDataImportToolsPanel");
  11. this.terminate();
  12. }
  13. };
  14. GroundDataImport.getMenu = function() {
  15. var menu = EAction.getSubMenu(Data.getMenu(), 90001, 100, GroundDataImport.getTitle(), "GroundDataImportMenu");
  16. menu.setProperty("scriptFile", GroundDataImport.includeBasePath + "/GroundDataImport.js");
  17. return menu;
  18. };
  19. GroundDataImport.getToolBar = function() {
  20. //return EAction.getToolBar(GroundDataImport.getTitle(), "ViewToolBar", undefined, undefined, View.getToolBar());
  21. return Data.getToolBar();
  22. };
  23. // GroundDataImport.getCadToolBarPanel = function() {
  24. // var mtb = EAction.getMainCadToolBarPanel();
  25. // var actionName = "GroundDataImportToolsPanelAction";
  26. // if (!isNull(mtb) && mtb.findChild(actionName)==undefined) {
  27. // var action = new RGuiAction(qsTr("GroundDataImport Tools"), mtb);
  28. // action.setScriptFile(GroundDataImport.includeBasePath + "/GroundDataImport.js");
  29. // action.objectName = actionName;
  30. // action.setRequiresDocument(false);
  31. // action.setIcon(GroundDataImport.includeBasePath + "/GroundDataImport.svg");
  32. // //action.setStatusTip(qsTr("Show GroundDataImport tools"));
  33. // action.setDefaultShortcut(new QKeySequence("w,z"));
  34. // action.setNoState();
  35. // action.setDefaultCommands(["GroundDataImportmenu"]);
  36. // action.setGroupSortOrder(10);
  37. // action.setSortOrder(350);
  38. // action.setWidgetNames(["!MainToolsPanel"]);
  39. // }
  40. // var tb = EAction.getCadToolBarPanel(
  41. // GroundDataImport.getTitle(),
  42. // "GroundDataImportToolsPanel",
  43. // true
  44. // );
  45. // return tb;
  46. // };
  47. // GroundDataImport.getToolMatrixPanel = function() {
  48. // RSettings.setValue("GroundDataImport/VisibleInMatrixPanel", false, false);
  49. // return EAction.getToolMatrixPanel(GroundDataImport.getTitle(), "GroundDataImportMatrixPanel", 30);
  50. // };
  51. GroundDataImport.getTitle = function() {
  52. return qsTr("&地形数据导入");
  53. };
  54. GroundDataImport.prototype.getTitle = function() {
  55. return GroundDataImport.getTitle();
  56. };
  57. GroundDataImport.init = function() {
  58. GroundDataImport.getMenu();
  59. GroundDataImport.getToolBar();
  60. // GroundDataImport.getCadToolBarPanel();
  61. // GroundDataImport.getToolMatrixPanel();
  62. };