Textual::Textual(QWidget *parent) : KHTMLPart(parent, parent, KHTMLPart::BrowserViewGUI) , m_curr_selected(-1) , m_layout_style(0) { m_loader.setSize(12); connect(browserExtension(), SIGNAL(openUrlRequest(const KUrl&,const KParts::URLArgs&)), this, SLOT(onURL(const KUrl&))); setJScriptEnabled(false); setJavaEnabled(false); setMetaRefreshEnabled(false); setPluginsEnabled(false); QString fpath = KStandardDirs::locate("appdata", "scripts/movelist_textual.html"); //kDebug() << "HTML file is:"<< fpath; QFile file(fpath); file.open(QIODevice::ReadOnly); QTextStream stream(&file); QString html = stream.readAll(); //kDebug() << "Using HTML:"<<html; begin(); write(html); end(); setMove(0, -1, "Mainline:"); }
WelcomePageView::WelcomePageView(QWidget* const parent) : KHTMLPart(parent) { widget()->setFocusPolicy(Qt::WheelFocus); // Let's better be paranoid and disable plugins (it defaults to enabled): setPluginsEnabled(false); setJScriptEnabled(false); // just make this explicit. setJavaEnabled(false); // just make this explicit. setMetaRefreshEnabled(false); setURLCursor(Qt::PointingHandCursor); view()->adjustSize(); // Disable some KHTMLPart actions as they break predefined digiKam actions. // We can re-assign the disabled actions later if we ever need to. disablePredefinedActions(); // ------------------------------------------------------------ connect(browserExtension(), SIGNAL(openUrlRequest(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)), this, SLOT(slotUrlOpen(KUrl))); connect(ThemeManager::instance(), SIGNAL(signalThemeChanged()), this, SLOT(slotThemeChanged())); QTimer::singleShot(0, this, SLOT(slotThemeChanged())); }
void KCHMViewWindow_KHTMLPart::invalidate( ) { m_zoomfactor = 0; setJScriptEnabled ( appConfig.m_kdeEnableJS ); setJavaEnabled ( appConfig.m_kdeEnableJava ); setMetaRefreshEnabled ( appConfig.m_kdeEnableRefresh ); setPluginsEnabled ( appConfig.m_kdeEnablePlugins ); KCHMViewWindow::invalidate( ); }
KHTMLSideBar::KHTMLSideBar() : KHTMLPart() { setStatusMessagesEnabled(false); setMetaRefreshEnabled(true); setJavaEnabled(false); setPluginsEnabled(false); setFormNotification(KHTMLPart::Only); connect(this, SIGNAL(formSubmitNotification(const char*,QString,QByteArray,QString,QString,QString)), this, SLOT(formProxy(const char*,QString,QByteArray,QString,QString,QString)) ); _linkMenu = new KMenu(widget()); KAction* openLinkAction = new KAction(i18n("&Open Link"), this); _linkMenu->addAction(openLinkAction); connect(openLinkAction, SIGNAL(triggered()), this, SLOT(loadPage())); KAction* openWindowAction = new KAction(i18n("Open in New &Window"), this); _linkMenu->addAction(openWindowAction); connect(openWindowAction, SIGNAL(triggered()), this, SLOT(loadNewWindow())); _menu = new KMenu(widget()); KAction* reloadAction = new KAction(i18n("&Reload"), this); reloadAction->setIcon(KIcon("view-refresh")); _menu->addAction(reloadAction); connect(reloadAction, SIGNAL(triggered()), this, SIGNAL(reload())); KAction* autoReloadAction = new KAction(i18n("Set &Automatic Reload"), this); autoReloadAction->setIcon(KIcon("view-refresh")); _menu->addAction(autoReloadAction); connect(autoReloadAction, SIGNAL(triggered()), this, SIGNAL(setAutoReload())); connect(this, SIGNAL(popupMenu(QString,QPoint)), this, SLOT(showMenu(QString,QPoint))); }