VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIVMNamePathSelector.h@ 72225

Last change on this file since 72225 was 72225, checked in by vboxsync, 7 years ago

FE/Qt bugref:6769: Make sure 'name' line edit gets the focus in 'New VM' and 'Clone VM' wizards

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Id: UIVMNamePathSelector.h 72225 2018-05-16 11:03:25Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMNamePathSelector class declaration.
4 */
5
6/*
7 * Copyright (C) 2008-2018 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___UIVMNamePathSelector_h___
19#define ___UIVMNamePathSelector_h___
20
21/* Qt includes: */
22#include <QLineEdit>
23
24/* GUI includes: */
25#include "QIWithRetranslateUI.h"
26
27/* Forward declarations: */
28class QHBoxLayout;
29class QILabel;
30class QILineEdit;
31class QIToolButton;
32
33class SHARED_LIBRARY_STUFF UIVMNamePathSelector : public QIWithRetranslateUI<QWidget>
34{
35 Q_OBJECT;
36
37signals:
38
39 void sigNameChanged(const QString &strName);
40 void sigPathChanged(const QString &strName);
41
42public:
43
44 UIVMNamePathSelector(QWidget *pParent = 0);
45
46public slots:
47
48 QString path() const;
49 void setPath(const QString &path);
50
51 QString name() const;
52 void setName(const QString &name);
53 void setNameFieldValidator(const QString &strValidatorString);
54
55 void setToolTipText(const QString &strToolTipText);
56 const QString& toolTipText() const;
57
58protected:
59
60 void retranslateUi() /* override */;
61 virtual void showEvent(QShowEvent *pEvent) /* override */;
62
63private slots:
64
65 void sltOpenPathSelector();
66
67private:
68
69 void prepareWidgets();
70 QString defaultMachineFolder() const;
71
72 QHBoxLayout *m_pMainLayout;
73 QILineEdit *m_pPath;
74 QILineEdit *m_pName;
75 QILabel *m_pSeparator;
76 QIToolButton *m_pFileDialogButton;
77 /** Tooltip set is set by clients of this widget. */
78 QString m_strToolTipText;
79 /** Path string whose separators are not converted to native ones. */
80 QString m_strNonNativePath;
81};
82
83#endif /* !___UIVMNamePathSelector_h___ */
Note: See TracBrowser for help on using the repository browser.

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