summaryrefslogtreecommitdiffstats
path: root/kradio3/plugins/gui-standard-display/radioview-configuration.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 18:23:26 +0000
commitae364d9bed0589bf1a22cd5f530c563462379e3e (patch)
treee32727e2664e7ce68d0d30270afa040320ae35a1 /kradio3/plugins/gui-standard-display/radioview-configuration.cpp
downloadtderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.tar.gz
tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.zip
Added old KDE3 version of kradio
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1094417 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/gui-standard-display/radioview-configuration.cpp')
-rw-r--r--kradio3/plugins/gui-standard-display/radioview-configuration.cpp116
1 files changed, 116 insertions, 0 deletions
diff --git a/kradio3/plugins/gui-standard-display/radioview-configuration.cpp b/kradio3/plugins/gui-standard-display/radioview-configuration.cpp
new file mode 100644
index 0000000..9a22313
--- /dev/null
+++ b/kradio3/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
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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(QWidget *parent)
+ : QTabWidget (parent),
+ m_dirty(true)
+{
+}
+
+RadioViewConfiguration::~RadioViewConfiguration()
+{
+}
+
+
+void RadioViewConfiguration::addTab (QWidget *child, const QString &label)
+{
+ QTabWidget::addTab(child, label);
+ QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
+ QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
+ QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::addTab (QWidget *child, const QIconSet &iconset, const QString &label)
+{
+ QTabWidget::addTab(child, iconset, label);
+ QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
+ QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
+ QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::addTab (QWidget *child, QTab *tab)
+{
+ QTabWidget::addTab(child, tab);
+ QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
+ QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
+ QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::insertTab (QWidget *child, const QString &label, int index)
+{
+ QTabWidget::insertTab(child, label, index);
+ QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
+ QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
+ QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::insertTab (QWidget *child, const QIconSet &iconset, const QString &label, int index)
+{
+ QTabWidget::insertTab(child, iconset, label, index);
+ QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
+ QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
+ QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::insertTab (QWidget *child, QTab *tab, int index)
+{
+ QTabWidget::insertTab(child, tab, index);
+ QObject::connect(this, SIGNAL(sigOK()), child, SLOT(slotOK()));
+ QObject::connect(this, SIGNAL(sigCancel()), child, SLOT(slotCancel()));
+ QObject::connect(child, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+}
+
+
+void RadioViewConfiguration::removePage(QWidget *w)
+{
+ QObject::disconnect(this, SIGNAL(sigOK()), w, SLOT(slotOK()));
+ QObject::disconnect(this, SIGNAL(sigCancel()), w, SLOT(slotCancel()));
+ QObject::disconnect(w, SIGNAL(sigDirty()), this, SLOT(slotSetDirty()));
+ QTabWidget::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"