From 0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 6 Sep 2008 04:12:30 +0000 Subject: [FIX] Renamed everything (in use) away from Poké- prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@250 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- sigmodr/SoundUI.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'sigmodr/SoundUI.cpp') diff --git a/sigmodr/SoundUI.cpp b/sigmodr/SoundUI.cpp index b765f7ee..17af5b8d 100644 --- a/sigmodr/SoundUI.cpp +++ b/sigmodr/SoundUI.cpp @@ -18,9 +18,9 @@ // Header include #include "SoundUI.h" -// Pokemod includes -#include "../pokemod/Sound.h" -#include "../pokemod/Pokemod.h" +// Sigmod includes +#include "../sigmod/Sigmod.h" +#include "../sigmod/Sound.h" // Qt includes #include @@ -34,23 +34,23 @@ #include #include -Pokemodr::SoundUI::SoundUI(Pokemod::Sound* sound, QWidget* parent) : +Sigmodr::SoundUI::SoundUI(Sigmod::Sound* sound, QWidget* parent) : ObjectUI(parent), m_output(new Phonon::AudioOutput(Phonon::MusicCategory, this)), m_media(new Phonon::MediaObject(this)), m_buffer(new QBuffer) { setupUi(this); - setObjects(sound, new Pokemod::Sound(*sound)); + setObjects(sound, new Sigmod::Sound(*sound)); } -Pokemodr::SoundUI::~SoundUI() +Sigmodr::SoundUI::~SoundUI() { delete m_media; delete m_buffer; } -void Pokemodr::SoundUI::initGui() +void Sigmodr::SoundUI::initGui() { Phonon::createPath(m_media, m_output); m_media->setTickInterval(100); @@ -67,48 +67,48 @@ void Pokemodr::SoundUI::initGui() buttonBrowse->setIcon(KIcon("document-open")); } -void Pokemodr::SoundUI::refreshGui() +void Sigmodr::SoundUI::refreshGui() { resetAudioData(); } -void Pokemodr::SoundUI::setGui() +void Sigmodr::SoundUI::setGui() { - varName->setText(qobject_cast(modified())->name()); + varName->setText(qobject_cast(modified())->name()); } -void Pokemodr::SoundUI::apply() +void Sigmodr::SoundUI::apply() { - *qobject_cast(original()) = *qobject_cast(modified()); + *qobject_cast(original()) = *qobject_cast(modified()); emit(changed(false)); } -void Pokemodr::SoundUI::discard() +void Sigmodr::SoundUI::discard() { - *qobject_cast(modified()) = *qobject_cast(original()); + *qobject_cast(modified()) = *qobject_cast(original()); setGui(); emit(changed(false)); } -void Pokemodr::SoundUI::on_varName_textChanged(const QString& name) +void Sigmodr::SoundUI::on_varName_textChanged(const QString& name) { const int cursor = varName->cursorPosition(); - qobject_cast(modified())->setName(name); + qobject_cast(modified())->setName(name); varName->setCursorPosition(cursor); } -void Pokemodr::SoundUI::on_buttonBrowse_clicked() +void Sigmodr::SoundUI::on_buttonBrowse_clicked() { QFile file(KFileDialog::getOpenFileName(KUrl("kfiledialog:///audio"), "audio/*|Audio files", this)); if (file.open(QIODevice::ReadOnly)) { - qobject_cast(modified())->setData(file.readAll()); + qobject_cast(modified())->setData(file.readAll()); file.close(); resetAudioData(); } } -void Pokemodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*oldState*/) +void Sigmodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*oldState*/) { switch (newState) { @@ -139,15 +139,15 @@ void Pokemodr::SoundUI::stateChanged(Phonon::State newState, Phonon::State /*old } } -void Pokemodr::SoundUI::resetAudioData() +void Sigmodr::SoundUI::resetAudioData() { m_media->stop(); - m_buffer->setData(qobject_cast(modified())->data()); + m_buffer->setData(qobject_cast(modified())->data()); m_media->setCurrentSource(m_buffer); tick(0); } -void Pokemodr::SoundUI::tick(qint64 time) +void Sigmodr::SoundUI::tick(qint64 time) { QTime currentTime(0, (time / 60000) % 60, (time / 1000) % 60, time % 1000); qint64 total = m_media->totalTime(); -- cgit