| mbasicsheetheader.h | | mbasicsheetheader.h | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 39 | |
| /*! | | /*! | |
| \class MBasicSheetHeader | | \class MBasicSheetHeader | |
| \brief A basic header for MSheet | | \brief A basic header for MSheet | |
| | | | |
| MBasicSheetHeader is a basic header that you can conveniently use as the | | MBasicSheetHeader is a basic header that you can conveniently use as the | |
| header widget of your MSheet. | | header widget of your MSheet. | |
| | | | |
| Its default view provides a button for a negative or neutral action in it
s | | Its default view provides a button for a negative or neutral action in it
s | |
| left corner, a button for a positive action in its right corner and an | | left corner, a button for a positive action in its right corner and an | |
| optional progress indicator (of unknown duration, a.k.a a spinner) in its
middle. | | optional progress indicator (of unknown duration, a.k.a a spinner) in its
middle. | |
|
| | | | |
| | | Common usage: | |
| | | \code | |
| | | MySheet::MySheet() : MSheet() { | |
| | | MBasicSheetHeader *sheetHeader = new MBasicSheetHeader; | |
| | | | |
| | | sheetHeader->setPositiveAction(new QAction("Done", sheetHeader)); | |
| | | connect(sheetHeader->positiveAction(), SIGNAL(triggered()), SLOT(don | |
| | | e())); | |
| | | | |
| | | sheetHeader->setNegativeAction(new QAction("Cancel", sheetHeader)); | |
| | | connect(sheetHeader->negativeAction(), SIGNAL(triggered()), SLOT(can | |
| | | cel())); | |
| | | | |
| | | setHeaderWidget(sheetHeader); | |
| | | } | |
| | | \endcode | |
| */ | | */ | |
| class M_CORE_EXPORT MBasicSheetHeader : public MWidgetController | | class M_CORE_EXPORT MBasicSheetHeader : public MWidgetController | |
| { | | { | |
| Q_OBJECT | | Q_OBJECT | |
| M_CONTROLLER(MBasicSheetHeader) | | M_CONTROLLER(MBasicSheetHeader) | |
| | | | |
| /*! | | /*! | |
| \property MBasicSheetHeader::progressIndicatorVisible | | \property MBasicSheetHeader::progressIndicatorVisible | |
| \brief Defines whether a progress indicator should be shown | | \brief Defines whether a progress indicator should be shown | |
| | | | |
| It true, a progress indicator with unknown duration (such as a spinn
er) will be | | It true, a progress indicator with unknown duration (such as a spinn
er) will be | |
| displayed in the center of the header (for its default view). Use it
to hint the | | displayed in the center of the header (for its default view). Use it
to hint the | |
| user that some process is ongoing or that the sheet is waiting for s
omething to | | user that some process is ongoing or that the sheet is waiting for s
omething to | |
| complete. | | complete. | |
| | | | |
| By default, this property is false. | | By default, this property is false. | |
| | | | |
| Set it with setProgressIndicatorVisible() and get its current value
with | | Set it with setProgressIndicatorVisible() and get its current value
with | |
| isProgressIndicatorVisible(). | | isProgressIndicatorVisible(). | |
|
| | | | |
| Common usage: | | | |
| \code | | | |
| MySheet::MySheet() : MSheet() { | | | |
| MBasicSheetHeader *sheetHeader = new MBasicSheetHeader; | | | |
| | | | |
| sheetHeader->setPositiveAction(new QAction("Done", sheetHeader)) | | | |
| ; | | | |
| connect(sheetHeader->positiveAction(), SIGNAL(triggered()), SLOT | | | |
| (done())); | | | |
| | | | |
| sheetHeader->setNegativeAction(new QAction("Cancel", sheetHeader | | | |
| )); | | | |
| connect(sheetHeader->negativeAction(), SIGNAL(triggered()), SLOT | | | |
| (cancel())); | | | |
| | | | |
| setHeaderWidget(sheetHeader); | | | |
| } | | | |
| \endcode | | | |
| */ | | */ | |
| Q_PROPERTY(bool progressIndicatorVisible READ isProgressIndicatorVisibl
e WRITE setProgressIndicatorVisible) | | Q_PROPERTY(bool progressIndicatorVisible READ isProgressIndicatorVisibl
e WRITE setProgressIndicatorVisible) | |
| | | | |
| public: | | public: | |
| MBasicSheetHeader(QGraphicsItem *parent = 0); | | MBasicSheetHeader(QGraphicsItem *parent = 0); | |
| virtual ~MBasicSheetHeader(); | | virtual ~MBasicSheetHeader(); | |
| | | | |
| /*! | | /*! | |
| \brief Sets the positive action | | \brief Sets the positive action | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 19 lines changed or deleted | | 17 lines changed or added | |
|
| mcontainerstyle.h | | mcontainerstyle.h | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| #include <QSize> | | #include <QSize> | |
| | | | |
| class M_VIEWS_EXPORT MContainerStyle : public MWidgetStyle | | class M_VIEWS_EXPORT MContainerStyle : public MWidgetStyle | |
| { | | { | |
| Q_OBJECT | | Q_OBJECT | |
| M_STYLE(MContainerStyle) | | M_STYLE(MContainerStyle) | |
| | | | |
| M_STYLE_ATTRIBUTE(QSize, iconSize, IconSize) | | M_STYLE_ATTRIBUTE(QSize, iconSize, IconSize) | |
| M_STYLE_ATTRIBUTE(int, internalMargins, InternalMargins) | | M_STYLE_ATTRIBUTE(int, internalMargins, InternalMargins) | |
| M_STYLE_ATTRIBUTE(int, internalItemSpacing, InternalItemSpac
ing) | | M_STYLE_ATTRIBUTE(int, internalItemSpacing, InternalItemSpac
ing) | |
|
| | | M_STYLE_ATTRIBUTE(QString, separatorStyleName, SeparatorStyleNa
me) | |
| M_STYLE_ATTRIBUTE(QString, headerStyleName, HeaderStyleName) | | M_STYLE_ATTRIBUTE(QString, headerStyleName, HeaderStyleName) | |
| M_STYLE_ATTRIBUTE(QString, titleStyleName, TitleStyleName) | | M_STYLE_ATTRIBUTE(QString, titleStyleName, TitleStyleName) | |
| M_STYLE_ATTRIBUTE(QString, progressIndicatorStyleName, ProgressIndicato
rStyleName) | | M_STYLE_ATTRIBUTE(QString, progressIndicatorStyleName, ProgressIndicato
rStyleName) | |
| }; | | }; | |
| | | | |
| class M_VIEWS_EXPORT MContainerStyleContainer : public MWidgetStyleContaine
r | | class M_VIEWS_EXPORT MContainerStyleContainer : public MWidgetStyleContaine
r | |
| { | | { | |
| M_STYLE_CONTAINER(MContainerStyle) | | M_STYLE_CONTAINER(MContainerStyle) | |
| }; | | }; | |
| | | | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| mlocale.h | | mlocale.h | |
| | | | |
| skipping to change at line 315 | | skipping to change at line 315 | |
| * </tr> | | * </tr> | |
| * <tr> | | * <tr> | |
| * <td>zh_CN\@collation=stroke;calendar=chinese</td> | | * <td>zh_CN\@collation=stroke;calendar=chinese</td> | |
| * <td>zh</td> | | * <td>zh</td> | |
| * <td></td> | | * <td></td> | |
| * <td>CN</td> | | * <td>CN</td> | |
| * <td></td> | | * <td></td> | |
| * <td>collation=stroke;calendar=chinese</td> | | * <td>collation=stroke;calendar=chinese</td> | |
| * <td>Simplified Chinese with sorting via stroke-count and Chinese c
alendar</td> | | * <td>Simplified Chinese with sorting via stroke-count and Chinese c
alendar</td> | |
| * </tr> | | * </tr> | |
|
| * </tr> | | | |
| * </table> | | * </table> | |
| * | | * | |
| * \sa MLocale(QObject *parent) | | * \sa MLocale(QObject *parent) | |
| */ | | */ | |
| explicit MLocale(const QString &localeName, QObject *parent = 0); | | explicit MLocale(const QString &localeName, QObject *parent = 0); | |
| MLocale(const MLocale &other, QObject *parent = 0); | | MLocale(const MLocale &other, QObject *parent = 0); | |
| | | | |
| virtual ~MLocale(); | | virtual ~MLocale(); | |
| | | | |
| MLocale &operator=(const MLocale &other); | | MLocale &operator=(const MLocale &other); | |
| | | | |
| skipping to change at line 841 | | skipping to change at line 840 | |
| * \sa language() | | * \sa language() | |
| * \sa script() | | * \sa script() | |
| * \sa country() | | * \sa country() | |
| * \sa variant() | | * \sa variant() | |
| */ | | */ | |
| QString name() const; | | QString name() const; | |
| | | | |
| /*! | | /*! | |
| * \brief Returns the text direction of the locale | | * \brief Returns the text direction of the locale | |
| * | | * | |
|
| | | * This function unfortunately has a confusing name, it is not the | |
| | | * direction of a certain amount of text, which is detected by | |
| | | * directionForText(const QString &text). For a purely Arabic text | |
| | | * for example, directionForText() will always return | |
| | | * Qt::RightToLeft no matter what the current locale is (it is a | |
| | | * static function, thus independent of the current locale, the | |
| | | * result only depends on th text given as an argument). | |
| | | * | |
| | | * This function here actually returns the <b>layout direction</b> | |
| | | * for the current locale. | |
| | | * | |
| | | * The layout direction of the QApplication is set to what | |
| | | * textDirection() returns for the system default locale | |
| | | * (which can be set with setDefault(const MLocale &locale)). | |
| | | * | |
| | | * The layout direction returned here used to be Qt::RightToLeft | |
| | | * for locales which use RTL scripts (e.g. Arabic, Hebrew, ...) | |
| | | * and Qt::LeftToRight for locales which use LTR scripts (e.g. | |
| | | * English, Chinese, Russian, ...) | |
| | | * | |
| | | * Now this has changed because it has been requested to disable | |
| | | * layout reversal by default, therefore this function will | |
| | | * <b>always</b> return Qt::LeftToRight by default now, even for | |
| | | * locales with RTL scripts like Arabic or Hebrew. | |
| | | * | |
| | | * This new behaviour can be overridden by setting the option | |
| | | * “layout-direction” in the full locale name. | |
| | | * “layout-direction=rtl” forces right-to-left layout direction | |
| | | * “layout-direction=ltr” forces left-to-right layout direction | |
| | | * and “layout-direction=auto” sets the layout direction to the | |
| | | * direction of the script used by the locale, i.e. | |
| | | * “layout-direction=auto” reproduces the previous behaviour. | |
| | | * | |
| | | * Examples: | |
| | | * | |
| | | * <table border="1"> | |
| | | * <caption> | |
| | | * <big><b> | |
| | | * Examples for locale names and layout reversal behaviour | |
| | | * </b></big> | |
| | | * </caption> | |
| | | * <tr> | |
| | | * <th>Locale ID</th> | |
| | | * <th>textDirection()</th> | |
| | | * <th>defaultLayoutDirection()</th> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>ar_EG</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>ar_EG\@layout-direction=ltr</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>ar_EG\@layout-direction=rtl</td> | |
| | | * <td>Qt::RightToLeft</td> | |
| | | * <td>Qt::RightToLeft</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>ar_EG\@layout-direction=auto</td> | |
| | | * <td>Qt::RightToLeft</td> | |
| | | * <td>Qt::LayoutDirectionAuto</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>en_US</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>en_US\@layout-direction=ltr</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>en_US\@layout-direction=rtl</td> | |
| | | * <td>Qt::RightToLeft</td> | |
| | | * <td>Qt::RightToLeft</td> | |
| | | * </tr> | |
| | | * <tr> | |
| | | * <td>en_US\@layout-direction=auto</td> | |
| | | * <td>Qt::LeftToRight</td> | |
| | | * <td>Qt::LayoutDirectionAuto</td> | |
| | | * </tr> | |
| | | * </table> | |
| | | * | |
| | | * \sa defaultLayoutDirection() | |
| * \sa directionForText() | | * \sa directionForText() | |
|
| | | * \sa setDefault(const MLocale &locale) | |
| */ | | */ | |
| Qt::LayoutDirection textDirection() const; | | Qt::LayoutDirection textDirection() const; | |
| | | | |
| /*! | | /*! | |
| * \brief Returns the language code of the locale category in ISO-639 f
ormat | | * \brief Returns the language code of the locale category in ISO-639 f
ormat | |
| * | | * | |
| * same as language(), only for a specific category. | | * same as language(), only for a specific category. | |
| * | | * | |
| * \sa categoryName() | | * \sa categoryName() | |
| * \sa categoryScript() | | * \sa categoryScript() | |
| | | | |
| skipping to change at line 1758 | | skipping to change at line 1847 | |
| * | | * | |
| * If the text is empty or if it only contains digits, whitespace, | | * If the text is empty or if it only contains digits, whitespace, | |
| * punctuation characters or other characters with no strong text | | * punctuation characters or other characters with no strong text | |
| * direction, this function returns Qt::LayoutDirectionAuto. | | * direction, this function returns Qt::LayoutDirectionAuto. | |
| * | | * | |
| * Notice that this will only work well for plain text; rich text | | * Notice that this will only work well for plain text; rich text | |
| * might contain markup tags (e.g., \<b\>) that might also be | | * might contain markup tags (e.g., \<b\>) that might also be | |
| * detected as having a meaningful text direction. | | * detected as having a meaningful text direction. | |
| * | | * | |
| * \sa textDirection() const | | * \sa textDirection() const | |
|
| | | * \sa defaultLayoutDirection() | |
| */ | | */ | |
| static Qt::LayoutDirection directionForText(const QString & text); | | static Qt::LayoutDirection directionForText(const QString & text); | |
| | | | |
|
| | | /*! | |
| | | * \brief Static method to obtain the layout direction of the default l | |
| | | ocale | |
| | | * | |
| | | * This returns the layout direction of the system default locale, | |
| | | * i.e. of the locale which has been set with setDefault(). | |
| | | * | |
| | | * See the longer explanation at textDirection() for what layout | |
| | | * direction is returned depending on the locale id. | |
| | | * | |
| | | * \sa textDirection() const | |
| | | * \sa directionForText(const QString & text) | |
| | | * \sa setDefault(const MLocale &locale) | |
| | | */ | |
| | | static Qt::LayoutDirection defaultLayoutDirection(); | |
| | | | |
| Q_SIGNALS: | | Q_SIGNALS: | |
| void settingsChanged(); | | void settingsChanged(); | |
| /*! | | /*! | |
| * \brief Signal emitted when the default system locale changes. | | * \brief Signal emitted when the default system locale changes. | |
| */ | | */ | |
| void localeSettingsChanged(); | | void localeSettingsChanged(); | |
| | | | |
| protected: | | protected: | |
| | | | |
| /*! | | /*! | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 107 lines changed or added | |
|
| mlocalebuckets.h | | mlocalebuckets.h | |
| | | | |
| skipping to change at line 198 | | skipping to change at line 198 | |
| | | | |
| /*! | | /*! | |
| * \brief Return the original index of an item | | * \brief Return the original index of an item | |
| * | | * | |
| * This returns the original index from the list passed in the construc
tor | | * This returns the original index from the list passed in the construc
tor | |
| * of an item that is now sorted into bucket no. 'bucketIndex'. See als
o | | * of an item that is now sorted into bucket no. 'bucketIndex'. See als
o | |
| * the example in the intro of this class. | | * the example in the intro of this class. | |
| * | | * | |
| * If there is no item at that position, -1 is returned. | | * If there is no item at that position, -1 is returned. | |
| * | | * | |
|
| | | * If during the life time of this MLocaleBuckets object any items are | |
| | | * removed with removeBucketItems(), the original index of each item th | |
| | | at | |
| | | * came after the removed item is decremented accordingly, just as if t | |
| | | he | |
| | | * item was removed from the original items list set with setItems() or | |
| | | in | |
| | | * the constructor. | |
| | | * | |
| * \param bucketIndex index of the bucket. | | * \param bucketIndex index of the bucket. | |
| * \param indexInBucket index within the bucket. Each bucket starts wit
h 0. | | * \param indexInBucket index within the bucket. Each bucket starts wit
h 0. | |
| */ | | */ | |
| int origItemIndex(int bucketIndex, int indexInBucket) const; | | int origItemIndex(int bucketIndex, int indexInBucket) const; | |
| | | | |
| /*! | | /*! | |
| * \brief Return the bucket size for the specified bucket index, i.e. t
he | | * \brief Return the bucket size for the specified bucket index, i.e. t
he | |
| * number of items in that bucket. | | * number of items in that bucket. | |
| * | | * | |
| * This returns -1 if there is no bucket with that index. | | * This returns -1 if there is no bucket with that index. | |
| | | | |
| skipping to change at line 226 | | skipping to change at line 232 | |
| | | | |
| /*! | | /*! | |
| * \brief Clear this MLocaleBuckets object: Remove all items and all | | * \brief Clear this MLocaleBuckets object: Remove all items and all | |
| * buckets. | | * buckets. | |
| * | | * | |
| * This is equivalent to setting an empty items list. | | * This is equivalent to setting an empty items list. | |
| */ | | */ | |
| void clear(); | | void clear(); | |
| | | | |
| /*! | | /*! | |
|
| * \brief Removes range of items from bucket. | | * \brief Remove a range of items from bucket. | |
| | | * | |
| | | * This removes 'count' items from the bucket 'bucketIndex', starting w | |
| | | ith | |
| | | * index 'indexInBucket' inside that bucket. | |
| | | * | |
| | | * This returns 'true' if the bucket is empty afterwards (i.e., it shou | |
| | | ld | |
| | | * be removed), 'false' otherwise. | |
| | | * | |
| | | * The original indices of items (origItemIndex()) will be decremented | |
| | | * accordingly, just as if the items were removed from the QStringList | |
| | | * passed in the constructor or in setItems(). | |
| */ | | */ | |
|
| void removeBucketItems(int bucketIndex, int itemIndex, int count = 1); | | bool removeBucketItems(int bucketIndex, int indexInBucket, int count=1) | |
| | | ; | |
| | | | |
| | | /*! | |
| | | * \brief Remove a bucket if it is empty. | |
| | | * | |
| | | * This should be done after removeBucketItems() returned true. The | |
| | | * rationale why removeBucketItems() doesn't do this automatically is | |
| | | * because SortFilterProxyModels that are attached to a model that uses | |
| | | * MLocaleBuckets will get very confused if toplevel items disappear | |
| | | * because the items below them were removed. | |
| | | * | |
| | | * If the bucket is not empty, this function does nothing. | |
| | | */ | |
| | | void removeEmptyBucket(int bucketIndex); | |
| | | | |
| /*! | | /*! | |
| * \brief Copies buckets and bucket items from the other reference. | | * \brief Copies buckets and bucket items from the other reference. | |
| */ | | */ | |
| MLocaleBuckets& operator =(const MLocaleBuckets &other); | | MLocaleBuckets& operator =(const MLocaleBuckets &other); | |
| | | | |
| private: | | private: | |
| Q_DECLARE_PRIVATE(MLocaleBuckets) | | Q_DECLARE_PRIVATE(MLocaleBuckets) | |
| | | | |
| MLocaleBucketsPrivate *const d_ptr; | | MLocaleBucketsPrivate *const d_ptr; | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 37 lines changed or added | |
|
| msettingslanguagegroup.h | | msettingslanguagegroup.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| ** License version 2.1 as published by the Free Software Foundation | | ** License version 2.1 as published by the Free Software Foundation | |
| ** and appearing in the file LICENSE.LGPL included in the packaging | | ** and appearing in the file LICENSE.LGPL included in the packaging | |
| ** of this file. | | ** of this file. | |
| ** | | ** | |
| ***************************************************************************
*/ | | ***************************************************************************
*/ | |
| | | | |
| #ifndef MSETTINGSLANGUAGEGROUP_H | | #ifndef MSETTINGSLANGUAGEGROUP_H | |
| #define MSETTINGSLANGUAGEGROUP_H | | #define MSETTINGSLANGUAGEGROUP_H | |
| | | | |
| #include "msettingslanguagenode.h" | | #include "msettingslanguagenode.h" | |
|
| | | #include <QString> | |
| | | | |
| //! \internal | | //! \internal | |
| /*! | | /*! | |
| * \brief A settings node representing a group of setting items. | | * \brief A settings node representing a group of setting items. | |
| * | | * | |
| * A group can contain one or more setting items. | | * A group can contain one or more setting items. | |
| */ | | */ | |
| class MSettingsLanguageGroup : public MSettingsLanguageNode | | class MSettingsLanguageGroup : public MSettingsLanguageNode | |
| { | | { | |
| public: | | public: | |
| /*! | | /*! | |
| * Constructor. | | * Constructor. | |
|
| | | * \param title the title of the group. | |
| */ | | */ | |
|
| MSettingsLanguageGroup() {} | | MSettingsLanguageGroup(const QString &title); | |
| | | | |
|
| virtual ~MSettingsLanguageGroup() {} | | /*! | |
| | | * Destructor | |
| | | */ | |
| | | virtual ~MSettingsLanguageGroup(); | |
| | | | |
| | | /*! | |
| | | * Returns the localized title of this group. | |
| | | */ | |
| | | QString title() const; | |
| | | | |
| | | private: | |
| | | //! The title of this object. | |
| | | QString title_; | |
| }; | | }; | |
| //! \internal_end | | //! \internal_end | |
| | | | |
| #endif // MSETTINGSLANGUAGEGROUP_H | | #endif // MSETTINGSLANGUAGEGROUP_H | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 16 lines changed or added | |
|
| msettingslanguageselection.h | | msettingslanguageselection.h | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| * A selection has a predefined set of options. | | * A selection has a predefined set of options. | |
| * | | * | |
| * A selection contains \link MSettingsLanguageOption \endlink nodes. | | * A selection contains \link MSettingsLanguageOption \endlink nodes. | |
| */ | | */ | |
| class MSettingsLanguageSelection : public MSettingsLanguageNode | | class MSettingsLanguageSelection : public MSettingsLanguageNode | |
| { | | { | |
| public: | | public: | |
| /*! | | /*! | |
| * Constructs a new selection with a given key. | | * Constructs a new selection with a given key. | |
| * \param key the key (name) of the selection. | | * \param key the key (name) of the selection. | |
|
| | | * \param title the title of the selection. | |
| */ | | */ | |
|
| MSettingsLanguageSelection(const QString &key); | | MSettingsLanguageSelection(const QString &key, const QString &title); | |
| | | | |
| /*! | | /*! | |
| * Destructor. | | * Destructor. | |
| */ | | */ | |
| virtual ~MSettingsLanguageSelection(); | | virtual ~MSettingsLanguageSelection(); | |
| | | | |
| /*! | | /*! | |
| * Returns the key of this selection. | | * Returns the key of this selection. | |
| */ | | */ | |
| QString key() const; | | QString key() const; | |
| | | | |
| /*! | | /*! | |
|
| | | * Returns the localized title of this text node. | |
| | | */ | |
| | | QString title() const; | |
| | | | |
| | | /*! | |
| * Adds a new option to this selection. | | * Adds a new option to this selection. | |
| * \param title the title for the new option. | | * \param title the title for the new option. | |
| * \param value the value for the new option. | | * \param value the value for the new option. | |
| * \return the newly constructed option object. | | * \return the newly constructed option object. | |
| * \sa MSettingsLanguageOption | | * \sa MSettingsLanguageOption | |
| */ | | */ | |
| MSettingsLanguageOption *addOption(const QString &title, int value); | | MSettingsLanguageOption *addOption(const QString &title, int value); | |
| | | | |
| /*! | | /*! | |
| * Adds a new option to this selection. This version of the method | | * Adds a new option to this selection. This version of the method | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 96 | |
| uint numOptions() const; | | uint numOptions() const; | |
| | | | |
| /*! | | /*! | |
| * Returns the MSettingsLanguageOption child nodes that this node has. | | * Returns the MSettingsLanguageOption child nodes that this node has. | |
| */ | | */ | |
| QList<const MSettingsLanguageOption *> options() const; | | QList<const MSettingsLanguageOption *> options() const; | |
| | | | |
| private: | | private: | |
| //! The key (name) of this object. | | //! The key (name) of this object. | |
| QString _key; | | QString _key; | |
|
| | | //! The title of this object. | |
| | | QString _title; | |
| }; | | }; | |
| //! \internal_end | | //! \internal_end | |
| | | | |
| #endif // MSETTINGSLANGUAGESELECTION_H | | #endif // MSETTINGSLANGUAGESELECTION_H | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 9 lines changed or added | |
|
| msettingslanguagesettingsfactory.h | | msettingslanguagesettingsfactory.h | |
| | | | |
| skipping to change at line 31 | | skipping to change at line 31 | |
| #define MSETTINGSLANGUAGESETTINGSFACTORY_H_ | | #define MSETTINGSLANGUAGESETTINGSFACTORY_H_ | |
| | | | |
| #include <QObject> | | #include <QObject> | |
| | | | |
| class QGraphicsLinearLayout; | | class QGraphicsLinearLayout; | |
| class MWidgetController; | | class MWidgetController; | |
| class MDataStore; | | class MDataStore; | |
| class MSettingsLanguageNode; | | class MSettingsLanguageNode; | |
| class MSettingsLanguageSettings; | | class MSettingsLanguageSettings; | |
| class MSettingsLanguageWidget; | | class MSettingsLanguageWidget; | |
|
| class MLinearLayoutPolicy; | | class QGraphicsLinearLayout; | |
| | | | |
| //! \internal | | //! \internal | |
| /*! | | /*! | |
| * A factory for translating settings binaries to widgets. | | * A factory for translating settings binaries to widgets. | |
| */ | | */ | |
| class MSettingsLanguageSettingsFactory | | class MSettingsLanguageSettingsFactory | |
| { | | { | |
| /*! | | /*! | |
| * Private constructor to prevent construction. | | * Private constructor to prevent construction. | |
| */ | | */ | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 61 | |
| * \param dataStore the data store for the settings. | | * \param dataStore the data store for the settings. | |
| * \return a widget. | | * \return a widget. | |
| */ | | */ | |
| static MWidgetController *createWidget(const MSettingsLanguageSettings
&settingsItem, MSettingsLanguageWidget &rootWidget, MDataStore *dataStore =
NULL); | | static MWidgetController *createWidget(const MSettingsLanguageSettings
&settingsItem, MSettingsLanguageWidget &rootWidget, MDataStore *dataStore =
NULL); | |
| | | | |
| private: | | private: | |
| | | | |
| /*! | | /*! | |
| * Creates child widgets to a layout from a MSettingsLanguageNode repre
sentation. | | * Creates child widgets to a layout from a MSettingsLanguageNode repre
sentation. | |
| * | | * | |
|
| * \param layoutPolicy the layout policy where widgets are added. | | * \param layout the layout where widgets are added. | |
| * \param node the nodes binary representation. | | * \param node the nodes binary representation. | |
| * \param rootWidget the root of the widget hierarchy where the new widg
et will be attached. | | * \param rootWidget the root of the widget hierarchy where the new widg
et will be attached. | |
| * \param dataStore the data store for the settings. | | * \param dataStore the data store for the settings. | |
| */ | | */ | |
|
| static void createChildren(MLinearLayoutPolicy &layoutPolicy, const MSe
ttingsLanguageNode &node, MSettingsLanguageWidget &rootWidget, MDataStore *
dataStore); | | static void createChildren(QGraphicsLinearLayout *layout, const MSettin
gsLanguageNode &node, MSettingsLanguageWidget &rootWidget, MDataStore *data
Store); | |
| }; | | }; | |
| //! \internal_end | | //! \internal_end | |
| | | | |
| #endif /* MSETTINGSLANGUAGESETTINGSFACTORY_H_ */ | | #endif /* MSETTINGSLANGUAGESETTINGSFACTORY_H_ */ | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|