programoptions.ui.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /****************************************************************************
  2. ** ui.h extension file, included from the uic-generated form implementation.
  3. **
  4. ** If you want to add, delete, or rename functions or slots, use
  5. ** Qt Designer to update this file, preserving your code.
  6. **
  7. ** You should not define a constructor or destructor in this file.
  8. ** Instead, write your code in functions called init() and destroy().
  9. ** These will automatically be called by the form's constructor and
  10. ** destructor.
  11. *****************************************************************************/
  12. /*
  13. ktigcc - TIGCC IDE for KDE
  14. Copyright (C) 2004-2006 Kevin Kofler
  15. Copyright (C) 2006 Joey Adams
  16. This program is free software; you can redistribute it and/or modify
  17. it under the terms of the GNU General Public License as published by
  18. the Free Software Foundation; either version 2, or (at your option)
  19. any later version.
  20. This program is distributed in the hope that it will be useful,
  21. but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. GNU General Public License for more details.
  24. You should have received a copy of the GNU General Public License
  25. along with this program; if not, write to the Free Software Foundation,
  26. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  27. */
  28. #include <kurl.h>
  29. #include "tpr.h" //tpr.h relies on kurl.h
  30. extern tprLibOpts libopts;
  31. void ProgramOptions::ImportSettings(void)
  32. {
  33. //Tab: Calculator
  34. if (libopts.use_ti89)
  35. TI89->toggle();
  36. if (libopts.use_ti92p)
  37. TI92Plus->toggle();
  38. if (libopts.use_v200)
  39. V200->toggle();
  40. if (libopts.opt_calc_consts)
  41. OptimizeCalcConsts->toggle();
  42. //Tab: Operating System
  43. if (libopts.use_preos)
  44. PreOS->toggle();
  45. else if (libopts.use_kernel)
  46. RecentDoorsCompatibleKernels->toggle();
  47. else
  48. AnyNoKernel->toggle();
  49. if (libopts.use_minams)
  50. CMinimumAMSVersion->toggle();
  51. MinimumAMSVersion->setText(QString("%1.%2").arg(libopts.minams/100).arg(libopts.minams%100));
  52. if (libopts.unofficial_os)
  53. UnofficialOSSupport->toggle();
  54. //Tab: Reloc Format
  55. if (libopts.reloc_format==RT_KERNEL)
  56. RelocKernel->toggle();
  57. else if (libopts.reloc_format==RT_COMPRESSED)
  58. RelocCompressed->toggle();
  59. else if (libopts.reloc_format==RT_MLINK)
  60. RelocMlink->toggle();
  61. else
  62. RelocAMS->toggle();
  63. if (libopts.use_fline_jumps)
  64. UseFLineJumps->toggle();
  65. if (libopts.use_4b_fline_jumps)
  66. Use4ByteFLineJumps->toggle();
  67. if (libopts.rom_call_format==RT_KERNEL)
  68. ROMCallKernel->toggle();
  69. else if (libopts.rom_call_format==RT_COMPRESSED)
  70. ROMCallCompressed->toggle();
  71. else if (libopts.rom_call_format==RT_MLINK)
  72. ROMCallMlink->toggle();
  73. else if (libopts.rom_call_format==RT_FLINE)
  74. ROMCallFLine->toggle();
  75. else
  76. ROMCallDirect->toggle();
  77. if (libopts.opt_rom_calls)
  78. OptimizeROMCalls->toggle();
  79. if (libopts.use_internal_fline_emu)
  80. UseInternalFLineEmulator->toggle();
  81. //Tab: BSS/Data Format
  82. if (libopts.bss_ref_format==RT_KERNEL)
  83. BSSKernel->toggle();
  84. else if (libopts.bss_ref_format==RT_COMPRESSED)
  85. BSSCompressed->toggle();
  86. else if (libopts.bss_ref_format==RT_MLINK)
  87. BSSMlink->toggle();
  88. else
  89. BSSMerge->toggle();
  90. if (libopts.data_ref_format==RT_COMPRESSED)
  91. BSSDataCompressed->toggle();
  92. else if (libopts.data_ref_format==RT_MLINK)
  93. BSSDataMlink->toggle();
  94. else
  95. BSSDataKernel->toggle();
  96. //Tab: Home Screen
  97. if (libopts.use_return_value)
  98. HomeCustomValue->toggle();
  99. else
  100. HomeDone->toggle();
  101. if (libopts.enable_error_return)
  102. EnableReturningErrors->toggle();
  103. if (libopts.save_screen)
  104. SaveScreen->toggle();
  105. }