diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2009-10-25 14:49:13 +0100 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2009-10-25 14:49:13 +0100 |
commit | ee95b665f335c966c80335c94a934d7a69b02be0 (patch) | |
tree | ad49963121a49e2da900a28fc47a3a2390508899 /src/previewimage.h | |
parent | Fixing "Global" vs "standard" shortcuts. (diff) | |
download | rekonq-ee95b665f335c966c80335c94a934d7a69b02be0.tar.xz |
A better preview implementation:
WebSnap doesn't render borders/background => borders/background not cached => style can be actualized easily.
PreviewImage uses a label for display the background and an other label inside for display preview or animation.
Diffstat (limited to 'src/previewimage.h')
-rw-r--r-- | src/previewimage.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/previewimage.h b/src/previewimage.h index d7f4d2aa..e9504210 100644 --- a/src/previewimage.h +++ b/src/previewimage.h @@ -49,44 +49,49 @@ class PreviewImage : public QWidget public: PreviewImage(const QUrl &url, const QString &title, int index, bool isFavorite); ~PreviewImage(); - + QString guessNameFromUrl(QUrl url); - + public slots: void snapFinished(); void removeMe(); void setUrlFromAction(); void refreshPreview(); - + protected: void contextMenuEvent(QContextMenuEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); - + void loadUrlPreview(const QUrl &url); KActionMenu *historyMenu(); void showEmptyPreview(); - + private: void checkTitle(); - + QPixmap renderBackground(int w, int h, int t, int b, int l, int r); + QPixmap m_pixmap; WebSnap *ws; - + QString m_savePath; bool loadingSnapshot; - + QUrl m_url; QString m_title; bool m_isFavorite; int m_index; - + QToolButton *m_button; - + QLabel *m_imageLabel; QLabel *m_textLabel; + QLabel *m_backgroundLabel; + QLabel *m_previewLabel; + + QSize m_size; }; #endif // PREVIEW_IMAGE_H |