| 
									
										
										
										
											2017-04-27 20:30:36 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2015-07-17 19:09:42 +03:00
										 |  |  | #ifndef QMLPROFILE_H
 | 
					
						
							|  |  |  | #define QMLPROFILE_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QQuickPaintedItem>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ProfileWidget2; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class QMLProfile : public QQuickPaintedItem | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	Q_OBJECT | 
					
						
							|  |  |  | 	Q_PROPERTY(QString diveId READ diveId WRITE setDiveId NOTIFY diveIdChanged) | 
					
						
							| 
									
										
										
										
											2016-01-13 03:05:06 +01:00
										 |  |  | 	Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-17 19:09:42 +03:00
										 |  |  | public: | 
					
						
							|  |  |  | 	explicit QMLProfile(QQuickItem *parent = 0); | 
					
						
							| 
									
										
										
										
											2015-11-12 01:43:13 +01:00
										 |  |  | 	virtual ~QMLProfile(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-17 19:09:42 +03:00
										 |  |  | 	void paint(QPainter *painter); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	QString diveId() const; | 
					
						
							|  |  |  | 	void setDiveId(const QString &diveId); | 
					
						
							| 
									
										
										
										
											2016-01-13 03:05:06 +01:00
										 |  |  | 	qreal devicePixelRatio() const; | 
					
						
							|  |  |  | 	void setDevicePixelRatio(qreal dpr); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-12-29 09:50:47 -08:00
										 |  |  | public slots: | 
					
						
							|  |  |  | 	void setMargin(int margin); | 
					
						
							| 
									
										
										
										
											2016-03-08 19:33:19 -08:00
										 |  |  | 	void screenChanged(QScreen *screen); | 
					
						
							| 
									
										
										
										
											2015-07-17 19:09:42 +03:00
										 |  |  | private: | 
					
						
							|  |  |  | 	QString m_diveId; | 
					
						
							| 
									
										
										
										
											2016-01-13 03:05:06 +01:00
										 |  |  | 	qreal m_devicePixelRatio; | 
					
						
							| 
									
										
										
										
											2015-12-29 09:50:47 -08:00
										 |  |  | 	int m_margin; | 
					
						
							| 
									
										
										
										
											2015-11-12 01:43:13 +01:00
										 |  |  | 	ProfileWidget2 *m_profileWidget; | 
					
						
							| 
									
										
										
										
											2016-03-08 19:33:19 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-17 19:09:42 +03:00
										 |  |  | signals: | 
					
						
							|  |  |  | 	void rightAlignedChanged(); | 
					
						
							|  |  |  | 	void diveIdChanged(); | 
					
						
							| 
									
										
										
										
											2016-01-13 03:05:06 +01:00
										 |  |  | 	void devicePixelRatioChanged(); | 
					
						
							| 
									
										
										
										
											2015-07-17 19:09:42 +03:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // QMLPROFILE_H
 |