aboutsummaryrefslogtreecommitdiff
path: root/src/settings_pane.hh
blob: 8b926907ef04d6f7b735d437fc1c7020ced90c87 (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
42
43
44
#ifndef SETTINGS_PANE_HH
#define SETTINGS_PANE_HH

#include <QWidget>
#include <QListWidget>


class BookmarkItem : public QListWidgetItem {
	const int frame;

public:
	BookmarkItem(QString text, int frame)
		:QListWidgetItem(text),
		 frame(frame) {}

	int getFrame() const { return frame; }
};


class SettingsPane : public QWidget {
	Q_OBJECT

	QListWidget *collisions = nullptr;
	QListWidget *speeding_violations = nullptr;

public:
	SettingsPane(QWidget *parent=nullptr);

public slots:
	void addCollision(int idA, int idB, int frame);
	void addSpeedingViolation(int id, double speed, int frame);
	void clearCollisions();
	void clearSpeedingViolations();

signals:
	void sphereRadiusChanged(double sqRadius);
	void speedLimitChanged(double limit);
	void toggledTrajectories(int shown);
	void toggledGuides(int shown);
	void bookmarkClicked(int frame);
};


#endif