diff options
Diffstat (limited to 'kradio3/plugins/gui-standard-display')
18 files changed, 437 insertions, 430 deletions
diff --git a/kradio3/plugins/gui-standard-display/displaycfg.cpp b/kradio3/plugins/gui-standard-display/displaycfg.cpp index 8e26e72..d194751 100644 --- a/kradio3/plugins/gui-standard-display/displaycfg.cpp +++ b/kradio3/plugins/gui-standard-display/displaycfg.cpp @@ -20,68 +20,68 @@ #include <kcolordialog.h> #include <kfontdialog.h> -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> -#include <qlabel.h> -#include <qbuttongroup.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> -DisplayConfiguration::DisplayConfiguration(QWidget *parent) - : QWidget (parent), +DisplayConfiguration::DisplayConfiguration(TQWidget *tqparent) + : TQWidget (tqparent), m_dirty(true), m_ignore_gui_updates(false) { - QGroupBox *bg = new QGroupBox(i18n("Display Colors"), this); + TQGroupBox *bg = new TQGroupBox(i18n("Display Colors"), this); bg->setColumnLayout(0, Qt::Vertical ); - bg->layout()->setSpacing( 8 ); - bg->layout()->setMargin( 12 ); - QGridLayout *gl = new QGridLayout (bg->layout()); + bg->tqlayout()->setSpacing( 8 ); + bg->tqlayout()->setMargin( 12 ); + TQGridLayout *gl = new TQGridLayout (bg->tqlayout()); m_btnActive = new KColorButton(queryDisplayActiveColor(), bg); m_btnInactive = new KColorButton(queryDisplayInactiveColor(), bg); m_btnBkgnd = new KColorButton(queryDisplayBkgndColor(), bg); - connect(m_btnActive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty())); - connect(m_btnInactive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty())); - connect(m_btnBkgnd, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty())); + connect(m_btnActive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty())); + connect(m_btnInactive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty())); + connect(m_btnBkgnd, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty())); - QLabel *l1 = new QLabel(i18n("Active Text"), bg); - QLabel *l2 = new QLabel(i18n("Inactive Text"), bg); - QLabel *l3 = new QLabel(i18n("Background Color"), bg); + TQLabel *l1 = new TQLabel(i18n("Active Text"), bg); + TQLabel *l2 = new TQLabel(i18n("Inactive Text"), bg); + TQLabel *l3 = new TQLabel(i18n("Background Color"), bg); - l1->setAlignment(QLabel::AlignCenter); - l2->setAlignment(QLabel::AlignCenter); - l3->setAlignment(QLabel::AlignCenter); + l1->tqsetAlignment(TQLabel::AlignCenter); + l2->tqsetAlignment(TQLabel::AlignCenter); + l3->tqsetAlignment(TQLabel::AlignCenter); - l1->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); - l2->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); - l3->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); - m_btnActive ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); - m_btnInactive->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); - m_btnBkgnd ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + l1->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); + l2->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); + l3->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); + m_btnActive ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + m_btnInactive->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + m_btnBkgnd ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); - m_btnActive ->setMinimumSize(QSize(40, 40)); - m_btnInactive->setMinimumSize(QSize(40, 40)); - m_btnBkgnd ->setMinimumSize(QSize(40, 40)); + m_btnActive ->setMinimumSize(TQSize(40, 40)); + m_btnInactive->setMinimumSize(TQSize(40, 40)); + m_btnBkgnd ->setMinimumSize(TQSize(40, 40)); - gl->addWidget (l1, 0, 0, Qt::AlignCenter); - gl->addWidget (l2, 0, 1, Qt::AlignCenter); - gl->addWidget (l3, 0, 2, Qt::AlignCenter); + gl->addWidget (l1, 0, 0, TQt::AlignCenter); + gl->addWidget (l2, 0, 1, TQt::AlignCenter); + gl->addWidget (l3, 0, 2, TQt::AlignCenter); gl->addWidget (m_btnActive, 1, 0); gl->addWidget (m_btnInactive, 1, 1); gl->addWidget (m_btnBkgnd, 1, 2); - m_fontChooser = new KFontChooser(this, NULL, false, QStringList(), true, 4); + m_fontChooser = new KFontChooser(this, NULL, false, TQStringList(), true, 4); m_fontChooser->setFont(queryDisplayFont()); - m_fontChooser->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + m_fontChooser->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); - QVBoxLayout *l = new QVBoxLayout(this, 10); + TQVBoxLayout *l = new TQVBoxLayout(this, 10); l->addWidget(bg); l->addWidget(m_fontChooser); - connect(m_btnActive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty())); - connect(m_btnInactive, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty())); - connect(m_btnBkgnd, SIGNAL(changed(const QColor &)), this, SLOT(slotSetDirty())); - connect(m_fontChooser, SIGNAL(fontSelected(const QFont &)), this, SLOT(slotSetDirty())); + connect(m_btnActive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty())); + connect(m_btnInactive, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty())); + connect(m_btnBkgnd, TQT_SIGNAL(changed(const TQColor &)), this, TQT_SLOT(slotSetDirty())); + connect(m_fontChooser, TQT_SIGNAL(fontSelected(const TQFont &)), this, TQT_SLOT(slotSetDirty())); } @@ -91,7 +91,7 @@ DisplayConfiguration::~DisplayConfiguration() } -bool DisplayConfiguration::noticeDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) +bool DisplayConfiguration::noticeDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) { m_ignore_gui_updates = true; m_btnActive->setColor(activeColor); @@ -102,7 +102,7 @@ bool DisplayConfiguration::noticeDisplayColorsChanged(const QColor &activeColor, } -bool DisplayConfiguration::noticeDisplayFontChanged(const QFont &f) +bool DisplayConfiguration::noticeDisplayFontChanged(const TQFont &f) { m_ignore_gui_updates = true; m_fontChooser->setFont(f); diff --git a/kradio3/plugins/gui-standard-display/displaycfg.h b/kradio3/plugins/gui-standard-display/displaycfg.h index fcd6079..94101c1 100644 --- a/kradio3/plugins/gui-standard-display/displaycfg.h +++ b/kradio3/plugins/gui-standard-display/displaycfg.h @@ -23,17 +23,18 @@ #endif #include "displaycfg_interfaces.h" -#include <qwidget.h> +#include <tqwidget.h> class KColorButton; class KFontChooser; -class DisplayConfiguration : public QWidget, +class DisplayConfiguration : public TQWidget, public IDisplayCfgClient { Q_OBJECT + TQ_OBJECT public: - DisplayConfiguration(QWidget *parent); + DisplayConfiguration(TQWidget *tqparent); ~DisplayConfiguration(); // Interface @@ -44,8 +45,8 @@ public: // IDisplayCfgClient RECEIVERS: - bool noticeDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd); - bool noticeDisplayFontChanged(const QFont &f); + bool noticeDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd); + bool noticeDisplayFontChanged(const TQFont &f); public slots: diff --git a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp index a7bbf01..0e3864e 100644 --- a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp +++ b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.cpp @@ -19,37 +19,37 @@ // IDisplayCfg -IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayColorsChanged(const QColor &a, const QColor &b, const QColor &c), +IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayColorsChanged(const TQColor &a, const TQColor &b, const TQColor &c), noticeDisplayColorsChanged(a,b, c) ) -IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayFontChanged(const QFont &f), +IF_IMPL_SENDER ( IDisplayCfg::notifyDisplayFontChanged(const TQFont &f), noticeDisplayFontChanged(f) ) // IDisplayCfgClient -IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayColors(const QColor &a, const QColor &b, const QColor &c), +IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayColors(const TQColor &a, const TQColor &b, const TQColor &c), setDisplayColors(a,b, c) ) -IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayFont(const QFont &f), +IF_IMPL_SENDER ( IDisplayCfgClient::sendDisplayFont(const TQFont &f), setDisplayFont(f) ) -const QColor default_display_active_color = QColor(20, 244, 20); -IF_IMPL_QUERY ( const QColor &IDisplayCfgClient::queryDisplayActiveColor(), +const TQColor default_display_active_color = TQColor(20, 244, 20); +IF_IMPL_TQUERY ( const TQColor &IDisplayCfgClient::queryDisplayActiveColor(), getDisplayActiveColor(), default_display_active_color ) -const QColor default_display_inactive_color = QColor(10, 117, 10).light(75); -IF_IMPL_QUERY ( const QColor &IDisplayCfgClient::queryDisplayInactiveColor(), +const TQColor default_display_inactive_color = TQColor(10, 117, 10).light(75); +IF_IMPL_TQUERY ( const TQColor &IDisplayCfgClient::queryDisplayInactiveColor(), getDisplayInactiveColor(), default_display_inactive_color ) -const QColor default_display_bkgnd_color = QColor(10, 117, 10); -IF_IMPL_QUERY ( const QColor &IDisplayCfgClient::queryDisplayBkgndColor(), +const TQColor default_display_bkgnd_color = TQColor(10, 117, 10); +IF_IMPL_TQUERY ( const TQColor &IDisplayCfgClient::queryDisplayBkgndColor(), getDisplayBkgndColor(), default_display_bkgnd_color ) -const QFont default_display_font = QFont("Helvetica"); -IF_IMPL_QUERY ( const QFont &IDisplayCfgClient::queryDisplayFont(), +const TQFont default_display_font = TQFont("Helvetica"); +IF_IMPL_TQUERY ( const TQFont &IDisplayCfgClient::queryDisplayFont(), getDisplayFont(), default_display_font ) diff --git a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h index ac2ef5d..49514d5 100644 --- a/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h +++ b/kradio3/plugins/gui-standard-display/displaycfg_interfaces.h @@ -24,8 +24,8 @@ #include "../../src/include/interfaces.h" -#include <qfont.h> -#include <qcolor.h> +#include <tqfont.h> +#include <tqcolor.h> /////////////////////////////////////////////////////////////////////// @@ -36,18 +36,18 @@ public : IF_CON_DESTRUCTOR(IDisplayCfg, -1) RECEIVERS: - IF_RECEIVER( setDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) ) - IF_RECEIVER( setDisplayFont (const QFont &f) ) + IF_RECEIVER( setDisplayColors(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) ) + IF_RECEIVER( setDisplayFont (const TQFont &f) ) SENDERS: - IF_SENDER ( notifyDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) ) - IF_SENDER ( notifyDisplayFontChanged(const QFont &f) ) + IF_SENDER ( notifyDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) ) + IF_SENDER ( notifyDisplayFontChanged(const TQFont &f) ) ANSWERS: - IF_ANSWER ( const QColor &getDisplayActiveColor() const ) - IF_ANSWER ( const QColor &getDisplayInactiveColor() const ) - IF_ANSWER ( const QColor &getDisplayBkgndColor() const ) - IF_ANSWER ( const QFont &getDisplayFont() const ) + IF_ANSWER ( const TQColor &getDisplayActiveColor() const ) + IF_ANSWER ( const TQColor &getDisplayInactiveColor() const ) + IF_ANSWER ( const TQColor &getDisplayBkgndColor() const ) + IF_ANSWER ( const TQFont &getDisplayFont() const ) }; @@ -60,18 +60,18 @@ public : IF_CON_DESTRUCTOR(IDisplayCfgClient, 1) SENDERS: - IF_SENDER ( sendDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) ) - IF_SENDER ( sendDisplayFont (const QFont &f) ) + IF_SENDER ( sendDisplayColors(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) ) + IF_SENDER ( sendDisplayFont (const TQFont &f) ) RECEIVERS: - IF_RECEIVER( noticeDisplayColorsChanged(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd) ) - IF_RECEIVER( noticeDisplayFontChanged(const QFont &f) ) - -QUERIES: - IF_QUERY ( const QColor &queryDisplayActiveColor() ) - IF_QUERY ( const QColor &queryDisplayInactiveColor() ) - IF_QUERY ( const QColor &queryDisplayBkgndColor() ) - IF_QUERY ( const QFont &queryDisplayFont() ) + IF_RECEIVER( noticeDisplayColorsChanged(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd) ) + IF_RECEIVER( noticeDisplayFontChanged(const TQFont &f) ) + +TQUERIES: + IF_TQUERY ( const TQColor &queryDisplayActiveColor() ) + IF_TQUERY ( const TQColor &queryDisplayInactiveColor() ) + IF_TQUERY ( const TQColor &queryDisplayBkgndColor() ) + IF_TQUERY ( const TQFont &queryDisplayFont() ) RECEIVERS: virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); diff --git a/kradio3/plugins/gui-standard-display/radioview-configuration.cpp b/kradio3/plugins/gui-standard-display/radioview-configuration.cpp index 9a22313..f8349c3 100644 --- a/kradio3/plugins/gui-standard-display/radioview-configuration.cpp +++ b/kradio3/plugins/gui-standard-display/radioview-configuration.cpp @@ -17,8 +17,8 @@ #include "radioview-configuration.h" -RadioViewConfiguration::RadioViewConfiguration(QWidget *parent) - : QTabWidget (parent), +RadioViewConfiguration::RadioViewConfiguration(TQWidget *tqparent) + : TQTabWidget (tqparent), m_dirty(true) { } @@ -28,66 +28,66 @@ RadioViewConfiguration::~RadioViewConfiguration() } -void RadioViewConfiguration::addTab (QWidget *child, const QString &label) +void RadioViewConfiguration::addTab (TQWidget *child, const TQString &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())); + 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 (QWidget *child, const QIconSet &iconset, const QString &label) +void RadioViewConfiguration::addTab (TQWidget *child, const TQIconSet &iconset, const TQString &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())); + 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 (QWidget *child, QTab *tab) +void RadioViewConfiguration::addTab (TQWidget *child, TQTab *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())); + 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 (QWidget *child, const QString &label, int index) +void RadioViewConfiguration::insertTab (TQWidget *child, const TQString &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())); + 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 (QWidget *child, const QIconSet &iconset, const QString &label, int index) +void RadioViewConfiguration::insertTab (TQWidget *child, const TQIconSet &iconset, const TQString &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())); + 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 (QWidget *child, QTab *tab, int index) +void RadioViewConfiguration::insertTab (TQWidget *child, TQTab *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())); + 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(QWidget *w) +void RadioViewConfiguration::removePage(TQWidget *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); + 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); } diff --git a/kradio3/plugins/gui-standard-display/radioview-configuration.h b/kradio3/plugins/gui-standard-display/radioview-configuration.h index a85d4d9..e368b08 100644 --- a/kradio3/plugins/gui-standard-display/radioview-configuration.h +++ b/kradio3/plugins/gui-standard-display/radioview-configuration.h @@ -24,22 +24,23 @@ -#include <qtabwidget.h> +#include <tqtabwidget.h> -class RadioViewConfiguration : public QTabWidget +class RadioViewConfiguration : public TQTabWidget { Q_OBJECT + TQ_OBJECT public : - RadioViewConfiguration(QWidget *parent = NULL); + RadioViewConfiguration(TQWidget *tqparent = NULL); ~RadioViewConfiguration(); - void addTab (QWidget *child, const QString &label); - void addTab (QWidget *child, const QIconSet &iconset, const QString &label); - void addTab (QWidget *child, QTab *tab); - void insertTab (QWidget *child, const QString &label, int index = -1); - void insertTab (QWidget *child, const QIconSet &iconset, const QString &label, int index = -1); - void insertTab (QWidget *child, QTab *tab, int index = -1); - void removePage(QWidget *w); + void addTab (TQWidget *child, const TQString &label); + void addTab (TQWidget *child, const TQIconSet &iconset, const TQString &label); + void addTab (TQWidget *child, TQTab *tab); + void insertTab (TQWidget *child, const TQString &label, int index = -1); + void insertTab (TQWidget *child, const TQIconSet &iconset, const TQString &label, int index = -1); + void insertTab (TQWidget *child, TQTab *tab, int index = -1); + void removePage(TQWidget *w); public slots: diff --git a/kradio3/plugins/gui-standard-display/radioview.cpp b/kradio3/plugins/gui-standard-display/radioview.cpp index e1fd8e4..0a8e31f 100644 --- a/kradio3/plugins/gui-standard-display/radioview.cpp +++ b/kradio3/plugins/gui-standard-display/radioview.cpp @@ -15,14 +15,14 @@ * * ***************************************************************************/ -#include <qwidgetstack.h> -#include <qlayout.h> -#include <qtoolbutton.h> -#include <qslider.h> -#include <qfile.h> -#include <qtooltip.h> -#include <qcheckbox.h> -#include <qimage.h> +#include <tqwidgetstack.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> +#include <tqslider.h> +#include <tqfile.h> +#include <tqtooltip.h> +#include <tqcheckbox.h> +#include <tqimage.h> #include <kcombobox.h> #include <kiconloader.h> @@ -67,8 +67,8 @@ bool RadioView::ElementCfg::operator == (const ElementCfg &x) const /////////////////////////////////////////////////////////////////////// -RadioView::RadioView(const QString &name) - : QWidget(NULL, name.ascii()), +RadioView::RadioView(const TQString &name) + : TQWidget(NULL, name.ascii()), WidgetPluginBase(name, i18n("Radio Display")), enableToolbarFlag(false), btnPower(NULL), @@ -86,34 +86,34 @@ RadioView::RadioView(const QString &name) for (int i = 0; i < clsClassMAX; ++i) maxUsability[i] = 0; - QBoxLayout *l01 = new QBoxLayout(this, QBoxLayout::LeftToRight, /*spacing=*/3); + TQBoxLayout *l01 = new TQBoxLayout(this, TQBoxLayout::LeftToRight, /*spacing=*/3); l01->setMargin(1); l01->setSpacing(2); - widgetStacks[clsRadioSound] = new QWidgetStack (this); + widgetStacks[clsRadioSound] = new TQWidgetStack (this); l01->addWidget(widgetStacks[clsRadioSound]); - QBoxLayout *l02 = new QBoxLayout(l01, QBoxLayout::Down); - QBoxLayout *l03 = new QBoxLayout(l02, QBoxLayout::LeftToRight); + TQBoxLayout *l02 = new TQBoxLayout(l01, TQBoxLayout::Down); + TQBoxLayout *l03 = new TQBoxLayout(l02, TQBoxLayout::LeftToRight); comboStations = new KComboBox (this); l02->addWidget (comboStations); - QBoxLayout *l05 = new QBoxLayout(l03, QBoxLayout::Down); - widgetStacks[clsRadioDisplay] = new QWidgetStack (this); + TQBoxLayout *l05 = new TQBoxLayout(l03, TQBoxLayout::Down); + widgetStacks[clsRadioDisplay] = new TQWidgetStack (this); l05->addWidget(widgetStacks[clsRadioDisplay]); - widgetStacks[clsRadioSeek] = new QWidgetStack (this); + widgetStacks[clsRadioSeek] = new TQWidgetStack (this); l05->addWidget(widgetStacks[clsRadioSeek]); - QGridLayout *l04 = new QGridLayout (l03, /*rows=*/ 3, /*cols=*/ 2); - btnPower = new QToolButton(this); + TQGridLayout *l04 = new TQGridLayout (l03, /*rows=*/ 3, /*cols=*/ 2); + btnPower = new TQToolButton(this); btnPower->setToggleButton(true); - btnRecording = new QToolButton(this); + btnRecording = new TQToolButton(this); btnRecording->setToggleButton(true); - btnConfigure = new QToolButton(this); + btnConfigure = new TQToolButton(this); btnConfigure->setToggleButton(true); - btnQuit = new QToolButton(this); - btnSnooze = new QToolButton(this); + btnQuit = new TQToolButton(this); + btnSnooze = new TQToolButton(this); btnSnooze->setToggleButton(true); - btnPlugins = new QToolButton(this); + btnPlugins = new TQToolButton(this); btnPlugins->setPopupDelay(1); l04->addWidget (btnPower, 0, 0); l04->addWidget (btnRecording, 0, 1); @@ -125,24 +125,24 @@ RadioView::RadioView(const QString &name) m_pauseMenu = new KPopupMenu(btnPower); m_pauseMenu->insertItem(SmallIcon("kradio_pause"), i18n("Pause KRadio"), - this, SLOT(slotPause())); + this, TQT_SLOT(slotPause())); btnPower->setPopupDelay(200); m_RecordingMenu = new KPopupMenu(btnRecording); m_RecordingMenu->insertItem(SmallIcon("kradio_record"), i18n("Start Recording"), POPUP_ID_START_RECORDING_DEFAULT); - QObject::connect(m_RecordingMenu, SIGNAL(activated(int)), - this, SLOT(slotRecordingMenu(int))); + TQObject::connect(m_RecordingMenu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotRecordingMenu(int))); btnRecording->setPopup(m_RecordingMenu); m_SnoozeMenu = new KPopupMenu(btnSnooze); - m_SnoozeMenu->insertItem(i18n("5 min"), this, SLOT(slotSnooze(int)), 0, 5); - m_SnoozeMenu->insertItem(i18n("10 min"), this, SLOT(slotSnooze(int)), 0, 10); - m_SnoozeMenu->insertItem(i18n("15 min"), this, SLOT(slotSnooze(int)), 0, 15); - m_SnoozeMenu->insertItem(i18n("30 min"), this, SLOT(slotSnooze(int)), 0, 30); - m_SnoozeMenu->insertItem(i18n("60 min"), this, SLOT(slotSnooze(int)), 0, 60); + m_SnoozeMenu->insertItem(i18n("5 min"), this, TQT_SLOT(slotSnooze(int)), 0, 5); + m_SnoozeMenu->insertItem(i18n("10 min"), this, TQT_SLOT(slotSnooze(int)), 0, 10); + m_SnoozeMenu->insertItem(i18n("15 min"), this, TQT_SLOT(slotSnooze(int)), 0, 15); + m_SnoozeMenu->insertItem(i18n("30 min"), this, TQT_SLOT(slotSnooze(int)), 0, 30); + m_SnoozeMenu->insertItem(i18n("60 min"), this, TQT_SLOT(slotSnooze(int)), 0, 60); btnSnooze->setPopup(m_SnoozeMenu); btnSnooze->setPopupDelay(200); @@ -162,42 +162,42 @@ RadioView::RadioView(const QString &name) btnSnooze->setIconSet(SmallIconSet("kradio_zzz")); btnPlugins->setIconSet(SmallIconSet("kradio_plugins")); - widgetStacks[clsRadioSound] ->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred)); - widgetStacks[clsRadioDisplay]->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred)); - widgetStacks[clsRadioSeek] ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); - comboStations ->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); + widgetStacks[clsRadioSound] ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); + widgetStacks[clsRadioDisplay]->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred)); + widgetStacks[clsRadioSeek] ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); + comboStations ->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed)); comboStations->setMinimumHeight(28); - QObject::connect(btnPower, SIGNAL(toggled(bool)), - this, SLOT(slotPower(bool))); - QObject::connect(btnQuit, SIGNAL(clicked()), - kapp, SLOT(quit())); - QObject::connect(btnConfigure, SIGNAL(toggled(bool)), - this, SLOT(slotConfigure(bool))); - QObject::connect(btnRecording, SIGNAL(clicked()), - this, SLOT(slotRecord())); - QObject::connect(btnSnooze, SIGNAL(toggled(bool)), - this, SLOT(slotSnooze(bool))); - QObject::connect(comboStations, SIGNAL(activated(int)), - this, SLOT(slotComboStationSelected(int))); - QObject::connect(btnPlugins, SIGNAL(clicked()), - this, SLOT(slotBtnPluginsClicked())); + TQObject::connect(btnPower, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotPower(bool))); + TQObject::connect(btnQuit, TQT_SIGNAL(clicked()), + kapp, TQT_SLOT(quit())); + TQObject::connect(btnConfigure, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotConfigure(bool))); + TQObject::connect(btnRecording, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRecord())); + TQObject::connect(btnSnooze, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSnooze(bool))); + TQObject::connect(comboStations, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotComboStationSelected(int))); + TQObject::connect(btnPlugins, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotBtnPluginsClicked())); // tooltips - QToolTip::add(btnConfigure, i18n("Configure KRadio")); - QToolTip::add(btnPower, i18n("Power On/Off")); - QToolTip::add(btnQuit, i18n("Quit KRadio Application")); - QToolTip::add(btnRecording, i18n("Start/Stop Recording")); - QToolTip::add(btnSnooze, i18n("Start/Stop Sleep Countdown")); - QToolTip::add(btnPlugins, i18n("Show/Hide Plugins")); - QToolTip::add(comboStations, i18n("Select a Radio Station")); + TQToolTip::add(btnConfigure, i18n("Configure KRadio")); + TQToolTip::add(btnPower, i18n("Power On/Off")); + TQToolTip::add(btnQuit, i18n("Quit KRadio Application")); + TQToolTip::add(btnRecording, i18n("Start/Stop Recording")); + TQToolTip::add(btnSnooze, i18n("Start/Stop Sleep Countdown")); + TQToolTip::add(btnPlugins, i18n("Show/Hide Plugins")); + TQToolTip::add(comboStations, i18n("Select a Radio Station")); // testing - addElement (new RadioViewFrequencyRadio (this, QString::null)); - addElement (new RadioViewVolume(this, QString::null)); - addElement (new RadioViewFrequencySeeker(this, QString::null)); + addElement (new RadioViewFrequencyRadio (this, TQString())); + addElement (new RadioViewVolume(this, TQString())); + addElement (new RadioViewFrequencySeeker(this, TQString())); autoSetCaption(); } @@ -205,7 +205,7 @@ RadioView::RadioView(const QString &name) RadioView::~RadioView () { - QPtrListIterator<QObject> it(configPages); + TQPtrListIterator<TQObject> it(configPages); while (configPages.first()) { delete configPages.first(); } @@ -223,9 +223,9 @@ bool RadioView::addElement (RadioViewElement *e) return false; - e->reparent(this, QPoint(0, 0), true); - QObject::connect(e, SIGNAL(destroyed(QObject*)), - this, SLOT(removeElement(QObject*))); + e->reparent(this, TQPoint(0, 0), true); + TQObject::connect(e, TQT_SIGNAL(destroyed(TQObject*)), + this, TQT_SLOT(removeElement(TQObject*))); elements.append(e); widgetStacks[cls]->addWidget(e); @@ -236,9 +236,9 @@ bool RadioView::addElement (RadioViewElement *e) e->connectI(getSoundStreamServer()); - QPtrListIterator<QObject> it(configPages); + TQPtrListIterator<TQObject> it(configPages); for (; it.current(); ++it) { - addConfigurationTabFor(e, (QTabWidget *)it.current()); + addConfigurationTabFor(e, (TQTabWidget *)it.current()); } selectTopWidgets(); @@ -247,14 +247,14 @@ bool RadioView::addElement (RadioViewElement *e) } -bool RadioView::removeElement (QObject *_e) +bool RadioView::removeElement (TQObject *_e) { RadioViewElement *e = dynamic_cast<RadioViewElement*>(_e); if (!e) return false; ElementCfgListIterator it; - while ((it = elementConfigPages.find(e)) != elementConfigPages.end()) { + while ((it = elementConfigPages.tqfind(e)) != elementConfigPages.end()) { delete (*it).cfg; // it must not used behind, the element will be deleted automatically // by slotElementConfigPageDeleted @@ -266,8 +266,8 @@ bool RadioView::removeElement (QObject *_e) e->disconnectI(currentDevice); RadioViewClass cls = e->getClass(); - QObject::disconnect(e, SIGNAL(destroyed(QObject*)), - this, SLOT(removeElement(QObject*))); + TQObject::disconnect(e, TQT_SIGNAL(destroyed(TQObject*)), + this, TQT_SLOT(removeElement(TQObject*))); widgetStacks[cls]->removeWidget(e); elements.remove(e); @@ -333,9 +333,9 @@ bool RadioView::noticeStationsChanged(const StationList &sl) for (RawStationList::Iterator i(list); i.current(); ++i) { RadioStation *stn = i.current(); - QString icon = stn->iconName(); - if (icon.length() && QFile(icon).exists()) { - QImage img(icon); + TQString icon = stn->iconName(); + if (icon.length() && TQFile(icon).exists()) { + TQImage img(icon); int h = img.height(); float f = (float)(comboStations->height() - 4) / (h ? (float)h : 1.0); comboStations->insertItem(img.smoothScale((int)(img.width()*f), (int)(h * f)), stn->name()); @@ -432,14 +432,14 @@ bool RadioView::startRecordingWithFormat( const SoundFormat &/*proposed_format*/, SoundFormat &/*real_format*/) { - if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.contains(id)) + if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.tqcontains(id)) return false; - QString descr; + TQString descr; querySoundStreamDescription(id, descr); int menu_id = m_NextRecordingMenuID++; m_RecordingMenu->insertItem(SmallIcon("kradio_record"), - i18n("Stop Recording of %1").arg(descr), + i18n("Stop Recording of %1").tqarg(descr), menu_id); m_MenuID2StreamID.insert(menu_id, id); m_StreamID2MenuID.insert(id, menu_id); @@ -454,7 +454,7 @@ bool RadioView::startRecordingWithFormat( bool RadioView::stopRecording (SoundStreamID id) { - if (!id.isValid() || !m_StreamID2MenuID.contains(id)) + if (!id.isValid() || !m_StreamID2MenuID.tqcontains(id)) return false; int menu_id = m_StreamID2MenuID[id]; @@ -472,12 +472,12 @@ bool RadioView::stopRecording (SoundStreamID id) bool RadioView::noticeSoundStreamChanged(SoundStreamID id) { - if (m_StreamID2MenuID.contains(id)) { - QString descr; + if (m_StreamID2MenuID.tqcontains(id)) { + TQString descr; querySoundStreamDescription(id, descr); m_RecordingMenu->changeItem(m_StreamID2MenuID[id], SmallIcon("kradio_record"), - i18n("Stop Recording of %1").arg(descr)); + i18n("Stop Recording of %1").tqarg(descr)); return true; } return false; @@ -486,7 +486,7 @@ bool RadioView::noticeSoundStreamChanged(SoundStreamID id) // ITimeControl -bool RadioView::noticeCountdownStarted(const QDateTime &) +bool RadioView::noticeCountdownStarted(const TQDateTime &) { btnSnooze->setOn(true); return true; @@ -508,7 +508,7 @@ bool RadioView::noticeCountdownZero() void RadioView::saveState (KConfig *config) const { - config->setGroup(QString("radioview-") + name()); + config->setGroup(TQString("radioview-") + name()); config->writeEntry("enableToobarFlag", enableToolbarFlag); WidgetPluginBase::saveState(config); @@ -522,7 +522,7 @@ void RadioView::saveState (KConfig *config) const void RadioView::restoreState (KConfig *config) { - config->setGroup(QString("radioview-") + name()); + config->setGroup(TQString("radioview-") + name()); enableToolbarFlag = config->readBoolEntry("enableToolbarFlag", false); WidgetPluginBase::restoreState(config); @@ -544,9 +544,9 @@ ConfigPageInfo RadioView::createConfigurationPage() addConfigurationTabFor(i.current(), c); } - configPages.append(c); - QObject::connect(c, SIGNAL(destroyed(QObject *)), - this, SLOT(slotConfigPageDeleted(QObject *))); + configPages.append(TQT_TQOBJECT(c)); + TQObject::connect(c, TQT_SIGNAL(destroyed(TQObject *)), + this, TQT_SLOT(slotConfigPageDeleted(TQObject *))); return ConfigPageInfo( c, @@ -557,7 +557,7 @@ ConfigPageInfo RadioView::createConfigurationPage() } -void RadioView::addConfigurationTabFor(RadioViewElement *e, QTabWidget *c) +void RadioView::addConfigurationTabFor(RadioViewElement *e, TQTabWidget *c) { if (!e || !c) return; @@ -567,34 +567,34 @@ void RadioView::addConfigurationTabFor(RadioViewElement *e, QTabWidget *c) if (inf.page) { if (inf.iconName.length()) { - c->addTab(inf.page, QIconSet(SmallIconSet(inf.iconName)), inf.itemName); + c->addTab(inf.page, TQIconSet(SmallIconSet(inf.iconName)), inf.itemName); } else { c->addTab(inf.page, inf.itemName); } - elementConfigPages.push_back(ElementCfg(e, inf.page)); - QObject::connect(inf.page, SIGNAL(destroyed(QObject *)), - this, SLOT(slotElementConfigPageDeleted(QObject *))); + elementConfigPages.push_back(ElementCfg(e, TQT_TQOBJECT(inf.page))); + TQObject::connect(inf.page, TQT_SIGNAL(destroyed(TQObject *)), + this, TQT_SLOT(slotElementConfigPageDeleted(TQObject *))); } } -void RadioView::addCommonConfigurationTab(QTabWidget *c) +void RadioView::addCommonConfigurationTab(TQTabWidget *c) { if (!c) return; - QFrame *f = new QFrame(c); - QVBoxLayout *l = new QVBoxLayout(f, 10); + TQFrame *f = new TQFrame(c); + TQVBoxLayout *l = new TQVBoxLayout(f, 10); - l->addWidget(new QCheckBox(i18n("set Toolbar-Flag for Display"), f)); - l->addItem(new QSpacerItem(1, 3, QSizePolicy::Fixed, QSizePolicy::Expanding)); + l->addWidget(new TQCheckBox(i18n("set Toolbar-Flag for Display"), f)); + l->addItem(new TQSpacerItem(1, 3, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); c->addTab(f, i18n("Common")); - elementConfigPages.push_back(ElementCfg(f)); - QObject::connect(f, SIGNAL(destroyed(QObject *)), - this, SLOT(slotElementConfigPageDeleted(QObject *))); + elementConfigPages.push_back(ElementCfg(TQT_TQOBJECT(f))); + TQObject::connect(f, TQT_SIGNAL(destroyed(TQObject *)), + this, TQT_SLOT(slotElementConfigPageDeleted(TQObject *))); } @@ -632,7 +632,7 @@ void RadioView::noticeWidgetPluginShown(WidgetPluginBase *p, bool shown) btnConfigure->blockSignals(false); } - if (m_Plugins2MenuID.contains(p)) { + if (m_Plugins2MenuID.tqcontains(p)) { m_manager->updateWidgetPluginMenuItem(p, m_PluginMenu, m_Plugins2MenuID, shown); } } @@ -666,7 +666,7 @@ void RadioView::slotPause() void RadioView::slotConfigure(bool b) { - QWidget *w = m_manager ? m_manager->getConfigDialog() : NULL; + TQWidget *w = m_manager ? m_manager->getConfigDialog() : NULL; if (w) b ? w->show() : w->hide(); if (!w) btnConfigure->setOn(false); @@ -682,7 +682,7 @@ void RadioView::slotRecord() SoundFormat sf; queryIsRecordingRunning(id, r, sf); - if (!r && b /*!m_StreamID2MenuID.contains(id)*/) { + if (!r && b /*!m_StreamID2MenuID.tqcontains(id)*/) { if (!queryIsPowerOn()) sendPowerOn(); sendStartRecording(id); @@ -704,7 +704,7 @@ void RadioView::slotRecordingMenu(int i) sendPowerOn(); sendStartRecording(id); } - } else if (m_MenuID2StreamID.contains(i)) { + } else if (m_MenuID2StreamID.tqcontains(i)) { sendStopRecording(m_MenuID2StreamID[i]); } } @@ -740,16 +740,16 @@ void RadioView::slotBtnPluginsClicked() btnPlugins->openPopup(); } -void RadioView::slotConfigPageDeleted(QObject *o) +void RadioView::slotConfigPageDeleted(TQObject *o) { configPages.remove(o); } -void RadioView::slotElementConfigPageDeleted(QObject *o) +void RadioView::slotElementConfigPageDeleted(TQObject *o) { ElementCfgListIterator it; - while ((it = elementConfigPages.find(o)) != elementConfigPages.end()) { + while ((it = elementConfigPages.tqfind(o)) != elementConfigPages.end()) { elementConfigPages.remove(it); } } @@ -762,14 +762,14 @@ void RadioView::show() else KWin::setType(winId(), NET::Normal); WidgetPluginBase::pShow(); - QWidget::show(); + TQWidget::show(); } void RadioView::showOnOrgDesktop() { WidgetPluginBase::pShowOnOrgDesktop(); - //QWidget::show(); + //TQWidget::show(); } @@ -777,20 +777,20 @@ void RadioView::showOnOrgDesktop() void RadioView::hide() { WidgetPluginBase::pHide(); - QWidget::hide(); + TQWidget::hide(); } -void RadioView::showEvent(QShowEvent *e) +void RadioView::showEvent(TQShowEvent *e) { - QWidget::showEvent(e); + TQWidget::showEvent(e); WidgetPluginBase::pShowEvent(e); } -void RadioView::hideEvent(QHideEvent *e) +void RadioView::hideEvent(TQHideEvent *e) { - QWidget::hideEvent(e); + TQWidget::hideEvent(e); WidgetPluginBase::pHideEvent(e); } @@ -798,7 +798,7 @@ void RadioView::hideEvent(QHideEvent *e) void RadioView::autoSetCaption() { const RadioStation &rs = queryCurrentStation(); - setCaption((queryIsPowerOn() && rs.isValid()) ? rs.longName() : QString("KRadio")); + setCaption((queryIsPowerOn() && rs.isValid()) ? rs.longName() : TQString("KRadio")); } diff --git a/kradio3/plugins/gui-standard-display/radioview.h b/kradio3/plugins/gui-standard-display/radioview.h index 6cddc26..c884099 100644 --- a/kradio3/plugins/gui-standard-display/radioview.h +++ b/kradio3/plugins/gui-standard-display/radioview.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qobjectlist.h> +#include <tqobjectlist.h> #include "../../src/include/radio_interfaces.h" #include "../../src/include/radiodevicepool_interfaces.h" @@ -31,15 +31,15 @@ #include "../../src/include/widgetplugins.h" #include "radioview_element.h" -class QWidgetStack; -class QToolButton; +class TQWidgetStack; +class TQToolButton; class KComboBox; -class QTabWidget; +class TQTabWidget; class KPopupMenu; -class RadioView : public QWidget, +class RadioView : public TQWidget, public WidgetPluginBase, public IRadioClient, public IRadioDevicePoolClient, @@ -47,15 +47,16 @@ class RadioView : public QWidget, public ITimeControlClient { Q_OBJECT + TQ_OBJECT public: - RadioView(const QString &name); + RadioView(const TQString &name); virtual ~RadioView(); - virtual QString pluginClassName() const { return "RadioView"; } + virtual TQString pluginClassName() const { return "RadioView"; } - const QString &name() const { return PluginBase::name(); } - QString &name() { return PluginBase::name(); } + const TQString &name() const { return PluginBase::name(); } + TQString &name() { return PluginBase::name(); } // WidgetPluginBase @@ -75,7 +76,7 @@ public: public slots: // connects destroy-msg with remove-function bool addElement (RadioViewElement *); - bool removeElement (QObject *); + bool removeElement (TQObject *); protected: void selectTopWidgets(); @@ -87,7 +88,7 @@ RECEIVERS: bool noticePowerChanged(bool on); bool noticeStationChanged (const RadioStation &, int idx); bool noticeStationsChanged(const StationList &sl); - bool noticePresetFileChanged(const QString &/*f*/) { return false; } + bool noticePresetFileChanged(const TQString &/*f*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID id); @@ -95,8 +96,8 @@ RECEIVERS: RECEIVERS: bool noticeActiveDeviceChanged(IRadioDevice *rd); - bool noticeDevicesChanged(const QPtrList<IRadioDevice> &) { return false; } - bool noticeDeviceDescriptionChanged(const QString &) { return false; } + bool noticeDevicesChanged(const TQPtrList<IRadioDevice> &) { return false; } + bool noticeDeviceDescriptionChanged(const TQString &) { return false; } // ISoundStreamClient @@ -116,7 +117,7 @@ RECEIVERS: bool noticeAlarmsChanged(const AlarmVector &) { return false; } bool noticeAlarm(const Alarm &) { return false; } bool noticeNextAlarmChanged(const Alarm *) { return false; } - bool noticeCountdownStarted(const QDateTime &end); + bool noticeCountdownStarted(const TQDateTime &end); bool noticeCountdownStopped(); bool noticeCountdownZero(); bool noticeCountdownSecondsChanged(int) { return false; } @@ -133,8 +134,8 @@ protected slots: void slotBtnPluginsClicked(); void slotComboStationSelected(int); - void slotConfigPageDeleted(QObject*); - void slotElementConfigPageDeleted(QObject*); + void slotConfigPageDeleted(TQObject*); + void slotElementConfigPageDeleted(TQObject*); public slots: @@ -144,48 +145,48 @@ public slots: void hide(); protected: - virtual void showEvent(QShowEvent *); - virtual void hideEvent(QHideEvent *); + virtual void showEvent(TQShowEvent *); + virtual void hideEvent(TQHideEvent *); virtual void autoSetCaption(); - const QWidget *getWidget() const { return this; } - QWidget *getWidget() { return this; } + const TQWidget *getWidget() const { return this; } + TQWidget *getWidget() { return this; } - void addConfigurationTabFor(RadioViewElement *, QTabWidget *); - void addCommonConfigurationTab(QTabWidget *); + void addConfigurationTabFor(RadioViewElement *, TQTabWidget *); + void addCommonConfigurationTab(TQTabWidget *); protected: bool enableToolbarFlag; - QToolButton *btnPower; - QToolButton *btnConfigure; - QToolButton *btnQuit; - QToolButton *btnRecording; - QToolButton *btnSnooze; - QToolButton *btnPlugins; + TQToolButton *btnPower; + TQToolButton *btnConfigure; + TQToolButton *btnQuit; + TQToolButton *btnRecording; + TQToolButton *btnSnooze; + TQToolButton *btnPlugins; KComboBox *comboStations; struct ElementCfg { RadioViewElement *element; - QObject *cfg; + TQObject *cfg; ElementCfg() : element(NULL), cfg(NULL) {} - ElementCfg(RadioViewElement *e, QObject *w) : element(e), cfg(w) {} + ElementCfg(RadioViewElement *e, TQObject *w) : element(e), cfg(w) {} ElementCfg(RadioViewElement *e) : element(e), cfg(NULL) {} - ElementCfg(QObject *w) : element(NULL), cfg(w) {} + ElementCfg(TQObject *w) : element(NULL), cfg(w) {} bool operator == (const ElementCfg &x) const; }; - typedef QPtrList<RadioViewElement> ElementList; - typedef QPtrListIterator<RadioViewElement> ElementListIterator; - typedef QValueList<ElementCfg> ElementCfgList; - typedef QValueListIterator<ElementCfg> ElementCfgListIterator; + typedef TQPtrList<RadioViewElement> ElementList; + typedef TQPtrListIterator<RadioViewElement> ElementListIterator; + typedef TQValueList<ElementCfg> ElementCfgList; + typedef TQValueListIterator<ElementCfg> ElementCfgListIterator; ElementList elements; ElementCfgList elementConfigPages; - QObjectList configPages; - QWidgetStack * widgetStacks[clsClassMAX]; + TQObjectList configPages; + TQWidgetStack * widgetStacks[clsClassMAX]; float maxUsability[clsClassMAX]; IRadioDevice *currentDevice; @@ -194,11 +195,11 @@ protected: KPopupMenu *m_pauseMenu; KPopupMenu *m_SnoozeMenu; int m_NextRecordingMenuID; - QMap<int, SoundStreamID> m_MenuID2StreamID; - QMap<SoundStreamID, int> m_StreamID2MenuID; + TQMap<int, SoundStreamID> m_MenuID2StreamID; + TQMap<SoundStreamID, int> m_StreamID2MenuID; KPopupMenu *m_PluginMenu; - QMap<WidgetPluginBase *, int> m_Plugins2MenuID; + TQMap<WidgetPluginBase *, int> m_Plugins2MenuID; }; diff --git a/kradio3/plugins/gui-standard-display/radioview_element.cpp b/kradio3/plugins/gui-standard-display/radioview_element.cpp index 9c3396f..0ba5ba7 100644 --- a/kradio3/plugins/gui-standard-display/radioview_element.cpp +++ b/kradio3/plugins/gui-standard-display/radioview_element.cpp @@ -17,7 +17,7 @@ #include "radioview_element.h" -RadioViewElement::RadioViewElement (QWidget * /*parent*/, const QString & /*name*/, +RadioViewElement::RadioViewElement (TQWidget * /*tqparent*/, const TQString & /*name*/, RadioViewClass cls) : myClass(cls) { diff --git a/kradio3/plugins/gui-standard-display/radioview_element.h b/kradio3/plugins/gui-standard-display/radioview_element.h index 11c77ac..a354b82 100644 --- a/kradio3/plugins/gui-standard-display/radioview_element.h +++ b/kradio3/plugins/gui-standard-display/radioview_element.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qframe.h> +#include <tqframe.h> #include "../../src/include/interfaces.h" #include "../../src/include/plugins.h" @@ -34,12 +34,13 @@ enum RadioViewClass { clsRadioSound = 0, // Defaults to an empty element -class RadioViewElement : public QFrame, +class RadioViewElement : public TQFrame, public virtual Interface { Q_OBJECT + TQ_OBJECT public: - RadioViewElement (QWidget *parent, const QString &name, RadioViewClass myClass); + RadioViewElement (TQWidget *tqparent, const TQString &name, RadioViewClass myClass); virtual ~RadioViewElement(); bool connectI (Interface *) { return false; } // default behaviour, please overwrite in derived class diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp index 8c6d15d..53f3a37 100644 --- a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp +++ b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.cpp @@ -17,16 +17,16 @@ #include "../../src/include/utils.h" -#include <qpainter.h> -#include <qimage.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqimage.h> +#include <tqpixmap.h> #include <kimageeffect.h> // fading, blending, ... -#include <kpixmapio.h> // fast conversion between QPixmap/QImage +#include <kpixmapio.h> // fast conversion between TQPixmap/TQImage #include "radioview_frequencyradio.h" #include "displaycfg.h" -RadioViewFrequencyRadio::RadioViewFrequencyRadio(QWidget *parent, const QString &name ) - : RadioViewElement(parent, name, clsRadioDisplay), +RadioViewFrequencyRadio::RadioViewFrequencyRadio(TQWidget *tqparent, const TQString &name ) + : RadioViewElement(tqparent, name, clsRadioDisplay), m_power(false), m_valid(false), m_frequency(0), @@ -40,10 +40,10 @@ RadioViewFrequencyRadio::RadioViewFrequencyRadio(QWidget *parent, const QString // set some sensless default colors // real values are read in restoreState - setDisplayColors(QColor(20, 244, 20), - QColor(10, 117, 10).light(75), - QColor(10, 117, 10)); - setDisplayFont(QFont("Helvetica")); + setDisplayColors(TQColor(20, 244, 20), + TQColor(10, 117, 10).light(75), + TQColor(10, 117, 10)); + setDisplayFont(TQFont("Helvetica")); } @@ -72,12 +72,12 @@ void RadioViewFrequencyRadio::saveState (KConfig *config) const void RadioViewFrequencyRadio::restoreState (KConfig *config) { - QColor defaultActive (20, 244, 20), - defaultInactive(QColor(10, 117, 10).light(75)), + TQColor defaultActive (20, 244, 20), + defaultInactive(TQColor(10, 117, 10).light(75)), defaultButton (10, 117, 10); - QFont defaultFont ("Helvetica"); - QColor a, b, c; - QFont f; + TQFont defaultFont ("Helvetica"); + TQColor a, b, c; + TQFont f; a = config->readColorEntry ("frequency-view-colorActiveText", &defaultActive); b = config->readColorEntry ("frequency-view-colorInactiveText", @@ -98,7 +98,7 @@ ConfigPageInfo RadioViewFrequencyRadio::createConfigurationPage() return ConfigPageInfo (a, i18n("Frequency Display"), i18n("Frequency Display"), - QString::null + TQString() ); } @@ -144,9 +144,9 @@ void RadioViewFrequencyRadio::noticeConnectedI (ISoundStreamServer *s, bool poin // IDisplayCfg -bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText, - const QColor &inactiveText, - const QColor &button) +bool RadioViewFrequencyRadio::setDisplayColors(const TQColor &activeText, + const TQColor &inactiveText, + const TQColor &button) { bool change = (activeText != m_colorActiveText || inactiveText != m_colorInactiveText || button != m_colorButton); @@ -154,18 +154,18 @@ bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText, m_colorInactiveText = inactiveText; m_colorButton = button; - QPalette pl = palette(); - QColorGroup cg = pl.inactive(); + TQPalette pl = palette(); + TQColorGroup cg = pl.inactive(); - QBrush fg = cg.brush(QColorGroup::Foreground), - btn = cg.brush(QColorGroup::Button), - lgt = cg.brush(QColorGroup::Light), - drk = cg.brush(QColorGroup::Dark), - mid = cg.brush(QColorGroup::Mid), - txt = cg.brush(QColorGroup::Text), - btx = cg.brush(QColorGroup::BrightText), - bas = cg.brush(QColorGroup::Base), - bg = cg.brush(QColorGroup::Background); + TQBrush fg = cg.brush(TQColorGroup::Foreground), + btn = cg.brush(TQColorGroup::Button), + lgt = cg.brush(TQColorGroup::Light), + drk = cg.brush(TQColorGroup::Dark), + mid = cg.brush(TQColorGroup::Mid), + txt = cg.brush(TQColorGroup::Text), + btx = cg.brush(TQColorGroup::BrightText), + bas = cg.brush(TQColorGroup::Base), + bg = cg.brush(TQColorGroup::Background); fg.setColor (m_colorActiveText); btn.setColor(m_colorButton); @@ -177,19 +177,19 @@ bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText, bas.setColor(m_colorButton); bg.setColor (m_colorButton); - QColorGroup ncg(fg, btn, lgt, drk, mid, txt, btx, bas, bg); + TQColorGroup ncg(fg, btn, lgt, drk, mid, txt, btx, bas, bg); pl.setInactive(ncg); pl.setActive(ncg); setPalette(pl); - if (parentWidget() && parentWidget()->backgroundPixmap() ){ + if (tqparentWidget() && tqparentWidget()->backgroundPixmap() ){ KPixmapIO io; - QImage i = io.convertToImage(*parentWidget()->backgroundPixmap()); - KImageEffect::fade(i, 0.5, colorGroup().color(QColorGroup::Dark)); + TQImage i = io.convertToImage(*tqparentWidget()->backgroundPixmap()); + KImageEffect::fade(i, 0.5, tqcolorGroup().color(TQColorGroup::Dark)); setPaletteBackgroundPixmap(io.convertToPixmap(i)); setBackgroundOrigin(WindowOrigin); } else { - setBackgroundColor(colorGroup().color(QColorGroup::Button)); + setBackgroundColor(tqcolorGroup().color(TQColorGroup::Button)); } if (change) @@ -197,7 +197,7 @@ bool RadioViewFrequencyRadio::setDisplayColors(const QColor &activeText, return true; } -bool RadioViewFrequencyRadio::setDisplayFont (const QFont &f) +bool RadioViewFrequencyRadio::setDisplayFont (const TQFont &f) { if (m_font != f) { m_font = f; @@ -222,7 +222,7 @@ bool RadioViewFrequencyRadio::noticePowerChanged (bool on, const IRadioDevice */ queryIsStereo(ssid, s); noticeStereoChanged(ssid, s); - repaint(); + tqrepaint(); return true; } @@ -233,7 +233,7 @@ bool RadioViewFrequencyRadio::noticeStationChanged (const RadioStation &, const } -bool RadioViewFrequencyRadio::noticeDescriptionChanged (const QString &, const IRadioDevice */*sender*/) +bool RadioViewFrequencyRadio::noticeDescriptionChanged (const TQString &, const IRadioDevice */*sender*/) { return false; // we don't care } @@ -246,7 +246,7 @@ bool RadioViewFrequencyRadio::noticeSignalQualityChanged(SoundStreamID id, float if (queryCurrentSoundStreamID() != id) return false; m_quality = q; - repaint (); + tqrepaint (); return true; } @@ -256,7 +256,7 @@ bool RadioViewFrequencyRadio::noticeStereoChanged(SoundStreamID id, bool s) if (queryCurrentSoundStreamID() != id) return false; m_stereo = s; - repaint (); + tqrepaint (); return true; } @@ -269,7 +269,7 @@ bool RadioViewFrequencyRadio::noticeStereoChanged(SoundStreamID id, bool s) bool RadioViewFrequencyRadio::noticeFrequencyChanged(float f, const RadioStation *) { m_frequency = f; - repaint (); + tqrepaint (); return true; } @@ -293,17 +293,17 @@ bool RadioViewFrequencyRadio::noticeScanStepChanged(float /*s*/) -void RadioViewFrequencyRadio::drawContents(QPainter *paint) +void RadioViewFrequencyRadio::drawContents(TQPainter *paint) { if (!paint) return; - QRect r = contentsRect(); + TQRect r = contentsRect(); - int margin = QMAX(4, QMIN(r.width() / 50, r.height() / 50)), - tmp = QMIN(r.height(), (r.width() - 2*margin) / 4), - xd_st = QMIN((r.height() - margin * 2) / 3, tmp/3), - xw = QMIN(tmp / 2, xd_st * 3 / 2), - penw = QMAX(1, xw / 25), + int margin = TQMAX(4, TQMIN(r.width() / 50, r.height() / 50)), + tmp = TQMIN(r.height(), (r.width() - 2*margin) / 4), + xd_st = TQMIN((r.height() - margin * 2) / 3, tmp/3), + xw = TQMIN(tmp / 2, xd_st * 3 / 2), + penw = TQMAX(1, xw / 25), xh_st = xd_st, xx_st = r.x() + margin + xw + 2 * margin + penw/2, xy_st = r.y() + margin + penw/2, @@ -320,10 +320,10 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint) xx_sg = r.x() + margin, xy_sg = r.y() + margin; - QPen activePen (colorGroup().color(QColorGroup::Text), penw); - QPen inactivePen (colorGroup().color(QColorGroup::Mid), penw); - QBrush activeBrush = colorGroup().brush(QColorGroup::Text); - QBrush inactiveBrush = colorGroup().brush(QColorGroup::Mid); + TQPen activePen (tqcolorGroup().color(TQColorGroup::Text), penw); + TQPen inactivePen (tqcolorGroup().color(TQColorGroup::Mid), penw); + TQBrush activeBrush = tqcolorGroup().brush(TQColorGroup::Text); + TQBrush inactiveBrush = tqcolorGroup().brush(TQColorGroup::Mid); // draw stereo symbol paint->setPen( (m_stereo && m_power) ? activePen : inactivePen); @@ -367,11 +367,11 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint) ); // triangle - QPen tmppen = (m_quality > 0.1 && m_power) ? activePen : inactivePen; + TQPen tmppen = (m_quality > 0.1 && m_power) ? activePen : inactivePen; tmppen.setWidth(1); paint->setPen(tmppen); paint->setBrush( (m_quality > 0.1 && m_power) ? activeBrush : inactiveBrush); - QPointArray pts(3); + TQPointArray pts(3); pts.setPoint(0, (int)(xx_sg + xw / 4), (int)(xy_sg + xh_sg - penw/2)); pts.setPoint(1, (int)(xx_sg + xw *3/4), (int)(xy_sg + xh_sg - penw/2)); pts.setPoint(2, (int)(xx_sg + xw / 2), (int)(xy_sg + xw/2 + penw)); @@ -381,31 +381,31 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint) // AM/FM display - QFont f = m_font; + TQFont f = m_font; paint->setPen ( (m_frequency <= 10 && m_power) ? activePen : inactivePen); f.setPixelSize(xh_am); paint->setFont(f); paint->drawText(xx_am, xy_am + xh_am - 1, i18n("AM")); - int xw_am = QFontMetrics(f).width(i18n("AM")); + int xw_am = TQFontMetrics(f).width(i18n("AM")); paint->setPen ( (m_frequency > 10 && m_power) ? activePen : inactivePen); f.setPixelSize(xh_fm); paint->setFont(f); paint->drawText(xx_fm, xy_fm + xh_fm - 1, i18n("FM")); - int xw_fm = QFontMetrics(f).width(i18n("FM")); + int xw_fm = TQFontMetrics(f).width(i18n("FM")); - int xx_f = QMAX(xx_fm + xw_fm, QMAX(xw_am + xx_am, QMAX(xx_st + xw, xw + xx_sg))) + margin, + int xx_f = TQMAX(xx_fm + xw_fm, TQMAX(xw_am + xx_am, TQMAX(xx_st + xw, xw + xx_sg))) + margin, xy_f = r.y() + margin, xw_f = r.right() - margin - xx_f + 1, xh_f = r.bottom() - margin - xy_f + 1; // Frequency Display - QString s; + TQString s; if (m_frequency < 10) { - s = i18n("%1 kHz").arg(KGlobal::locale()->formatNumber((int)(m_frequency * 1000), 0)); + s = i18n("%1 kHz").tqarg(KGlobal::locale()->formatNumber((int)(m_frequency * 1000), 0)); } else { - s = i18n("%1 MHz").arg(KGlobal::locale()->formatNumber(m_frequency, 2)); + s = i18n("%1 MHz").tqarg(KGlobal::locale()->formatNumber(m_frequency, 2)); } float pxs = xh_f; @@ -413,16 +413,16 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint) f.setPixelSize((int)pxs); int n = 30; while (1) { - QFontMetrics fm(f); - int sw = fm.boundingRect(xx_f, xy_f, xw_f, xh_f, Qt::AlignRight | Qt::AlignVCenter, s).width(); + TQFontMetrics fm(f); + int sw = fm.boundingRect(xx_f, xy_f, xw_f, xh_f, TQt::AlignRight | TQt::AlignVCenter, s).width(); if (sw <= xw_f || --n <= 0) break; float fact = (float)xw_f / (float)sw; - pxs = QMIN(pxs - 1, pxs * fact); - f.setPixelSize(QMAX(1,(int)pxs)); + pxs = TQMIN(pxs - 1, pxs * fact); + f.setPixelSize(TQMAX(1,(int)pxs)); } paint->setFont(f); - paint->drawText(xx_f, xy_f, xw_f, xh_f, Qt::AlignRight | Qt::AlignVCenter, s); + paint->drawText(xx_f, xy_f, xw_f, xh_f, TQt::AlignRight | TQt::AlignVCenter, s); } @@ -430,9 +430,9 @@ void RadioViewFrequencyRadio::drawContents(QPainter *paint) -void RadioViewFrequencyRadio::reparent (QWidget *prnt, +void RadioViewFrequencyRadio::reparent (TQWidget *prnt, WFlags f, - const QPoint &p, + const TQPoint &p, bool showIt) { RadioViewElement::reparent(prnt, f, p, showIt); diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h index 795eae1..d89ce44 100644 --- a/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h +++ b/kradio3/plugins/gui-standard-display/radioview_frequencyradio.h @@ -27,15 +27,16 @@ *@author Martin Witte */ -class RadioViewFrequencyRadio : public RadioViewElement, // is a QObject, must be first +class RadioViewFrequencyRadio : public RadioViewElement, // is a TQObject, must be first public IRadioDeviceClient, public IFrequencyRadioClient, public ISoundStreamClient, public IDisplayCfg { Q_OBJECT + TQ_OBJECT public: - RadioViewFrequencyRadio(QWidget *parent, const QString &name); + RadioViewFrequencyRadio(TQWidget *tqparent, const TQString &name); ~RadioViewFrequencyRadio(); float getUsability (Interface *) const; @@ -53,20 +54,20 @@ public: // IDisplayCfg RECEIVERS: - bool setDisplayColors(const QColor &activeColor, const QColor &inactiveColor, const QColor &bkgnd); - bool setDisplayFont (const QFont &f); + bool setDisplayColors(const TQColor &activeColor, const TQColor &inactiveColor, const TQColor &bkgnd); + bool setDisplayFont (const TQFont &f); ANSWERS: - const QColor &getDisplayActiveColor() const { return m_colorActiveText; } - const QColor &getDisplayInactiveColor() const { return m_colorInactiveText; } - const QColor &getDisplayBkgndColor() const { return m_colorButton; } - const QFont &getDisplayFont() const { return m_font; } + const TQColor &getDisplayActiveColor() const { return m_colorActiveText; } + const TQColor &getDisplayInactiveColor() const { return m_colorInactiveText; } + const TQColor &getDisplayBkgndColor() const { return m_colorButton; } + const TQFont &getDisplayFont() const { return m_font; } // IRadioDeviceClient RECEIVERS: bool noticePowerChanged (bool on, const IRadioDevice *sender = NULL); bool noticeStationChanged (const RadioStation &, const IRadioDevice *sender = NULL); - bool noticeDescriptionChanged (const QString &, const IRadioDevice *sender = NULL); + bool noticeDescriptionChanged (const TQString &, const IRadioDevice *sender = NULL); bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; } // ISoundStreamClient @@ -87,16 +88,16 @@ RECEIVERS: public: - void reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt = FALSE); + void reparent (TQWidget *tqparent, WFlags f, const TQPoint &p, bool showIt = FALSE); protected: - void drawContents(QPainter *p); + void drawContents(TQPainter *p); protected: - QColor m_colorActiveText, m_colorInactiveText, m_colorButton; - QFont m_font; + TQColor m_colorActiveText, m_colorInactiveText, m_colorButton; + TQFont m_font; bool m_power; bool m_valid; diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp index 938939a..f29f1dd 100644 --- a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp +++ b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.cpp @@ -16,19 +16,19 @@ ***************************************************************************/ #include <math.h> -#include <qlayout.h> -#include <qslider.h> -#include <qtoolbutton.h> -#include <qaccel.h> -#include <qtooltip.h> +#include <tqlayout.h> +#include <tqslider.h> +#include <tqtoolbutton.h> +#include <tqaccel.h> +#include <tqtooltip.h> #include <kiconloader.h> #include <klocale.h> #include "radioview_frequencyseeker.h" -RadioViewFrequencySeeker::RadioViewFrequencySeeker(QWidget *parent, const QString &name) - : RadioViewElement(parent, name, clsRadioSeek), +RadioViewFrequencySeeker::RadioViewFrequencySeeker(TQWidget *tqparent, const TQString &name) + : RadioViewElement(tqparent, name, clsRadioSeek), m_btnSearchLeft(NULL), m_btnStepLeft(NULL), m_btnStepRight(NULL), @@ -36,14 +36,14 @@ RadioViewFrequencySeeker::RadioViewFrequencySeeker(QWidget *parent, const QStrin m_sldFrequency(NULL), m_ignoreChanges(false) { - QBoxLayout *l = new QBoxLayout(this, QBoxLayout::LeftToRight, /*spacing=*/ 3); + TQBoxLayout *l = new TQBoxLayout(this, TQBoxLayout::LeftToRight, /*spacing=*/ 3); l->setMargin(0); - m_sldFrequency = new QSlider(Qt::Horizontal, this); - m_btnSearchLeft = new QToolButton(this); - m_btnSearchRight = new QToolButton(this); - m_btnStepLeft = new QToolButton(this); - m_btnStepRight = new QToolButton(this); + m_sldFrequency = new TQSlider(Qt::Horizontal, this); + m_btnSearchLeft = new TQToolButton(this); + m_btnSearchRight = new TQToolButton(this); + m_btnStepLeft = new TQToolButton(this); + m_btnStepRight = new TQToolButton(this); m_btnSearchLeft ->setToggleButton(true); m_btnSearchRight->setToggleButton(true); @@ -60,32 +60,32 @@ RadioViewFrequencySeeker::RadioViewFrequencySeeker(QWidget *parent, const QStrin l->addWidget (m_btnStepRight); l->addWidget (m_btnSearchRight); - QObject::connect(m_sldFrequency, SIGNAL(valueChanged(int)), - this, SLOT(slotSliderChanged(int))); - QObject::connect(m_btnSearchLeft, SIGNAL(toggled(bool)), - this, SLOT(slotSearchLeft(bool))); - QObject::connect(m_btnSearchRight, SIGNAL(toggled(bool)), - this, SLOT(slotSearchRight(bool))); - QObject::connect(m_btnStepLeft, SIGNAL(clicked()), - m_sldFrequency, SLOT(subtractStep())); - QObject::connect(m_btnStepRight, SIGNAL(clicked()), - m_sldFrequency, SLOT(addStep())); + TQObject::connect(m_sldFrequency, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSliderChanged(int))); + TQObject::connect(m_btnSearchLeft, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSearchLeft(bool))); + TQObject::connect(m_btnSearchRight, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSearchRight(bool))); + TQObject::connect(m_btnStepLeft, TQT_SIGNAL(clicked()), + m_sldFrequency, TQT_SLOT(subtractStep())); + TQObject::connect(m_btnStepRight, TQT_SIGNAL(clicked()), + m_sldFrequency, TQT_SLOT(addStep())); // Tooltips - QToolTip::add(m_btnSearchLeft, i18n("Search for previous Radio Station")); - QToolTip::add(m_btnSearchRight, i18n("Search for next Radio Station")); - QToolTip::add(m_btnStepLeft, i18n("Decrement Frequency")); - QToolTip::add(m_btnStepRight, i18n("Increment Frequency")); - QToolTip::add(m_sldFrequency, i18n("Change Frequency")); + TQToolTip::add(m_btnSearchLeft, i18n("Search for previous Radio Station")); + TQToolTip::add(m_btnSearchRight, i18n("Search for next Radio Station")); + TQToolTip::add(m_btnStepLeft, i18n("Decrement Frequency")); + TQToolTip::add(m_btnStepRight, i18n("Increment Frequency")); + TQToolTip::add(m_sldFrequency, i18n("Change Frequency")); // Accelerators - QAccel *Accel = new QAccel (this); + TQAccel *Accel = new TQAccel (this); Accel->insertItem (Key_Left, 100); Accel->insertItem (Key_Right, 101); - Accel->connectItem (100, m_sldFrequency, SLOT(subtractStep())); - Accel->connectItem (101, m_sldFrequency, SLOT(addStep())); + Accel->connectItem (100, m_sldFrequency, TQT_SLOT(subtractStep())); + Accel->connectItem (101, m_sldFrequency, TQT_SLOT(addStep())); } diff --git a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h index 12ca7d4..1580464 100644 --- a/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h +++ b/kradio3/plugins/gui-standard-display/radioview_frequencyseeker.h @@ -21,16 +21,17 @@ #include "../../src/include/radiodevice_interfaces.h" #include "radioview_element.h" -class QToolButton; -class QSlider; +class TQToolButton; +class TQSlider; -class RadioViewFrequencySeeker : public RadioViewElement, // is a QObject, must be first +class RadioViewFrequencySeeker : public RadioViewElement, // is a TQObject, must be first public ISeekRadioClient, public IFrequencyRadioClient { Q_OBJECT + TQ_OBJECT public: - RadioViewFrequencySeeker(QWidget *parent, const QString &name); + RadioViewFrequencySeeker(TQWidget *tqparent, const TQString &name); ~RadioViewFrequencySeeker(); float getUsability(Interface *) const; @@ -64,11 +65,11 @@ protected slots: protected: - QToolButton *m_btnSearchLeft, + TQToolButton *m_btnSearchLeft, *m_btnStepLeft, *m_btnStepRight, *m_btnSearchRight; - QSlider *m_sldFrequency; + TQSlider *m_sldFrequency; bool m_ignoreChanges; }; diff --git a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui index f4fc98c..0b15331 100644 --- a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui +++ b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>RadioView_SeekerUI</class> <author>Ernst Martin Witte</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>RadioView_SeekerUI</cstring> </property> @@ -20,7 +20,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QToolButton" row="0" column="0"> + <widget class="TQToolButton" row="0" column="0"> <property name="name"> <cstring>btnSearchDown</cstring> </property> @@ -45,7 +45,7 @@ <string>search previous station</string> </property> </widget> - <widget class="QToolButton" row="0" column="1"> + <widget class="TQToolButton" row="0" column="1"> <property name="name"> <cstring>btnStepDown</cstring> </property> @@ -73,7 +73,7 @@ <string>decrease freq. by 0.05 MHz</string> </property> </widget> - <widget class="QSlider" row="0" column="2"> + <widget class="TQSlider" row="0" column="2"> <property name="name"> <cstring>sldRange</cstring> </property> @@ -109,7 +109,7 @@ <comment>Frequency</comment> </property> </widget> - <widget class="QToolButton" row="0" column="3"> + <widget class="TQToolButton" row="0" column="3"> <property name="name"> <cstring>btnStepUp</cstring> </property> @@ -129,7 +129,7 @@ <string>increase freq. by 0.05 MHz</string> </property> </widget> - <widget class="QToolButton" row="0" column="4"> + <widget class="TQToolButton" row="0" column="4"> <property name="name"> <cstring>btnSearchUp</cstring> </property> @@ -163,5 +163,5 @@ <function>destroy()</function> </functions> <pixmapfunction>SmallIconSet</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h index 1f75180..c13c945 100644 --- a/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h +++ b/kradio3/plugins/gui-standard-display/radioview_seekinterface.ui.h @@ -2,18 +2,18 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ void RadioView_SeekerUI::init() { - Accel = new QAccel (this); + Accel = new TQAccel (this); Accel->insertItem (Key_Left, 100); Accel->insertItem (Key_Right, 101); - Accel->connectItem (100, sldRange, SLOT(subtractStep())); - Accel->connectItem (101, sldRange, SLOT(addStep())); + Accel->connectItem (100, sldRange, TQT_SLOT(subtractStep())); + Accel->connectItem (101, sldRange, TQT_SLOT(addStep())); } void RadioView_SeekerUI::destroy() diff --git a/kradio3/plugins/gui-standard-display/radioview_volume.cpp b/kradio3/plugins/gui-standard-display/radioview_volume.cpp index d642aa4..3f25d5e 100644 --- a/kradio3/plugins/gui-standard-display/radioview_volume.cpp +++ b/kradio3/plugins/gui-standard-display/radioview_volume.cpp @@ -16,10 +16,10 @@ ***************************************************************************/ #include <math.h> -#include <qslider.h> -#include <qlayout.h> -#include <qaccel.h> -#include <qtooltip.h> +#include <tqslider.h> +#include <tqlayout.h> +#include <tqaccel.h> +#include <tqtooltip.h> #include <klocale.h> @@ -30,37 +30,37 @@ #define SLIDER_MAXVAL 32768 #define SLIDER_RANGE (SLIDER_MAXVAL - SLIDER_MINVAL) -RadioViewVolume::RadioViewVolume(QWidget *parent, const QString &name) - : RadioViewElement (parent, name, clsRadioSound), +RadioViewVolume::RadioViewVolume(TQWidget *tqparent, const TQString &name) + : RadioViewElement (tqparent, name, clsRadioSound), m_slider(NULL), m_handlingSlot(false) { float v = 0; SoundStreamID ssid = queryCurrentSoundStreamID(); - sendLogDebug (QString ("RadioViewVolume: ssid=%1").arg(ssid.getID())); + sendLogDebug (TQString ("RadioViewVolume: ssid=%1").tqarg(ssid.getID())); queryPlaybackVolume(ssid, v); - m_slider = new QSlider(SLIDER_MINVAL, + m_slider = new TQSlider(SLIDER_MINVAL, SLIDER_MAXVAL, SLIDER_RANGE/10, getSlider4Volume(v), Qt::Vertical, this); - QObject::connect(m_slider, SIGNAL(valueChanged(int)), - this, SLOT(slotVolumeChanged(int))); + TQObject::connect(m_slider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVolumeChanged(int))); - QBoxLayout *l = new QBoxLayout(this, QBoxLayout::LeftToRight); + TQBoxLayout *l = new TQBoxLayout(this, TQBoxLayout::LeftToRight); l->addWidget(m_slider); // Tooltips - QToolTip::add(m_slider, i18n("Change Volume")); + TQToolTip::add(m_slider, i18n("Change Volume")); // Accelerators - QAccel *Accel = new QAccel (this); + TQAccel *Accel = new TQAccel (this); Accel->insertItem (Key_Up, 100); Accel->insertItem (Key_Down, 101); - Accel->connectItem (100, m_slider, SLOT(subtractStep())); - Accel->connectItem (101, m_slider, SLOT(addStep())); + Accel->connectItem (100, m_slider, TQT_SLOT(subtractStep())); + Accel->connectItem (101, m_slider, TQT_SLOT(addStep())); } diff --git a/kradio3/plugins/gui-standard-display/radioview_volume.h b/kradio3/plugins/gui-standard-display/radioview_volume.h index a48c16d..b88f8b4 100644 --- a/kradio3/plugins/gui-standard-display/radioview_volume.h +++ b/kradio3/plugins/gui-standard-display/radioview_volume.h @@ -26,16 +26,17 @@ *@author Martin Witte */ -class QSlider; +class TQSlider; -class RadioViewVolume : public RadioViewElement, // is a QObject, must be first +class RadioViewVolume : public RadioViewElement, // is a TQObject, must be first public IRadioDeviceClient, public ISoundStreamClient, public IErrorLogClient { Q_OBJECT + TQ_OBJECT public: - RadioViewVolume(QWidget *parent, const QString &name); + RadioViewVolume(TQWidget *tqparent, const TQString &name); ~RadioViewVolume(); float getUsability(Interface *) const; @@ -49,7 +50,7 @@ public: RECEIVERS: bool noticePowerChanged (bool /*on*/, const IRadioDevice */*sender*/) { return false; } bool noticeStationChanged (const RadioStation &, const IRadioDevice */*sender*/) { return false; } - bool noticeDescriptionChanged (const QString &, const IRadioDevice */*sender*/) { return false; } + bool noticeDescriptionChanged (const TQString &, const IRadioDevice */*sender*/) { return false; } bool noticeCurrentSoundStreamIDChanged(SoundStreamID /*id*/, const IRadioDevice */*sender*/) { return false; } // ISoundStreamClient @@ -67,7 +68,7 @@ protected: int getSlider4Volume(float volume); float getVolume4Slider(int sl); - QSlider *m_slider; + TQSlider *m_slider; bool m_handlingSlot; }; |