Changeset 60917 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 10, 2016 10:23:29 AM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
r60831 r60917 44 44 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 45 45 46 enum47 {48 PathId = 0,49 SelectId,50 ResetId51 };52 53 46 54 47 /** Returns first position of difference between passed strings. */ … … 133 126 } 134 127 135 bool UIFilePathSelector::isEditable() const136 {137 return m_fEditable;138 }139 140 128 void UIFilePathSelector::setResetEnabled(bool fEnabled) 141 129 { … … 148 136 } 149 137 retranslateUi(); 150 }151 152 bool UIFilePathSelector::isResetEnabled() const153 {154 return (count() - 1 == ResetId);155 }156 157 bool UIFilePathSelector::isPathSelected() const158 {159 return (currentIndex() == PathId);160 }161 162 QString UIFilePathSelector::path() const163 {164 return m_strPath;165 138 } 166 139 … … 171 144 if (fRefreshText) 172 145 refreshText(); 173 }174 175 void UIFilePathSelector::setHomeDir(const QString &strHomeDir)176 {177 m_strHomeDir = strHomeDir;178 146 } 179 147 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.h
r60829 r60917 54 54 }; 55 55 56 /** Combo-box field IDs file-path selector uses. */ 57 enum 58 { 59 PathId = 0, 60 SelectId, 61 ResetId 62 }; 63 56 64 /** Constructs file-path selector passing @a pParent to QComboBox base-class. */ 57 65 UIFilePathSelector(QWidget *pParent = 0); … … 65 73 void setEditable(bool fEditable); 66 74 /** Returns whether the path is editable. */ 67 bool isEditable() const ;75 bool isEditable() const { return m_fEditable; } 68 76 69 77 /** Defines whether the reseting to defauilt path is @a fEnabled. */ 70 78 void setResetEnabled(bool fEnabled); 71 79 /** Returns whether the reseting to defauilt path is enabled. */ 72 bool isResetEnabled() const ;80 bool isResetEnabled() const { return count() - 1 == ResetId; } 73 81 74 82 /** Defines the file-dialog @a strTitle. */ … … 92 100 bool isModified() const { return m_fModified; } 93 101 /** Returns whether the path is selected. */ 94 bool isPathSelected() const ;102 bool isPathSelected() const { return currentIndex() == PathId; } 95 103 96 104 /** Returns the path. */ 97 QString path() const ;105 QString path() const { return m_strPath; } 98 106 99 107 public slots: … … 103 111 104 112 /** Defines the @a strHomeDir. */ 105 void setHomeDir(const QString &strHomeDir) ;113 void setHomeDir(const QString &strHomeDir) { m_strHomeDir = strHomeDir; } 106 114 107 115 protected:
Note:
See TracChangeset
for help on using the changeset viewer.