src/widgets/headeredit.h

Sat, 17 Mar 2018 11:35:07 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 17 Mar 2018 11:35:07 +0200
changeset 1293
52732b1db3f0
parent 1292
66d2050d3bd9
child 1302
e14d7826373a
permissions
-rw-r--r--

removed the old Add History Line tool

1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include <QWidget>
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 #include "../lddocument.h"
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 class HeaderEdit : public QWidget
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 {
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 Q_OBJECT
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 public:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 HeaderEdit(QWidget* parent = nullptr);
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 ~HeaderEdit();
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 void setHeader(LDHeader* header);
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 LDHeader* header() const;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 bool hasValidHeader() const;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 signals:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 void descriptionChanged(const QString& newDescription);
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 void windingChanged(Winding newWinding);
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 private:
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22 class Ui_HeaderEdit& ui;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23 class HeaderHistoryModel* headerHistoryModel = nullptr;
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
24 LDHeader* m_header = nullptr;
1292
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
25
66d2050d3bd9 Part history can now be edited
Teemu Piippo <teemu@hecknology.net>
parents: 1291
diff changeset
26 void moveRows(int direction);
1291
9c570a30c98a Added basic header editing
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
27 };

mercurial