//
//     Copyright 2008 Simon Edwards <simon@simonzone.com>

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.



%ModuleHeaderCode
//ctscc
#include <nepomuk/kmetadatatagcloud.h>
#include <nepomuk/kmetadatatagwidget.h>
#include <nepomuk/kratingwidget.h>
#include <nepomuk/ktagcloudwidget.h>
#include <nepomuk/ktagdisplaywidget.h>
#include <nepomuk/nepomukservice.h>
#include <nepomuk/resourcemanager.h>
%End

class KRatingWidget : QFrame
{
%TypeHeaderCode
#include <nepomuk/kratingwidget.h>
%End

public:
                            KRatingWidget (QWidget* parent /TransferThis/ = 0);
    unsigned int            rating () const;
    int                     maxRating () const;
    Qt::Alignment           alignment () const;
    Qt::LayoutDirection     layoutDirection () const;
    int                     spacing () const;
    QSize                   sizeHint () const;
    bool                    halfStepsEnabled () const;
    QIcon                   icon () const;

signals:
//ig    void                    ratingChanged (unsigned int rating);
    void                    ratingChanged (int rating);

public:
    void                    setRating (int rating);
//ig    void                    setRating (unsigned int rating);
    void                    setMaxRating (int max);
//ig    void                    setMaxRating (unsigned int max);
    void                    setHalfStepsEnabled (bool enabled);
    void                    setOnlyPaintFullSteps (bool);
    void                    setSpacing (int);
    void                    setAlignment (Qt::Alignment align);
    void                    setLayoutDirection (Qt::LayoutDirection direction);
    void                    setIcon (const QIcon& icon);
    void                    setCustomPixmap (const QPixmap& pixmap);
    void                    setPixmap (const QPixmap&);
    void                    setPixmapSize (int size);

protected:
    void                    mousePressEvent (QMouseEvent* e);
    void                    mouseMoveEvent (QMouseEvent* e);
    void                    leaveEvent (QEvent* e);
    void                    paintEvent (QPaintEvent* e);
    void                    resizeEvent (QResizeEvent* e);

public:

//  Subclasses of QObject

%ConvertToSubClassCode

    sipClass = NULL;

    if (dynamic_cast<KRatingWidget*>(sipCpp))
        sipClass = sipClass_KRatingWidget;
    else if (dynamic_cast<KTagCloudWidget*>(sipCpp))
        {
            sipClass = sipClass_KTagCloudWidget;
            if (dynamic_cast<Nepomuk::TagCloud*>(sipCpp))
                sipClass = sipClass_Nepomuk_TagCloud;
        }
    else if (dynamic_cast<KTagDisplayWidget*>(sipCpp))
        sipClass = sipClass_KTagDisplayWidget;
    else if (dynamic_cast<Nepomuk::ResourceManager*>(sipCpp))
        sipClass = sipClass_Nepomuk_ResourceManager;
    else if (dynamic_cast<Nepomuk::Service*>(sipCpp))
        sipClass = sipClass_Nepomuk_Service;
    else if (dynamic_cast<Nepomuk::TagWidget*>(sipCpp))
        sipClass = sipClass_Nepomuk_TagWidget;
%End

};   // KRatingWidget


