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;
|
||||
}
|
||||
}
|
||||
16
Gui/Control/Common.h
Normal file
16
Gui/Control/Common.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class Common : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Common();
|
||||
|
||||
public:
|
||||
static int GetAcceptThree(QWidget* parent, const QString& notice, const QString& title);
|
||||
};
|
||||
|
||||
#endif // COMMON_H
|
||||
Reference in New Issue
Block a user