summaryrefslogtreecommitdiffstats
path: root/lib/libtqtrla/src/tqtrla.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libtqtrla/src/tqtrla.cpp')
-rw-r--r--lib/libtqtrla/src/tqtrla.cpp21
1 files changed, 19 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);
+ }
}
}