-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexception.cpp
More file actions
42 lines (32 loc) · 1.28 KB
/
Copy pathexception.cpp
File metadata and controls
42 lines (32 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "exception.h"
namespace tmt
{
exception::exception(const QString &errorname):error(errorname){}
int exception::show_massage_box(QMessageBox::Icon icon,const QString &title) const{
int choose;
QMessageBox msg;
msg.setWindowTitle(title);
msg.setText(error);
msg.setIcon(icon);
msg.addButton("确定",QMessageBox::AcceptRole);
choose=msg.exec();
return choose;
}
int exception::show_massage_box(const QString &errorname,QMessageBox::Icon icon,const QString &title) const{
int choose;
QMessageBox msg;
msg.setWindowTitle(title);
msg.setText(errorname);
msg.setIcon(icon);
msg.addButton("确定",QMessageBox::AcceptRole);
choose=msg.exec();
return choose;
}
QString exception::errorname() const{
return error;
}
fileOpen_exception::fileOpen_exception(const QString &errorname,const QString &_filepath):exception(errorname),filepath(_filepath){}
filePath_exception::filePath_exception(const QString &errorname,const QString &_filepath):exception(errorname),filepath(_filepath){}
fileEmpty_exception::fileEmpty_exception(const QString &errorname,const QString &_filepath):exception(errorname),filepath(_filepath){}
path_exception::path_exception(const QString &errorname,const QString &_path):exception(errorname),path(_path){}
}