-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathabout.py.cs
51 lines (40 loc) · 1.35 KB
/
about.py.cs
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
43
44
45
46
47
48
49
50
51
namespace ArcSWAT3 {
// provide basic information about QSWAT, including version, and link to SWAT website.
public class AboutArcSWAT {
public object _dlg;
public object _gv;
public AboutArcSWAT(object gv) {
this._gv = gv;
this._dlg = aboutDialog();
this._dlg.setWindowFlags(this._dlg.windowFlags() & ~Qt.WindowContextHelpButtonHint);
if (this._gv) {
this._dlg.move(this._gv.aboutPos);
}
}
// Run the form.
public virtual void run(object version) {
this._dlg.SWATHomeButton.clicked.connect(this.openSWATUrl);
this._dlg.closeButton.clicked.connect(this._dlg.close);
var text = @"
ArcSWAT3 version: {0}
Python version: 3.9
Current restrictions:
- runs only in Windows
".format(version);
this._dlg.textBrowser.setText(text);
this._dlg.exec_();
if (this._gv) {
this._gv.aboutPos = this._dlg.pos();
}
}
// Open SWAT website.
public virtual void openSWATUrl() {
webbrowser.open("http://swat.tamu.edu/");
}
}
// -*- coding: utf-8 -*-
// Import the PyQt and QGIS libraries
// Import the code for the dialog
static about() {
}
}