You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					40 lines
				
				737 B
			
		
		
			
		
	
	
					40 lines
				
				737 B
			| 
								 
											5 years ago
										 
									 | 
							
								#include <array>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include <QLabel>
							 | 
						||
| 
								 | 
							
								#include <QWidget>
							 | 
						||
| 
								 | 
							
								#include <QPixmap>
							 | 
						||
| 
								 | 
							
								#include <QProgressBar>
							 | 
						||
| 
								 | 
							
								#include <QSocketNotifier>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include <QVariantAnimation>
							 | 
						||
| 
								 | 
							
								#include <QOpenGLWidget>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								constexpr int spinner_fps = 30;
							 | 
						||
| 
								 | 
							
								constexpr QSize spinner_size = QSize(360, 360);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class TrackWidget : public QWidget  {
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								  Q_OBJECT
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 | 
							
								  TrackWidget(QWidget *parent = nullptr);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								private:
							 | 
						||
| 
								 | 
							
								  void paintEvent(QPaintEvent *event) override;
							 | 
						||
| 
								 | 
							
								  std::array<QPixmap, spinner_fps> track_imgs;
							 | 
						||
| 
								 | 
							
								  QPixmap comma_img;
							 | 
						||
| 
								 | 
							
								  QVariantAnimation m_anim;
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class Spinner : public QWidget {
							 | 
						||
| 
								 | 
							
								  Q_OBJECT
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 | 
							
								  explicit Spinner(QWidget *parent = 0);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								private:
							 | 
						||
| 
								 | 
							
								  QLabel *text;
							 | 
						||
| 
								 | 
							
								  QProgressBar *progress_bar;
							 | 
						||
| 
								 | 
							
								  QSocketNotifier *notifier;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								public slots:
							 | 
						||
| 
								 | 
							
								  void update(int n);
							 | 
						||
| 
								 | 
							
								};
							 |