mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-08 12:12:27 +00:00
Add a resource exporter module
This commit is contained in:
@@ -21,10 +21,6 @@
|
||||
#include "src/infowindow.h"
|
||||
#include "src/config/configwindow.h"
|
||||
#include "src/capture/widget/capturebutton.h"
|
||||
#include "src/utils/screengrabber.h"
|
||||
#include "src/capture/workers/imgur/imguruploader.h"
|
||||
#include "src/capture/workers/screenshotsaver.h"
|
||||
#include "src/capture/workers/graphicalscreenshotsaver.h"
|
||||
#include <QFile>
|
||||
#include <QApplication>
|
||||
#include <QSystemTrayIcon>
|
||||
@@ -47,7 +43,6 @@ Controller::Controller() : m_captureWindow(nullptr)
|
||||
|
||||
QString StyleSheet = CaptureButton::globalStyleSheet();
|
||||
qApp->setStyleSheet(StyleSheet);
|
||||
|
||||
}
|
||||
|
||||
Controller *Controller::getInstance() {
|
||||
@@ -55,19 +50,6 @@ Controller *Controller::getInstance() {
|
||||
return &c;
|
||||
}
|
||||
|
||||
void Controller::saveFullScreenshot(const QString &path,
|
||||
bool const toClipboard) {
|
||||
QPixmap p(ScreenGrabber().grabEntireDesktop());
|
||||
if(toClipboard) {
|
||||
captureToClipboard(p);
|
||||
}
|
||||
if(path.isEmpty()) {
|
||||
captureToFileUi(p);
|
||||
} else {
|
||||
captureToFile(p, path);
|
||||
}
|
||||
}
|
||||
|
||||
// initDefaults inits the global config in the first execution of the program
|
||||
void Controller::initDefaults() {
|
||||
ConfigHandler config;
|
||||
@@ -147,21 +129,3 @@ void Controller::updateConfigComponents() {
|
||||
m_configWindow->updateComponents();
|
||||
}
|
||||
}
|
||||
|
||||
void Controller::captureToClipboard(const QPixmap &p) {
|
||||
ScreenshotSaver().saveToClipboard(p);
|
||||
}
|
||||
|
||||
void Controller::captureToFile(const QPixmap &p, const QString &path) {
|
||||
ScreenshotSaver().saveToFilesystem(p, path);
|
||||
}
|
||||
|
||||
void Controller::captureToFileUi(const QPixmap &p) {
|
||||
auto w = new GraphicalScreenshotSaver(p);
|
||||
w->show();
|
||||
}
|
||||
|
||||
void Controller::captureToImgur(const QPixmap &p) {
|
||||
auto w = new ImgurUploader(p);
|
||||
w->show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user