• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KNewStuff

  • knewstuff
  • knewstuff3
  • ui
imagepreviewwidget.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2010 Frederik Gladhorn <gladhorn@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef KNEWSTUFF3_UI_IMAGEPREVIEWWIDGET_H
19#define KNEWSTUFF3_UI_IMAGEPREVIEWWIDGET_H
20
21#include <QtGui/QWidget>
22#include <QtGui/QImage>
23
24namespace KNS3 {
25
26class ImagePreviewWidget : public QWidget
27{
28 Q_OBJECT
29public:
30 explicit ImagePreviewWidget(QWidget *parent = 0);
31
32 void setImage(const QImage& preview);
33
34 virtual QSize sizeHint() const;
35
36signals:
37 void clicked();
38
39protected:
40 virtual void paintEvent(QPaintEvent* event);
41 virtual void resizeEvent(QResizeEvent* event);
42 virtual void mousePressEvent(QMouseEvent* event);
43
44private:
45 QImage m_image;
46 QImage m_scaledImage;
47 QPixmap m_frameImage;
48};
49
50}
51
52#endif // IMAGEPREVIEWWIDGET_H
KNS3::ImagePreviewWidget
Definition: imagepreviewwidget.h:27
KNS3::ImagePreviewWidget::setImage
void setImage(const QImage &preview)
Definition: imagepreviewwidget.cpp:38
KNS3::ImagePreviewWidget::clicked
void clicked()
KNS3::ImagePreviewWidget::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition: imagepreviewwidget.cpp:46
KNS3::ImagePreviewWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
Definition: imagepreviewwidget.cpp:52
KNS3::ImagePreviewWidget::paintEvent
virtual void paintEvent(QPaintEvent *event)
Definition: imagepreviewwidget.cpp:59
KNS3::ImagePreviewWidget::sizeHint
virtual QSize sizeHint() const
Definition: imagepreviewwidget.cpp:87
QWidget
KNS3
Definition: atticaprovider.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal