-
Notifications
You must be signed in to change notification settings - Fork 15
/
vectorbenderhelp.py
58 lines (46 loc) · 2.03 KB
/
vectorbenderhelp.py
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
52
53
54
55
56
57
58
# -*- coding: utf-8 -*-
"""
/***************************************************************************
CadHelp
A QGIS plugin
Store and restore layer visibilities
-------------------
begin : 2012-12-26
copyright : (C) 2012 by Olivier Dalang
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
# Import the PyQt and QGIS libraries
from qgis.PyQt import QtWidgets
from qgis.PyQt.QtWidgets import QTextBrowser, QVBoxLayout, QPushButton
from qgis.PyQt.QtCore import *
from qgis.PyQt.QtGui import *
from qgis.core import *
# Basic dependencies
import os.path
class VectorBenderHelp(QtWidgets.QDialog):
def __init__(self):
QtWidgets.QDialog.__init__(self)
self.setMinimumWidth(600)
self.setMinimumHeight(450)
self.helpFile = os.path.join(os.path.dirname(__file__),'README.html')
self.setWindowTitle('VectorBender')
txt = QTextBrowser()
txt.setReadOnly(True)
txt.setSearchPaths([os.path.dirname(__file__)])
txt.setOpenExternalLinks(True)
txt.setText( open(self.helpFile, 'r').read() )
cls = QPushButton('Close')
cls.pressed.connect(self.accept)
lay = QVBoxLayout()
lay.addWidget(txt)
lay.addWidget(cls)
self.setLayout(lay)