Skip to content
Snippets Groups Projects
  1. Dec 15, 2021
  2. Dec 10, 2021
  3. Dec 06, 2021
  4. Dec 02, 2021
  5. Nov 16, 2021
  6. Nov 13, 2021
  7. Nov 05, 2021
  8. Nov 02, 2021
  9. Nov 01, 2021
  10. Oct 21, 2021
  11. Oct 20, 2021
  12. Sep 20, 2021
    • Wuttke, Joachim's avatar
      Initialize item and item parameter tags in header files. · 2a33f913
      Wuttke, Joachim authored
      import edtools as et
      import re
      
      def user_edit_pair(fname_stem, th, tc):
      
          data = []
          mm = re.finditer('const QString (\w+)::([MPT]_[A-Z0-9_]+) = "(.+?)";', tc)
          for m in mm:
              data.append([m.group(1), m.group(2), m.group(3)])
          mm = re.finditer('const QString (\w+)::([MPT]_[A-Z0-9_]+)\("(.+?)"\);', tc)
          for m in mm:
              data.append([m.group(1), m.group(2), m.group(3)])
      
          for cname, typ, label in data:
              rlabel = re.sub(r'\[', r'\\[', label)
              rlabel = re.sub(r'\]', r'\\]', rlabel)
              rlabel = re.sub(r'\(', r'\\(', rlabel)
              rlabel = re.sub(r'\)', r'\\)', rlabel)
              tc = re.sub('\n+const QString '+cname+'::'+typ+' =\s+"'+rlabel+'";', '', tc)
              tc = re.sub('\n+const QString '+cname+'::'+typ+'\("'+rlabel+'"\);', '', tc)
              th = re.sub(r'class( BA_CORE_API_)? ('+cname+r'.+?)static const QString '+typ+r';(.*?\n};)',
                          r'class \2static constexpr auto '+typ+r'{"'+label+r'"};\3', th, 0, re.S)
      
          return th, tc
      
      et.ed_argfilepairs(user_edit_pair)
      2a33f913
  13. Aug 18, 2021
    • Matthias Puchner's avatar
      do not use MaterialItemProperty to access material identifier · 19f280e9
      Matthias Puchner authored
      instead use ItemWithMaterial. This makes the handling more understandable and as a second effect reduces code complexity
      
      and:
      * use concrete types like ItemWithMaterial* instead of SessionItem*
      * use QVector instead std::deque + QVector to simplify code
      * remove now obsolete code
      * adapt unit tests
      19f280e9
  14. Jul 09, 2021
  15. Jul 08, 2021
  16. Jun 30, 2021
  17. Jun 28, 2021
  18. May 26, 2021
Loading