This file contains hidden or 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
from Operation import Operation | |
class BoundariesOperation(Operation): | |
@staticmethod | |
def Execute(inputPixmap): | |
return inputPixmap |
This file contains hidden or 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
from PyQt5 import QtWidgets | |
from testCloseEventDialog import TestDialog | |
from testCloseEventMain import TestMain | |
class newDialog(QtWidgets.QDialog, TestDialog): | |
def __init__(self, *args, **kwargs): | |
QtWidgets.QDialog.__init__(self, *args, **kwargs) | |
self.setupUi(self) |
This file contains hidden or 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
from PySide.QtCore import Qt, QTimer | |
from PySide.QtGui import QLabel, QPainter, QApplication, QVBoxLayout, QFormLayout, QLineEdit, QSlider, \ | |
QHBoxLayout, QWidget, QPushButton, QRadioButton, QFontDialog, QColorDialog, QPalette | |
class MarqueeLabel(QLabel): | |
def __init__(self, parent=None): | |
QLabel.__init__(self, parent) | |
self.px = 0 | |
self.py = 15 |
This file contains hidden or 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
import sys | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
class Widget(QWidget): | |
def __init__(self, parent=None): | |
QWidget.__init__(self, parent) | |
self.setLayout(QGridLayout()) |
This file contains hidden or 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
from math import * | |
def f(x: float) -> float: | |
return exp(x) - sin(x) | |
def secant(x0: float, x1: float, f, epsilon: float, delta: float, iter_max: int) -> float: | |
fx0 = f(x0) | |
fx1 = f(x1) | |
print("{0} {1:.20f} {2:.20f}".format(0, x0, fx0)) | |
if iter_max == 0: |
This file contains hidden or 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
from PyQt5 import QtCore, QtGui, QtWidgets | |
class Ui_MainWindow(object): | |
def setupUi(self, MainWindow): | |
self.keyworddict = {} | |
self.count = {} | |
MainWindow.setObjectName("MainWindow") | |
MainWindow.resize(698, 581) | |
MainWindow.setMinimumSize(QtCore.QSize(698, 581)) | |
MainWindow.setMaximumSize(QtCore.QSize(698, 581)) |
This file contains hidden or 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
from random import random, randint | |
from PyQt5.QtCore import QAbstractListModel, Qt, QModelIndex, QVariant, QCoreApplication, QPointF, QUrl, QByteArray, \ | |
QTimer | |
from PyQt5.QtGui import QColor, QGuiApplication | |
from PyQt5.QtQml import QQmlApplicationEngine | |
class MarkerItem(object): | |
def __init__(self, position, color=QColor("red")): |
This file contains hidden or 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
import sys | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtWidgets import * | |
class FadeWidget(QWidget): | |
def __init__(self, parent = None): | |
QWidget.__init__(self, parent) | |
self._heightMask = self.height() |
This file contains hidden or 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
import sys | |
from PyQt5 import QtCore, QtSql, QtWidgets, QtGui | |
class SqlTableModel(QtSql.QSqlTableModel): | |
ExecuteRole = QtCore.Qt.UserRole + 1 | |
def __init__(self, parent=None, db = QtSql.QSqlDatabase()): | |
QtSql.QSqlTableModel.__init__(self, parent, db) | |
self.d = {} |
This file contains hidden or 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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2017-09-17T11:02:01 | |
# | |
#------------------------------------------------- | |
QT += core gui | |
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets sql |