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

KNewStuff

  • sources
  • kde-4.12
  • kdelibs
  • 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 
24 namespace KNS3 {
25 
26 class ImagePreviewWidget : public QWidget
27 {
28  Q_OBJECT
29 public:
30  explicit ImagePreviewWidget(QWidget *parent = 0);
31 
32  void setImage(const QImage& preview);
33 
34  virtual QSize sizeHint() const;
35 
36 signals:
37  void clicked();
38 
39 protected:
40  virtual void paintEvent(QPaintEvent* event);
41  virtual void resizeEvent(QResizeEvent* event);
42  virtual void mousePressEvent(QMouseEvent* event);
43 
44 private:
45  QImage m_image;
46  QImage m_scaledImage;
47  QPixmap m_frameImage;
48 };
49 
50 }
51 
52 #endif // IMAGEPREVIEWWIDGET_H
KNS3::ImagePreviewWidget::clicked
void clicked()
KNS3::ImagePreviewWidget::sizeHint
virtual QSize sizeHint() const
Definition: imagepreviewwidget.cpp:87
QWidget
KNS3::ImagePreviewWidget
Definition: imagepreviewwidget.h:26
KNS3::ImagePreviewWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
Definition: imagepreviewwidget.cpp:52
KNS3::ImagePreviewWidget::setImage
void setImage(const QImage &preview)
Definition: imagepreviewwidget.cpp:38
KNS3::ImagePreviewWidget::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition: imagepreviewwidget.cpp:46
KNS3::ImagePreviewWidget::ImagePreviewWidget
ImagePreviewWidget(QWidget *parent=0)
Definition: imagepreviewwidget.cpp:29
QSize
KNS3::ImagePreviewWidget::paintEvent
virtual void paintEvent(QPaintEvent *event)
Definition: imagepreviewwidget.cpp:59
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:48 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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