Changeset 78167 in vbox
- Timestamp:
- Apr 17, 2019 2:57:04 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130082
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp
r78143 r78167 49 49 50 50 51 /** Class used to hold choice data. */ 52 class ChoiceData 53 { 54 public: 55 56 /** Constructs null choice data. */ 57 ChoiceData() {} 58 /** Constructs choice data on the basis of passed @a choices and @a iSelectedChoice. */ 59 ChoiceData(const QVector<QString> &choices, int iSelectedChoice) 60 : m_choices(choices), m_iSelectedChoice(iSelectedChoice) {} 61 62 /** Returns choice list. */ 63 QVector<QString> choices() const { return m_choices; } 64 /** Returns current selected choice. */ 65 int selectedChoice() const { return m_iSelectedChoice; } 66 67 private: 68 69 /** Holds choice list. */ 70 QVector<QString> m_choices; 71 /** Holds current selected choice. */ 72 int m_iSelectedChoice; 73 }; 74 Q_DECLARE_METATYPE(ChoiceData); 75 76 51 77 /** QComboBox extension used as Port editor. */ 52 78 class ChoiceEditor : public QComboBox … … 391 417 return Qt::ItemIsEnabled | Qt::ItemIsSelectable; 392 418 case UIFormEditorDataType_Value: 393 return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable; 419 return m_dataList[index.row()]->valueType() != KFormValueType_Boolean 420 ? Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable 421 : Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable; 394 422 default: 395 423 return Qt::NoItemFlags; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.h
r78143 r78167 29 29 class UIFormEditorView; 30 30 class CVirtualSystemDescriptionForm; 31 32 33 /** Class used to hold choice data. */34 class ChoiceData35 {36 public:37 38 /** Constructs null choice data. */39 ChoiceData() {}40 /** Constructs choice data on the basis of passed @a choices and @a iSelectedChoice. */41 ChoiceData(const QVector<QString> &choices, int iSelectedChoice)42 : m_choices(choices), m_iSelectedChoice(iSelectedChoice) {}43 44 /** Returns choice list. */45 QVector<QString> choices() const { return m_choices; }46 /** Returns current selected choice. */47 int selectedChoice() const { return m_iSelectedChoice; }48 49 private:50 51 /** Holds choice list. */52 QVector<QString> m_choices;53 /** Holds current selected choice. */54 int m_iSelectedChoice;55 };56 Q_DECLARE_METATYPE(ChoiceData);57 58 31 59 32 /** QWidget subclass representing model/view Form Editor widget. */ … … 92 65 typedef QPointer<UIFormEditorWidget> UIFormEditorWidgetPointer; 93 66 94 95 67 #endif /* !FEQT_INCLUDED_SRC_wizards_importappliance_UIFormEditorWidget_h */
Note:
See TracChangeset
for help on using the changeset viewer.