Exemplo n.º 1
0
class AptOfflineQtSaveZip(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_SaveZipFile()
        self.ui.setupUi(self)

        # Connect the clicked signal of the Browse button to it's slot
        QtCore.QObject.connect(self.ui.browseFilePathButton,
                               QtCore.SIGNAL("clicked()"),
                               self.popupDirectoryDialog)

        # Connect the clicked signal of the Save to it's Slot - accept
        QtCore.QObject.connect(self.ui.saveButton, QtCore.SIGNAL("clicked()"),
                               self.accept)

        # Connect the clicked signal of the Cancel to it's Slot - reject
        QtCore.QObject.connect(self.ui.cancelButton,
                               QtCore.SIGNAL("clicked()"), self.reject)

    def popupDirectoryDialog(self):
        # Popup a Directory selection box
        directory = QtGui.QFileDialog.getExistingDirectory(
            self, 'Open Directory')
        # Show the selected file path in the field marked for showing directory path
        self.ui.zipFilePath.setText(directory)
Exemplo n.º 2
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_SaveZipFile()
        self.ui.setupUi(self)

        # Connect the clicked signal of the Browse button to it's slot
        QtCore.QObject.connect(self.ui.browseFilePathButton,
                               QtCore.SIGNAL("clicked()"),
                               self.popupDirectoryDialog)

        # Connect the clicked signal of the Save to it's Slot - accept
        QtCore.QObject.connect(self.ui.saveButton, QtCore.SIGNAL("clicked()"),
                               self.accept)

        # Connect the clicked signal of the Cancel to it's Slot - reject
        QtCore.QObject.connect(self.ui.cancelButton,
                               QtCore.SIGNAL("clicked()"), self.reject)
Exemplo n.º 3
0
class AptOfflineQtSaveZip(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_SaveZipFile()
        self.ui.setupUi(self)
        
        # Connect the clicked signal of the Browse button to it's slot
        QtCore.QObject.connect(self.ui.browseFilePathButton, QtCore.SIGNAL("clicked()"),
                        self.popupDirectoryDialog )
                        
        # Connect the clicked signal of the Save to it's Slot - accept
        QtCore.QObject.connect(self.ui.saveButton, QtCore.SIGNAL("clicked()"),
                        self.accept )
                        
        # Connect the clicked signal of the Cancel to it's Slot - reject
        QtCore.QObject.connect(self.ui.cancelButton, QtCore.SIGNAL("clicked()"),
                        self.reject )
        
    def popupDirectoryDialog(self):
        # Popup a Directory selection box
        directory = QtGui.QFileDialog.getExistingDirectory(self, u'Open Directory')
        # Show the selected file path in the field marked for showing directory path
        self.ui.zipFilePath.setText(directory)
Exemplo n.º 4
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_SaveZipFile()
     self.ui.setupUi(self)
     
     # Connect the clicked signal of the Browse button to it's slot
     QtCore.QObject.connect(self.ui.browseFilePathButton, QtCore.SIGNAL("clicked()"),
                     self.popupDirectoryDialog )
                     
     # Connect the clicked signal of the Save to it's Slot - accept
     QtCore.QObject.connect(self.ui.saveButton, QtCore.SIGNAL("clicked()"),
                     self.accept )
                     
     # Connect the clicked signal of the Cancel to it's Slot - reject
     QtCore.QObject.connect(self.ui.cancelButton, QtCore.SIGNAL("clicked()"),
                     self.reject )