Difference between revisions of "Avdump GUI"

Jump to navigation Jump to search
293 bytes added ,  14:18, 3 June 2011
m
m
Line 50: Line 50:


==Source==
==Source==
This GUI was coded purely in python using wxpython for the framework.
This GUI was coded purely in python using pyqt for the framework.


===avdump2gui.pyw===
<pre  style="font-size: 60%;">
<pre  style="font-size: 60%;">
import sys, os, platform, subprocessw, ConfigParser, string, unicodedata
import sys, os, platform, subprocessw, ConfigParser, string, unicodedata
Line 217: Line 218:


     def _run(self):
     def _run(self):
        username = unicode(self._ui.username.text())
        apikey  = unicode(self._ui.apikey.text())
         if self._ui.datatable.rowCount() == 0:
         if self._ui.datatable.rowCount() == 0:
             QtGui.QMessageBox.information(self, "Error!", "No files to scan in list.", QtGui.QMessageBox.Ok)
             QtGui.QMessageBox.information(self, "Error!", "No files to scan in list.", QtGui.QMessageBox.Ok)
Line 222: Line 226:
         elif not os.path.exists('avdump2cl.exe'):
         elif not os.path.exists('avdump2cl.exe'):
             QtGui.QMessageBox.information(self, "Error!", "Avdump2cl.exe not found.", QtGui.QMessageBox.Ok)
             QtGui.QMessageBox.information(self, "Error!", "Avdump2cl.exe not found.", QtGui.QMessageBox.Ok)
            return
        elif len(username) == 0 or len(apikey) == 0:
            QtGui.QMessageBox.information(self, "Error!", "No username and/or api-key specified!", QtGui.QMessageBox.Ok)
             return
             return


Line 234: Line 241:
             self._ui.progressBar.setValue(self._calculate_progress())
             self._ui.progressBar.setValue(self._calculate_progress())
             self._disable_elements()
             self._disable_elements()
            username = unicode(self._ui.username.text())
            apikey  = unicode(self._ui.apikey.text())
             done    = ''
             done    = ''
             if self._ui.done.isChecked() is True:
             if self._ui.done.isChecked() is True:
Line 242: Line 247:
             exp      = ''
             exp      = ''
             if self._ui.exp.isChecked() is True:
             if self._ui.exp.isChecked() is True:
                if not os.path.exists('exports'):
                    os.mkdir('exports')
                 exp  = '-exp:' + self._export_filename
                 exp  = '-exp:' + self._export_filename
                  
                  

Navigation menu

MediaWiki spam blocked by CleanTalk.