/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/Classes/cSettings.cpp |
---|
0,0 → 1,110 |
/*************************************************************************** |
* Copyright (C) 2008 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include <QSettings> |
#include <QDir> |
#include "cSettings.h" |
cSettings::cSettings() |
{ |
Settings_ID = 1; |
read_Settings(); |
} |
void cSettings::read_DebugLabels(int ID) |
{ |
QBitArray Def_View; |
Def_View.fill(true,MAX_DebugData); |
QString Hardware = HardwareType[ID]; |
QSettings Setting("QMK", "Debug-Labels"); |
Setting.beginGroup("Debug-Labels-" + Hardware); |
DebugData.Version = Setting.value(("Version"), "0").toString(); |
for (int a=0; a<MAX_DebugData; a++) |
{ |
DebugData.Label[a] = Setting.value(("Label_" + QString("%1").arg(a)), "-" + DEF_DebugNames[a]).toString(); |
} |
DebugData.Show_Plotter = Setting.value("Show_Plotter", QBitArray(Def_View)).value<QBitArray>(); |
Setting.endGroup(); |
} |
void cSettings::write_DebugLabels(int ID) |
{ |
QString Hardware = HardwareType[ID]; |
QSettings Setting("QMK", "Debug-Labels"); |
Setting.beginGroup("Debug-Labels-" + Hardware); |
Setting.setValue("Version", DebugData.Version); |
for (int a=0; a<MAX_DebugData; a++) |
{ |
Setting.setValue("Label_" + QString("%1").arg(a), DebugData.Label[a]); |
} |
Setting.setValue("Show_Plotter", QBitArray(DebugData.Show_Plotter)); |
Setting.endGroup(); |
} |
void cSettings::read_Settings() |
{ |
QSettings Setting("QMK", QA_NAME); |
Setting.beginGroup("Global"); |
Settings_ID = Setting.value("Settings ID", Settings_ID).toInt(); |
Setting.endGroup(); |
Setting.beginGroup("DATA"); |
// DATA.Debug_Intervall = Setting.value("Debug-Intervall", 500).toInt(); |
DATA.Plotter_Count = Setting.value("Plotter-Count", 100).toInt(); |
Setting.endGroup(); |
Setting.beginGroup("GUI"); |
GUI.isMax = Setting.value("IsMax",false).toBool(); |
GUI.Size = Setting.value("Size", QSize(700, 300)).toSize(); |
GUI.Point = Setting.value("Point",QPoint(1,1)).toPoint(); |
Setting.endGroup(); |
} |
void cSettings::write_Settings() |
{ |
QSettings Setting("QMK", QA_NAME); |
Setting.beginGroup("Global"); |
Setting.setValue("Settings ID", Settings_ID); |
Setting.endGroup(); |
Setting.beginGroup("DATA"); |
Setting.setValue("Plotter-Count", DATA.Plotter_Count); |
// Setting.setValue("Debug-Intervall", DATA.Debug_Intervall); |
Setting.endGroup(); |
Setting.beginGroup("GUI"); |
Setting.setValue("IsMax", GUI.isMax); |
Setting.setValue("Size", GUI.Size); |
Setting.setValue("Point", GUI.Point); |
Setting.endGroup(); |
} |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/Classes/cSettings.h |
---|
0,0 → 1,68 |
/*************************************************************************** |
* Copyright (C) 2008 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef CSETTINGS_H |
#define CSETTINGS_H |
#include <QBitArray> |
#include <QSize> |
#include <QPoint> |
#include "../../Global/Kopter.h" |
#include "../Defines.h" |
struct set_DebugData |
{ |
QString Version; |
QString Label[MAX_DebugData]; |
QBitArray Show_Plotter; |
}; |
struct set_GUI |
{ |
bool isMax; |
QSize Size; |
QPoint Point; |
}; |
struct set_DATA |
{ |
int Plotter_Count; |
}; |
class cSettings |
{ |
public: |
cSettings(); |
int Settings_ID; |
set_GUI GUI; |
set_DebugData DebugData; |
set_DATA DATA; |
void read_DebugLabels(int ID); |
void write_DebugLabels(int ID); |
void read_Settings(); |
void write_Settings(); |
}; |
#endif // CSETTINGS_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/Defines.h |
---|
0,0 → 1,54 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef DEFINES_H |
#define DEFINES_H |
#include <QString> |
#include "../Global/Global.h" |
#include "../Global/Kopter.h" |
static const QString QA_NAME = "QMK-Scope"; |
static const QString QA_VERSION_NR = "1.3.1"; |
#ifdef _BETA_ |
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)"; |
#else |
static const QString QA_VERSION = QA_VERSION_NR; |
#endif |
static const QString QA_DATE = "05.02.2011"; |
static const QString QA_YEAR = "2008-2011"; |
static const QString QA_ABOUT = |
"<HTML>" |
"<p><b><font size=8>" + QA_NAME + "</font></b></p>" |
"<br />" |
"Version " + QA_VERSION + " - " + QA_DATE + " on " + QA_OS + "" |
"<br /><br /><b>kompatibel zu " + QA_HWVERSION + "</b>" |
"<br /><br />" |
"(C) " + QA_YEAR + " by " + QA_AUTHOR + " - " |
"<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />" |
"Groundstation-Programm für den Mikrokopter<br /><br />" |
"QMK-Scope - Datenplotter und Debugdaten-Anzeige.<br /><br /> " |
"Dieses Programm wird unter den Bedingungen der GPL v2 veröffentlicht." |
"</HTML>"; |
static const QString DataFields = "VAD"; |
#endif // DEFINES_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/Dialogs/dlg_Main.cpp |
---|
0,0 → 1,298 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include <QMessageBox> |
#include <QCryptographicHash> |
#include "dlg_Main.h" |
// Konstruktor Main-Form |
dlg_Main::dlg_Main() |
{ |
setupUi(this); |
o_Settings = new cSettings(); |
o_Settings->read_DebugLabels(0); |
wg_Connection->set_Client(ID_SCOPE, QA_NAME + " " + QA_VERSION, DataFields); |
init_GUI(); |
init_Connections(); |
init_Plotter(); |
} |
// Grafische Oberfläche initialisieren |
void dlg_Main::init_GUI() |
{ |
setWindowTitle(QA_NAME + " " + QA_VERSION); |
resize(o_Settings->GUI.Size); |
move(o_Settings->GUI.Point); |
if (o_Settings->GUI.isMax) |
{ |
showMaximized(); |
} |
wg_Connection->set_SelectVisible(true); |
wg_Connection->set_ButtonVisible(true); |
btn_Start->setCheckable(true); |
for(int z = 0; z < MAX_DebugData; z++) |
{ |
wg_Index[z] = new wgt_Index(); |
verticalLayout->addWidget(wg_Index[z]); |
wg_Index[z]->set_Name(o_Settings->DebugData.Label[z]); |
wg_Index[z]->set_StyleSheet("color: " + QColor(DEF_DebugColors[z]).name() + ";"); |
connect(wg_Index[z], SIGNAL(sig_Clicked()), this, SLOT(slot_btn_ChoseOK())); |
} |
} |
// Signale mit Slots verbinden |
void dlg_Main::init_Connections() |
{ |
connect(ac_Connect, SIGNAL(triggered()), wg_Connection, SLOT(slot_btn_Connect())); |
connect(ac_ReadLabels, SIGNAL(triggered()), this, SLOT(slot_ac_ReadLabels())); |
connect(Plotter_Scroll, SIGNAL(valueChanged(int)), this, SLOT(slot_Plotter_Scroll(int))); |
connect(btn_Start, SIGNAL(clicked()), this, SLOT(slot_Plotter_Start())); |
// connect(btn_ChoseOK, SIGNAL(clicked()), this, SLOT(slot_btn_ChoseOK())); |
// About QMK-Kernel & About-QT Dialog einfügen |
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About())); |
menu_Help->addAction(trUtf8("Über &Qt"), qApp, SLOT(aboutQt())); |
connect(wg_Connection, SIGNAL(sig_Status(int)), this, SLOT(slot_ConnectionStatus(int))); |
connect(wg_Connection, SIGNAL(sig_MK_Version(s_Hardware)), this, SLOT(slot_MK_Version(s_Hardware))); |
connect(wg_Connection, SIGNAL(sig_MK_Debug(s_MK_Debug)), this, SLOT(slot_MK_Debug(s_MK_Debug))); |
connect(wg_Connection, SIGNAL(sig_MK_DebugLabels(s_MK_DebugLabels)), this, SLOT(slot_MK_DebugLabels(s_MK_DebugLabels))); |
} |
void dlg_Main::init_Plotter() |
{ |
NextPlot = 0; |
qwt_Plotter->setCanvasBackground(QColor(QRgb(0x00000000))); |
// qwt_Plotter->insertLegend(new QwtLegend(), QwtPlot::RightLegend); |
QwtPlotGrid *Grid = new QwtPlotGrid(); |
Grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine)); |
Grid->attach(qwt_Plotter); |
qwt_Plotter->setAxisScale(QwtPlot::xBottom,0,o_Settings->DATA.Plotter_Count,0); |
for (int a = 0; a < MAX_DebugData; a++) |
{ |
Plot[a] = new QwtPlotCurve(o_Settings->DebugData.Label[a]); |
Plot[a]->setPen(QPen(QColor(DEF_DebugColors[a]))); |
Plot[a]->setRenderHint(QwtPlotItem::RenderAntialiased); |
if (o_Settings->DebugData.Show_Plotter[a]) |
Plot[a]->attach(qwt_Plotter); |
} |
qwt_Plotter->replot(); |
} |
void dlg_Main::update_Plotter() |
{ |
pl_ID[NextPlot] = NextPlot; |
for (int a = 0; a < MAX_DebugData; a++) |
{ |
pl_Data[a][NextPlot] = Debug_Data[a]; |
Plot[a]->setData(pl_ID,pl_Data[a],NextPlot); |
} |
NextPlot++; |
if ((NextPlot > o_Settings->DATA.Plotter_Count)) |
{ |
Plotter_Scroll->setMaximum(NextPlot - o_Settings->DATA.Plotter_Count); |
} |
if ((Plotter_Scroll->value() == NextPlot - (o_Settings->DATA.Plotter_Count + 1))) |
{ |
qwt_Plotter->setAxisScale(QwtPlot::xBottom,NextPlot - o_Settings->DATA.Plotter_Count,NextPlot,0); |
Plotter_Scroll->setValue(NextPlot - o_Settings->DATA.Plotter_Count); |
} |
qwt_Plotter->replot(); |
} |
void dlg_Main::config_Plotter() |
{ |
qwt_Plotter->setAxisScale(QwtPlot::xBottom,0,o_Settings->DATA.Plotter_Count,0); |
for (int a = 0; a < MAX_DebugData; a++) |
{ |
Plot[a]->detach(); |
Plot[a]->setPen(QPen(QColor(DEF_DebugColors[a]))); |
if (o_Settings->DebugData.Show_Plotter[a]) |
{ |
// Plot[a]->setTitle(o_Settings->DebugData.Label[a]); |
Plot[a]->attach(qwt_Plotter); |
} |
} |
qwt_Plotter->replot(); |
} |
void dlg_Main::slot_Plotter_Scroll(int Position) |
{ |
qwt_Plotter->setAxisScale(QwtPlot::xBottom,Position,Position + o_Settings->DATA.Plotter_Count,0); |
qwt_Plotter->replot(); |
} |
/////////// |
// Slots // |
/////////// |
// About-Dialog |
void dlg_Main::slot_ac_About() |
{ |
QMessageBox::about(this, trUtf8(("Über ")) + QA_NAME, QA_ABOUT); |
} |
void dlg_Main::slot_ConnectionStatus(int li_Status) |
{ |
if (li_Status) |
{ |
ac_Connect->setChecked(true); |
ac_Connect->setText(tr("Trennen")); |
} |
else |
{ |
ac_Connect->setChecked(false); |
ac_Connect->setText(tr("Verbinden")); |
} |
} |
void dlg_Main::slot_MK_Version(s_Hardware ls_Version) |
{ |
gs_Version = ls_Version; |
setWindowTitle(QA_NAME + " " + QA_VERSION + " - " + ls_Version.Hardware + " " + ls_Version.Version); |
o_Settings->read_DebugLabels(gs_Version.ID); |
if (o_Settings->DebugData.Version != gs_Version.Version) |
{ |
qDebug(QString("Debug-Labels unterschiedlich. Neue anforden. " + o_Settings->DebugData.Version + " <> " + gs_Version.Version).toLatin1().data()); |
usleep(50000); |
slot_ac_ReadLabels(); |
} |
else |
{ |
for(int z = 0; z < MAX_DebugData; z++) |
{ |
wg_Index[z]->set_Name(o_Settings->DebugData.Label[z]); |
wg_Index[z]->set_Checked(o_Settings->DebugData.Show_Plotter[z]); |
} |
config_Plotter(); |
} |
} |
void dlg_Main::slot_MK_Debug(s_MK_Debug ls_Debug) |
{ |
gs_Debug = ls_Debug; |
for (int z = 0; z < MAX_DebugData; z++) |
{ |
Debug_Data[z] = ls_Debug.Analog[z]; |
wg_Index[z]->set_Wert(QString("%1").arg(Debug_Data[z])); |
} |
if (btn_Start->isChecked()) |
{ |
update_Plotter(); |
} |
} |
void dlg_Main::slot_MK_DebugLabels(s_MK_DebugLabels MK_DebugLabels) |
{ |
if (MK_DebugLabels.Position < 32) |
{ |
o_Settings->DebugData.Label[MK_DebugLabels.Position] = MK_DebugLabels.Text; |
if (o_Settings->DebugData.Label[MK_DebugLabels.Position] == "") |
{ |
o_Settings->DebugData.Label[MK_DebugLabels.Position] = "Debug-" + QString("%1").arg(MK_DebugLabels.Position); |
} |
// cb_Debug[MK_DebugLabels.Position]->setText("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
wg_Index[MK_DebugLabels.Position]->set_Name("" + o_Settings->DebugData.Label[MK_DebugLabels.Position]); |
// wg_Index[z]->set_Checked(o_Settings->DebugData.Show_Plotter[z]); |
} |
if (MK_DebugLabels.Position == 31) |
{ |
o_Settings->DebugData.Version = gs_Version.Version; |
o_Settings->write_DebugLabels(gs_Version.ID); |
config_Plotter(); |
} |
} |
void dlg_Main::slot_Plotter_Start() |
{ |
if (btn_Start->isChecked()) |
{ |
btn_Start->setText(tr("Plotter stoppen")); |
} |
else |
{ |
btn_Start->setText(tr("Plotter starten")); |
} |
} |
void dlg_Main::slot_btn_ChoseOK() |
{ |
for(int z = 0; z < MAX_DebugData; z++) |
{ |
o_Settings->DebugData.Show_Plotter[z] = wg_Index[z]->get_Checked(); |
} |
config_Plotter(); |
o_Settings->write_DebugLabels(gs_Version.ID); |
} |
void dlg_Main::slot_ac_ReadLabels() |
{ |
c_Data[0] = 0; |
wg_Connection->send_Data(HandlerMK::make_Frame('a', ADDRESS_ALL, c_Data, 1).toLatin1().data(), DATA_READ_LABEL); |
} |
// Programm Ende |
dlg_Main::~dlg_Main() |
{ |
o_Settings->GUI.isMax = isMaximized(); |
o_Settings->GUI.Size = size(); |
o_Settings->GUI.Point = pos(); |
o_Settings->write_Settings(); |
} |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/Dialogs/dlg_Main.h |
---|
0,0 → 1,106 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef DLG_MAIN_H |
#define DLG_MAIN_H |
#include <QtGui/QMainWindow> |
#include <QtGui/QLineEdit> |
#include <QtGui/QCheckBox> |
#include <QtGui/QLabel> |
#include <QtGui/QFont> |
#include <QTcpServer> |
#include <QTcpSocket> |
#include <qwt_plot_curve.h> |
#include <qwt_plot_grid.h> |
#include <qwt_legend.h> |
#include <qwt_plot.h> |
#include "ui_dlg_Main.h" |
#include "wgt_Index.h" |
#include "../Defines.h" |
#include "../TypeDefs.h" |
#include "../Classes/cSettings.h" |
class dlg_Main : public QMainWindow, public Ui::dlg_Main_UI |
{ |
Q_OBJECT |
public: |
dlg_Main(); |
~dlg_Main(); |
private: |
// Settings-Object |
cSettings *o_Settings; |
wgt_Index *wg_Index[MAX_DebugData]; |
// Info über die Hardware |
s_Hardware gs_Version; |
// Datenspeicher zum Senden. |
char c_Data[150]; |
s_MK_Debug gs_Debug; |
int Debug_Data[MAX_DebugData]; |
// Plots für die Analogwerte |
QwtPlotCurve *Plot[MAX_DebugData]; |
// Datenspeicher für die Plots |
double pl_Data[MAX_DebugData][50000]; |
double pl_ID[50000]; |
int NextPlot; |
// Programm-Initialisirungen |
void init_GUI(); |
void init_Connections(); |
void init_Plotter(); |
void update_Plotter(); |
void config_Plotter(); |
private slots: |
void slot_ac_About(); |
void slot_ConnectionStatus(int li_Status); |
void slot_MK_Version(s_Hardware ls_Version); |
void slot_MK_Debug(s_MK_Debug ls_Debug); |
void slot_MK_DebugLabels(s_MK_DebugLabels MK_DebugLabels); |
// void slot_ac_Plotter(); |
// void slot_ac_Debug(); |
// void slot_ac_Chose(); |
void slot_ac_ReadLabels(); |
void slot_btn_ChoseOK(); |
void slot_Plotter_Start(); |
void slot_Plotter_Scroll(int Position); |
}; |
#endif // DLG_MAIN_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/Dialogs/dlg_Main.ui |
---|
0,0 → 1,274 |
<?xml version="1.0" encoding="UTF-8"?> |
<ui version="4.0"> |
<class>dlg_Main_UI</class> |
<widget class="QMainWindow" name="dlg_Main_UI"> |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>0</y> |
<width>794</width> |
<height>366</height> |
</rect> |
</property> |
<property name="windowTitle"> |
<string>QMK-Scope</string> |
</property> |
<property name="windowIcon"> |
<iconset resource="../QMK-Scope.qrc"> |
<normaloff>:/Icon/Global/Images/Icons/QMK-Scope.png</normaloff>:/Icon/Global/Images/Icons/QMK-Scope.png</iconset> |
</property> |
<property name="styleSheet"> |
<string notr="true"/> |
</property> |
<widget class="QWidget" name="centralWidget"> |
<layout class="QGridLayout" name="gridLayout"> |
<item row="2" column="0"> |
<layout class="QHBoxLayout" name="horizontalLayout"> |
<item> |
<widget class="QScrollBar" name="Plotter_Scroll"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> |
<horstretch>0</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
</widget> |
</item> |
<item> |
<widget class="QPushButton" name="btn_Start"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
<horstretch>0</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
<property name="text"> |
<string>Plotter starten</string> |
</property> |
<property name="icon"> |
<iconset resource="../QMK-Scope.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Plotter-NO.png</normaloff> |
<normalon>:/Actions/Global/Images/Actions/Plotter-OK.png</normalon>:/Actions/Global/Images/Actions/Plotter-NO.png</iconset> |
</property> |
<property name="iconSize"> |
<size> |
<width>20</width> |
<height>20</height> |
</size> |
</property> |
</widget> |
</item> |
</layout> |
</item> |
<item row="0" column="0"> |
<widget class="wgt_Connection" name="wg_Connection" native="true"/> |
</item> |
<item row="1" column="0"> |
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
<item> |
<widget class="QFrame" name="frame_2"> |
<property name="frameShape"> |
<enum>QFrame::StyledPanel</enum> |
</property> |
<property name="frameShadow"> |
<enum>QFrame::Raised</enum> |
</property> |
<layout class="QGridLayout" name="gridLayout_4"> |
<item row="0" column="0"> |
<spacer name="horizontalSpacer"> |
<property name="orientation"> |
<enum>Qt::Horizontal</enum> |
</property> |
<property name="sizeType"> |
<enum>QSizePolicy::MinimumExpanding</enum> |
</property> |
<property name="sizeHint" stdset="0"> |
<size> |
<width>582</width> |
<height>20</height> |
</size> |
</property> |
</spacer> |
</item> |
<item row="1" column="0"> |
<widget class="QwtPlot" name="qwt_Plotter"/> |
</item> |
</layout> |
</widget> |
</item> |
<item> |
<widget class="QFrame" name="frame"> |
<property name="sizePolicy"> |
<sizepolicy hsizetype="Fixed" vsizetype="Preferred"> |
<horstretch>0</horstretch> |
<verstretch>0</verstretch> |
</sizepolicy> |
</property> |
<property name="frameShape"> |
<enum>QFrame::StyledPanel</enum> |
</property> |
<property name="frameShadow"> |
<enum>QFrame::Raised</enum> |
</property> |
<layout class="QGridLayout" name="frame_Index"> |
<item row="0" column="0"> |
<widget class="QScrollArea" name="scrollArea"> |
<property name="minimumSize"> |
<size> |
<width>170</width> |
<height>0</height> |
</size> |
</property> |
<property name="frameShape"> |
<enum>QFrame::NoFrame</enum> |
</property> |
<property name="widgetResizable"> |
<bool>true</bool> |
</property> |
<widget class="QWidget" name="scrollAreaWidgetContents"> |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>0</y> |
<width>170</width> |
<height>274</height> |
</rect> |
</property> |
<property name="styleSheet"> |
<string notr="true">background-color: #000000; |
</string> |
</property> |
<layout class="QGridLayout" name="gridLayout_6"> |
<property name="margin"> |
<number>0</number> |
</property> |
<property name="spacing"> |
<number>0</number> |
</property> |
<item row="0" column="0"> |
<layout class="QVBoxLayout" name="verticalLayout"/> |
</item> |
</layout> |
</widget> |
</widget> |
</item> |
</layout> |
</widget> |
</item> |
</layout> |
</item> |
</layout> |
<zorder>wg_Connection</zorder> |
<zorder></zorder> |
</widget> |
<widget class="QMenuBar" name="menuBar"> |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>0</y> |
<width>794</width> |
<height>19</height> |
</rect> |
</property> |
<widget class="QMenu" name="menu_Program"> |
<property name="title"> |
<string>Programm</string> |
</property> |
<addaction name="ac_Quit"/> |
<addaction name="ac_Connect"/> |
</widget> |
<widget class="QMenu" name="menu_Preferences"> |
<property name="title"> |
<string>Einstellungen</string> |
</property> |
<addaction name="ac_ReadLabels"/> |
</widget> |
<widget class="QMenu" name="menu_Help"> |
<property name="title"> |
<string>Hilfe</string> |
</property> |
<addaction name="ac_About"/> |
</widget> |
<addaction name="menu_Program"/> |
<addaction name="menu_Preferences"/> |
<addaction name="menu_Help"/> |
</widget> |
<action name="ac_Quit"> |
<property name="icon"> |
<iconset resource="../QMK-Scope.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Exit.png</normaloff>:/Actions/Global/Images/Actions/Exit.png</iconset> |
</property> |
<property name="text"> |
<string>Beenden</string> |
</property> |
</action> |
<action name="ac_About"> |
<property name="icon"> |
<iconset resource="../QMK-Scope.qrc"> |
<normaloff>:/Icon/Global/Images/Icons/QMK-Scope.png</normaloff>:/Icon/Global/Images/Icons/QMK-Scope.png</iconset> |
</property> |
<property name="text"> |
<string>Über QMK-Scope</string> |
</property> |
</action> |
<action name="ac_Connect"> |
<property name="checkable"> |
<bool>true</bool> |
</property> |
<property name="checked"> |
<bool>false</bool> |
</property> |
<property name="icon"> |
<iconset resource="../QMK-Scope.qrc"> |
<normaloff>:/Actions/Global/Images/Actions/Connection-NO.png</normaloff> |
<normalon>:/Actions/Global/Images/Actions/Connection-OK.png</normalon>:/Actions/Global/Images/Actions/Connection-NO.png</iconset> |
</property> |
<property name="text"> |
<string>Verbinden</string> |
</property> |
</action> |
<action name="ac_ReadLabels"> |
<property name="text"> |
<string>Analoglabels auslesen</string> |
</property> |
</action> |
</widget> |
<layoutdefault spacing="6" margin="11"/> |
<customwidgets> |
<customwidget> |
<class>QwtPlot</class> |
<extends>QFrame</extends> |
<header>qwt_plot.h</header> |
</customwidget> |
<customwidget> |
<class>wgt_Connection</class> |
<extends>QWidget</extends> |
<header>wgt_Connection.h</header> |
<container>1</container> |
</customwidget> |
</customwidgets> |
<resources> |
<include location="../QMK-Scope.qrc"/> |
</resources> |
<connections> |
<connection> |
<sender>ac_Quit</sender> |
<signal>triggered()</signal> |
<receiver>dlg_Main_UI</receiver> |
<slot>close()</slot> |
<hints> |
<hint type="sourcelabel"> |
<x>-1</x> |
<y>-1</y> |
</hint> |
<hint type="destinationlabel"> |
<x>182</x> |
<y>88</y> |
</hint> |
</hints> |
</connection> |
</connections> |
</ui> |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/QMK-Scope.pro |
---|
0,0 → 1,71 |
# ------------------------------------------------- |
# Project created by QtCreator 2009-07-20T20:04:00 |
# ------------------------------------------------- |
include(../Global/Widget_Connection.pri) |
QT += network |
TARGET = QMK-Scope |
TEMPLATE = app |
win32 { |
include( C:\Qt\qwt-5.2.0\examples\examples.pri ) |
QWT_ROOT = c:\qt\qwt-5.2.0 |
include( $${QWT_ROOT}\qwtconfig.pri ) |
SUFFIX_STR = $${RELEASE_SUFFIX} |
INCLUDEPATH += $${QWT_ROOT}/src |
DEPENDPATH += $${QWT_ROOT}/src |
QWTLIB = qwt$${SUFFIX_STR} |
contains(CONFIG, QwtDll) |
{ |
DEFINES += QT_DLL \ |
QWT_DLL |
QWTLIB = $${QWTLIB}$${VER_MAJ} |
} |
win32-msvc:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib |
win32-msvc.net:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib |
win32-msvc2005:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib |
win32-g++:LIBS += -L$${QWT_ROOT}/lib \ |
-l$${QWTLIB} |
} |
DESTDIR = ../Binary |
OBJECTS_DIR = ../Binary/.build/QMK-Scope |
UI_DIR = ../Binary/.build/QMK-Scope |
MOC_DIR = ../Binary/.build/QMK-Scope |
RCC_DIR = ../Binary/.build/QMK-Scope |
debug { |
DEFINES += _BETA_ |
LIBS += -lqwt |
INCLUDEPATH += $(HOME)/include \ |
/usr/include/qwt |
} |
Suse { |
LIBS += -lqwt |
INCLUDEPATH += $(HOME)/include \ |
/usr/include/qwt |
} |
Debian { |
LIBS += -lqwt-qt4 |
INCLUDEPATH += $(HOME)/include \ |
/usr/include/qwt-qt4 |
} |
Gentoo { |
LIBS += -lqwt |
INCLUDEPATH += $(HOME)/include \ |
/usr/include/qwt5 |
} |
OSX { |
LIBS += -L/opt/local/lib \ |
-lqwt |
INCLUDEPATH += /opt/local/include |
} |
RESOURCES += QMK-Scope.qrc |
SOURCES += main.cpp \ |
Dialogs/dlg_Main.cpp \ |
Classes/cSettings.cpp \ |
Dialogs/wgt_Index.cpp |
HEADERS += Defines.h \ |
../Global/Global.h \ |
Dialogs/dlg_Main.h \ |
Classes/cSettings.h \ |
TypeDefs.h \ |
Dialogs/wgt_Index.h |
FORMS += Dialogs/dlg_Main.ui \ |
Dialogs/wgt_Index.ui |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/QMK-Scope.qrc |
---|
0,0 → 1,14 |
<RCC> |
<qresource prefix="Icon" > |
<file>../Global/Images/Icons/QMK-Scope.png</file> |
</qresource> |
<qresource prefix="Actions" > |
<file>../Global/Images/Actions/Exit.png</file> |
<file>../Global/Images/Actions/Plotter-NO.png</file> |
<file>../Global/Images/Actions/Plotter-OK.png</file> |
<file>../Global/Images/Actions/Preferences-Data.png</file> |
<file>../Global/Images/Actions/Connection-NO.png</file> |
<file>../Global/Images/Actions/Debug.png</file> |
<file>../Global/Images/Actions/Connection-OK.png</file> |
</qresource> |
</RCC> |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/TypeDefs.h |
---|
0,0 → 1,27 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#ifndef TYPEDEFS_H |
#define TYPEDEFS_H |
#include <QString> |
#include <QRgb> |
static const QRgb DEF_DebugColors[] = {0x00FF0000, 0x0000FF00, 0x00FFFF00, 0x000000FF, 0x00FF00FF, 0x0000FFFF, 0x00FFFFFF, 0x00AA0000, 0x0000AA00, 0x00AAAA00, 0x000000AA, 0x00AA00AA, 0x0000AA, 0x00AAAAAA, 0x00990000, 0x00009900, 0x00999900, 0x00000099, 0x00990099, 0x00009999, 0x00999999, 0x00CC0000, 0x0000CC00, 0x00CCCC00, 0x000000CC, 0x00CC00CC, 0x0000CCCC, 0x00CCCCCC, 0x0066FF99, 0x009966FF, 0x00FF9966, 0x0099FF66}; |
#endif // TYPEDEFS_H |
/QMK-Groundstation/tags/QMK-Tools v1.3.1 - FC v0.82/QMK-Scope/main.cpp |
---|
0,0 → 1,36 |
/*************************************************************************** |
* Copyright (C) 2009 by Manuel Schrape * |
* manuel.schrape@gmx.de * |
* * |
* This program is free software; you can redistribute it and/or modify * |
* it under the terms of the GNU General Public License as published by * |
* the Free Software Foundation; either version 2 of the License. * |
* * |
* This program 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 this program; if not, write to the * |
* Free Software Foundation, Inc., * |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
***************************************************************************/ |
#include <QtGui/QApplication> |
#include "Dialogs/dlg_Main.h" |
int main(int argc, char *argv[]) |
{ |
QApplication App(argc, argv); |
dlg_Main *MainApp = new dlg_Main(); |
MainApp->show(); |
int iReturn = App.exec(); |
delete MainApp; |
return iReturn; |
} |