From 23ae10d14ab7fec087f358af187ae60d6c50812b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 11 May 2011 23:52:52 +0200 Subject: Developer tool: set content editable. --- src/mainwindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f226c9ee..2ed8fef5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -245,6 +245,7 @@ void MainWindow::updateToolsMenu() m_developerMenu->addAction(actionByName(QL1S("web_inspector"))); m_developerMenu->addAction(actionByName(QL1S("page_source"))); m_developerMenu->addAction(actionByName(QL1S("net_analyzer"))); + m_developerMenu->addAction(actionByName(QL1S("set_editable"))); m_toolsMenu->addAction(m_developerMenu); if (!ReKonfig::showDeveloperTools()) @@ -544,6 +545,11 @@ void MainWindow::setupActions() a = new KAction(KIcon("preferences-web-browser-identification"), i18n("Browser Identification"), this); actionCollection()->addAction(QL1S("UserAgentSettings"), a); connect(a, SIGNAL(triggered(bool)), this, SLOT(showUserAgentSettings())); + + a = new KAction(KIcon(""), i18n("set editable"), this); + a->setCheckable(true); + actionCollection()->addAction(QL1S("set_editable"), a); + connect(a, SIGNAL(triggered(bool)), this, SLOT(setEditable(bool))); } @@ -1578,3 +1584,9 @@ void MainWindow::resizeEvent(QResizeEvent *event) KMainWindow::resizeEvent(event); } + + +void MainWindow::setEditable(bool on) +{ + currentTab()->page()->setContentEditable(on); +} -- cgit v1.2.1