diff options
Diffstat (limited to 'clients/tde/src/part/commanalyzer/part.h')
-rw-r--r-- | clients/tde/src/part/commanalyzer/part.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/clients/tde/src/part/commanalyzer/part.h b/clients/tde/src/part/commanalyzer/part.h new file mode 100644 index 0000000..196706b --- /dev/null +++ b/clients/tde/src/part/commanalyzer/part.h @@ -0,0 +1,73 @@ +//Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>, (C) 2012 +//Copyright: See COPYING file that comes with this distribution + +#ifndef REMOTELAB_COMMANALYZERPART_H +#define REMOTELAB_COMMANALYZERPART_H + +#include <kparts/browserextension.h> +#include <kparts/statusbarextension.h> +#include <kparts/part.h> +#include <kurl.h> + +class KAboutData; +using KParts::StatusBarExtension; +class TraceWidget; +class TQSocket; +class TQTimer; +class TQMutex; +class CommAnalyzerBase; + +namespace RemoteLab +{ + class CommAnalyzerPart : public KParts::ReadOnlyPart + { + Q_OBJECT + + public: + CommAnalyzerPart( QWidget *, const char *, TQObject *, const char *, const TQStringList&); + ~CommAnalyzerPart(); + + virtual bool openFile() { return false; } // pure virtual in the base class + virtual bool closeURL(); + static KAboutData *createAboutData(); + int connectToServer(TQString server); + + public slots: + virtual bool openURL(const KURL &url); + + private slots: + void postInit(); + void updateTrace(); + void updateGraticule(); + virtual void postProcessTrace(); + void saRefLevelChanged(double); + void changeSaRefLevel(); + + private: + TQString callServerMethod(int command); + void sendServerCommand(int command); + int16_t callServerMethodInt16(int command); + double callServerMethodDouble(int command); + void callServerMethodDoubleArray(int command, double * array, int arrayLen); + void sendServerCommandWithParameter(int command, TQString param); + + private: + TraceWidget* m_traceWidget; + TQSocket* m_socket; + int16_t m_samplesInTrace; + double m_leftFrequency; + double m_rightFrequency; + int16_t m_hdivs; + int16_t m_vdivs; + double m_centerfreq; + double m_spanfreq; + double m_rpower; + double m_vscale; + TQTimer* m_updateTimer; + CommAnalyzerBase* m_base; + TQMutex* m_instrumentMutex; + bool stopTraceUpdate; + }; +} + +#endif |