From c485c0ef46c7330eba93226ac0ca09415a765d9d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 12 Jul 2012 02:33:58 -0500 Subject: Enhance trace viewer --- lib/libtqtrla/src/tqtrla.cpp | 21 +++++++++++++++++++-- lib/libtqtrla/src/tqtrla.h | 3 +++ 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'lib/libtqtrla') diff --git a/lib/libtqtrla/src/tqtrla.cpp b/lib/libtqtrla/src/tqtrla.cpp index bda048d..cf26012 100644 --- a/lib/libtqtrla/src/tqtrla.cpp +++ b/lib/libtqtrla/src/tqtrla.cpp @@ -47,7 +47,7 @@ namespace KParts RemoteInstrumentPart::RemoteInstrumentPart(TQObject *parent, const char *name) : Part( parent, name ), - m_socket(NULL), connToServerConnecting(false), connToServerState(-1), connToServerTimeoutTimer(NULL) + m_socket(NULL), connToServerConnecting(false), connToServerState(-1), connToServerTimeoutTimer(NULL), m_fixedSize(false) { d = new RemoteInstrumentPartPrivate; @@ -70,6 +70,18 @@ namespace KParts return false; } + void RemoteInstrumentPart::setUsingFixedSize(bool fixed) { + m_fixedSize = fixed; + if (!fixed) { + TQWidget* parentWidget = dynamic_cast(parent()); + if (parentWidget) { + parentWidget->setMinimumSize(0, 0); + parentWidget->setMaximumSize(TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX); + } + } + emit(usingFixedSizeChanged(fixed)); + } + TQPtrList RemoteInstrumentPart::menuActionList() { return TQPtrList(); } @@ -77,7 +89,12 @@ namespace KParts void RemoteInstrumentPart::resize(TQSize size) { TQWidget* parentWidget = dynamic_cast(parent()); if (parentWidget) { - parentWidget->setFixedSize(size); + if (m_fixedSize) { + parentWidget->setFixedSize(size); + } + else { + parentWidget->resize(size); + } } } diff --git a/lib/libtqtrla/src/tqtrla.h b/lib/libtqtrla/src/tqtrla.h index faca985..fcc1285 100644 --- a/lib/libtqtrla/src/tqtrla.h +++ b/lib/libtqtrla/src/tqtrla.h @@ -56,6 +56,7 @@ namespace KParts protected: TQStringList textForServerError(TQString shortError); TQ_ULONG maximumSocketDataChunkSize(); + void setUsingFixedSize(bool fixed); public: int connectToServer(TQString server); @@ -74,6 +75,7 @@ namespace KParts signals: void statusMessageSet(const TQString&); + void usingFixedSizeChanged(bool); protected: KURL m_url; @@ -85,6 +87,7 @@ namespace KParts bool connToServerConnecting; int connToServerState; TQTimer *connToServerTimeoutTimer; + bool m_fixedSize; private: RemoteInstrumentPartPrivate *d; -- cgit v1.2.1