UIMediumManager.h revision c58f1213e628a545081c70e26c6b67a841cff880
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * VBox frontends: Qt4 GUI ("VirtualBox"):
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * UIMediumManager class declaration
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2012 Oracle Corporation
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * available from http://www.virtualbox.org. This file is free software;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * you can redistribute it and/or modify it under the terms of the GNU
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * General Public License (GPL) as published by the Free Software
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync/* GUI includes */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync/* COM includes: */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync/* Forward declarations: */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsyncclass UIMediumManager : public QIWithRetranslateUI2<QIMainDialog>,
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync enum ItemAction { ItemAction_Added, ItemAction_Updated, ItemAction_Removed };
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync enum Action { Action_Select, Action_Edit, Action_Copy, Action_Modify, Action_Remove, Action_Release };
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync bool aRefresh = true,
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync static void showModeless (QWidget *aParent = NULL, bool aRefresh = true);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync bool inAttachMode() const { return !mSessionMachine.isNull(); };
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync virtual bool eventFilter (QObject *aObject, QEvent *aEvent);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void mediumRemoved (UIMediumType aType, const QString &aId);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void mediumEnumFinished (const VBoxMediaList &aList);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync bool releaseMediumFrom (const UIMedium &aMedium, const QString &aMachineId);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void processCurrentChanged (QTreeWidgetItem *aItem, QTreeWidgetItem *aPrevItem = 0);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void processDoubleClick (QTreeWidgetItem *aItem, int aColumn);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void machineStateChanged(QString strId, KMachineState state);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync QTreeWidget* treeWidget (UIMediumType aType) const;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync QTreeWidgetItem* selectedItem (const QTreeWidget *aTree) const;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync MediaItem* toMediaItem (QTreeWidgetItem *aItem) const;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void setCurrentItem (QTreeWidget *aTree, QTreeWidgetItem *aItem);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void addMediumToList (const QString &aLocation, UIMediumType aType);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync MediaItem* createHardDiskItem (QTreeWidget *aTree, const UIMedium &aMedium) const;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync void updateTabIcons (MediaItem *aItem, ItemAction aAction);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync MediaItem* searchItem (QTreeWidget *aTree, const QString &aId) const;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync bool checkMediumFor (MediaItem *aItem, Action aAction);
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync bool checkDndUrls (const QList<QUrl> &aUrls) const;
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync QString formatPaneText (const QString &aText, bool aCompact = true, const QString &aElipsis = "middle");
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* Private member vars */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* Window status */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* The global VirtualBox instance */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* Type if we are in the select modus */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* Icon definitions */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* Menu & Toolbar */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync /* Machine */
8230e6f6671b538d39c7ef6d8484cf516a983ef4vboxsync#endif /* __UIMediumManager_h__ */