From aed0800aac98e37ddc029765c1d23332a0c11824 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Wed, 12 Jul 2017 02:06:08 +0200 Subject: [PATCH] Delete all mouse-visibility references --- src/capture/button.cpp | 19 ------------------- src/capture/button.h | 3 --- src/capture/capturewidget.cpp | 1 - src/capture/screenshot.cpp | 4 ---- src/controller.cpp | 1 - 5 files changed, 28 deletions(-) diff --git a/src/capture/button.cpp b/src/capture/button.cpp index d955fdb3..6ff7231b 100644 --- a/src/capture/button.cpp +++ b/src/capture/button.cpp @@ -80,17 +80,6 @@ QIcon Button::getIcon(const Type t, bool isWhite) { } QString path = ":/img/buttonIcons" + iconColor + "/"; -// if (t == Type::mouseVisibility) { -// QSettings settings; -// bool mouseVisible = settings.value("mouseVisible").toBool(); -// if (mouseVisible){ -// path += "mouse.svg"; -// } else { -// path += "mouse-off.svg"; -// } -// return QIcon(path); -// } - switch (t) { case Type::arrow: path += "arrow-bottom-left.png"; @@ -190,14 +179,6 @@ void Button::mouseReleaseEvent(QMouseEvent *e) { CaptureWidget *parent = static_cast(this->parent()); parent->mouseReleaseEvent(e); if (e->button() == Qt::LeftButton && m_pressed) { -// if (m_buttonType == Type::mouseVisibility) { -// QSettings settings; -// bool mouseVisible = settings.value("mouseVisible").toBool(); -// settings.setValue("mouseVisible", !mouseVisible); -// setIcon(getIcon(Type::mouseVisibility)); -// } else if (m_buttonType == Type::colorPicker) { - -// } Q_EMIT pressedButton(this); } m_pressed = false; diff --git a/src/capture/button.h b/src/capture/button.h index bdd74339..733790c1 100644 --- a/src/capture/button.h +++ b/src/capture/button.h @@ -45,9 +45,6 @@ public: exit, imageUploader, last, // used for iteration over the enum - text, - mouseVisibility, - colorPicker }; explicit Button(const Type, QWidget *parent = 0); diff --git a/src/capture/capturewidget.cpp b/src/capture/capturewidget.cpp index 45340b0f..d28fbb07 100644 --- a/src/capture/capturewidget.cpp +++ b/src/capture/capturewidget.cpp @@ -522,7 +522,6 @@ void CaptureWidget::downResize() { void CaptureWidget::setState(Button *b) { Button::Type t = b->getButtonType(); if(t == Button::Type::selectionIndicator || - //t == Button::Type::mouseVisibility || t == Button::Type::colorPicker) { return; } diff --git a/src/capture/screenshot.cpp b/src/capture/screenshot.cpp index d34b5f3a..af826605 100644 --- a/src/capture/screenshot.cpp +++ b/src/capture/screenshot.cpp @@ -118,9 +118,6 @@ QString Screenshot::graphicalSave(const QRect &selection, QWidget *parent) const } else { // save full screen when no selection pixToSave = m_modifiedScreenshot.copy(selection); } -// if (settings.value("mouseVisible").toBool()) { -// // TO DO -// } saved = pixToSave.save(fileName); if (!saved) { @@ -215,7 +212,6 @@ namespace { int originalLength = body.length(); body.setLength(ArrowWidth); // move across the line up to the head - //QPointF = ; QLineF temp(QPoint(0,0), p2-p1); temp.setLength(originalLength-ArrowHeight); QPointF bottonTranslation(temp.p2()); diff --git a/src/controller.cpp b/src/controller.cpp index 8666123d..127ffcdb 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -97,7 +97,6 @@ void Controller::initDefaults() { settings.setValue("showHelp", true); settings.setValue("showDesktopNotification", true); settings.setValue("drawColor", QColor(Qt::red)); - //settings.setValue("mouseVisible", false); settings.setValue("uiColor", QColor(116, 0, 150)); settings.setValue("contastUiColor", QColor(86, 0, 120));