summaryrefslogtreecommitdiffstats
path: root/lib/libtqtrla/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libtqtrla/src')
-rw-r--r--lib/libtqtrla/src/Makefile.am2
-rw-r--r--lib/libtqtrla/src/tqtrla.cpp48
-rw-r--r--lib/libtqtrla/src/tqtrla.h44
3 files changed, 93 insertions, 1 deletions
diff --git a/lib/libtqtrla/src/Makefile.am b/lib/libtqtrla/src/Makefile.am
index 5c8888c..bf4c571 100644
--- a/lib/libtqtrla/src/Makefile.am
+++ b/lib/libtqtrla/src/Makefile.am
@@ -8,4 +8,4 @@ include_HEADERS = tqtrla.h
libtqtrla_la_SOURCES = tqtrla.cpp
libtqtrla_la_LIBADD = -lkio $(LIB_TDEUI)
-libtqtrla_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries) \ No newline at end of file
+libtqtrla_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries) $(LIB_KPARTS) \ No newline at end of file
diff --git a/lib/libtqtrla/src/tqtrla.cpp b/lib/libtqtrla/src/tqtrla.cpp
index 6daded3..e3001fb 100644
--- a/lib/libtqtrla/src/tqtrla.cpp
+++ b/lib/libtqtrla/src/tqtrla.cpp
@@ -20,6 +20,54 @@
#include "tqtrla.h"
+#include <tqwidget.h>
+
+namespace KParts
+{
+ class RemoteInstrumentPartPrivate
+ {
+ public:
+ RemoteInstrumentPartPrivate() {
+ //
+ }
+
+ ~RemoteInstrumentPartPrivate() {
+ //
+ }
+ };
+
+ RemoteInstrumentPart::RemoteInstrumentPart(TQObject *parent, const char *name)
+ : Part( parent, name )
+ {
+ d = new RemoteInstrumentPartPrivate;
+ }
+
+ RemoteInstrumentPart::~RemoteInstrumentPart() {
+ RemoteInstrumentPart::closeURL();
+ delete d;
+ }
+
+ bool RemoteInstrumentPart::openURL(const KURL &url) {
+ m_url = url;
+ return false;
+ }
+
+ bool RemoteInstrumentPart::closeURL() {
+ return false;
+ }
+
+ void RemoteInstrumentPart::close() {
+ TQWidget* parentWidget = dynamic_cast<TQWidget*>(parent());
+ if (parentWidget) {
+ parentWidget->close();
+ }
+ }
+
+ void RemoteInstrumentPart::setStatusMessage(const TQString& message) {
+ emit(statusMessageSet(message));
+ }
+}
+
bool operator==( const ServiceType &s1, const ServiceType &s2 ) {
bool identical = true;
diff --git a/lib/libtqtrla/src/tqtrla.h b/lib/libtqtrla/src/tqtrla.h
index c49c101..b43ea22 100644
--- a/lib/libtqtrla/src/tqtrla.h
+++ b/lib/libtqtrla/src/tqtrla.h
@@ -23,6 +23,46 @@
#include <tqobject.h>
+#include <kparts/part.h>
+
+// =============================================================================
+
+namespace KParts
+{
+ class RemoteInstrumentPartPrivate;
+
+ class KPARTS_EXPORT RemoteInstrumentPart : public Part
+ {
+ Q_OBJECT
+
+ public:
+ RemoteInstrumentPart(TQObject *parent = 0, const char *name = 0);
+ virtual ~RemoteInstrumentPart();
+
+ public slots:
+ virtual bool openURL( const KURL &url );
+
+ public:
+ KURL url() const { return m_url; }
+ virtual bool closeURL();
+
+ protected slots:
+ void close();
+ void setStatusMessage(const TQString& message);
+
+ signals:
+ void statusMessageSet(const TQString&);
+
+ protected:
+ KURL m_url;
+
+ private:
+ RemoteInstrumentPartPrivate *d;
+ };
+}
+
+// =============================================================================
+
class ServiceType
{
public:
@@ -42,6 +82,8 @@ typedef TQValueList<ServiceType> ServiceList;
Q_EXPORT bool operator==(const ServiceType &s1, const ServiceType &s2);
+// =============================================================================
+
class StationType
{
public:
@@ -59,4 +101,6 @@ Q_EXPORT TQDataStream &operator>>(TQDataStream &, StationType &);
typedef TQValueList<StationType> StationList;
+// =============================================================================
+
#endif // TQTRLA_H \ No newline at end of file