summaryrefslogtreecommitdiff
path: root/src/gui/styleeditor.h
blob: 3a8dd9d50b6136a478d981c87dca71063164a135 (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
36
37
38
39
40
41
#ifndef STYLEEDITOR_H
#define STYLEEDITOR_H

#include "nodestyle.h"
#include "edgestyle.h"

#include <QMainWindow>
#include <QPushButton>
#include <QStandardItemModel>

namespace Ui {
class StyleEditor;
}

class StyleEditor : public QMainWindow
{
    Q_OBJECT

public:
    explicit StyleEditor(QWidget *parent = 0);
    ~StyleEditor();

    void showEvent(QShowEvent *) override;
    void updateFields();

public slots:
    void on_fillColor_clicked();
    void on_styleListView_clicked();
    void on_edgeStyleListView_clicked();

private:
    Ui::StyleEditor *ui;
    void setColor(QPushButton *btn, QColor col);
    QColor color(QPushButton *btn);
    QStandardItemModel *_nodeModel;
    QStandardItemModel *_edgeModel;
    NodeStyle *_activeNodeStyle;
    EdgeStyle *_activeEdgeStyle;
};

#endif // STYLEEDITOR_H