madvancedlistitem.h   madvancedlistitem.h 
skipping to change at line 32 skipping to change at line 32
#include <MListItem> #include <MListItem>
class MAdvancedListItemPrivate; class MAdvancedListItemPrivate;
class MImageWidget; class MImageWidget;
class MLabel; class MLabel;
class MProgressIndicator; class MProgressIndicator;
class QGraphicsGridLayout; class QGraphicsGridLayout;
/*!
\class MAdvancedListItem
\brief MAdvancedListItem implementation of an advanced widget which can
be used with MList.
\ingroup widgets
\section MAdvancedListItem Overview
MAdvancedListItem can show one line of text, a main icon, one or two ic
ons on the side, and
a progress indicator.
Exact layout depends on the style and can be set in:
\li MAdvancedListItem(MAdvancedListItem::ItemStyle, QGraphicsItem)
\li setItemStyle(ItemStyle)
Title and main icon and can be set using following functions:
\li setImageWidget()
\li setTitle()
\section MAdvancedListItem Customizing appearance
MAdvancedListItem appearance can be customized in 2 ways.
Title, main icon, two side icons and progress indicator are using style
s provided by common layout.
\li title - CommonTitle depending on the item style.
\li icon - CommonMainIcon
\li sideTopIcon - CommonSubIconTop
\li sideBottomIcon - CommonSubIconBottom
\li progressIndicator - CommonProgressBar
Another way is to inherit MAdvancedListItem and override:
\li createLayout()
\li clearLayout()
*/
class M_CORE_EXPORT MAdvancedListItem : public MListItem class M_CORE_EXPORT MAdvancedListItem : public MListItem
{ {
Q_OBJECT Q_OBJECT
/*!
\property MAdvancedListItem::title
\brief Contains title text.
*/
Q_PROPERTY(QString title READ title WRITE setTitle) Q_PROPERTY(QString title READ title WRITE setTitle)
/*! /*!
\deprecated please use imageWidget property \deprecated please use imageWidget property
*/ */
Q_PROPERTY(MImageWidget* imagewidget READ imageWidget WRITE setImageWid get) Q_PROPERTY(MImageWidget* imagewidget READ imageWidget WRITE setImageWid get)
/*! /*!
\deprecated please use sideTopImageWidget property \deprecated please use sideTopImageWidget property
*/ */
Q_PROPERTY(MImageWidget* sideTopImage READ sideTopImageWidget) Q_PROPERTY(MImageWidget* sideTopImage READ sideTopImageWidget)
/*! /*!
\deprecated please use sideBottomImageWidget property \deprecated please use sideBottomImageWidget property
*/ */
Q_PROPERTY(MImageWidget* sideBottomImage READ sideBottomImageWidget) Q_PROPERTY(MImageWidget* sideBottomImage READ sideBottomImageWidget)
/*!
\property MAdvancedListItem::imageWidget
\brief Contains main icon image widget.
*/
Q_PROPERTY(MImageWidget* imageWidget READ imageWidget WRITE setImageWid get) Q_PROPERTY(MImageWidget* imageWidget READ imageWidget WRITE setImageWid get)
/*!
\property MAdvancedListItem::sideTopImageWidget
\brief Contains side top icon image widget.
*/
Q_PROPERTY(MImageWidget* sideTopImageWidget READ sideTopImageWidget) Q_PROPERTY(MImageWidget* sideTopImageWidget READ sideTopImageWidget)
/*!
\property MAdvancedListItem::sideBottomImageWidget
\brief Contains side bottom icon icon widget.
*/
Q_PROPERTY(MImageWidget* sideBottomImageWidget READ sideBottomImageWidg et) Q_PROPERTY(MImageWidget* sideBottomImageWidget READ sideBottomImageWidg et)
/*!
\property MAdvancedListItem::progressIndicator
\brief Contains progress indicator widget.
*/
Q_PROPERTY(MProgressIndicator* progressIndicator READ progressIndicator ) Q_PROPERTY(MProgressIndicator* progressIndicator READ progressIndicator )
public: public:
/*!
\brief Specifies layout of MAdvancedListItem
*/
enum ItemStyle { enum ItemStyle {
/*!
\brief Defines style which contains title, main icon, two icons o
n the side of the item.
and a progress indicator.
*/
IconWithTitleProgressIndicatorAndTwoSideIcons, IconWithTitleProgressIndicatorAndTwoSideIcons,
/*!
\brief Defines style which contains title, main icon, one top ico
n on the side of the item.
and a progress indicator that is expanded to take the place
of bottom icon.
*/
IconWithTitleProgressIndicatorAndTopSideIcon IconWithTitleProgressIndicatorAndTopSideIcon
}; };
public: public:
/*!
\brief MAdvancedListItem constructor.
\param style The style of item to be initialized with, defaults to MA
dvancedListItem::IconWithTitleProgressIndicatorAndTwoSideIcons.
\param parent The item parent.
\sa MAdvancedListItem::ItemStyle
\sa MAdvancedListItem::setItemStyle()
*/
MAdvancedListItem(ItemStyle itemStyle = IconWithTitleProgressIndicatorA ndTwoSideIcons, QGraphicsItem *parent = 0); MAdvancedListItem(ItemStyle itemStyle = IconWithTitleProgressIndicatorA ndTwoSideIcons, QGraphicsItem *parent = 0);
virtual ~MAdvancedListItem(); virtual ~MAdvancedListItem();
/*! /*!
\deprecated The method is no longer required to be called after const ructing the item. \deprecated The method is no longer required to be called after const ructing the item.
There shouldn't be any need for this function. There shouldn't be any need for this function.
*/ */
void initLayout(); void initLayout();
/*!
\brief Sets item style.
\sa MAdvancedListItem::ItemStyle
\sa MAdvancedListItem::itemStyle()
*/
void setItemStyle(ItemStyle itemStyle); void setItemStyle(ItemStyle itemStyle);
/*!
\brief Returns current item style.
\sa MAdvancedListItem::setItemStyle()
*/
ItemStyle itemStyle() const; ItemStyle itemStyle() const;
/*!
\brief Sets the item title text.
\sa MAdvancedListItem::title()
*/
void setTitle(const QString &title); void setTitle(const QString &title);
/*!
\brief Returns the item title text.
\sa MAdvancedListItem::setTitle()
*/
QString title(); QString title();
/*!
\brief Sets item main icon widget. Ownership is transfered to the ite
m.
\sa MAdvancedListItem::imageWidget()
*/
void setImageWidget(MImageWidget *imageWidget); void setImageWidget(MImageWidget *imageWidget);
/*!
\brief Creates or returns already created pointer to an items main ic
on widget.
\sa MAdvancedListItem::setImageWidget()
*/
MImageWidget *imageWidget(); MImageWidget *imageWidget();
/*!
\brief Creates or returns already created pointer to an items progres
s indicator.
*/
MProgressIndicator *progressIndicator(); MProgressIndicator *progressIndicator();
/*!
\brief Creates or returns already created pointer to an items top sid
e icon widget.
*/
MImageWidget *sideTopImageWidget(); MImageWidget *sideTopImageWidget();
/*!
\brief Creates or returns already created pointer to an items bottom
side icon widget.
*/
MImageWidget *sideBottomImageWidget(); MImageWidget *sideBottomImageWidget();
protected: protected:
/*!
\brief Creates or returns already created title label widget.
\sa MAdvancedListItem::setTitle()
\sa MAdvancedListItem::title()
*/
MLabel * titleLabelWidget(); MLabel * titleLabelWidget();
/*!
\brief Returns layout which will be assigned to MAdvancedListItem.
Can be called several times, so it should clear layout which was alre
ady created.
\sa MAdvancedListItem::titleLabelWidget()
\sa MAdvancedListItem::imageWidget()
\sa MAdvancedListItem::sideTopImageWidget()
\sa MAdvancedListItem::sideBottomImageWidget()
\sa MAdvancedListItem::progressIndicator()
*/
virtual QGraphicsLayout *createLayout(); virtual QGraphicsLayout *createLayout();
/*!
\brief Clears layout created by createLayout() function.
*/
virtual void clearLayout(); virtual void clearLayout();
//! \internal
virtual void resizeEvent(QGraphicsSceneResizeEvent *event); virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
//! \internal_end
private: private:
Q_DECLARE_PRIVATE(MAdvancedListItem) Q_DECLARE_PRIVATE(MAdvancedListItem)
MAdvancedListItemPrivate *d_ptr; MAdvancedListItemPrivate *d_ptr;
}; };
#endif //MADVACEDLISTITEM_H #endif //MADVACEDLISTITEM_H
 End of changes. 24 change blocks. 
0 lines changed or deleted 151 lines changed or added


 mnavigationbar.h   mnavigationbar.h 
skipping to change at line 94 skipping to change at line 94
\brief Returns the current mode of the escape button. \brief Returns the current mode of the escape button.
\sa MNavigationBarModel::EscapeButtonModeEnum \sa MNavigationBarModel::EscapeButtonModeEnum
*/ */
MNavigationBarModel::EscapeButtonModeEnum escapeButtonMode() const; MNavigationBarModel::EscapeButtonModeEnum escapeButtonMode() const;
/*! /*!
\brief Returns true if escape button is enabled. \brief Returns true if escape button is enabled.
*/ */
bool escapeButtonEnabled() const; bool escapeButtonEnabled() const;
/*!
\brief Returns true if escape button is visible.
*/
bool escapeButtonVisible() const;
public Q_SLOTS: public Q_SLOTS:
/** \brief Trigger notification of the user via the navigation bar. /** \brief Trigger notification of the user via the navigation bar.
* *
* This slot asks the NavigationBarView to notify the user, e.g. * This slot asks the NavigationBarView to notify the user, e.g.
* by flashing the Home button. * by flashing the Home button.
*/ */
void notifyUser(); void notifyUser();
/** \brief Dock a toolbar. /** \brief Dock a toolbar.
* \param toolbar The toolbar to dock. * \param toolbar The toolbar to dock.
skipping to change at line 141 skipping to change at line 146
\brief Sets the mode of the escape button. \brief Sets the mode of the escape button.
\sa MNavigationBarModel::EscapeButtonModeEnum \sa MNavigationBarModel::EscapeButtonModeEnum
*/ */
void setEscapeButtonMode(MNavigationBarModel::EscapeButtonModeEnum newM ode); void setEscapeButtonMode(MNavigationBarModel::EscapeButtonModeEnum newM ode);
/*! /*!
\brief Enables or disables escape button. \brief Enables or disables escape button.
*/ */
void setEscapeButtonEnabled(bool enabled); void setEscapeButtonEnabled(bool enabled);
/*!
\brief Sets the visibility of escape button.
*/
void setEscapeButtonVisible(bool visible);
Q_SIGNALS: Q_SIGNALS:
//! \brief viewmenuButton was clicked //! \brief viewmenuButton was clicked
void viewmenuTriggered(); void viewmenuTriggered();
/*! /*!
\brief Signal emitted when the escape button in back mode is clicke d. \brief Signal emitted when the escape button in back mode is clicke d.
\sa MNavigationBar::escapeButtonMode \sa MNavigationBar::escapeButtonMode
*/ */
void backButtonClicked(); void backButtonClicked();
 End of changes. 2 change blocks. 
0 lines changed or deleted 10 lines changed or added


 mnavigationbarmodel.h   mnavigationbarmodel.h 
skipping to change at line 51 skipping to change at line 51
private: private:
M_MODEL_PROPERTY(bool, notifyUser, NotifyUser, true, false) M_MODEL_PROPERTY(bool, notifyUser, NotifyUser, true, false)
M_MODEL_PROPERTY(QString, viewMenuDescription, ViewMenuDescription, tru e, "Menu") M_MODEL_PROPERTY(QString, viewMenuDescription, ViewMenuDescription, tru e, "Menu")
M_MODEL_PROPERTY(QString, viewMenuIconID, ViewMenuIconID, true, QString ()) M_MODEL_PROPERTY(QString, viewMenuIconID, ViewMenuIconID, true, QString ())
M_MODEL_PROPERTY(bool, progressIndicatorVisible, ProgressIndicatorVisib le, true, false) M_MODEL_PROPERTY(bool, progressIndicatorVisible, ProgressIndicatorVisib le, true, false)
M_MODEL_PROPERTY(bool, arrowIconVisible, ArrowIconVisible, true, false) M_MODEL_PROPERTY(bool, arrowIconVisible, ArrowIconVisible, true, false)
M_MODEL_PTR_PROPERTY(MToolBar *, toolBar, ToolBar, true, 0) M_MODEL_PTR_PROPERTY(MToolBar *, toolBar, ToolBar, true, 0)
M_MODEL_PROPERTY(MNavigationBarModel::EscapeButtonModeEnum, escapeButto nMode, EscapeButtonMode, true, M_MODEL_PROPERTY(MNavigationBarModel::EscapeButtonModeEnum, escapeButto nMode, EscapeButtonMode, true,
MNavigationBarModel::EscapeButtonClose) MNavigationBarModel::EscapeButtonClose)
M_MODEL_PROPERTY(bool, escapeButtonEnabled, EscapeButtonEnabled, true, true) M_MODEL_PROPERTY(bool, escapeButtonEnabled, EscapeButtonEnabled, true, true)
M_MODEL_PROPERTY(bool, escapeButtonVisible, EscapeButtonVisible, true, true)
}; };
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 morientationtracker.h   morientationtracker.h 
skipping to change at line 64 skipping to change at line 64
private: private:
MOrientationTracker(); MOrientationTracker();
virtual ~MOrientationTracker(); virtual ~MOrientationTracker();
Q_DISABLE_COPY(MOrientationTracker) Q_DISABLE_COPY(MOrientationTracker)
Q_DECLARE_PRIVATE(MOrientationTracker) Q_DECLARE_PRIVATE(MOrientationTracker)
friend class MDeviceProfile; friend class MDeviceProfile;
friend class MApplicationPrivate; friend class MApplicationPrivate;
friend class MWindow; friend class MWindow;
//! \reimp
virtual void childEvent(QChildEvent *event);
//! \reimp_end
#ifdef UNIT_TEST
friend class Ut_MOrientationTracker;
#endif
}; };
//! \internal_end //! \internal_end
#endif // MORIENTATIONTRACKER_H #endif // MORIENTATIONTRACKER_H
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added


 mpannablewidget.h   mpannablewidget.h 
skipping to change at line 218 skipping to change at line 218
*/ */
virtual void setPanDirection(const Qt::Orientations &panDirection); virtual void setPanDirection(const Qt::Orientations &panDirection);
/*! /*!
* \brief Returns the enabled panning directions. * \brief Returns the enabled panning directions.
* *
* A panning direction is enabled if the policy of panning for * A panning direction is enabled if the policy of panning for
* that direction is either PanningAlwaysOn or PanningAsNeeded. * that direction is either PanningAlwaysOn or PanningAsNeeded.
* *
* By default, the panning is enabled in Qt::Vertical direction. * By default, the panning is enabled in Qt::Vertical direction.
*
* \deprecated Please use const version instead. Since 0.20.50
*/ */
Qt::Orientations panDirection(); Qt::Orientations panDirection();
/*! /*!
* \brief Returns the enabled panning directions.
*
* A panning direction is enabled if the policy of panning for
* that direction is either PanningAlwaysOn or PanningAsNeeded.
*
* By default, the panning is enabled in Qt::Vertical direction.
*/
Qt::Orientations panDirection() const;
/*!
* \brief Deprecated since 0.20 * \brief Deprecated since 0.20
*/ */
void setPanThreshold(qreal value); void setPanThreshold(qreal value);
/*! /*!
* \brief Deprecated since 0.20. * \brief Deprecated since 0.20.
*/ */
qreal panThreshold(); qreal panThreshold();
//! \reimp //! \reimp
 End of changes. 2 change blocks. 
0 lines changed or deleted 12 lines changed or added


 mprogressindicatorbarview.h   mprogressindicatorbarview.h 
skipping to change at line 86 skipping to change at line 86
*/ */
MProgressIndicatorBarView(MProgressIndicator *controller); MProgressIndicatorBarView(MProgressIndicator *controller);
/*! /*!
\brief Destructor \brief Destructor
*/ */
virtual ~MProgressIndicatorBarView(); virtual ~MProgressIndicatorBarView();
private Q_SLOTS: private Q_SLOTS:
/*!
\brief Called when underlying controller object visibility changed
*/
void visibilityChangedSlot(); void visibilityChangedSlot();
/*!
\brief Called when underlying progress bar animation is resumed (when
progressbar enters display)
*/
void resumeAnimation(); void resumeAnimation();
/*!
\brief Called when underlying progress bar animation is paused (when
progressbar exits display)
*/
void pauseAnimation(); void pauseAnimation();
protected: protected:
//! \reimp //! \reimp
/*!
* Draws the contents for this view.
*/
virtual void drawContents(QPainter *painter, const QStyleOptionGraphics Item *option) const; virtual void drawContents(QPainter *painter, const QStyleOptionGraphics Item *option) const;
/*!
\brief Updates MSpinnerView class instance when current model is ch
anged.
*/
virtual void setupModel(); virtual void setupModel();
/*!
\brief Updates MProgressIndicatorBarView class instance when curren
t style is changed.
Called when MProgressIndicatorStyle class instance is changed (usua
lly)
during initialization.
*/
virtual void applyStyle();
/*!
\brief Called when underlying controller object is resized
*/
virtual void resizeEvent(QGraphicsSceneResizeEvent *event); virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
/*!
\brief Called when direction of layout containing underlying controll
er changed (LTR / RTL order)
*/
virtual void changeEvent(QEvent *event); virtual void changeEvent(QEvent *event);
//! \reimp_end
MProgressIndicatorBarViewPrivate *const d_ptr; MProgressIndicatorBarViewPrivate *const d_ptr;
protected Q_SLOTS: protected Q_SLOTS:
//! \reimp /*!
\brief Updates MSpinnerView class instance when some component
of underlying model is modified.
\param modifications List containing the names of modified model co
mponents.
*/
virtual void updateData(const QList<const char *>& modifications); virtual void updateData(const QList<const char *>& modifications);
//! \reimp_end
private: private:
Q_DISABLE_COPY(MProgressIndicatorBarView) Q_DISABLE_COPY(MProgressIndicatorBarView)
Q_DECLARE_PRIVATE(MProgressIndicatorBarView) Q_DECLARE_PRIVATE(MProgressIndicatorBarView)
#ifdef M_TEST_CLASS #ifdef M_TEST_CLASS
M_TEST_CLASS M_TEST_CLASS
#endif #endif
}; };
 End of changes. 10 change blocks. 
3 lines changed or deleted 46 lines changed or added


 mprogressindicatorstyle.h   mprogressindicatorstyle.h 
skipping to change at line 41 skipping to change at line 41
*/ */
class M_VIEWS_EXPORT MProgressIndicatorStyle : public MWidgetStyle class M_VIEWS_EXPORT MProgressIndicatorStyle : public MWidgetStyle
{ {
Q_OBJECT Q_OBJECT
M_STYLE(MProgressIndicatorStyle) M_STYLE(MProgressIndicatorStyle)
/*! /*!
\property MProgressIndicatorStyle::progressBarBackground \property MProgressIndicatorStyle::progressBarBackground
\brief Background image of the progress bar. \brief Background image of the progress bar.
*/ */
M_STYLE_PTR_ATTRIBUTE(MScalableImage *, progressBarBackground, Progress BarBackground) M_STYLE_PTR_ATTRIBUTE(MScalableImage*, progressBarBackground, ProgressB arBackground)
/*! /*!
\property MProgressIndicatorStyle::speed \property MProgressIndicatorStyle::speed
\brief Speed of unknown duration progress animation (distance/sec). \brief Speed of unknown duration progress animation (distance/sec).
*/ */
M_STYLE_ATTRIBUTE(int, speed, Speed) M_STYLE_ATTRIBUTE(int, speed, Speed)
/*! /*!
\property MProgressIndicatorStyle::activeElementCount \property MProgressIndicatorStyle::activeElementCount
\brief The number of active elements in circular progress indicator (unknown duration). \brief The number of active elements in circular progress indicator (unknown duration).
skipping to change at line 105 skipping to change at line 105
M_STYLE_PTR_ATTRIBUTE(MScalableImage*, knownBarTexture, KnownBarTexture ) M_STYLE_PTR_ATTRIBUTE(MScalableImage*, knownBarTexture, KnownBarTexture )
/*! /*!
\property MProgressIndicator::knownBarTextureTiled \property MProgressIndicator::knownBarTextureTiled
\brief tiled if true, horizontally stretched otherwise. \brief tiled if true, horizontally stretched otherwise.
*/ */
M_STYLE_ATTRIBUTE(bool, knownBarTextureTiled, KnownBarTextureTiled) M_STYLE_ATTRIBUTE(bool, knownBarTextureTiled, KnownBarTextureTiled)
/*! /*!
\property MProgressIndicator::refreshRate \property MProgressIndicator::refreshRate
\brief Refresh rate of unknown duration progress bar (interval betw een frames in msec, e.g. 50). \brief Refresh rate (fps) of unknown duration progress bar
*/ */
M_STYLE_ATTRIBUTE(int, refreshRate, RefreshRate) M_STYLE_ATTRIBUTE(int, refreshRate, RefreshRate)
}; };
/*! /*!
\class MProgressIndicatorStyleContainer \class MProgressIndicatorStyleContainer
\brief This class groups all the styling modes for progress indicator. \brief This class groups all the styling modes for progress indicator.
\ingroup styles \ingroup styles
\sa MProgressIndicatorStyle \sa MProgressIndicatorStyle
*/ */
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 mscenemanager.h   mscenemanager.h 
skipping to change at line 329 skipping to change at line 329
Q_PRIVATE_SLOT(d_func(), void _q_setSenderGeometry()) Q_PRIVATE_SLOT(d_func(), void _q_setSenderGeometry())
Q_PRIVATE_SLOT(d_func(), void _q_changeGlobalOrientationAngle()) Q_PRIVATE_SLOT(d_func(), void _q_changeGlobalOrientationAngle())
Q_PRIVATE_SLOT(d_func(), void _q_emitOrientationChangeFinished()) Q_PRIVATE_SLOT(d_func(), void _q_emitOrientationChangeFinished())
Q_PRIVATE_SLOT(d_func(), void _q_unFreezeUI()) Q_PRIVATE_SLOT(d_func(), void _q_unFreezeUI())
Q_PRIVATE_SLOT(d_func(), void _q_applySceneWindowTransitionsQueuedDueTo OrientationAnimation()) Q_PRIVATE_SLOT(d_func(), void _q_applySceneWindowTransitionsQueuedDueTo OrientationAnimation())
Q_PRIVATE_SLOT(d_func(), void _q_triggerAsyncPendingOrientationChange() ) Q_PRIVATE_SLOT(d_func(), void _q_triggerAsyncPendingOrientationChange() )
Q_PRIVATE_SLOT(d_func(), void _q_applyPendingOrientationChange()) Q_PRIVATE_SLOT(d_func(), void _q_applyPendingOrientationChange())
Q_PRIVATE_SLOT(d_func(), void _q_onPageSwitchAnimationFinished()) Q_PRIVATE_SLOT(d_func(), void _q_onPageSwitchAnimationFinished())
Q_PRIVATE_SLOT(d_func(), void _q_dislocateSceneWindow(MSceneWindow *, Q PointF)) Q_PRIVATE_SLOT(d_func(), void _q_dislocateSceneWindow(MSceneWindow *, Q PointF))
Q_PRIVATE_SLOT(d_func(), void _q_undoSceneWindowDislocation(MSceneWindo w *sceneWindow)) Q_PRIVATE_SLOT(d_func(), void _q_undoSceneWindowDislocation(MSceneWindo w *sceneWindow))
Q_PRIVATE_SLOT(d_func(), void _q_updateRootElementsPositions())
#ifdef Q_WS_X11 #ifdef Q_WS_X11
Q_PRIVATE_SLOT(d_func(), void _q_updateDecoratorButtonsProperty()) Q_PRIVATE_SLOT(d_func(), void _q_updateDecoratorButtonsProperty())
#endif #endif
}; };
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 mstylablewidget.h   mstylablewidget.h 
skipping to change at line 72 skipping to change at line 72
/*! /*!
\class MStylableWidget \class MStylableWidget
\brief MStylableWidget is a convenience class to create simple, non-MVC widgets. \brief MStylableWidget is a convenience class to create simple, non-MVC widgets.
MStylableWidget class implements basic functionality to support MStylableWidget class implements basic functionality to support
simple, non-MVC widgets which can be stylable at the same time. simple, non-MVC widgets which can be stylable at the same time.
In order to use it, a new class should be inherited from MStylableWidge t In order to use it, a new class should be inherited from MStylableWidge t
and M_STYLABLE_WIDGET macro should be used to define the style and the M_STYLABLE_WIDGET macro should be used to define the style
class for this widget: class for this widget.
The Q_OBJECT macro must be used too.
\code \code
class MyStylableClass : public MStylableWidget class MyStylableClass : public MStylableWidget
{ {
Q_OBJECT
M_STYLABLE_WIDGET(MyStyle)
public: public:
MyStylableClass(); MyStylableClass();
protected: protected:
// Method to be overridden for custom painting operations. // Method to be overridden for custom painting operations.
virtual void drawContents(QPainter* painter, const QStyleOption GraphicsItem* option) const; virtual void drawContents(QPainter* painter, const QStyleOption GraphicsItem* option) const;
private:
M_STYLABLE_WIDGET(MyStyle)
}; };
\endcode \endcode
MyStyle class should follow typical style declaration: MyStyle class should follow typical style declaration:
\code \code
#include <MWidgetStyle> #include <MWidgetStyle>
class M_CORE_EXPORT MyStyle : public MWidgetStyle class M_CORE_EXPORT MyStyle : public MWidgetStyle
{ {
Q_OBJECT Q_OBJECT
 End of changes. 3 change blocks. 
4 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/