예제 #1
0
 def __init__(self, parent=MyGui):
     super(ChartsDialog, self).__init__(parent)
     self.setupUi(self)
     tabWidgetX = self.tabWidget.size().width() - 3
     tabWidgetY = self.tabWidget.size().height() - 10
     self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), gui._translate("Dialog", "Returns", None))
     self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), gui._translate("Dialog", "Unadjusted", None))
     self.okButton.clicked.connect(self.close)
     self.ticker = ""
     self.widget = matplotlibWidget(self.tab, tabWidgetX, tabWidgetY)
     self.widget_2 = matplotlibWidget(self.tab_2, tabWidgetX, tabWidgetY)
     self.widget_3 = matplotlibWidget(self.tab_3, tabWidgetX, tabWidgetY)
     self.beg = (2005, 1, 1)
     self.end = datetime.date.today()
     self.__ppp = None
     self.lookback = 0   # 0 - max, 1 - a year, 2 - 0.6 year, 3 - 1 month
     self.horizontalSlider.valueChanged.connect(self.register_lookback)
     #self.
     matplotlib.rcParams.update({'font.size': 8})
     self.__cur_widget = self.widget
     self.__y_type = "adj"
     self.tabWidget.currentChanged.connect(self.tab_changed)
예제 #2
0
 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)