Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSWidget.cpp
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 41 | { | |||
---|---|---|---|---|---|
125 | // the take a new screenshot button | 125 | // the take a new screenshot button | ||
126 | mTakeScreenshotButton = new QPushButton(i18n("Take a New Screenshot"), this); | 126 | mTakeScreenshotButton = new QPushButton(i18n("Take a New Screenshot"), this); | ||
127 | mTakeScreenshotButton->setIcon(QIcon::fromTheme(QStringLiteral("spectacle"))); | 127 | mTakeScreenshotButton->setIcon(QIcon::fromTheme(QStringLiteral("spectacle"))); | ||
128 | mTakeScreenshotButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | 128 | mTakeScreenshotButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
129 | mTakeScreenshotButton->setFocus(); | 129 | mTakeScreenshotButton->setFocus(); | ||
130 | connect(mTakeScreenshotButton, &QPushButton::clicked, this, &KSWidget::newScreenshotClicked); | 130 | connect(mTakeScreenshotButton, &QPushButton::clicked, this, &KSWidget::newScreenshotClicked); | ||
131 | 131 | | |||
132 | QShortcut *takeScreenshotShortcut = new QShortcut(QKeySequence(QKeySequence::New), mTakeScreenshotButton); | 132 | QShortcut *takeScreenshotShortcut = new QShortcut(QKeySequence(QKeySequence::New), mTakeScreenshotButton); | ||
133 | connect(takeScreenshotShortcut, &QShortcut::activated, [this]() { | 133 | connect(takeScreenshotShortcut, &QShortcut::activated, this, [this]() { | ||
134 | mTakeScreenshotButton->animateClick(100); | 134 | mTakeScreenshotButton->animateClick(100); | ||
135 | }); | 135 | }); | ||
136 | 136 | | |||
137 | // finally, finish up the layouts | 137 | // finally, finish up the layouts | ||
138 | mRightLayout = new QVBoxLayout; | 138 | mRightLayout = new QVBoxLayout; | ||
139 | mRightLayout->addStretch(1); | 139 | mRightLayout->addStretch(1); | ||
140 | mRightLayout->addWidget(mCaptureModeLabel); | 140 | mRightLayout->addWidget(mCaptureModeLabel); | ||
141 | mRightLayout->addLayout(mCaptureModeForm); | 141 | mRightLayout->addLayout(mCaptureModeForm); | ||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |