up:远端不存在目录校验功能测试完毕。
This commit is contained in:
24
Gui/Control/Common.cpp
Normal file
24
Gui/Control/Common.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "Common.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
Common::Common() : QWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
int Common::GetAcceptThree(QWidget* parent, const QString& notice, const QString& title)
|
||||
{
|
||||
QMessageBox msgBox(parent);
|
||||
msgBox.setWindowTitle(notice);
|
||||
msgBox.setText(title);
|
||||
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::Cancel);
|
||||
int result = msgBox.exec();
|
||||
switch (result) {
|
||||
case QMessageBox::Yes:
|
||||
return 0;
|
||||
case QMessageBox::YesToAll:
|
||||
return 1;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user