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))
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;")
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)
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))
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) 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)] = name status_n = status_n + 1 self.ui.comboStatus.addItem(str.capitalize(name))
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))
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)
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())
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)
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()
def __init__(self, amsn_core, parent): StyledWidget.__init__(self, parent._parent) self._amsn_core = amsn_core self._myview = parent._myview self.ui = uic.loadUi(ufp, self) delegate = itemDelegate(self) self.ui.cList.setItemDelegate(delegate) self._parent = parent self._mainWindow = parent._parent self._model = QtGui.QStandardItemModel(self) self._model.setColumnCount(4) self._proxyModel = QtGui.QSortFilterProxyModel(self) self._proxyModel.setSourceModel(self._model) self.ui.cList.setModel(self._proxyModel) self._contactDict = dict() self.groups = [] self.contacts = {} self._proxyModel.setFilterCaseSensitivity(QtCore.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, QtCore.SIGNAL('textChanged(QString)'), self._proxyModel, QtCore.SLOT('setFilterFixedString(QString)')) self.connect(self.ui.nickName, QtCore.SIGNAL('nickChange()'), self.__nickChange) self.connect(self.ui.statusMessage, QtCore.SIGNAL('psmChange()'), self.__psmChange) self.connect(self.ui.status, QtCore.SIGNAL('currentIndexChanged(int)'), self.__statusChange) self.connect(self.ui.cList, QtCore.SIGNAL('doubleClicked(QModelIndex)'), self.__clDoubleClick) self.ui.nickName.installEventFilter(GlobalFilter(self.ui.nickName)) self.ui.statusMessage.installEventFilter( GlobalFilter(self.ui.statusMessage))
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)
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())
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))