forked from quickshell/quickshell
		
	i3: fix Q_PROPERTY definitions for use with typegen
The regex currently can't handle line breaks
This commit is contained in:
		
							parent
							
								
									fd87be1355
								
							
						
					
					
						commit
						59298f6507
					
				
					 1 changed files with 3 additions and 12 deletions
				
			
		| 
						 | 
					@ -9,41 +9,32 @@ namespace qs::i3::ipc {
 | 
				
			||||||
///! I3/Sway monitors
 | 
					///! I3/Sway monitors
 | 
				
			||||||
class I3Monitor: public QObject {
 | 
					class I3Monitor: public QObject {
 | 
				
			||||||
	Q_OBJECT;
 | 
						Q_OBJECT;
 | 
				
			||||||
 | 
						// clang-format off
 | 
				
			||||||
	/// The ID of this monitor
 | 
						/// The ID of this monitor
 | 
				
			||||||
	Q_PROPERTY(qint32 id READ id NOTIFY idChanged);
 | 
						Q_PROPERTY(qint32 id READ id NOTIFY idChanged);
 | 
				
			||||||
	/// The name of this monitor
 | 
						/// The name of this monitor
 | 
				
			||||||
	Q_PROPERTY(QString name READ name NOTIFY nameChanged);
 | 
						Q_PROPERTY(QString name READ name NOTIFY nameChanged);
 | 
				
			||||||
	/// Wether this monitor is turned on or not
 | 
						/// Wether this monitor is turned on or not
 | 
				
			||||||
	Q_PROPERTY(bool power READ power NOTIFY powerChanged);
 | 
						Q_PROPERTY(bool power READ power NOTIFY powerChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// The current workspace
 | 
						/// The current workspace
 | 
				
			||||||
	Q_PROPERTY(qs::i3::ipc::I3Workspace* focusedWorkspace READ focusedWorkspace NOTIFY
 | 
						Q_PROPERTY(qs::i3::ipc::I3Workspace* focusedWorkspace READ focusedWorkspace NOTIFY focusedWorkspaceChanged);
 | 
				
			||||||
	               focusedWorkspaceChanged);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// The X coordinate of this monitor inside the monitor layout
 | 
						/// The X coordinate of this monitor inside the monitor layout
 | 
				
			||||||
	Q_PROPERTY(qint32 x READ x NOTIFY xChanged);
 | 
						Q_PROPERTY(qint32 x READ x NOTIFY xChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// The Y coordinate of this monitor inside the monitor layout
 | 
						/// The Y coordinate of this monitor inside the monitor layout
 | 
				
			||||||
	Q_PROPERTY(qint32 y READ y NOTIFY yChanged);
 | 
						Q_PROPERTY(qint32 y READ y NOTIFY yChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// The width in pixels of this monitor
 | 
						/// The width in pixels of this monitor
 | 
				
			||||||
	Q_PROPERTY(qint32 width READ width NOTIFY widthChanged);
 | 
						Q_PROPERTY(qint32 width READ width NOTIFY widthChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// The height in pixels of this monitor
 | 
						/// The height in pixels of this monitor
 | 
				
			||||||
	Q_PROPERTY(qint32 height READ height NOTIFY heightChanged);
 | 
						Q_PROPERTY(qint32 height READ height NOTIFY heightChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// The scaling factor of this monitor, 1 means it runs at native resolution
 | 
						/// The scaling factor of this monitor, 1 means it runs at native resolution
 | 
				
			||||||
	Q_PROPERTY(qreal scale READ scale NOTIFY scaleChanged);
 | 
						Q_PROPERTY(qreal scale READ scale NOTIFY scaleChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// Whether this monitor is currently in focus
 | 
						/// Whether this monitor is currently in focus
 | 
				
			||||||
	Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged);
 | 
						Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/// Last JSON returned for this monitor, as a JavaScript object.
 | 
						/// Last JSON returned for this monitor, as a JavaScript object.
 | 
				
			||||||
	///
 | 
						///
 | 
				
			||||||
	/// This updates every time Quickshell receives an `output` event from i3/Sway
 | 
						/// This updates every time Quickshell receives an `output` event from i3/Sway
 | 
				
			||||||
	Q_PROPERTY(QVariantMap lastIpcObject READ lastIpcObject NOTIFY lastIpcObjectChanged);
 | 
						Q_PROPERTY(QVariantMap lastIpcObject READ lastIpcObject NOTIFY lastIpcObjectChanged);
 | 
				
			||||||
 | 
						// clang-format on
 | 
				
			||||||
	QML_ELEMENT;
 | 
						QML_ELEMENT;
 | 
				
			||||||
	QML_UNCREATABLE("I3Monitors must be retrieved from the I3Ipc object.");
 | 
						QML_UNCREATABLE("I3Monitors must be retrieved from the I3Ipc object.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue