diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-08-21 13:40:16 +0200 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-08-21 14:54:50 +0200 |
commit | 0e23f7776fd104d8713cb705438c21559addc1d9 (patch) | |
tree | fb3303d6f6a0c86ac92febca1dd827c2218c60c7 /nephilim/plugins/Library.py | |
parent | 4636982682d69c0fc5fea724344f02c94c6cb741 (diff) |
switch to new-style PyQt4 signals.
Diffstat (limited to 'nephilim/plugins/Library.py')
-rw-r--r-- | nephilim/plugins/Library.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/nephilim/plugins/Library.py b/nephilim/plugins/Library.py index 35c6015..b2a4ed7 100644 --- a/nephilim/plugins/Library.py +++ b/nephilim/plugins/Library.py @@ -134,12 +134,11 @@ class LibraryWidget(QtGui.QWidget): self.modes = QtGui.QComboBox() self.refresh_modes() - self.connect(self.modes, QtCore.SIGNAL('activated(int)'), self.modes_activated) + self.modes.activated.connect(self.modes_activated) self.search_txt = QtGui.QLineEdit() - self.connect(self.search_txt, QtCore.SIGNAL('textChanged(const QString&)'), - self.filter_changed) - self.connect(self.search_txt, QtCore.SIGNAL('returnPressed()'), self.add_filtered) + self.search_txt.textChanged.connect(self.filter_changed) + self.search_txt.returnPressed.connect(self.add_filtered) #construct the library self.library_model = self.LibraryModel() @@ -147,7 +146,7 @@ class LibraryWidget(QtGui.QWidget): self.library_view = self.LibraryView() self.library_view.setModel(self.library_model) - self.connect(self.library_view, QtCore.SIGNAL('activated(const QModelIndex &)'), self.add_selection) + self.library_view.activated.connect(self.add_selection) self.setLayout(QtGui.QVBoxLayout()) self.layout().setSpacing(2) @@ -156,9 +155,8 @@ class LibraryWidget(QtGui.QWidget): self.layout().addWidget(self.search_txt) self.layout().addWidget(self.library_view) - self.connect(self.plugin.mpclient, QtCore.SIGNAL('connected'), self.fill_library) - self.connect(self.plugin.mpclient, QtCore.SIGNAL('disconnected'), self.fill_library) - self.connect(self.plugin.mpclient, QtCore.SIGNAL('db_updated'), self.fill_library) + self.plugin.mpclient.connect_changed.connect(self.fill_library) + self.plugin.mpclient.connect_changed.connect(self.fill_library) def refresh_modes(self): self.modes.clear() |