Changeset 64695 in vbox
- Timestamp:
- Nov 17, 2016 5:31:09 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
-
UIApplianceEditorWidget.cpp (modified) (3 diffs)
-
UIApplianceEditorWidget.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r64692 r64695 124 124 125 125 /** Returns the data stored under the given @a iRole for the item referred to by the @a iColumn. */ 126 virtual QVariant data(int iColumn, int iRole) const ;126 virtual QVariant data(int iColumn, int iRole) const /* override */; 127 127 128 128 /** Cache currently stored values, such as @a finalStates, @a finalValues and @a finalExtraValues. */ 129 virtual void putBack(QVector<BOOL> &finalStates, QVector<QString> &finalValues, QVector<QString> &finalExtraValues) ;129 virtual void putBack(QVector<BOOL> &finalStates, QVector<QString> &finalValues, QVector<QString> &finalExtraValues) /* override */; 130 130 131 131 private: 132 132 133 133 /** Holds the Virtual System Description. */ 134 CVirtualSystemDescription m_comDescription;134 CVirtualSystemDescription m_comDescription; 135 135 }; 136 136 … … 165 165 166 166 /** Returns the item flags for the given @a iColumn. */ 167 virtual Qt::ItemFlags itemFlags(int iColumn) const ;167 virtual Qt::ItemFlags itemFlags(int iColumn) const /* override */; 168 168 169 169 /** Defines the @a iRole data for the item at @a iColumn to @a value. */ 170 virtual bool setData(int iColumn, const QVariant &value, int iRole) ;170 virtual bool setData(int iColumn, const QVariant &value, int iRole) /* override */; 171 171 /** Returns the data stored under the given @a iRole for the item referred to by the @a iColumn. */ 172 virtual QVariant data(int iColumn, int iRole) const ;172 virtual QVariant data(int iColumn, int iRole) const /* override */; 173 173 174 174 /** Returns the widget used to edit the item specified by @a idx for editing. 175 175 * @param pParent Brings the parent to be assigned for newly created editor. 176 176 * @param styleOption Bring the style option set for the newly created editor. */ 177 virtual QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const ;177 virtual QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const /* override */; 178 178 179 179 /** Defines the contents of the given @a pEditor to the data for the item at the given @a idx. */ 180 virtual bool setEditorData(QWidget *pEditor, const QModelIndex &idx) const ;180 virtual bool setEditorData(QWidget *pEditor, const QModelIndex &idx) const /* override */; 181 181 /** Defines the data for the item at the given @a idx in the @a pModel to the contents of the given @a pEditor. */ 182 virtual bool setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &idx) ;182 virtual bool setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &idx) /* override */; 183 183 184 184 /** Restores the default values. */ 185 virtual void restoreDefaults() ;185 virtual void restoreDefaults() /* override */; 186 186 187 187 /** Cache currently stored values, such as @a finalStates, @a finalValues and @a finalExtraValues. */ 188 virtual void putBack(QVector<BOOL> &finalStates, QVector<QString> &finalValues, QVector<QString> &finalExtraValues) ;188 virtual void putBack(QVector<BOOL> &finalStates, QVector<QString> &finalValues, QVector<QString> &finalExtraValues) /* override */; 189 189 190 190 private: 191 191 192 192 /** Holds the Virtual System Description type. */ 193 KVirtualSystemDescriptionType m_enmType;193 KVirtualSystemDescriptionType m_enmType; 194 194 /** Holds something totally useless. */ 195 QString m_strRef;195 QString m_strRef; 196 196 /** Holds the original value. */ 197 QString m_strOrigValue;197 QString m_strOrigValue; 198 198 /** Holds the configuration value. */ 199 QString m_strConfigValue;199 QString m_strConfigValue; 200 200 /** Holds the default configuration value. */ 201 QString m_strConfigDefaultValue;201 QString m_strConfigDefaultValue; 202 202 /** Holds the extra configuration value. */ 203 QString m_strExtraConfigValue;203 QString m_strExtraConfigValue; 204 204 /** Holds the item check state. */ 205 Qt::CheckState m_checkState;205 Qt::CheckState m_checkState; 206 206 /** Holds whether item was modified. */ 207 bool m_fModified;207 bool m_fModified; 208 208 }; 209 209 … … 1294 1294 1295 1295 /* static */ 1296 int UIApplianceEditorWidget::m_minGuestRAM = -1;1297 int UIApplianceEditorWidget::m_maxGuestRAM = -1;1296 int UIApplianceEditorWidget::m_minGuestRAM = -1; 1297 int UIApplianceEditorWidget::m_maxGuestRAM = -1; 1298 1298 int UIApplianceEditorWidget::m_minGuestCPUCount = -1; 1299 1299 int UIApplianceEditorWidget::m_maxGuestCPUCount = -1; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h
r64692 r64695 61 61 class UIApplianceModel : public QAbstractItemModel 62 62 { 63 Q_OBJECT; 64 63 65 public: 64 66 … … 70 72 71 73 /** Returns the index of the item in the model specified by the given @a iRow, @a iColumn and @a parentIdx. */ 72 QModelIndex index(int iRow, int iColumn, const QModelIndex &parentIdx = QModelIndex()) const;74 virtual QModelIndex index(int iRow, int iColumn, const QModelIndex &parentIdx = QModelIndex()) const /* override */; 73 75 /** Returns the parent of the model item with the given @a idx. */ 74 QModelIndex parent(const QModelIndex &idx) const;76 virtual QModelIndex parent(const QModelIndex &idx) const /* override */; 75 77 76 78 /** Returns the number of rows for the children of the given @a parentIdx. */ 77 int rowCount(const QModelIndex &parentIdx = QModelIndex()) const;79 virtual int rowCount(const QModelIndex &parentIdx = QModelIndex()) const /* override */; 78 80 /** Returns the number of columns for the children of the given @a parentIdx. */ 79 int columnCount(const QModelIndex &parentIdx = QModelIndex()) const;81 virtual int columnCount(const QModelIndex &parentIdx = QModelIndex()) const /* override */; 80 82 81 83 /** Returns the item flags for the given @a idx. */ 82 Qt::ItemFlags flags(const QModelIndex &idx) const;84 virtual Qt::ItemFlags flags(const QModelIndex &idx) const /* override */; 83 85 /** Returns the data for the given @a iRole and @a iSection in the header with the specified @a enmOrientation. */ 84 QVariant headerData(int iSection, Qt::Orientation enmOrientation, int iRole) const;86 virtual QVariant headerData(int iSection, Qt::Orientation enmOrientation, int iRole) const /* override */; 85 87 86 88 /** Defines the @a iRole data for the item at @a idx to @a value. */ 87 bool setData(const QModelIndex &idx, const QVariant &value, int iRole);89 virtual bool setData(const QModelIndex &idx, const QVariant &value, int iRole) /* override */; 88 90 /** Returns the data stored under the given @a iRole for the item referred to by the @a idx. */ 89 QVariant data(const QModelIndex &idx, int iRole = Qt::DisplayRole) const;91 virtual QVariant data(const QModelIndex &idx, int iRole = Qt::DisplayRole) const /* override */; 90 92 91 93 /** Returns a model index for the buddy of the item represented by @a idx. */ 92 QModelIndex buddy(const QModelIndex &idx) const;94 virtual QModelIndex buddy(const QModelIndex &idx) const /* override */; 93 95 94 96 /** Restores the default values for the item with the given @a parentIdx. */ … … 108 110 class UIApplianceDelegate : public QItemDelegate 109 111 { 112 Q_OBJECT; 113 110 114 public: 111 115 … … 117 121 * @param pParent Brings the parent to be assigned for newly created editor. 118 122 * @param styleOption Bring the style option set for the newly created editor. */ 119 QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const;123 virtual QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const /* override */; 120 124 121 125 /** Defines the contents of the given @a pEditor to the data for the item at the given @a idx. */ 122 v oid setEditorData(QWidget *pEditor, const QModelIndex &idx) const;126 virtual void setEditorData(QWidget *pEditor, const QModelIndex &idx) const /* override */; 123 127 /** Defines the data for the item at the given @a idx in the @a pModel to the contents of the given @a pEditor. */ 124 v oid setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &idx) const;128 virtual void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex &idx) const /* override */; 125 129 126 130 /** Updates the geometry of the @a pEditor for the item with the given @a idx, according to the rectangle specified in the @a styleOption. */ 127 v oid updateEditorGeometry(QWidget *pEditor, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const;131 virtual void updateEditorGeometry(QWidget *pEditor, const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const /* override */; 128 132 129 133 /** Returns the size hint for the item at the given @a idx and specified @a styleOption. */ 130 QSize sizeHint(const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const;134 virtual QSize sizeHint(const QStyleOptionViewItem &styleOption, const QModelIndex &idx) const /* override */; 131 135 132 136 protected: … … 134 138 #ifdef VBOX_WS_MAC 135 139 /** Filters @a pEvent if this object has been installed as an event filter for the watched @a pObject. */ 136 bool eventFilter(QObject *pObject, QEvent *pEvent);140 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */; 137 141 #endif 138 142 … … 147 151 class UIApplianceSortProxyModel : public QSortFilterProxyModel 148 152 { 153 Q_OBJECT; 154 149 155 public: 150 156 … … 155 161 156 162 /** Returns whether item in the row indicated by the given @a iSourceRow and @a srcParenIdx should be included in the model. */ 157 bool filterAcceptsRow(int iSourceRow, const QModelIndex &srcParenIdx) const;163 virtual bool filterAcceptsRow(int iSourceRow, const QModelIndex &srcParenIdx) const /* override */; 158 164 159 165 /** Returns whether value of the item referred to by the given index @a leftIdx is less 160 166 * than the value of the item referred to by the given index @a rightIdx. */ 161 bool lessThan(const QModelIndex &leftIdx, const QModelIndex &rightIdx) const;167 virtual bool lessThan(const QModelIndex &leftIdx, const QModelIndex &rightIdx) const /* override */; 162 168 163 169 /** Holds the array of sorted Virtual System Description types. */ … … 201 207 202 208 /** Handles translation event. */ 203 virtual void retranslateUi() ;209 virtual void retranslateUi() /* override */; 204 210 205 211 /** Holds the currently set appliance reference. */
Note:
See TracChangeset
for help on using the changeset viewer.

