def __init__(self, parent=MyGui): super(DateForm, self).__init__(parent) self.setupUi(self) self.listWidget.itemSelectionChanged.connect(self.set_num_stocks) palette = self.lcdNumber.palette() palette.setColor(palette.WindowText, QtGui.QColor(85, 85, 255)) #palette.setColor(palette.Background, QtGui.QColor(0, 170, 255)) palette.setColor(palette.Light, QtGui.QColor(93, 93, 93)) palette.setColor(palette.Dark, QtGui.QColor(190, 190, 190)) self.lcdNumber.setPalette(palette) self.listWidget.setSelectionMode(QAbstractItemView.MultiSelection) self.setGeometry(10, 20, 521, 354) self.listWidget.setContextMenuPolicy(Qt.CustomContextMenu) self.listWidget.customContextMenuRequested.connect(self.listItemRightClicked) self.lineEdit = QtGui.QLineEdit(self) self.lineEdit.setEnabled(True) self.lineEdit.setGeometry(QtCore.QRect(20, 30, 60, 24)) self.lineEdit.setObjectName(gui._fromUtf8("lineEdit")) self.lineEdit.setText("") self.lineEdit.setPlaceholderText("Ticker") self.lineEdit.textChanged.connect(self.to_upper) self.add_button = QtGui.QToolButton(self) self.add_button.setGeometry(QtCore.QRect(85, 30, 26, 24)) self.add_button.setIcon(QtGui.QIcon("G:\\usr\\local\py\\bloomberg\\add.png")) self.add_button.clicked.connect(self.add_to_list) self.lineEdit.returnPressed.connect(self.add_to_list) self.dateEdit_2.setDate(QDate.currentDate()) self.lineEdit.setObjectName(gui._fromUtf8("add_button")) self.spinDateBox.setDisplayFormat("MMMM") self.__csv_file = None
def __init__(self, parent=None): super(MyGui, self).__init__(parent) self.setupUi(self) self.bigDataLoad.clicked.connect(self.openFileDialog) self.csvLoad.clicked.connect(self.loadCsvDialog) self.__model = m.Model() # we will remember a model instance self.__workers = [] self.connect(self, SIGNAL("progressChanged()"), self.changeProgressBar) self.progress = 0 # set initial progress bar value self.progressBar.setValue(0) self.label.setVisible(False) self.setWindowIcon(QtGui.QIcon("G:\\usr\\local\py\\bloomberg\\icon.png")) self.setWindowTitle("Trader Assistant") self.groupBox_2.hide() self.nextButton = QtGui.QPushButton(self.centralwidget) self.nextButton.setGeometry(QtCore.QRect(360, 60, 75, 23)) self.nextButton.setObjectName(gui._fromUtf8("nextButton")) self.nextButton.setText(gui._translate("MainWindow", "Next", None)) self.nextButton.clicked.connect(lambda: self.display_error("F**k")) self.pushButton.clicked.connect(self.skip_parsing) self.outputScreen.setReadOnly(True) self.more_button = QtGui.QToolButton(self.groupBox_2) self.more_button.setGeometry(QtCore.QRect(405, 50, 30, 24)) self.more_button.setIcon(QtGui.QIcon("G:\\usr\\local\py\\bloomberg\\question.png")) self.more_button.clicked.connect(self.display_description) #self.more_button.setObjectName(gui._fromUtf8("more")) self.more_button.setVisible(False) font = self.outputScreen.font() font.setFamily("Courier") font.setPointSize(9) self.sb = self.outputScreen.verticalScrollBar() self.first_window() self.all_stocks = True # It will be set by radio button self.pushButton_2.clicked.connect(self.move_to_window3) self.selected_strategy_index = 0 self.stock_names = [] self.actionExit.triggered.connect(self.close) self.checkBox_long = QtGui.QCheckBox(self.groupBox_2) self.checkBox_long.setGeometry(QtCore.QRect(30, 90, 20, 20)) self.label_check_1 = QtGui.QLabel(self.groupBox_2) self.label_check_1.setGeometry(QtCore.QRect(50, 90, 60, 20)) self.label_check_1.setText("Long only") self.checkBox_two_entries = QtGui.QCheckBox(self.groupBox_2) self.checkBox_two_entries.setGeometry(QtCore.QRect(180, 90, 20, 20)) self.label_check_2 = QtGui.QLabel(self.groupBox_2) self.label_check_2.setGeometry(QtCore.QRect(200, 90, 80, 20)) self.label_check_2.setText("Two entries") self.strategyComboBox.currentIndexChanged.connect(self.update_checkboxes)