Created
December 2, 2015 13:48
-
-
Save peace098beat/d226bbf92a5bb56cf40d to your computer and use it in GitHub Desktop.
[一対比較評価] ver0.1たたき台を作成
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
| #! coding:utf-8 | |
| """ | |
| __init__.py | |
| Created by fifi (2015/12/02 20:24) | |
| """ | |
| def main(): | |
| pass | |
| if __name__ == "__main__": | |
| main() |
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
| paired_comparison | |
| version :0.0 | |
| files:C:\Users\fifi\Dropbox\10_GitRepository\Algorizm\Pair-Evaluation\wav\guitar_A4.wav | |
| files:C:\Users\fifi\Dropbox\10_GitRepository\Algorizm\Pair-Evaluation\wav\guitar_B4.wav | |
| files:C:\Users\fifi\Dropbox\10_GitRepository\Algorizm\Pair-Evaluation\wav\recorder_A4.wav | |
| files:C:\Users\fifi\Dropbox\10_GitRepository\Algorizm\Pair-Evaluation\wav\recorder_B4.wav | |
| Total File Number : 4 | |
| (0, 1) | |
| (0, 2) | |
| (0, 3) | |
| (1, 2) | |
| (1, 3) | |
| (2, 3) | |
| make pairing_table : number is 6 | |
| Check! pairing_table number: n*(n-1)/2 : 6 | |
| {'index': 0, 'right': 1, 'left': 0} | |
| [0, -1, 0, 0] | |
| [1, 0, 0, 0] | |
| [0, 0, 0, 0] | |
| [0, 0, 0, 0] | |
| {'index': 1, 'right': 2, 'left': 0} | |
| [0, -1, -1, 0] | |
| [1, 0, 0, 0] | |
| [1, 0, 0, 0] | |
| [0, 0, 0, 0] | |
| {'index': 2, 'right': 3, 'left': 0} | |
| [0, -1, -1, -1] | |
| [1, 0, 0, 0] | |
| [1, 0, 0, 0] | |
| [1, 0, 0, 0] | |
| {'index': 3, 'right': 2, 'left': 1} | |
| [0, -1, -1, -1] | |
| [1, 0, -1, 0] | |
| [1, 1, 0, 0] | |
| [1, 0, 0, 0] | |
| {'index': 4, 'right': 3, 'left': 1} | |
| [0, -1, -1, -1] | |
| [1, 0, -1, -1] | |
| [1, 1, 0, 0] | |
| [1, 1, 0, 0] | |
| {'index': 5, 'right': 3, 'left': 2} | |
| [0, -1, -1, -1] | |
| [1, 0, -1, -1] | |
| [1, 1, 0, -1] | |
| [1, 1, 1, 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
| #! coding:utf-8 | |
| """ | |
| gui_main | |
| 一対比較評価用アプリ | |
| Paired-Comparison | |
| Created by fifi (2015/12/02 20:24) | |
| """ | |
| __version__ = '0.0' | |
| import sys | |
| # PySide系モジュール | |
| from PySide.QtGui import * | |
| from UI_ import Ui_Widget | |
| class GUI(QWidget, Ui_Widget): | |
| def __init__(self, parent=None): | |
| QWidget.__init__(self) | |
| self.setupUi(self) | |
| if __name__ == "__main__": | |
| app = QApplication(sys.argv) | |
| win=GUI() | |
| win.show() | |
| sys.exit(app.exec_()) |
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
| #! coding:utf-8 | |
| """ | |
| __init__.py | |
| Created by fifi (2015/12/02 21:18) | |
| """ | |
| def main(): | |
| pass | |
| if __name__ == "__main__": | |
| main() |
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
| # -*- coding: utf-8 -*- | |
| """AudioManager.py | |
| アプリケーションのオーディオ機能を管理するクラス。 | |
| 再生・信号データ・Fsの管理。 | |
| Property: | |
| filename: ファイル名 | |
| filepath: ファイルパス | |
| sampwidth: ファイルサイズ[byte] | |
| channels: チャンネル数(モノラル:1,ステレオ:2) | |
| fs: サンプリングレート | |
| framsize: オーディオフレーム数 | |
| data: (Numpy Array)wavデータ配列 | |
| Method: | |
| play(): オーディオの再生 | |
| set_wav(): wavファイルを設定 | |
| Example: | |
| file_path_1 = './audio1.wav' | |
| am = AudioManager(file_path_1) | |
| am.play() | |
| w_data_1 = am.data | |
| filepath2 = './audio2.wav' | |
| am.set_wav(file_path_2) | |
| am.play() | |
| w_data_2 = am.data | |
| 問題点: | |
| bufferをint16でしか読みだせない。 | |
| つまり16bitオーディオしか呼び出せない。。 | |
| Reference: | |
| <wave: http://docs.python.jp/2/library/wave.html> | |
| """ | |
| import os.path | |
| import wave | |
| import numpy as np | |
| import pyaudio | |
| import sndhdr | |
| import warnings | |
| __author__ = "Tomoyuki Nohara <fififactory.com>" | |
| __status__ = "production" | |
| __version__ = "0.0.1" | |
| __date__ = "2015.00.00" | |
| class AudioManager(object): | |
| """docstring for AudioManager | |
| """ | |
| def __init__(self, filepath=None, ch=0): | |
| """ | |
| :param filepath: | |
| :param ch: 0:Left, 1:Right | |
| :return: | |
| """ | |
| self.filepath = None | |
| self.filename = None | |
| self.data_raw = None | |
| self.data = None | |
| self.data_n = None | |
| self.wf = None | |
| self.target_channel = ch | |
| if filepath is None: | |
| return | |
| # ファイルが存在しない場合は何もしない | |
| if os.path.exists(filepath): | |
| self.filepath = filepath | |
| self.filename = os.path.basename(self.filepath) | |
| self.set_wav(self.filepath) | |
| else: | |
| warnings.warn("file is not exists") | |
| def set_wav(self, filepath): | |
| """waveファイルの読み込み | |
| 疑似ファイル(画像等)を.wavで読み込ますと、waveパッケージの方で | |
| エラーを出力してしまう。ファイル拡張子のエラーに対応している。 | |
| """ | |
| # ファイルが存在しない場合は返却 | |
| if not os.path.exists(filepath): | |
| raise StandardError("File is not exist %s" % (filepath)) | |
| return | |
| # ファイル名の取得 | |
| filename = os.path.basename(filepath) | |
| if sndhdr.what(filepath)[0] is not 'wav': | |
| return | |
| # オーディオファイルであれば | |
| try: | |
| # ファイルオープン | |
| wf_tmp = wave.open(filepath, 'rb') | |
| except IOError: | |
| raise StandardError("Cant file load %s" % (filename)) | |
| else: | |
| # 正常時の処理 | |
| self.wf = wf_tmp | |
| self.filename = filename | |
| self.filepath = filepath | |
| self.__initialize() | |
| self.__set_data() | |
| finally: | |
| pass | |
| def play(self): | |
| """Play Audio by PyAudio | |
| wfの依存をなくす | |
| """ | |
| if self.wf is None: | |
| raise StandardError("AuudioManager cant play. wave object is None") | |
| print '== Audio:play run.. ==' | |
| p = pyaudio.PyAudio() | |
| def callback(in_data, frame_count, time_info, status): | |
| data = self.wf.readframes(frame_count) | |
| return (data, pyaudio.paContinue) | |
| stream = p.open( | |
| format=p.get_format_from_width(self.sampwidth), | |
| channels=self.channels, | |
| rate=self.fs, | |
| output=True, | |
| stream_callback=callback) | |
| # よくわからないが、非同期にするためにコメントアウト | |
| # 改善の余地あり | |
| stream.start_stream() | |
| while stream.is_active(): | |
| import time | |
| time.sleep(0.1) | |
| stream.stop_stream() | |
| stream.close() | |
| p.terminate() | |
| print '== Audio:play ..end ==' | |
| # ファイルポインタをオーディオストリームの先頭に戻す | |
| self.wf.rewind() | |
| def getFs(self): | |
| return self.fs | |
| def getData(self, mode='default'): | |
| if mode is "default": | |
| return self.data | |
| try: | |
| return self.data_raw, self.data, self.data_n | |
| except AttributeError: | |
| warnings.warn("AudioManager have not data_raw & data & data_n") | |
| return 0,0,0 | |
| def __initialize(self): | |
| """オーディオデータの基本情報 | |
| 互換性のため、プロパティとして定義 | |
| """ | |
| # サンプルサイズ[byte] | |
| self.sampwidth = self.wf.getsampwidth() | |
| # チャンネル数(モノラル:1,ステレオ:2) | |
| self.channels = self.wf.getnchannels() | |
| # サンプリングレート | |
| self.fs = self.wf.getframerate() | |
| # オーディオフレーム数 | |
| self.framsize = self.wf.getnframes() | |
| # wavデータの格納 | |
| self.__set_data() | |
| # wevファイル上納の表示 | |
| self.__printWaveInfo() | |
| def __set_data(self): | |
| """waveファイルをNumpy配列に変換し、 | |
| dataプロパティに格納 | |
| """ | |
| # ファイルポインタをオーディオストリームの先頭に戻す | |
| self.wf.rewind() | |
| # バッファの格納(バイト文字列) | |
| wbuffer = self.wf.readframes(self.wf.getnframes()) | |
| # ファイルポインタをオーディオストリームの先頭に戻す | |
| self.wf.rewind() | |
| # Numpy配列に変換 | |
| # バイナリなので2バイトずつ整数(-32768-32767)にまとめる | |
| bit = self.sampwidth * 8 | |
| if bit == 8: | |
| self.data_raw = np.frombuffer(wbuffer, dtype="int8") | |
| elif bit == 16: | |
| self.data_raw = np.frombuffer(wbuffer, dtype="int16") | |
| elif bit == 32: | |
| self.data_raw = np.frombuffer(wbuffer, dtype="int32") | |
| elif bit == 24: | |
| # 24bit データを読み込み、16bitに変換 | |
| self.data_raw = np.frombuffer(wbuffer,'b').reshape(-1,3)[:,1:].flatten().view('i2') | |
| else: | |
| print 'Wargning!!!!!!! bit %d is none' % bit | |
| # 1チャンネルに変更 | |
| self.data = [] | |
| if self.channels == 1: | |
| # print 'channel 1' | |
| self.data = self.data_raw[:] | |
| if self.channels == 2: | |
| # print 'channel 2' | |
| # self.data = self.data_raw[::2] | |
| # self.data = self.data_raw[1::2] | |
| if self.target_channel == 0: | |
| # 0ch:Left? | |
| self.data = self.data_raw[::2] | |
| elif self.target_channel == 1: | |
| # 1ch:Right? | |
| self.data = self.data_raw[1::2] | |
| # 正規化処理 | |
| amp = (2. ** 8) ** self.sampwidth / 2 -1 | |
| if self.sampwidth * 8 == 24: | |
| byte = 2 | |
| amp = (2.**8) ** byte / 2 -1 | |
| self.data_n = self.data / float(amp) | |
| def __printWaveInfo(self): | |
| """WAVEファイルの情報を表示""" | |
| print "" | |
| print "-------------------------" | |
| print "ファイル名:", self.filename | |
| print "チャンネル数:", self.wf.getnchannels() | |
| print "サンプル[Byte]:", self.wf.getsampwidth() | |
| print "サンプリング周波数:", self.wf.getframerate() | |
| print "フレーム数:", self.wf.getnframes() | |
| print "パラメータ:", self.wf.getparams() | |
| print "長さ(秒):", float(self.wf.getnframes()) / self.wf.getframerate() | |
| print "振幅幅", (2 ** 8) ** self.sampwidth / 2 -1 | |
| print "-------------------------" | |
| print "" | |
| def main(): | |
| path = './audio/sin_44100_24bit_stereo_5s.wav' | |
| am = AudioManager(path) | |
| am.play() | |
| data_raw, data, data_n = am.getData() | |
| print type(data) | |
| print len(data_raw), len(data), len(data_n) | |
| print max(data_raw), max(data), max(data_n) | |
| print min(data_raw), min(data), min(data_n) | |
| pass | |
| if __name__ == '__main__': | |
| main() |
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
| #! coding:utf-8 | |
| """ | |
| paired_comparison.py | |
| 一対比較評価 | |
| リーグ勝敗表を英語に訳すと league standing; game standing | |
| 順位表を英語に訳すと ranking table | |
| 組み合わせ表 pairing(対戦の)table of combination | |
| (2015/12/02) たたき台を作成 | |
| Created by fifi (2015/12/02 21:11) | |
| """ | |
| __version__ = '0.1' | |
| import os | |
| import sys | |
| import glob | |
| from logging import getLogger, StreamHandler, DEBUG, FileHandler | |
| import warnings | |
| from mod.AudioManager import AudioManager | |
| logger = getLogger(__name__) | |
| handler = StreamHandler() | |
| handler = FileHandler(filename='a.txt', mode='w') | |
| handler.setLevel(DEBUG) | |
| logger.setLevel(DEBUG) | |
| logger.addHandler(handler) | |
| logger.debug('paired_comparison') | |
| logger.debug('version :%s', __version__) | |
| class PairedComparison(object): | |
| """ | |
| 一対比較評価クラス | |
| """ | |
| RIGHT = 1 | |
| LEFT = 0 | |
| WIN_POINT = 1 | |
| LOSE_POINT = -1 | |
| DRAW_POINT = 0 | |
| def __init__(self): | |
| # 比較ファイル関連 | |
| self.dir = None | |
| self.wav_filepath_s = [] | |
| self.target_number = [-1, -1] # target_number[RIGHT] | |
| self.result_table = [] | |
| self.pairing_table = [] | |
| self.turn = 0 # 順番管理 [0, N-1] | |
| self.sample_num = -1 | |
| pass | |
| def set_dir(self, dir=None): | |
| self.dir = dir | |
| # フォルダの指定 | |
| search_path = os.path.join(dir, '*4.wav') | |
| self.wav_filepath_s = glob.glob(search_path) | |
| # 設定値 | |
| self.sample_num = len(self.wav_filepath_s) | |
| for f in self.wav_filepath_s: logger.debug('files:%s', f) | |
| logger.debug('Total File Number : %d', self.sample_num) | |
| def make_table(self): | |
| # 対戦表の作成 | |
| for i in range(self.sample_num): | |
| for j in range(i + 1, self.sample_num): | |
| self.pairing_table.append((i, j)) | |
| logger.debug((i, j)) | |
| self.pairing_table_num = len(self.pairing_table) | |
| logger.debug('make pairing_table : number is %d', len(self.pairing_table)) | |
| logger.debug('Check! pairing_table number: n*(n-1)/2 : %d', self.sample_num * (self.sample_num - 1) / 2) | |
| assert len(self.pairing_table) == self.sample_num * (self.sample_num - 1) / 2 | |
| # 勝敗テーブルの作成 | |
| self.result_table = [[0 for i in range(self.sample_num)] for j in range(self.sample_num)] | |
| pass | |
| def get_pair(self, index=None): | |
| pair = self.pairing_table[index] | |
| p = {'index': index, 'left': pair[self.LEFT], 'right': pair[self.RIGHT]} | |
| return p | |
| def set_issue(self, index=None, win=None): | |
| pair = self.pairing_table[index] | |
| left = pair[self.LEFT] | |
| right = pair[self.RIGHT] | |
| if win is 'left': | |
| self.result_table[left][right] = self.WIN_POINT | |
| self.result_table[right][left] = self.LOSE_POINT | |
| elif win is 'right': | |
| self.result_table[left][right] = self.LOSE_POINT | |
| self.result_table[right][left] = self.WIN_POINT | |
| elif win is 'draw': | |
| self.result_table[left][right] = self.DRAW_POINT | |
| self.result_table[right][left] = self.DRAW_POINT | |
| else: | |
| logger.debug('win is %s. win is [left, right, draw] only ', win) | |
| warnings.warn('win is None. win is [left, right, draw] only ') | |
| for i in range(self.sample_num): | |
| logger.debug(self.result_table[i]) | |
| def main(): | |
| # クラス作成 | |
| pair_com = PairedComparison() | |
| # フォルダの指定 | |
| wav_dir = os.path.normpath(os.path.join(os.path.dirname(sys.argv[0]), './wav')) | |
| search_path = os.path.join(wav_dir, '*.wav') | |
| wav_filepath_s = glob.glob(search_path) | |
| data_num = len(wav_filepath_s) | |
| pair_com.set_dir(dir=wav_dir) | |
| pair_com.make_table() | |
| for index in range(pair_com.pairing_table_num): | |
| pair = pair_com.get_pair(index) | |
| logger.debug(pair) | |
| if pair['left'] > pair['right']: | |
| pair_com.set_issue(index=index, win='left') | |
| elif pair['left'] == pair['right']: | |
| pair_com.set_issue(index=index, win='draw') | |
| else: | |
| pair_com.set_issue(index=index, win='right') | |
| # AudioManager(filepath=pair_com.wav_filepath_s[index]).play() | |
| # am = AudioManager(filepath=wav_filepath_s[0]) | |
| # am.play() | |
| # 作業開始 | |
| # 1回目 | |
| pass | |
| if __name__ == "__main__": | |
| main() |
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
| # -*- coding: utf-8 -*- | |
| # Form implementation generated from reading ui file 'UI_.ui' | |
| # | |
| # Created: Wed Dec 02 20:53:11 2015 | |
| # by: pyside-uic 0.2.15 running on PySide 1.2.2 | |
| # | |
| # WARNING! All changes made in this file will be lost! | |
| from PySide import QtCore, QtGui | |
| class Ui_Widget(object): | |
| def setupUi(self, Widget): | |
| Widget.setObjectName("Widget") | |
| Widget.resize(496, 343) | |
| self.verticalLayout_2 = QtGui.QVBoxLayout(Widget) | |
| self.verticalLayout_2.setObjectName("verticalLayout_2") | |
| self.horizontalLayout_6 = QtGui.QHBoxLayout() | |
| self.horizontalLayout_6.setObjectName("horizontalLayout_6") | |
| self.label = QtGui.QLabel(Widget) | |
| self.label.setObjectName("label") | |
| self.horizontalLayout_6.addWidget(self.label) | |
| self.lcdNumber = QtGui.QLCDNumber(Widget) | |
| self.lcdNumber.setObjectName("lcdNumber") | |
| self.horizontalLayout_6.addWidget(self.lcdNumber) | |
| self.progressBar = QtGui.QProgressBar(Widget) | |
| self.progressBar.setProperty("value", 24) | |
| self.progressBar.setObjectName("progressBar") | |
| self.horizontalLayout_6.addWidget(self.progressBar) | |
| self.verticalLayout_2.addLayout(self.horizontalLayout_6) | |
| spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
| self.verticalLayout_2.addItem(spacerItem) | |
| self.horizontalLayout = QtGui.QHBoxLayout() | |
| self.horizontalLayout.setObjectName("horizontalLayout") | |
| self.verticalLayout_3 = QtGui.QVBoxLayout() | |
| self.verticalLayout_3.setObjectName("verticalLayout_3") | |
| self.label_2 = QtGui.QLabel(Widget) | |
| self.label_2.setObjectName("label_2") | |
| self.verticalLayout_3.addWidget(self.label_2) | |
| self.pushButton = QtGui.QPushButton(Widget) | |
| self.pushButton.setObjectName("pushButton") | |
| self.verticalLayout_3.addWidget(self.pushButton) | |
| spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
| self.verticalLayout_3.addItem(spacerItem1) | |
| self.horizontalLayout.addLayout(self.verticalLayout_3) | |
| self.groupBox = QtGui.QGroupBox(Widget) | |
| self.groupBox.setObjectName("groupBox") | |
| self.verticalLayout = QtGui.QVBoxLayout(self.groupBox) | |
| self.verticalLayout.setObjectName("verticalLayout") | |
| self.groupBox_4 = QtGui.QGroupBox(self.groupBox) | |
| self.groupBox_4.setObjectName("groupBox_4") | |
| self.horizontalLayout_3 = QtGui.QHBoxLayout(self.groupBox_4) | |
| self.horizontalLayout_3.setObjectName("horizontalLayout_3") | |
| self.radioButton_6 = QtGui.QRadioButton(self.groupBox_4) | |
| self.radioButton_6.setObjectName("radioButton_6") | |
| self.horizontalLayout_3.addWidget(self.radioButton_6) | |
| self.radioButton_4 = QtGui.QRadioButton(self.groupBox_4) | |
| self.radioButton_4.setObjectName("radioButton_4") | |
| self.horizontalLayout_3.addWidget(self.radioButton_4) | |
| self.radioButton_5 = QtGui.QRadioButton(self.groupBox_4) | |
| self.radioButton_5.setObjectName("radioButton_5") | |
| self.horizontalLayout_3.addWidget(self.radioButton_5) | |
| self.verticalLayout.addWidget(self.groupBox_4) | |
| self.groupBox_3 = QtGui.QGroupBox(self.groupBox) | |
| self.groupBox_3.setObjectName("groupBox_3") | |
| self.horizontalLayout_4 = QtGui.QHBoxLayout(self.groupBox_3) | |
| self.horizontalLayout_4.setObjectName("horizontalLayout_4") | |
| self.radioButton_7 = QtGui.QRadioButton(self.groupBox_3) | |
| self.radioButton_7.setObjectName("radioButton_7") | |
| self.horizontalLayout_4.addWidget(self.radioButton_7) | |
| self.radioButton_8 = QtGui.QRadioButton(self.groupBox_3) | |
| self.radioButton_8.setObjectName("radioButton_8") | |
| self.horizontalLayout_4.addWidget(self.radioButton_8) | |
| self.radioButton_9 = QtGui.QRadioButton(self.groupBox_3) | |
| self.radioButton_9.setObjectName("radioButton_9") | |
| self.horizontalLayout_4.addWidget(self.radioButton_9) | |
| self.verticalLayout.addWidget(self.groupBox_3) | |
| self.groupBox_2 = QtGui.QGroupBox(self.groupBox) | |
| self.groupBox_2.setObjectName("groupBox_2") | |
| self.horizontalLayout_2 = QtGui.QHBoxLayout(self.groupBox_2) | |
| self.horizontalLayout_2.setObjectName("horizontalLayout_2") | |
| self.radioButton = QtGui.QRadioButton(self.groupBox_2) | |
| self.radioButton.setObjectName("radioButton") | |
| self.horizontalLayout_2.addWidget(self.radioButton) | |
| self.radioButton_2 = QtGui.QRadioButton(self.groupBox_2) | |
| self.radioButton_2.setObjectName("radioButton_2") | |
| self.horizontalLayout_2.addWidget(self.radioButton_2) | |
| self.radioButton_3 = QtGui.QRadioButton(self.groupBox_2) | |
| self.radioButton_3.setObjectName("radioButton_3") | |
| self.horizontalLayout_2.addWidget(self.radioButton_3) | |
| self.verticalLayout.addWidget(self.groupBox_2) | |
| self.horizontalLayout.addWidget(self.groupBox) | |
| self.verticalLayout_4 = QtGui.QVBoxLayout() | |
| self.verticalLayout_4.setObjectName("verticalLayout_4") | |
| self.label_3 = QtGui.QLabel(Widget) | |
| self.label_3.setObjectName("label_3") | |
| self.verticalLayout_4.addWidget(self.label_3) | |
| self.pushButton_3 = QtGui.QPushButton(Widget) | |
| self.pushButton_3.setObjectName("pushButton_3") | |
| self.verticalLayout_4.addWidget(self.pushButton_3) | |
| spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
| self.verticalLayout_4.addItem(spacerItem2) | |
| self.horizontalLayout.addLayout(self.verticalLayout_4) | |
| self.verticalLayout_2.addLayout(self.horizontalLayout) | |
| self.horizontalLayout_5 = QtGui.QHBoxLayout() | |
| self.horizontalLayout_5.setObjectName("horizontalLayout_5") | |
| self.pushButton_4 = QtGui.QPushButton(Widget) | |
| self.pushButton_4.setObjectName("pushButton_4") | |
| self.horizontalLayout_5.addWidget(self.pushButton_4) | |
| spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
| self.horizontalLayout_5.addItem(spacerItem3) | |
| self.pushButton_2 = QtGui.QPushButton(Widget) | |
| sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) | |
| sizePolicy.setHorizontalStretch(0) | |
| sizePolicy.setVerticalStretch(0) | |
| sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth()) | |
| self.pushButton_2.setSizePolicy(sizePolicy) | |
| self.pushButton_2.setObjectName("pushButton_2") | |
| self.horizontalLayout_5.addWidget(self.pushButton_2) | |
| self.verticalLayout_2.addLayout(self.horizontalLayout_5) | |
| spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | |
| self.verticalLayout_2.addItem(spacerItem4) | |
| self.retranslateUi(Widget) | |
| QtCore.QMetaObject.connectSlotsByName(Widget) | |
| def retranslateUi(self, Widget): | |
| Widget.setWindowTitle(QtGui.QApplication.translate("Widget", "Paired Comparison", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.label.setText(QtGui.QApplication.translate("Widget", "TextLabel", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.label_2.setText(QtGui.QApplication.translate("Widget", "TextLabel", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.pushButton.setText(QtGui.QApplication.translate("Widget", "PushButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.groupBox.setTitle(QtGui.QApplication.translate("Widget", "GroupBox", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.groupBox_4.setTitle(QtGui.QApplication.translate("Widget", "GroupBox", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_6.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_4.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_5.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.groupBox_3.setTitle(QtGui.QApplication.translate("Widget", "GroupBox", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_7.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_8.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_9.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.groupBox_2.setTitle(QtGui.QApplication.translate("Widget", "GroupBox", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_2.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.radioButton_3.setText(QtGui.QApplication.translate("Widget", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.label_3.setText(QtGui.QApplication.translate("Widget", "TextLabel", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.pushButton_3.setText(QtGui.QApplication.translate("Widget", "PushButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.pushButton_4.setText(QtGui.QApplication.translate("Widget", "PushButton", None, QtGui.QApplication.UnicodeUTF8)) | |
| self.pushButton_2.setText(QtGui.QApplication.translate("Widget", "PushButton", None, QtGui.QApplication.UnicodeUTF8)) | |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ui version="4.0"> | |
| <class>Widget</class> | |
| <widget class="QWidget" name="Widget"> | |
| <property name="geometry"> | |
| <rect> | |
| <x>0</x> | |
| <y>0</y> | |
| <width>496</width> | |
| <height>343</height> | |
| </rect> | |
| </property> | |
| <property name="windowTitle"> | |
| <string>Paired Comparison</string> | |
| </property> | |
| <layout class="QVBoxLayout" name="verticalLayout_2"> | |
| <item> | |
| <layout class="QHBoxLayout" name="horizontalLayout_6"> | |
| <item> | |
| <widget class="QLabel" name="label"> | |
| <property name="text"> | |
| <string>TextLabel</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QLCDNumber" name="lcdNumber"/> | |
| </item> | |
| <item> | |
| <widget class="QProgressBar" name="progressBar"> | |
| <property name="value"> | |
| <number>24</number> | |
| </property> | |
| </widget> | |
| </item> | |
| </layout> | |
| </item> | |
| <item> | |
| <spacer name="verticalSpacer_4"> | |
| <property name="orientation"> | |
| <enum>Qt::Vertical</enum> | |
| </property> | |
| <property name="sizeHint" stdset="0"> | |
| <size> | |
| <width>20</width> | |
| <height>40</height> | |
| </size> | |
| </property> | |
| </spacer> | |
| </item> | |
| <item> | |
| <layout class="QHBoxLayout" name="horizontalLayout"> | |
| <item> | |
| <layout class="QVBoxLayout" name="verticalLayout_3"> | |
| <item> | |
| <widget class="QLabel" name="label_2"> | |
| <property name="text"> | |
| <string>TextLabel</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QPushButton" name="pushButton"> | |
| <property name="text"> | |
| <string>PushButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <spacer name="verticalSpacer_2"> | |
| <property name="orientation"> | |
| <enum>Qt::Vertical</enum> | |
| </property> | |
| <property name="sizeHint" stdset="0"> | |
| <size> | |
| <width>20</width> | |
| <height>40</height> | |
| </size> | |
| </property> | |
| </spacer> | |
| </item> | |
| </layout> | |
| </item> | |
| <item> | |
| <widget class="QGroupBox" name="groupBox"> | |
| <property name="title"> | |
| <string>GroupBox</string> | |
| </property> | |
| <layout class="QVBoxLayout" name="verticalLayout"> | |
| <item> | |
| <widget class="QGroupBox" name="groupBox_4"> | |
| <property name="title"> | |
| <string>GroupBox</string> | |
| </property> | |
| <layout class="QHBoxLayout" name="horizontalLayout_3"> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_6"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_4"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_5"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| </layout> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QGroupBox" name="groupBox_3"> | |
| <property name="title"> | |
| <string>GroupBox</string> | |
| </property> | |
| <layout class="QHBoxLayout" name="horizontalLayout_4"> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_7"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_8"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_9"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| </layout> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QGroupBox" name="groupBox_2"> | |
| <property name="title"> | |
| <string>GroupBox</string> | |
| </property> | |
| <layout class="QHBoxLayout" name="horizontalLayout_2"> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_2"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QRadioButton" name="radioButton_3"> | |
| <property name="text"> | |
| <string>RadioButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| </layout> | |
| </widget> | |
| </item> | |
| </layout> | |
| </widget> | |
| </item> | |
| <item> | |
| <layout class="QVBoxLayout" name="verticalLayout_4"> | |
| <item> | |
| <widget class="QLabel" name="label_3"> | |
| <property name="text"> | |
| <string>TextLabel</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <widget class="QPushButton" name="pushButton_3"> | |
| <property name="text"> | |
| <string>PushButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <spacer name="verticalSpacer_3"> | |
| <property name="orientation"> | |
| <enum>Qt::Vertical</enum> | |
| </property> | |
| <property name="sizeHint" stdset="0"> | |
| <size> | |
| <width>20</width> | |
| <height>40</height> | |
| </size> | |
| </property> | |
| </spacer> | |
| </item> | |
| </layout> | |
| </item> | |
| </layout> | |
| </item> | |
| <item> | |
| <layout class="QHBoxLayout" name="horizontalLayout_5"> | |
| <item> | |
| <widget class="QPushButton" name="pushButton_4"> | |
| <property name="text"> | |
| <string>PushButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| <item> | |
| <spacer name="horizontalSpacer"> | |
| <property name="orientation"> | |
| <enum>Qt::Horizontal</enum> | |
| </property> | |
| <property name="sizeHint" stdset="0"> | |
| <size> | |
| <width>40</width> | |
| <height>20</height> | |
| </size> | |
| </property> | |
| </spacer> | |
| </item> | |
| <item> | |
| <widget class="QPushButton" name="pushButton_2"> | |
| <property name="sizePolicy"> | |
| <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | |
| <horstretch>0</horstretch> | |
| <verstretch>0</verstretch> | |
| </sizepolicy> | |
| </property> | |
| <property name="text"> | |
| <string>PushButton</string> | |
| </property> | |
| </widget> | |
| </item> | |
| </layout> | |
| </item> | |
| <item> | |
| <spacer name="verticalSpacer"> | |
| <property name="orientation"> | |
| <enum>Qt::Vertical</enum> | |
| </property> | |
| <property name="sizeHint" stdset="0"> | |
| <size> | |
| <width>20</width> | |
| <height>40</height> | |
| </size> | |
| </property> | |
| </spacer> | |
| </item> | |
| </layout> | |
| </widget> | |
| <resources/> | |
| <connections/> | |
| </ui> |
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
| RIFF�8 WAVEfmt @ �> |