summaryrefslogtreecommitdiff
path: root/src/gui/toolpalette.h
blob: 1876043c6cde8cddfbff217e6f9cf10cdc475f8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*!
  * A small window that lets the user select the current editing tool.
  */

#ifndef TOOLPALETTE_H
#define TOOLPALETTE_H

#include <QObject>
#include <QToolBar>
#include <QAction>
#include <QActionGroup>

class ToolPalette : public QToolBar
{
    Q_OBJECT
public:
    ToolPalette(QWidget *parent = 0);
    enum Tool {
        SELECT,
        VERTEX,
        EDGE,
        CROP
    };

    Tool currentTool() const;
    void setCurrentTool(Tool tool);
private:
    QActionGroup *tools;
    QAction *select;
    QAction *vertex;
    QAction *edge;
    QAction *crop;
};

#endif // TOOLPALETTE_H