Add files via upload
This commit is contained in:
parent
51a0d0cd6f
commit
1a6401e4ce
@ -12,6 +12,7 @@ del project_href[0]
|
||||
|
||||
KernelVerList = []
|
||||
|
||||
## Making complicated stuff to extract only the Kernal Version from the WebScrap
|
||||
for t in project_href[::2]:
|
||||
KernelVer = os.popen("echo " + t + " | cut -b 1-14 | cut -d'.' -f1,2,3 | sed 's/.arc//g' | sed 's/.ar//g' | sed 's/h//g' | sort -V")
|
||||
for i in KernelVer.read().split('\n')[::2]:
|
||||
|
28
main.py
28
main.py
@ -4,13 +4,10 @@ from PySide2.QtCore import *
|
||||
from getKernelInfo import KernelVerList
|
||||
import sys,os
|
||||
|
||||
Items = []
|
||||
#Items.append(KernelVer)
|
||||
|
||||
## Creating the MainWindow
|
||||
class Window(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.setWindowTitle("KernelChan")
|
||||
self.setFixedSize(600,600)
|
||||
|
||||
@ -35,6 +32,10 @@ class Window(QWidget):
|
||||
self.install = InstallProcess()
|
||||
self.install.show()
|
||||
|
||||
global InstallOutput
|
||||
InstallOutput = print("lol")
|
||||
|
||||
## Application Quit Popup
|
||||
def exitApp(self):
|
||||
askUser = QMessageBox.question(self, "Quit", "Are you Sure?", QMessageBox.Yes | QMessageBox.No)
|
||||
|
||||
@ -43,21 +44,31 @@ class Window(QWidget):
|
||||
elif askUser == QMessageBox.No:
|
||||
pass
|
||||
|
||||
## Window after Install Button was pressed
|
||||
class InstallProcess(QWidget):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, *args):
|
||||
QWidget.__init__(self, *args)
|
||||
|
||||
self.setWindowTitle("Kernel Installation")
|
||||
self.setFixedSize(400,300)
|
||||
self.center()
|
||||
|
||||
# create objects
|
||||
self.te = QTextBrowser()
|
||||
self.te.setHtml("InstallOutput")
|
||||
|
||||
# layout
|
||||
layout = QVBoxLayout(self)
|
||||
layout.addWidget(self.te)
|
||||
self.setLayout(layout)
|
||||
|
||||
def center(self):
|
||||
qRect = self.frameGeometry()
|
||||
centerPoint = QDesktopWidget().availableGeometry().center()
|
||||
qRect.moveCenter(centerPoint)
|
||||
self.move(qRect.topLeft())
|
||||
|
||||
|
||||
## Making an Button
|
||||
class Button(QPushButton):
|
||||
def setButton(self, name, x, y,function):
|
||||
button = QPushButton(name,self)
|
||||
@ -65,12 +76,14 @@ class Button(QPushButton):
|
||||
|
||||
button.clicked.connect(function)
|
||||
|
||||
## Making a List
|
||||
class List(QListWidget):
|
||||
def setList(self,x,y):
|
||||
self.aList = QListWidget(self)
|
||||
self.aList.resize(550,500)
|
||||
self.aList.move(x,y)
|
||||
|
||||
## Taking the output from getKernelInfo and put it in the List
|
||||
for i in KernelVerList:
|
||||
item = QListWidgetItem(i, self.aList)
|
||||
|
||||
@ -78,6 +91,7 @@ class List(QListWidget):
|
||||
font.setPixelSize(16)
|
||||
item.setFont(font)
|
||||
|
||||
|
||||
App = QApplication(sys.argv)
|
||||
window = Window()
|
||||
window.show()
|
||||
|
Loading…
Reference in New Issue
Block a user