diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-06-30 14:57:42 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-06-30 14:57:42 -0500 |
commit | b6eb80309781bd02b9b66808d29508f23881de66 (patch) | |
tree | c81ca9d23d7c9335f2b7122b011eaed7863a0fb8 /clients/tde/src/part/fpgaview | |
parent | 4dbe57682c156d76db447d814609424bb7e11aca (diff) | |
download | ulab-b6eb80309781bd02b9b66808d29508f23881de66.tar.gz ulab-b6eb80309781bd02b9b66808d29508f23881de66.zip |
Extend instrument parts
Diffstat (limited to 'clients/tde/src/part/fpgaview')
-rw-r--r-- | clients/tde/src/part/fpgaview/Makefile.am | 2 | ||||
-rw-r--r-- | clients/tde/src/part/fpgaview/part.cpp | 7 | ||||
-rw-r--r-- | clients/tde/src/part/fpgaview/part.h | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/clients/tde/src/part/fpgaview/Makefile.am b/clients/tde/src/part/fpgaview/Makefile.am index 60ec9ca..63fdf0f 100644 --- a/clients/tde/src/part/fpgaview/Makefile.am +++ b/clients/tde/src/part/fpgaview/Makefile.am @@ -4,6 +4,6 @@ METASOURCES = AUTO # Part kde_module_LTLIBRARIES = libremotelab_fpgaviewer.la -libremotelab_fpgaviewer_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEUI) $(LIB_QT) -ltdekrbsocket +libremotelab_fpgaviewer_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEUI) $(LIB_QT) -ltdekrbsocket -ltqtrla libremotelab_fpgaviewer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_TDECORE) $(LIB_TDEUI) -lkio -ltdefx libremotelab_fpgaviewer_la_SOURCES = part.cpp layout.ui diff --git a/clients/tde/src/part/fpgaview/part.cpp b/clients/tde/src/part/fpgaview/part.cpp index 94aca85..316fd48 100644 --- a/clients/tde/src/part/fpgaview/part.cpp +++ b/clients/tde/src/part/fpgaview/part.cpp @@ -54,7 +54,7 @@ K_EXPORT_COMPONENT_FACTORY(libremotelab_fpgaviewer, RemoteLab::Factory) FPGAViewPart::FPGAViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList&) - : ReadOnlyPart( parent, name ), m_socket(0), m_base(0), connToServerConnecting(false), connToServerState(-1), connToServerTimeoutTimer(NULL) + : RemoteInstrumentPart( parent, name ), m_socket(0), m_base(0), connToServerConnecting(false), connToServerState(-1), connToServerTimeoutTimer(NULL) { // Initialize mutex m_connectionMutex = new TQMutex(false); @@ -200,6 +200,7 @@ printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r", response.ascii()); ffl connToServerConnecting = false; disconnectFromServer(); KMessageBox::error(0, i18n("<qt>Unable to establish connection with backend server<p>Please verify that you are currently connected to a workspace</qt>"), i18n("Connection Failed")); + close(); return; } else if (response == "ERRNOTAVL") { @@ -207,6 +208,7 @@ printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r", response.ascii()); ffl connToServerConnecting = false; disconnectFromServer(); KMessageBox::error(0, i18n("<qt>The backend server is not available at this time<p>Please try a different workspace, or try again later</qt>"), i18n("Connection Failed")); + close(); return; } else if (response == "ERRNOSERV") { @@ -214,6 +216,7 @@ printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r", response.ascii()); ffl connToServerConnecting = false; disconnectFromServer(); KMessageBox::error(0, i18n("<qt>The active laboratory workspace does not support the requested service</qt>"), i18n("Service Unavailable")); + close(); return; } else { @@ -221,6 +224,7 @@ printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r", response.ascii()); ffl connToServerConnecting = false; disconnectFromServer(); KMessageBox::error(0, i18n("<qt>Unable to establish connection with remote server</qt>"), i18n("Connection Failed")); + close(); return; } break; @@ -236,6 +240,7 @@ int FPGAViewPart::connectToServer(TQString server) { } if (!m_socket) { m_socket = new TDEKerberosClientSocket(this); + connect(m_socket, TQT_SIGNAL(statusMessageUpdated(const TQString&)), this, TQT_SLOT(setStatusMessage(const TQString&) )); } m_socket->setServiceName("remotefpga"); m_socket->setServerFQDN(server); diff --git a/clients/tde/src/part/fpgaview/part.h b/clients/tde/src/part/fpgaview/part.h index d4285e0..02797d8 100644 --- a/clients/tde/src/part/fpgaview/part.h +++ b/clients/tde/src/part/fpgaview/part.h @@ -30,6 +30,8 @@ #include <kparts/part.h> #include <kurl.h> +#include <tqtrla.h> + class KAboutData; using KParts::StatusBarExtension; class TraceWidget; @@ -40,7 +42,7 @@ class FPGAViewBase; namespace RemoteLab { - class FPGAViewPart : public KParts::ReadOnlyPart + class FPGAViewPart : public KParts::RemoteInstrumentPart { Q_OBJECT |