Browse Source

First bits of code

A design mockup (in dia format) of the GUI is included and the initial code is written in PyQt4 (with python3).
Julien Rabier 12 years ago
parent
commit
7686737b85
2 changed files with 42 additions and 0 deletions
  1. 42 0
      main.py
  2. BIN
      mockup.dia

+ 42 - 0
main.py

@@ -0,0 +1,42 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+import sys
+from PyQt4 import QtGui, QtCore
+
+
+class MainClass(QtGui.QMainWindow):
+    
+    def __init__(self):
+        super(MainClass, self).__init__()
+        
+        self.initUI()
+        
+    def initUI(self):
+       
+        self.resize(250,250)
+        self.center()
+        self.setWindowTitle('FDN - VPN configuration generator')
+        self.statusBar().showMessage('Ready')
+        self.show()
+
+    def center(self):
+        
+        qr = self.frameGeometry()
+        cp = QtGui.QDesktopWidget().availableGeometry().center()
+        qr.moveCenter(cp)
+        self.move(qr.topLeft())
+
+ 
+        
+def main():
+    
+    app = QtGui.QApplication(sys.argv)
+    ex = MainClass()
+    sys.exit(app.exec_())
+
+
+if __name__ == '__main__':
+    main()
+
+

BIN
mockup.dia