frmimgshow.h 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef FRMIMGSHOW_H
  2. #define FRMIMGSHOW_H
  3. #include <QWidget>
  4. #include <QPushButton>
  5. #include <QLabel>
  6. #include <QHBoxLayout>
  7. #include <QVBoxLayout>
  8. #include <QToolButton>
  9. #include <QSpacerItem>
  10. #include <QNetworkAccessManager>
  11. #include <QNetworkRequest>
  12. #include <QUrl>
  13. #include <QNetworkReply>
  14. #include <QClipboard>
  15. #include <QGuiApplication>
  16. class FrmImgShow : public QWidget
  17. {
  18. Q_OBJECT
  19. public:
  20. explicit FrmImgShow(QString& url, QWidget *parent = nullptr);
  21. private:
  22. QLabel* labImg;
  23. QToolButton* btnCopy;
  24. QToolButton* btnDelete;
  25. QSpacerItem* horizenSpacer;
  26. QHBoxLayout* hLayout;
  27. QVBoxLayout* vLayout;
  28. QNetworkAccessManager* manager;
  29. QString url;
  30. protected:
  31. virtual bool eventFilter(QObject* watched, QEvent* event);
  32. private slots:
  33. void onFinished(QNetworkReply *reply);
  34. private:
  35. void initForm();
  36. void initWidget();
  37. void initManager();
  38. signals:
  39. };
  40. #endif // FRMIMGSHOW_H