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.
		
		
		
		
		
			
		
			
				
					
					
						
							45 lines
						
					
					
						
							1002 B
						
					
					
				
			
		
		
	
	
							45 lines
						
					
					
						
							1002 B
						
					
					
				| #pragma once
 | |
| 
 | |
| #include <optional>
 | |
| 
 | |
| #include <QDateTime>
 | |
| #include <QLayout>
 | |
| #include <QMouseEvent>
 | |
| #include <QPainter>
 | |
| #include <QSurfaceFormat>
 | |
| #include <QWidget>
 | |
| 
 | |
| QString getBrand();
 | |
| QString getBrandVersion();
 | |
| std::optional<QString> getDongleId();
 | |
| void configFont(QPainter &p, const QString &family, int size, const QString &style);
 | |
| void clearLayout(QLayout* layout);
 | |
| void setQtSurfaceFormat();
 | |
| QString timeAgo(const QDateTime &date);
 | |
| void swagLogMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
 | |
| void initApp();
 | |
| 
 | |
| 
 | |
| // convenience class for wrapping layouts
 | |
| class LayoutWidget : public QWidget {
 | |
|   Q_OBJECT
 | |
| 
 | |
| public:
 | |
|   LayoutWidget(QLayout *l, QWidget *parent = nullptr) : QWidget(parent) {
 | |
|     setLayout(l);
 | |
|   };
 | |
| };
 | |
| 
 | |
| class ClickableWidget : public QWidget {
 | |
|   Q_OBJECT
 | |
| 
 | |
| public:
 | |
|   ClickableWidget(QWidget *parent = nullptr);
 | |
| 
 | |
| protected:
 | |
|   void mouseReleaseEvent(QMouseEvent *event) override;
 | |
|   void paintEvent(QPaintEvent *) override;
 | |
| 
 | |
| signals:
 | |
|   void clicked();
 | |
| };
 | |
| 
 |