Changeset 11229 in vbox for trunk/src/VBox/Frontends/VirtualBox4/include
- Timestamp:
- Aug 7, 2008 9:24:58 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34291
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFilePathSelectorWidget.h
r10780 r11229 27 27 28 28 /* Qt includes */ 29 #include <Q Widget>29 #include <QComboBox> 30 30 31 #ifdef Q_WS_MAC 32 #define VBOX_USE_COMBOBOX_PATH_SELECTOR 33 #endif /* Q_WS_MAC */ 31 class QFileIconProvider; 32 class QAction; 34 33 35 class QLabel; 36 class QToolButton; 37 class QFileIconProvider; 38 class QComboBox; 39 class QILabel; 40 41 class VBoxFilePathSelectorWidget: public QIWithRetranslateUI<QWidget> 34 class VBoxFilePathSelectorWidget: public QIWithRetranslateUI<QComboBox> 42 35 { 43 36 Q_OBJECT; … … 45 38 public: 46 39 47 enum SelectorMode 48 { 40 enum SelectorMode 41 { 49 42 PathMode = 0, 50 43 FileMode 51 44 }; 52 45 53 VBoxFilePathSelectorWidget (QWidget *aParent = NULL);54 46 VBoxFilePathSelectorWidget (QWidget *aParent = 0); 47 ~VBoxFilePathSelectorWidget(); 55 48 56 49 void setMode (SelectorMode aMode); … … 60 53 bool isResetEnabled () const; 61 54 62 void set PathWhatsThis(const QString &aText);63 void setSelect orWhatsThis(const QString &aText);64 void setReset WhatsThis(const QString &aText);55 void setNoneToolTip (const QString &aText); 56 void setSelectToolTip (const QString &aText); 57 void setResetToolTip (const QString &aText); 65 58 66 59 bool isModified() const; … … 78 71 protected: 79 72 73 void resizeEvent (QResizeEvent *aEvent); 80 74 void retranslateUi(); 81 75 82 76 private slots: 83 84 void cbActivated (int aIndex); 77 78 void onActivated (int aIndex); 79 void copyToClipboard(); 85 80 86 81 private: 87 82 88 void init();89 83 QIcon defaultIcon() const; 90 QString filePath (const QString &aName, bool bLast) const; 84 QString filePath() const; 85 QString shrinkText (int aWidth) const; 86 void refreshText(); 91 87 92 88 /* Private member vars */ 89 QFileIconProvider *mIconProvider; 90 QAction *mCopyAction; 93 91 SelectorMode mMode; 94 QString mPath; 95 QString mNoneStr; 96 97 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR 98 QComboBox *mCbPath; 99 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */ 100 QLabel *mLbIcon; 101 QILabel *mLbPath; 102 QToolButton *mTbSelect; 103 QToolButton *mTbReset; 104 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */ 105 106 QFileIconProvider *mIconProvider; 92 QString mPath; 93 QString mNoneStr; 94 QString mNoneTip; 107 95 }; 108 96
Note:
See TracChangeset
for help on using the changeset viewer.