12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef FRMIMGSHOW_H
- #define FRMIMGSHOW_H
- #include <QWidget>
- #include <QPushButton>
- #include <QLabel>
- #include <QHBoxLayout>
- #include <QVBoxLayout>
- #include <QToolButton>
- #include <QSpacerItem>
- #include <QUrl>
- #include <QCheckBox>
- #include <QClipboard>
- #include <QApplication>
- #include <QGuiApplication>
- #include "tchttpservice.h"
- class FrmImgShow : public QWidget
- {
- Q_OBJECT
- public:
- explicit FrmImgShow(QWidget *parent = nullptr);
- void loadImage(const QUrl& imageUrl);
- void setImage(const QPixmap& pixmap);
- void setLoadingState(bool loading);
- void initSignalSlot();
- virtual QSize sizeHint();
- private:
- QLabel* labImg;
- // QLabel* labLoading;
- // QMovie* movieLoading;
- QPushButton* btnCopy;
- QPushButton* btnDelete;
- QSpacerItem* horizenSpacer;
- QHBoxLayout* hLayout;
- QCheckBox* ckbSelect;
- QVBoxLayout* vLayout;
- protected:
- virtual bool eventFilter(QObject* watched, QEvent* event);
- private slots:
- void onFinished(QNetworkReply *reply);
- private:
- void initForm();
- void initWidget();
- QString m_requestId;
- QUrl m_currentUrl;
- signals:
- void signal_imageSelected(QString);
- void signal_imageUnselected(QString);
- };
- #endif // FRMIMGSHOW_H
|