• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python styledwidget.StyledWidget类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中styledwidget.StyledWidget的典型用法代码示例。如果您正苦于以下问题:Python StyledWidget类的具体用法?Python StyledWidget怎么用?Python StyledWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了StyledWidget类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, parent):
     StyledWidget.__init__(self, parent)
     # Throbber
     self.plsWait = QLabel(self)
     self.plsWait.setText("<strong>Please wait...</strong>")
     self.plsWait.setAlignment(Qt.AlignCenter)
     self.status = QLabel(self)
     self.status.setText("")
     self.status.setAlignment(Qt.AlignCenter)
     self.throbber = QLabel(self)
     self.movie = QMovie(self)
     self.movie.setFileName("amsn2/gui/front_ends/qt4/throbber.gif")
     self.movie.start()
     self.throbber.setMovie(self.movie)
     # Layout, for horizontal centering
     self.hLayout = QHBoxLayout()
     self.hLayout.addStretch()
     self.hLayout.addWidget(self.throbber)
     self.hLayout.addStretch()
     # Layout, for vertical centering
     self.vLayout = QVBoxLayout()
     self.vLayout.addStretch()
     self.vLayout.addLayout(self.hLayout)
     self.vLayout.addWidget(self.plsWait)
     self.vLayout.addWidget(self.status)
     self.vLayout.addStretch()
     # Top level layout
     self.setLayout(self.vLayout)
     # Apply StyleSheet
     self.setStyleSheet("background: white;")
开发者ID:FaithNahn,项目名称:amsn2,代码行数:30,代码来源:login.py


示例2: __init__

    def __init__(self, amsn_core, parent):
        StyledWidget.__init__(self, parent)
        self._amsn_core = amsn_core
        self._parent = parent
        self._skin = amsn_core._skin_manager.skin
        self._theme_manager = self._amsn_core._theme_manager
        self._ui_manager = self._amsn_core._ui_manager
        self.ui = Ui_Login()
        self.ui.setupUi(self)
        self._parent = parent
        self.loginThrobber = None
        QObject.connect(self.ui.pushSignIn, SIGNAL("clicked()"), self.__login_clicked)
        QObject.connect(self.ui.styleDesktop, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleRounded, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleWLM, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.checkRememberMe, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.checkRememberPass, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.checkSignInAuto, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        self.setTestStyle()

        # status list
        self.status_values = {}
        self.status_dict = {}
        status_n = 0
        for key in self._amsn_core.p2s:
            name = self._amsn_core.p2s[key]
            _, path = self._theme_manager.get_statusicon("buddy_%s" % name)
            if (name == self._amsn_core.Presence.OFFLINE): continue
            self.status_values[key] = status_n
            self.status_dict[str.capitalize(name)] = key
            status_n = status_n +1
            icon = QIcon(path)
            self.ui.comboStatus.addItem(icon, str.capitalize(name))
开发者ID:blueSpirit,项目名称:amsn2,代码行数:33,代码来源:login.py


示例3: __init__

    def __init__(self, amsn_core, parent):
        StyledWidget.__init__(self, parent._parent)
        self._amsn_core = amsn_core
        self._myview = parent._myview
        self.ui = Ui_ContactList()
        self.ui.setupUi(self)
        delegate = itemDelegate(self)
        self.ui.cList.setItemDelegate(delegate)
        self._parent = parent
        self._mainWindow = parent._parent
        self._model = QStandardItemModel(self)
        self._model.setColumnCount(4)
        self._proxyModel = QSortFilterProxyModel(self)
        self._proxyModel.setSourceModel(self._model)
        self.ui.cList.setModel(self._proxyModel)
        self._contactDict = dict()
        self.groups = []
        self.contacts = {}

        self._proxyModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
        self._proxyModel.setFilterKeyColumn(-1)

        (self.ui.cList.header()).resizeSections(1) #auto-resize column wigth
        (self.ui.cList.header()).setSectionHidden(1, True) #hide --> (group/contact ID)
        (self.ui.cList.header()).setSectionHidden(2, True) #hide --> (boolean value. Do I really need this?)
        (self.ui.cList.header()).setSectionHidden(3, True) #hide --> (contact/group view object)

        self.connect(self.ui.searchLine, SIGNAL('textChanged(QString)'), self._proxyModel, SLOT('setFilterFixedString(QString)'))
        self.connect(self.ui.nickName, SIGNAL('nickChange()'), self.__nickChange)
        self.connect(self.ui.statusMessage, SIGNAL('psmChange()'), self.__psmChange)
        self.connect(self.ui.status, SIGNAL('currentIndexChanged(int)'), self.__statusChange)
        self.connect(self.ui.cList, SIGNAL('doubleClicked(QModelIndex)'), self.__clDoubleClick)

        self.ui.nickName.installEventFilter(GlobalFilter(self.ui.nickName))
        self.ui.statusMessage.installEventFilter(GlobalFilter(self.ui.statusMessage))
开发者ID:test30,项目名称:amsn2,代码行数:35,代码来源:contact_list.py


示例4: __init__

    def __init__(self, amsn_core, parent):
        StyledWidget.__init__(self, parent)
        self._amsn_core = amsn_core
        self._parent = parent
        self._skin = amsn_core._skin_manager.skin
        self._theme_manager = self._amsn_core._theme_manager
        self._ui_manager = self._amsn_core._ui_manager
        self.ui = Ui_Login()
        self.ui.setupUi(self)
        self._parent = parent
        self.loginThrobber = None
        QObject.connect(self.ui.pushSignIn, SIGNAL("clicked()"), self.__login_clicked)
        QObject.connect(self.ui.linePassword, SIGNAL("returnPressed()"), self.__login_clicked)
        QObject.connect(self.ui.styleDesktop, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleRounded, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleWLM, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.checkRememberMe, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.checkRememberPass, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.checkSignInAuto, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.comboAccount, SIGNAL("currentIndexChanged(QString)"), self.__on_user_comboxEntry_changed)
        self.setTestStyle()

        # status list
        for key in self._amsn_core.p2s:
            name = self._amsn_core.p2s[key]
            _, path = self._theme_manager.get_statusicon("buddy_%s" % name)
            if (name == self._amsn_core.p2s['FLN']): continue
            self.ui.comboStatus.addItem(QIcon(path), str.capitalize(name), key)
开发者ID:Khaled62,项目名称:amsn2,代码行数:28,代码来源:login.py


示例5: __init__

    def __init__(self, amsn_core, parent):
        StyledWidget.__init__(self, parent)
        self._amsn_core = amsn_core
        self._ui_manager = self._amsn_core._ui_manager
        self.ui = Ui_Login()
        self.ui.setupUi(self)
        self._parent = parent
        QObject.connect(self.ui.pushSignIn, SIGNAL("clicked()"), self.signin)
        QObject.connect(self.ui.styleDesktop, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleRounded, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleWLM, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.checkRememberMe, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.checkRememberPass, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        QObject.connect(self.ui.checkSignInAuto, SIGNAL("toggled(bool)"), self.__on_toggled_cb)
        self.setTestStyle()

        # status list
        self.status_values = {}
        self.status_dict = {}
        status_n = 0
        for key in self._amsn_core.p2s:
            name = self._amsn_core.p2s[key]
            if (name == 'offline'): continue
            self.status_values[name] = status_n
            self.status_dict[str.capitalize(name)] = key
            status_n = status_n +1
            self.ui.comboStatus.addItem(str.capitalize(name))
开发者ID:LinuxNIT,项目名称:amsn2,代码行数:27,代码来源:login.py


示例6: __init__

    def __init__(self, amsn_core, parent):
        base.aMSNContactListWidget.__init__(self, amsn_core, parent)
        StyledWidget.__init__(self, parent._parent)
        self._amsn_core = amsn_core
        self.ui = Ui_ContactList()
        self.ui.setupUi(self)
        delegate = itemDelegate(self)
        self.ui.cList.setItemDelegate(delegate)
        self._parent = parent
        self._mainWindow = parent._parent
        self._model = QStandardItemModel(self)
        self._model.setColumnCount(4)
        self._proxyModel = QSortFilterProxyModel(self)
        self._proxyModel.setSourceModel(self._model)
        self.ui.cList.setModel(self._proxyModel)
        self._contactDict = dict()
        self.groups = []
        self.contacts = {}

        self._proxyModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
        self._proxyModel.setFilterKeyColumn(-1)

        (self.ui.cList.header()).resizeSections(1)  # auto-resize column wigth
        (self.ui.cList.header()).setSectionHidden(1, True)  # hide --> (group/contact ID)
        (self.ui.cList.header()).setSectionHidden(2, True)  # hide --> (boolean value. Do I really need this?)
        (self.ui.cList.header()).setSectionHidden(3, True)  # hide --> (contact/group view object)

        self.connect(
            self.ui.searchLine, SIGNAL("textChanged(QString)"), self._proxyModel, SLOT("setFilterFixedString(QString)")
        )
        QObject.connect(self.ui.nickName, SIGNAL("textChanged(QString)"), self.__slotChangeNick)
        self.connect(self.ui.cList, SIGNAL("doubleClicked(QModelIndex)"), self.__slotContactCallback)
开发者ID:snowpunk,项目名称:amsn2,代码行数:32,代码来源:contact_list.py


示例7: __init__

 def __init__(self, amsn_core, parent):
     StyledWidget.__init__(self, parent)
     self._amsn_core = amsn_core
     self.ui = Ui_Login()
     self.ui.setupUi(self)
     self._parent = parent
     QObject.connect(self.ui.pushSignIn, SIGNAL("clicked()"), self.signin)
     QObject.connect(self.ui.styleDesktop, SIGNAL("clicked()"), self.setTestStyle)
     QObject.connect(self.ui.styleRounded, SIGNAL("clicked()"), self.setTestStyle)
     QObject.connect(self.ui.styleWLM, SIGNAL("clicked()"), self.setTestStyle)
     self.setTestStyle()
开发者ID:fcox,项目名称:amsn2,代码行数:11,代码来源:login.py


示例8: __init__

 def __init__(self, amsn_core, parent):
     StyledWidget.__init__(self, parent._parent)
     self._amsn_core = amsn_core
     self.ui = Ui_ContactList()
     self.ui.setupUi(self)
     self._parent = parent
     self._mainWindow = parent._parent
     self._model = QStandardItemModel(self)
     self._proxyModel = QSortFilterProxyModel(self)
     self._proxyModel.setSourceModel(self._model)
     self.ui.cList.setModel(self._proxyModel)
     self._contactDict = dict()
     
     self._proxyModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
     self._proxyModel.setFilterKeyColumn(-1)
     
     self.connect(self.ui.searchLine, SIGNAL('textChanged(QString)'),
                  self._proxyModel, SLOT('setFilterFixedString(QString)'))
     QObject.connect(self.ui.nickName, SIGNAL('textChanged(QString)'),
                     self.__slotChangeNick)
开发者ID:lalitjsraks,项目名称:amsn2,代码行数:20,代码来源:contact_list.py


示例9: __init__

 def __init__(self, amsn_core, parent):
     StyledWidget.__init__(self, parent)
     self._amsn_core = amsn_core
     self._parent = parent
     self._skin = amsn_core._skin_manager.skin
     self._theme_manager = self._amsn_core._theme_manager
     self._ui_manager = self._amsn_core._ui_manager
     self.ui = uic.loadUi(ufp, self)
     self._parent = parent
     self.loginThrobber = None
     QtCore.QObject.connect(self.ui.pushSignIn, QtCore.SIGNAL("clicked()"), self.__login_clicked)
     QtCore.QObject.connect(self.ui.linePassword, QtCore.SIGNAL("returnPressed()"), self.__login_clicked)
     QtCore.QObject.connect(self.ui.checkRememberMe, QtCore.SIGNAL("toggled(bool)"), self.__on_toggled_cb)
     QtCore.QObject.connect(self.ui.checkRememberPass, QtCore.SIGNAL("toggled(bool)"), self.__on_toggled_cb)
     QtCore.QObject.connect(self.ui.checkSignInAuto, QtCore.SIGNAL("toggled(bool)"), self.__on_toggled_cb)
     QtCore.QObject.connect(
         self.ui.comboAccount, QtCore.SIGNAL("currentIndexChanged(QString)"), self.__on_user_comboxEntry_changed
     )
     styleData = QtCore.QFile()
     styleData.setFileName("amsn2/ui/front_ends/qt4/style1.qss")
     if styleData.open(QtCore.QIODevice.ReadOnly | QtCore.QIODevice.Text):
         styleReader = QtCore.QTextStream(styleData)
         self.setStyleSheet(styleReader.readAll())
开发者ID:amsn,项目名称:amsn2,代码行数:23,代码来源:login.py


示例10: __init__

    def __init__(self, amsn_core, parent):
        StyledWidget.__init__(self, parent)
        self._amsn_core = amsn_core
        self.ui = Ui_Login()
        self.ui.setupUi(self)
        self._parent = parent
        QObject.connect(self.ui.pushSignIn, SIGNAL("clicked()"), self.signin)
        QObject.connect(self.ui.styleDesktop, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleRounded, SIGNAL("clicked()"), self.setTestStyle)
        QObject.connect(self.ui.styleWLM, SIGNAL("clicked()"), self.setTestStyle)
        self.setTestStyle()

        # status list
        self.status_values = {}
        self.status_dict = {}
        status_n = 0
        for key in self._amsn_core.p2s:
            name = self._amsn_core.p2s[key]
            if name == "offline":
                continue
            self.status_values[name] = status_n
            self.status_dict[str.capitalize(name)] = name
            status_n = status_n + 1
            self.ui.comboStatus.addItem(str.capitalize(name))
开发者ID:javieradrianr,项目名称:amsn2,代码行数:24,代码来源:login.py



注:本文中的styledwidget.StyledWidget类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python sub_process.call函数代码示例发布时间:2022-05-27
下一篇:
Python style.header函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap