1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 13:23:53 +00:00
openmw/apps/opencs/view/widget/modebutton.hpp

37 lines
988 B
C++
Raw Normal View History

#ifndef CSV_WIDGET_MODEBUTTON_H
#define CSV_WIDGET_MODEBUTTON_H
#include "pushbutton.hpp"
class QMenu;
namespace CSVWidget
{
class SceneToolbar;
/// \brief Specialist PushButton of Type_Mode for use in SceneToolMode
class ModeButton : public PushButton
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2022-09-22 18:26:05 +00:00
public:
ModeButton(const QIcon& icon, const QString& tooltip = "", QWidget* parent = nullptr);
2022-09-22 18:26:05 +00:00
/// Default-Implementation: do nothing
virtual void activate(SceneToolbar* toolbar);
2022-09-22 18:26:05 +00:00
/// Default-Implementation: do nothing
virtual void deactivate(SceneToolbar* toolbar);
2022-09-22 18:26:05 +00:00
/// Add context menu items to \a menu. Default-implementation: return false
///
/// \attention menu can be a 0-pointer
///
/// \return Have there been any menu items to be added (if menu is 0 and there
/// items to be added, the function must return true anyway.
virtual bool createContextMenu(QMenu* menu);
};
}
#endif