diff --git a/src/colorpicker/colorpickerscene.cpp b/src/colorpicker/colorpickerscene.cpp index 32e33a1..1f21fee 100644 --- a/src/colorpicker/colorpickerscene.cpp +++ b/src/colorpicker/colorpickerscene.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include ColorPickerScene::ColorPickerScene(QPixmap pixmap, QWidget *parentWidget) @@ -17,23 +17,11 @@ ColorPickerScene::ColorPickerScene(QPixmap pixmap, QWidget *parentWidget) activateWindow(); setGeometry(pixmap.rect()); - QPoint p = utils::smallestScreenCoordinate() - + QPoint(settings::settings().value("cropx", 0).toInt(), settings::settings().value("cropy", 0).toInt()); - move(p.x(), p.y()); - if (QApplication::screens().size() == 1) - showFullScreen(); - else - show(); + ScreenOverlay::show(); } -void ColorPickerScene::mouseMoved(QGraphicsSceneMouseEvent *event, QPointF cursor, QPointF delta) { - color = image.pixelColor(cursorPos().toPoint()); - qreal bottom = rect().bottom(); // max y - qreal right = rect().right(); // max x - - QPointF origPoint = cursorPos() + QPoint(25, 0); - QPointF scopePoint = cursorPos(); - QPointF resPoint = origPoint; +void ColorPickerScene::mouseMoved(QGraphicsSceneMouseEvent *, QPointF cursorPos, QPointF) { + color = image.pixelColor(cursorPos.toPoint()); } void ColorPickerScene::keyPressEvent(QKeyEvent *event) { diff --git a/src/colorpicker/colorpickerscene.hpp b/src/colorpicker/colorpickerscene.hpp index 9f76604..da0d5ab 100644 --- a/src/colorpicker/colorpickerscene.hpp +++ b/src/colorpicker/colorpickerscene.hpp @@ -7,15 +7,14 @@ #include #include #include -#include -#include +#include +#include #include class ColorPickerScene : public ScreenOverlay, public ScreenOverlayView { Q_DECLARE_TR_FUNCTIONS(ColorPickerScene) public: ColorPickerScene(QPixmap pixmap, QWidget *parent = nullptr); - void mouseMoved(QGraphicsSceneMouseEvent *event, QPointF cursorPos, QPointF delta) override; void keyPressEvent(QKeyEvent *event) override; void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override; QString generateHint() override; @@ -23,6 +22,9 @@ public: new ColorPickerScene(utils::fullscreen()); } +protected: + void mouseMoved(QGraphicsSceneMouseEvent *, QPointF cursorPos, QPointF) override; + private: QImage image; QColor color; diff --git a/src/cropeditor/cropeditor.cpp b/src/cropeditor/cropeditor.cpp index bc47d0a..1ea927e 100644 --- a/src/cropeditor/cropeditor.cpp +++ b/src/cropeditor/cropeditor.cpp @@ -13,10 +13,6 @@ CropEditor::CropEditor(QPixmap image, QObject *parent) : QObject(parent) { scene = new CropScene(parent, image); view = new CropView(scene); - if (QApplication::screens().size() > 1) - view->show(); - else - view->showFullScreen(); view->raise(); QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem(image); pixmapItem->setZValue(-1); @@ -29,7 +25,7 @@ CropEditor::CropEditor(QPixmap image, QObject *parent) : QObject(parent) { view->move(p.x(), p.y()); view->setWindowTitle(tr("KShare Crop Editor")); view->activateWindow(); - + scene->show(); connect(scene, &CropScene::closedWithRect, this, &CropEditor::crop); } diff --git a/src/cropeditor/cropscene.cpp b/src/cropeditor/cropscene.cpp index cf935f9..4374d9b 100644 --- a/src/cropeditor/cropscene.cpp +++ b/src/cropeditor/cropscene.cpp @@ -167,28 +167,6 @@ QGraphicsItem *CropScene::whichItem(QPointF scenePos) { return nullptr; } -void CropScene::hide() { - setVisible(false); -} - -void CropScene::show() { - setVisible(true); -} - -void CropScene::setVisible(bool visible) { - for (auto view : views()) { - view->setVisible(visible); - if (visible) { - if (QApplication::screens().size() == 1) view->showFullScreen(); - QPoint p = utils::smallestScreenCoordinate() + QPoint(settings::settings().value("cropx", 0).toInt(), - settings::settings().value("cropy", 0).toInt()); - view->move(p.x(), p.y()); - view->setWindowTitle(tr("KShare Crop Editor")); - view->activateWindow(); - } - } -} - void CropScene::fontAsk() { hide(); bool ok = false; @@ -348,7 +326,10 @@ QString CropScene::generateHint() { QString rectStr("(-1, -1, 0, 0)"); if (rect) { rectStr = "(%0, %1, %2, %3)"; - rectStr = rectStr.arg(rect->rect().x()).arg(rect->rect().y()).arg(rect->rect().width()).arg(rect->rect().height()); + rectStr = rectStr.arg(qRound(rect->rect().x())) + .arg(qRound(rect->rect().y())) + .arg(qRound(rect->rect().width())) + .arg(qRound(rect->rect().height())); } return QString("ptr: (%0, %1)\nsel: %2").arg(qRound(cursorPos().x())).arg(qRound(cursorPos().y())).arg(rectStr); } diff --git a/src/cropeditor/cropscene.hpp b/src/cropeditor/cropscene.hpp index 7dd435a..6e25311 100644 --- a/src/cropeditor/cropscene.hpp +++ b/src/cropeditor/cropscene.hpp @@ -1,7 +1,6 @@ #ifndef CROPSCENE_HPP #define CROPSCENE_HPP -#include "../screenoverlay.hpp" #include #include #include @@ -11,7 +10,8 @@ #include #include #include -#include +#include +#include #include class CropScene; @@ -33,8 +33,6 @@ public: return rect; } QGraphicsItem *whichItem(QPointF scenePos); - void hide(); - void show(); void setVisible(bool visible); public slots: diff --git a/src/cropeditor/cropview.cpp b/src/cropeditor/cropview.cpp index 6dc48bd..275270d 100644 --- a/src/cropeditor/cropview.cpp +++ b/src/cropeditor/cropview.cpp @@ -1,8 +1,20 @@ #include "cropview.hpp" +#include +#include + CropView::CropView(QGraphicsScene *scene) : ScreenOverlayView(scene) { setCursor(Qt::BlankCursor); } CropView::~CropView() { } + +void CropView::showEvent(QShowEvent *) { + QPoint p = utils::smallestScreenCoordinate() + + QPoint(settings::settings().value("cropx", 0).toInt(), settings::settings().value("cropy", 0).toInt()); + if (QApplication::screens().size() == 1) showFullScreen(); + move(p); + setWindowTitle(tr("KShare Crop Editor")); + activateWindow(); +} diff --git a/src/cropeditor/cropview.hpp b/src/cropeditor/cropview.hpp index d306a46..6e48e73 100644 --- a/src/cropeditor/cropview.hpp +++ b/src/cropeditor/cropview.hpp @@ -2,12 +2,16 @@ #define CROPVIEW_HPP #include -#include +#include +#include class CropView : public ScreenOverlayView { + Q_DECLARE_TR_FUNCTIONS(CropScene) public: CropView(QGraphicsScene *scene); ~CropView(); +protected: + void showEvent(QShowEvent *e) override; }; #endif // CROPVIEW_HPP diff --git a/src/cropeditor/settings/brushpenselection.cpp b/src/cropeditor/settings/brushpenselection.cpp index 02a7f9e..4e78a18 100644 --- a/src/cropeditor/settings/brushpenselection.cpp +++ b/src/cropeditor/settings/brushpenselection.cpp @@ -21,8 +21,6 @@ BrushPenSelection::BrushPenSelection(CropScene *scene) : QDialog(), ui(new Ui::B ui->radSlider->setValue(settings::settings().value("blur/radius", 5.).toDouble() * 100); ui->radSpinner->setValue(settings::settings().value("blur/radius", 5.).toDouble()); - ui->gridBox->setChecked(scene->grid()); - ui->cosmetic->setChecked(scene->pen().isCosmetic()); ui->widthSlider->setValue(scene->pen().width()); ui->widthSpinner->setValue(scene->pen().widthF()); @@ -39,7 +37,6 @@ BrushPenSelection::BrushPenSelection(CropScene *scene) : QDialog(), ui(new Ui::B brush = scene->brush().color(); ui->alphaSlider->setValue(brush.alpha()); ui->alphaSpin->setValue(brush.alpha()); - highlight = scene->highlight(); setWindowTitle(tr("Crop editor settings")); this->scene = scene; @@ -64,15 +61,12 @@ void BrushPenSelection::on_buttonBox_accepted() { scene->pen().setCosmetic(ui->cosmetic->isChecked()); scene->pen().setWidthF(ui->widthSpinner->value()); scene->brush().setColor(brush); - scene->setHighlight(highlight); - scene->setGrid(ui->gridBox->isChecked()); scene->brush().setStyle((Qt::BrushStyle)ui->brushStyle->currentIndex()); settings::settings().setValue("penColor", scene->pen().color()); settings::settings().setValue("penCosmetic", scene->pen().isCosmetic()); settings::settings().setValue("penWidth", scene->pen().widthF()); settings::settings().setValue("brushColor", scene->brush().color()); - settings::settings().setValue("highlightColor", scene->highlight()); settings::settings().setValue("gridEnabled", scene->grid()); settings::settings().setValue("brushStyle", (int)scene->brush().style()); settings::settings().setValue("brushPath", ui->pathItemHasBrush->isChecked()); @@ -112,7 +106,3 @@ void BrushPenSelection::on_alphaSpin_valueChanged(int arg1) { void BrushPenSelection::on_penAlphaSpin_valueChanged(int arg1) { pen.setAlpha(arg1); } - -void BrushPenSelection::on_highlightColor_clicked() { - highlight = QColorDialog::getColor(highlight, this, tr("Highlight color")); -} diff --git a/src/cropeditor/settings/brushpenselection.hpp b/src/cropeditor/settings/brushpenselection.hpp index ac0ae90..e383f7f 100644 --- a/src/cropeditor/settings/brushpenselection.hpp +++ b/src/cropeditor/settings/brushpenselection.hpp @@ -27,12 +27,10 @@ private slots: void on_widthSpinner_valueChanged(double arg1); void on_penAlphaSpin_valueChanged(int arg1); - void on_highlightColor_clicked(); - private: Ui::BrushPenSelection *ui; CropScene *scene; - QColor brush, pen, highlight; + QColor brush, pen; }; #endif // BRUSHPENSELECTION_HPP diff --git a/src/cropeditor/settings/brushpenselection.ui b/src/cropeditor/settings/brushpenselection.ui index 74f5ec6..beb301b 100644 --- a/src/cropeditor/settings/brushpenselection.ui +++ b/src/cropeditor/settings/brushpenselection.ui @@ -7,7 +7,7 @@ 0 0 442 - 550 + 493 @@ -17,157 +17,7 @@ Dialog - - - - Pen settings - - - - - - 2500 - - - Qt::Horizontal - - - - - - - Choose pen color - - - - - - - Cosmetic - - - - - - - Width - - - - - - - Pen alpha - - - - - - - - - - 255 - - - Qt::Horizontal - - - - - - - 255 - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - true - - - - - - - Blur settings - - - - - - 3000 - - - Qt::Horizontal - - - - - - - Performance Hint - - - - - - - Animated Hint - - - - - - - Quality Hint - - - - - - - http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum - - - <a href="http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum">Blur Hints - - - true - - - Qt::TextBrowserInteraction - - - - - - - Blur Radius - - - - - - - px - - - 30.000000000000000 - - - - - - - + Brush settings @@ -293,7 +143,84 @@ - + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + true + + + + + + + Pen settings + + + + + + 2500 + + + Qt::Horizontal + + + + + + + Choose pen color + + + + + + + Cosmetic + + + + + + + Width + + + + + + + Pen alpha + + + + + + + + + + 255 + + + Qt::Horizontal + + + + + + + 255 + + + + + + + Arrow settings @@ -329,23 +256,73 @@ - - + + - Other editor settings + Blur settings - - - - - Enable grid + + + + + 3000 + + + Qt::Horizontal - - + + - Highligh color + Performance Hint + + + + + + + Animated Hint + + + + + + + Quality Hint + + + + + + + http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum + + + <a href="http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum">Blur Hints + + + true + + + Qt::TextBrowserInteraction + + + + + + + Blur Radius + + + + + + + px + + + 30.000000000000000 diff --git a/src/screenoverlay.cpp b/src/screenoverlay/screenoverlay.cpp similarity index 69% rename from src/screenoverlay.cpp rename to src/screenoverlay/screenoverlay.cpp index 9d027ba..02d9f11 100644 --- a/src/screenoverlay.cpp +++ b/src/screenoverlay/screenoverlay.cpp @@ -1,8 +1,11 @@ #include "screenoverlay.hpp" +#include "screenoverlaysettings.hpp" +#include #include #include #include +#include #include #include @@ -34,6 +37,7 @@ ScreenOverlay::ScreenOverlay(QPixmap pixmap, QObject *parent) : QGraphicsScene(p magnifierHintBox->setZValue(199); magnifierHint->setZValue(199); updateMag(); + loadSettings(); } void ScreenOverlay::wheelEvent(QGraphicsSceneWheelEvent *e) { @@ -59,7 +63,7 @@ void ScreenOverlay::wheelEvent(QGraphicsSceneWheelEvent *e) { void ScreenOverlay::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { QPointF delta = e->scenePos() - cursorPos(); if (e->modifiers() & Qt::ShiftModifier) { - _cursorPos += delta / 2; + setCursorPos(cursorPos() + (delta / 2)); QCursor::setPos(views()[0]->mapToGlobal(cursorPos().toPoint())); } else setCursorPos(e->scenePos()); @@ -68,6 +72,18 @@ void ScreenOverlay::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { mouseMoved(e, cursorPos(), delta); } +void ScreenOverlay::moveMouse(QPoint newPos) { + QMouseEvent eve(QEvent::MouseMove, newPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier); + for (auto &v : views()) { + QCursor::setPos(v->mapToGlobal(newPos)); + QApplication::sendEvent(v->viewport(), &eve); + } +} + +void ScreenOverlay::moveMouseBy(QPoint delta) { + moveMouse(cursorPos().toPoint() + delta); +} + void ScreenOverlay::hideMag() { magnifier->setVisible(false); cursorItem->setVisible(false); @@ -144,3 +160,65 @@ void ScreenOverlay::setHighlight(QColor highlight) { gridRectsY[i]->setBrush(c); highlightChanged(highlight); } + +void ScreenOverlay::keyPressEvent(QKeyEvent *e) { + switch (movementPattern()) { + case MP_JKL: + if (e->key() == Qt::Key_J) + moveMouseBy(QPoint(-1, 0)); + else if (e->key() == Qt::Key_K) + moveMouseBy(QPoint(0, 1)); + else if (e->key() == Qt::Key_L) + moveMouseBy(QPoint(0, -1)); + else if (e->key() == Qt::Key_Semicolon) + moveMouseBy(QPoint(1, 0)); + break; + case MP_HJKL: + if (e->key() == Qt::Key_H) + moveMouseBy(QPoint(-1, 0)); + else if (e->key() == Qt::Key_J) + moveMouseBy(QPoint(0, 1)); + else if (e->key() == Qt::Key_K) + moveMouseBy(QPoint(0, -1)); + else if (e->key() == Qt::Key_L) + moveMouseBy(QPoint(1, 0)); + break; + case MP_ARROWS: + if (e->key() == Qt::Key_Left) + moveMouseBy(QPoint(-1, 0)); + else if (e->key() == Qt::Key_Down) + moveMouseBy(QPoint(0, 1)); + else if (e->key() == Qt::Key_Up) + moveMouseBy(QPoint(0, -1)); + else if (e->key() == Qt::Key_Right) + moveMouseBy(QPoint(1, 0)); + break; + } +} + +void ScreenOverlay::hide() { + for (auto &v : views()) { + v->hide(); + } +} + +void ScreenOverlay::show() { + for (auto &v : views()) { + if (QApplication::screens().size() > 1) + v->show(); + else + v->showFullScreen(); + } +} + +void ScreenOverlay::showSettings() { + hide(); + ScreenOverlaySettings(this).exec(); + show(); +} + +void ScreenOverlay::loadSettings() { + setHighlight(settings::settings().value("highlightColor", QColor(Qt::cyan)).value()); + setMovementPattern(settings::settings().value("movementPattern", MP_HJKL).value()); + setGrid(settings::settings().value("gridEnabled", true).toBool()); +} diff --git a/src/screenoverlay.hpp b/src/screenoverlay/screenoverlay.hpp similarity index 76% rename from src/screenoverlay.hpp rename to src/screenoverlay/screenoverlay.hpp index 4ae7b82..3ad6b39 100644 --- a/src/screenoverlay.hpp +++ b/src/screenoverlay/screenoverlay.hpp @@ -4,21 +4,21 @@ #include #include #include +#include class ScreenOverlay : public QGraphicsScene { Q_OBJECT public: + enum MovementPattern { MP_JKL, MP_HJKL, MP_ARROWS }; explicit ScreenOverlay(QPixmap pixmap, QObject *parent = 0); - void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override; - void wheelEvent(QGraphicsSceneWheelEvent *e) override; - - virtual void mouseMoved(QGraphicsSceneMouseEvent *, QPointF, QPointF) { + void moveMouse(QPoint newPoint); + void moveMouseBy(QPoint delta); + MovementPattern movementPattern() { + return _movementPattern; } - virtual void highlightChanged(QColor) { - } - virtual QString generateHint() { - return QString(); + void setMovementPattern(MovementPattern nmp) { + _movementPattern = nmp; } QPixmap &pixmap() { @@ -52,8 +52,26 @@ public: return _cursorPos; } void setCursorPos(QPointF cursorPos) { + if (!pixmap().rect().contains(cursorPos.toPoint())) return; _cursorPos = cursorPos; } + void showSettings(); + void hide(); + void show(); + void loadSettings(); + +protected: + void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override; + void wheelEvent(QGraphicsSceneWheelEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; + + virtual void mouseMoved(QGraphicsSceneMouseEvent *, QPointF, QPointF) { + } + virtual void highlightChanged(QColor) { + } + virtual QString generateHint() { + return QString(); + } private: QPointF _cursorPos = QPoint(0, 0); @@ -67,6 +85,7 @@ private: QColor _highlight = Qt::cyan; bool _grid = true; QPixmap _pixmap; + MovementPattern _movementPattern = MP_ARROWS; }; #endif /* SCREENOVERLAY_HPP */ diff --git a/src/screenoverlay/screenoverlaysettings.cpp b/src/screenoverlay/screenoverlaysettings.cpp new file mode 100644 index 0000000..71ac866 --- /dev/null +++ b/src/screenoverlay/screenoverlaysettings.cpp @@ -0,0 +1,29 @@ +#include "screenoverlaysettings.hpp" +#include "ui_screenoverlaysettings.h" + +#include +#include + +ScreenOverlaySettings::ScreenOverlaySettings(ScreenOverlay *overlay, QWidget *parent) +: overlay(overlay), QDialog(parent), ui(new Ui::ScreenOverlaySettings) { + ui->setupUi(this); + + ui->gridBox->setChecked(overlay->grid()); + ui->movementPattern->setCurrentIndex(overlay->movementPattern()); + highlight = overlay->highlight(); +} + +void ScreenOverlaySettings::on_buttonBox_accepted() { + settings::settings().setValue("gridEnabled", ui->gridBox->isChecked()); + settings::settings().setValue("highlightColor", highlight); + settings::settings().setValue("movementPattern", ui->movementPattern->currentIndex()); + overlay->loadSettings(); +} + +void ScreenOverlaySettings::on_setHighlight_pressed() { + highlight = QColorDialog::getColor(highlight, this, tr("Highlight color")); +} + +ScreenOverlaySettings::~ScreenOverlaySettings() { + delete ui; +} diff --git a/src/screenoverlay/screenoverlaysettings.hpp b/src/screenoverlay/screenoverlaysettings.hpp new file mode 100644 index 0000000..008bb84 --- /dev/null +++ b/src/screenoverlay/screenoverlaysettings.hpp @@ -0,0 +1,29 @@ +#ifndef SCREENOVERLAYSETTINGS_H +#define SCREENOVERLAYSETTINGS_H + +#include +#include "screenoverlay.hpp" + +namespace Ui { +class ScreenOverlaySettings; +} + +class ScreenOverlaySettings : public QDialog +{ + Q_OBJECT + +public: + explicit ScreenOverlaySettings(ScreenOverlay *overlay, QWidget *parent = 0); + ~ScreenOverlaySettings(); + +private slots: + void on_buttonBox_accepted(); + void on_setHighlight_pressed(); + +private: + Ui::ScreenOverlaySettings *ui; + QColor highlight; + ScreenOverlay *overlay; +}; + +#endif // SCREENOVERLAYSETTINGS_H diff --git a/src/screenoverlay/screenoverlaysettings.ui b/src/screenoverlay/screenoverlaysettings.ui new file mode 100644 index 0000000..0dd1cd5 --- /dev/null +++ b/src/screenoverlay/screenoverlaysettings.ui @@ -0,0 +1,104 @@ + + + ScreenOverlaySettings + + + + 0 + 0 + 208 + 179 + + + + Screen overlay settings + + + + + + Keyboard movement pattern + + + + + + + + JKL; movement (Home-row) + + + + + HJKL movement (Vim-like) + + + + + Arrow movement + + + + + + + + Enable grid + + + + + + + Set highlight color + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + ScreenOverlaySettings + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + ScreenOverlaySettings + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/screenoverlayview.cpp b/src/screenoverlay/screenoverlayview.cpp similarity index 100% rename from src/screenoverlayview.cpp rename to src/screenoverlay/screenoverlayview.cpp diff --git a/src/screenoverlayview.hpp b/src/screenoverlay/screenoverlayview.hpp similarity index 100% rename from src/screenoverlayview.hpp rename to src/screenoverlay/screenoverlayview.hpp diff --git a/src/src.pro b/src/src.pro index b2e03d6..8565397 100644 --- a/src/src.pro +++ b/src/src.pro @@ -67,9 +67,10 @@ SOURCES += main.cpp\ logs/requestlogging.cpp \ logs/historydialog.cpp \ monospacetextdialog.cpp \ - screenoverlayview.cpp \ cropeditor/selectionrectangle.cpp \ - screenoverlay.cpp + screenoverlay/screenoverlayview.cpp \ + screenoverlay/screenoverlay.cpp \ + screenoverlay/screenoverlaysettings.cpp HEADERS += mainwindow.hpp \ cropeditor/cropeditor.hpp \ @@ -116,11 +117,11 @@ HEADERS += mainwindow.hpp \ filenamevalidator.hpp \ logs/requestlogging.hpp \ logs/historydialog.hpp \ - screenoverlayview.hpp \ - screenoverlayview.hpp \ monospacetextdialog.hpp \ cropeditor/selectionrectangle.hpp \ - screenoverlay.hpp + screenoverlay/screenoverlayview.hpp \ + screenoverlay/screenoverlay.hpp \ + screenoverlay/screenoverlaysettings.hpp nopkg { # win32 { @@ -181,7 +182,8 @@ FORMS += mainwindow.ui \ hotkeyinputdialog.ui \ uploaders/default/imgursettingsdialog.ui \ logs/historydialog.ui \ - monospacetextdialog.ui + monospacetextdialog.ui \ + screenoverlay/screenoverlaysettings.ui RESOURCES += \ icon.qrc \ diff --git a/src/utils.hpp b/src/utils.hpp index 9458734..ded3cba 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace utils { QColor invertColor(QColor color);