QIArrowButtonSwitch.h revision 57bad04ee49aecc036182a51108288dae1957782
57bad04ee49aecc036182a51108288dae1957782vboxsync * VBox Qt GUI - QIArrowButtonSwitch class declaration.
57bad04ee49aecc036182a51108288dae1957782vboxsync * Copyright (C) 2006-2014 Oracle Corporation
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * available from http://www.virtualbox.org. This file is free software;
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * you can redistribute it and/or modify it under the terms of the GNU
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * General Public License (GPL) as published by the Free Software
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
ad13c20995d0a1aafbfbd35b2d698ef2ff5fbeefvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57bad04ee49aecc036182a51108288dae1957782vboxsync/* Qt includes: */
57bad04ee49aecc036182a51108288dae1957782vboxsync/* GUI includes: */
57bad04ee49aecc036182a51108288dae1957782vboxsync/** QIRichToolButton extension
57bad04ee49aecc036182a51108288dae1957782vboxsync * representing arrow tool-button with text-label,
57bad04ee49aecc036182a51108288dae1957782vboxsync * can be used as collaps/expand switch in various places. */
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Button states. */
57bad04ee49aecc036182a51108288dae1957782vboxsync enum ButtonState { ButtonState_Collapsed, ButtonState_Expanded };
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Constructor, passes @a pParent to the QIRichToolButton constructor. */
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Defines the @a icon for the @a buttonState. */
57bad04ee49aecc036182a51108288dae1957782vboxsync void setIconForButtonState(ButtonState buttonState, const QIcon &icon);
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Returns whether button-state is ButtonState_Expanded. */
57bad04ee49aecc036182a51108288dae1957782vboxsync bool isExpanded() const { return m_buttonState == ButtonState_Expanded; }
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Button-click handler. */
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Key-press-event handler. */
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Updates icon according button-state. */
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Holds the button-state. */
57bad04ee49aecc036182a51108288dae1957782vboxsync /** Holds icons for button-states. */
57bad04ee49aecc036182a51108288dae1957782vboxsync#endif /* !___QIArrowButtonSwitch_h___ */