send_as_button.h 778 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "ui/widgets/buttons.h"
  9. #include "ui/effects/animations.h"
  10. namespace style {
  11. struct SendAsButton;
  12. } // namespace style
  13. namespace Ui {
  14. class SendAsButton final : public AbstractButton {
  15. public:
  16. SendAsButton(QWidget *parent, const style::SendAsButton &st);
  17. void setUserpic(QImage userpic);
  18. void setActive(bool active);
  19. private:
  20. void paintEvent(QPaintEvent *e) override;
  21. const style::SendAsButton &_st;
  22. Animations::Simple _activeAnimation;
  23. bool _active = false;
  24. QImage _userpic;
  25. };
  26. } // namespace Ui