src/widgets/circularsectioneditor.h

Fri, 21 Dec 2018 21:43:06 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 21 Dec 2018 21:43:06 +0200
changeset 1431
2e0e2c696605
parent 1417
ed39bfca7a67
permissions
-rw-r--r--

things

1417
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include <QWidget>
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 #include "../basics.h"
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 class CircularSectionEditor : public QWidget
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 {
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 Q_OBJECT
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 public:
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 explicit CircularSectionEditor(QWidget *parent = 0);
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 ~CircularSectionEditor();
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 CircularSection section();
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 void setSection(const CircularSection& newSection);
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 signals:
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 void sectionChanged(CircularSection);
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 private:
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 class Ui_CircularSectionEditor& ui;
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 int previousDivisions;
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23 Q_SLOT void updateFractionLabel();
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
24 Q_SLOT void segmentsChanged();
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
25 Q_SLOT void divisionsChanged();
ed39bfca7a67 refactored the segments/divisions editor in MainWindow to a new widget
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
26 };

mercurial