mbuttoniconstyle.h | mbuttoniconstyle.h | |||
---|---|---|---|---|
skipping to change at line 38 | skipping to change at line 38 | |||
\ingroup styles | \ingroup styles | |||
\sa MButtonIconStyleContainer MWidgetStyle MButtonStyle \ref styling MB utton MButtonIconView | \sa MButtonIconStyleContainer MWidgetStyle MButtonStyle \ref styling MB utton MButtonIconView | |||
*/ | */ | |||
class M_VIEWS_EXPORT MButtonIconStyle : public MButtonStyle | class M_VIEWS_EXPORT MButtonIconStyle : public MButtonStyle | |||
{ | { | |||
Q_OBJECT | Q_OBJECT | |||
M_STYLE_INTERNAL(MButtonIconStyle) | M_STYLE_INTERNAL(MButtonIconStyle) | |||
/*! | /*! | |||
\property MButtonStyle::contentOpacity | \deprecated Property was added to MButtonStyle. | |||
\brief Content opacity. | ||||
*/ | */ | |||
M_STYLE_ATTRIBUTE(qreal, contentOpacity, contentOpacity) | M_STYLE_ATTRIBUTE(qreal, contentOpacity, contentOpacity) | |||
/*! | /*! | |||
\deprecated Not in use. | \deprecated Not in use. | |||
*/ | */ | |||
M_STYLE_ATTRIBUTE(QColor, glowColor, GlowColor) | M_STYLE_ATTRIBUTE(QColor, glowColor, GlowColor) | |||
/*! | /*! | |||
\deprecated Not in use. | \deprecated Not in use. | |||
*/ | */ | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added | |||
mbuttoniconview.h | mbuttoniconview.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
** | ** | |||
*************************************************************************** */ | *************************************************************************** */ | |||
#ifndef MBUTTONICONVIEW_H | #ifndef MBUTTONICONVIEW_H | |||
#define MBUTTONICONVIEW_H | #define MBUTTONICONVIEW_H | |||
#include "mbuttonview.h" | #include "mbuttonview.h" | |||
#include <mbuttonmodel.h> | #include <mbuttonmodel.h> | |||
#include <mbuttoniconstyle.h> | #include <mbuttoniconstyle.h> | |||
class MButtonIconViewPrivate; | ||||
class MButton; | class MButton; | |||
/*! | /*! | |||
\class MButtonIconView | \class MButtonIconView | |||
\brief View class for icon button. | \brief View class for icon button. | |||
\ingroup views | \ingroup views | |||
\section MButtonIconViewOverview Overview | \section MButtonIconViewOverview Overview | |||
MButtonIconView draws an icon and text similarly as MButtonView | MButtonIconView is used for drawing buttons without a background. | |||
using the same styling attributes. However this view adds some anim | The icon and the text are rendered similarly as in the MButtonView | |||
ations | using the same styling attributes. | |||
when interacting with a button: | ||||
- When pressing button down the content is drawn with style defined | ||||
opacity. | ||||
- When releasing button the icon and label opacity is reset. | ||||
* MButtonIconView supports the following CSS features: | ||||
* | ||||
* content-opacity (type: qreal e.g. 0.75) : sets the opacity of the icon a | ||||
nd text label<br> | ||||
\section MButtonIconViewInteractions Interactions | \section MButtonIconViewInteractions Interactions | |||
See \ref MButtonViewInteractions. | See \ref MButtonViewInteractions. | |||
\sa MButton MButtonView MButtonIconStyle | \sa MButton MButtonView MButtonIconStyle | |||
*/ | */ | |||
class M_VIEWS_EXPORT MButtonIconView : public MButtonView | class M_VIEWS_EXPORT MButtonIconView : public MButtonView | |||
{ | { | |||
Q_OBJECT | Q_OBJECT | |||
M_VIEW(MButtonModel, MButtonIconStyle) | M_VIEW(MButtonModel, MButtonIconStyle) | |||
skipping to change at line 72 | skipping to change at line 64 | |||
\param Pointer to the controller. | \param Pointer to the controller. | |||
*/ | */ | |||
MButtonIconView(MButton *controller); | MButtonIconView(MButton *controller); | |||
/*! | /*! | |||
\brief Destructs the view. | \brief Destructs the view. | |||
*/ | */ | |||
virtual ~MButtonIconView(); | virtual ~MButtonIconView(); | |||
protected: | protected: | |||
//! \reimp | //! \reimp | |||
virtual void drawContents(QPainter *painter, const QStyleOptionGraphics Item *option) const; | virtual void drawContents(QPainter *painter, const QStyleOptionGraphics Item *option) const; | |||
virtual void drawBackground(QPainter *painter, const QStyleOptionGraphi csItem *option) const; | virtual void drawBackground(QPainter *painter, const QStyleOptionGraphi csItem *option) const; | |||
virtual void applyStyle(); | virtual void applyStyle(); | |||
virtual void updateData(const QList<const char *>& modifications); | virtual void updateData(const QList<const char *>& modifications); | |||
//! \reimp_end | //! \reimp_end | |||
private: | private: | |||
Q_DISABLE_COPY(MButtonIconView) | Q_DISABLE_COPY(MButtonIconView) | |||
Q_DECLARE_PRIVATE(MButtonIconView) | ||||
#ifdef UNIT_TEST | #ifdef UNIT_TEST | |||
friend class Ut_MButtonIconView; | friend class Ut_MButtonIconView; | |||
#endif | #endif | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
16 lines changed or deleted | 4 lines changed or added | |||
mbuttonstyle.h | mbuttonstyle.h | |||
---|---|---|---|---|
skipping to change at line 157 | skipping to change at line 157 | |||
Empty space after bottom text boundary. | Empty space after bottom text boundary. | |||
*/ | */ | |||
M_STYLE_ATTRIBUTE(int, textMarginBottom, Tex tMarginBottom) | M_STYLE_ATTRIBUTE(int, textMarginBottom, Tex tMarginBottom) | |||
/*! | /*! | |||
\property MButtonStyle::pressTimeout | \property MButtonStyle::pressTimeout | |||
\brief timeout for button press. | \brief timeout for button press. | |||
*/ | */ | |||
M_STYLE_ATTRIBUTE(int, pressTimeout, PressTi meout) | M_STYLE_ATTRIBUTE(int, pressTimeout, PressTi meout) | |||
/*! | ||||
\property MButtonStyle::contentOpacity | ||||
\brief Content opacity. | ||||
*/ | ||||
M_STYLE_ATTRIBUTE(qreal, contentOpacity, contentOpacity) | ||||
}; | }; | |||
/*! | /*! | |||
\class MButtonStyleContainer | \class MButtonStyleContainer | |||
\brief Style mode container class for MButtonStyle. | \brief Style mode container class for MButtonStyle. | |||
\ingroup styles | \ingroup styles | |||
\sa MButtonStyle | \sa MButtonStyle | |||
*/ | */ | |||
class M_VIEWS_EXPORT MButtonStyleContainer : public MWidgetStyleContainer | class M_VIEWS_EXPORT MButtonStyleContainer : public MWidgetStyleContainer | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added | |||
mpositionindicatorstyle.h | mpositionindicatorstyle.h | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
#include <mwidgetstyle.h> | #include <mwidgetstyle.h> | |||
class QPixmap; | class QPixmap; | |||
class M_VIEWS_EXPORT MPositionIndicatorStyle : public MWidgetStyle | class M_VIEWS_EXPORT MPositionIndicatorStyle : public MWidgetStyle | |||
{ | { | |||
Q_OBJECT | Q_OBJECT | |||
M_STYLE(MPositionIndicatorStyle) | M_STYLE(MPositionIndicatorStyle) | |||
M_STYLE_PTR_ATTRIBUTE(MScalableImage *, indicatorImage, IndicatorImage) | M_STYLE_PTR_ATTRIBUTE(MScalableImage *, indicatorImage, IndicatorImage) | |||
M_STYLE_PTR_ATTRIBUTE(MScalableImage *, indicatorImageHorizontal, Indic | ||||
atorImageHorizontal) | ||||
M_STYLE_PTR_ATTRIBUTE(MScalableImage *, backgroundImageHorizontal, Back | ||||
groundImageHorizontal) | ||||
M_STYLE_ATTRIBUTE(int, minIndicatorSize, MinIndicatorSize) | M_STYLE_ATTRIBUTE(int, minIndicatorSize, MinIndicatorSize) | |||
M_STYLE_ATTRIBUTE(int, hideTimeout, HideTimeout) | M_STYLE_ATTRIBUTE(int, hideTimeout, HideTimeout) | |||
}; | }; | |||
class M_VIEWS_EXPORT MPositionIndicatorStyleContainer : public MWidgetStyle Container | class M_VIEWS_EXPORT MPositionIndicatorStyleContainer : public MWidgetStyle Container | |||
{ | { | |||
M_STYLE_CONTAINER(MPositionIndicatorStyle) | M_STYLE_CONTAINER(MPositionIndicatorStyle) | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added | |||