fix: QT complains about non-static data member initializers

This commit is contained in:
iceman1001 2017-07-30 09:26:31 +02:00
parent f28da2da6e
commit e449e2ba88
3 changed files with 10 additions and 64 deletions

View file

@ -32,16 +32,16 @@ class Plot: public QWidget
double GraphPixelsPerPoint;
int CursorAPos;
int CursorBPos;
void PlotGraph(int *buffer, int len, QRect r,QRect r2, QPainter* painter, int graphNum);
void PlotDemod(uint8_t *buffer, size_t len, QRect r,QRect r2, QPainter* painter, int graphNum, int plotOffset);
void plotGridLines(QPainter* painter,QRect r);
int xCoordOf(int i, QRect r );
int yCoordOf(int v, QRect r, int maxVal);
int valueOf_yCoord(int y, QRect r, int maxVal);
void setMaxAndStart(int *buffer, int len, QRect plotRect);
QColor getColor(int graphNum);
void PlotGraph(int *buffer, int len, QRect r,QRect r2, QPainter* painter, int graphNum);
void PlotDemod(uint8_t *buffer, size_t len, QRect r,QRect r2, QPainter* painter, int graphNum, int plotOffset);
void plotGridLines(QPainter* painter,QRect r);
int xCoordOf(int i, QRect r );
int yCoordOf(int v, QRect r, int maxVal);
int valueOf_yCoord(int y, QRect r, int maxVal);
void setMaxAndStart(int *buffer, int len, QRect plotRect);
QColor getColor(int graphNum);
public:
Plot(QWidget *parent = 0);
Plot(QWidget *parent = 0);
protected:
void paintEvent(QPaintEvent *event);
@ -128,7 +128,7 @@ public:
void run();
private:
char *script_cmds_file = NULL;
bool usb_present = false;
bool usb_present;
};
#endif // PROXGUI_QT

View file

@ -1,27 +0,0 @@
//-----------------------------------------------------------------------------
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
//
// 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
// the license.
//-----------------------------------------------------------------------------
// platform-independant sleep macros
//-----------------------------------------------------------------------------
#ifndef _WIN32
#define _POSIX_C_SOURCE 199309L
#include "sleep.h"
#include <time.h>
#include <stdio.h>
#include <sys/time.h>
#include <errno.h>
void nsleep(uint64_t n) {
struct timespec timeout;
timeout.tv_sec = n/1000000000;
timeout.tv_nsec = n%1000000000;
while (nanosleep(&timeout, &timeout) && errno == EINTR);
}
#endif // _WIN32

View file

@ -1,27 +0,0 @@
//-----------------------------------------------------------------------------
// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
//
// 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
// the license.
//-----------------------------------------------------------------------------
// platform-independant sleep macros
//-----------------------------------------------------------------------------
#ifndef SLEEP_H__
#define SLEEP_H__
#ifdef _WIN32
# include <windows.h>
# define sleep(n) Sleep(1000 * n)
# define msleep(n) Sleep(n)
#else
# include <inttypes.h>
# include <unistd.h>
void nsleep(uint64_t n);
# define msleep(n) nsleep(1000000 * n)
# define usleep(n) nsleep(1000 * n)
#endif // _WIN32
#endif // SLEEP_H__