diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-12 02:33:58 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-12 02:33:58 -0500 |
commit | c485c0ef46c7330eba93226ac0ca09415a765d9d (patch) | |
tree | 53cffe4344d910593115491e93274a1d52db58ae /lib/libtqtrla | |
parent | ad5dff2bdac2afa6272db21aa4ee4908d6564d2b (diff) | |
download | ulab-c485c0ef46c7330eba93226ac0ca09415a765d9d.tar.gz ulab-c485c0ef46c7330eba93226ac0ca09415a765d9d.zip |
Enhance trace viewer
Diffstat (limited to 'lib/libtqtrla')
-rw-r--r-- | lib/libtqtrla/src/tqtrla.cpp | 21 | ||||
-rw-r--r-- | lib/libtqtrla/src/tqtrla.h | 3 |
2 files changed, 22 insertions, 2 deletions
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<TQWidget*>(parent()); + if (parentWidget) { + parentWidget->setMinimumSize(0, 0); + parentWidget->setMaximumSize(TQWIDGETSIZE_MAX, TQWIDGETSIZE_MAX); + } + } + emit(usingFixedSizeChanged(fixed)); + } + TQPtrList<KAction> RemoteInstrumentPart::menuActionList() { return TQPtrList<KAction>(); } @@ -77,7 +89,12 @@ namespace KParts void RemoteInstrumentPart::resize(TQSize size) { TQWidget* parentWidget = dynamic_cast<TQWidget*>(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; |