PlayerGlobalInfo.cpp 847 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include "PlayerGlobalInfo.h"
  2. Image_QImage::Image_QImage()
  3. {
  4. width = 0;
  5. height = 0;
  6. /* 设置为RGB888 */
  7. image = QImage(1, 1, QImage::Format_RGB888);
  8. }
  9. /* 移动构造函数 */
  10. Image_QImage::Image_QImage(Image_QImage&& other)
  11. {
  12. width = other.width;
  13. height = other.height;
  14. image = std::move(other.image);
  15. }
  16. /* 拷贝构造函数 */
  17. Image_QImage::Image_QImage(const Image_QImage& other)
  18. {
  19. width = other.width;
  20. height = other.height;
  21. image = other.image;
  22. }
  23. /* 重载= */
  24. Image_QImage& Image_QImage::operator=(const Image_QImage& other)
  25. {
  26. width = other.width;
  27. height = other.height;
  28. image = other.image;
  29. return *this;
  30. }
  31. /* 移动幅值函数 */
  32. void Image_QImage::moveFrom(Image_QImage& other)
  33. {
  34. width = other.width;
  35. height = other.height;
  36. image = std::move(other.image);
  37. }