From 63e2910b8e5d7c079bcce5a5ca80fc2d89c1a0d3 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Tue, 21 Jul 2020 17:06:04 +0300 Subject: [PATCH] Add local history for last screenshots --- src/core/globalshortcutfilter.cpp | 2 -- src/utils/history.cpp | 2 -- src/utils/history.h | 8 +++----- src/widgets/historywidget.cpp | 1 + 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/core/globalshortcutfilter.cpp b/src/core/globalshortcutfilter.cpp index 609b9c1b..9d508204 100644 --- a/src/core/globalshortcutfilter.cpp +++ b/src/core/globalshortcutfilter.cpp @@ -19,7 +19,6 @@ #include "src/core/controller.h" #include "src/widgets/historywidget.h" #include -#include GlobalShortcutFilter::GlobalShortcutFilter(QObject *parent) : QObject(parent) @@ -51,7 +50,6 @@ bool GlobalShortcutFilter::nativeEventFilter( // Show screenshots history if(VK_SNAPSHOT == keycode && MOD_SHIFT == modifiers) { - qDebug() << "Show screenshots history"; HistoryWidget *pHistory = new HistoryWidget(); pHistory->show(); } diff --git a/src/utils/history.cpp b/src/utils/history.cpp index 6197a53b..032314ab 100644 --- a/src/utils/history.cpp +++ b/src/utils/history.cpp @@ -2,8 +2,6 @@ #include "src/utils/confighandler.h" #include #include -#include -#include #include diff --git a/src/utils/history.h b/src/utils/history.h index f7e9bec3..6a2fc686 100644 --- a/src/utils/history.h +++ b/src/utils/history.h @@ -1,16 +1,14 @@ #ifndef HISTORY_H #define HISTORY_H -#include - #define HISTORY_MAX_SIZE 10 #define HISTORY_THUNB_SCALE 1.5 #define HISTORY_THUNB_WIDTH 160*HISTORY_THUNB_SCALE #define HISTORY_THUNB_HEIGH 90*HISTORY_THUNB_SCALE - -class QPixmap; -class QString; +#include +#include +#include class History diff --git a/src/widgets/historywidget.cpp b/src/widgets/historywidget.cpp index e97bee8d..48d1dc46 100644 --- a/src/widgets/historywidget.cpp +++ b/src/widgets/historywidget.cpp @@ -17,6 +17,7 @@ #include #include #include +#include HistoryWidget::HistoryWidget(QWidget *parent) : QDialog(parent)