-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add remove copying button. * Add hyperlink for effect description, linking to ourocg. * Add img window. * Change travis from travis-ci.org to travis-ci.com.
- Loading branch information
1 parent
7aa1138
commit a671077
Showing
5 changed files
with
118 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#encoding:utf-8 | ||
import sys | ||
import os | ||
|
||
import requests | ||
from PyQt5.QtCore import QRect, Qt | ||
from PyQt5.QtWidgets import QApplication, QLabel, QPushButton, QWidget | ||
from PyQt5.QtGui import QPixmap | ||
|
||
|
||
class UI_PIC(QWidget): | ||
def __init__(self, parent=None, pic_id=0, pic_name = ""): | ||
self.parent = parent | ||
|
||
super(UI_PIC, self).__init__() | ||
self.setWindowTitle(pic_name) | ||
|
||
file_name = os.path.join(os.path.abspath('.'), "pics", "%d.png"%pic_id) | ||
if not os.path.exists(file_name): | ||
file_name = os.path.join(os.path.abspath('.'), "pics", "%d.jpg"%pic_id) | ||
if not os.path.exists(file_name): | ||
self.close() | ||
return | ||
png = QPixmap(file_name) | ||
width = png.width() | ||
height = png.height() | ||
self.setFixedSize(width, height) | ||
self.label = QLabel(self) | ||
self.label.setPixmap(png) | ||
|
||
def keyPressEvent(self, event): | ||
if event.key() == Qt.Key_Escape: | ||
self.close() | ||
|
||
def closeEvent(self, event): | ||
if self.parent is not None: | ||
self.parent.clear_img_signal.emit("close") | ||
|
||
if __name__ == "__main__": | ||
app = QApplication(sys.argv) | ||
m_window = UI_PIC() | ||
|
||
m_window.show() | ||
sys.exit(app.exec_()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"name": "v1.17.0", "version":170} | ||
{"name": "v1.18.0", "version":180} |