Skip to content

Commit

Permalink
pose_quiz_UI
Browse files Browse the repository at this point in the history
Pose quiz interface for crawling team.

not done yet.
  • Loading branch information
hyummys committed Jul 3, 2021
1 parent 7413010 commit c0105e2
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 161 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/KT_Intern.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ImageQuiz/interface_Byimages/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions ImageQuiz/interface_Byimages/choose.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout, QVBoxLayout, QLabel
from PyQt5.QtCore import Qt

class MyApp(QWidget):

def __init__(self):
super().__init__()
self.initUI()

def initUI(self):

game1 = QPushButton('인물 퀴즈')
game1.setStyleSheet("color: green;"
"background-color: #7FFFD4")


game2 = QPushButton('포즈 퀴즈')
game2.setStyleSheet("color: green;"
"background-color: #7FFFD4")


txt = QLabel('게임 설명')
txt.setAlignment(Qt.AlignCenter)
txt.setStyleSheet("color: blue;"
"background-color: #87CEFA;"
"border-style: dashed;"
"border-width: 3px;"
"border-color: #1E90FF")

hbox = QHBoxLayout()
hbox.addStretch(1)
hbox.addWidget(game1)
hbox.addStretch(3)
hbox.addWidget(game2)
hbox.addStretch(1)

vbox = QVBoxLayout()
vbox.addStretch(3)
vbox.addWidget(txt)
vbox.addStretch(3)
vbox.addLayout(hbox)
vbox.addStretch(1)

self.setLayout(vbox)

self.setWindowTitle('choose game')
self.setGeometry(300, 300, 300, 200)
self.show()


if __name__ == '__main__':
app = QApplication(sys.argv)
ex = MyApp()
sys.exit(app.exec_())
Binary file added PoseQuiz/img/pose_answer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PoseQuiz/img/pose_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PoseQuiz/img/pose_pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions PoseQuiz/pose_game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import sys
import time
import urllib.request
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QVBoxLayout, QLCDNumber, QHBoxLayout, QGridLayout
from PyQt5.QtGui import QPixmap, QFont
from PyQt5.QtCore import Qt, QRunnable, QCoreApplication, QThreadPool, QTimer, QTime
import random



class UIApp(QWidget):


def __init__(self):
super().__init__()
self.initUI()

def initUI(self):
self.setStyleSheet(
"background-color: pink;")

# 이미지 오브젝트 받아옴 (딕셔너리 형태) 초기값은 신서유기8 페이지

self.obj = QPixmap('img\pose_intro')
self.obj = self.obj.scaledToWidth(1500)
self.img_label = QLabel()
self.img_label.setPixmap(self.obj)
self.img_label.setStyleSheet("background-color : transparent")
self.img_label.setAlignment(Qt.AlignCenter)

self.lcd = QLCDNumber()
self.lcd.setDigitCount(1)
self.lcd.setFixedWidth(200)
self.lcd.setFixedHeight(100)
self.lcd.setStyleSheet("""QLCDNumber {background-color: red;}""")

self.timer = QTimer(self)
self.timer.setInterval(1000)
self.timer.timeout.connect(self.timeout)
self.count=0

# UI layout
self.hbox = QHBoxLayout()
self.hbox.addWidget(self.img_label)

self.setLayout(self.hbox)

self.setWindowTitle('posing')
#self.move(400, 50)

self.show()


#입력 event 처리
def keyPressEvent(self, e):
#입력 상황
if e.key() == Qt.Key_Space:

#self.obj = QPixmap('img/pose_pic.png')
#self.obj = self.obj.scaledToHeight(900)
#self.img_label.setPixmap(self.obj)
self.img_label.setText("asdasdasdas")

self.lcd.display(1)
self.hbox.addWidget(self.lcd, 0, Qt.AlignTop)
self.repaint()

def timeout(self):
sender = self.sender()
#if id(sender) == id(self.timer):




if __name__ == '__main__':
app = QApplication(sys.argv)
ax = UIApp()
ax.show()
sys.exit(app.exec_())
161 changes: 0 additions & 161 deletions interface_Byimages/.idea/workspace.xml

This file was deleted.

0 comments on commit c0105e2

Please sign in to comment.