diff options
Diffstat (limited to 'noatun/library/effectview.cpp')
-rw-r--r-- | noatun/library/effectview.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/noatun/library/effectview.cpp b/noatun/library/effectview.cpp index 73af1fc2..334781a1 100644 --- a/noatun/library/effectview.cpp +++ b/noatun/library/effectview.cpp @@ -30,22 +30,22 @@ #include <kdialog.h> #include <kiconloader.h> #include <klocale.h> -#include <qdragobject.h> -#include <qheader.h> -#include <qhgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qvgroupbox.h> -#include <qwhatsthis.h> +#include <tqdragobject.h> +#include <tqheader.h> +#include <tqhgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqvgroupbox.h> +#include <tqwhatsthis.h> class EffectListItem : public QListViewItem { public: - EffectListItem(QListView *parent, QListViewItem *after, Effect *e) - : QListViewItem(parent, after, e->title()), mEffect(e) + EffectListItem(TQListView *parent, TQListViewItem *after, Effect *e) + : TQListViewItem(parent, after, e->title()), mEffect(e) { } @@ -55,24 +55,24 @@ private: Effect *mEffect; }; -EffectList::EffectList(QWidget *parent) +EffectList::EffectList(TQWidget *parent) : KListView(parent) { } -bool EffectList::acceptDrag(QDropEvent *event) const +bool EffectList::acceptDrag(TQDropEvent *event) const { - return QCString(event->format()) == "application/x-noatun-effectdrag"; + return TQCString(event->format()) == "application/x-noatun-effectdrag"; } -QDragObject *EffectList::dragObject() const +TQDragObject *EffectList::dragObject() const { if (!currentItem()) return 0; - return new QStoredDrag("application/x-noatun-effectdrag", (QWidget*)this); + return new TQStoredDrag("application/x-noatun-effectdrag", (TQWidget*)this); } EffectView::EffectView() - : KDialogBase((QWidget*)0L, 0, false, i18n("Effects"), Help | Close, Close, true) + : KDialogBase((TQWidget*)0L, 0, false, i18n("Effects"), Help | Close, Close, true) , initialized(false) { } @@ -85,13 +85,13 @@ void EffectView::show() namespace { -QToolButton *newButton(const QIconSet &iconSet, const QString &textLabel, QObject *receiver, const char * slot, QWidget *parent, const char *name = 0) +TQToolButton *newButton(const TQIconSet &iconSet, const TQString &textLabel, TQObject *receiver, const char * slot, TQWidget *parent, const char *name = 0) { - QToolButton *button = new QToolButton(parent, name); + TQToolButton *button = new TQToolButton(parent, name); button->setIconSet(iconSet); button->setTextLabel(textLabel, true); - QObject::connect(button, SIGNAL(clicked()), receiver, slot); - button->setFixedSize(QSize(22, 22)); + TQObject::connect(button, TQT_SIGNAL(clicked()), receiver, slot); + button->setFixedSize(TQSize(22, 22)); return button; } } @@ -105,21 +105,21 @@ void EffectView::init(void) setIcon(SmallIcon("effect")); // Create widgets and layouts - QFrame *box = makeMainWidget(); - QVBoxLayout *boxLayout = new QVBoxLayout(box, 0, KDialog::spacingHint()); + TQFrame *box = makeMainWidget(); + TQVBoxLayout *boxLayout = new TQVBoxLayout(box, 0, KDialog::spacingHint()); // Available - QVGroupBox *topBox = new QVGroupBox(i18n("Available Effects"), box); + TQVGroupBox *topBox = new TQVGroupBox(i18n("Available Effects"), box); topBox->setInsideSpacing(KDialog::spacingHint()); - QFrame *topTopFrame = new QFrame(topBox); - QHBoxLayout *topTopLayout = new QHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); + TQFrame *topTopFrame = new TQFrame(topBox); + TQHBoxLayout *topTopLayout = new TQHBoxLayout(topTopFrame, 0, KDialog::spacingHint()); topTopLayout->setAutoAdd(true); available = new KComboBox(false, topTopFrame); - QToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), this, SLOT(addEffect()), topTopFrame); + TQToolButton *add = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Add"), this, TQT_SLOT(addEffect()), topTopFrame); // Active - QHGroupBox *bottomBox = new QHGroupBox(i18n("Active Effects"), box); + TQHGroupBox *bottomBox = new TQHGroupBox(i18n("Active Effects"), box); bottomBox->setInsideSpacing(KDialog::spacingHint()); active = new EffectList(bottomBox); @@ -136,27 +136,27 @@ void EffectView::init(void) active->setSorting(-1); active->setDropVisualizer(true); active->setItemsMovable(true); - active->setSelectionMode(QListView::Single); + active->setSelectionMode(TQListView::Single); active->setDragEnabled(true); - connect(active, SIGNAL(dropped(QDropEvent *, QListViewItem *)), SLOT(activeDrop(QDropEvent *, QListViewItem *))); + connect(active, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *)), TQT_SLOT(activeDrop(TQDropEvent *, TQListViewItem *))); // when a new effect is added - connect(napp->effects(), SIGNAL(added(Effect *)), SLOT(added(Effect *))); - connect(napp->effects(), SIGNAL(removed(Effect *)), SLOT(removed(Effect *))); - connect(napp->effects(), SIGNAL(moved(Effect *)), SLOT(moved(Effect *))); + connect(napp->effects(), TQT_SIGNAL(added(Effect *)), TQT_SLOT(added(Effect *))); + connect(napp->effects(), TQT_SIGNAL(removed(Effect *)), TQT_SLOT(removed(Effect *))); + connect(napp->effects(), TQT_SIGNAL(moved(Effect *)), TQT_SLOT(moved(Effect *))); available->setCurrentItem(0); - connect(active, SIGNAL(currentChanged(QListViewItem *)), SLOT(activeChanged(QListViewItem *))); + connect(active, TQT_SIGNAL(currentChanged(TQListViewItem *)), TQT_SLOT(activeChanged(TQListViewItem *))); active->setCurrentItem(0); // the buttons - QFrame *bottomLeftFrame = new QFrame(bottomBox); - QVBoxLayout *bottomLeftLayout = new QVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); - up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), this, SLOT(moveUp()), bottomLeftFrame); - down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), this, SLOT(moveDown()), bottomLeftFrame); - configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), this, SLOT(configureEffect()), bottomLeftFrame); - remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), this, SLOT(removeEffect()), bottomLeftFrame); + TQFrame *bottomLeftFrame = new TQFrame(bottomBox); + TQVBoxLayout *bottomLeftLayout = new TQVBoxLayout(bottomLeftFrame, 0, KDialog::spacingHint()); + up = newButton(BarIconSet("up", KIcon::SizeSmall), i18n("Up"), this, TQT_SLOT(moveUp()), bottomLeftFrame); + down = newButton(BarIconSet("down", KIcon::SizeSmall), i18n("Down"), this, TQT_SLOT(moveDown()), bottomLeftFrame); + configure = newButton(BarIconSet("configure", KIcon::SizeSmall), i18n("Configure"), this, TQT_SLOT(configureEffect()), bottomLeftFrame); + remove = newButton(BarIconSet("remove", KIcon::SizeSmall), i18n("Remove"), this, TQT_SLOT(removeEffect()), bottomLeftFrame); bottomLeftLayout->addWidget(up); bottomLeftLayout->addWidget(down); bottomLeftLayout->addWidget(configure); @@ -167,18 +167,18 @@ void EffectView::init(void) activeChanged(active->currentItem()); // Inline documentation - QWhatsThis::add(available, i18n("This shows all available effects.\n\nTo activate a plugin, drag files from here to the active pane on the right.")); - QWhatsThis::add(add, i18n("This will place the selected effect at the bottom of your chain.")); - QWhatsThis::add(active, i18n("This shows your effect chain. Noatun supports an unlimited amount of effects in any order. You can even have the same effect twice.\n\nDrag the items to and from here to add and remove them, respectively. You may also reorder them with drag-and-drop. These actions can also be performed with the buttons to the right.")); - QWhatsThis::add(up, i18n("Move the currently selected effect up in the chain.")); - QWhatsThis::add(down, i18n("Move the currently selected effect down in the chain.")); - QWhatsThis::add(configure, i18n("Configure the currently selected effect.\n\nYou can change things such as intensity from here.")); - QWhatsThis::add(remove, i18n("This will remove the selected effect from your chain.")); + TQWhatsThis::add(available, i18n("This shows all available effects.\n\nTo activate a plugin, drag files from here to the active pane on the right.")); + TQWhatsThis::add(add, i18n("This will place the selected effect at the bottom of your chain.")); + TQWhatsThis::add(active, i18n("This shows your effect chain. Noatun supports an unlimited amount of effects in any order. You can even have the same effect twice.\n\nDrag the items to and from here to add and remove them, respectively. You may also reorder them with drag-and-drop. These actions can also be performed with the buttons to the right.")); + TQWhatsThis::add(up, i18n("Move the currently selected effect up in the chain.")); + TQWhatsThis::add(down, i18n("Move the currently selected effect down in the chain.")); + TQWhatsThis::add(configure, i18n("Configure the currently selected effect.\n\nYou can change things such as intensity from here.")); + TQWhatsThis::add(remove, i18n("This will remove the selected effect from your chain.")); resize(300, 400); } -void EffectView::activeDrop(QDropEvent *, QListViewItem *pafter) +void EffectView::activeDrop(TQDropEvent *, TQListViewItem *pafter) { EffectListItem *after(static_cast<EffectListItem*>(pafter)); napp->effects()->move(after ? after->effect() : 0, @@ -186,9 +186,9 @@ void EffectView::activeDrop(QDropEvent *, QListViewItem *pafter) activeChanged(active->currentItem()); } -QListViewItem *EffectView::toListItem(Effect *e) const +TQListViewItem *EffectView::toListItem(Effect *e) const { - for(QListViewItem *i = active->firstChild(); i; i = i->itemBelow()) + for(TQListViewItem *i = active->firstChild(); i; i = i->itemBelow()) if(static_cast<EffectListItem*>(i)->effect() == e) return i; return 0; @@ -257,11 +257,11 @@ void EffectView::configureEffect() Effect *e = static_cast<EffectListItem*>(active->currentItem())->effect(); if(!e) return; - QWidget *c = e->configure(); + TQWidget *c = e->configure(); if(c) c->show(); } -void EffectView::activeChanged(QListViewItem *i) +void EffectView::activeChanged(TQListViewItem *i) { if(i) { |