FileViewList::FileViewList(QWidget* parent) : QListView(parent), menu_(new QMenu(this)) { menu_->addAction(IconLoader::Load("media-playback-start", IconLoader::Base), tr("Append to current playlist"), this, SLOT(AddToPlaylistSlot())); menu_->addAction(IconLoader::Load("media-playback-start", IconLoader::Base), tr("Replace current playlist"), this, SLOT(LoadSlot())); menu_->addAction(IconLoader::Load("document-new", IconLoader::Base), tr("Open in new playlist"), this, SLOT(OpenInNewPlaylistSlot())); menu_->addSeparator(); menu_->addAction(IconLoader::Load("edit-copy", IconLoader::Base), tr("Copy to library..."), this, SLOT(CopyToLibrarySlot())); menu_->addAction(IconLoader::Load("go-jump", IconLoader::Base), tr("Move to library..."), this, SLOT(MoveToLibrarySlot())); menu_->addAction(IconLoader::Load("multimedia-player-ipod-mini-blue", IconLoader::Base), tr("Copy to device..."), this, SLOT(CopyToDeviceSlot())); menu_->addAction(IconLoader::Load("edit-delete", IconLoader::Base), tr("Delete from disk..."), this, SLOT(DeleteSlot())); menu_->addSeparator(); menu_->addAction(IconLoader::Load("edit-rename", IconLoader::Base), tr("Edit track information..."), this, SLOT(EditTagsSlot())); menu_->addAction(IconLoader::Load("document-open-folder", IconLoader::Base), tr("Show in file browser..."), this, SLOT(ShowInBrowser())); setAttribute(Qt::WA_MacShowFocusRect, false); }
int iNet::TcpSocket::Impl::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QTcpSocket::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: SendDataSignal((*reinterpret_cast< QByteArray(*)>(_a[1]))); break; case 1: ConnectToHostSignal((*reinterpret_cast< Utils::HostInf(*)>(_a[1]))); break; case 2: DisconnectFromHostSignal(); break; case 3: DeleteSignal((*reinterpret_cast< boost::shared_ptr<Utils::ThreadSyncEvent>(*)>(_a[1]))); break; case 4: ConnectToHostSlot((*reinterpret_cast< const Utils::HostInf(*)>(_a[1]))); break; case 5: ConnectedSlot(); break; case 6: SendDataSlot((*reinterpret_cast< const QByteArray(*)>(_a[1]))); break; case 7: ReceiveData(); break; case 8: DisconnectFromHostSlot(); break; case 9: DisconnectedSlot(); break; case 10: SocketErrorOccur((*reinterpret_cast< QAbstractSocket::SocketError(*)>(_a[1]))); break; case 11: DeleteSlot((*reinterpret_cast< boost::shared_ptr<Utils::ThreadSyncEvent>(*)>(_a[1]))); break; default: ; } _id -= 12; } return _id; }
UHashTable::~UHashTable () { for (int i = 0; i < _nslots; ++i) { if (_slot[i] != nil) { DeleteSlot(_slot[i]); } } delete [] _slot; }
void ConnectionManagerImpl::UnregisterSlot(const int type, const QObject *obj, const QString &slot) { Q_ASSERT(obj != NULL); Q_ASSERT(!slot.isEmpty()); if(obj == NULL || slot.isEmpty()) { return; } connection_locker_.lock(); DisconnectSlot(type, obj, slot); DeleteSlot(type, obj, slot); connection_locker_.unlock(); }