int NetworkAccessViewer::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_clearButton_clicked(); break; case 1: clear(); break; case 2: requestFinished((*reinterpret_cast< QObject*(*)>(_a[1]))); break; case 3: showItemDetails((*reinterpret_cast< QTreeWidgetItem*(*)>(_a[1]))); break; case 4: readyRead((*reinterpret_cast< QObject*(*)>(_a[1]))); break; default: ; } _id -= 5; } return _id; }
SearchPage::SearchPage(QWidget *parent) : Page(parent), m_model(new SearchModel(this)), m_splitter(new QSplitter(Qt::Horizontal, this)), m_view(new QListView(m_splitter)), m_browser(new QWebView(m_splitter)), m_layout(new QHBoxLayout(this)) { setWindowTitle(tr("Search")); m_splitter->addWidget(m_view); m_splitter->addWidget(m_browser); m_view->setModel(m_model); m_view->setItemDelegate(new ItemDelegate(m_view)); m_view->setContextMenuPolicy(Qt::CustomContextMenu); m_view->setUniformItemSizes(true); m_browser->setContextMenuPolicy(Qt::CustomContextMenu); m_browser->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); m_browser->settings()->setAttribute(QWebSettings::JavascriptEnabled, false); m_browser->settings()->setUserStyleSheetUrl(QUrl::fromEncoded(STYLE_SHEET)); m_layout->addWidget(m_splitter); m_layout->setContentsMargins(0, 0, 0, 0); m_splitter->restoreState(Settings::searchPageState()); connect(m_model, SIGNAL(settingsRequest(QString, QVariantList)), this, SLOT(showPluginSettingsDialog(QString, QVariantList))); connect(m_model, SIGNAL(statusChanged(SearchModel::Status)), this, SLOT(onModelStatusChanged())); connect(m_view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint))); connect(m_view->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, QModelIndex)), this, SLOT(showItemDetails(QModelIndex))); connect(m_browser, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showBrowserContextMenu(QPoint))); }