mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-26 16:15:25 -07:00
Plot Windows Move Realtime
This commit is contained in:
parent
5df9d3d8f7
commit
7fa8587dd2
7 changed files with 26 additions and 45 deletions
|
@ -1,40 +1,7 @@
|
||||||
/*****************************************************************************
|
//-----------------------------------------------------------------------------
|
||||||
* WARNING
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||||
*
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||||
* THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY.
|
// the license.
|
||||||
*
|
|
||||||
* USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL
|
|
||||||
* PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL,
|
|
||||||
* AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES.
|
|
||||||
*
|
|
||||||
* THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS.
|
|
||||||
*
|
|
||||||
*****************************************************************************
|
|
||||||
*
|
|
||||||
* This file is part of loclass. It is a reconstructon of the cipher engine
|
|
||||||
* used in iClass, and RFID techology.
|
|
||||||
*
|
|
||||||
* The implementation is based on the work performed by
|
|
||||||
* Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and
|
|
||||||
* Milosch Meriac in the paper "Dismantling IClass".
|
|
||||||
*
|
|
||||||
* Copyright (C) 2014 Martin Holst Swende
|
|
||||||
*
|
|
||||||
* This is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as published
|
|
||||||
* by the Free Software Foundation, or, at your option, any later version.
|
|
||||||
*
|
|
||||||
* This file is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with loclass. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Preferences Functions
|
// Preferences Functions
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -56,7 +23,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "cmdparser.h"
|
#include "cmdparser.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
//#include "proxgui.h"
|
||||||
|
extern void SetWindowsPosition (void);
|
||||||
static int CmdHelp(const char *Cmd);
|
static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
// Load all settings into memory (struct)
|
// Load all settings into memory (struct)
|
||||||
|
@ -477,7 +445,7 @@ static int CmdPrefSet (const char *Cmd)
|
||||||
// Need to work out how to change live....
|
// Need to work out how to change live....
|
||||||
// calling data plot seems to work
|
// calling data plot seems to work
|
||||||
//plotwidget->MoveWindows ();
|
//plotwidget->MoveWindows ();
|
||||||
|
SetWindowsPosition();
|
||||||
showPlotPosState ();
|
showPlotPosState ();
|
||||||
break;
|
break;
|
||||||
case prefOVERLAY:
|
case prefOVERLAY:
|
||||||
|
@ -500,6 +468,7 @@ static int CmdPrefSet (const char *Cmd)
|
||||||
if (y != -99999) session.window_overlay_ypos = y;
|
if (y != -99999) session.window_overlay_ypos = y;
|
||||||
if (h != -99999) session.window_overlay_hsize = h;
|
if (h != -99999) session.window_overlay_hsize = h;
|
||||||
if (w != -99999) session.window_overlay_wsize = w;
|
if (w != -99999) session.window_overlay_wsize = w;
|
||||||
|
SetWindowsPosition();
|
||||||
showOverlayPosState ();
|
showOverlayPosState ();
|
||||||
// Need to work out how to change live....
|
// Need to work out how to change live....
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
|
|
||||||
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
|
|
||||||
//
|
|
||||||
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
||||||
// at your option, any later version. See the LICENSE.txt file for the text of
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
||||||
// the license.
|
// the license.
|
||||||
|
|
|
@ -54,6 +54,9 @@ extern "C" void MainGraphics(void) {
|
||||||
|
|
||||||
gui->MainLoop();
|
gui->MainLoop();
|
||||||
}
|
}
|
||||||
|
extern "C" void SetWindowsPosition (void) {
|
||||||
|
gui->SetWindowsPosition ();
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop) {
|
extern "C" void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop) {
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
|
|
|
@ -24,6 +24,7 @@ void ShowGraphWindow(void);
|
||||||
void HideGraphWindow(void);
|
void HideGraphWindow(void);
|
||||||
void RepaintGraphWindow(void);
|
void RepaintGraphWindow(void);
|
||||||
void MainGraphics(void);
|
void MainGraphics(void);
|
||||||
|
void SetWindowsPosition (void);
|
||||||
void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop);
|
void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop);
|
||||||
void ExitGraphics(void);
|
void ExitGraphics(void);
|
||||||
#ifndef MAX_GRAPH_TRACE_LEN
|
#ifndef MAX_GRAPH_TRACE_LEN
|
||||||
|
|
|
@ -128,7 +128,10 @@ ProxGuiQT::~ProxGuiQT(void) {
|
||||||
plotapp = NULL;
|
plotapp = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void ProxGuiQT::SetWindowsPosition (void)
|
||||||
|
{
|
||||||
|
plotwidget->SetWindowsPosition ();
|
||||||
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
void ProxWidget::applyOperation() {
|
void ProxWidget::applyOperation() {
|
||||||
//printf("ApplyOperation()");
|
//printf("ApplyOperation()");
|
||||||
|
@ -258,6 +261,13 @@ void ProxWidget::showEvent(QShowEvent *event) {
|
||||||
controlWidget->show();
|
controlWidget->show();
|
||||||
plot->show();
|
plot->show();
|
||||||
}
|
}
|
||||||
|
void ProxWidget::SetWindowsPosition(void) {
|
||||||
|
printf ("Settings windows Pos\n");
|
||||||
|
if (session.preferences_loaded) {
|
||||||
|
setGeometry (session.window_plot_xpos,session.window_plot_ypos,session.window_plot_wsize,session.window_plot_hsize);
|
||||||
|
controlWidget->setGeometry (session.window_overlay_xpos,session.window_overlay_ypos,session.window_overlay_wsize,session.window_overlay_hsize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------- Plotting
|
//----------- Plotting
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ class ProxWidget : public QWidget {
|
||||||
void vchange_askedge(int v);
|
void vchange_askedge(int v);
|
||||||
void vchange_dthr_up(int v);
|
void vchange_dthr_up(int v);
|
||||||
void vchange_dthr_down(int v);
|
void vchange_dthr_down(int v);
|
||||||
|
void SetWindowsPosition(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
class WorkerThread : public QThread {
|
class WorkerThread : public QThread {
|
||||||
|
@ -121,7 +122,7 @@ class ProxGuiQT : public QObject {
|
||||||
void HideGraphWindow(void);
|
void HideGraphWindow(void);
|
||||||
void MainLoop(void);
|
void MainLoop(void);
|
||||||
void Exit(void);
|
void Exit(void);
|
||||||
|
void SetWindowsPosition (void);
|
||||||
private slots:
|
private slots:
|
||||||
void _ShowGraphWindow(void);
|
void _ShowGraphWindow(void);
|
||||||
void _RepaintGraphWindow(void);
|
void _RepaintGraphWindow(void);
|
||||||
|
|
|
@ -914,7 +914,7 @@ int main(int argc, char *argv[]) {
|
||||||
showBanner();
|
showBanner();
|
||||||
|
|
||||||
#ifdef USE_PREFERENCE_FILE
|
#ifdef USE_PREFERENCE_FILE
|
||||||
// Save settings if not load from settings json file.
|
// Save settings if not loaded from settings json file.
|
||||||
// Doing this here will ensure other checks and updates are saved to over rule default
|
// Doing this here will ensure other checks and updates are saved to over rule default
|
||||||
// e.g. Linux color use check
|
// e.g. Linux color use check
|
||||||
if (!session.preferences_loaded) {
|
if (!session.preferences_loaded) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue