VirtualBox

Changeset 11229 in vbox


Ignore:
Timestamp:
Aug 7, 2008 9:24:58 PM (16 years ago)
Author:
vboxsync
Message:

Fe/Qt4: File/Folder path selector reworked. Global/VM Settings updated with new changes.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFilePathSelectorWidget.h

    r10780 r11229  
    2727
    2828/* Qt includes */
    29 #include <QWidget>
     29#include <QComboBox>
    3030
    31 #ifdef Q_WS_MAC
    32 #define VBOX_USE_COMBOBOX_PATH_SELECTOR
    33 #endif /* Q_WS_MAC */
     31class QFileIconProvider;
     32class QAction;
    3433
    35 class QLabel;
    36 class QToolButton;
    37 class QFileIconProvider;
    38 class QComboBox;
    39 class QILabel;
    40 
    41 class VBoxFilePathSelectorWidget: public QIWithRetranslateUI<QWidget>
     34class VBoxFilePathSelectorWidget: public QIWithRetranslateUI<QComboBox>
    4235{
    4336    Q_OBJECT;
     
    4538public:
    4639
    47     enum SelectorMode 
    48     { 
     40    enum SelectorMode
     41    {
    4942        PathMode = 0,
    5043        FileMode
    5144    };
    5245
    53     VBoxFilePathSelectorWidget (QWidget *aParent = NULL);
    54     ~VBoxFilePathSelectorWidget();
     46    VBoxFilePathSelectorWidget (QWidget *aParent = 0);
     47   ~VBoxFilePathSelectorWidget();
    5548
    5649    void setMode (SelectorMode aMode);
     
    6053    bool isResetEnabled () const;
    6154
    62     void setPathWhatsThis (const QString &aText);
    63     void setSelectorWhatsThis (const QString &aText);
    64     void setResetWhatsThis (const QString &aText);
     55    void setNoneToolTip (const QString &aText);
     56    void setSelectToolTip (const QString &aText);
     57    void setResetToolTip (const QString &aText);
    6558
    6659    bool isModified() const;
     
    7871protected:
    7972
     73    void resizeEvent (QResizeEvent *aEvent);
    8074    void retranslateUi();
    8175
    8276private slots:
    83      
    84     void cbActivated (int aIndex);
     77
     78    void onActivated (int aIndex);
     79    void copyToClipboard();
    8580
    8681private:
    8782
    88     void init();
    8983    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();
    9187
    9288    /* Private member vars */
     89    QFileIconProvider *mIconProvider;
     90    QAction *mCopyAction;
    9391    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;
    10795};
    10896
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFilePathSelectorWidget.cpp

    r10780 r11229  
    2222
    2323#include "VBoxFilePathSelectorWidget.h"
    24 #include "VBoxGlobal.h"
    25 #include "QILabel.h"
    2624
    2725/* Qt includes */
     26#include <QAction>
     27#include <QApplication>
     28#include <QClipboard>
     29#include <QDir>
    2830#include <QFileIconProvider>
    29 #include <QDir>
    30 
    31 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    32 # include <QComboBox>
    33 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    34 # include <QLabel>
    35 # include <QToolButton>
    36 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    37 
    38 enum
     31
     32enum
    3933{
    4034    PathId = 0,
     
    4337};
    4438
    45 VBoxFilePathSelectorWidget::VBoxFilePathSelectorWidget (QWidget *aParent /* = NULL */)
    46     : QIWithRetranslateUI<QWidget> (aParent)
     39VBoxFilePathSelectorWidget::VBoxFilePathSelectorWidget (QWidget *aParent /* = 0 */)
     40    : QIWithRetranslateUI<QComboBox> (aParent)
     41    , mIconProvider (new QFileIconProvider())
     42    , mCopyAction (new QAction (this))
    4743    , mMode (PathMode)
    4844{
    49     init();
     45    /* Populate items */
     46    insertItem (PathId, "");
     47    insertItem (SelectId, "");
     48    insertItem (ResetId, "");
     49
     50    /* Setup context menu */
     51    addAction (mCopyAction);
     52    mCopyAction->setShortcut (QKeySequence (QKeySequence::Copy));
     53    mCopyAction->setShortcutContext (Qt::WidgetShortcut);
     54
     55    /* Setup connections */
     56    connect (this, SIGNAL (activated (int)), this, SLOT (onActivated (int)));
     57    connect (mCopyAction, SIGNAL (triggered (bool)), this, SLOT (copyToClipboard()));
     58
     59    /* Applying language settings */
     60    retranslateUi();
     61
     62    /* Initial Setup */
     63    setContextMenuPolicy (Qt::ActionsContextMenu);
     64    setMinimumWidth (200);
     65    /* Set path to None */
     66    setPath (QString::null);
    5067}
    5168
     
    6784void VBoxFilePathSelectorWidget::setResetEnabled (bool aEnabled)
    6885{
    69 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    70     if (!aEnabled &&
    71         mCbPath->count() - 1 == ResetId)
    72         mCbPath->removeItem (ResetId);
    73     else
    74     if (aEnabled &&
    75         mCbPath->count() - 1  == ResetId - 1)
    76         mCbPath->insertItem (ResetId, "");
     86    if (!aEnabled && count() - 1 == ResetId)
     87        removeItem (ResetId);
     88    else if (aEnabled && count() - 1 == ResetId - 1)
     89        insertItem (ResetId, "");
    7790    retranslateUi();
    78 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    79     mTbReset->setVisible (aEnabled);
    80 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    8191}
    8292
    8393bool VBoxFilePathSelectorWidget::isResetEnabled () const
    8494{
    85 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    86     return (mCbPath->count() - 1  == ResetId);
    87 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    88     return mTbReset->isVisible();
    89 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    90 }
    91 
    92 void VBoxFilePathSelectorWidget::setPathWhatsThis (const QString &aText)
    93 {
    94 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    95     NOREF (aText);
    96 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    97     mLbPath->setWhatsThis (aText);
    98 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    99 }
    100 
    101 void VBoxFilePathSelectorWidget::setSelectorWhatsThis (const QString &aText)
    102 {
    103 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    104     mCbPath->setItemData (SelectId, aText, Qt::WhatsThisRole);
    105 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    106     mTbSelect->setWhatsThis (aText);
    107 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    108 }
    109 
    110 void VBoxFilePathSelectorWidget::setResetWhatsThis (const QString &aText)
    111 {
    112 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    113     mCbPath->setItemData (ResetId, aText, Qt::WhatsThisRole);
    114 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    115     mTbReset->setWhatsThis (aText);
    116 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
     95    return (count() - 1  == ResetId);
     96}
     97
     98void VBoxFilePathSelectorWidget::setNoneToolTip (const QString &aText)
     99{
     100    mNoneTip = aText;
     101    if (mPath.isNull())
     102    {
     103        setItemData (PathId, mNoneTip, Qt::ToolTipRole);
     104        setToolTip (mNoneTip);
     105    }
     106}
     107
     108void VBoxFilePathSelectorWidget::setSelectToolTip (const QString &aText)
     109{
     110    setItemData (SelectId, aText, Qt::ToolTipRole);
     111}
     112
     113void VBoxFilePathSelectorWidget::setResetToolTip (const QString &aText)
     114{
     115    setItemData (ResetId, aText, Qt::ToolTipRole);
    117116}
    118117
     
    124123void VBoxFilePathSelectorWidget::setPath (const QString &aPath)
    125124{
    126     mPath = aPath;
    127     QString tmpPath (aPath);
    128     QIcon icon;
    129     QFileInfo fi (tmpPath);
    130     if (fi.exists())
    131         icon = mIconProvider->icon (fi);
    132     else
    133         icon = defaultIcon();
    134     if (tmpPath.isEmpty())
    135         tmpPath = mNoneStr;
    136 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    137     mCbPath->setItemText (PathId, filePath (tmpPath, true));
    138     mCbPath->setItemIcon (PathId, icon);
    139 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    140     mLbPath->setText (QString ("<compact elipsis=\"start\">%1</compact>").arg (tmpPath));
    141     mLbIcon->setPixmap (icon.pixmap (16, 16));
    142 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
     125    mPath = aPath.isEmpty() ? QString::null : aPath;
     126
     127    /* Attach corresponding icon */
     128    setItemIcon (PathId, QFileInfo (mPath).exists() ?
     129                         mIconProvider->icon (QFileInfo (mPath)) :
     130                         defaultIcon());
     131
     132    /* Store full path as tooltip */
     133    setToolTip (filePath());
     134    setItemData (PathId, toolTip(), Qt::ToolTipRole);
     135
     136    refreshText();
    143137}
    144138
     
    148142}
    149143
     144void VBoxFilePathSelectorWidget::resizeEvent (QResizeEvent *aEvent)
     145{
     146    QIWithRetranslateUI<QComboBox>::resizeEvent (aEvent);
     147    refreshText();
     148}
     149
    150150void VBoxFilePathSelectorWidget::retranslateUi()
    151151{
    152 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
     152    /* Retranslate 'path' item */
    153153    mNoneStr = tr ("None");
    154     mCbPath->setItemText (SelectId, tr ("Other..."));
    155     if (mCbPath->count() - 1 == ResetId)
    156         mCbPath->setItemText (ResetId, tr ("Reset"));
    157 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    158 }
    159 
    160 void VBoxFilePathSelectorWidget::cbActivated (int aIndex)
    161 {
    162 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    163    switch (aIndex)
    164    {
    165        case SelectId:
    166            {
    167                emit selectPath();
    168                break;
    169            }
    170        case ResetId:
    171            {
    172                emit resetPath();
    173                break;
    174            }
    175    }
    176    mCbPath->setCurrentIndex (PathId);
    177 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    178    NOREF (aIndex);
    179 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    180 }
    181 
    182 void VBoxFilePathSelectorWidget::init()
    183 {
    184     mIconProvider = new QFileIconProvider();
    185     QHBoxLayout *layout = new QHBoxLayout (this);
    186     VBoxGlobal::setLayoutMargin (layout, 0);
    187 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR
    188     mCbPath = new QComboBox();
    189     mCbPath->setMinimumWidth (200);
    190     mCbPath->insertItem (PathId, "");
    191     mCbPath->insertItem (SelectId, "");
    192     mCbPath->insertItem (ResetId, "");
    193     connect (mCbPath, SIGNAL (activated (int)),
    194              this, SLOT (cbActivated (int)));
    195     layout->addWidget (mCbPath);
    196 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */
    197     mLbIcon = new QLabel();
    198     mLbPath = new QILabel();
    199     mLbPath->setSizePolicy (QSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed));
    200     mLbPath->setMinimumWidth (180);
    201     mLbPath->setFullSizeSelection (true);
    202     mTbSelect = new QToolButton();
    203     mTbSelect->setIcon (QIcon (":/select_file_16px.png"));
    204     mTbSelect->setAutoRaise (true);
    205     connect (mTbSelect, SIGNAL (clicked ()),
    206              this, SIGNAL (selectPath()));
    207     mTbReset = new QToolButton();
    208     mTbReset->setIcon (QIcon (":/eraser_16px.png"));
    209     mTbReset->setAutoRaise (true);
    210     connect (mTbReset, SIGNAL (clicked ()),
    211              this, SIGNAL (resetPath()));
    212    
    213     layout->addWidget (mLbIcon);
    214     layout->addWidget (mLbPath);
    215     layout->addWidget (mTbSelect);
    216     layout->addWidget (mTbReset);
    217 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */
    218 
    219      /* Applying language settings */
    220     retranslateUi();
    221 
    222     /* Set to none */
    223     setPath ("");
     154    if (mPath.isNull())
     155    {
     156        setItemText (PathId, mNoneStr);
     157        setItemData (PathId, mNoneTip, Qt::ToolTipRole);
     158        setToolTip (mNoneTip);
     159    }
     160
     161    /* Retranslate 'select' item */
     162    setItemText (SelectId, tr ("Other..."));
     163
     164    /* Retranslate 'reset' item */
     165    if (count() - 1 == ResetId)
     166        setItemText (ResetId, tr ("Reset"));
     167
     168    /* Retranslate copy action */
     169    mCopyAction->setText (tr ("&Copy"));
     170}
     171
     172void VBoxFilePathSelectorWidget::onActivated (int aIndex)
     173{
     174    switch (aIndex)
     175    {
     176        case SelectId:
     177        {
     178            emit selectPath();
     179            break;
     180        }
     181        case ResetId:
     182        {
     183            emit resetPath();
     184            break;
     185        }
     186        default:
     187            break;
     188    }
     189    setCurrentIndex (PathId);
     190}
     191
     192void VBoxFilePathSelectorWidget::copyToClipboard()
     193{
     194    QString text = itemData (PathId, Qt::ToolTipRole).toString();
     195    QApplication::clipboard()->setText (text, QClipboard::Clipboard);
     196    QApplication::clipboard()->setText (text, QClipboard::Selection);
    224197}
    225198
     
    230203    else
    231204        return mIconProvider->icon (QFileIconProvider::File);
    232 } 
    233 
    234 QString VBoxFilePathSelectorWidget::filePath (const QString &aName, bool bLast) const
    235 {
    236     if (!aName.isEmpty())
     205}
     206
     207QString VBoxFilePathSelectorWidget::filePath() const
     208{
     209    if (!mPath.isNull())
    237210    {
    238211        if (mMode == PathMode)
     212            return QDir (mPath).path();
     213        else
     214            return QFileInfo (mPath).filePath();
     215    }
     216
     217    return mNoneTip;
     218}
     219
     220QString VBoxFilePathSelectorWidget::shrinkText (int aWidth) const
     221{
     222    /* Full text stored in toolTip */
     223    QString fullText = toolTip();
     224    if (fullText.isEmpty())
     225        return fullText;
     226
     227    int oldSize = fontMetrics().width (fullText);
     228    int indentSize = fontMetrics().width ("...x");
     229
     230    /* Compress text */
     231    int start = 0;
     232    int finish = 0;
     233    int position = 0;
     234    int textWidth = 0;
     235    do {
     236        textWidth = fontMetrics().width (fullText);
     237        if (textWidth + indentSize > aWidth)
    239238        {
    240             QDir dir (aName);
    241             if (bLast)
    242                 return dir.dirName();
    243             else
    244                 return dir.path();
     239            start = 0;
     240            finish = fullText.length();
     241
     242            /* Selecting remove position */
     243            QRegExp regExp ("([\\\\/][^\\\\^/]+[\\\\/]?$)");
     244            int newFinish = regExp.indexIn (fullText);
     245            if (newFinish != -1)
     246                finish = newFinish;
     247            position = (finish - start) / 2;
     248
     249            if (position == finish)
     250               break;
     251
     252            fullText.remove (position, 1);
    245253        }
    246         else
    247         {
    248             QFileInfo fi (aName);
    249             if (bLast)
    250                 return fi.fileName();
    251             else
    252                 return fi.filePath();
    253         }
    254     }
    255     return "";
    256 
    257 
     254    } while (textWidth + indentSize > aWidth);
     255
     256    fullText.insert (position, "...");
     257    int newSize = fontMetrics().width (fullText);
     258
     259    return newSize < oldSize ? fullText : toolTip();
     260}
     261
     262void VBoxFilePathSelectorWidget::refreshText()
     263{
     264    if (mPath.isNull())
     265    {
     266        if (itemText (PathId) != mNoneStr)
     267            setItemText (PathId, mNoneStr);
     268    }
     269    else
     270    {
     271        /* Compress text in combobox */
     272        QStyleOptionComboBox options;
     273        options.initFrom (this);
     274        QRect rect = QApplication::style()->subControlRect (
     275            QStyle::CC_ComboBox, &options, QStyle::SC_ComboBoxEditField);
     276        setItemText (PathId, shrinkText (rect.width() - iconSize().width()));
     277    }
     278}
     279
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGLSettingsGeneral.cpp

    r10780 r11229  
    5454
    5555void VBoxGLSettingsGeneral::putBackTo (CSystemProperties &aProps,
    56                                            VBoxGlobalSettings &)
     56                                       VBoxGlobalSettings &)
    5757{
    5858    if (mPsVdi->isModified())
     
    7676    Ui::VBoxGLSettingsGeneral::retranslateUi (this);
    7777
    78     mPsVdi->setPathWhatsThis (tr ("Displays the path to the default VDI folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks."));
    79     mPsVdi->setSelectorWhatsThis (tr ("Opens a dialog to select the default VDI folder."));
    80     mPsVdi->setResetWhatsThis (tr ("Resets the VDI folder path to the default value. The actual default path will be displayed after accepting the changes and opening this dialog again."));
     78    mPsVdi->setWhatsThis (tr ("Displays the path to the default VDI folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks."));
     79    mPsVdi->setNoneToolTip (tr ("The actual default path will be displayed after accepting the changes and opening this dialog again."));
     80    mPsVdi->setSelectToolTip (tr ("Opens a dialog to select the default VDI folder."));
     81    mPsVdi->setResetToolTip (tr ("Resets the VDI folder path to the default value."));
    8182
    82     mPsMach->setPathWhatsThis (tr ("Displays the path to the default virtual machine folder. This folder is used, if not explicitly specified otherwise, when creating new virtual machines."));
    83     mPsMach->setSelectorWhatsThis (tr ("Opens a dialog to select the default virtual machine folder."));
    84     mPsMach->setResetWhatsThis (tr ("Resets the virtual machine folder path to the default value. The actual default path will be displayed after accepting the changes and opening this dialog again."));
     83    mPsMach->setWhatsThis (tr ("Displays the path to the default virtual machine folder. This folder is used, if not explicitly specified otherwise, when creating new virtual machines."));
     84    mPsMach->setNoneToolTip (tr ("The actual default path will be displayed after accepting the changes and opening this dialog again."));
     85    mPsMach->setSelectToolTip (tr ("Opens a dialog to select the default virtual machine folder."));
     86    mPsMach->setResetToolTip (tr ("Resets the virtual machine folder path to the default value."));
    8587
    86     mPsVRDP->setPathWhatsThis (tr ("Displays the path to the library that provides authentication for Remote Display (VRDP) clients."));
    87     mPsVRDP->setSelectorWhatsThis (tr ("Opens a dialog to select the VRDP authentication library file."));
    88     mPsVRDP->setResetWhatsThis (tr ("Resets the authentication library file to the default value. The actual default library file will be displayed after accepting the changes and opening this dialog again."));
     88    mPsVRDP->setWhatsThis (tr ("Displays the path to the library that provides authentication for Remote Display (VRDP) clients."));
     89    mPsVRDP->setNoneToolTip (tr ("The actual default library file will be displayed after accepting the changes and opening this dialog again."));
     90    mPsVRDP->setSelectToolTip (tr ("Opens a dialog to select the VRDP authentication library file."));
     91    mPsVRDP->setResetToolTip (tr ("Resets the authentication library file to the default value."));
    8992}
    9093
     
    9396    VBoxFilePathSelectorWidget *ps = qobject_cast<VBoxFilePathSelectorWidget*> (sender());
    9497    Assert (ps);
    95     ps->setPath ("");
     98    ps->setPath (QString::null);
    9699}
    97100
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsGeneral.cpp

    r10932 r11229  
    377377
    378378    /* Path selector */
    379     mPsSnapshot->setPathWhatsThis (tr ("Displays the path where snapshots of this virtual machine will be stored. Note that snapshots can take quite a lot of disk space."));
    380     mPsSnapshot->setSelectorWhatsThis (tr ("Selects the snapshot folder path."));
    381     mPsSnapshot->setResetWhatsThis (tr ("Resets the snapshot folder path to the default value. The actual default path will be displayed after accepting the changes and opening this dialog again."));
     379    mPsSnapshot->setWhatsThis (tr ("Displays the path where snapshots of this virtual machine will be stored. Note that snapshots can take quite a lot of disk space."));
     380    mPsSnapshot->setNoneToolTip (tr ("The actual default path will be displayed after accepting the changes and opening this dialog again."));
     381    mPsSnapshot->setSelectToolTip (tr ("Selects the snapshot folder path."));
     382    mPsSnapshot->setResetToolTip (tr ("Resets the snapshot folder path to the default value."));
    382383}
    383384
     
    468469void VBoxVMSettingsGeneral::resetSnapshotFolder()
    469470{
    470     mPsSnapshot->setPath ("");
     471    mPsSnapshot->setPath (QString::null);
    471472}
    472473
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsSFDetails.cpp

    r10742 r11229  
    5858     /* Applying language settings */
    5959    retranslateUi();
    60    
     60
    6161    /* Validate the initial fields */
    6262    validate();
     
    115115    Ui::VBoxVMSettingsSFDetails::retranslateUi (this);
    116116
     117    mPsPath->setNoneToolTip (tr ("No shared folder path is currently selected."));
     118    mPsPath->setSelectToolTip (tr ("Selects shared folder path."));
     119
    117120    switch (mType)
    118121    {
     
    136139
    137140    mButtonBox->button (QDialogButtonBox::Ok)->setEnabled (!mPsPath->path().isEmpty() &&
    138                                                            !mLeName->text().trimmed().isEmpty() && 
     141                                                           !mLeName->text().trimmed().isEmpty() &&
    139142                                                           !mLeName->text().contains(" ") &&
    140143                                                           !mUsedNames.contains (pair));
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGLSettingsGeneral.ui

    r10772 r11229  
    2323    <x>0</x>
    2424    <y>0</y>
    25     <width>377</width>
    26     <height>162</height>
     25    <width>390</width>
     26    <height>172</height>
    2727   </rect>
    2828  </property>
     
    5454   </item>
    5555   <item row="0" column="1" >
    56     <widget class="VBoxFilePathSelectorWidget" native="1" name="mPsVdi" />
     56    <widget class="VBoxFilePathSelectorWidget" name="mPsVdi" >
     57     <property name="sizePolicy" >
     58      <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     59       <horstretch>0</horstretch>
     60       <verstretch>0</verstretch>
     61      </sizepolicy>
     62     </property>
     63    </widget>
    5764   </item>
    5865   <item row="1" column="0" >
     
    7077   </item>
    7178   <item row="1" column="1" >
    72     <widget class="VBoxFilePathSelectorWidget" native="1" name="mPsMach" />
     79    <widget class="VBoxFilePathSelectorWidget" name="mPsMach" >
     80     <property name="sizePolicy" >
     81      <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     82       <horstretch>0</horstretch>
     83       <verstretch>0</verstretch>
     84      </sizepolicy>
     85     </property>
     86    </widget>
    7387   </item>
    7488   <item row="2" column="0" colspan="2" >
    75     <widget class="Line" name="line" >
     89    <widget class="Line" name="mLnSeparator" >
    7690     <property name="orientation" >
    7791      <enum>Qt::Horizontal</enum>
     
    8094   </item>
    8195   <item row="3" column="0" >
    82     <widget class="QLabel" name="label_2" >
     96    <widget class="QLabel" name="mLbVRDP" >
    8397     <property name="text" >
    8498      <string>V&amp;RDP Authentication Library:</string>
     
    93107   </item>
    94108   <item row="3" column="1" >
    95     <widget class="VBoxFilePathSelectorWidget" native="1" name="mPsVRDP" />
     109    <widget class="VBoxFilePathSelectorWidget" name="mPsVRDP" >
     110     <property name="sizePolicy" >
     111      <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     112       <horstretch>0</horstretch>
     113       <verstretch>0</verstretch>
     114      </sizepolicy>
     115     </property>
     116    </widget>
    96117   </item>
    97    <item row="4" column="1" >
     118   <item row="4" column="0" colspan="2" >
    98119    <spacer>
    99120     <property name="orientation" >
     
    102123     <property name="sizeHint" >
    103124      <size>
    104        <width>20</width>
    105        <height>40</height>
     125       <width>0</width>
     126       <height>0</height>
    106127      </size>
    107128     </property>
     
    113134  <customwidget>
    114135   <class>VBoxFilePathSelectorWidget</class>
    115    <extends>QWidget</extends>
     136   <extends>QComboBox</extends>
    116137   <header>VBoxFilePathSelectorWidget.h</header>
    117138   <container>1</container>
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsGeneral.ui

    r10971 r11229  
    2424    <y>0</y>
    2525    <width>451</width>
    26     <height>477</height>
     26    <height>497</height>
    2727   </rect>
    2828  </property>
     
    843843       </item>
    844844       <item row="4" column="1" >
    845         <widget class="VBoxFilePathSelectorWidget" native="1" name="mPsSnapshot" />
     845        <widget class="VBoxFilePathSelectorWidget" name="mPsSnapshot" >
     846         <property name="sizePolicy" >
     847          <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     848           <horstretch>0</horstretch>
     849           <verstretch>0</verstretch>
     850          </sizepolicy>
     851         </property>
     852        </widget>
    846853       </item>
    847854       <item row="5" column="1" >
     
    958965 <customwidgets>
    959966  <customwidget>
     967   <class>VBoxFilePathSelectorWidget</class>
     968   <extends>QComboBox</extends>
     969   <header>VBoxFilePathSelectorWidget.h</header>
     970   <container>1</container>
     971  </customwidget>
     972  <customwidget>
    960973   <class>BootItemsTable</class>
    961974   <extends>QTreeWidget</extends>
     
    967980   <header>QILabelSeparator.h</header>
    968981  </customwidget>
    969   <customwidget>
    970    <class>VBoxFilePathSelectorWidget</class>
    971    <extends>QWidget</extends>
    972    <header>VBoxFilePathSelectorWidget.h</header>
    973    <container>1</container>
    974   </customwidget>
    975982 </customwidgets>
    976983 <resources/>
  • trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsSFDetails.ui

    r10742 r11229  
    2424    <y>0</y>
    2525    <width>218</width>
    26     <height>181</height>
     26    <height>196</height>
    2727   </rect>
    2828  </property>
     
    4242   </item>
    4343   <item row="0" column="1" >
    44     <widget class="VBoxFilePathSelectorWidget" native="1" name="mPsPath" >
    45      <property name="toolTip" >
    46       <string>Displays the path to an existing folder on the host PC.</string>
    47      </property>
    48     </widget>
     44    <widget class="VBoxFilePathSelectorWidget" name="mPsPath" />
    4945   </item>
    5046   <item row="1" column="0" >
     
    106102 <customwidgets>
    107103  <customwidget>
     104   <class>VBoxFilePathSelectorWidget</class>
     105   <extends>QComboBox</extends>
     106   <header>VBoxFilePathSelectorWidget.h</header>
     107   <container>1</container>
     108  </customwidget>
     109  <customwidget>
    108110   <class>QIDialogButtonBox</class>
    109111   <extends>QDialogButtonBox</extends>
    110112   <header>QIDialogButtonBox.h</header>
    111   </customwidget>
    112   <customwidget>
    113    <class>VBoxFilePathSelectorWidget</class>
    114    <extends>QWidget</extends>
    115    <header>VBoxFilePathSelectorWidget.h</header>
    116    <container>1</container>
    117113  </customwidget>
    118114 </customwidgets>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette