Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleCore.cpp
Show First 20 Lines • Show All 298 Lines • ▼ Show 20 Line(s) | 286 | { | |||
---|---|---|---|---|---|
299 | dragHandler->exec(Qt::CopyAction); | 299 | dragHandler->exec(Qt::CopyAction); | ||
300 | } | 300 | } | ||
301 | 301 | | |||
302 | // Private | 302 | // Private | ||
303 | 303 | | |||
304 | void SpectacleCore::initGui() | 304 | void SpectacleCore::initGui() | ||
305 | { | 305 | { | ||
306 | if (!isGuiInited) { | 306 | if (!isGuiInited) { | ||
307 | mMainWindow = new KSMainWindow(mImageGrabber->onClickGrabSupported()); | 307 | mMainWindow = new KSMainWindow(mImageGrabber->supportedModes(), mImageGrabber->onClickGrabSupported()); | ||
308 | 308 | | |||
309 | connect(mMainWindow, &KSMainWindow::newScreenshotRequest, this, &SpectacleCore::takeNewScreenshot); | 309 | connect(mMainWindow, &KSMainWindow::newScreenshotRequest, this, &SpectacleCore::takeNewScreenshot); | ||
310 | connect(mMainWindow, &KSMainWindow::dragAndDropRequest, this, &SpectacleCore::doStartDragAndDrop); | 310 | connect(mMainWindow, &KSMainWindow::dragAndDropRequest, this, &SpectacleCore::doStartDragAndDrop); | ||
311 | 311 | | |||
312 | isGuiInited = true; | 312 | isGuiInited = true; | ||
313 | QMetaObject::invokeMethod(mImageGrabber, "doImageGrab", Qt::QueuedConnection); | 313 | QMetaObject::invokeMethod(mImageGrabber, "doImageGrab", Qt::QueuedConnection); | ||
314 | } | 314 | } | ||
315 | } | 315 | } |