Quick mode
This commit is contained in:
parent
a4d17949dc
commit
e47b69a9c5
@ -142,7 +142,8 @@ void CropScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) {
|
||||
drawingSelection = drawingSelectionMaker();
|
||||
if (drawingSelection)
|
||||
if (!drawingSelection->init(this)) setDrawingSelection("None", [] { return nullptr; });
|
||||
}
|
||||
} else if (settings::settings().value("quickMode", false).toBool())
|
||||
done();
|
||||
prevButtons = Qt::NoButton;
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,10 @@
|
||||
#include "screenshotutil.hpp"
|
||||
#include "ui_mainwindow.h"
|
||||
#include <QAction>
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QCoreApplication>
|
||||
#include <QDesktopServices>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QInputDialog>
|
||||
#include <QListWidgetItem>
|
||||
@ -80,6 +82,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
|
||||
addHotkeyItem("Fullscreen image", "fullscreen", new std::function<void()>([] { screenshotter::fullscreen(); }));
|
||||
addHotkeyItem("Area image", "area", new std::function<void()>([] { screenshotter::area(); }));
|
||||
|
||||
ui->quickMode->setChecked(settings::settings().value("quickMode", false).toBool());
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
@ -158,3 +162,11 @@ void MainWindow::on_hotkeys_doubleClicked(const QModelIndex &) {
|
||||
if (ok && hotkeying::valid(seq)) hotkeying::hotkey(str, QKeySequence(seq), *fncs.value(str));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_settingsButton_clicked() {
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/KShare"));
|
||||
}
|
||||
|
||||
void MainWindow::on_quickMode_clicked(bool checked) {
|
||||
settings::settings().setValue("quickMode", checked);
|
||||
}
|
||||
|
@ -30,6 +30,10 @@ class MainWindow : public QMainWindow {
|
||||
|
||||
void on_hotkeys_doubleClicked(const QModelIndex &index);
|
||||
|
||||
void on_settingsButton_clicked();
|
||||
|
||||
void on_quickMode_clicked(bool checked);
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>512</width>
|
||||
<height>304</height>
|
||||
<height>337</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -25,7 +25,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string><a href="https://github.com/ArsenArsen/KShare">Source code available free for everyone. Forever.</a>
|
||||
@ -91,6 +91,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QCheckBox" name="quickMode">
|
||||
<property name="text">
|
||||
<string>Quick mode (mouse release screenshots)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="settingsButton">
|
||||
<property name="text">
|
||||
<string>Open settings directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
|
Loading…
Reference in New Issue
Block a user