Changeset View
Changeset View
Standalone View
Standalone View
src/actions/actionmanagerimpl.cpp
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | 111 | public: | |||
---|---|---|---|---|---|
119 | KActionMenu *tagMenu = nullptr; | 119 | KActionMenu *tagMenu = nullptr; | ||
120 | KActionCollection *actionCollection = nullptr; | 120 | KActionCollection *actionCollection = nullptr; | ||
121 | TabWidget *tabWidget = nullptr; | 121 | TabWidget *tabWidget = nullptr; | ||
122 | PimCommon::ShareServiceUrlManager *shareServiceManager = nullptr; | 122 | PimCommon::ShareServiceUrlManager *shareServiceManager = nullptr; | ||
123 | WebEngineViewer::ZoomActionMenu *zoomActionMenu = nullptr; | 123 | WebEngineViewer::ZoomActionMenu *zoomActionMenu = nullptr; | ||
124 | QAction *mQuickSearchAction = nullptr; | 124 | QAction *mQuickSearchAction = nullptr; | ||
125 | }; | 125 | }; | ||
126 | 126 | | |||
127 | void ActionManagerImpl::slotSettingsChanged() | ||||
dvratil: `{` on a new line | |||||
128 | { | ||||
129 | QAction *a = action(QStringLiteral("feed_hide_read")); | ||||
130 | if (!a) { | ||||
dvratil: `qCCritical(AKREGATOR_LOG)` | |||||
131 | qCCritical(AKREGATOR_LOG) << "Action not found"; | ||||
132 | return; | ||||
133 | } | ||||
134 | a->setChecked(Settings::hideReadFeeds()); | ||||
135 | } | ||||
136 | | ||||
127 | void ActionManagerImpl::slotNodeSelected(TreeNode *node) | 137 | void ActionManagerImpl::slotNodeSelected(TreeNode *node) | ||
128 | { | 138 | { | ||
129 | if (node != 0) { | 139 | if (node != 0) { | ||
130 | d->nodeSelectVisitor->visit(node); | 140 | d->nodeSelectVisitor->visit(node); | ||
131 | } | 141 | } | ||
132 | } | 142 | } | ||
133 | 143 | | |||
134 | ActionManagerImpl::ActionManagerImpl(Part *part, QObject *parent) | 144 | ActionManagerImpl::ActionManagerImpl(Part *part, QObject *parent) | ||
▲ Show 20 Lines • Show All 380 Lines • ▼ Show 20 Line(s) | 473 | { | |||
515 | action->setText(i18n("Go Up in Tree")); | 525 | action->setText(i18n("Go Up in Tree")); | ||
516 | connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotItemUp); | 526 | connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotItemUp); | ||
517 | coll->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_Up)); | 527 | coll->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_Up)); | ||
518 | 528 | | |||
519 | action = coll->addAction(QStringLiteral("feedstree_down")); | 529 | action = coll->addAction(QStringLiteral("feedstree_down")); | ||
520 | action->setText(i18n("Go Down in Tree")); | 530 | action->setText(i18n("Go Down in Tree")); | ||
521 | connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotItemDown); | 531 | connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotItemDown); | ||
522 | coll->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_Down)); | 532 | coll->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_Down)); | ||
533 | | ||||
534 | action = coll->addAction(QStringLiteral("feed_hide_read")); | ||||
535 | action->setCheckable(true); | ||||
536 | action->setText(i18n("Hide Read Feeds")); | ||||
537 | action->setChecked(Settings::hideReadFeeds()); | ||||
538 | connect(action, &QAction::triggered, subscriptionListView, &SubscriptionListView::slotSetHideReadFeeds); | ||||
523 | } | 539 | } | ||
524 | 540 | | |||
525 | void ActionManagerImpl::initTabWidget(TabWidget *tabWidget) | 541 | void ActionManagerImpl::initTabWidget(TabWidget *tabWidget) | ||
526 | { | 542 | { | ||
527 | if (d->tabWidget) { | 543 | if (d->tabWidget) { | ||
528 | return; | 544 | return; | ||
529 | } else { | 545 | } else { | ||
530 | d->tabWidget = tabWidget; | 546 | d->tabWidget = tabWidget; | ||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |
{ on a new line