aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2017-04-25 21:17:59 -0400
committerq5sys <jt@obs-sec.com>2017-04-25 21:17:59 -0400
commitb2fbedf9c45d34aa3ce2080cf60e3a9fbe6ffb6a (patch)
tree91bf057afc04c56834a0f4f8dbd4e74f77edf16a /src-qt5/desktop-utils
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-b2fbedf9c45d34aa3ce2080cf60e3a9fbe6ffb6a.tar.gz
lumina-b2fbedf9c45d34aa3ce2080cf60e3a9fbe6ffb6a.tar.bz2
lumina-b2fbedf9c45d34aa3ce2080cf60e3a9fbe6ffb6a.zip
update qnotify for variable output
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-notify/main.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src-qt5/desktop-utils/lumina-notify/main.cpp b/src-qt5/desktop-utils/lumina-notify/main.cpp
index f9d76f28..c0e3bd05 100644
--- a/src-qt5/desktop-utils/lumina-notify/main.cpp
+++ b/src-qt5/desktop-utils/lumina-notify/main.cpp
@@ -1,19 +1,24 @@
//-------------------------------------------------
-// Created by q5sys
+// Created by q5sys (JT)
// Released under MIT License 2017-03-08
// A Simple GUI Dialog Program
//-------------------------------------------------
#include <QApplication>
#include <QMessageBox>
+#include <QDebug>
+#include <QTextStream>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
+ int answer;
QMessageBox *messageBox = new QMessageBox;
messageBox->setText(argv[1]);
- QPushButton *pushButtonOk = messageBox->addButton(argv[2], QMessageBox::YesRole);
- messageBox->QDialog::setWindowTitle(argv[3]);
- messageBox->show();
- return a.exec();
+ QPushButton *pushButtonOk = messageBox->addButton(argv[2], QMessageBox::AcceptRole);
+ QPushButton *pushButtonNo = messageBox->addButton(argv[3], QMessageBox::RejectRole);
+ messageBox->QDialog::setWindowTitle(argv[4]);
+ messageBox->show();
+ if(messageBox->exec() == QMessageBox::AcceptRole){ answer = 0; QTextStream cout(stdout); cout << answer;}
+ else { answer = 1; QTextStream cout(stdout); cout << answer;}
}
bgstack15