VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/include/VBoxMediaComboBox.h@ 9600

Last change on this file since 9600 was 9600, checked in by vboxsync, 17 years ago

Fe/Qt4: VBoxMediaComboBox now has function to return vdi name formatted in own format.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.6 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * VBoxMediaComboBox class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBoxMediaComboBox_h__
24#define __VBoxMediaComboBox_h__
25
26#include "VBoxGlobal.h"
27
28#include <qcombobox.h>
29//Added by qt3to4:
30#include <QPixmap>
31
32class Q3ListBoxItem;
33
34class VBoxMediaComboBox : public QComboBox
35{
36 Q_OBJECT
37
38public:
39
40 VBoxMediaComboBox (QWidget *aParent, int aType = -1,
41 bool aUseEmptyItem = false);
42 ~VBoxMediaComboBox() {}
43
44 static QString fullItemName (const QString &aSrc);
45
46 void refresh();
47 void setUseEmptyItem (bool);
48 void setBelongsTo (const QUuid &);
49 QUuid getId (int aId = -1) const;
50 QUuid getBelongsTo();
51 void setCurrentItem (const QUuid &);
52 void setType (int);
53
54protected slots:
55
56 void mediaEnumStarted();
57 void mediaEnumerated (const VBoxMedia &, int);
58 void mediaAdded (const VBoxMedia &);
59 void mediaUpdated (const VBoxMedia &);
60 void mediaRemoved (VBoxDefs::DiskType, const QUuid &);
61 void processOnItem (const QModelIndex&);
62 void processActivated (int);
63
64protected:
65
66 void init();
67 void updateToolTip (int);
68 void processMedia (const VBoxMedia &);
69 void processHdMedia (const VBoxMedia &);
70 void processCdMedia (const VBoxMedia &);
71 void processFdMedia (const VBoxMedia &);
72 void appendItem (const QString &, const QUuid &,
73 const QString &, QPixmap *);
74 void replaceItem (int, const QString &,
75 const QString &, QPixmap *);
76 void updateShortcut (const QString &, const QUuid &, const QString &,
77 VBoxMedia::Status);
78
79 int mType;
80 QStringList mUuidList;
81 QStringList mTipList;
82 QUuid mMachineId;
83 QUuid mRequiredId;
84 bool mUseEmptyItem;
85 QPixmap mPmInacc;
86 QPixmap mPmError;
87};
88
89#endif /* __VBoxMediaComboBox_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