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

Nepomuk

kratingwidget.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Nepomuk KDE project.
00003  * Copyright (C) 2006-2007 Sebastian Trueg <trueg@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef KRATINGWIDGET_H
00022 #define KRATINGWIDGET_H
00023 
00024 #include <QtGui/QFrame>
00025 
00026 #include "nepomuk_export.h"
00027 
00038 class NEPOMUK_EXPORT KRatingWidget : public QFrame
00039 {
00040     Q_OBJECT
00041 
00042  public:
00046     KRatingWidget( QWidget* parent = 0 );
00047 
00051     ~KRatingWidget();
00052 
00056     unsigned int rating() const;
00057 
00061     int maxRating() const;
00062 
00068     Qt::Alignment alignment() const;
00069 
00077     Qt::LayoutDirection layoutDirection() const;
00078 
00084     int spacing() const;
00085 
00086     QSize sizeHint() const;
00087 
00095     bool halfStepsEnabled() const;
00096 
00103     QIcon icon() const;
00104 
00105  Q_SIGNALS:
00110     void ratingChanged( unsigned int rating );
00111     void ratingChanged( int rating );
00112 
00113  public Q_SLOTS:
00118     void setRating( int rating );
00119 
00123     KDE_DEPRECATED void setRating( unsigned int rating );
00124 
00130     void setMaxRating( int max );
00131 
00135     KDE_DEPRECATED void setMaxRating( unsigned int max );
00136 
00141     void setHalfStepsEnabled( bool enabled );
00142 
00146     KDE_DEPRECATED void setOnlyPaintFullSteps( bool );
00147 
00151     void setSpacing( int );
00152 
00157     void setAlignment( Qt::Alignment align );
00158 
00162     void setLayoutDirection( Qt::LayoutDirection direction );
00163 
00167     void setIcon( const QIcon& icon );
00168 
00172     void setCustomPixmap( const QPixmap& pixmap );
00173 
00180     KDE_DEPRECATED void setPixmap( const QPixmap& );
00181 
00187     void setPixmapSize( int size );
00188 
00189  protected:
00190     void mousePressEvent( QMouseEvent* e );
00191     void mouseMoveEvent( QMouseEvent* e );
00192     void leaveEvent( QEvent* e );
00193     void paintEvent( QPaintEvent* e );
00194     void resizeEvent( QResizeEvent* e );
00195 
00196  private:
00197     class Private;
00198     Private* const d;
00199 };
00200 
00201 #endif

Nepomuk

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal