summaryrefslogtreecommitdiffstats
path: root/juk/tageditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'juk/tageditor.cpp')
-rw-r--r--juk/tageditor.cpp64
1 files changed, 33 insertions, 31 deletions
diff --git a/juk/tageditor.cpp b/juk/tageditor.cpp
index e4073d24..ed1cdca8 100644
--- a/juk/tageditor.cpp
+++ b/juk/tageditor.cpp
@@ -44,6 +44,8 @@
#undef KeyRelease
+#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
+
using namespace ActionCollection;
class FileNameValidator : public TQValidator
@@ -172,8 +174,8 @@ void TagEditor::slotSetItems(const PlaylistItemList &list)
saveChangesPrompt();
if(m_currentPlaylist) {
- disconnect(m_currentPlaylist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)),
- this, TQT_SLOT(slotItemRemoved(PlaylistItem *)));
+ disconnect(m_currentPlaylist, TQ_SIGNAL(signalAboutToRemove(PlaylistItem *)),
+ this, TQ_SLOT(slotItemRemoved(PlaylistItem *)));
}
if(hadPlaylist && !m_currentPlaylist || !itemPlaylist) {
@@ -189,9 +191,9 @@ void TagEditor::slotSetItems(const PlaylistItemList &list)
}
if(m_currentPlaylist) {
- connect(m_currentPlaylist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)),
- this, TQT_SLOT(slotItemRemoved(PlaylistItem *)));
- connect(m_currentPlaylist, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotPlaylistRemoved()));
+ connect(m_currentPlaylist, TQ_SIGNAL(signalAboutToRemove(PlaylistItem *)),
+ this, TQ_SLOT(slotItemRemoved(PlaylistItem *)));
+ connect(m_currentPlaylist, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotPlaylistRemoved()));
}
if(isVisible())
@@ -403,7 +405,7 @@ void TagEditor::updateCollection()
TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it)
- genreHash.insert(TStringToQString((*it)));
+ genreHash.insert(TStringToTQString((*it)));
m_genreList = genreHash.values();
m_genreList.sort();
@@ -436,7 +438,7 @@ void TagEditor::readConfig()
TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it)
- m_genreList.append(TStringToQString((*it)));
+ m_genreList.append(TStringToTQString((*it)));
m_genreList.sort();
m_genreBox->clear();
@@ -471,9 +473,9 @@ void TagEditor::setupActions()
{
TDEToggleAction *show = new TDEToggleAction(i18n("Show &Tag Editor"), "edit", 0, ActionCollection::actions(), "showEditor");
show->setCheckedState(i18n("Hide &Tag Editor"));
- connect(show, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShown(bool)));
+ connect(show, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setShown(bool)));
- new TDEAction(i18n("&Save"), "document-save", "CTRL+t", TQT_TQOBJECT(this), TQT_SLOT(slotSave()), ActionCollection::actions(), "saveItem");
+ new TDEAction(i18n("&Save"), "document-save", "CTRL+t", this, TQ_SLOT(slotSave()), ActionCollection::actions(), "saveItem");
}
void TagEditor::setupLayout()
@@ -524,7 +526,7 @@ void TagEditor::setupLayout()
horizontalSpacing);
m_fileNameBox = new KLineEdit(this, "fileNameBox");
- m_fileNameBox->setValidator(new FileNameValidator(TQT_TQOBJECT(m_fileNameBox)));
+ m_fileNameBox->setValidator(new FileNameValidator(m_fileNameBox));
TQLabel *fileNameIcon = new TQLabel(this);
fileNameIcon->setPixmap(SmallIcon("audio-x-generic"));
@@ -586,32 +588,32 @@ void TagEditor::setupLayout()
}
- connect(m_artistNameBox, TQT_SIGNAL(textChanged(const TQString&)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_artistNameBox, TQ_SIGNAL(textChanged(const TQString&)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_trackNameBox, TQT_SIGNAL(textChanged(const TQString&)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_trackNameBox, TQ_SIGNAL(textChanged(const TQString&)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_albumNameBox, TQT_SIGNAL(textChanged(const TQString&)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_albumNameBox, TQ_SIGNAL(textChanged(const TQString&)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_genreBox, TQT_SIGNAL(activated(int)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_genreBox, TQ_SIGNAL(activated(int)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_genreBox, TQT_SIGNAL(textChanged(const TQString&)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_genreBox, TQ_SIGNAL(textChanged(const TQString&)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_fileNameBox, TQT_SIGNAL(textChanged(const TQString&)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_fileNameBox, TQ_SIGNAL(textChanged(const TQString&)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_yearSpin, TQT_SIGNAL(valueChanged(int)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_yearSpin, TQ_SIGNAL(valueChanged(int)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_trackSpin, TQT_SIGNAL(valueChanged(int)),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_trackSpin, TQ_SIGNAL(valueChanged(int)),
+ this, TQ_SLOT(slotDataChanged()));
- connect(m_commentBox, TQT_SIGNAL(textChanged()),
- this, TQT_SLOT(slotDataChanged()));
+ connect(m_commentBox, TQ_SIGNAL(textChanged()),
+ this, TQ_SLOT(slotDataChanged()));
}
void TagEditor::save(const PlaylistItemList &list)
@@ -750,7 +752,7 @@ void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *layou
enableBox->hide();
- connect(enableBox, TQT_SIGNAL(toggled(bool)), item, TQT_SLOT(setEnabled(bool)));
+ connect(enableBox, TQ_SIGNAL(toggled(bool)), item, TQ_SLOT(setEnabled(bool)));
m_enableBoxes.insert(item, enableBox);
}
@@ -766,8 +768,8 @@ void TagEditor::showEvent(TQShowEvent *e)
bool TagEditor::eventFilter(TQObject *watched, TQEvent *e)
{
- TQKeyEvent *ke = TQT_TQKEYEVENT(e);
- if(watched->inherits(TQSPINBOX_OBJECT_NAME_STRING) && e->type() == TQEvent::KeyRelease && ke->state() == 0)
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
+ if(watched->inherits("TQSpinBox") && e->type() == TQEvent::KeyRelease && ke->state() == 0)
slotDataChanged();
return false;