mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-05-20 16:59:36 +00:00
fix qt6
This commit is contained in:
parent
720ef60415
commit
14e4f547d7
@ -9,7 +9,6 @@ import QtQuick 2.15
|
|||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls.Material 2.15
|
import QtQuick.Controls.Material 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.15
|
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
id : basePopup
|
id : basePopup
|
||||||
@ -38,14 +37,6 @@ Dialog {
|
|||||||
color: backgroundColor
|
color: backgroundColor
|
||||||
radius: metrix.mm
|
radius: metrix.mm
|
||||||
}
|
}
|
||||||
|
|
||||||
DropShadow {
|
|
||||||
anchors.fill: parent
|
|
||||||
source: backCorner
|
|
||||||
color: "#80000000"
|
|
||||||
verticalOffset: 10
|
|
||||||
samples: 30
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _show() {
|
function _show() {
|
||||||
|
@ -9,7 +9,6 @@ import QtQuick 2.15
|
|||||||
import QtQuick.Controls.Material 2.15
|
import QtQuick.Controls.Material 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtGraphicalEffects 1.15
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
readonly property var model: notificationService;
|
readonly property var model: notificationService;
|
||||||
@ -24,10 +23,10 @@ Item {
|
|||||||
|
|
||||||
NotificationForm {
|
NotificationForm {
|
||||||
id: notyfyView
|
id: notyfyView
|
||||||
titleText : msg.title;
|
titleText : msg.title();
|
||||||
text: (msg)? msg.text: "";
|
text: (msg)? msg.text(): "";
|
||||||
img: (msg && msg.img.length)? msg.img: getDefaultImage((msg)? msg.type: 0);
|
img: (msg && msg.img().length)? msg.img(): getDefaultImage((msg)? msg.type(): 0);
|
||||||
type: (msg)? msg.type: 0;
|
type: (msg)? msg.type(): 0;
|
||||||
|
|
||||||
x: parent.width - width - margin;
|
x: parent.width - width - margin;
|
||||||
y: margin;
|
y: margin;
|
||||||
@ -38,9 +37,9 @@ Item {
|
|||||||
|
|
||||||
YesNoQuestion {
|
YesNoQuestion {
|
||||||
id: questionMsgBox
|
id: questionMsgBox
|
||||||
titleText : qst.title;
|
titleText : qst.title();
|
||||||
text: (qst)? qst.text: "";
|
text: (qst)? qst.text(): "";
|
||||||
img: (qst && qst.img.length)? qst.img: defImg;
|
img: (qst && qst.img().length)? qst.img(): defImg;
|
||||||
type: 0;
|
type: 0;
|
||||||
|
|
||||||
x: parent.width / 2 - width / 2;
|
x: parent.width / 2 - width / 2;
|
||||||
@ -51,13 +50,13 @@ Item {
|
|||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
if (model) {
|
if (model) {
|
||||||
model.questionComplete(true, qst.type)
|
model.questionComplete(true, qst.type())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onRejected: {
|
onRejected: {
|
||||||
if (model) {
|
if (model) {
|
||||||
model.questionComplete(false, qst.type)
|
model.questionComplete(false, qst.type())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,6 @@ class NOTIFYSERVICESHARED_EXPORT NotificationData
|
|||||||
Q_PROPERTY(QString title READ title)
|
Q_PROPERTY(QString title READ title)
|
||||||
Q_PROPERTY(int type READ type)
|
Q_PROPERTY(int type READ type)
|
||||||
|
|
||||||
QString _text;
|
|
||||||
QString _img;
|
|
||||||
QString _title;
|
|
||||||
int _type;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,6 +74,12 @@ public:
|
|||||||
bool operator ==(const NotificationData &righ);
|
bool operator ==(const NotificationData &righ);
|
||||||
bool operator !=(const NotificationData &righ);
|
bool operator !=(const NotificationData &righ);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString _text;
|
||||||
|
QString _img;
|
||||||
|
QString _title;
|
||||||
|
int _type;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif // NOTIFICATIONDATA_H
|
#endif // NOTIFICATIONDATA_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user