mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-02-11 04:54:00 +00:00
Add local history for last screenshots
This commit is contained in:
committed by
Yuriy Puchkov
parent
c84db1fa03
commit
5861b21fcf
@@ -83,6 +83,9 @@ DEFINES += QAPPLICATION_CLASS=QApplication
|
||||
|
||||
SOURCES += src/main.cpp \
|
||||
src/config/filepathconfiguration.cpp \
|
||||
src/tools/historywidget.cpp \
|
||||
src/utils/configenterprise.cpp \
|
||||
src/utils/history.cpp \
|
||||
src/widgets/capture/buttonhandler.cpp \
|
||||
src/widgets/infowindow.cpp \
|
||||
src/config/configwindow.cpp \
|
||||
@@ -159,6 +162,9 @@ SOURCES += src/main.cpp \
|
||||
|
||||
HEADERS += src/widgets/capture/buttonhandler.h \
|
||||
src/config/filepathconfiguration.h \
|
||||
src/tools/historywidget.h \
|
||||
src/utils/configenterprise.h \
|
||||
src/utils/history.h \
|
||||
src/widgets/infowindow.h \
|
||||
src/config/configwindow.h \
|
||||
src/widgets/capture/capturewidget.h \
|
||||
|
||||
@@ -22,14 +22,19 @@
|
||||
#include "src/config/configwindow.h"
|
||||
#include "src/widgets/capture/capturebutton.h"
|
||||
#include "src/widgets/capturelauncher.h"
|
||||
#include "src/widgets/notificationwidget.h"
|
||||
#include "src/utils/systemnotification.h"
|
||||
#include "src/utils/screengrabber.h"
|
||||
#include "src/utils/history.h"
|
||||
#include "src/utils/configenterprise.h"
|
||||
#include "src/tools/historywidget.h"
|
||||
#include <QFile>
|
||||
#include <QApplication>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <QDesktopWidget>
|
||||
#include <QClipboard>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "src/core/globalshortcutfilter.h"
|
||||
@@ -171,6 +176,8 @@ void Controller::enableTrayIcon() {
|
||||
if (m_trayIcon) {
|
||||
return;
|
||||
}
|
||||
QMenu *trayIconMenu = new QMenu();
|
||||
|
||||
ConfigHandler().setDisabledTrayIcon(false);
|
||||
QAction *captureAction = new QAction(tr("&Take Screenshot"), this);
|
||||
connect(captureAction, &QAction::triggered, this, [this](){
|
||||
@@ -180,6 +187,7 @@ void Controller::enableTrayIcon() {
|
||||
QAction *launcherAction = new QAction(tr("&Open Launcher"), this);
|
||||
connect(launcherAction, &QAction::triggered, this,
|
||||
&Controller::openLauncherWindow);
|
||||
|
||||
QAction *configAction = new QAction(tr("&Configuration"), this);
|
||||
connect(configAction, &QAction::triggered, this,
|
||||
&Controller::openConfigWindow);
|
||||
@@ -190,10 +198,16 @@ void Controller::enableTrayIcon() {
|
||||
connect(quitAction, &QAction::triggered, qApp,
|
||||
&QCoreApplication::quit);
|
||||
|
||||
QMenu *trayIconMenu = new QMenu();
|
||||
// recent screenshots
|
||||
QAction *recentAction = new QAction(tr("&Recent Screenshot"), this);
|
||||
connect(recentAction, SIGNAL(triggered()), this, SLOT(showRecentScreenshots()));
|
||||
|
||||
// generate menu
|
||||
trayIconMenu->addAction(captureAction);
|
||||
trayIconMenu->addAction(launcherAction);
|
||||
trayIconMenu->addSeparator();
|
||||
trayIconMenu->addAction(recentAction);
|
||||
trayIconMenu->addSeparator();
|
||||
trayIconMenu->addAction(configAction);
|
||||
trayIconMenu->addAction(infoAction);
|
||||
trayIconMenu->addSeparator();
|
||||
@@ -239,6 +253,11 @@ void Controller::updateConfigComponents() {
|
||||
}
|
||||
}
|
||||
|
||||
void Controller::showRecentScreenshots() {
|
||||
HistoryWidget *pHistory = new HistoryWidget();
|
||||
pHistory->show();
|
||||
}
|
||||
|
||||
void Controller::startFullscreenCapture(const uint id) {
|
||||
bool ok = true;
|
||||
QPixmap p(ScreenGrabber().grabEntireDesktop(ok));
|
||||
|
||||
@@ -24,10 +24,17 @@
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
#include <functional>
|
||||
#include <QAction>
|
||||
|
||||
#include <QSpinBox>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QWidgetAction>
|
||||
|
||||
class CaptureWidget;
|
||||
class ConfigWindow;
|
||||
class InfoWindow;
|
||||
class QMenu;
|
||||
class QSystemTrayIcon;
|
||||
|
||||
using lambda = std::function<void(void)>;
|
||||
@@ -61,6 +68,8 @@ public slots:
|
||||
|
||||
void updateConfigComponents();
|
||||
|
||||
void showRecentScreenshots();
|
||||
|
||||
private slots:
|
||||
void startFullscreenCapture(const uint id = 0);
|
||||
void startVisualCapture(const uint id = 0,
|
||||
|
||||
@@ -17,14 +17,20 @@
|
||||
|
||||
#include "globalshortcutfilter.h"
|
||||
#include "src/core/controller.h"
|
||||
#include "src/tools/historywidget.h"
|
||||
#include <qt_windows.h>
|
||||
#include <QDebug>
|
||||
|
||||
GlobalShortcutFilter::GlobalShortcutFilter(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
// Forced Print Screen
|
||||
if (RegisterHotKey(NULL, 1, 0, VK_SNAPSHOT)) {
|
||||
// ok
|
||||
// ok - capture screen
|
||||
}
|
||||
|
||||
if (RegisterHotKey(NULL, 2, MOD_SHIFT, VK_SNAPSHOT)) {
|
||||
// ok - show screenshots history
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,13 +44,24 @@ bool GlobalShortcutFilter::nativeEventFilter(
|
||||
|
||||
MSG* msg = static_cast<MSG*>(message);
|
||||
if (msg->message == WM_HOTKEY) {
|
||||
//const quint32 keycode = HIWORD(msg->lParam);
|
||||
//const quint32 modifiers = LOWORD(msg->lParam);
|
||||
|
||||
// TODO: this is just a temporal workwrround, proper global
|
||||
// support would need custom shortcuts defined by the user.
|
||||
Controller::getInstance()->requestCapture(
|
||||
CaptureRequest(CaptureRequest::GRAPHICAL_MODE));
|
||||
const quint32 keycode = HIWORD(msg->lParam);
|
||||
const quint32 modifiers = LOWORD(msg->lParam);
|
||||
|
||||
// Show screenshots history
|
||||
if(VK_SNAPSHOT == keycode && MOD_SHIFT == modifiers) {
|
||||
qDebug() << "Show screenshots history";
|
||||
HistoryWidget *pHistory = new HistoryWidget();
|
||||
pHistory->show();
|
||||
}
|
||||
|
||||
// Capture screen
|
||||
if(VK_SNAPSHOT == keycode && 0 == modifiers) {
|
||||
Controller::getInstance()->requestCapture(
|
||||
CaptureRequest(CaptureRequest::GRAPHICAL_MODE));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
78
src/tools/historywidget.cpp
Normal file
78
src/tools/historywidget.cpp
Normal file
@@ -0,0 +1,78 @@
|
||||
#include "historywidget.h"
|
||||
#include "src/utils/history.h"
|
||||
#include "src/utils/configenterprise.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPixmap>
|
||||
#include <QLabel>
|
||||
#include <QScrollArea>
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QDateTime>
|
||||
#include <QPushButton>
|
||||
#include <QIcon>
|
||||
#include <QSettings>
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QClipboard>
|
||||
|
||||
|
||||
HistoryWidget::HistoryWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
setWindowTitle(tr("Screenshots history"));
|
||||
setFixedSize(this->size());
|
||||
|
||||
m_pVBox = new QVBoxLayout(this);
|
||||
|
||||
QScrollArea *scrollArea = new QScrollArea( this );
|
||||
scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
|
||||
scrollArea->setWidgetResizable( true );
|
||||
scrollArea->setGeometry( this->frameGeometry() );
|
||||
|
||||
QWidget *widget = new QWidget();
|
||||
scrollArea->setWidget( widget );
|
||||
widget->setLayout( m_pVBox );
|
||||
|
||||
loadHistory();
|
||||
}
|
||||
|
||||
void HistoryWidget::loadHistory() {
|
||||
History history = History();
|
||||
QList<QString> historyFiles = history.history();
|
||||
|
||||
foreach(QString fileName, historyFiles) {
|
||||
QString fullFileName = history.path() + fileName;
|
||||
|
||||
QPixmap pixmap;
|
||||
pixmap.load( fullFileName, "png" );
|
||||
pixmap = pixmap.scaledToWidth(120);
|
||||
|
||||
QPushButton *button = new QPushButton;
|
||||
button->setStyleSheet("Text-align:left");
|
||||
QIcon buttonIcon(fullFileName);
|
||||
button->setIcon(buttonIcon);
|
||||
button->setIconSize(pixmap.rect().size());
|
||||
|
||||
QFileInfo *pFileInfo = new QFileInfo(fullFileName);
|
||||
QString lastModified = pFileInfo->lastModified().toString("yyyy-MM-dd hh:mm:ss");
|
||||
button->setText(lastModified);
|
||||
|
||||
connect(button, &QPushButton::clicked, this, [=](){
|
||||
// TODO - optimize it
|
||||
this->close();
|
||||
ConfigEnterprise configEnterprise;
|
||||
QSettings *settings = configEnterprise.settings();
|
||||
settings->beginGroup("S3");
|
||||
QString url = settings->value("S3_URL").toString() + fileName;
|
||||
settings->endGroup();
|
||||
QApplication::clipboard()->setText(url);
|
||||
// qDebug() << "URL copied to clipboard:" << url;
|
||||
|
||||
// NotificationWidget *notification = new NotificationWidget();
|
||||
// notification->showMessage(tr("URL copied to clipboard."));
|
||||
});
|
||||
|
||||
|
||||
m_pVBox->addWidget(button);
|
||||
}
|
||||
}
|
||||
24
src/tools/historywidget.h
Normal file
24
src/tools/historywidget.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef HISTORYWIDGET_H
|
||||
#define HISTORYWIDGET_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
|
||||
class QVBoxLayout;
|
||||
|
||||
class HistoryWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HistoryWidget(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
private:
|
||||
void loadHistory();
|
||||
|
||||
private:
|
||||
QVBoxLayout *m_pVBox;
|
||||
};
|
||||
|
||||
#endif // HISTORYWIDGET_H
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "src/widgets/imagelabel.h"
|
||||
#include "src/widgets/notificationwidget.h"
|
||||
#include "src/utils/confighandler.h"
|
||||
#include "src/utils/history.h"
|
||||
#include "src/utils/configenterprise.h"
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDesktopServices>
|
||||
@@ -48,19 +50,6 @@
|
||||
ImgS3Uploader::ImgS3Uploader(const QPixmap &capture, QWidget *parent) :
|
||||
QWidget(parent), m_pixmap(capture)
|
||||
{
|
||||
QSettings *pSettings = nullptr;
|
||||
QString configIniPath = QDir(QDir::currentPath()).filePath("config.ini");
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
|
||||
if(!(QFileInfo::exists(configIniPath) && QFileInfo(configIniPath).isFile())) {
|
||||
configIniPath = "/etc/flameshot/config.ini";
|
||||
}
|
||||
#endif
|
||||
pSettings = new QSettings(configIniPath, QSettings::IniFormat);
|
||||
pSettings->beginGroup("S3");
|
||||
m_s3CredsUrl = pSettings->value("S3_CREDS_URL").toString();
|
||||
m_s3XApiKey = pSettings->value("S3_X_API_KEY").toString();
|
||||
pSettings->endGroup();
|
||||
|
||||
setWindowTitle(tr("Upload to ImgS3"));
|
||||
setWindowIcon(QIcon(":img/app/flameshot.svg"));
|
||||
|
||||
@@ -83,13 +72,24 @@ ImgS3Uploader::ImgS3Uploader(const QPixmap &capture, QWidget *parent) :
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QString httpProxyHost = pSettings->value("HTTP_PROXY_HOST").toString();
|
||||
// get enterprise settings
|
||||
m_configEnterprise = new ConfigEnterprise();
|
||||
QSettings *settings = m_configEnterprise->settings();
|
||||
|
||||
// get s3 credentials
|
||||
settings->beginGroup("S3");
|
||||
m_s3CredsUrl = settings->value("S3_CREDS_URL").toString();
|
||||
m_s3XApiKey = settings->value("S3_X_API_KEY").toString();
|
||||
settings->endGroup();
|
||||
|
||||
// set proxy server parameters
|
||||
QString httpProxyHost = settings->value("HTTP_PROXY_HOST").toString();
|
||||
if(httpProxyHost.length() > 0) {
|
||||
qDebug() << "Using proxy server";
|
||||
m_proxy = new QNetworkProxy();
|
||||
|
||||
if(pSettings->contains("HTTP_PROXY_TYPE")) {
|
||||
switch (pSettings->value("HTTP_PROXY_TYPE").toInt()) {
|
||||
if(settings->contains("HTTP_PROXY_TYPE")) {
|
||||
switch (settings->value("HTTP_PROXY_TYPE").toInt()) {
|
||||
case 0:
|
||||
m_proxy->setType(QNetworkProxy::DefaultProxy);
|
||||
break;
|
||||
@@ -111,22 +111,26 @@ ImgS3Uploader::ImgS3Uploader(const QPixmap &capture, QWidget *parent) :
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set proxy server parameters
|
||||
if(httpProxyHost.length() > 0) {
|
||||
m_proxy->setHostName(httpProxyHost);
|
||||
if(pSettings->contains("HTTP_PROXY_PORT")) {
|
||||
m_proxy->setPort(pSettings->value("HTTP_PROXY_PORT").toInt());
|
||||
if(settings->contains("HTTP_PROXY_PORT")) {
|
||||
m_proxy->setPort(settings->value("HTTP_PROXY_PORT").toInt());
|
||||
} else {
|
||||
m_proxy->setPort(3128);
|
||||
}
|
||||
|
||||
if(pSettings->contains("HTTP_PROXY_USER")) {
|
||||
m_proxy->setUser(pSettings->value("HTTP_PROXY_USER").toString());
|
||||
if(settings->contains("HTTP_PROXY_USER")) {
|
||||
m_proxy->setUser(settings->value("HTTP_PROXY_USER").toString());
|
||||
}
|
||||
if(pSettings->contains("HTTP_PROXY_PASSWORD")) {
|
||||
m_proxy->setPassword(pSettings->value("HTTP_PROXY_PASSWORD").toString());
|
||||
if(settings->contains("HTTP_PROXY_PASSWORD")) {
|
||||
m_proxy->setPassword(settings->value("HTTP_PROXY_PASSWORD").toString());
|
||||
}
|
||||
QNetworkProxy::setApplicationProxy(*m_proxy);
|
||||
m_NetworkAM->setProxy(*m_proxy);
|
||||
m_NetworkAMCreds->setProxy(*m_proxy);
|
||||
}
|
||||
|
||||
upload();
|
||||
@@ -135,6 +139,16 @@ ImgS3Uploader::ImgS3Uploader(const QPixmap &capture, QWidget *parent) :
|
||||
void ImgS3Uploader::handleReply(QNetworkReply *reply) {
|
||||
m_spinner->deleteLater();
|
||||
if (reply->error() == QNetworkReply::NoError) {
|
||||
// save history
|
||||
QString imageName = m_imageURL.toString();
|
||||
int lastSlash = imageName.lastIndexOf("/");
|
||||
if (lastSlash >= 0) {
|
||||
imageName = imageName.mid(lastSlash);
|
||||
}
|
||||
History history;
|
||||
history.save(m_pixmap, imageName);
|
||||
|
||||
// Copy url to clipboard if required
|
||||
if (ConfigHandler().copyAndCloseAfterUploadEnabled()) {
|
||||
QApplication::clipboard()->setText(m_imageURL.toString());
|
||||
SystemNotification().sendMessage(QObject::tr("URL copied to clipboard."));
|
||||
|
||||
@@ -30,6 +30,7 @@ class LoadSpinner;
|
||||
class QPushButton;
|
||||
class QUrl;
|
||||
class NotificationWidget;
|
||||
class ConfigEnterprise;
|
||||
|
||||
class ImgS3Uploader : public QWidget {
|
||||
Q_OBJECT
|
||||
@@ -49,6 +50,7 @@ private:
|
||||
void uploadToS3(QJsonDocument &response);
|
||||
|
||||
private:
|
||||
ConfigEnterprise *m_configEnterprise;
|
||||
QString m_s3CredsUrl;
|
||||
QString m_s3XApiKey;
|
||||
|
||||
|
||||
22
src/utils/configenterprise.cpp
Normal file
22
src/utils/configenterprise.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "configenterprise.h"
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
#include <QFileInfo>
|
||||
|
||||
|
||||
ConfigEnterprise::ConfigEnterprise()
|
||||
{
|
||||
// get enterprise settings
|
||||
m_settings = nullptr;
|
||||
QString configIniPath = QDir(QDir::currentPath()).filePath("config.ini");
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
|
||||
if(!(QFileInfo::exists(configIniPath) && QFileInfo(configIniPath).isFile())) {
|
||||
configIniPath = "/etc/flameshot/config.ini";
|
||||
}
|
||||
#endif
|
||||
m_settings = new QSettings(configIniPath, QSettings::IniFormat);
|
||||
}
|
||||
|
||||
QSettings *ConfigEnterprise::settings() {
|
||||
return m_settings;
|
||||
}
|
||||
18
src/utils/configenterprise.h
Normal file
18
src/utils/configenterprise.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef CONFIGENTERPRISE_H
|
||||
#define CONFIGENTERPRISE_H
|
||||
|
||||
class QSettings;
|
||||
|
||||
|
||||
class ConfigEnterprise
|
||||
{
|
||||
public:
|
||||
ConfigEnterprise();
|
||||
|
||||
QSettings *settings();
|
||||
|
||||
private:
|
||||
QSettings *m_settings;
|
||||
};
|
||||
|
||||
#endif // CONFIGENTERPRISE_H
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include <QUuid>
|
||||
|
||||
ConfigHandler::ConfigHandler(){
|
||||
m_settings.setDefaultFormat(QSettings::IniFormat);
|
||||
@@ -372,6 +373,18 @@ QString ConfigHandler::configFilePath() const {
|
||||
return m_settings.fileName();
|
||||
}
|
||||
|
||||
const QString ConfigHandler::userUuid() {
|
||||
QString userUuid;
|
||||
if (m_settings.contains(QStringLiteral("userUuid"))) {
|
||||
userUuid = m_settings.value(QStringLiteral("userUuid")).toString();
|
||||
} else {
|
||||
userUuid = QUuid::createUuid().toString();
|
||||
userUuid = userUuid.replace("{", "").replace("}", "");
|
||||
m_settings.setValue(QStringLiteral("userUuid"), userUuid);
|
||||
}
|
||||
return userUuid;
|
||||
}
|
||||
|
||||
bool ConfigHandler::normalizeButtons(QVector<int> &buttons) {
|
||||
auto listTypes = CaptureButton::getIterableButtonTypes();
|
||||
QVector<int> listTypesInt;
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void setAllTheButtons();
|
||||
|
||||
QString configFilePath() const;
|
||||
const QString userUuid();
|
||||
|
||||
private:
|
||||
QSettings m_settings;
|
||||
|
||||
53
src/utils/history.cpp
Normal file
53
src/utils/history.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "history.h"
|
||||
#include "src/utils/confighandler.h"
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QString>
|
||||
#include <QPixmap>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
History::History()
|
||||
{
|
||||
// Get cache history path
|
||||
ConfigHandler config;
|
||||
QString userUuid = config.userUuid();
|
||||
m_historyPath = QDir::homePath() + "/.cache/flameshot/history/"+ userUuid + "/";
|
||||
|
||||
// Check if directory for history exists and create if doesn't
|
||||
QDir dir = QDir(m_historyPath);
|
||||
if (!dir.exists())
|
||||
dir.mkpath(".");
|
||||
}
|
||||
|
||||
const QString &History::path() {
|
||||
return m_historyPath;
|
||||
}
|
||||
|
||||
void History::save(const QPixmap &pixmap, const QString &fileName) {
|
||||
QFile file(path() + fileName);
|
||||
file.open(QIODevice::WriteOnly);
|
||||
pixmap.scaled(HISTORY_THUNB_WIDTH,
|
||||
HISTORY_THUNB_HEIGH,
|
||||
Qt::KeepAspectRatio,
|
||||
Qt::SmoothTransformation
|
||||
).save(&file, "PNG");
|
||||
history();
|
||||
}
|
||||
|
||||
const QList<QString> &History::history() {
|
||||
QDir directory(path());
|
||||
QStringList images = directory.entryList(QStringList() << "*.png" << "*.PNG", QDir::Files, QDir::Time);
|
||||
int cnt = 0;
|
||||
m_thumbs.clear();
|
||||
foreach(QString fileName, images) {
|
||||
if(++cnt <= HISTORY_MAX_SIZE) {
|
||||
m_thumbs.append(fileName);
|
||||
}
|
||||
else {
|
||||
QFile file(path() + fileName);
|
||||
file.remove();
|
||||
}
|
||||
}
|
||||
return m_thumbs;
|
||||
}
|
||||
30
src/utils/history.h
Normal file
30
src/utils/history.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef HISTORY_H
|
||||
#define HISTORY_H
|
||||
|
||||
#include <QList>
|
||||
|
||||
#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;
|
||||
|
||||
|
||||
class History
|
||||
{
|
||||
public:
|
||||
History();
|
||||
|
||||
void save(const QPixmap &, const QString &);
|
||||
const QList<QString> &history();
|
||||
const QString &path();
|
||||
|
||||
private:
|
||||
QString m_historyPath;
|
||||
QList<QString> m_thumbs;
|
||||
};
|
||||
|
||||
#endif // HISTORY_H
|
||||
Reference in New Issue
Block a user