summaryrefslogtreecommitdiffstats
path: root/plugins/gui-standard-display/radioview-configuration.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-05-30 19:40:31 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-05-31 01:17:58 +0900
commitd95a4fea540b371fa86493d069fdbd54f33c5b40 (patch)
tree079b038ab559439eb7ded40a07bd79fd92926b3b /plugins/gui-standard-display/radioview-configuration.cpp
parente54890e0480e5adee69f5220a7c6dd072bbd75ea (diff)
downloadtderadio-d95a4fea540b371fa86493d069fdbd54f33c5b40.tar.gz
tderadio-d95a4fea540b371fa86493d069fdbd54f33c5b40.zip
Standardize folder structure.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'plugins/gui-standard-display/radioview-configuration.cpp')
-rw-r--r--plugins/gui-standard-display/radioview-configuration.cpp116
1 files changed, 116 insertions, 0 deletions
diff --git a/plugins/gui-standard-display/radioview-configuration.cpp b/plugins/gui-standard-display/radioview-configuration.cpp
new file mode 100644
index 0000000..64af3ed
--- /dev/null
+++ b/plugins/gui-standard-display/radioview-configuration.cpp
@@ -0,0 +1,116 @@
+/***************************************************************************
+ radioview-configuration.cpp - description
+ -------------------
+ begin : Fr Aug 15 2003
+ copyright : (C) 2003 by Martin Witte
+ email : witte@kawo1.rwth-aachen.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "radioview-configuration.h"
+
+RadioViewConfiguration::RadioViewConfiguration(TQWidget *parent)
+ : TQTabWidget (parent),
+ m_dirty(true)
+{
+}
+
+RadioViewConfiguration::~RadioViewConfiguration()
+{
+}
+
+
+void RadioViewConfiguration::addTab (TQWidget *child, const TQString &label)
+{
+ TQTabWidget::addTab(child, label);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::addTab (TQWidget *child, const TQIconSet &iconset, const TQString &label)
+{
+ TQTabWidget::addTab(child, iconset, label);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::addTab (TQWidget *child, TQTab *tab)
+{
+ TQTabWidget::addTab(child, tab);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::insertTab (TQWidget *child, const TQString &label, int index)
+{
+ TQTabWidget::insertTab(child, label, index);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::insertTab (TQWidget *child, const TQIconSet &iconset, const TQString &label, int index)
+{
+ TQTabWidget::insertTab(child, iconset, label, index);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::insertTab (TQWidget *child, TQTab *tab, int index)
+{
+ TQTabWidget::insertTab(child, tab, index);
+ TQObject::connect(this, TQT_SIGNAL(sigOK()), child, TQT_SLOT(slotOK()));
+ TQObject::connect(this, TQT_SIGNAL(sigCancel()), child, TQT_SLOT(slotCancel()));
+ TQObject::connect(child, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::removePage(TQWidget *w)
+{
+ TQObject::disconnect(this, TQT_SIGNAL(sigOK()), w, TQT_SLOT(slotOK()));
+ TQObject::disconnect(this, TQT_SIGNAL(sigCancel()), w, TQT_SLOT(slotCancel()));
+ TQObject::disconnect(w, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
+ TQTabWidget::removePage(w);
+}
+
+
+void RadioViewConfiguration::slotOK()
+{
+ if (m_dirty) {
+ emit sigOK();
+ m_dirty = false;
+ }
+}
+
+void RadioViewConfiguration::slotCancel()
+{
+ if (m_dirty) {
+ emit sigCancel();
+ m_dirty = false;
+ }
+}
+
+void RadioViewConfiguration::slotSetDirty()
+{
+ m_dirty = true;
+}
+
+
+#include "radioview-configuration.moc"