widgets: add ClippingRectangle

This commit is contained in:
outfoxxed 2024-11-17 17:05:44 -08:00
parent 68ba5005ce
commit fdc13023b7
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
9 changed files with 168 additions and 2 deletions

20
src/widgets/cliprect.hpp Normal file
View file

@ -0,0 +1,20 @@
#pragma once
#include <qcolor.h>
#include <qmetaobject.h>
#include <qnamespace.h>
#include <qqmlintegration.h>
#include <qtmetamacros.h>
class ClippingRectangleBorder {
Q_GADGET;
Q_PROPERTY(QColor color MEMBER color);
Q_PROPERTY(bool pixelAligned MEMBER pixelAligned);
Q_PROPERTY(int width MEMBER width);
QML_VALUE_TYPE(clippingRectangleBorder);
public:
QColor color = Qt::black;
bool pixelAligned = true;
int width = 0;
};