Home · All Classes · Main Classes · Deprecated

mbuttonview.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: Nokia Corporation (directui@nokia.com)
00006 **
00007 ** This file is part of libmeegotouch.
00008 **
00009 ** If you have questions regarding the use of this file, please contact
00010 ** Nokia at directui@nokia.com.
00011 **
00012 ** This library is free software; you can redistribute it and/or
00013 ** modify it under the terms of the GNU Lesser General Public
00014 ** License version 2.1 as published by the Free Software Foundation
00015 ** and appearing in the file LICENSE.LGPL included in the packaging
00016 ** of this file.
00017 **
00018 ****************************************************************************/
00019 
00020 #ifndef MBUTTONVIEW_H
00021 #define MBUTTONVIEW_H
00022 
00023 #include <mwidgetview.h>
00024 #include <mbuttonmodel.h>
00025 #include <mbuttonstyle.h>
00026 
00027 class MButtonViewPrivate;
00028 class MButtonViewTest;
00029 class MButton;
00030 
00031 class QGraphicsSceneResizeEvent;
00032 
00105 class M_VIEWS_EXPORT MButtonView : public MWidgetView
00106 {
00107     Q_OBJECT
00108     M_VIEW(MButtonModel, MButtonStyle)
00109 
00110 public:
00111 
00116     MButtonView(MButton *controller);
00117 
00121     virtual ~MButtonView();
00122 
00124     virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
00126 
00127 protected:
00128 
00130     virtual void drawContents(QPainter *painter, const QStyleOptionGraphicsItem *option) const;
00131     virtual void applyStyle();
00132     virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
00133     virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
00134     virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
00135     virtual void setupModel();
00136     virtual void cancelEvent(MCancelEvent *event);
00137     virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
00139 
00144     virtual void drawIcon(QPainter *painter, const QRectF &iconRect) const;
00145 
00147     MButtonView(MButtonViewPrivate &dd, MButton *controller);
00149 
00150 protected Q_SLOTS:
00152     virtual void updateData(const QList<const char *>& modifications);
00154 
00155 private:
00156     Q_DISABLE_COPY(MButtonView)
00157     Q_DECLARE_PRIVATE(MButtonView)
00158     Q_PRIVATE_SLOT(d_func(), void _q_applyQueuedStyleModeChange())
00159 
00160 #ifdef UNIT_TEST
00161     friend class Ut_MButtonView;
00162 #endif
00163 
00164 };
00165 
00166 #endif

Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:14:20 (PDT)
Doxygen 1.7.1
MeeGo Touch