CommandLineTools.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * Copyright (c) 2011-2018 by Andrew Mustun. All rights reserved.
  3. *
  4. * This file is part of the QCAD project.
  5. *
  6. * QCAD is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * QCAD is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with QCAD.
  18. */
  19. /**
  20. * \defgroup ecma_tutorials_cmd Command Line Tools Examples
  21. * \ingroup ecma_tutorials
  22. */
  23. include("../Tutorials.js");
  24. /**
  25. * \class CommandLineTools
  26. * \ingroup ecma_tutorials_cmd
  27. * \brief Base class for all command line tool examples.
  28. */
  29. function CommandLineTools(guiAction) {
  30. Tutorials.call(this, guiAction);
  31. }
  32. CommandLineTools.prototype = new Tutorials();
  33. CommandLineTools.includeBasePath = includeBasePath;
  34. CommandLineTools.getMenu = function() {
  35. var menu = EAction.getSubMenu(
  36. Tutorials.getMenu(),
  37. 0, 200,
  38. CommandLineTools.getTitle(),
  39. "commandLineTools",
  40. CommandLineTools.includeBasePath + "/CommandLineTools.svg"
  41. );
  42. return menu;
  43. };
  44. CommandLineTools.getTitle = function() {
  45. return qsTr("&Command Line Tools");
  46. };
  47. CommandLineTools.prototype.getTitle = function() {
  48. return CommandLineTools.getTitle();
  49. };