KShare/screenshotter.cpp
ArsenArsen 37ce6f1eda Add clang-format; Make text and blur less annoying
I didn't read the clang-format documentation properly
2017-05-09 17:26:00 +02:00

25 lines
810 B
C++

#include "screenshotter.hpp"
#include "cropeditor/cropeditor.hpp"
#include "mainwindow.hpp"
#include "screenshotutil.hpp"
#include "uploaders/uploadersingleton.hpp"
#include <QDoubleSpinBox>
#include <QTimer>
void screenshotter::area() {
CropEditor *editor = new CropEditor(screenshotutil::fullscreen());
QObject::connect(editor, &CropEditor::cropped, [&](QPixmap *pixmap) { UploaderSingleton::inst().upload(pixmap); });
}
void screenshotter::fullscreen() {
UploaderSingleton::inst().upload(screenshotutil::fullscreen());
}
void screenshotter::areaDelayed() {
QTimer::singleShot(MainWindow::inst()->delay()->value() * 1000, &screenshotter::area);
}
void screenshotter::fullscreenDelayed() {
QTimer::singleShot(MainWindow::inst()->delay()->value() * 1000, &screenshotter::fullscreen);
}