37ce6f1eda
I didn't read the clang-format documentation properly
25 lines
810 B
C++
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);
|
|
}
|