Hello community,
here is the log from the commit of package qslert for openSUSE:Factory
checked in at Fri Aug 27 16:12:45 CEST 2010.
--------
--- qslert/qslert.changes 2008-02-26 18:42:45.000000000 +0100
+++ /mounts/work_src_done/STABLE/qslert/qslert.changes 2010-08-17 14:41:21.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Aug 17 12:40:23 UTC 2010 - mmarek@novell.com
+
+- Update to version 1.3.5 provided by Matthias.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
qmake.diff
qslert-1.0.tar.bz2
New:
----
qslert-1.3.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qslert.spec ++++++
--- /var/tmp/diff_new_pack.mFzz15/_old 2010-08-27 16:09:34.000000000 +0200
+++ /var/tmp/diff_new_pack.mFzz15/_new 2010-08-27 16:09:34.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package qslert (Version 1.0)
+# spec file for package qslert (Version 1.3.5)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,14 +19,13 @@
Name: qslert
-BuildRequires: qt3-devel
-Version: 1.0
-Release: 61
-License: GPL v2 only
+BuildRequires: libqt4-devel
+Version: 1.3.5
+Release: 1
+License: GPLv2
Group: System/Monitoring
Url: http://www.novell.com
Source: %{name}-%{version}.tar.bz2
-Patch0: qmake.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Graphical Realtime monitor
# qslert contains in version 1.0 inline assembler
@@ -43,12 +42,9 @@
%prep
%setup -q
-%patch0
%build
export CXXFLAGS="$RPM_OPT_FLAGS"
-# This is overwriting intentionally the original Makefile
-qmake qslert.pro -o Makefile
make %{?jobs:-j %jobs}
%install
++++++ qslert-1.0.tar.bz2 -> qslert-1.3.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/data.cpp new/qslert-1.3.5/data.cpp
--- old/qslert-1.0/data.cpp 2008-02-13 12:09:29.000000000 +0100
+++ new/qslert-1.3.5/data.cpp 2010-08-11 17:54:37.000000000 +0200
@@ -1,7 +1,7 @@
#include
#include
-#include
-#include
+#include
+#include
#include "data.h"
Data::Data(int p_numPoints, QObject *parent) : QObject(parent)
@@ -19,7 +19,6 @@
newSweepMaxLatency = 0;
sweepAvgLatency = 0;
avgLatency = 0;
- cpufreq = 2000;
}
Data::~Data() {
@@ -27,16 +26,6 @@
free(data);
}
-void Data::setCpuFreq(int freq) {
-
- cpufreq=freq;
-}
-
-int Data::getCpuFreq() {
-
- return(cpufreq);
-}
-
int Data::getNumPoints() {
return(numPoints);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/data.h new/qslert-1.3.5/data.h
--- old/qslert-1.0/data.h 2008-02-13 12:07:58.000000000 +0100
+++ new/qslert-1.3.5/data.h 2010-08-11 17:54:37.000000000 +0200
@@ -3,7 +3,7 @@
#include
#include
-#include
+#include
class Data : public QObject
{
@@ -20,7 +20,6 @@
double sweepAvgLatency;
double count;
bool running;
- int cpufreq;
public:
@@ -34,8 +33,6 @@
int getAvgLatency();
int getSweepMaxLatency();
int getSweepAvgLatency();
- void setCpuFreq(int freq);
- int getCpuFreq();
void resetData();
void setRunning(bool p_running);
bool getRunning();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/gui.cpp new/qslert-1.3.5/gui.cpp
--- old/qslert-1.0/gui.cpp 2008-02-13 13:39:53.000000000 +0100
+++ new/qslert-1.3.5/gui.cpp 2010-08-11 17:54:37.000000000 +0200
@@ -1,21 +1,22 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
#include "gui.h"
#include "plot.h"
#include "data.h"
#include "latency.h"
-Gui::Gui(Data *p_data, int p_maxLatency, QWidget *parent, const char *name) : QHBox(parent, name) {
+Gui::Gui(Data *p_data, int p_maxLatency, QWidget *parent) : QWidget(parent) {
QString qs;
@@ -36,62 +37,107 @@
warmUp=10;
latency = new Latency(data);
maxLatency = p_maxLatency;
- setSpacing(10);
- setMargin(10);
aboutWidget = new QMessageBox(this);
- plot = new Plot(300, 200, maxLatency, data, this);
- QVBox *guiBox = new QVBox(this);
- guiBox->setSpacing(20);
- QVBox *globalBox = new QVBox(guiBox);
- new QLabel("Global:", globalBox);
- QHBox *maxBox = new QHBox(globalBox);
- new QLabel("Max. Jitter:", maxBox);
- maxLabel = new QLabel(maxBox);
+ QHBoxLayout *guiLayout = new QHBoxLayout;
+ setLayout(guiLayout);
+ QWidget *guiWidget = new QWidget;
+ QVBoxLayout *guiBoxLayout = new QVBoxLayout;
+ guiWidget->setLayout(guiBoxLayout);
+ plot = new Plot(300, 200, maxLatency, data);
+ plot->setMinimumSize(320, 200);
+ guiLayout->addWidget(plot);
+ guiLayout->addWidget(guiWidget);
+ guiLayout->setStretchFactor(plot, 100);
+ guiLayout->setStretchFactor(guiWidget, 1);
+
+ QGroupBox *globalBox = new QGroupBox("Global Jitter");
+ guiBoxLayout->addWidget(globalBox);
+ guiBoxLayout->setStretchFactor(globalBox, 1);
+ QVBoxLayout *globalBoxLayout = new QVBoxLayout;
+ globalBox->setLayout(globalBoxLayout);
+ QWidget *maxBox = new QWidget;
+ globalBoxLayout->addWidget(maxBox);
+ QHBoxLayout *maxBoxLayout = new QHBoxLayout;
+ maxBox->setLayout(maxBoxLayout);
+ maxBoxLayout->addWidget(new QLabel("Max.:"));
+ maxLabel = new QLabel;
+ maxBoxLayout->addWidget(maxLabel);
maxLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- maxLabel->setFixedWidth(50);
+ maxLabel->setFixedWidth(64);
maxLabel->setAlignment(Qt::AlignRight);
maxLabel->setLineWidth(2);
-// maxLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- new QLabel(" usec", maxBox);
- QHBox *avgBox = new QHBox(globalBox);
- new QLabel("Avg. Jitter:", avgBox);
+ maxBoxLayout->addWidget(new QLabel(" usec"));
+ QWidget *avgBox = new QWidget;
+ globalBoxLayout->addWidget(avgBox);
+ QHBoxLayout *avgBoxLayout = new QHBoxLayout;
+ avgBox->setLayout(avgBoxLayout);
+ avgBoxLayout->addWidget(new QLabel("Avg.:"));
avgLabel = new QLabel(avgBox);
+ avgBoxLayout->addWidget(avgLabel);
avgLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- avgLabel->setFixedWidth(50);
+ avgLabel->setFixedWidth(64);
avgLabel->setAlignment(Qt::AlignRight);
avgLabel->setLineWidth(2);
-// avgLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- new QLabel(" usec", avgBox);
- QVBox *sweepBox = new QVBox(guiBox);
- new QLabel("Sweep:", sweepBox);
- QHBox *sweepMaxBox = new QHBox(sweepBox);
- new QLabel("Max. Jitter:", sweepMaxBox);
- sweepMaxLabel = new QLabel(sweepMaxBox);
+ avgBoxLayout->addWidget(new QLabel(" usec"));
+
+ QWidget *sweepSpacer = new QWidget;
+ QGroupBox *sweepBox = new QGroupBox("Last Sweep");
+ guiBoxLayout->addWidget(sweepSpacer);
+ guiBoxLayout->addWidget(sweepBox);
+ guiBoxLayout->setStretchFactor(sweepSpacer, 100);
+ guiBoxLayout->setStretchFactor(sweepBox, 1);
+ QVBoxLayout *sweepBoxLayout = new QVBoxLayout;
+ sweepBox->setLayout(sweepBoxLayout);
+ QWidget *sweepMaxBox = new QWidget(sweepBox);
+ QHBoxLayout *sweepMaxBoxLayout = new QHBoxLayout;
+ sweepMaxBox->setLayout(sweepMaxBoxLayout);
+ sweepBoxLayout->addWidget(sweepMaxBox);
+ sweepMaxBoxLayout->addWidget(new QLabel("Max.:"));
+ sweepMaxLabel = new QLabel;
+ sweepMaxBoxLayout->addWidget(sweepMaxLabel);
sweepMaxLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- sweepMaxLabel->setFixedWidth(50);
+ sweepMaxLabel->setFixedWidth(64);
sweepMaxLabel->setAlignment(Qt::AlignRight);
sweepMaxLabel->setLineWidth(2);
-// sweepMaxLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- new QLabel(" usec", sweepMaxBox);
- QHBox *sweepAvgBox = new QHBox(sweepBox);
- new QLabel("Avg. Jitter:", sweepAvgBox);
- sweepAvgLabel = new QLabel(sweepAvgBox);
+ sweepMaxBoxLayout->addWidget(new QLabel(" usec"));
+ QWidget *sweepAvgBox = new QWidget;
+ QHBoxLayout *sweepAvgBoxLayout = new QHBoxLayout;
+ sweepAvgBox->setLayout(sweepAvgBoxLayout);
+ sweepBoxLayout->addWidget(sweepAvgBox);
+ sweepAvgBoxLayout->addWidget(new QLabel("Avg.:"));
+ sweepAvgLabel = new QLabel;
+ sweepAvgBoxLayout->addWidget(sweepAvgLabel);
sweepAvgLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
- sweepAvgLabel->setFixedWidth(50);
+ sweepAvgLabel->setFixedWidth(64);
sweepAvgLabel->setAlignment(Qt::AlignRight);
sweepAvgLabel->setLineWidth(2);
-// sweepAvgLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- new QLabel(" usec", sweepAvgBox);
- QVBox *zoomBox = new QVBox(guiBox);
- QHBox *zoomButtonBox = new QHBox(zoomBox);
- zoomButtonBox->setSpacing(32);
+ sweepAvgBoxLayout->addWidget(new QLabel(" usec"));
+
+ QWidget *zoomSpacer = new QWidget;
+ QWidget *zoomBox = new QWidget;
+ guiBoxLayout->addWidget(zoomSpacer);
+ guiBoxLayout->addWidget(zoomBox);
+ guiBoxLayout->setStretchFactor(zoomSpacer, 100);
+ guiBoxLayout->setStretchFactor(zoomBox, 1);
+ QVBoxLayout *zoomBoxLayout = new QVBoxLayout;
+ zoomBox->setLayout(zoomBoxLayout);
+ QWidget *zoomButtonBox = new QWidget(zoomBox);
+ QHBoxLayout *zoomButtonBoxLayout = new QHBoxLayout;
+ zoomButtonBox->setLayout(zoomButtonBoxLayout);
+ zoomBoxLayout->addWidget(zoomButtonBox);
QPushButton *zoomInButton = new QPushButton("Zoom In", zoomButtonBox);
QPushButton *zoomOutButton = new QPushButton("Zoom Out", zoomButtonBox);
- QHBox *buttonBox = new QHBox(guiBox);
- buttonBox->setSpacing(20);
- QCheckBox *runningCheck = new QCheckBox("Run", buttonBox);
+ zoomButtonBoxLayout->addWidget(zoomInButton);
+ zoomButtonBoxLayout->addWidget(zoomOutButton);
+ QWidget *checkBox = new QWidget;
+ zoomBoxLayout->addWidget(checkBox);
+ QHBoxLayout *checkBoxLayout = new QHBoxLayout;
+ checkBox->setLayout(checkBoxLayout);
+ QCheckBox *runningCheck = new QCheckBox("Run");
+ checkBoxLayout->addWidget(runningCheck);
runningCheck->setChecked(data->getRunning());
- QPushButton *updateButton = new QPushButton("Reset", buttonBox);
+ QPushButton *updateButton = new QPushButton("Reset");
+ checkBoxLayout->addWidget(updateButton);
qs.sprintf("%6d", data->getMaxLatency());
maxLabel->setText(qs);
qs.sprintf("%6d", data->getAvgLatency());
@@ -106,7 +152,8 @@
QObject::connect(zoomInButton, SIGNAL(clicked()), this, SLOT(zoomIn()));
QObject::connect(zoomOutButton, SIGNAL(clicked()), this, SLOT(zoomOut()));
QObject::connect(runningCheck, SIGNAL(toggled(bool)), this, SLOT(updateRunState(bool)));
- timer->start(50, true);
+ timer->setSingleShot(true);
+ timer->start(50);
latency->start();
}
@@ -138,7 +185,7 @@
qs.sprintf("%6d", data->getSweepAvgLatency());
sweepAvgLabel->setText(qs);
plot->refreshPlot();
- timer->start(50, true);
+ timer->start(50);
}
}
@@ -167,6 +214,6 @@
data->setRunning(on);
if (data->getRunning()) {
- timer->start(50, true);
+ timer->start(50);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/gui.h new/qslert-1.3.5/gui.h
--- old/qslert-1.0/gui.h 2008-02-13 13:43:32.000000000 +0100
+++ new/qslert-1.3.5/gui.h 2010-08-11 17:54:37.000000000 +0200
@@ -4,23 +4,23 @@
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "plot.h"
#include "data.h"
#include "latency.h"
#define zoomListLen 12
-const QString aboutText = "QSLERT 1.0\nby Matthias Nagorni\n(c)2007 Novell\n\n"
+const QString aboutText = "QSLERT 1.3.5\nby Matthias Nagorni\n(c)2010 Novell\n\n"
"QSLERT is licensed under the GPL.\n";
-class Gui : public QHBox
+class Gui : public QWidget
{
Q_OBJECT
@@ -36,7 +36,7 @@
int zoom, warmUp;
public:
- Gui(Data *p_data, int p_maxLatency, QWidget* parent=0, const char *name=0);
+ Gui(Data *p_data, int p_maxLatency, QWidget* parent=0);
~Gui();
public slots:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/latency.cpp new/qslert-1.3.5/latency.cpp
--- old/qslert-1.0/latency.cpp 2008-02-13 12:10:20.000000000 +0100
+++ new/qslert-1.3.5/latency.cpp 2010-08-11 17:54:37.000000000 +0200
@@ -1,19 +1,13 @@
#include
#include
-#include
-#include
+#include
+#include
#include
#include
#include
#include "data.h"
#include "latency.h"
-#define rdtscll(val) do { \
- unsigned int __a,__d; \
- asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
- (val) = ((unsigned long)__a) | (((unsigned long long)__d)<<32); \
-} while(0)
-
Latency::Latency(Data *p_data)
{
data = p_data;
@@ -41,25 +35,30 @@
void Latency::measureLatency() {
int l1;
- unsigned long long var1,var2,delta;
-
+ unsigned long long t1, t2, delta;
+ struct timespec t;
+ int wakingUp;
+
+ wakingUp = 0;
for (l1 = 0; l1 < data->getNumPoints(); l1++) {
- rdtscll(var1);
+ while (!data->getRunning()) {
+ msleep(100);
+ wakingUp = 5;
+ }
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ t1 = 1e9*t.tv_sec + t.tv_nsec;
doLoad();
- rdtscll(var2);
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ t2 = 1e9*t.tv_sec + t.tv_nsec;
delta2 = delta1;
- delta1 = (var2-var1)/data->getCpuFreq();
- if (delta2 >= delta1) {
- delta = (delta2-delta1);
- } else {
- delta = (delta1-delta2);
- }
- if (delta < 0){
- printf("delta = %llu \n",delta);
- } else if( delta > INT_MAX ){
- delta = 0;
- }
- data->setData(l1, (int)delta);
+ delta1 = double(t2-t1)/1.0e3;
+ delta = llabs(delta2 - delta1);
+ if (wakingUp) {
+ data->setData(l1, 0);
+ wakingUp--;
+ } else {
+ data->setData(l1, (int)delta);
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/latency.h new/qslert-1.3.5/latency.h
--- old/qslert-1.0/latency.h 2008-02-13 12:04:28.000000000 +0100
+++ new/qslert-1.3.5/latency.h 2010-08-11 17:54:37.000000000 +0200
@@ -3,8 +3,8 @@
#include
#include
-#include
-#include
+#include
+#include
#include "data.h"
class Latency : public QThread
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/license new/qslert-1.3.5/license
--- old/qslert-1.0/license 1970-01-01 01:00:00.000000000 +0100
+++ new/qslert-1.3.5/license 2010-08-11 17:54:37.000000000 +0200
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/LICENSE new/qslert-1.3.5/LICENSE
--- old/qslert-1.0/LICENSE 2008-02-13 11:58:12.000000000 +0100
+++ new/qslert-1.3.5/LICENSE 1970-01-01 01:00:00.000000000 +0100
@@ -1,280 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/main.cpp new/qslert-1.3.5/main.cpp
--- old/qslert-1.0/main.cpp 2008-02-13 13:24:34.000000000 +0100
+++ new/qslert-1.3.5/main.cpp 2010-08-11 17:54:37.000000000 +0200
@@ -2,45 +2,28 @@
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include "gui.h"
#include "data.h"
#include "latency.h"
-int main(int argc, char *argv[])
+int main(int argc, char **argv)
{
- QFile cpuInfo("/proc/cpuinfo");
- QString qs, freqStr;
- bool ok;
- QApplication *qApp = new QApplication(argc, argv);
+ QApplication *qMyApp = new QApplication(argc, argv, true);
QMainWindow *top = new QMainWindow();
- top->setCaption("QSLERT");
+ top->setWindowTitle("QSLERT 1.3.5");
Data *data = new Data(501);
Gui *gui = new Gui(data, 2000, top);
- QPopupMenu *filePopup = new QPopupMenu(top);
- QPopupMenu *aboutMenu = new QPopupMenu(top);
- top->menuBar()->insertItem("&File", filePopup);
- top->menuBar()->insertSeparator(); top->menuBar()->insertItem("&About", aboutMenu);
- filePopup->insertItem("&Quit", qApp, SLOT(quit()));
- aboutMenu->insertItem("About QSLERT", gui, SLOT(displayAbout()));
- cpuInfo.open(IO_ReadOnly);
- while (cpuInfo.readLine(qs, 255) > 0) {
- if (qs.find("cpu MHz", 0, false) >= 0) {
- freqStr=qs.right(qs.find(':'));
- data->setCpuFreq((int)freqStr.toDouble(&ok));
- printf("Current CPU Frequency (MHz): %d\n", data->getCpuFreq());
- break;
- }
- }
- cpuInfo.close();
+ QMenu *fileMenu = top->menuBar()->addMenu("&File");
+ QMenu *aboutMenu = top->menuBar()->addMenu("&About");
+ fileMenu->addAction("&Quit", qApp, SLOT(quit()));
+ aboutMenu->addAction("&About QSLERT", gui, SLOT(displayAbout()));
top->setCentralWidget(gui);
top->show();
- qApp->setMainWidget(top);
- return qApp->exec();
+ return qMyApp->exec();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/Makefile new/qslert-1.3.5/Makefile
--- old/qslert-1.0/Makefile 2008-02-13 11:58:12.000000000 +0100
+++ new/qslert-1.3.5/Makefile 2010-08-11 17:58:49.000000000 +0200
@@ -1,9 +1,7 @@
-QT_BASE_DIR=/usr/lib/qt3
-QT_LIB_DIR=$(QT_BASE_DIR)/lib
+QT_BASE_DIR=/usr/lib64/qt4
+QT_LIB_DIR=$(QT_BASE_DIR)/lib64
QT_BIN_DIR=$(QT_BASE_DIR)/bin
QT_INCLUDE_DIR=$(QT_BASE_DIR)/include
-X11_LIB_DIR=/usr/X11R6/lib
-X11_INCLUDE_DIR=/usr/X11R6/include
qslert: data.o latency.o gui.o gui.moc.o \
plot.o plot.moc.o \
@@ -12,13 +10,13 @@
data.o latency.o plot.o plot.moc.o \
gui.o gui.moc.o \
main.o \
- -L$(QT_LIB_DIR) -L$(X11_LIB_DIR) -L/usr/local/lib \
- -lqt-mt -lm -lrt
+ -L$(QT_LIB_DIR) \
+ -lQtCore -lQtGui -lm -lrt
clean:
@rm -f *.o qslert
-CXXFLAGS=-DQT_THREAD_SUPPORT -I$(QT_INCLUDE_DIR) -I$(X11_INCLUDE_DIR) -I. -O2 -g -Wall
+CXXFLAGS=-I$(QT_INCLUDE_DIR) -I. -O2 -g -Wall
data.o: data.cpp data.h
plot.o: plot.cpp plot.h data.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/Makefile-64 new/qslert-1.3.5/Makefile-64
--- old/qslert-1.0/Makefile-64 2008-02-13 11:58:12.000000000 +0100
+++ new/qslert-1.3.5/Makefile-64 1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-QT_BASE_DIR=/usr/lib/qt3
-QT_LIB_DIR=$(QT_BASE_DIR)/lib64
-QT_BIN_DIR=$(QT_BASE_DIR)/bin
-QT_INCLUDE_DIR=$(QT_BASE_DIR)/include
-X11_LIB_DIR=/usr/X11R6/lib
-X11_INCLUDE_DIR=/usr/X11R6/include
-
-qslert: data.o latency.o gui.o gui.moc.o \
- plot.o plot.moc.o \
- main.o
- gcc -g -o qslert \
- data.o latency.o plot.o plot.moc.o \
- gui.o gui.moc.o \
- main.o \
- -L$(QT_LIB_DIR) -L$(X11_LIB_DIR) -L/usr/local/lib \
- -lqt-mt -lm -lrt
-
-clean:
- @rm -f *.o qslert
-
-CXXFLAGS=-DQT_THREAD_SUPPORT -I$(QT_INCLUDE_DIR) -I$(X11_INCLUDE_DIR) -I. -O2 -g -Wall
-
-data.o: data.cpp data.h
-plot.o: plot.cpp plot.h data.h
-plot.moc.o: plot.moc.cpp plot.h data.h
-plot.moc.cpp: plot.h plot.cpp
- $(QT_BIN_DIR)/moc plot.h -o plot.moc.cpp
-gui.o: gui.cpp gui.h plot.h data.h latency.h
-gui.moc.o: gui.moc.cpp gui.h plot.h data.h latency.h
-gui.moc.cpp: gui.h gui.cpp
- $(QT_BIN_DIR)/moc gui.h -o gui.moc.cpp
-main.o: main.cpp gui.h data.h latency.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/plot.cpp new/qslert-1.3.5/plot.cpp
--- old/qslert-1.0/plot.cpp 2008-02-13 11:58:12.000000000 +0100
+++ new/qslert-1.3.5/plot.cpp 2010-08-11 17:54:37.000000000 +0200
@@ -1,29 +1,31 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include "plot.h"
#include "data.h"
-Plot::Plot(int p_w, int p_h, int p_maxLatency, Data *p_data, QWidget *parent, const char *name) : QWidget(parent, name) {
+Plot::Plot(int p_w, int p_h, int p_maxLatency, Data *p_data, QWidget *parent) : QWidget(parent) {
data = p_data;
w = p_w; h = p_h; maxLatency = p_maxLatency;
gridX = data->getNumPoints() / 10;
gridY = maxLatency / 10;
- qfm = new QFontMetrics(QFont("Helvetica", 8));
+ qfm = new QFontMetrics(QFont("Helvetica", 10));
bl = qfm->width(QString::number(maxLatency)) + 5;
br = qfm->width(QString::number(data->getNumPoints())) / 2 + 5;
bt = 7;
bb = qfm->height() + 5;
fw = w + bl + br, fh = h + bt + bb;
setPalette(QPalette(QColor(0, 80, 0), QColor(0, 80, 0)));
+ setAutoFillBackground(true);
lastPosPainted = 0;
}
@@ -33,8 +35,7 @@
void Plot::paintEvent(QPaintEvent *) {
- QPixmap pm(width(), height());
- QPainter p(&pm);
+ QPainter p;
int l1, hw, hh, d1, d2;
double scaleX, scaleY, dataScale, pointScale;
@@ -42,8 +43,8 @@
scaleY = (double)(height() - bt - bb) / (double)h;
dataScale = (double)h / (double)maxLatency;
pointScale = (double)w / (double)(data->getNumPoints() - 1);
- pm.fill(QColor(0, 80, 0));
- p.setFont(QFont("Helvetica", 8));
+ p.begin(this);
+ p.setFont(QFont("Helvetica", 10));
l1 = 0;
while (l1 <= maxLatency) {
if (l1) {
@@ -85,22 +86,27 @@
p.drawLine(bl + (int)(pointScale * scaleX * (double)(l1 - 1)), d1,
bl + (int)(pointScale * scaleX * (double)l1), d2);
}
- for (l1 = 0; l1 < 3; l1++) {
- if (l1 == 1) {
- p.setPen(QColor(180, 180, 0));
- } else {
- p.setPen(QColor(100, 100, 0));
- }
- p.drawLine(bl + (int)(pointScale * scaleX * (double)data->getLastWritePos()) + l1 - 1, bt,
- bl + (int)(pointScale * scaleX * (double)data->getLastWritePos()) + l1 - 1,
- height() - bb);
- }
- bitBlt(this, 0, 0, &pm);
+ d1 = height() - bb - (int)(scaleY * dataScale * (double)data->getMaxLatency());
+ if (d1 < height()) {
+ p.setPen(QPen(QColor(100, 0, 0), 3));
+ p.drawLine(bl + 2, d1, width() - br - 2, d1);
+ p.setPen(QPen(QColor(180, 0, 0), 1));
+ p.drawLine(bl + 2, d1, width() - br - 2, d1);
+ }
+ p.setPen(QPen(QColor(100, 100, 0), 3));
+ p.drawLine(bl + (int)(pointScale * scaleX * (double)data->getLastWritePos()), bt + 2,
+ bl + (int)(pointScale * scaleX * (double)data->getLastWritePos()),
+ height() - bb - 2);
+ p.setPen(QPen(QColor(180, 180, 0), 1));
+ p.drawLine(bl + (int)(pointScale * scaleX * (double)data->getLastWritePos()), bt + 2,
+ bl + (int)(pointScale * scaleX * (double)data->getLastWritePos()),
+ height() - bb - 2);
+ p.end();
}
void Plot::viewportResizeEvent(QResizeEvent *ev)
{
- repaint(false);
+ repaint(0, 0, width(), height());
}
QSize Plot::sizeHint() const {
@@ -117,7 +123,7 @@
if (lastPosPainted != data->getLastWritePos()) {
lastPosPainted = data->getLastWritePos();
- repaint(false);
+ repaint(0, 0, width(), height());
}
}
@@ -126,7 +132,7 @@
maxLatency = p_maxLatency;
gridY = maxLatency / 10;
bl = qfm->width(QString::number(maxLatency)) + 5;
- repaint(false);
+ repaint(0, 0, width(), height());
}
int Plot::getMaxLatency() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/plot.h new/qslert-1.3.5/plot.h
--- old/qslert-1.0/plot.h 2008-02-13 11:58:12.000000000 +0100
+++ new/qslert-1.3.5/plot.h 2010-08-11 17:54:37.000000000 +0200
@@ -4,11 +4,11 @@
#include
#include
#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include "data.h"
#define BORDER_LEFT 5
@@ -29,7 +29,7 @@
public:
Plot(int p_w, int p_h, int p_maxLatency, Data* p_data,
- QWidget* parent=0, const char *name=0);
+ QWidget* parent=0);
~Plot();
virtual QSize sizeHint() const;
virtual QSizePolicy sizePolicy() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qslert-1.0/THANKS new/qslert-1.3.5/THANKS
--- old/qslert-1.0/THANKS 2008-02-13 13:49:44.000000000 +0100
+++ new/qslert-1.3.5/THANKS 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-Thanks to Felix Foerster for a patch that reads the CPU Time Clock Stamp
-register for precise time measurement.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org