This commit is contained in:
Andrei Yankovich 2021-05-31 16:28:00 +03:00
parent 720ef60415
commit 14e4f547d7
3 changed files with 15 additions and 24 deletions

View File

@ -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() {

View File

@ -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())
}
}
}

View File

@ -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