VirtualBox

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

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

VBoxMediaComboBox: Merging alphabetical order and some ordering fixes into qt4 front-end.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.5 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 void refresh();
45 void setUseEmptyItem (bool);
46 void setBelongsTo (const QUuid &);
47 QUuid getId (int aId = -1);
48 QUuid getBelongsTo();
49 void setCurrentItem (const QUuid &);
50 void setType (int);
51
52protected slots:
53
54 void mediaEnumStarted();
55 void mediaEnumerated (const VBoxMedia &, int);
56 void mediaAdded (const VBoxMedia &);
57 void mediaUpdated (const VBoxMedia &);
58 void mediaRemoved (VBoxDefs::DiskType, const QUuid &);
59 void processOnItem (Q3ListBoxItem *);
60 void processActivated (int);
61
62protected:
63
64 void init();
65 void updateToolTip (int);
66 void processMedia (const VBoxMedia &);
67 void processHdMedia (const VBoxMedia &);
68 void processCdMedia (const VBoxMedia &);
69 void processFdMedia (const VBoxMedia &);
70 void appendItem (const QString &, const QUuid &,
71 const QString &, QPixmap *);
72 void replaceItem (int, const QString &,
73 const QString &, QPixmap *);
74 void updateShortcut (const QString &, const QUuid &, const QString &,
75 VBoxMedia::Status);
76
77 int mType;
78 QStringList mUuidList;
79 QStringList mTipList;
80 QUuid mMachineId;
81 QUuid mRequiredId;
82 bool mUseEmptyItem;
83 QPixmap mPmInacc;
84 QPixmap mPmError;
85};
86
87#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