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

KNewStuff

imagepreviewwidget.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2010 Frederik Gladhorn <gladhorn@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Lesser General Public
00006     License as published by the Free Software Foundation; either
00007     version 2.1 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public
00015     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00018 #ifndef KNEWSTUFF3_UI_IMAGEPREVIEWWIDGET_H
00019 #define KNEWSTUFF3_UI_IMAGEPREVIEWWIDGET_H
00020 
00021 #include <QtGui/QWidget>
00022 #include <QtGui/QImage>
00023 
00024 namespace KNS3 {
00025 
00026 class ImagePreviewWidget : public QWidget
00027 {
00028     Q_OBJECT
00029 public:
00030     explicit ImagePreviewWidget(QWidget *parent = 0);
00031 
00032     void setImage(const QImage& preview);
00033 
00034     virtual QSize sizeHint() const;
00035     
00036 signals:
00037     void clicked();
00038 
00039 protected:
00040     virtual void paintEvent(QPaintEvent* event);
00041     virtual void resizeEvent(QResizeEvent* event);
00042     virtual void mousePressEvent(QMouseEvent* event);
00043     
00044 private:
00045     QImage m_image;
00046     QImage m_scaledImage;
00047     QPixmap m_frameImage;
00048 };
00049 
00050 }
00051 
00052 #endif // IMAGEPREVIEWWIDGET_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 20:57:20 by doxygen 1.8.0 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.8.3 API Reference

Skip menu "kdelibs-4.8.3 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