Example #1
0
    def __init_buy_date(cls):
        cls.grid_layout_widget_3.setGeometry(QRect(160, 110, 101, 41))
        cls.grid_layout_widget_3.setObjectName(_fromUtf8("gridLayoutWidget_3"))
        cls.grid_layout_3.setObjectName(_fromUtf8("gridLayout_3"))
        cls.buy_date_title.setFont(WindowCons.get_font(bold=True))
        cls.buy_date_title.setTextFormat(Qt.PlainText)
        cls.buy_date_title.setAlignment(Qt.AlignCenter)
        cls.buy_date_title.setObjectName(_fromUtf8("buy_date_title"))
        cls.grid_layout_3.addWidget(cls.buy_date_title, 0, 0, 1, 1)

        cls.grid_layout_widget_15.setGeometry(QRect(280, 110, 141, 41))
        cls.grid_layout_widget_15.setObjectName(
            _fromUtf8("gridLayoutWidget_15"))
        cls.grid_layout_15.setObjectName(_fromUtf8("gridLayout_15"))
        cls.buy_date_input.setEnabled(True)
        size_policy = WindowCons.get_size_policy(cls.buy_date_input)
        cls.buy_date_input.setSizePolicy(size_policy)
        cls.buy_date_input.setFont(
            WindowCons.get_font(family=WindowCons.YAHEI_LIGHT_FAMILY, size=12))
        cls.buy_date_input.setWrapping(False)
        cls.buy_date_input.setCalendarPopup(True)
        cls.buy_date_input.setFrame(False)
        cls.buy_date_input.setDate(
            QDate(datetime.datetime.date(datetime.datetime.now())))
        cls.buy_date_input.setObjectName(_fromUtf8("buy_date_input"))
        cls.grid_layout_15.addWidget(cls.buy_date_input, 0, 0, 1, 1)
Example #2
0
    def set_style_sheet(cls):
        """设置样式"""
        # cls.query_button.setStyleSheet(WindowCons.button_style())
        cls.save_button.setStyleSheet(WindowCons.button_style())
        # cls.compute_button.setStyleSheet(WindowCons.button_style())
        cls.add_record.setStyleSheet(WindowCons.background_image())

        cls.title.setStyleSheet(WindowCons.LIGHT_BLUE_STYLE)
        cls.sale_num_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.share_name_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.sale_price_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.buy_date_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.win_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.buy_num_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.can_sale_num_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.have_num_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.share_code_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.buy_price_title.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.have_avg_price.setStyleSheet(WindowCons.WHITE_STYLE)
        cls.sale_date_title.setStyleSheet(WindowCons.WHITE_STYLE)
        # cls.text_edit.setAttribute(Qt.WA_TranslucentBackground, True)
        # cls.text_edit.repaint()
        cls.text_edit.setStyleSheet(WindowCons.TRANSPARENT)
        palette1 = QPalette()
        palette1.setBrush(
            cls.add_record.backgroundRole(),
            QBrush(QPixmap(':backgroud.png').scaled(cls.add_record.size())))
        cls.add_record.setPalette(palette1)
        cls.add_record.setStyleSheet(WindowCons.background_image())
Example #3
0
 def init_button(cls):
     """初始化按钮"""
     # cls.grid_layout_widget_26.setGeometry(QRect(160, 390, 121, 50))
     # cls.grid_layout_widget_26.setObjectName(_fromUtf8("grid_layout_widget_26"))
     # cls.grid_layout_26.setObjectName(_fromUtf8("grid_layout_26"))
     # cls.query_button.setFont(WindowCons.get_font(bold=True))
     # cls.query_button.setFlat(False)
     # cls.query_button.setObjectName(_fromUtf8("query_button"))
     # cls.grid_layout_26.addWidget(cls.query_button, 0, 0, 1, 1)
     # cls.grid_layout_widget_27.setGeometry(QRect(300, 390, 121, 50))
     # cls.grid_layout_widget_27.setObjectName(_fromUtf8("grid_layout_widget_27"))
     # cls.grid_layout_27.setObjectName(_fromUtf8("grid_layout_27"))
     # cls.compute_button.setFont(WindowCons.get_font(bold=True))
     # cls.compute_button.setObjectName(_fromUtf8("compute_button"))
     # cls.grid_layout_27.addWidget(cls.compute_button, 0, 0, 1, 1)
     cls.grid_layout_widget_28.setGeometry(QRect(440, 390, 121, 50))
     cls.grid_layout_widget_28.setObjectName(
         _fromUtf8("grid_layout_widget_28"))
     cls.grid_layout_28.setObjectName(_fromUtf8("grid_layout_28"))
     cls.save_button.setFont(WindowCons.get_font(bold=True))
     cls.save_button.setObjectName(_fromUtf8("save_button"))
     cls.grid_layout_28.addWidget(cls.save_button, 0, 0, 1, 1)
     cls.grid_layout_widget_29.setGeometry(QRect(570, 390, 160, 73))
     cls.grid_layout_widget_29.setObjectName(
         _fromUtf8("grid_layout_widget_29"))
     cls.grid_layout_29.setObjectName(_fromUtf8("grid_layout_29"))
     cls.text_edit.setEnabled(False)
     cls.text_edit.setReadOnly(True)
     cls.text_edit.setFrameShape(False)
     cls.text_edit.setObjectName(_fromUtf8("textEdit"))
     cls.grid_layout_29.addWidget(cls.text_edit, 0, 0, 1, 1)
Example #4
0
 def __init_share_code(cls):
     cls.grid_layout_widget_2.setGeometry(QRect(160, 60, 101, 41))
     cls.grid_layout_widget_2.setObjectName(_fromUtf8("gridLayoutWidget_2"))
     cls.grid_layout_2.setObjectName(_fromUtf8("gridLayout_2"))
     cls.share_code_title.setFont(WindowCons.get_font(bold=True))
     cls.share_code_title.setTextFormat(Qt.PlainText)
     cls.share_code_title.setAlignment(Qt.AlignCenter)
     cls.share_code_title.setObjectName(_fromUtf8("share_code_title"))
     cls.grid_layout_2.addWidget(cls.share_code_title, 0, 0, 1, 1)
     cls.grid_layout_widget_14.setGeometry(QRect(280, 60, 141, 50))
     cls.grid_layout_widget_14.setObjectName(
         _fromUtf8("gridLayoutWidget_14"))
     cls.grid_layout_14.setObjectName(_fromUtf8("gridLayout_14"))
     cls.share_code_input.setFont(
         WindowCons.get_font(weight=50, family=WindowCons.YAHEI_UI_FAMILY))
     cls.share_code_input.setObjectName(_fromUtf8("share_code_input"))
     cls.share_code_input.setValidator(RegExpValidator())
     cls.grid_layout_14.addWidget(cls.share_code_input, 0, 0, 1, 1)
Example #5
0
    def __init_buy_num(cls):
        cls.grid_layout_widget_5.setGeometry(QRect(160, 210, 101, 41))
        cls.grid_layout_widget_5.setObjectName(_fromUtf8("gridLayoutWidget_5"))
        cls.grid_layout_5.setObjectName(_fromUtf8("gridLayout_5"))
        cls.buy_num_title.setFont(WindowCons.get_font(bold=True))
        cls.buy_num_title.setTextFormat(Qt.PlainText)
        cls.buy_num_title.setAlignment(Qt.AlignCenter)
        cls.buy_num_title.setObjectName(_fromUtf8("buy_num_title"))
        cls.grid_layout_5.addWidget(cls.buy_num_title, 0, 0, 1, 1)

        cls.grid_layout_widget_16.setGeometry(QRect(280, 210, 141, 41))
        cls.grid_layout_widget_16.setObjectName(
            _fromUtf8("gridLayoutWidget_16"))
        cls.grid_layout_16.setObjectName(_fromUtf8("gridLayout_16"))
        cls.buy_num_input.setValidator(IntValidator())
        cls.buy_num_input.setText("100")
        cls.buy_num_input.setFont(
            WindowCons.get_font(family=WindowCons.JUI_LIGHT_FAMILY))
        cls.buy_num_input.setFrame(False)
        cls.buy_num_input.setObjectName(_fromUtf8("buy_num_input"))
        cls.grid_layout_16.addWidget(cls.buy_num_input, 0, 0, 1, 1)
Example #6
0
    def __init_have_num(cls):
        # 初始化持仓数量以及显示框
        cls.grid_layout_widget_7.setGeometry(QRect(160, 310, 101, 41))
        cls.grid_layout_widget_7.setObjectName(
            _fromUtf8("grid_layout_widget_7"))
        cls.grid_layout_7.setObjectName(_fromUtf8("grid_layout_7"))
        cls.have_num_title.setFont(WindowCons.get_font(bold=True))
        cls.have_num_title.setTextFormat(Qt.PlainText)
        cls.have_num_title.setAlignment(Qt.AlignCenter)
        cls.have_num_title.setObjectName(_fromUtf8("have_num_title"))
        cls.grid_layout_7.addWidget(cls.have_num_title, 0, 0, 1, 1)

        cls.grid_layout_widget_18.setGeometry(QRect(280, 310, 141, 41))
        cls.grid_layout_widget_18.setObjectName(
            _fromUtf8("grid_layout_widget_18"))
        cls.grid_layout_18.setObjectName(_fromUtf8("grid_layout_18"))
        cls.have_num_show.setFont(
            WindowCons.get_font(family=WindowCons.JUI_LIGHT_FAMILY))
        cls.have_num_show.setReadOnly(True)
        cls.have_num_show.setFrame(False)
        cls.have_num_show.setObjectName(_fromUtf8("have_num_show"))
        cls.grid_layout_18.addWidget(cls.have_num_show, 0, 0, 1, 1)
Example #7
0
    def __init_buy_price(cls):
        # 初始化买入价格以及输入框
        cls.grid_layout_widget_4.setGeometry(QRect(160, 160, 101, 41))
        cls.grid_layout_widget_4.setObjectName(_fromUtf8("gridLayoutWidget_4"))
        cls.grid_layout_4.setObjectName(_fromUtf8("gridLayout_4"))
        cls.buy_price_title.setFont(WindowCons.get_font(bold=True))
        cls.buy_price_title.setTextFormat(Qt.PlainText)
        cls.buy_price_title.setAlignment(Qt.AlignCenter)
        cls.buy_price_title.setObjectName(_fromUtf8("buy_price_title"))
        cls.grid_layout_4.addWidget(cls.buy_price_title, 0, 0, 1, 1)

        cls.grid_layout_widget_17.setGeometry(QRect(280, 160, 141, 41))
        cls.grid_layout_widget_17.setObjectName(
            _fromUtf8("gridLayoutWidget_17"))
        cls.grid_layout_17.setObjectName(_fromUtf8("gridLayout_17"))
        cls.buy_price_input.setFont(
            WindowCons.get_font(family=WindowCons.YAHEI_LIGHT_FAMILY))
        cls.buy_price_input.setFrame(False)
        cls.buy_price_input.setValidator(DoubleValidator())
        cls.buy_price_input.setText("0.00")
        cls.buy_price_input.setObjectName(_fromUtf8("buy_price_input"))
        cls.grid_layout_17.addWidget(cls.buy_price_input, 0, 0, 1, 1)
Example #8
0
    def __can_sale_num(cls):
        # 初始化可卖数量以及显示框
        cls.grid_layout_widget_9.setGeometry(QRect(450, 310, 101, 41))
        cls.grid_layout_widget_9.setObjectName(
            _fromUtf8("grid_layout_widget_9"))
        cls.grid_layout_9.setObjectName(_fromUtf8("gridLayout_9"))
        cls.can_sale_num_title.setFont(WindowCons.get_font(bold=True))
        cls.can_sale_num_title.setTextFormat(Qt.PlainText)
        cls.can_sale_num_title.setAlignment(Qt.AlignCenter)
        cls.can_sale_num_title.setObjectName(_fromUtf8("can_sale_num_title"))
        cls.grid_layout_9.addWidget(cls.can_sale_num_title, 0, 0, 1, 1)

        cls.grid_layout_widget_23.setGeometry(QRect(570, 310, 141, 41))
        cls.grid_layout_widget_23.setObjectName(
            _fromUtf8("gridLayoutWidget_23"))
        cls.grid_layout_23.setObjectName(_fromUtf8("grid_layout_23"))
        cls.can_sale_num_show.setEnabled(True)
        cls.can_sale_num_show.setFont(
            WindowCons.get_font(family=WindowCons.JUI_LIGHT_FAMILY))
        cls.can_sale_num_show.setReadOnly(True)
        cls.can_sale_num_show.setFrame(False)
        cls.can_sale_num_show.setObjectName(_fromUtf8("can_sale_num_show"))
        cls.grid_layout_23.addWidget(cls.can_sale_num_show, 0, 0, 1, 1)
Example #9
0
    def __init_have_win(cls):
        # 初始化当前股票盈利情况以及显示框
        cls.grid_layout_widget_8.setGeometry(QRect(450, 260, 101, 41))
        cls.grid_layout_widget_8.setObjectName(
            _fromUtf8("grid_layout_widget_8"))
        cls.grid_layout_8.setObjectName(_fromUtf8("grid_layout_8"))
        cls.win_title.setFont(WindowCons.get_font(bold=True))
        cls.win_title.setTextFormat(Qt.PlainText)
        cls.win_title.setAlignment(Qt.AlignCenter)
        cls.win_title.setObjectName(_fromUtf8("win_title"))
        cls.grid_layout_8.addWidget(cls.win_title, 0, 0, 1, 1)

        cls.grid_layout_widget_24.setGeometry(QRect(570, 260, 141, 41))
        cls.grid_layout_widget_24.setObjectName(
            _fromUtf8("grid_layout_widget_24"))
        cls.grid_layout_24.setObjectName(_fromUtf8("grid_layout_24"))
        cls.win_show.setEnabled(True)
        cls.win_show.setFont(
            WindowCons.get_font(family=WindowCons.JUI_LIGHT_FAMILY))
        cls.win_show.setReadOnly(True)
        cls.win_show.setObjectName(_fromUtf8("win_show"))
        cls.win_show.setFrame(False)
        cls.grid_layout_24.addWidget(cls.win_show, 0, 0, 1, 1)
Example #10
0
    def __init_buy_avg_price(cls):
        # 初始化平均价以及显示框
        cls.grid_layout_widget_6.setGeometry(QRect(160, 260, 101, 41))
        cls.grid_layout_widget_6.setObjectName(
            _fromUtf8("grid_layout_widget_6"))
        cls.grid_layout_6.setObjectName(_fromUtf8("grid_layout_6"))
        cls.have_avg_price.setFont(WindowCons.get_font(bold=True))
        cls.have_avg_price.setTextFormat(Qt.PlainText)
        cls.have_avg_price.setAlignment(Qt.AlignCenter)
        cls.have_avg_price.setObjectName(_fromUtf8("have_avg_price"))
        cls.grid_layout_6.addWidget(cls.have_avg_price, 0, 0, 1, 1)

        cls.grid_layout_widget_19.setGeometry(QRect(280, 260, 141, 41))
        cls.grid_layout_widget_19.setObjectName(
            _fromUtf8("grid_layout_widget_19"))
        cls.grid_layout_19.setObjectName(_fromUtf8("grid_layout_19"))
        cls.buv_avg_price_show.setEnabled(True)
        cls.buv_avg_price_show.setFont(
            WindowCons.get_font(family=WindowCons.JUI_LIGHT_FAMILY))
        cls.buv_avg_price_show.setReadOnly(True)
        cls.buv_avg_price_show.setFrame(False)
        cls.buv_avg_price_show.setObjectName(_fromUtf8("buv_avg_price_show"))
        cls.grid_layout_19.addWidget(cls.buv_avg_price_show, 0, 0, 1, 1)
Example #11
0
    def __init_sale_num(cls):
        # 初始化卖出数量以及输入框
        cls.grid_layout_widget_25.setGeometry(QRect(570, 210, 141, 41))
        cls.grid_layout_widget_25.setObjectName(
            _fromUtf8("gridLayoutWidget_25"))
        cls.grid_layout_25.setObjectName(_fromUtf8("gridLayout_25"))
        cls.sale_num_input.setValidator(IntValidator())
        cls.sale_num_input.setText("100")
        cls.sale_num_input.setFont(
            WindowCons.get_font(family=WindowCons.JUI_LIGHT_FAMILY))
        cls.sale_num_input.setFrame(False)
        cls.sale_num_input.setObjectName(_fromUtf8("sale_num_input"))
        cls.grid_layout_25.addWidget(cls.sale_num_input, 0, 0, 1, 1)

        cls.grid_layout_widget_13.setGeometry(QRect(450, 210, 101, 41))
        cls.grid_layout_widget_13.setObjectName(
            _fromUtf8("gridLayoutWidget_13"))
        cls.grid_layout_13.setObjectName(_fromUtf8("gridLayout_13"))
        cls.sale_num_title.setFont(WindowCons.get_font(bold=True))
        cls.sale_num_title.setTextFormat(Qt.PlainText)
        cls.sale_num_title.setAlignment(Qt.AlignCenter)
        cls.sale_num_title.setObjectName(_fromUtf8("buy_num_title_2"))
        cls.grid_layout_13.addWidget(cls.sale_num_title, 0, 0, 1, 1)
Example #12
0
    def __init_share_name(cls):
        cls.grid_layout_widget_12.setGeometry(QRect(450, 60, 101, 41))
        cls.grid_layout_widget_12.setObjectName(
            _fromUtf8("gridLayoutWidget_12"))
        cls.grid_layout_12.setObjectName(_fromUtf8("gridLayout_12"))
        cls.share_name_title.setFont(WindowCons.get_font(bold=True))
        cls.share_name_title.setTextFormat(Qt.PlainText)
        cls.share_name_title.setAlignment(Qt.AlignCenter)
        cls.share_name_title.setObjectName(_fromUtf8("share_name_title"))
        cls.grid_layout_12.addWidget(cls.share_name_title, 0, 0, 1, 1)

        cls.grid_layout_widget_21.setGeometry(QRect(570, 60, 141, 50))
        cls.grid_layout_widget_21.setObjectName(
            _fromUtf8("grid_layout_widget_21"))
        cls.grid_layout_21.setObjectName(_fromUtf8("grid_layout_21"))
        cls.share_name_show.setEnabled(True)
        cls.share_name_show.setFont(
            WindowCons.get_font(weight=50,
                                family=WindowCons.YAHEI_LIGHT_FAMILY))
        cls.share_name_show.setReadOnly(True)
        cls.share_name_show.setFrame(False)
        cls.share_name_show.setObjectName(_fromUtf8("share_name_show"))
        cls.grid_layout_21.addWidget(cls.share_name_show, 0, 0, 1, 1)
Example #13
0
 def init_widget(cls):
     CENTRAL_WIDGET.setObjectName(_fromUtf8("centralwidget"))
     cls.add_record.setGeometry(QRect(-1, -1, 961, 561))
     cls.add_record.setObjectName(_fromUtf8("add_record"))
     cls.grid_layout_widget.setGeometry(QRect(50, 10, 314, 50))
     cls.grid_layout_widget.setObjectName(_fromUtf8("gridLayoutWidget"))
     cls.grid_layout.setObjectName(_fromUtf8("gridLayout"))
     cls.title.setFont(WindowCons.get_font(size=16, weight=50))
     cls.title.setTextFormat(Qt.PlainText)
     cls.title.setScaledContents(False)
     cls.title.setAlignment(Qt.AlignCenter)
     cls.title.setObjectName(_fromUtf8("title"))
     cls.grid_layout.addWidget(cls.title, 0, 0, 1, 1)
     cls._init_labels()
Example #14
0
    def __init_sale_date(cls):
        cls.grid_layout_widget_10.setGeometry(QRect(450, 110, 101, 41))
        cls.grid_layout_widget_10.setObjectName(
            _fromUtf8("gridLayoutWidget_10"))
        cls.grid_layout_10.setObjectName(_fromUtf8("gridLayout_10"))
        cls.sale_date_title.setFont(WindowCons.get_font(bold=True))
        cls.sale_date_title.setTextFormat(Qt.PlainText)
        cls.sale_date_title.setAlignment(Qt.AlignCenter)
        cls.sale_date_title.setObjectName(_fromUtf8("buy_date_title_2"))
        cls.grid_layout_10.addWidget(cls.sale_date_title, 0, 0, 1, 1)

        cls.grid_layout_widget_20.setGeometry(QRect(570, 110, 141, 41))
        cls.grid_layout_widget_20.setObjectName(
            _fromUtf8("gridLayoutWidget_20"))
        cls.grid_layout_20.setObjectName(_fromUtf8("gridLayout_20"))
        cls.sale_date_input.setFont(
            WindowCons.get_font(size=12, family=WindowCons.YAHEI_LIGHT_FAMILY))
        cls.sale_date_input.setWrapping(False)
        cls.sale_date_input.setFrame(False)
        cls.sale_date_input.setCalendarPopup(True)
        cls.sale_date_input.setDate(
            QDate(datetime.datetime.date(datetime.datetime.now())))
        cls.sale_date_input.setObjectName(_fromUtf8("sale_date_input"))
        cls.grid_layout_20.addWidget(cls.sale_date_input, 0, 0, 1, 1)