summaryrefslogtreecommitdiffstatshomepage
path: root/TypeEditor.h
blob: 04ed954b368571dd408c0d7d7a5e1920b4ea4cc6 (plain) (blame)
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
#ifndef TYPEEDITOR_H
#define TYPEEDITOR_H

#include <QMainWindow>
class QGraphicsView;
class QToolButton;
class DocumentItem;

class TypeEditor : public QMainWindow
{
	Q_OBJECT

public:
	TypeEditor(const QString &secondText, bool notes, const QString &title, QWidget *parent = 0);
	QString result() const;
	void saveState(const QString &key) const;
	void restoreState(const QString &key, bool fromText = false);
	void finish();

protected:
	void resizeEvent(QResizeEvent *event);
	void closeEvent(QCloseEvent *event);

private:
	QGraphicsView *m_view;
	DocumentItem *m_doc;
	QToolButton *m_doneButton;

private slots:
	void fitToWidth();

signals:
	void finished();
};

#endif // TYPEEDITOR_H