forked from geosim/QAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qad_dsettings_cmd.py
69 lines (50 loc) · 2.29 KB
/
qad_dsettings_cmd.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
59
60
61
62
63
64
65
66
67
68
69
# -*- coding: utf-8 -*-
"""
/***************************************************************************
QAD Quantum Aided Design plugin
comando DSETTINGS per impostazione disegno
-------------------
begin : 2013-05-22
copyright : iiiii
email : hhhhh
developers : bbbbb aaaaa ggggg
***************************************************************************/
/***************************************************************************
* *
* 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 PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.core import QgsApplication
from qad_dsettings_dlg import QadDSETTINGSDialog
from qad_generic_cmd import QadCommandClass
from qad_msg import QadMsg
# Classe che gestisce il comando DSETTINGS
class QadDSETTINGSCommandClass(QadCommandClass):
def instantiateNewCmd(self):
""" istanzia un nuovo comando dello stesso tipo """
return QadDSETTINGSCommandClass(self.plugIn)
def getName(self):
return QadMsg.translate("Command_list", "DSETTINGS")
def getEnglishName(self):
return "DSETTINGS"
def connectQAction(self, action):
QObject.connect(action, SIGNAL("triggered()"), self.plugIn.runDSETTINGSCommand)
def getIcon(self):
return QIcon(":/plugins/qad/icons/dsettings.png")
def getNote(self):
# impostare le note esplicative del comando
return QadMsg.translate("Command_DSETTINGS", "Drafting Settings (snaps, etc.).")
def __init__(self, plugIn):
QadCommandClass.__init__(self, plugIn)
def run(self, msgMapTool = False, msg = None):
Form = QadDSETTINGSDialog(self.plugIn)
Form.exec_()
return True