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
|
#! /usr/bin/python
#-*-coding: utf-8 -*-
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtXml import *
from qgis.core import *
from qgis.gui import *
import os,sys
import glob, re
import os.path
from MeP_BasicFunction import MeP_Function
class MeP_Form(QDialog, MeP_Function):
"Interface du plugin MeP"
pb_Validemodele = QPushButton()
pb_Validemodele.setText("&"+qApp.trUtf8("Charger le Modèle"))
#pb_Validemodele est un attribut?
#une variable globale ???
"Interface du plugin MeP"
def __init__(self, iface): #J'initialise ma classe "constructeur"
super(MeP_Form, self).__init__() #J'appelle le constructeur hérité de MeP_Form
#Une fenetre Dialogue
QDialog.__init__(self) #J'appelle le second constructeur hérité
self.iface=iface
self.setFixedSize(800, 600)
self.setWindowTitle("Mise en Page Automatique")
# J'avais défini mon interface dans le constructeur de ma classe,
# est-ce le bon endroit ?
bg_1=QButtonGroup()
rb_A4 = QRadioButton("A4")
rb_A3 = QRadioButton("A3")
bg_1.addButton(rb_A4)
bg_1.setId(rb_A4, 1)
bg_1.button(1).setChecked(True)
bg_1.addButton(rb_A3)
...
...
self.base2(pb_Validemodele)
# je peux maintenant appeler la méthode base2() héritée
# qui fait partie de mon objet c'est bien ca ?
# et je passe mon pushBouton en paramètre.
...
...
#SIGNAL_SLOT
self.connect(cb_orientation, SIGNAL("currentIndexChanged(const QString&)"), lbl_Redimension)
... |
Partager