mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-11 09:36:37 +00:00
46 lines
902 B
C++
46 lines
902 B
C++
#ifndef CSV_WIDGET_SCENETOOL_MODE_H
|
|
#define CSV_WIDGET_SCENETOOL_MODE_H
|
|
|
|
#include "scenetool.hpp"
|
|
|
|
#include <map>
|
|
|
|
class QHBoxLayout;
|
|
|
|
namespace CSVWidget
|
|
{
|
|
class SceneToolbar;
|
|
class PushButton;
|
|
|
|
///< \brief Mode selector tool
|
|
class SceneToolMode : public SceneTool
|
|
{
|
|
Q_OBJECT
|
|
|
|
QWidget *mPanel;
|
|
QHBoxLayout *mLayout;
|
|
std::map<PushButton *, std::string> mButtons; // widget, id
|
|
int mButtonSize;
|
|
int mIconSize;
|
|
|
|
public:
|
|
|
|
SceneToolMode (SceneToolbar *parent);
|
|
|
|
virtual void showPanel (const QPoint& position);
|
|
|
|
void addButton (const std::string& icon, const std::string& id,
|
|
const std::string& tooltip = "");
|
|
|
|
signals:
|
|
|
|
void modeChanged (const std::string& id);
|
|
|
|
private slots:
|
|
|
|
void selected();
|
|
};
|
|
}
|
|
|
|
#endif
|