Commit 990ae7ad authored by Sune Stolborg Vuorela's avatar Sune Stolborg Vuorela
Browse files

Action to reload all tabs

Create a action and related functionality to reload all tabs in
akregator.

Patch by Google Code-in student hzengin

BUG: 203229
parent 01e883c1
......@@ -210,6 +210,13 @@ void ActionManagerImpl::initMainWidget(MainWidget* mainWidget)
connect(action, SIGNAL(triggered(bool)), d->mainWidget, SLOT(slotOpenHomepage()));
action->setShortcuts(KShortcut( "Ctrl+H" ));
action = coll->addAction("reload_all_tabs");
action->setIcon(KIcon("view-refresh"));
action->setText(i18n("Reload All Tabs"));
connect(action, SIGNAL(triggered(bool)), d->mainWidget, SLOT(slotReloadAllTabs()));
action->setShortcuts(KShortcut( "Shift+F5" ));
action = coll->addAction("feed_add");
action->setIcon(KIcon("feed-subscribe"));
action->setText(i18n("&Add Feed..."));
......
......@@ -1152,4 +1152,10 @@ void Akregator::MainWidget::ensureArticleTabVisible()
m_tabWidget->setCurrentWidget( m_mainFrame );
}
void MainWidget::slotReloadAllTabs()
{
this->m_tabWidget->slotReloadAllTabs();
}
#include "mainwidget.moc"
......@@ -179,6 +179,9 @@ class AKREGATORPART_EXPORT MainWidget : public QWidget
/** opens the homepage of the currently selected feed */
void slotOpenHomepage();
/** reloads all open tabs */
void slotReloadAllTabs();
/** toggles the keep flag of the currently selected article */
void slotArticleToggleKeepFlag(bool enabled);
/** deletes the currently selected article */
......
......@@ -409,6 +409,15 @@ void TabWidget::initiateDrag(int tab)
}
}
void TabWidget::slotReloadAllTabs()
{
Q_FOREACH(Frame* frame,d->frames.values())
{
frame->slotReload();
}
}
void TabWidget::slotCloseRequest(QWidget* widget)
{
if (d->frames.value(widget))
......
......@@ -56,6 +56,7 @@ class TabWidget : public KTabWidget
void slotSelectFrame(int frameId);
void slotFrameZoomIn();
void slotFrameZoomOut();
void slotReloadAllTabs();
Q_SIGNALS:
void signalCurrentFrameChanged(int);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment