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