Changeset View
Changeset View
Standalone View
Standalone View
src/window/mainwindow.cpp
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 56 | { | |||
---|---|---|---|---|---|
132 | rearrangeAct->setToolTip(i18n("Rearrange all pieces in a selected piece holder or selected pieces in any window")); | 132 | rearrangeAct->setToolTip(i18n("Rearrange all pieces in a selected piece holder or selected pieces in any window")); | ||
133 | actionCollection()->setDefaultShortcut(rearrangeAct, QKeySequence(Qt::Key_R)); | 133 | actionCollection()->setDefaultShortcut(rearrangeAct, QKeySequence(Qt::Key_R)); | ||
134 | actionCollection()->addAction("move_rearrange", rearrangeAct); | 134 | actionCollection()->addAction("move_rearrange", rearrangeAct); | ||
135 | connect(rearrangeAct, SIGNAL(triggered()), m_game, SLOT(rearrangePieces())); | 135 | connect(rearrangeAct, SIGNAL(triggered()), m_game, SLOT(rearrangePieces())); | ||
136 | 136 | | |||
137 | // Toggle puzzle-preview. | 137 | // Toggle puzzle-preview. | ||
138 | bool isVisible = Settings::puzzlePreviewVisible(); | 138 | bool isVisible = Settings::puzzlePreviewVisible(); | ||
139 | const QString text = i18nc("Preview is a noun here", "&Preview"); | 139 | const QString text = i18nc("Preview is a noun here", "&Preview"); | ||
140 | KToggleAction* togglePreviewAct = new KToggleAction(QIcon::fromTheme("view-preview"), text, 0); | 140 | KToggleAction* togglePreviewAct = new KToggleAction(QIcon::fromTheme("view-preview"), text, this); | ||
141 | togglePreviewAct->setIconText(i18nc("Preview is a noun here", "Preview")); | 141 | togglePreviewAct->setIconText(i18nc("Preview is a noun here", "Preview")); | ||
142 | togglePreviewAct->setToolTip(i18n("Show or hide the image of the completed puzzle")); | 142 | togglePreviewAct->setToolTip(i18n("Show or hide the image of the completed puzzle")); | ||
143 | actionCollection()->addAction("view_preview", togglePreviewAct); | 143 | actionCollection()->addAction("view_preview", togglePreviewAct); | ||
144 | togglePreviewAct->setEnabled(false); | 144 | togglePreviewAct->setEnabled(false); | ||
145 | togglePreviewAct->setChecked(false); | 145 | togglePreviewAct->setChecked(isVisible); | ||
146 | connect(togglePreviewAct, SIGNAL(triggered()), m_game, SLOT(actionTogglePreview())); | 146 | connect(togglePreviewAct, SIGNAL(triggered()), m_game, SLOT(actionTogglePreview())); | ||
147 | 147 | | |||
148 | // View zoom in. | 148 | // View zoom in. | ||
149 | KStandardAction::zoomIn(m_game, SLOT(actionZoomIn()), | 149 | KStandardAction::zoomIn(m_game, SLOT(actionZoomIn()), | ||
150 | actionCollection()); | 150 | actionCollection()); | ||
151 | 151 | | |||
152 | // View zoom out. | 152 | // View zoom out. | ||
153 | KStandardAction::zoomOut(m_game, SLOT(actionZoomOut()), | 153 | KStandardAction::zoomOut(m_game, SLOT(actionZoomOut()), | ||
Show All 20 Lines |