SLList.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*********************************************************************/
  2. /* */
  3. /* Copyright 2022-2023 Rémi Synave - remi.synave@univ-littoral.fr */
  4. /* */
  5. /* This file is part of DSL. */
  6. /* This software uses Qt to build the Graphical User Interface */
  7. /* https://www.qt.io/ */
  8. /* */
  9. /* DSL is free software: you can redistribute it and/or modify */
  10. /* it under the terms of the GNU General Public License as published */
  11. /* by the Free Software Foundation, either version 3 of the License, */
  12. /* or (at your option) any later version. */
  13. /* */
  14. /* DSL is distributed in the hope that it will be useful, */
  15. /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
  16. /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
  17. /* GNU General Public License for more details. */
  18. /* */
  19. /* You should have received a copy of the GNU General Public License */
  20. /* along with DSL. If not, see <http://www.gnu.org/licenses/>. */
  21. /* */
  22. /*********************************************************************/
  23. #ifndef SLLIST_HPP
  24. #define SLLIST_HPP
  25. #include <QPoint>
  26. #include <QImage>
  27. #include <QList>
  28. #include "StrengthLine.hpp"
  29. class SLList
  30. {
  31. private:
  32. QList < StrengthLine* > list;
  33. public:
  34. SLList (const char* file);
  35. SLList (std::string file) : SLList(file.c_str()){}
  36. SLList (QString file) : SLList(file.toStdString()){}
  37. inline unsigned int size() const{return list.size();}
  38. inline StrengthLine* get(unsigned int i) const{return list.at(i);}
  39. std::pair<double, int> distance_avg(SLList*, QImage*) const;
  40. };
  41. #endif