diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-09-06 04:12:30 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-09-06 04:12:30 +0000 |
| commit | 0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9 (patch) | |
| tree | a2031b9d0016fcbd49a51c0d1a2292d1f2d8b566 /sigmodr/SoundUI.cpp | |
| parent | b81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7 (diff) | |
| download | sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.tar.gz sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.tar.xz sigen-0b4b89cf8efdc15e5a8d4b6cb24a5c8a025227d9.zip | |
[FIX] Renamed everything (in use) away from Poké- prefixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@250 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigmodr/SoundUI.cpp')
| -rw-r--r-- | sigmodr/SoundUI.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
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 <QtCore/QBuffer> @@ -34,23 +34,23 @@ #include <Phonon/AudioOutput> #include <Phonon/MediaObject> -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<Pokemod::Sound*>(modified())->name()); + varName->setText(qobject_cast<Sigmod::Sound*>(modified())->name()); } -void Pokemodr::SoundUI::apply() +void Sigmodr::SoundUI::apply() { - *qobject_cast<Pokemod::Sound*>(original()) = *qobject_cast<Pokemod::Sound*>(modified()); + *qobject_cast<Sigmod::Sound*>(original()) = *qobject_cast<Sigmod::Sound*>(modified()); emit(changed(false)); } -void Pokemodr::SoundUI::discard() +void Sigmodr::SoundUI::discard() { - *qobject_cast<Pokemod::Sound*>(modified()) = *qobject_cast<Pokemod::Sound*>(original()); + *qobject_cast<Sigmod::Sound*>(modified()) = *qobject_cast<Sigmod::Sound*>(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<Pokemod::Sound*>(modified())->setName(name); + qobject_cast<Sigmod::Sound*>(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<Pokemod::Sound*>(modified())->setData(file.readAll()); + qobject_cast<Sigmod::Sound*>(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<Pokemod::Sound*>(modified())->data()); + m_buffer->setData(qobject_cast<Sigmod::Sound*>(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(); |
