Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/imageview.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 72 | { | |||
---|---|---|---|---|---|
75 | m_zoomFitAction = KStandardAction::fitToPage(this, SLOT(zoomFit()), actionCollection); | 75 | m_zoomFitAction = KStandardAction::fitToPage(this, SLOT(zoomFit()), actionCollection); | ||
76 | m_zoomFitAction->setIcon(KIcon("zoom-fit-best")); | 76 | m_zoomFitAction->setIcon(KIcon("zoom-fit-best")); | ||
77 | m_actualSizeAction = KStandardAction::actualSize(this, SLOT(normalSize()), actionCollection); | 77 | m_actualSizeAction = KStandardAction::actualSize(this, SLOT(normalSize()), actionCollection); | ||
78 | 78 | | |||
79 | connect(this, SIGNAL(enableZoomIn(bool)), m_zoomInAction, SLOT(setEnabled(bool))); | 79 | connect(this, SIGNAL(enableZoomIn(bool)), m_zoomInAction, SLOT(setEnabled(bool))); | ||
80 | connect(this, SIGNAL(enableZoomOut(bool)), m_zoomOutAction, SLOT(setEnabled(bool))); | 80 | connect(this, SIGNAL(enableZoomOut(bool)), m_zoomOutAction, SLOT(setEnabled(bool))); | ||
81 | 81 | | |||
82 | m_zoomFitPageAction = new KToggleAction(i18n("Zoom to fit"), 0); | 82 | m_zoomFitPageAction = new KToggleAction(i18n("Zoom to fit"), 0); | ||
83 | m_zoomFitPageAction->setShortcut(Qt::CTRL + Qt::Key_0); | 83 | actionCollection->setDefaultShortcut(m_zoomFitPageAction, Qt::CTRL + Qt::Key_1); | ||
84 | m_zoomFitPageAction->setIcon(KIcon("zoom-fit-best")); | 84 | m_zoomFitPageAction->setIcon(KIcon("zoom-fit-best")); | ||
85 | actionCollection->addAction( "view_zoom_to_fit", m_zoomFitPageAction); | 85 | actionCollection->addAction( "view_zoom_to_fit", m_zoomFitPageAction); | ||
86 | connect(m_zoomFitPageAction, SIGNAL(triggered()), this, SLOT(updateZoomToFit())); | 86 | connect(m_zoomFitPageAction, SIGNAL(triggered()), this, SLOT(updateZoomToFit())); | ||
87 | connect(this, SIGNAL(fitModeChanged(bool)), m_zoomFitPageAction, SLOT(setChecked(bool))); | 87 | connect(this, SIGNAL(fitModeChanged(bool)), m_zoomFitPageAction, SLOT(setChecked(bool))); | ||
88 | connect(this, SIGNAL(fitModeChanged(bool)), this, SLOT(updateZoomToFit())); | 88 | connect(this, SIGNAL(fitModeChanged(bool)), this, SLOT(updateZoomToFit())); | ||
89 | updateZoomToFit(); | 89 | updateZoomToFit(); | ||
90 | 90 | | |||
91 | // add actions to the widget's list for the popup menu | 91 | // add actions to the widget's list for the popup menu | ||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |