Changeset 104978 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
- Timestamp:
- Jun 20, 2024 1:14:00 PM (9 months ago)
- svn:sync-xref-src-repo-rev:
- 163588
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
r104638 r104978 5 5 6 6 /* 7 * Copyright (C) 2008-202 3Oracle and/or its affiliates.7 * Copyright (C) 2008-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 48 48 , m_fAllowToCopyContentsWhenDisabled(false) 49 49 , m_pCopyAction(0) 50 , m_fMarkable(false) 51 , m_fMarkForError(false) 50 52 , m_pIconLabel(0) 51 , m_fMarkForError(false)52 , m_fMarkable(false)53 53 , m_iIconMargin(0) 54 54 { … … 60 60 , m_fAllowToCopyContentsWhenDisabled(false) 61 61 , m_pCopyAction(0) 62 , m_fMarkable(false) 63 , m_fMarkForError(false) 62 64 , m_pIconLabel(0) 63 , m_ fMarkForError(false)65 , m_iIconMargin(0) 64 66 { 65 67 prepare(); … … 79 81 { 80 82 setFixedWidth(fitTextWidth(strText).width()); 83 } 84 85 void QILineEdit::setMarkable(bool fMarkable) 86 { 87 if (m_fMarkable == fMarkable) 88 return; 89 m_fMarkable = fMarkable; 90 update(); 81 91 } 82 92 … … 96 106 m_pIconLabel->setToolTip(strToolTip); 97 107 m_iIconMargin = (height() - m_pIconLabel->height()) / 2; 98 update();99 }100 101 void QILineEdit::setMarkable(bool fMarkable)102 {103 if (m_fMarkable == fMarkable)104 return;105 m_fMarkable = fMarkable;106 108 update(); 107 109 } … … 144 146 } 145 147 146 void QILineEdit::moveIconLabel()147 {148 AssertPtrReturnVoid(m_pIconLabel);149 m_pIconLabel->move(width() - m_pIconLabel->width() - m_iIconMargin, m_iIconMargin);150 }151 152 148 void QILineEdit::showEvent(QShowEvent *pShowEvent) 153 149 { … … 200 196 return sa; 201 197 } 198 199 void QILineEdit::moveIconLabel() 200 { 201 AssertPtrReturnVoid(m_pIconLabel); 202 m_pIconLabel->move(width() - m_pIconLabel->width() - m_iIconMargin, m_iIconMargin); 203 }
Note:
See TracChangeset
for help on using the changeset viewer.