mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
fix: 'data plot' - plot window now hides when keypress Q
This commit is contained in:
parent
190be2bd43
commit
e8be06dd31
3 changed files with 11 additions and 6 deletions
|
@ -557,6 +557,8 @@ Plot::Plot(QWidget *parent) : QWidget(parent), GraphStart(0), GraphPixelsPerPoin
|
||||||
CursorBPos = 0;
|
CursorBPos = 0;
|
||||||
|
|
||||||
setWindowTitle(tr("Sliders"));
|
setWindowTitle(tr("Sliders"));
|
||||||
|
|
||||||
|
master = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plot::closeEvent(QCloseEvent *event)
|
void Plot::closeEvent(QCloseEvent *event)
|
||||||
|
@ -672,8 +674,7 @@ void Plot::keyPressEvent(QKeyEvent *event)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_Q:
|
case Qt::Key_Q:
|
||||||
//this->hide();
|
master->hide();
|
||||||
this->close();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -22,12 +22,16 @@
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
#include "ui/ui_overlays.h"
|
#include "ui/ui_overlays.h"
|
||||||
|
|
||||||
|
class ProxWidget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The actual plot, black area were we paint the graph
|
* @brief The actual plot, black area were we paint the graph
|
||||||
*/
|
*/
|
||||||
class Plot: public QWidget
|
class Plot: public QWidget
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
QWidget *master;
|
||||||
int GraphStart;
|
int GraphStart;
|
||||||
double GraphPixelsPerPoint;
|
double GraphPixelsPerPoint;
|
||||||
int CursorAPos;
|
int CursorAPos;
|
||||||
|
|
|
@ -80,9 +80,9 @@ void PrintAndLogEx(logLevel_t level, char *fmt, ...) {
|
||||||
vsnprintf(buffer, sizeof(buffer), fmt, args);
|
vsnprintf(buffer, sizeof(buffer), fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
if(strchr(buffer, '\n')) {
|
if (strchr(buffer, '\n')) {
|
||||||
|
|
||||||
token = strtok(buffer,"\n");
|
token = strtok(buffer, "\n");
|
||||||
|
|
||||||
while (token != NULL) {
|
while (token != NULL) {
|
||||||
size = strlen(buffer2);
|
size = strlen(buffer2);
|
||||||
|
@ -159,9 +159,9 @@ void PrintAndLog(char *fmt, ...) {
|
||||||
}
|
}
|
||||||
va_end(argptr2);
|
va_end(argptr2);
|
||||||
|
|
||||||
if (g_flushAfterWrite == 1) {
|
if (g_flushAfterWrite == 1)
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
}
|
|
||||||
//release lock
|
//release lock
|
||||||
pthread_mutex_unlock(&print_lock);
|
pthread_mutex_unlock(&print_lock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue